From 872e9db58169e34a512246264247d1cfdffa9550 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 12 Mar 2015 10:43:47 +1000 Subject: [PATCH] Delete everything in prep for laravel 5. --- .bowerrc | 3 - .gitattributes | 1 - .gitignore | 24 - Gruntfile.js | 124 - LICENSE | 40 - README.md | 118 - _ide_helper.php | 14351 ------ _ide_helper_models.php | 1239 - app/commands/.gitkeep | 0 app/commands/CheckData.php | 266 - app/commands/CreateRandomData.php | 88 - app/commands/ImportTimesheetData.php | 335 - app/commands/ResetData.php | 24 - app/commands/SendRecurringInvoices.php | 113 - app/config/app.php | 225 - app/config/auth.php | 71 - app/config/cache.php | 89 - app/config/compile.php | 18 - app/config/database.php | 124 - app/config/gae-development/database.php | 18 - app/config/gae-production/app.php | 9 - app/config/gae-production/cache.php | 7 - app/config/gae-production/database.php | 19 - app/config/gae-production/session.php | 7 - app/config/mail.php | 124 - app/config/packages/.gitkeep | 0 .../packages/anahkiasen/former/Nude.php | 14 - .../anahkiasen/former/TwitterBootstrap.php | 14 - .../anahkiasen/former/TwitterBootstrap3.php | 26 - .../anahkiasen/former/ZurbFoundation.php | 35 - .../anahkiasen/former/ZurbFoundation4.php | 36 - .../packages/anahkiasen/former/config.php | 59 - .../ignited/laravel-omnipay/config.php | 19 - app/config/packages/zizaco/confide/.gitkeep | 0 app/config/packages/zizaco/confide/config.php | 117 - app/config/queue.php | 78 - app/config/remote.php | 59 - app/config/session.php | 141 - app/config/testing/cache.php | 20 - app/config/testing/session.php | 21 - app/config/view.php | 31 - app/config/workbench.php | 31 - app/controllers/.gitkeep | 0 app/controllers/AccountController.php | 715 - app/controllers/AccountGatewayController.php | 292 - app/controllers/ActivityController.php | 20 - app/controllers/AppController.php | 171 - app/controllers/BaseController.php | 21 - app/controllers/ClientApiController.php | 51 - app/controllers/ClientController.php | 278 - app/controllers/CreditController.php | 149 - app/controllers/DashboardController.php | 79 - app/controllers/HomeController.php | 68 - app/controllers/IntegrationController.php | 26 - app/controllers/InvoiceApiController.php | 192 - app/controllers/InvoiceController.php | 542 - app/controllers/PaymentApiController.php | 36 - app/controllers/PaymentController.php | 748 - app/controllers/ProductController.php | 96 - app/controllers/QuoteApiController.php | 36 - app/controllers/QuoteController.php | 187 - app/controllers/ReportController.php | 127 - app/controllers/TimesheetController.php | 93 - app/controllers/TokenController.php | 161 - app/controllers/UserController.php | 507 - app/database/migrations/.gitkeep | 0 ...11_05_180133_confide_setup_users_table.php | 550 - ...013_11_28_195703_setup_countries_table.php | 47 - .../2014_02_13_151500_add_cascase_drops.php | 32 - ...151817_add_support_for_invoice_designs.php | 72 - ...2014_03_03_155556_add_phone_to_account.php | 36 - ...2014_03_19_201454_add_language_support.php | 60 - ..._03_20_200300_create_payment_libraries.php | 58 - ...2014_03_23_051736_enable_forcing_jspdf.php | 34 - ...0_add_sort_and_recommended_to_gateways.php | 49 - .../2014_04_03_191105_add_pro_plan.php | 34 - .../2014_04_17_100523_add_remember_token.php | 34 - .../2014_04_17_145108_add_custom_fields.php | 60 - ...014_04_23_170909_add_products_settings.php | 39 - ...014_04_29_174315_add_advanced_settings.php | 42 - .../2014_05_17_175626_add_quotes.php | 38 - ...epted_credit_cards_to_account_gateways.php | 34 - .../2014_07_13_142654_one_click_install.php | 58 - ...4_07_17_205900_support_hiding_quantity.php | 66 - .../2014_07_24_171214_add_zapier_support.php | 42 - ...14_10_01_141248_add_company_vat_number.php | 43 - ...4_10_05_141856_track_last_seen_message.php | 46 - .../2014_10_06_103529_add_timesheets.php | 152 - ..._10_06_195330_add_invoice_design_table.php | 519 - ..._13_054100_add_invoice_number_settings.php | 63 - ...14_10_14_225227_add_danish_translation.php | 29 - .../2014_10_22_174452_add_affiliate_price.php | 44 - ...014_10_30_184126_add_company_id_number.php | 43 - ...1_04_200406_allow_null_client_currency.php | 31 - .../2014_12_03_154119_add_discount_type.php | 34 - .../2015_02_12_102940_add_email_templates.php | 38 - ...015_02_17_131714_support_token_billing.php | 56 - .../2015_02_27_081836_add_invoice_footer.php | 44 - .../2015_03_03_140259_add_tokens.php | 54 - .../2015_03_09_151011_add_ip_to_activity.php | 34 - app/database/production.sqlite | Bin 22528 -> 0 bytes app/database/seeds/.gitkeep | 0 app/database/seeds/ConstantsSeeder.php | 327 - app/database/seeds/CountriesSeeder.php | 37 - app/database/seeds/DatabaseSeeder.php | 26 - app/database/seeds/PaymentLibrariesSeeder.php | 35 - .../seeds/SecurePaymentFormSeeder.php | 187 - app/database/seeds/UserTableSeeder.php | 11 - app/filters.php | 273 - app/handlers/InvoiceEventHandler.php | 51 - app/handlers/UserEventHandler.php | 30 - app/includes/parsecsv.lib.php | 695 - app/lang/da/pagination.php | 20 - app/lang/da/public.php | 209 - app/lang/da/reminders.php | 26 - app/lang/da/texts.php | 582 - app/lang/da/validation.php | 106 - app/lang/de/pagination.php | 20 - app/lang/de/public.php | 209 - app/lang/de/reminders.php | 24 - app/lang/de/texts.php | 574 - app/lang/de/validation.php | 108 - app/lang/en/pagination.php | 20 - app/lang/en/public.php | 209 - app/lang/en/reminders.php | 24 - app/lang/en/texts.php | 581 - app/lang/en/validation.php | 102 - app/lang/es/pagination.php | 20 - app/lang/es/public.php | 209 - app/lang/es/reminders.php | 24 - app/lang/es/texts.php | 554 - app/lang/es/validation.php | 111 - app/lang/fr/pagination.php | 20 - app/lang/fr/public.php | 209 - app/lang/fr/reminders.php | 24 - app/lang/fr/texts.php | 574 - app/lang/fr/validation.php | 138 - app/lang/it/pagination.php | 20 - app/lang/it/public.php | 209 - app/lang/it/reminders.php | 24 - app/lang/it/texts.php | 576 - app/lang/it/validation.php | 107 - app/lang/lt/pagination.php | 20 - app/lang/lt/public.php | 209 - app/lang/lt/reminders.php | 24 - app/lang/lt/texts.php | 586 - app/lang/lt/validation.php | 102 - app/lang/nb_NO/pagination.php | 20 - app/lang/nb_NO/public.php | 209 - app/lang/nb_NO/reminders.php | 24 - app/lang/nb_NO/texts.php | 582 - app/lang/nb_NO/validation.php | 102 - app/lang/nl/pagination.php | 20 - app/lang/nl/public.php | 209 - app/lang/nl/reminders.php | 24 - app/lang/nl/texts.php | 578 - app/lang/nl/validation.php | 111 - app/lang/pt_BR/pagination.php | 20 - app/lang/pt_BR/public.php | 209 - app/lang/pt_BR/reminders.php | 24 - app/lang/pt_BR/texts.php | 565 - app/lang/pt_BR/validation.php | 106 - app/libraries/Utils.php | 604 - app/libraries/entity.php | 8 - app/libraries/timesheet_utils.php | 119 - app/models/Account.php | 363 - app/models/AccountGateway.php | 28 - app/models/AccountGatewayToken.php | 7 - app/models/AccountToken.php | 9 - app/models/Activity.php | 470 - app/models/Affiliate.php | 7 - app/models/Client.php | 268 - app/models/Contact.php | 74 - app/models/Country.php | 9 - app/models/Credit.php | 55 - app/models/Currency.php | 7 - app/models/DateFormat.php | 7 - app/models/DatetimeFormat.php | 7 - app/models/EntityModel.php | 78 - app/models/Frequency.php | 7 - app/models/Gateway.php | 52 - app/models/Industry.php | 7 - app/models/Invitation.php | 29 - app/models/Invoice.php | 230 - app/models/InvoiceDesign.php | 7 - app/models/InvoiceItem.php | 14 - app/models/InvoiceStatus.php | 7 - app/models/Language.php | 7 - app/models/License.php | 7 - app/models/Payment.php | 60 - app/models/PaymentLibrary.php | 12 - app/models/PaymentTerm.php | 7 - app/models/PaymentType.php | 7 - app/models/Product.php | 9 - app/models/Project.php | 45 - app/models/ProjectCode.php | 45 - app/models/Size.php | 7 - app/models/Subscription.php | 7 - app/models/TaxRate.php | 5 - app/models/Theme.php | 7 - app/models/Timesheet.php | 22 - app/models/TimesheetEvent.php | 122 - app/models/TimesheetEventSource.php | 40 - app/models/Timezone.php | 7 - app/models/User.php | 170 - app/ninja/mailers/ContactMailer.php | 104 - app/ninja/mailers/Mailer.php | 27 - app/ninja/mailers/UserMailer.php | 62 - app/ninja/repositories/AccountRepository.php | 234 - app/ninja/repositories/ClientRepository.php | 202 - app/ninja/repositories/CreditRepository.php | 77 - app/ninja/repositories/InvoiceRepository.php | 490 - app/ninja/repositories/PaymentRepository.php | 154 - app/ninja/repositories/TaxRateRepository.php | 42 - app/routes.php | 493 - app/start/artisan.php | 18 - app/start/global.php | 103 - app/start/local.php | 3 - app/storage/.gitkeep | 0 app/storage/cache/.gitkeep | 0 app/storage/logs/.gitkeep | 0 app/storage/meta/.gitkeep | 0 app/storage/sessions/.gitkeep | 0 app/storage/views/.gitkeep | 0 app/tests/ExampleTest.php | 16 - app/tests/TestCase.php | 19 - app/tests/TimesheetUtilsTest.php | 26 - app/tests/data/Demo/demo.response.json | 5 - app/views/accounts/account_gateway.blade.php | 153 - app/views/accounts/details.blade.php | 252 - app/views/accounts/email_templates.blade.php | 109 - app/views/accounts/export.blade.php | 11 - app/views/accounts/import_export.blade.php | 61 - app/views/accounts/import_map.blade.php | 73 - app/views/accounts/invoice_design.blade.php | 116 - app/views/accounts/invoice_settings.blade.php | 73 - app/views/accounts/nav.blade.php | 16 - app/views/accounts/nav_advanced.blade.php | 17 - app/views/accounts/notifications.blade.php | 47 - app/views/accounts/payments.blade.php | 60 - app/views/accounts/product.blade.php | 56 - app/views/accounts/products.blade.php | 48 - app/views/accounts/token.blade.php | 30 - app/views/accounts/token_management.blade.php | 67 - app/views/accounts/user_management.blade.php | 71 - app/views/client.blade.php | 99 - app/views/clients/edit.blade.php | 168 - app/views/clients/show.blade.php | 233 - app/views/coming_soon.blade.php | 35 - app/views/credits/edit.blade.php | 64 - app/views/dashboard.blade.php | 159 - app/views/datatable.blade.php | 68 - app/views/emails/auth/reminder.blade.php | 13 - app/views/emails/confirm_html.blade.php | 41 - app/views/emails/confirm_text.blade.php | 7 - app/views/emails/contact_html.blade.php | 1 - app/views/emails/contact_text.blade.php | 1 - app/views/emails/error.blade.php | 0 app/views/emails/invoice_html.blade.php | 10 - app/views/emails/invoice_paid_html.blade.php | 21 - app/views/emails/invoice_paid_text.blade.php | 11 - app/views/emails/invoice_sent_html.blade.php | 18 - app/views/emails/invoice_sent_text.blade.php | 8 - app/views/emails/invoice_text.blade.php | 1 - .../emails/invoice_viewed_html.blade.php | 18 - .../emails/invoice_viewed_text.blade.php | 8 - .../license_confirmation_html.blade.php | 18 - .../license_confirmation_text.blade.php | 8 - app/views/emails/passwordreset_html.blade.php | 9 - .../payment_confirmation_html.blade.php | 7 - .../payment_confirmation_text.blade.php | 1 - app/views/emails/view_action.blade.php | 17 - app/views/error.blade.php | 20 - app/views/header.blade.php | 605 - app/views/invoices/deleted.blade.php | 1 - app/views/invoices/edit.blade.php | 1671 - app/views/invoices/history.blade.php | 61 - app/views/invoices/pdf.blade.php | 126 - app/views/invoices/view.blade.php | 84 - app/views/list.blade.php | 164 - app/views/master.blade.php | 139 - app/views/payments/edit.blade.php | 70 - app/views/payments/payment.blade.php | 323 - app/views/plans.blade.php | 62 - app/views/public/header.blade.php | 276 - app/views/public/license.blade.php | 101 - app/views/public/terms.blade.php | 177 - app/views/public_list.blade.php | 110 - app/views/reports/d3.blade.php | 309 - app/views/reports/report_builder.blade.php | 106 - app/views/script.blade.php | 26 - app/views/secure_payment.blade.php | 130 - app/views/setup.blade.php | 139 - app/views/timesheets/edit.blade.php | 76 - app/views/users/edit.blade.php | 30 - app/views/users/forgot_password.blade.php | 86 - app/views/users/login.blade.php | 119 - app/views/users/reset_password.blade.php | 95 - artisan | 74 - bootstrap/autoload.php | 75 - bootstrap/environment.default.php | 4 - bootstrap/paths.php | 57 - bootstrap/start.php | 140 - bower.json | 26 - codeception.yml | 18 - composer.json | 71 - composer.lock | 6225 --- node_modules/grunt-contrib-concat/LICENSE-MIT | 22 - node_modules/grunt-contrib-concat/README.md | 280 - .../node_modules/chalk/index.js | 63 - .../chalk/node_modules/.bin/strip-ansi | 1 - .../node_modules/ansi-styles/ansi-styles.js | 38 - .../node_modules/ansi-styles/package.json | 58 - .../chalk/node_modules/ansi-styles/readme.md | 65 - .../chalk/node_modules/has-color/index.js | 32 - .../chalk/node_modules/has-color/package.json | 58 - .../chalk/node_modules/has-color/readme.md | 30 - .../chalk/node_modules/strip-ansi/cli.js | 27 - .../chalk/node_modules/strip-ansi/index.js | 4 - .../node_modules/strip-ansi/package.json | 64 - .../chalk/node_modules/strip-ansi/readme.md | 46 - .../node_modules/chalk/package.json | 61 - .../node_modules/chalk/readme.md | 158 - .../grunt-contrib-concat/package.json | 57 - .../grunt-contrib-concat/tasks/concat.js | 70 - .../grunt-contrib-concat/tasks/lib/comment.js | 34 - node_modules/grunt/.npmignore | 8 - node_modules/grunt/LICENSE-MIT | 22 - node_modules/grunt/README.md | 19 - node_modules/grunt/internal-tasks/bump.js | 151 - node_modules/grunt/internal-tasks/subgrunt.js | 34 - node_modules/grunt/lib/grunt.js | 162 - node_modules/grunt/lib/grunt/cli.js | 128 - node_modules/grunt/lib/grunt/config.js | 118 - node_modules/grunt/lib/grunt/event.js | 16 - node_modules/grunt/lib/grunt/fail.js | 84 - node_modules/grunt/lib/grunt/file.js | 448 - node_modules/grunt/lib/grunt/help.js | 129 - node_modules/grunt/lib/grunt/log.js | 352 - node_modules/grunt/lib/grunt/option.js | 42 - node_modules/grunt/lib/grunt/task.js | 458 - node_modules/grunt/lib/grunt/template.js | 95 - node_modules/grunt/lib/util/task.js | 337 - node_modules/grunt/node_modules/.bin/cake | 1 - node_modules/grunt/node_modules/.bin/coffee | 1 - node_modules/grunt/node_modules/.bin/js-yaml | 1 - node_modules/grunt/node_modules/.bin/nopt | 1 - node_modules/grunt/node_modules/.bin/rimraf | 1 - node_modules/grunt/node_modules/.bin/which | 1 - .../grunt/node_modules/async/.gitmodules | 9 - .../grunt/node_modules/async/.npmignore | 4 - node_modules/grunt/node_modules/async/LICENSE | 19 - .../grunt/node_modules/async/Makefile | 25 - .../grunt/node_modules/async/README.md | 1021 - .../grunt/node_modules/async/index.js | 3 - .../grunt/node_modules/async/lib/async.js | 692 - .../grunt/node_modules/async/package.json | 32 - .../node_modules/coffee-script/.npmignore | 11 - .../grunt/node_modules/coffee-script/CNAME | 1 - .../grunt/node_modules/coffee-script/LICENSE | 22 - .../grunt/node_modules/coffee-script/README | 51 - .../grunt/node_modules/coffee-script/Rakefile | 78 - .../grunt/node_modules/coffee-script/bin/cake | 7 - .../node_modules/coffee-script/bin/coffee | 7 - .../coffee-script/extras/jsl.conf | 44 - .../lib/coffee-script/browser.js | 92 - .../coffee-script/lib/coffee-script/cake.js | 111 - .../lib/coffee-script/coffee-script.js | 167 - .../lib/coffee-script/command.js | 500 - .../lib/coffee-script/grammar.js | 606 - .../lib/coffee-script/helpers.js | 77 - .../coffee-script/lib/coffee-script/index.js | 11 - .../coffee-script/lib/coffee-script/lexer.js | 788 - .../coffee-script/lib/coffee-script/nodes.js | 2986 -- .../lib/coffee-script/optparse.js | 138 - .../coffee-script/lib/coffee-script/parser.js | 683 - .../coffee-script/lib/coffee-script/repl.js | 261 - .../lib/coffee-script/rewriter.js | 349 - .../coffee-script/lib/coffee-script/scope.js | 146 - .../node_modules/coffee-script/package.json | 47 - .../grunt/node_modules/colors/MIT-LICENSE.txt | 22 - .../grunt/node_modules/colors/ReadMe.md | 77 - .../grunt/node_modules/colors/colors.js | 342 - .../grunt/node_modules/colors/example.html | 76 - .../grunt/node_modules/colors/example.js | 77 - .../grunt/node_modules/colors/package.json | 29 - .../grunt/node_modules/colors/test.js | 70 - .../colors/themes/winston-dark.js | 12 - .../colors/themes/winston-light.js | 12 - .../grunt/node_modules/dateformat/Readme.md | 67 - .../node_modules/dateformat/lib/dateformat.js | 165 - .../node_modules/dateformat/package.json | 24 - .../dateformat/test/test_weekofyear.js | 4 - .../dateformat/test/test_weekofyear.sh | 27 - .../node_modules/eventemitter2/README.md | 212 - .../grunt/node_modules/eventemitter2/index.js | 1 - .../eventemitter2/lib/eventemitter2.js | 561 - .../node_modules/eventemitter2/package.json | 62 - .../grunt/node_modules/exit/.jshintrc | 14 - .../grunt/node_modules/exit/.npmignore | 0 .../grunt/node_modules/exit/.travis.yml | 6 - .../grunt/node_modules/exit/Gruntfile.js | 48 - .../grunt/node_modules/exit/LICENSE-MIT | 22 - .../grunt/node_modules/exit/README.md | 75 - .../grunt/node_modules/exit/lib/exit.js | 41 - .../grunt/node_modules/exit/package.json | 51 - .../grunt/node_modules/exit/test/exit_test.js | 121 - .../exit/test/fixtures/10-stderr.txt | 10 - .../exit/test/fixtures/10-stdout-stderr.txt | 20 - .../exit/test/fixtures/10-stdout.txt | 10 - .../exit/test/fixtures/100-stderr.txt | 100 - .../exit/test/fixtures/100-stdout-stderr.txt | 200 - .../exit/test/fixtures/100-stdout.txt | 100 - .../exit/test/fixtures/1000-stderr.txt | 1000 - .../exit/test/fixtures/1000-stdout-stderr.txt | 2000 - .../exit/test/fixtures/1000-stdout.txt | 1000 - .../exit/test/fixtures/create-files.sh | 8 - .../exit/test/fixtures/log-broken.js | 23 - .../node_modules/exit/test/fixtures/log.js | 25 - .../grunt/node_modules/findup-sync/.jshintrc | 15 - .../grunt/node_modules/findup-sync/.npmignore | 0 .../node_modules/findup-sync/.travis.yml | 5 - .../node_modules/findup-sync/Gruntfile.js | 25 - .../node_modules/findup-sync/LICENSE-MIT | 22 - .../grunt/node_modules/findup-sync/README.md | 45 - .../findup-sync/lib/findup-sync.js | 46 - .../findup-sync/node_modules/glob/.npmignore | 2 - .../findup-sync/node_modules/glob/.travis.yml | 3 - .../findup-sync/node_modules/glob/LICENSE | 27 - .../findup-sync/node_modules/glob/README.md | 250 - .../node_modules/glob/examples/g.js | 9 - .../node_modules/glob/examples/usr-local.js | 9 - .../findup-sync/node_modules/glob/glob.js | 728 - .../glob/node_modules/inherits/LICENSE | 16 - .../glob/node_modules/inherits/README.md | 42 - .../glob/node_modules/inherits/inherits.js | 1 - .../node_modules/inherits/inherits_browser.js | 23 - .../glob/node_modules/inherits/package.json | 33 - .../glob/node_modules/inherits/test.js | 25 - .../node_modules/glob/package.json | 44 - .../node_modules/glob/test/00-setup.js | 176 - .../node_modules/glob/test/bash-comparison.js | 63 - .../node_modules/glob/test/bash-results.json | 351 - .../node_modules/glob/test/cwd-test.js | 55 - .../node_modules/glob/test/globstar-match.js | 19 - .../node_modules/glob/test/mark.js | 118 - .../glob/test/new-glob-optional-options.js | 10 - .../node_modules/glob/test/nocase-nomagic.js | 113 - .../node_modules/glob/test/pause-resume.js | 73 - .../node_modules/glob/test/readme-issue.js | 36 - .../node_modules/glob/test/root-nomount.js | 39 - .../node_modules/glob/test/root.js | 46 - .../node_modules/glob/test/stat.js | 32 - .../node_modules/glob/test/zz-cleanup.js | 11 - .../node_modules/lodash/LICENSE.txt | 22 - .../findup-sync/node_modules/lodash/README.md | 163 - .../node_modules/lodash/dist/lodash.compat.js | 7157 --- .../lodash/dist/lodash.compat.min.js | 61 - .../node_modules/lodash/dist/lodash.js | 6785 --- .../node_modules/lodash/dist/lodash.min.js | 56 - .../lodash/dist/lodash.underscore.js | 4979 -- .../lodash/dist/lodash.underscore.min.js | 39 - .../findup-sync/node_modules/lodash/lodash.js | 7179 --- .../node_modules/lodash/package.json | 102 - .../node_modules/findup-sync/package.json | 52 - .../findup-sync/test/findup-sync_test.js | 48 - .../findup-sync/test/fixtures/a.txt | 0 .../findup-sync/test/fixtures/a/b/bar.txt | 0 .../findup-sync/test/fixtures/a/foo.txt | 0 .../findup-sync/test/fixtures/aaa.txt | 0 .../grunt/node_modules/getobject/.jshintrc | 15 - .../grunt/node_modules/getobject/.npmignore | 1 - .../grunt/node_modules/getobject/.travis.yml | 6 - .../grunt/node_modules/getobject/Gruntfile.js | 48 - .../grunt/node_modules/getobject/LICENSE-MIT | 22 - .../grunt/node_modules/getobject/README.md | 20 - .../node_modules/getobject/lib/getobject.js | 60 - .../grunt/node_modules/getobject/package.json | 48 - .../getobject/test/namespace_test.js | 51 - .../grunt/node_modules/glob/.npmignore | 2 - .../grunt/node_modules/glob/.travis.yml | 3 - node_modules/grunt/node_modules/glob/LICENSE | 27 - .../grunt/node_modules/glob/README.md | 233 - .../grunt/node_modules/glob/examples/g.js | 9 - .../node_modules/glob/examples/usr-local.js | 9 - node_modules/grunt/node_modules/glob/glob.js | 643 - .../glob/node_modules/graceful-fs/.npmignore | 1 - .../glob/node_modules/graceful-fs/LICENSE | 27 - .../glob/node_modules/graceful-fs/README.md | 33 - .../node_modules/graceful-fs/graceful-fs.js | 442 - .../node_modules/graceful-fs/package.json | 49 - .../node_modules/graceful-fs/test/open.js | 46 - .../node_modules/graceful-fs/test/ulimit.js | 158 - .../glob/node_modules/inherits/README.md | 51 - .../glob/node_modules/inherits/inherits.js | 29 - .../glob/node_modules/inherits/package.json | 30 - .../grunt/node_modules/glob/package.json | 40 - .../grunt/node_modules/glob/test/00-setup.js | 176 - .../node_modules/glob/test/bash-comparison.js | 63 - .../node_modules/glob/test/bash-results.json | 348 - .../grunt/node_modules/glob/test/cwd-test.js | 55 - .../grunt/node_modules/glob/test/mark.js | 74 - .../node_modules/glob/test/nocase-nomagic.js | 113 - .../node_modules/glob/test/pause-resume.js | 73 - .../node_modules/glob/test/root-nomount.js | 39 - .../grunt/node_modules/glob/test/root.js | 46 - .../node_modules/glob/test/zz-cleanup.js | 11 - .../node_modules/grunt-legacy-util/.npmignore | 1 - .../grunt-legacy-util/Gruntfile.js | 16 - .../grunt-legacy-util/LICENSE-MIT | 22 - .../node_modules/grunt-legacy-util/README.md | 26 - .../node_modules/grunt-legacy-util/index.js | 187 - .../grunt-legacy-util/package.json | 54 - .../test/fixtures/Gruntfile-execArgv-child.js | 7 - .../test/fixtures/Gruntfile-execArgv.js | 17 - .../test/fixtures/Gruntfile-print-text.js | 8 - .../grunt-legacy-util/test/fixtures/exec.cmd | 1 - .../grunt-legacy-util/test/fixtures/exec.sh | 2 - .../test/fixtures/spawn-multibyte.js | 17 - .../grunt-legacy-util/test/fixtures/spawn.js | 8 - .../grunt-legacy-util/test/index.js | 313 - .../grunt/node_modules/hooker/LICENSE-MIT | 22 - .../grunt/node_modules/hooker/README.md | 186 - .../grunt/node_modules/hooker/child.js | 101 - .../node_modules/hooker/dist/ba-hooker.js | 169 - .../node_modules/hooker/dist/ba-hooker.min.js | 4 - .../grunt/node_modules/hooker/grunt.js | 47 - .../grunt/node_modules/hooker/lib/hooker.js | 174 - .../grunt/node_modules/hooker/package.json | 45 - .../grunt/node_modules/hooker/parent.js | 17 - .../node_modules/hooker/test/hooker_test.js | 435 - .../grunt/node_modules/iconv-lite/.npmignore | 3 - .../grunt/node_modules/iconv-lite/.travis.yml | 5 - .../grunt/node_modules/iconv-lite/LICENSE | 21 - .../grunt/node_modules/iconv-lite/README.md | 72 - .../grunt/node_modules/iconv-lite/README.md~ | 54 - .../node_modules/iconv-lite/encodings/big5.js | 9 - .../node_modules/iconv-lite/encodings/gbk.js | 9 - .../iconv-lite/encodings/singlebyte.js | 340 - .../iconv-lite/encodings/table/big5.js | 1 - .../iconv-lite/encodings/table/gbk.js | 1 - .../generation/generate-big5-table.js | 25 - .../generation/generate-singlebyte.js | 142 - .../grunt/node_modules/iconv-lite/index.js | 231 - .../node_modules/iconv-lite/package.json | 80 - .../node_modules/iconv-lite/test/big5-test.js | 36 - .../node_modules/iconv-lite/test/big5File.txt | 13 - .../iconv-lite/test/cyrillic-test.js | 86 - .../node_modules/iconv-lite/test/gbk-test.js | 38 - .../node_modules/iconv-lite/test/gbkFile.txt | 14 - .../iconv-lite/test/greek-test.js | 79 - .../node_modules/iconv-lite/test/main-test.js | 55 - .../iconv-lite/test/performance.js | 67 - .../iconv-lite/test/turkish-test.js | 90 - .../grunt/node_modules/js-yaml/HISTORY.md | 155 - .../grunt/node_modules/js-yaml/LICENSE | 21 - .../grunt/node_modules/js-yaml/README.md | 249 - .../grunt/node_modules/js-yaml/bin/js-yaml.js | 125 - .../js-yaml/examples/custom_types.js | 104 - .../js-yaml/examples/custom_types.yaml | 18 - .../node_modules/js-yaml/examples/dumper.js | 31 - .../node_modules/js-yaml/examples/dumper.json | 22 - .../js-yaml/examples/sample_document.js | 15 - .../js-yaml/examples/sample_document.yaml | 197 - .../grunt/node_modules/js-yaml/index.js | 1 - .../grunt/node_modules/js-yaml/lib/js-yaml.js | 33 - .../js-yaml/lib/js-yaml/common.js | 60 - .../js-yaml/lib/js-yaml/dumper.js | 437 - .../js-yaml/lib/js-yaml/exception.js | 25 - .../js-yaml/lib/js-yaml/loader.js | 1549 - .../node_modules/js-yaml/lib/js-yaml/mark.js | 78 - .../js-yaml/lib/js-yaml/require.js | 23 - .../js-yaml/lib/js-yaml/schema.js | 103 - .../js-yaml/lib/js-yaml/schema/default.js | 16 - .../js-yaml/lib/js-yaml/schema/minimal.js | 13 - .../js-yaml/lib/js-yaml/schema/safe.js | 25 - .../node_modules/js-yaml/lib/js-yaml/type.js | 82 - .../js-yaml/lib/js-yaml/type/binary.js | 118 - .../js-yaml/lib/js-yaml/type/bool.js | 74 - .../js-yaml/lib/js-yaml/type/float.js | 102 - .../js-yaml/lib/js-yaml/type/int.js | 85 - .../js-yaml/lib/js-yaml/type/js/function.js | 56 - .../js-yaml/lib/js-yaml/type/js/regexp.js | 56 - .../js-yaml/lib/js-yaml/type/js/undefined.js | 28 - .../js-yaml/lib/js-yaml/type/map.js | 11 - .../js-yaml/lib/js-yaml/type/merge.js | 18 - .../js-yaml/lib/js-yaml/type/null.js | 36 - .../js-yaml/lib/js-yaml/type/omap.js | 53 - .../js-yaml/lib/js-yaml/type/pairs.js | 41 - .../js-yaml/lib/js-yaml/type/seq.js | 11 - .../js-yaml/lib/js-yaml/type/set.js | 31 - .../js-yaml/lib/js-yaml/type/str.js | 11 - .../js-yaml/lib/js-yaml/type/timestamp.js | 91 - .../js-yaml/node_modules/.bin/esparse | 1 - .../js-yaml/node_modules/.bin/esvalidate | 1 - .../js-yaml/node_modules/argparse/HISTORY.md | 109 - .../js-yaml/node_modules/argparse/LICENSE | 21 - .../js-yaml/node_modules/argparse/README.md | 239 - .../argparse/examples/arguments.js | 36 - .../node_modules/argparse/examples/choice.js | 22 - .../argparse/examples/constants.js | 59 - .../node_modules/argparse/examples/help.js | 13 - .../node_modules/argparse/examples/nargs.js | 33 - .../node_modules/argparse/examples/parents.js | 28 - .../argparse/examples/prefix_chars.js | 23 - .../argparse/examples/sub_commands.js | 49 - .../node_modules/argparse/examples/sum.js | 35 - .../argparse/examples/testformatters.js | 270 - .../js-yaml/node_modules/argparse/index.js | 1 - .../node_modules/argparse/lib/action.js | 146 - .../argparse/lib/action/append.js | 55 - .../argparse/lib/action/append/constant.js | 47 - .../node_modules/argparse/lib/action/count.js | 40 - .../node_modules/argparse/lib/action/help.js | 48 - .../node_modules/argparse/lib/action/store.js | 50 - .../argparse/lib/action/store/constant.js | 43 - .../argparse/lib/action/store/false.js | 27 - .../argparse/lib/action/store/true.js | 26 - .../argparse/lib/action/subparsers.js | 148 - .../argparse/lib/action/version.js | 50 - .../argparse/lib/action_container.js | 481 - .../node_modules/argparse/lib/argparse.js | 14 - .../argparse/lib/argument/error.js | 50 - .../argparse/lib/argument/exclusive.js | 54 - .../argparse/lib/argument/group.js | 75 - .../argparse/lib/argument_parser.js | 1165 - .../node_modules/argparse/lib/const.js | 18 - .../argparse/lib/help/added_formatters.js | 88 - .../argparse/lib/help/formatter.js | 803 - .../node_modules/argparse/lib/namespace.js | 77 - .../underscore.string/.travis.yml | 8 - .../node_modules/underscore.string/Gemfile | 4 - .../underscore.string/Gemfile.lock | 17 - .../underscore.string/README.markdown | 814 - .../node_modules/underscore.string/Rakefile | 23 - .../underscore.string/component.json | 11 - .../dist/underscore.string.min.js | 1 - .../lib/underscore.string.js | 673 - .../underscore.string/libpeerconnection.log | 0 .../underscore.string/package.json | 73 - .../underscore.string/test/run-qunit.js | 45 - .../underscore.string/test/speed.js | 148 - .../underscore.string/test/strings.js | 685 - .../test/strings_standalone.js | 12 - .../underscore.string/test/test.html | 31 - .../test/test_standalone.html | 18 - .../test/test_underscore/arrays.js | 200 - .../test/test_underscore/chaining.js | 59 - .../test/test_underscore/collections.js | 426 - .../test/test_underscore/functions.js | 259 - .../test/test_underscore/index.html | 45 - .../test/test_underscore/objects.js | 548 - .../test/test_underscore/speed.js | 75 - .../test/test_underscore/utility.js | 249 - .../test/test_underscore/vendor/jquery.js | 9404 ---- .../test/test_underscore/vendor/jslitmus.js | 670 - .../test/test_underscore/vendor/qunit.css | 235 - .../test/test_underscore/vendor/qunit.js | 1977 - .../underscore.string/test/underscore.js | 1201 - .../node_modules/underscore/.npmignore | 4 - .../node_modules/underscore/.travis.yml | 5 - .../argparse/node_modules/underscore/CNAME | 1 - .../node_modules/underscore/CONTRIBUTING.md | 9 - .../argparse/node_modules/underscore/LICENSE | 22 - .../node_modules/underscore/README.md | 19 - .../node_modules/underscore/favicon.ico | Bin 1406 -> 0 bytes .../node_modules/underscore/index.html | 2467 - .../argparse/node_modules/underscore/index.js | 1 - .../node_modules/underscore/package.json | 35 - .../node_modules/underscore/underscore-min.js | 1 - .../node_modules/underscore/underscore.js | 1226 - .../node_modules/argparse/package.json | 50 - .../js-yaml/node_modules/esprima/README.md | 73 - .../node_modules/esprima/bin/esparse.js | 117 - .../node_modules/esprima/bin/esvalidate.js | 177 - .../js-yaml/node_modules/esprima/esprima.js | 3908 -- .../js-yaml/node_modules/esprima/package.json | 59 - .../node_modules/esprima/test/compat.js | 239 - .../node_modules/esprima/test/reflect.js | 422 - .../js-yaml/node_modules/esprima/test/run.js | 66 - .../node_modules/esprima/test/runner.js | 387 - .../js-yaml/node_modules/esprima/test/test.js | 20238 -------- .../grunt/node_modules/js-yaml/package.json | 60 - .../grunt/node_modules/lodash/README.md | 140 - .../grunt/node_modules/lodash/lodash.js | 4258 -- .../grunt/node_modules/lodash/lodash.min.js | 35 - .../node_modules/lodash/lodash.underscore.js | 3688 -- .../lodash/lodash.underscore.min.js | 28 - .../grunt/node_modules/lodash/package.json | 62 - .../grunt/node_modules/minimatch/.npmignore | 1 - .../grunt/node_modules/minimatch/LICENSE | 23 - .../grunt/node_modules/minimatch/README.md | 218 - .../grunt/node_modules/minimatch/minimatch.js | 1055 - .../node_modules/lru-cache/.npmignore | 1 - .../node_modules/lru-cache/CONTRIBUTORS | 14 - .../minimatch/node_modules/lru-cache/LICENSE | 23 - .../node_modules/lru-cache/README.md | 97 - .../node_modules/lru-cache/lib/lru-cache.js | 252 - .../node_modules/lru-cache/package.json | 33 - .../node_modules/lru-cache/test/basic.js | 369 - .../node_modules/lru-cache/test/foreach.js | 52 - .../lru-cache/test/memory-leak.js | 50 - .../minimatch/node_modules/sigmund/LICENSE | 27 - .../minimatch/node_modules/sigmund/README.md | 53 - .../minimatch/node_modules/sigmund/bench.js | 283 - .../node_modules/sigmund/package.json | 42 - .../minimatch/node_modules/sigmund/sigmund.js | 39 - .../node_modules/sigmund/test/basic.js | 24 - .../grunt/node_modules/minimatch/package.json | 40 - .../node_modules/minimatch/test/basic.js | 399 - .../minimatch/test/brace-expand.js | 33 - .../node_modules/minimatch/test/caching.js | 14 - .../node_modules/minimatch/test/defaults.js | 274 - .../test/extglob-ending-with-state-char.js | 8 - .../grunt/node_modules/nopt/.npmignore | 0 node_modules/grunt/node_modules/nopt/LICENSE | 23 - .../grunt/node_modules/nopt/README.md | 276 - .../grunt/node_modules/nopt/bin/nopt.js | 44 - .../node_modules/nopt/examples/my-program.js | 46 - .../grunt/node_modules/nopt/lib/nopt.js | 554 - .../grunt/node_modules/nopt/lib/usage.js | 61 - .../nopt/node_modules/abbrev/CONTRIBUTING.md | 3 - .../nopt/node_modules/abbrev/LICENSE | 23 - .../nopt/node_modules/abbrev/README.md | 23 - .../nopt/node_modules/abbrev/abbrev.js | 62 - .../nopt/node_modules/abbrev/package.json | 33 - .../nopt/node_modules/abbrev/test.js | 47 - .../grunt/node_modules/nopt/package.json | 36 - .../grunt/node_modules/rimraf/AUTHORS | 6 - .../grunt/node_modules/rimraf/LICENSE | 23 - .../grunt/node_modules/rimraf/README.md | 30 - node_modules/grunt/node_modules/rimraf/bin.js | 33 - .../grunt/node_modules/rimraf/package.json | 56 - .../grunt/node_modules/rimraf/rimraf.js | 178 - .../grunt/node_modules/rimraf/test/run.sh | 10 - .../grunt/node_modules/rimraf/test/setup.sh | 47 - .../node_modules/rimraf/test/test-async.js | 5 - .../node_modules/rimraf/test/test-sync.js | 3 - .../underscore.string/.travis.yml | 8 - .../node_modules/underscore.string/Gemfile | 5 - .../underscore.string/Gemfile.lock | 34 - .../underscore.string/README.markdown | 668 - .../node_modules/underscore.string/Rakefile | 28 - .../dist/underscore.string.min.js | 1 - .../lib/underscore.string.js | 525 - .../underscore.string/package.json | 72 - .../underscore.string/test/run-qunit.js | 44 - .../underscore.string/test/speed.js | 138 - .../underscore.string/test/strings.js | 438 - .../test/strings_standalone.js | 12 - .../underscore.string/test/test.html | 31 - .../test/test_standalone.html | 18 - .../test/test_underscore/arrays.js | 166 - .../test/test_underscore/chaining.js | 59 - .../test/test_underscore/collections.js | 270 - .../test/test_underscore/functions.js | 198 - .../test/test_underscore/objects.js | 535 - .../test/test_underscore/speed.js | 70 - .../test/test_underscore/temp.js | 27 - .../test/test_underscore/temp_tests.html | 19 - .../test/test_underscore/test.html | 43 - .../test/test_underscore/utility.js | 155 - .../test/test_underscore/vendor/jquery.js | 19 - .../test/test_underscore/vendor/jslitmus.js | 670 - .../test/test_underscore/vendor/qunit.css | 196 - .../test/test_underscore/vendor/qunit.js | 2360 - .../underscore.string/test/underscore.js | 999 - node_modules/grunt/node_modules/which/LICENSE | 23 - .../grunt/node_modules/which/README.md | 5 - .../grunt/node_modules/which/bin/which | 14 - .../grunt/node_modules/which/package.json | 31 - .../grunt/node_modules/which/which.js | 104 - node_modules/grunt/package.json | 87 - package.json | 29 - php.ini | 4 - phpunit.xml | 18 - public/.htaccess | 11 - public/apple-touch-icon-precomposed.png | Bin 2207 -> 0 bytes public/apple-touch-icon.png | Bin 2207 -> 0 bytes ...e.min-6140190bf67c53b87b24ba70ca9fc9ee.css | 9 - ...p.min-6140190bf67c53b87b24ba70ca9fc9ee.css | 9 - ...ap.min-6140190bf67c53b87b24ba70ca9fc9ee.js | 9 - ....2.min-590935b89a583963aad9f1d779d81729.js | 6 - public/built.css | 2910 -- public/built.js | 33045 ------------- public/built.public.css | 708 - public/css/bootstrap-combobox.css | 70 - public/css/bootstrap.min.css | 7 - public/css/bootstrap.splash.css | 11 - public/css/customCss.css | 29 - public/css/lightbox.css | 210 - public/css/splash.css | 1378 - public/css/style.css | 802 - public/css/themes/amelia.min.css | 1 - public/css/themes/cerulean.min.css | 1 - public/css/themes/cosmo.min.css | 1 - public/css/themes/cyborg.min.css | 1 - public/css/themes/flatly.min.css | 1 - public/css/themes/journal.min.css | 1 - public/css/themes/readable.min.css | 1 - public/css/themes/simplex.min.css | 1 - public/css/themes/slate.min.css | 1 - public/css/themes/spacelab.min.css | 1 - public/css/themes/united.min.css | 1 - public/css/themes/yeti.min.css | 1 - public/css/typeahead.js-bootstrap.css | 84 - public/favicon.gif | Bin 298 -> 0 bytes public/favicon.ico | Bin 1406 -> 0 bytes public/fonts/.empty | 1 - public/fonts/FontAwesome.otf | Bin 62856 -> 0 bytes public/fonts/fontawesome-webfont.eot | Bin 38205 -> 0 bytes public/fonts/fontawesome-webfont.svg | 414 - public/fonts/fontawesome-webfont.ttf | Bin 80652 -> 0 bytes public/fonts/fontawesome-webfont.woff | Bin 44432 -> 0 bytes public/fonts/glyphicons-halflings-regular.eot | Bin 20335 -> 0 bytes public/fonts/glyphicons-halflings-regular.svg | 229 - public/fonts/glyphicons-halflings-regular.ttf | Bin 41280 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 23320 -> 0 bytes public/fonts/socicon-webfont.eot | Bin 18826 -> 0 bytes public/fonts/socicon-webfont.svg | 90 - public/fonts/socicon-webfont.ttf | Bin 27720 -> 0 bytes public/fonts/socicon-webfont.woff | Bin 20972 -> 0 bytes public/images/AcceptPaymentsOnline.png | Bin 1203 -> 0 bytes public/images/AdjustablePaymentTerms.png | Bin 1451 -> 0 bytes public/images/AlertsWhenInvoicesViewed.png | Bin 1392 -> 0 bytes public/images/BeautifulTemplates.png | Bin 1172 -> 0 bytes public/images/BestInClassSecurity.png | Bin 1405 -> 0 bytes public/images/CloneInvoices.png | Bin 1115 -> 0 bytes public/images/CloudBasedApp.png | Bin 1283 -> 0 bytes public/images/CustomizeInvoices.png | Bin 1276 -> 0 bytes public/images/EstimatesProForma.png | Bin 1551 -> 0 bytes public/images/FreeInvoicing.png | Bin 1340 -> 0 bytes public/images/GitHub.png | Bin 2625 -> 0 bytes public/images/ImportExportRecords.png | Bin 1271 -> 0 bytes public/images/InTuitiveEditingInterface.png | Bin 1323 -> 0 bytes .../images/IntegrateWithPaymentGateways.png | Bin 1268 -> 0 bytes public/images/InvoiceClientsViaEmail.png | Bin 1372 -> 0 bytes public/images/LivePDFCreation.png | Bin 1117 -> 0 bytes .../images/ManualAutomaticInvoiceNumbers.png | Bin 1180 -> 0 bytes public/images/MultilingualSupport.png | Bin 1158 -> 0 bytes public/images/MultipleCurrencySupport.png | Bin 1241 -> 0 bytes public/images/MultipleTaxSettings.png | Bin 1184 -> 0 bytes public/images/OpenSource.png | Bin 1242 -> 0 bytes public/images/PaymentTracking.png | Bin 1462 -> 0 bytes public/images/PersonalizeInvoiceColor.png | Bin 1427 -> 0 bytes public/images/PrintablePDFInvoices.png | Bin 1273 -> 0 bytes public/images/RecurringInvoiceProfiles.png | Bin 1232 -> 0 bytes public/images/SelfHostedAvailable.png | Bin 1195 -> 0 bytes public/images/Thumbs.db | Bin 444928 -> 0 bytes public/images/about1.jpg | Bin 30861 -> 0 bytes public/images/about1@2x.jpg | Bin 30861 -> 0 bytes public/images/about2.jpg | Bin 47959 -> 0 bytes public/images/about2@2x.jpg | Bin 47959 -> 0 bytes public/images/activeclients.png | Bin 3827 -> 0 bytes public/images/activeclients@2x.png | Bin 7112 -> 0 bytes .../apple-touch-icon-114x114-precomposed.png | Bin 3613 -> 0 bytes .../apple-touch-icon-144x144-precomposed.png | Bin 4369 -> 0 bytes .../apple-touch-icon-57x57-precomposed.png | Bin 2207 -> 0 bytes .../apple-touch-icon-72x72-precomposed.png | Bin 2588 -> 0 bytes public/images/apple-touch-icon.png | Bin 2207 -> 0 bytes public/images/benjacobson.jpg | Bin 27563 -> 0 bytes public/images/bg-blue.jpg | Bin 22543 -> 0 bytes public/images/clients.png | Bin 3788 -> 0 bytes public/images/clients@2x.png | Bin 6894 -> 0 bytes .../Test-AmericanExpress-Icon.png | Bin 32399 -> 0 bytes .../images/credit_cards/Test-Diners-Icon.png | Bin 9415 -> 0 bytes .../credit_cards/Test-Discover-Icon.png | Bin 7611 -> 0 bytes .../credit_cards/Test-MasterCard-Icon.png | Bin 50662 -> 0 bytes public/images/credit_cards/Test-Visa-Icon.png | Bin 33235 -> 0 bytes public/images/designs/business.png | Bin 43569 -> 0 bytes public/images/designs/business_thumb.png | Bin 7938 -> 0 bytes public/images/designs/creative.png | Bin 48193 -> 0 bytes public/images/designs/creative_thumb.png | Bin 9688 -> 0 bytes public/images/designs/elegant.png | Bin 37810 -> 0 bytes public/images/designs/elegant_thumb.png | Bin 7623 -> 0 bytes public/images/designs/hipster.png | Bin 41702 -> 0 bytes public/images/designs/hipster_thumb.png | Bin 8597 -> 0 bytes public/images/designs/photo.png | Bin 243068 -> 0 bytes public/images/designs/photo_thumb.png | Bin 22300 -> 0 bytes public/images/designs/playful.png | Bin 38996 -> 0 bytes public/images/designs/playful_thumb.png | Bin 10006 -> 0 bytes public/images/devices-2.png | Bin 90359 -> 0 bytes public/images/devices.png | Bin 90169 -> 0 bytes public/images/devices3.png | Bin 73775 -> 0 bytes public/images/facebook.jpg | Bin 14974 -> 0 bytes public/images/features1.jpg | Bin 248116 -> 0 bytes public/images/features2.jpg | Bin 9334 -> 0 bytes public/images/features3.jpg | Bin 28589 -> 0 bytes public/images/features4.jpg | Bin 84076 -> 0 bytes public/images/features5.jpg | Bin 33678 -> 0 bytes public/images/footer-logo.png | Bin 4838 -> 0 bytes public/images/gateways/Thumbs.db | Bin 8192 -> 0 bytes .../images/gateways/logo_AuthorizeNet_AIM.png | Bin 6799 -> 0 bytes public/images/gateways/logo_BeanStream.png | Bin 3228 -> 0 bytes .../gateways/logo_FirstData_Connect.png | Bin 2501 -> 0 bytes public/images/gateways/logo_PayPal_Pro.png | Bin 4375 -> 0 bytes public/images/gateways/logo_TwoCheckout.png | Bin 2550 -> 0 bytes public/images/gateways/logo_iTransact.png | Bin 5902 -> 0 bytes public/images/hero-bg-1.jpg | Bin 189586 -> 0 bytes public/images/hero-bg-2.jpg | Bin 142317 -> 0 bytes public/images/hero-bg-3.jpg | Bin 40898 -> 0 bytes public/images/hero-bg-4.jpg | Bin 86024 -> 0 bytes public/images/hero-bg-contact.jpg | Bin 55707 -> 0 bytes public/images/hero-bg-faq.jpg | Bin 24206 -> 0 bytes public/images/hero-bg-plans.jpg | Bin 26159 -> 0 bytes public/images/hero-bg-secure-pay.jpg | Bin 18459 -> 0 bytes public/images/hero-bg-testi.jpg | Bin 24501 -> 0 bytes public/images/hero-faq@2x.png | Bin 2753 -> 0 bytes public/images/hex-facebook.png | Bin 1600 -> 0 bytes public/images/hex-github.png | Bin 1804 -> 0 bytes public/images/hex-gplus.png | Bin 1848 -> 0 bytes public/images/hex-linkedin.png | Bin 1701 -> 0 bytes public/images/hex-pinterest.png | Bin 1892 -> 0 bytes public/images/hex-rss.png | Bin 1870 -> 0 bytes public/images/hex-twitter.png | Bin 1743 -> 0 bytes public/images/hillelcoren.jpg | Bin 16418 -> 0 bytes public/images/icon-about.png | Bin 1787 -> 0 bytes public/images/icon-about@2x.png | Bin 2554 -> 0 bytes public/images/icon-contact.png | Bin 1854 -> 0 bytes public/images/icon-contact@2x.png | Bin 2845 -> 0 bytes public/images/icon-faq.png | Bin 1807 -> 0 bytes public/images/icon-features.png | Bin 1882 -> 0 bytes public/images/icon-features@2x.png | Bin 2974 -> 0 bytes public/images/icon-free.png | Bin 1412 -> 0 bytes public/images/icon-free2.png | Bin 1542 -> 0 bytes public/images/icon-free@2x.png | Bin 2699 -> 0 bytes public/images/icon-login.png | Bin 1561 -> 0 bytes public/images/icon-login@2x.png | Bin 2313 -> 0 bytes public/images/icon-opensource.png | Bin 1411 -> 0 bytes public/images/icon-opensource@2x.png | Bin 1848 -> 0 bytes public/images/icon-payment.png | Bin 1465 -> 0 bytes public/images/icon-payment@2x.png | Bin 1970 -> 0 bytes public/images/icon-pdf.png | Bin 1564 -> 0 bytes public/images/icon-pdf@2x.png | Bin 3084 -> 0 bytes public/images/icon-plans.png | Bin 1199 -> 0 bytes public/images/icon-plans@2x.png | Bin 1297 -> 0 bytes public/images/icon-secure-footer.png | Bin 1240 -> 0 bytes public/images/icon-secure-footer@2x.png | Bin 1559 -> 0 bytes public/images/icon-secure-pay.png | Bin 1163 -> 0 bytes public/images/icon-secure-pay@2x.png | Bin 1288 -> 0 bytes public/images/icon-secure.png | Bin 1194 -> 0 bytes public/images/icon-secure@2x.png | Bin 1420 -> 0 bytes public/images/icon-shield.png | Bin 2017 -> 0 bytes public/images/icon-testi.png | Bin 1999 -> 0 bytes public/images/icon-testi@2x.png | Bin 3175 -> 0 bytes public/images/instagram.svg | 24 - public/images/invoiceninja-logo.png | Bin 3952 -> 0 bytes public/images/invoiceninja-logo@2x.png | Bin 3952 -> 0 bytes public/images/laptopwicon.jpg | Bin 30152 -> 0 bytes public/images/lightbox/close.png | Bin 280 -> 0 bytes public/images/lightbox/loading.gif | Bin 8476 -> 0 bytes public/images/lightbox/next.png | Bin 1350 -> 0 bytes public/images/lightbox/prev.png | Bin 1360 -> 0 bytes public/images/linkedin.svg | 14 - public/images/me.svg | 26 - public/images/opensource-footer.png | Bin 6990 -> 0 bytes public/images/pro-plan-chart.png | Bin 164763 -> 0 bytes public/images/providers.png | Bin 8990 -> 0 bytes public/images/razikantorp.jpg | Bin 47455 -> 0 bytes public/images/report_logo1.jpg | Bin 5234 -> 0 bytes public/images/report_logo2.jpg | Bin 13504 -> 0 bytes public/images/report_logo3.jpg | Bin 31804 -> 0 bytes public/images/shalomstark.jpg | Bin 62164 -> 0 bytes public/images/social.jpg | Bin 14974 -> 0 bytes public/images/social/facebook.png | Bin 229 -> 0 bytes public/images/social/facebook.svg | 6 - public/images/social/github.png | Bin 457 -> 0 bytes public/images/social/twitter.png | Bin 307 -> 0 bytes public/images/social/twitter.svg | 6 - public/images/sort_asc.png | Bin 1028 -> 0 bytes public/images/sort_asc_disabled.png | Bin 1050 -> 0 bytes public/images/sort_both.png | Bin 1136 -> 0 bytes public/images/sort_desc.png | Bin 1037 -> 0 bytes public/images/sort_desc_disabled.png | Bin 1045 -> 0 bytes public/images/ssl-footer.png | Bin 7519 -> 0 bytes public/images/totalincome.png | Bin 3395 -> 0 bytes public/images/totalincome@2x.png | Bin 6026 -> 0 bytes public/images/totalinvoices.png | Bin 3294 -> 0 bytes public/images/totalinvoices@2x.png | Bin 5651 -> 0 bytes public/images/twitter.svg | 13 - public/images/website.svg | 11 - public/index.php | 49 - public/js/Chart.js | 1426 - public/js/bootstrap-combobox.js | 419 - public/js/bootstrap.js | 219 - public/js/bootstrap.min.js | 7 - public/js/built.public.js | 7 - public/js/compatibility.js | 483 - public/js/d3.min.js | 5 - public/js/jspdf.min.js | 140 - public/js/jspdf.plugin.split_text_to_size.js | 297 - public/js/jspdf.source.js | 6663 --- public/js/lightbox.min.js | 9 - public/js/pdf.js | 49 - public/js/pdf_viewer.js | 7420 --- public/js/pdf_viewer.worker.js | 39769 ---------------- public/js/retina-1.1.0.min.js | 10 - public/js/script.js | 1522 - public/js/simpleexpand.js | 4 - public/js/stacktrace.js | 485 - public/js/typedarray.js | 1030 - public/js/valign.js | 12 - public/logo/.gitkeep | 0 .../logo/zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h.jpg | Bin 1822 -> 0 bytes public/robots.txt | 2 - scheduler.yml | 8 - server.php | 19 - tests/_bootstrap.php | 2 - tests/_data/dump.sql | 1012 - tests/_helpers/CodeHelper.php | 8 - tests/_helpers/TestHelper.php | 8 - tests/_helpers/WebHelper.php | 8 - tests/_log/.gitkeep | 0 tests/acceptance.suite.yml | 23 - tests/acceptance/WebGuy.php | 2610 - tests/acceptance/WelcomeCept.php | 15 - tests/acceptance/_bootstrap.php | 2 - .../complete/CheckCreateNewClientFormCept.php | 131 - tests/functional.suite.yml | 11 - tests/functional/TestGuy.php | 460 - tests/functional/_bootstrap.php | 2 - tests/unit.suite.yml | 8 - tests/unit/CodeGuy.php | 47 - tests/unit/_bootstrap.php | 2 - vendor/php-payments/README.md | 80 - .../config/drivers/amazon_simplepay.php | 14 - .../config/drivers/authorize_net.php | 8 - .../config/drivers/beanstream.php | 26 - .../php-payments/config/drivers/bluepay.php | 15 - .../php-payments/config/drivers/braintree.php | 7 - vendor/php-payments/config/drivers/eway.php | 4 - .../config/drivers/gocardless.php | 10 - .../config/drivers/google_checkout.php | 10 - .../config/drivers/paypal_paymentspro.php | 7 - .../php-payments/config/drivers/psigate.php | 15 - .../config/drivers/quickbooksms.php | 9 - vendor/php-payments/config/drivers/stripe.php | 5 - vendor/php-payments/config/payments.php | 102 - vendor/php-payments/documentation/README.md | 4 - .../documentation/dox/content/add_drivers.php | 20 - .../dox/content/contributors.php | 28 - .../documentation/dox/content/donate.php | 7 - .../documentation/dox/content/drivers.php | 87 - .../documentation/dox/content/frameworks.php | 14 - .../documentation/dox/content/index.php | 31 - .../documentation/dox/content/methods.php | 61 - .../documentation/dox/content/usage.php | 37 - .../php-payments/documentation/dox/doxgen.php | 15 - .../documentation/dox/template.php | 14 - .../documentation/dox/template/footer.php | 2 - .../documentation/dox/template/head.php | 6 - .../documentation/dox/template/header.php | 32 - .../documentation/dox/template/sidebar.php | 7 - .../documentation/html/assets/style.css | 1 - .../english/response_details_lang.php | 39 - .../english/response_messages_lang.php | 81 - vendor/php-payments/lib/payment_driver.php | 64 - .../amazon_simplepay_driver.php | 148 - .../payment_drivers/authorize_net_driver.php | 620 - .../lib/payment_drivers/beanstream_driver.php | 563 - .../lib/payment_drivers/bluepay_driver.php | 306 - .../lib/payment_drivers/braintree_driver.php | 310 - .../lib/payment_drivers/eway_driver.php | 197 - .../lib/payment_drivers/gocardless_driver.php | 182 - .../google_checkout_driver.php | 154 - .../paypal_paymentspro_driver.php | 571 - .../lib/payment_drivers/psigate_driver.php | 346 - .../payment_drivers/quickbooksms_driver.php | 404 - .../lib/payment_drivers/stripe_driver.php | 307 - vendor/php-payments/lib/payment_method.php | 8 - .../activate_recurring_profile_method.php | 26 - .../authorize_payment_button_method.php | 26 - .../authorize_payment_method.php | 62 - .../cancel_recurring_profile_method.php | 26 - .../capture_payment_method.php | 32 - .../change_transaction_status_method.php | 26 - .../customer_charge_method.php | 27 - .../customer_create_method.php | 26 - .../get_recurring_profile_method.php | 25 - .../get_transaction_details_method.php | 25 - .../oneoff_payment_button_method.php | 45 - .../payment_methods/oneoff_payment_method.php | 63 - .../recurring_bill_outstanding_method.php | 27 - .../recurring_payment_button_method.php | 34 - .../recurring_payment_method.php | 72 - .../reference_payment_method.php | 26 - .../payment_methods/refund_payment_method.php | 31 - .../search_transactions_method.php | 41 - .../suspend_recurring_profile_method.php | 26 - .../payment_methods/token_create_method.php | 44 - .../update_recurring_profile_method.php | 63 - .../payment_methods/void_payment_method.php | 26 - .../payment_methods/void_refund_method.php | 39 - vendor/php-payments/lib/payment_request.php | 193 - vendor/php-payments/lib/payment_response.php | 111 - vendor/php-payments/lib/payment_utility.php | 253 - vendor/php-payments/lib/payment_validator.php | 117 - vendor/php-payments/lib/payments.php | 72 - .../tests/classes/test_errors.php | 19 - vendor/php-payments/tests/test.php | 75 - vendor/php-payments/tests/tests/drivers.php | 51 - .../tests/drivers/.drivers.test_vals.php | 46 - .../tests/tests/drivers/driver.php | 157 - .../Examples-ASP.html | 119 - .../ButtonGenerationWithSignature/README.html | 174 - .../src/ButtonGenerator.php | 143 - .../src/SignatureUtils.php | 112 - .../src/StandardButtonSample.php | 43 - .../amazon_simplepay/FPSApis/README.html | 168 - .../FPSApis/src/Amazon/FPS/Client.php | 1638 - .../FPSApis/src/Amazon/FPS/Exception.php | 140 - .../FPSApis/src/Amazon/FPS/Interface.php | 438 - .../FPSApis/src/Amazon/FPS/Mock.php | 166 - .../src/Amazon/FPS/Mock/CancelResponse.xml | 13 - .../src/Amazon/FPS/Mock/ErrorResponse.xml | 15 - .../FPS/Mock/GetTransactionStatusResponse.xml | 16 - .../src/Amazon/FPS/Mock/RefundResponse.xml | 11 - .../src/Amazon/FPS/Mock/SettleResponse.xml | 11 - .../FPS/Mock/VerifySignatureResponse.xml | 11 - .../FPSApis/src/Amazon/FPS/Model.php | 299 - .../src/Amazon/FPS/Model/AccountBalance.php | 260 - .../FPSApis/src/Amazon/FPS/Model/Amount.php | 160 - .../Amazon/FPS/Model/AvailableBalances.php | 162 - .../src/Amazon/FPS/Model/CancelRequest.php | 160 - .../src/Amazon/FPS/Model/CancelResponse.php | 198 - .../src/Amazon/FPS/Model/CancelResult.php | 160 - .../src/Amazon/FPS/Model/DebtBalance.php | 162 - .../src/Amazon/FPS/Model/DescriptorPolicy.php | 160 - .../FPSApis/src/Amazon/FPS/Model/Error.php | 257 - .../FPS/Model/GetTransactionStatusRequest.php | 112 - .../Model/GetTransactionStatusResponse.php | 198 - .../FPS/Model/GetTransactionStatusResult.php | 304 - .../FPS/Model/OutstandingDebtBalance.php | 162 - .../FPS/Model/OutstandingPrepaidLiability.php | 162 - .../src/Amazon/FPS/Model/PrepaidBalance.php | 162 - .../src/Amazon/FPS/Model/RefundRequest.php | 305 - .../src/Amazon/FPS/Model/RefundResponse.php | 198 - .../src/Amazon/FPS/Model/RefundResult.php | 160 - .../Amazon/FPS/Model/RelatedTransaction.php | 160 - .../src/Amazon/FPS/Model/ResponseMetadata.php | 112 - .../src/Amazon/FPS/Model/SettleRequest.php | 161 - .../src/Amazon/FPS/Model/SettleResponse.php | 198 - .../src/Amazon/FPS/Model/SettleResult.php | 160 - .../src/Amazon/FPS/Model/StatusHistory.php | 257 - .../FPSApis/src/Amazon/FPS/Model/Token.php | 448 - .../src/Amazon/FPS/Model/TokenUsageLimit.php | 306 - .../src/Amazon/FPS/Model/Transaction.php | 988 - .../Amazon/FPS/Model/TransactionDetail.php | 1333 - .../src/Amazon/FPS/Model/TransactionPart.php | 353 - .../FPS/Model/VerifySignatureRequest.php | 160 - .../FPS/Model/VerifySignatureResponse.php | 198 - .../FPS/Model/VerifySignatureResult.php | 112 - .../src/Amazon/FPS/Samples/.config.inc.php | 48 - .../src/Amazon/FPS/Samples/CancelSample.php | 110 - .../Samples/GetTransactionStatusSample.php | 125 - .../src/Amazon/FPS/Samples/RefundSample.php | 110 - .../src/Amazon/FPS/Samples/SettleSample.php | 110 - .../FPS/Samples/VerifySignatureSample.php | 105 - .../Examples-IPN.html | 132 - .../Examples-ReturnUrl.html | 131 - .../IPNAndReturnURLValidation/README.html | 207 - .../src/.config.inc.php | 37 - .../src/IPNVerificationSampleCode.php | 49 - .../src/ReturnUrlVerificationSampleCode.php | 47 - .../src/SignatureUtilsForOutbound.php | 163 - .../src/ca-bundle.crt | 7989 ---- .../vendor/amazon_simplepay/LICENSE.txt | 51 - .../vendor/amazon_simplepay/NOTICE.txt | 5 - .../vendor/google_checkout/CHANGELOG | 62 - .../vendor/google_checkout/README | 165 - .../php-payments/vendor/google_checkout/TODO | 7 - .../vendor/google_checkout/UPGRADE | 17 - .../demo/basicapiresponsehandlerdemo.php | 168 - .../vendor/google_checkout/demo/cartdemo.php | 402 - .../google_checkout/demo/digitalCart.php | 82 - .../google_checkout/demo/lineItemShipping.php | 58 - .../merchantsubscriptionrecurrencedemo.php | 43 - .../google_checkout/demo/pollingdemo.php | 48 - .../demo/responsehandlerdemo.php | 267 - .../google_checkout/demo/sampcodetest.php | 104 - .../demo/subscriptiondemo (Autosaved).txt | 71 - .../google_checkout/demo/subscriptiondemo.php | 71 - .../vendor/google_checkout/googleerror.log | 2 - .../vendor/google_checkout/googlemessage.log | 85 - .../google_checkout/library/googlecart.php | 1684 - .../google_checkout/library/googleitem.php | 245 - .../google_checkout/library/googlelog.php | 96 - .../library/googlemerchantcalculations.php | 115 - .../library/googlenotification.php | 178 - .../library/googlenotificationhistory.php | 95 - .../google_checkout/library/googlepoll.php | 220 - .../google_checkout/library/googlerequest.php | 837 - .../library/googleresponse.php | 225 - .../google_checkout/library/googleresult.php | 105 - .../library/googleshipping.php | 532 - .../library/googlesubscription.php | 91 - .../google_checkout/library/googletax.php | 146 - .../library/htmlSignatureGen.php | 92 - .../library/xml-processing/gc_xmlbuilder.php | 95 - .../library/xml-processing/gc_xmlparser.php | 205 - .../google_checkout/unitTest/classes/README | 24 - .../unitTest/classes/phpunit.php | 632 - .../vendor/google_checkout/unitTest/error.log | 0 .../google_checkout/unitTest/message.log | 0 .../google_checkout/unitTest/stylesheet.css | 64 - .../unitTest/testGoogleCart.php | 64 - .../unitTest/testGoogleLog.php | 53 - .../unitTest/testGoogleXMLParser.php | 379 - 1208 files changed, 328852 deletions(-) delete mode 100644 .bowerrc delete mode 100644 .gitattributes delete mode 100644 .gitignore delete mode 100644 Gruntfile.js delete mode 100644 LICENSE delete mode 100644 README.md delete mode 100644 _ide_helper.php delete mode 100644 _ide_helper_models.php delete mode 100755 app/commands/.gitkeep delete mode 100644 app/commands/CheckData.php delete mode 100644 app/commands/CreateRandomData.php delete mode 100644 app/commands/ImportTimesheetData.php delete mode 100644 app/commands/ResetData.php delete mode 100755 app/commands/SendRecurringInvoices.php delete mode 100755 app/config/app.php delete mode 100755 app/config/auth.php delete mode 100755 app/config/cache.php delete mode 100755 app/config/compile.php delete mode 100755 app/config/database.php delete mode 100755 app/config/gae-development/database.php delete mode 100755 app/config/gae-production/app.php delete mode 100755 app/config/gae-production/cache.php delete mode 100755 app/config/gae-production/database.php delete mode 100755 app/config/gae-production/session.php delete mode 100755 app/config/mail.php delete mode 100755 app/config/packages/.gitkeep delete mode 100755 app/config/packages/anahkiasen/former/Nude.php delete mode 100755 app/config/packages/anahkiasen/former/TwitterBootstrap.php delete mode 100755 app/config/packages/anahkiasen/former/TwitterBootstrap3.php delete mode 100755 app/config/packages/anahkiasen/former/ZurbFoundation.php delete mode 100755 app/config/packages/anahkiasen/former/ZurbFoundation4.php delete mode 100755 app/config/packages/anahkiasen/former/config.php delete mode 100755 app/config/packages/ignited/laravel-omnipay/config.php delete mode 100755 app/config/packages/zizaco/confide/.gitkeep delete mode 100755 app/config/packages/zizaco/confide/config.php delete mode 100755 app/config/queue.php delete mode 100755 app/config/remote.php delete mode 100755 app/config/session.php delete mode 100755 app/config/testing/cache.php delete mode 100755 app/config/testing/session.php delete mode 100755 app/config/view.php delete mode 100755 app/config/workbench.php delete mode 100755 app/controllers/.gitkeep delete mode 100755 app/controllers/AccountController.php delete mode 100755 app/controllers/AccountGatewayController.php delete mode 100755 app/controllers/ActivityController.php delete mode 100644 app/controllers/AppController.php delete mode 100755 app/controllers/BaseController.php delete mode 100644 app/controllers/ClientApiController.php delete mode 100755 app/controllers/ClientController.php delete mode 100755 app/controllers/CreditController.php delete mode 100644 app/controllers/DashboardController.php delete mode 100755 app/controllers/HomeController.php delete mode 100644 app/controllers/IntegrationController.php delete mode 100644 app/controllers/InvoiceApiController.php delete mode 100755 app/controllers/InvoiceController.php delete mode 100644 app/controllers/PaymentApiController.php delete mode 100755 app/controllers/PaymentController.php delete mode 100644 app/controllers/ProductController.php delete mode 100644 app/controllers/QuoteApiController.php delete mode 100644 app/controllers/QuoteController.php delete mode 100755 app/controllers/ReportController.php delete mode 100644 app/controllers/TimesheetController.php delete mode 100755 app/controllers/TokenController.php delete mode 100755 app/controllers/UserController.php delete mode 100755 app/database/migrations/.gitkeep delete mode 100755 app/database/migrations/2013_11_05_180133_confide_setup_users_table.php delete mode 100755 app/database/migrations/2013_11_28_195703_setup_countries_table.php delete mode 100644 app/database/migrations/2014_02_13_151500_add_cascase_drops.php delete mode 100644 app/database/migrations/2014_02_19_151817_add_support_for_invoice_designs.php delete mode 100644 app/database/migrations/2014_03_03_155556_add_phone_to_account.php delete mode 100644 app/database/migrations/2014_03_19_201454_add_language_support.php delete mode 100644 app/database/migrations/2014_03_20_200300_create_payment_libraries.php delete mode 100644 app/database/migrations/2014_03_23_051736_enable_forcing_jspdf.php delete mode 100644 app/database/migrations/2014_03_25_102200_add_sort_and_recommended_to_gateways.php delete mode 100644 app/database/migrations/2014_04_03_191105_add_pro_plan.php delete mode 100644 app/database/migrations/2014_04_17_100523_add_remember_token.php delete mode 100644 app/database/migrations/2014_04_17_145108_add_custom_fields.php delete mode 100644 app/database/migrations/2014_04_23_170909_add_products_settings.php delete mode 100644 app/database/migrations/2014_04_29_174315_add_advanced_settings.php delete mode 100644 app/database/migrations/2014_05_17_175626_add_quotes.php delete mode 100644 app/database/migrations/2014_06_17_131940_add_accepted_credit_cards_to_account_gateways.php delete mode 100644 app/database/migrations/2014_07_13_142654_one_click_install.php delete mode 100644 app/database/migrations/2014_07_17_205900_support_hiding_quantity.php delete mode 100644 app/database/migrations/2014_07_24_171214_add_zapier_support.php delete mode 100644 app/database/migrations/2014_10_01_141248_add_company_vat_number.php delete mode 100644 app/database/migrations/2014_10_05_141856_track_last_seen_message.php delete mode 100644 app/database/migrations/2014_10_06_103529_add_timesheets.php delete mode 100644 app/database/migrations/2014_10_06_195330_add_invoice_design_table.php delete mode 100644 app/database/migrations/2014_10_13_054100_add_invoice_number_settings.php delete mode 100644 app/database/migrations/2014_10_14_225227_add_danish_translation.php delete mode 100644 app/database/migrations/2014_10_22_174452_add_affiliate_price.php delete mode 100644 app/database/migrations/2014_10_30_184126_add_company_id_number.php delete mode 100644 app/database/migrations/2014_11_04_200406_allow_null_client_currency.php delete mode 100644 app/database/migrations/2014_12_03_154119_add_discount_type.php delete mode 100644 app/database/migrations/2015_02_12_102940_add_email_templates.php delete mode 100644 app/database/migrations/2015_02_17_131714_support_token_billing.php delete mode 100644 app/database/migrations/2015_02_27_081836_add_invoice_footer.php delete mode 100644 app/database/migrations/2015_03_03_140259_add_tokens.php delete mode 100644 app/database/migrations/2015_03_09_151011_add_ip_to_activity.php delete mode 100755 app/database/production.sqlite delete mode 100755 app/database/seeds/.gitkeep delete mode 100755 app/database/seeds/ConstantsSeeder.php delete mode 100755 app/database/seeds/CountriesSeeder.php delete mode 100755 app/database/seeds/DatabaseSeeder.php delete mode 100644 app/database/seeds/PaymentLibrariesSeeder.php delete mode 100644 app/database/seeds/SecurePaymentFormSeeder.php delete mode 100755 app/database/seeds/UserTableSeeder.php delete mode 100755 app/filters.php delete mode 100755 app/handlers/InvoiceEventHandler.php delete mode 100755 app/handlers/UserEventHandler.php delete mode 100755 app/includes/parsecsv.lib.php delete mode 100644 app/lang/da/pagination.php delete mode 100644 app/lang/da/public.php delete mode 100644 app/lang/da/reminders.php delete mode 100644 app/lang/da/texts.php delete mode 100644 app/lang/da/validation.php delete mode 100644 app/lang/de/pagination.php delete mode 100644 app/lang/de/public.php delete mode 100644 app/lang/de/reminders.php delete mode 100644 app/lang/de/texts.php delete mode 100644 app/lang/de/validation.php delete mode 100755 app/lang/en/pagination.php delete mode 100644 app/lang/en/public.php delete mode 100755 app/lang/en/reminders.php delete mode 100644 app/lang/en/texts.php delete mode 100755 app/lang/en/validation.php delete mode 100755 app/lang/es/pagination.php delete mode 100644 app/lang/es/public.php delete mode 100755 app/lang/es/reminders.php delete mode 100644 app/lang/es/texts.php delete mode 100755 app/lang/es/validation.php delete mode 100644 app/lang/fr/pagination.php delete mode 100644 app/lang/fr/public.php delete mode 100644 app/lang/fr/reminders.php delete mode 100644 app/lang/fr/texts.php delete mode 100644 app/lang/fr/validation.php delete mode 100644 app/lang/it/pagination.php delete mode 100644 app/lang/it/public.php delete mode 100644 app/lang/it/reminders.php delete mode 100644 app/lang/it/texts.php delete mode 100644 app/lang/it/validation.php delete mode 100755 app/lang/lt/pagination.php delete mode 100644 app/lang/lt/public.php delete mode 100755 app/lang/lt/reminders.php delete mode 100644 app/lang/lt/texts.php delete mode 100755 app/lang/lt/validation.php delete mode 100644 app/lang/nb_NO/pagination.php delete mode 100644 app/lang/nb_NO/public.php delete mode 100644 app/lang/nb_NO/reminders.php delete mode 100644 app/lang/nb_NO/texts.php delete mode 100644 app/lang/nb_NO/validation.php delete mode 100644 app/lang/nl/pagination.php delete mode 100644 app/lang/nl/public.php delete mode 100644 app/lang/nl/reminders.php delete mode 100644 app/lang/nl/texts.php delete mode 100644 app/lang/nl/validation.php delete mode 100644 app/lang/pt_BR/pagination.php delete mode 100644 app/lang/pt_BR/public.php delete mode 100644 app/lang/pt_BR/reminders.php delete mode 100644 app/lang/pt_BR/texts.php delete mode 100644 app/lang/pt_BR/validation.php delete mode 100755 app/libraries/Utils.php delete mode 100755 app/libraries/entity.php delete mode 100644 app/libraries/timesheet_utils.php delete mode 100755 app/models/Account.php delete mode 100755 app/models/AccountGateway.php delete mode 100644 app/models/AccountGatewayToken.php delete mode 100755 app/models/AccountToken.php delete mode 100755 app/models/Activity.php delete mode 100644 app/models/Affiliate.php delete mode 100755 app/models/Client.php delete mode 100755 app/models/Contact.php delete mode 100755 app/models/Country.php delete mode 100755 app/models/Credit.php delete mode 100755 app/models/Currency.php delete mode 100755 app/models/DateFormat.php delete mode 100755 app/models/DatetimeFormat.php delete mode 100755 app/models/EntityModel.php delete mode 100755 app/models/Frequency.php delete mode 100755 app/models/Gateway.php delete mode 100755 app/models/Industry.php delete mode 100755 app/models/Invitation.php delete mode 100755 app/models/Invoice.php delete mode 100644 app/models/InvoiceDesign.php delete mode 100755 app/models/InvoiceItem.php delete mode 100755 app/models/InvoiceStatus.php delete mode 100755 app/models/Language.php delete mode 100644 app/models/License.php delete mode 100755 app/models/Payment.php delete mode 100644 app/models/PaymentLibrary.php delete mode 100755 app/models/PaymentTerm.php delete mode 100755 app/models/PaymentType.php delete mode 100755 app/models/Product.php delete mode 100644 app/models/Project.php delete mode 100644 app/models/ProjectCode.php delete mode 100755 app/models/Size.php delete mode 100644 app/models/Subscription.php delete mode 100755 app/models/TaxRate.php delete mode 100755 app/models/Theme.php delete mode 100755 app/models/Timesheet.php delete mode 100644 app/models/TimesheetEvent.php delete mode 100644 app/models/TimesheetEventSource.php delete mode 100755 app/models/Timezone.php delete mode 100755 app/models/User.php delete mode 100755 app/ninja/mailers/ContactMailer.php delete mode 100755 app/ninja/mailers/Mailer.php delete mode 100755 app/ninja/mailers/UserMailer.php delete mode 100755 app/ninja/repositories/AccountRepository.php delete mode 100755 app/ninja/repositories/ClientRepository.php delete mode 100755 app/ninja/repositories/CreditRepository.php delete mode 100755 app/ninja/repositories/InvoiceRepository.php delete mode 100755 app/ninja/repositories/PaymentRepository.php delete mode 100755 app/ninja/repositories/TaxRateRepository.php delete mode 100755 app/routes.php delete mode 100755 app/start/artisan.php delete mode 100755 app/start/global.php delete mode 100755 app/start/local.php delete mode 100755 app/storage/.gitkeep delete mode 100755 app/storage/cache/.gitkeep delete mode 100755 app/storage/logs/.gitkeep delete mode 100755 app/storage/meta/.gitkeep delete mode 100755 app/storage/sessions/.gitkeep delete mode 100755 app/storage/views/.gitkeep delete mode 100755 app/tests/ExampleTest.php delete mode 100755 app/tests/TestCase.php delete mode 100644 app/tests/TimesheetUtilsTest.php delete mode 100644 app/tests/data/Demo/demo.response.json delete mode 100644 app/views/accounts/account_gateway.blade.php delete mode 100755 app/views/accounts/details.blade.php delete mode 100644 app/views/accounts/email_templates.blade.php delete mode 100755 app/views/accounts/export.blade.php delete mode 100755 app/views/accounts/import_export.blade.php delete mode 100755 app/views/accounts/import_map.blade.php delete mode 100644 app/views/accounts/invoice_design.blade.php delete mode 100644 app/views/accounts/invoice_settings.blade.php delete mode 100755 app/views/accounts/nav.blade.php delete mode 100644 app/views/accounts/nav_advanced.blade.php delete mode 100755 app/views/accounts/notifications.blade.php delete mode 100755 app/views/accounts/payments.blade.php delete mode 100644 app/views/accounts/product.blade.php delete mode 100644 app/views/accounts/products.blade.php delete mode 100644 app/views/accounts/token.blade.php delete mode 100644 app/views/accounts/token_management.blade.php delete mode 100644 app/views/accounts/user_management.blade.php delete mode 100755 app/views/client.blade.php delete mode 100755 app/views/clients/edit.blade.php delete mode 100755 app/views/clients/show.blade.php delete mode 100755 app/views/coming_soon.blade.php delete mode 100755 app/views/credits/edit.blade.php delete mode 100644 app/views/dashboard.blade.php delete mode 100755 app/views/datatable.blade.php delete mode 100755 app/views/emails/auth/reminder.blade.php delete mode 100755 app/views/emails/confirm_html.blade.php delete mode 100644 app/views/emails/confirm_text.blade.php delete mode 100644 app/views/emails/contact_html.blade.php delete mode 100644 app/views/emails/contact_text.blade.php delete mode 100755 app/views/emails/error.blade.php delete mode 100755 app/views/emails/invoice_html.blade.php delete mode 100755 app/views/emails/invoice_paid_html.blade.php delete mode 100755 app/views/emails/invoice_paid_text.blade.php delete mode 100755 app/views/emails/invoice_sent_html.blade.php delete mode 100755 app/views/emails/invoice_sent_text.blade.php delete mode 100755 app/views/emails/invoice_text.blade.php delete mode 100755 app/views/emails/invoice_viewed_html.blade.php delete mode 100755 app/views/emails/invoice_viewed_text.blade.php delete mode 100644 app/views/emails/license_confirmation_html.blade.php delete mode 100644 app/views/emails/license_confirmation_text.blade.php delete mode 100644 app/views/emails/passwordreset_html.blade.php delete mode 100644 app/views/emails/payment_confirmation_html.blade.php delete mode 100644 app/views/emails/payment_confirmation_text.blade.php delete mode 100644 app/views/emails/view_action.blade.php delete mode 100755 app/views/error.blade.php delete mode 100755 app/views/header.blade.php delete mode 100755 app/views/invoices/deleted.blade.php delete mode 100755 app/views/invoices/edit.blade.php delete mode 100644 app/views/invoices/history.blade.php delete mode 100644 app/views/invoices/pdf.blade.php delete mode 100755 app/views/invoices/view.blade.php delete mode 100755 app/views/list.blade.php delete mode 100755 app/views/master.blade.php delete mode 100755 app/views/payments/edit.blade.php delete mode 100755 app/views/payments/payment.blade.php delete mode 100644 app/views/plans.blade.php delete mode 100644 app/views/public/header.blade.php delete mode 100644 app/views/public/license.blade.php delete mode 100644 app/views/public/terms.blade.php delete mode 100755 app/views/public_list.blade.php delete mode 100644 app/views/reports/d3.blade.php delete mode 100755 app/views/reports/report_builder.blade.php delete mode 100644 app/views/script.blade.php delete mode 100644 app/views/secure_payment.blade.php delete mode 100644 app/views/setup.blade.php delete mode 100644 app/views/timesheets/edit.blade.php delete mode 100644 app/views/users/edit.blade.php delete mode 100755 app/views/users/forgot_password.blade.php delete mode 100755 app/views/users/login.blade.php delete mode 100755 app/views/users/reset_password.blade.php delete mode 100755 artisan delete mode 100755 bootstrap/autoload.php delete mode 100755 bootstrap/environment.default.php delete mode 100755 bootstrap/paths.php delete mode 100755 bootstrap/start.php delete mode 100644 bower.json delete mode 100644 codeception.yml delete mode 100644 composer.json delete mode 100644 composer.lock delete mode 100644 node_modules/grunt-contrib-concat/LICENSE-MIT delete mode 100644 node_modules/grunt-contrib-concat/README.md delete mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/index.js delete mode 120000 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/.bin/strip-ansi delete mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js delete mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/package.json delete mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/readme.md delete mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/index.js delete mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/package.json delete mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/readme.md delete mode 100755 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/cli.js delete mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/index.js delete mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/package.json delete mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/readme.md delete mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/package.json delete mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/readme.md delete mode 100644 node_modules/grunt-contrib-concat/package.json delete mode 100644 node_modules/grunt-contrib-concat/tasks/concat.js delete mode 100644 node_modules/grunt-contrib-concat/tasks/lib/comment.js delete mode 100644 node_modules/grunt/.npmignore delete mode 100644 node_modules/grunt/LICENSE-MIT delete mode 100644 node_modules/grunt/README.md delete mode 100644 node_modules/grunt/internal-tasks/bump.js delete mode 100644 node_modules/grunt/internal-tasks/subgrunt.js delete mode 100644 node_modules/grunt/lib/grunt.js delete mode 100644 node_modules/grunt/lib/grunt/cli.js delete mode 100644 node_modules/grunt/lib/grunt/config.js delete mode 100644 node_modules/grunt/lib/grunt/event.js delete mode 100644 node_modules/grunt/lib/grunt/fail.js delete mode 100644 node_modules/grunt/lib/grunt/file.js delete mode 100644 node_modules/grunt/lib/grunt/help.js delete mode 100644 node_modules/grunt/lib/grunt/log.js delete mode 100644 node_modules/grunt/lib/grunt/option.js delete mode 100644 node_modules/grunt/lib/grunt/task.js delete mode 100644 node_modules/grunt/lib/grunt/template.js delete mode 100644 node_modules/grunt/lib/util/task.js delete mode 120000 node_modules/grunt/node_modules/.bin/cake delete mode 120000 node_modules/grunt/node_modules/.bin/coffee delete mode 120000 node_modules/grunt/node_modules/.bin/js-yaml delete mode 120000 node_modules/grunt/node_modules/.bin/nopt delete mode 120000 node_modules/grunt/node_modules/.bin/rimraf delete mode 120000 node_modules/grunt/node_modules/.bin/which delete mode 100644 node_modules/grunt/node_modules/async/.gitmodules delete mode 100644 node_modules/grunt/node_modules/async/.npmignore delete mode 100644 node_modules/grunt/node_modules/async/LICENSE delete mode 100644 node_modules/grunt/node_modules/async/Makefile delete mode 100644 node_modules/grunt/node_modules/async/README.md delete mode 100644 node_modules/grunt/node_modules/async/index.js delete mode 100644 node_modules/grunt/node_modules/async/lib/async.js delete mode 100644 node_modules/grunt/node_modules/async/package.json delete mode 100644 node_modules/grunt/node_modules/coffee-script/.npmignore delete mode 100644 node_modules/grunt/node_modules/coffee-script/CNAME delete mode 100644 node_modules/grunt/node_modules/coffee-script/LICENSE delete mode 100644 node_modules/grunt/node_modules/coffee-script/README delete mode 100644 node_modules/grunt/node_modules/coffee-script/Rakefile delete mode 100755 node_modules/grunt/node_modules/coffee-script/bin/cake delete mode 100755 node_modules/grunt/node_modules/coffee-script/bin/coffee delete mode 100644 node_modules/grunt/node_modules/coffee-script/extras/jsl.conf delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/browser.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/cake.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/command.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/grammar.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/helpers.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/index.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/lexer.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/nodes.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/optparse.js delete mode 100755 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/parser.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/repl.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/rewriter.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/scope.js delete mode 100644 node_modules/grunt/node_modules/coffee-script/package.json delete mode 100644 node_modules/grunt/node_modules/colors/MIT-LICENSE.txt delete mode 100644 node_modules/grunt/node_modules/colors/ReadMe.md delete mode 100644 node_modules/grunt/node_modules/colors/colors.js delete mode 100644 node_modules/grunt/node_modules/colors/example.html delete mode 100644 node_modules/grunt/node_modules/colors/example.js delete mode 100644 node_modules/grunt/node_modules/colors/package.json delete mode 100644 node_modules/grunt/node_modules/colors/test.js delete mode 100644 node_modules/grunt/node_modules/colors/themes/winston-dark.js delete mode 100644 node_modules/grunt/node_modules/colors/themes/winston-light.js delete mode 100644 node_modules/grunt/node_modules/dateformat/Readme.md delete mode 100644 node_modules/grunt/node_modules/dateformat/lib/dateformat.js delete mode 100644 node_modules/grunt/node_modules/dateformat/package.json delete mode 100644 node_modules/grunt/node_modules/dateformat/test/test_weekofyear.js delete mode 100644 node_modules/grunt/node_modules/dateformat/test/test_weekofyear.sh delete mode 100644 node_modules/grunt/node_modules/eventemitter2/README.md delete mode 100644 node_modules/grunt/node_modules/eventemitter2/index.js delete mode 100644 node_modules/grunt/node_modules/eventemitter2/lib/eventemitter2.js delete mode 100644 node_modules/grunt/node_modules/eventemitter2/package.json delete mode 100644 node_modules/grunt/node_modules/exit/.jshintrc delete mode 100644 node_modules/grunt/node_modules/exit/.npmignore delete mode 100644 node_modules/grunt/node_modules/exit/.travis.yml delete mode 100644 node_modules/grunt/node_modules/exit/Gruntfile.js delete mode 100644 node_modules/grunt/node_modules/exit/LICENSE-MIT delete mode 100644 node_modules/grunt/node_modules/exit/README.md delete mode 100644 node_modules/grunt/node_modules/exit/lib/exit.js delete mode 100644 node_modules/grunt/node_modules/exit/package.json delete mode 100644 node_modules/grunt/node_modules/exit/test/exit_test.js delete mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/10-stderr.txt delete mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/10-stdout-stderr.txt delete mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/10-stdout.txt delete mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/100-stderr.txt delete mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/100-stdout-stderr.txt delete mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/100-stdout.txt delete mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/1000-stderr.txt delete mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout-stderr.txt delete mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout.txt delete mode 100755 node_modules/grunt/node_modules/exit/test/fixtures/create-files.sh delete mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/log-broken.js delete mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/log.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/.jshintrc delete mode 100644 node_modules/grunt/node_modules/findup-sync/.npmignore delete mode 100644 node_modules/grunt/node_modules/findup-sync/.travis.yml delete mode 100644 node_modules/grunt/node_modules/findup-sync/Gruntfile.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/LICENSE-MIT delete mode 100644 node_modules/grunt/node_modules/findup-sync/README.md delete mode 100644 node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/.npmignore delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/.travis.yml delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/LICENSE delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/README.md delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/examples/g.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/examples/usr-local.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/LICENSE delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/README.md delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/inherits.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/inherits_browser.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/package.json delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/test.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/package.json delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/00-setup.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/bash-comparison.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/bash-results.json delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/cwd-test.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/globstar-match.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/mark.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/new-glob-optional-options.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/nocase-nomagic.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/pause-resume.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/readme-issue.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/root-nomount.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/root.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/stat.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/zz-cleanup.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/LICENSE.txt delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/README.md delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.min.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.min.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.min.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/lodash.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/package.json delete mode 100644 node_modules/grunt/node_modules/findup-sync/package.json delete mode 100644 node_modules/grunt/node_modules/findup-sync/test/findup-sync_test.js delete mode 100644 node_modules/grunt/node_modules/findup-sync/test/fixtures/a.txt delete mode 100644 node_modules/grunt/node_modules/findup-sync/test/fixtures/a/b/bar.txt delete mode 100644 node_modules/grunt/node_modules/findup-sync/test/fixtures/a/foo.txt delete mode 100644 node_modules/grunt/node_modules/findup-sync/test/fixtures/aaa.txt delete mode 100644 node_modules/grunt/node_modules/getobject/.jshintrc delete mode 100644 node_modules/grunt/node_modules/getobject/.npmignore delete mode 100644 node_modules/grunt/node_modules/getobject/.travis.yml delete mode 100644 node_modules/grunt/node_modules/getobject/Gruntfile.js delete mode 100644 node_modules/grunt/node_modules/getobject/LICENSE-MIT delete mode 100644 node_modules/grunt/node_modules/getobject/README.md delete mode 100644 node_modules/grunt/node_modules/getobject/lib/getobject.js delete mode 100644 node_modules/grunt/node_modules/getobject/package.json delete mode 100644 node_modules/grunt/node_modules/getobject/test/namespace_test.js delete mode 100644 node_modules/grunt/node_modules/glob/.npmignore delete mode 100644 node_modules/grunt/node_modules/glob/.travis.yml delete mode 100644 node_modules/grunt/node_modules/glob/LICENSE delete mode 100644 node_modules/grunt/node_modules/glob/README.md delete mode 100644 node_modules/grunt/node_modules/glob/examples/g.js delete mode 100644 node_modules/grunt/node_modules/glob/examples/usr-local.js delete mode 100644 node_modules/grunt/node_modules/glob/glob.js delete mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/.npmignore delete mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/LICENSE delete mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/README.md delete mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/graceful-fs.js delete mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/package.json delete mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/open.js delete mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/ulimit.js delete mode 100644 node_modules/grunt/node_modules/glob/node_modules/inherits/README.md delete mode 100644 node_modules/grunt/node_modules/glob/node_modules/inherits/inherits.js delete mode 100644 node_modules/grunt/node_modules/glob/node_modules/inherits/package.json delete mode 100644 node_modules/grunt/node_modules/glob/package.json delete mode 100644 node_modules/grunt/node_modules/glob/test/00-setup.js delete mode 100644 node_modules/grunt/node_modules/glob/test/bash-comparison.js delete mode 100644 node_modules/grunt/node_modules/glob/test/bash-results.json delete mode 100644 node_modules/grunt/node_modules/glob/test/cwd-test.js delete mode 100644 node_modules/grunt/node_modules/glob/test/mark.js delete mode 100644 node_modules/grunt/node_modules/glob/test/nocase-nomagic.js delete mode 100644 node_modules/grunt/node_modules/glob/test/pause-resume.js delete mode 100644 node_modules/grunt/node_modules/glob/test/root-nomount.js delete mode 100644 node_modules/grunt/node_modules/glob/test/root.js delete mode 100644 node_modules/grunt/node_modules/glob/test/zz-cleanup.js delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/.npmignore delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/Gruntfile.js delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/LICENSE-MIT delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/README.md delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/index.js delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/package.json delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/Gruntfile-execArgv-child.js delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/Gruntfile-execArgv.js delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/Gruntfile-print-text.js delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/exec.cmd delete mode 100755 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/exec.sh delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/spawn-multibyte.js delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/spawn.js delete mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/index.js delete mode 100644 node_modules/grunt/node_modules/hooker/LICENSE-MIT delete mode 100644 node_modules/grunt/node_modules/hooker/README.md delete mode 100644 node_modules/grunt/node_modules/hooker/child.js delete mode 100644 node_modules/grunt/node_modules/hooker/dist/ba-hooker.js delete mode 100644 node_modules/grunt/node_modules/hooker/dist/ba-hooker.min.js delete mode 100644 node_modules/grunt/node_modules/hooker/grunt.js delete mode 100644 node_modules/grunt/node_modules/hooker/lib/hooker.js delete mode 100644 node_modules/grunt/node_modules/hooker/package.json delete mode 100644 node_modules/grunt/node_modules/hooker/parent.js delete mode 100644 node_modules/grunt/node_modules/hooker/test/hooker_test.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/.npmignore delete mode 100644 node_modules/grunt/node_modules/iconv-lite/.travis.yml delete mode 100644 node_modules/grunt/node_modules/iconv-lite/LICENSE delete mode 100644 node_modules/grunt/node_modules/iconv-lite/README.md delete mode 100644 node_modules/grunt/node_modules/iconv-lite/README.md~ delete mode 100644 node_modules/grunt/node_modules/iconv-lite/encodings/big5.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/encodings/gbk.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/encodings/singlebyte.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/encodings/table/big5.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/encodings/table/gbk.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/generation/generate-big5-table.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/generation/generate-singlebyte.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/index.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/package.json delete mode 100644 node_modules/grunt/node_modules/iconv-lite/test/big5-test.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/test/big5File.txt delete mode 100644 node_modules/grunt/node_modules/iconv-lite/test/cyrillic-test.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/test/gbk-test.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/test/gbkFile.txt delete mode 100644 node_modules/grunt/node_modules/iconv-lite/test/greek-test.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/test/main-test.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/test/performance.js delete mode 100644 node_modules/grunt/node_modules/iconv-lite/test/turkish-test.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/HISTORY.md delete mode 100644 node_modules/grunt/node_modules/js-yaml/LICENSE delete mode 100644 node_modules/grunt/node_modules/js-yaml/README.md delete mode 100755 node_modules/grunt/node_modules/js-yaml/bin/js-yaml.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/examples/custom_types.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/examples/custom_types.yaml delete mode 100644 node_modules/grunt/node_modules/js-yaml/examples/dumper.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/examples/dumper.json delete mode 100644 node_modules/grunt/node_modules/js-yaml/examples/sample_document.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/examples/sample_document.yaml delete mode 100644 node_modules/grunt/node_modules/js-yaml/index.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/common.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/dumper.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/exception.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/loader.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/mark.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/require.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/default.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/minimal.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/safe.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/binary.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/bool.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/float.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/int.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/function.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/map.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/merge.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/null.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/omap.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/pairs.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/seq.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/set.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/str.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/timestamp.js delete mode 120000 node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esparse delete mode 120000 node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esvalidate delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/HISTORY.md delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/LICENSE delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/README.md delete mode 100755 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/arguments.js delete mode 100755 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js delete mode 100755 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/constants.js delete mode 100755 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/help.js delete mode 100755 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/nargs.js delete mode 100755 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/parents.js delete mode 100755 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js delete mode 100755 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js delete mode 100755 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sum.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/index.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/count.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/help.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/version.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action_container.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argparse.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/const.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/namespace.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.travis.yml delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/libpeerconnection.log delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings_standalone.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test.html delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jquery.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.css delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/underscore.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/.npmignore delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/.travis.yml delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CNAME delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CONTRIBUTING.md delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/LICENSE delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/README.md delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/favicon.ico delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/package.json delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore-min.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/package.json delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/README.md delete mode 100755 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esparse.js delete mode 100755 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/esprima.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/package.json delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/compat.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/reflect.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/run.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/runner.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/test.js delete mode 100644 node_modules/grunt/node_modules/js-yaml/package.json delete mode 100644 node_modules/grunt/node_modules/lodash/README.md delete mode 100644 node_modules/grunt/node_modules/lodash/lodash.js delete mode 100644 node_modules/grunt/node_modules/lodash/lodash.min.js delete mode 100644 node_modules/grunt/node_modules/lodash/lodash.underscore.js delete mode 100644 node_modules/grunt/node_modules/lodash/lodash.underscore.min.js delete mode 100644 node_modules/grunt/node_modules/lodash/package.json delete mode 100644 node_modules/grunt/node_modules/minimatch/.npmignore delete mode 100644 node_modules/grunt/node_modules/minimatch/LICENSE delete mode 100644 node_modules/grunt/node_modules/minimatch/README.md delete mode 100644 node_modules/grunt/node_modules/minimatch/minimatch.js delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/.npmignore delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/LICENSE delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/README.md delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/basic.js delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/foreach.js delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/sigmund/LICENSE delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/sigmund/README.md delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/sigmund/bench.js delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/sigmund/package.json delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/sigmund/sigmund.js delete mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/sigmund/test/basic.js delete mode 100644 node_modules/grunt/node_modules/minimatch/package.json delete mode 100644 node_modules/grunt/node_modules/minimatch/test/basic.js delete mode 100644 node_modules/grunt/node_modules/minimatch/test/brace-expand.js delete mode 100644 node_modules/grunt/node_modules/minimatch/test/caching.js delete mode 100644 node_modules/grunt/node_modules/minimatch/test/defaults.js delete mode 100644 node_modules/grunt/node_modules/minimatch/test/extglob-ending-with-state-char.js delete mode 100644 node_modules/grunt/node_modules/nopt/.npmignore delete mode 100644 node_modules/grunt/node_modules/nopt/LICENSE delete mode 100644 node_modules/grunt/node_modules/nopt/README.md delete mode 100755 node_modules/grunt/node_modules/nopt/bin/nopt.js delete mode 100755 node_modules/grunt/node_modules/nopt/examples/my-program.js delete mode 100644 node_modules/grunt/node_modules/nopt/lib/nopt.js delete mode 100644 node_modules/grunt/node_modules/nopt/lib/usage.js delete mode 100644 node_modules/grunt/node_modules/nopt/node_modules/abbrev/CONTRIBUTING.md delete mode 100644 node_modules/grunt/node_modules/nopt/node_modules/abbrev/LICENSE delete mode 100644 node_modules/grunt/node_modules/nopt/node_modules/abbrev/README.md delete mode 100644 node_modules/grunt/node_modules/nopt/node_modules/abbrev/abbrev.js delete mode 100644 node_modules/grunt/node_modules/nopt/node_modules/abbrev/package.json delete mode 100644 node_modules/grunt/node_modules/nopt/node_modules/abbrev/test.js delete mode 100644 node_modules/grunt/node_modules/nopt/package.json delete mode 100644 node_modules/grunt/node_modules/rimraf/AUTHORS delete mode 100644 node_modules/grunt/node_modules/rimraf/LICENSE delete mode 100644 node_modules/grunt/node_modules/rimraf/README.md delete mode 100755 node_modules/grunt/node_modules/rimraf/bin.js delete mode 100644 node_modules/grunt/node_modules/rimraf/package.json delete mode 100644 node_modules/grunt/node_modules/rimraf/rimraf.js delete mode 100644 node_modules/grunt/node_modules/rimraf/test/run.sh delete mode 100644 node_modules/grunt/node_modules/rimraf/test/setup.sh delete mode 100644 node_modules/grunt/node_modules/rimraf/test/test-async.js delete mode 100644 node_modules/grunt/node_modules/rimraf/test/test-sync.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/.travis.yml delete mode 100644 node_modules/grunt/node_modules/underscore.string/Gemfile delete mode 100644 node_modules/grunt/node_modules/underscore.string/Gemfile.lock delete mode 100644 node_modules/grunt/node_modules/underscore.string/README.markdown delete mode 100644 node_modules/grunt/node_modules/underscore.string/Rakefile delete mode 100644 node_modules/grunt/node_modules/underscore.string/dist/underscore.string.min.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/lib/underscore.string.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/package.json delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/run-qunit.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/speed.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/strings.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/strings_standalone.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test.html delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_standalone.html delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/arrays.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/chaining.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/collections.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/functions.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/objects.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/speed.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp_tests.html delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/test.html delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/utility.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jquery.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.css delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.js delete mode 100644 node_modules/grunt/node_modules/underscore.string/test/underscore.js delete mode 100644 node_modules/grunt/node_modules/which/LICENSE delete mode 100644 node_modules/grunt/node_modules/which/README.md delete mode 100755 node_modules/grunt/node_modules/which/bin/which delete mode 100644 node_modules/grunt/node_modules/which/package.json delete mode 100644 node_modules/grunt/node_modules/which/which.js delete mode 100644 node_modules/grunt/package.json delete mode 100644 package.json delete mode 100644 php.ini delete mode 100644 phpunit.xml delete mode 100755 public/.htaccess delete mode 100755 public/apple-touch-icon-precomposed.png delete mode 100755 public/apple-touch-icon.png delete mode 100755 public/builds/bootstrapper/packages/patricktalmadge/bootstrapper/css/bootstrap-theme.min-6140190bf67c53b87b24ba70ca9fc9ee.css delete mode 100755 public/builds/bootstrapper/packages/patricktalmadge/bootstrapper/css/bootstrap.min-6140190bf67c53b87b24ba70ca9fc9ee.css delete mode 100755 public/builds/bootstrapper/packages/patricktalmadge/bootstrapper/js/bootstrap.min-6140190bf67c53b87b24ba70ca9fc9ee.js delete mode 100755 public/builds/bootstrapper/packages/patricktalmadge/bootstrapper/js/jquery-1.10.2.min-590935b89a583963aad9f1d779d81729.js delete mode 100644 public/built.css delete mode 100644 public/built.js delete mode 100644 public/built.public.css delete mode 100755 public/css/bootstrap-combobox.css delete mode 100644 public/css/bootstrap.min.css delete mode 100644 public/css/bootstrap.splash.css delete mode 100644 public/css/customCss.css delete mode 100644 public/css/lightbox.css delete mode 100644 public/css/splash.css delete mode 100755 public/css/style.css delete mode 100755 public/css/themes/amelia.min.css delete mode 100755 public/css/themes/cerulean.min.css delete mode 100755 public/css/themes/cosmo.min.css delete mode 100755 public/css/themes/cyborg.min.css delete mode 100755 public/css/themes/flatly.min.css delete mode 100755 public/css/themes/journal.min.css delete mode 100755 public/css/themes/readable.min.css delete mode 100755 public/css/themes/simplex.min.css delete mode 100755 public/css/themes/slate.min.css delete mode 100755 public/css/themes/spacelab.min.css delete mode 100755 public/css/themes/united.min.css delete mode 100755 public/css/themes/yeti.min.css delete mode 100755 public/css/typeahead.js-bootstrap.css delete mode 100644 public/favicon.gif delete mode 100644 public/favicon.ico delete mode 100644 public/fonts/.empty delete mode 100755 public/fonts/FontAwesome.otf delete mode 100755 public/fonts/fontawesome-webfont.eot delete mode 100755 public/fonts/fontawesome-webfont.svg delete mode 100755 public/fonts/fontawesome-webfont.ttf delete mode 100755 public/fonts/fontawesome-webfont.woff delete mode 100644 public/fonts/glyphicons-halflings-regular.eot delete mode 100644 public/fonts/glyphicons-halflings-regular.svg delete mode 100644 public/fonts/glyphicons-halflings-regular.ttf delete mode 100644 public/fonts/glyphicons-halflings-regular.woff delete mode 100644 public/fonts/socicon-webfont.eot delete mode 100644 public/fonts/socicon-webfont.svg delete mode 100644 public/fonts/socicon-webfont.ttf delete mode 100644 public/fonts/socicon-webfont.woff delete mode 100644 public/images/AcceptPaymentsOnline.png delete mode 100644 public/images/AdjustablePaymentTerms.png delete mode 100644 public/images/AlertsWhenInvoicesViewed.png delete mode 100644 public/images/BeautifulTemplates.png delete mode 100644 public/images/BestInClassSecurity.png delete mode 100644 public/images/CloneInvoices.png delete mode 100644 public/images/CloudBasedApp.png delete mode 100644 public/images/CustomizeInvoices.png delete mode 100644 public/images/EstimatesProForma.png delete mode 100644 public/images/FreeInvoicing.png delete mode 100644 public/images/GitHub.png delete mode 100644 public/images/ImportExportRecords.png delete mode 100644 public/images/InTuitiveEditingInterface.png delete mode 100644 public/images/IntegrateWithPaymentGateways.png delete mode 100644 public/images/InvoiceClientsViaEmail.png delete mode 100644 public/images/LivePDFCreation.png delete mode 100644 public/images/ManualAutomaticInvoiceNumbers.png delete mode 100644 public/images/MultilingualSupport.png delete mode 100644 public/images/MultipleCurrencySupport.png delete mode 100644 public/images/MultipleTaxSettings.png delete mode 100644 public/images/OpenSource.png delete mode 100644 public/images/PaymentTracking.png delete mode 100644 public/images/PersonalizeInvoiceColor.png delete mode 100644 public/images/PrintablePDFInvoices.png delete mode 100644 public/images/RecurringInvoiceProfiles.png delete mode 100644 public/images/SelfHostedAvailable.png delete mode 100644 public/images/Thumbs.db delete mode 100644 public/images/about1.jpg delete mode 100644 public/images/about1@2x.jpg delete mode 100644 public/images/about2.jpg delete mode 100644 public/images/about2@2x.jpg delete mode 100644 public/images/activeclients.png delete mode 100644 public/images/activeclients@2x.png delete mode 100644 public/images/apple-touch-icon-114x114-precomposed.png delete mode 100644 public/images/apple-touch-icon-144x144-precomposed.png delete mode 100644 public/images/apple-touch-icon-57x57-precomposed.png delete mode 100644 public/images/apple-touch-icon-72x72-precomposed.png delete mode 100644 public/images/apple-touch-icon.png delete mode 100644 public/images/benjacobson.jpg delete mode 100644 public/images/bg-blue.jpg delete mode 100644 public/images/clients.png delete mode 100644 public/images/clients@2x.png delete mode 100644 public/images/credit_cards/Test-AmericanExpress-Icon.png delete mode 100644 public/images/credit_cards/Test-Diners-Icon.png delete mode 100644 public/images/credit_cards/Test-Discover-Icon.png delete mode 100644 public/images/credit_cards/Test-MasterCard-Icon.png delete mode 100644 public/images/credit_cards/Test-Visa-Icon.png delete mode 100644 public/images/designs/business.png delete mode 100644 public/images/designs/business_thumb.png delete mode 100644 public/images/designs/creative.png delete mode 100644 public/images/designs/creative_thumb.png delete mode 100644 public/images/designs/elegant.png delete mode 100644 public/images/designs/elegant_thumb.png delete mode 100644 public/images/designs/hipster.png delete mode 100644 public/images/designs/hipster_thumb.png delete mode 100644 public/images/designs/photo.png delete mode 100644 public/images/designs/photo_thumb.png delete mode 100644 public/images/designs/playful.png delete mode 100644 public/images/designs/playful_thumb.png delete mode 100644 public/images/devices-2.png delete mode 100644 public/images/devices.png delete mode 100644 public/images/devices3.png delete mode 100644 public/images/facebook.jpg delete mode 100644 public/images/features1.jpg delete mode 100644 public/images/features2.jpg delete mode 100644 public/images/features3.jpg delete mode 100644 public/images/features4.jpg delete mode 100644 public/images/features5.jpg delete mode 100644 public/images/footer-logo.png delete mode 100644 public/images/gateways/Thumbs.db delete mode 100755 public/images/gateways/logo_AuthorizeNet_AIM.png delete mode 100755 public/images/gateways/logo_BeanStream.png delete mode 100755 public/images/gateways/logo_FirstData_Connect.png delete mode 100755 public/images/gateways/logo_PayPal_Pro.png delete mode 100755 public/images/gateways/logo_TwoCheckout.png delete mode 100755 public/images/gateways/logo_iTransact.png delete mode 100644 public/images/hero-bg-1.jpg delete mode 100644 public/images/hero-bg-2.jpg delete mode 100644 public/images/hero-bg-3.jpg delete mode 100644 public/images/hero-bg-4.jpg delete mode 100644 public/images/hero-bg-contact.jpg delete mode 100644 public/images/hero-bg-faq.jpg delete mode 100644 public/images/hero-bg-plans.jpg delete mode 100644 public/images/hero-bg-secure-pay.jpg delete mode 100644 public/images/hero-bg-testi.jpg delete mode 100644 public/images/hero-faq@2x.png delete mode 100644 public/images/hex-facebook.png delete mode 100644 public/images/hex-github.png delete mode 100644 public/images/hex-gplus.png delete mode 100644 public/images/hex-linkedin.png delete mode 100644 public/images/hex-pinterest.png delete mode 100644 public/images/hex-rss.png delete mode 100644 public/images/hex-twitter.png delete mode 100644 public/images/hillelcoren.jpg delete mode 100644 public/images/icon-about.png delete mode 100644 public/images/icon-about@2x.png delete mode 100644 public/images/icon-contact.png delete mode 100644 public/images/icon-contact@2x.png delete mode 100644 public/images/icon-faq.png delete mode 100644 public/images/icon-features.png delete mode 100644 public/images/icon-features@2x.png delete mode 100644 public/images/icon-free.png delete mode 100644 public/images/icon-free2.png delete mode 100644 public/images/icon-free@2x.png delete mode 100644 public/images/icon-login.png delete mode 100644 public/images/icon-login@2x.png delete mode 100644 public/images/icon-opensource.png delete mode 100644 public/images/icon-opensource@2x.png delete mode 100644 public/images/icon-payment.png delete mode 100644 public/images/icon-payment@2x.png delete mode 100644 public/images/icon-pdf.png delete mode 100644 public/images/icon-pdf@2x.png delete mode 100644 public/images/icon-plans.png delete mode 100644 public/images/icon-plans@2x.png delete mode 100644 public/images/icon-secure-footer.png delete mode 100644 public/images/icon-secure-footer@2x.png delete mode 100644 public/images/icon-secure-pay.png delete mode 100644 public/images/icon-secure-pay@2x.png delete mode 100644 public/images/icon-secure.png delete mode 100644 public/images/icon-secure@2x.png delete mode 100644 public/images/icon-shield.png delete mode 100644 public/images/icon-testi.png delete mode 100644 public/images/icon-testi@2x.png delete mode 100644 public/images/instagram.svg delete mode 100644 public/images/invoiceninja-logo.png delete mode 100644 public/images/invoiceninja-logo@2x.png delete mode 100644 public/images/laptopwicon.jpg delete mode 100644 public/images/lightbox/close.png delete mode 100644 public/images/lightbox/loading.gif delete mode 100644 public/images/lightbox/next.png delete mode 100644 public/images/lightbox/prev.png delete mode 100644 public/images/linkedin.svg delete mode 100644 public/images/me.svg delete mode 100644 public/images/opensource-footer.png delete mode 100644 public/images/pro-plan-chart.png delete mode 100644 public/images/providers.png delete mode 100644 public/images/razikantorp.jpg delete mode 100644 public/images/report_logo1.jpg delete mode 100644 public/images/report_logo2.jpg delete mode 100644 public/images/report_logo3.jpg delete mode 100644 public/images/shalomstark.jpg delete mode 100644 public/images/social.jpg delete mode 100644 public/images/social/facebook.png delete mode 100644 public/images/social/facebook.svg delete mode 100644 public/images/social/github.png delete mode 100644 public/images/social/twitter.png delete mode 100644 public/images/social/twitter.svg delete mode 100755 public/images/sort_asc.png delete mode 100755 public/images/sort_asc_disabled.png delete mode 100755 public/images/sort_both.png delete mode 100755 public/images/sort_desc.png delete mode 100755 public/images/sort_desc_disabled.png delete mode 100644 public/images/ssl-footer.png delete mode 100644 public/images/totalincome.png delete mode 100644 public/images/totalincome@2x.png delete mode 100644 public/images/totalinvoices.png delete mode 100644 public/images/totalinvoices@2x.png delete mode 100644 public/images/twitter.svg delete mode 100644 public/images/website.svg delete mode 100755 public/index.php delete mode 100755 public/js/Chart.js delete mode 100755 public/js/bootstrap-combobox.js delete mode 100644 public/js/bootstrap.js delete mode 100644 public/js/bootstrap.min.js delete mode 100644 public/js/built.public.js delete mode 100755 public/js/compatibility.js delete mode 100644 public/js/d3.min.js delete mode 100755 public/js/jspdf.min.js delete mode 100755 public/js/jspdf.plugin.split_text_to_size.js delete mode 100755 public/js/jspdf.source.js delete mode 100644 public/js/lightbox.min.js delete mode 100755 public/js/pdf.js delete mode 100755 public/js/pdf_viewer.js delete mode 100755 public/js/pdf_viewer.worker.js delete mode 100644 public/js/retina-1.1.0.min.js delete mode 100644 public/js/script.js delete mode 100644 public/js/simpleexpand.js delete mode 100644 public/js/stacktrace.js delete mode 100644 public/js/typedarray.js delete mode 100644 public/js/valign.js delete mode 100755 public/logo/.gitkeep delete mode 100755 public/logo/zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h.jpg delete mode 100755 public/robots.txt delete mode 100644 scheduler.yml delete mode 100644 server.php delete mode 100644 tests/_bootstrap.php delete mode 100644 tests/_data/dump.sql delete mode 100644 tests/_helpers/CodeHelper.php delete mode 100644 tests/_helpers/TestHelper.php delete mode 100644 tests/_helpers/WebHelper.php delete mode 100644 tests/_log/.gitkeep delete mode 100644 tests/acceptance.suite.yml delete mode 100644 tests/acceptance/WebGuy.php delete mode 100644 tests/acceptance/WelcomeCept.php delete mode 100644 tests/acceptance/_bootstrap.php delete mode 100644 tests/acceptance/complete/CheckCreateNewClientFormCept.php delete mode 100644 tests/functional.suite.yml delete mode 100644 tests/functional/TestGuy.php delete mode 100644 tests/functional/_bootstrap.php delete mode 100644 tests/unit.suite.yml delete mode 100644 tests/unit/CodeGuy.php delete mode 100644 tests/unit/_bootstrap.php delete mode 100755 vendor/php-payments/README.md delete mode 100755 vendor/php-payments/config/drivers/amazon_simplepay.php delete mode 100755 vendor/php-payments/config/drivers/authorize_net.php delete mode 100755 vendor/php-payments/config/drivers/beanstream.php delete mode 100755 vendor/php-payments/config/drivers/bluepay.php delete mode 100755 vendor/php-payments/config/drivers/braintree.php delete mode 100755 vendor/php-payments/config/drivers/eway.php delete mode 100755 vendor/php-payments/config/drivers/gocardless.php delete mode 100755 vendor/php-payments/config/drivers/google_checkout.php delete mode 100755 vendor/php-payments/config/drivers/paypal_paymentspro.php delete mode 100755 vendor/php-payments/config/drivers/psigate.php delete mode 100755 vendor/php-payments/config/drivers/quickbooksms.php delete mode 100755 vendor/php-payments/config/drivers/stripe.php delete mode 100755 vendor/php-payments/config/payments.php delete mode 100755 vendor/php-payments/documentation/README.md delete mode 100755 vendor/php-payments/documentation/dox/content/add_drivers.php delete mode 100755 vendor/php-payments/documentation/dox/content/contributors.php delete mode 100755 vendor/php-payments/documentation/dox/content/donate.php delete mode 100755 vendor/php-payments/documentation/dox/content/drivers.php delete mode 100755 vendor/php-payments/documentation/dox/content/frameworks.php delete mode 100755 vendor/php-payments/documentation/dox/content/index.php delete mode 100755 vendor/php-payments/documentation/dox/content/methods.php delete mode 100755 vendor/php-payments/documentation/dox/content/usage.php delete mode 100755 vendor/php-payments/documentation/dox/doxgen.php delete mode 100755 vendor/php-payments/documentation/dox/template.php delete mode 100755 vendor/php-payments/documentation/dox/template/footer.php delete mode 100755 vendor/php-payments/documentation/dox/template/head.php delete mode 100755 vendor/php-payments/documentation/dox/template/header.php delete mode 100755 vendor/php-payments/documentation/dox/template/sidebar.php delete mode 100755 vendor/php-payments/documentation/html/assets/style.css delete mode 100755 vendor/php-payments/language/english/response_details_lang.php delete mode 100755 vendor/php-payments/language/english/response_messages_lang.php delete mode 100755 vendor/php-payments/lib/payment_driver.php delete mode 100755 vendor/php-payments/lib/payment_drivers/amazon_simplepay_driver.php delete mode 100755 vendor/php-payments/lib/payment_drivers/authorize_net_driver.php delete mode 100755 vendor/php-payments/lib/payment_drivers/beanstream_driver.php delete mode 100755 vendor/php-payments/lib/payment_drivers/bluepay_driver.php delete mode 100755 vendor/php-payments/lib/payment_drivers/braintree_driver.php delete mode 100755 vendor/php-payments/lib/payment_drivers/eway_driver.php delete mode 100755 vendor/php-payments/lib/payment_drivers/gocardless_driver.php delete mode 100755 vendor/php-payments/lib/payment_drivers/google_checkout_driver.php delete mode 100755 vendor/php-payments/lib/payment_drivers/paypal_paymentspro_driver.php delete mode 100755 vendor/php-payments/lib/payment_drivers/psigate_driver.php delete mode 100755 vendor/php-payments/lib/payment_drivers/quickbooksms_driver.php delete mode 100755 vendor/php-payments/lib/payment_drivers/stripe_driver.php delete mode 100755 vendor/php-payments/lib/payment_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/activate_recurring_profile_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/authorize_payment_button_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/authorize_payment_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/cancel_recurring_profile_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/capture_payment_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/change_transaction_status_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/customer_charge_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/customer_create_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/get_recurring_profile_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/get_transaction_details_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/oneoff_payment_button_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/oneoff_payment_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/recurring_bill_outstanding_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/recurring_payment_button_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/recurring_payment_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/reference_payment_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/refund_payment_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/search_transactions_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/suspend_recurring_profile_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/token_create_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/update_recurring_profile_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/void_payment_method.php delete mode 100755 vendor/php-payments/lib/payment_methods/void_refund_method.php delete mode 100755 vendor/php-payments/lib/payment_request.php delete mode 100755 vendor/php-payments/lib/payment_response.php delete mode 100755 vendor/php-payments/lib/payment_utility.php delete mode 100755 vendor/php-payments/lib/payment_validator.php delete mode 100755 vendor/php-payments/lib/payments.php delete mode 100755 vendor/php-payments/tests/classes/test_errors.php delete mode 100755 vendor/php-payments/tests/test.php delete mode 100755 vendor/php-payments/tests/tests/drivers.php delete mode 100755 vendor/php-payments/tests/tests/drivers/.drivers.test_vals.php delete mode 100755 vendor/php-payments/tests/tests/drivers/driver.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/ButtonGenerationWithSignature/Examples-ASP.html delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/ButtonGenerationWithSignature/README.html delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/ButtonGenerationWithSignature/src/ButtonGenerator.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/ButtonGenerationWithSignature/src/SignatureUtils.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/ButtonGenerationWithSignature/src/StandardButtonSample.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/README.html delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Client.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Exception.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Interface.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Mock.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Mock/CancelResponse.xml delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Mock/ErrorResponse.xml delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Mock/GetTransactionStatusResponse.xml delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Mock/RefundResponse.xml delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Mock/SettleResponse.xml delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Mock/VerifySignatureResponse.xml delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/AccountBalance.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/Amount.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/AvailableBalances.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/CancelRequest.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/CancelResponse.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/CancelResult.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/DebtBalance.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/DescriptorPolicy.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/Error.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/GetTransactionStatusRequest.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/GetTransactionStatusResponse.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/GetTransactionStatusResult.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/OutstandingDebtBalance.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/OutstandingPrepaidLiability.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/PrepaidBalance.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/RefundRequest.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/RefundResponse.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/RefundResult.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/RelatedTransaction.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/ResponseMetadata.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/SettleRequest.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/SettleResponse.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/SettleResult.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/StatusHistory.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/Token.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/TokenUsageLimit.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/Transaction.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/TransactionDetail.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/TransactionPart.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/VerifySignatureRequest.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/VerifySignatureResponse.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Model/VerifySignatureResult.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Samples/.config.inc.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Samples/CancelSample.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Samples/GetTransactionStatusSample.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Samples/RefundSample.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Samples/SettleSample.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/FPSApis/src/Amazon/FPS/Samples/VerifySignatureSample.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/IPNAndReturnURLValidation/Examples-IPN.html delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/IPNAndReturnURLValidation/Examples-ReturnUrl.html delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/IPNAndReturnURLValidation/README.html delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/IPNAndReturnURLValidation/src/.config.inc.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/IPNAndReturnURLValidation/src/IPNVerificationSampleCode.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/IPNAndReturnURLValidation/src/ReturnUrlVerificationSampleCode.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/IPNAndReturnURLValidation/src/SignatureUtilsForOutbound.php delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/IPNAndReturnURLValidation/src/ca-bundle.crt delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/LICENSE.txt delete mode 100755 vendor/php-payments/vendor/amazon_simplepay/NOTICE.txt delete mode 100755 vendor/php-payments/vendor/google_checkout/CHANGELOG delete mode 100755 vendor/php-payments/vendor/google_checkout/README delete mode 100755 vendor/php-payments/vendor/google_checkout/TODO delete mode 100755 vendor/php-payments/vendor/google_checkout/UPGRADE delete mode 100755 vendor/php-payments/vendor/google_checkout/demo/basicapiresponsehandlerdemo.php delete mode 100755 vendor/php-payments/vendor/google_checkout/demo/cartdemo.php delete mode 100755 vendor/php-payments/vendor/google_checkout/demo/digitalCart.php delete mode 100755 vendor/php-payments/vendor/google_checkout/demo/lineItemShipping.php delete mode 100755 vendor/php-payments/vendor/google_checkout/demo/merchantsubscriptionrecurrencedemo.php delete mode 100755 vendor/php-payments/vendor/google_checkout/demo/pollingdemo.php delete mode 100755 vendor/php-payments/vendor/google_checkout/demo/responsehandlerdemo.php delete mode 100755 vendor/php-payments/vendor/google_checkout/demo/sampcodetest.php delete mode 100755 vendor/php-payments/vendor/google_checkout/demo/subscriptiondemo (Autosaved).txt delete mode 100755 vendor/php-payments/vendor/google_checkout/demo/subscriptiondemo.php delete mode 100755 vendor/php-payments/vendor/google_checkout/googleerror.log delete mode 100755 vendor/php-payments/vendor/google_checkout/googlemessage.log delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googlecart.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googleitem.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googlelog.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googlemerchantcalculations.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googlenotification.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googlenotificationhistory.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googlepoll.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googlerequest.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googleresponse.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googleresult.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googleshipping.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googlesubscription.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/googletax.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/htmlSignatureGen.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/xml-processing/gc_xmlbuilder.php delete mode 100755 vendor/php-payments/vendor/google_checkout/library/xml-processing/gc_xmlparser.php delete mode 100755 vendor/php-payments/vendor/google_checkout/unitTest/classes/README delete mode 100755 vendor/php-payments/vendor/google_checkout/unitTest/classes/phpunit.php delete mode 100755 vendor/php-payments/vendor/google_checkout/unitTest/error.log delete mode 100755 vendor/php-payments/vendor/google_checkout/unitTest/message.log delete mode 100755 vendor/php-payments/vendor/google_checkout/unitTest/stylesheet.css delete mode 100755 vendor/php-payments/vendor/google_checkout/unitTest/testGoogleCart.php delete mode 100755 vendor/php-payments/vendor/google_checkout/unitTest/testGoogleLog.php delete mode 100755 vendor/php-payments/vendor/google_checkout/unitTest/testGoogleXMLParser.php diff --git a/.bowerrc b/.bowerrc deleted file mode 100644 index 7694ad7822ba..000000000000 --- a/.bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory": "./public/vendor" -} \ No newline at end of file diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 2125666142eb..000000000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text=auto \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c0de003549c8..000000000000 --- a/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -/app/config/staging -/app/config/development -/app/config/production -/app/config/fortrabbit -/app/config/ubuntu -/app/config/packages/anahkiasen/rocketeer/ -/app/storage -/public/logo -/public/build -/public/packages -/public/vendor -/bootstrap/compiled.php -/bootstrap/environment.php -/vendor -/.DS_Store -/Thumbs.db -/ninja.sublime-project -/ninja.sublime-workspace -/tests/_log -.env.development.php -.env.php -.idea -.project -/nbproject/private/ \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 9213e01d255a..000000000000 --- a/Gruntfile.js +++ /dev/null @@ -1,124 +0,0 @@ -module.exports = function(grunt) { - - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - concat: { - options: { - process: function(src, filepath) { - var basepath = filepath.substring(7, filepath.lastIndexOf('/') + 1); - // Fix relative paths for css files - if(filepath.indexOf('.css', filepath.length - 4) !== -1) { - return src.replace(/(url\s*[\("']+)\s*([^'"\)]+)(['"\)]+;?)/gi, function(match, start, url, end, offset, string) { - if(url.indexOf('data:') === 0) { - // Skip data urls - return match; - - } else if(url.indexOf('/') === 0) { - // Skip absolute urls - return match; - - } else { - return start + basepath + url + end; - } - }); - - // Fix source maps locations - } else if(filepath.indexOf('.js', filepath.length - 4) !== -1) { - return src.replace(/(\/[*\/][#@]\s*sourceMappingURL=)([^\s]+)/gi, function(match, start, url, offset, string) { - if(url.indexOf('/') === 0) { - // Skip absolute urls - return match; - - } else { - return start + basepath + url; - } - }); - - // Don't do anything for unknown file types - } else { - return src; - } - }, - }, - js: { - src: [ - 'public/vendor/jquery/dist/jquery.js', - 'public/vendor/jquery-ui/jquery-ui.min.js', - 'public/vendor/bootstrap/dist/js/bootstrap.min.js', - 'public/vendor/datatables/media/js/jquery.dataTables.js', - 'public/vendor/datatables-bootstrap3/BS3/assets/js/datatables.js', - 'public/vendor/knockout.js/knockout.js', - 'public/vendor/knockout-mapping/build/output/knockout.mapping-latest.js', - 'public/vendor/knockout-sortable/build/knockout-sortable.min.js', - 'public/vendor/underscore/underscore.js', - 'public/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js', - 'public/vendor/typeahead.js/dist/typeahead.min.js', - 'public/vendor/accounting/accounting.min.js', - 'public/vendor/spectrum/spectrum.js', - 'public/vendor/jspdf/dist/jspdf.min.js', - //'public/vendor/handsontable/dist/jquery.handsontable.full.min.js', - 'public/js/lightbox.min.js', - 'public/js/bootstrap-combobox.js', - 'public/js/script.js', - ], - dest: 'public/built.js', - nonull: true - }, - js_public: { - src: [ - /* - 'public/js/simpleexpand.js', - 'public/js/valign.js', - 'public/js/bootstrap.min.js', - 'public/js/simpleexpand.js', - */ - 'public/vendor/bootstrap/dist/js/bootstrap.min.js', - - ], - dest: 'public/js/built.public.js', - nonull: true - }, - css: { - src: [ - 'public/vendor/bootstrap/dist/css/bootstrap.min.css', - 'public/vendor/datatables/media/css/jquery.dataTables.css', - 'public/vendor/datatables-bootstrap3/BS3/assets/css/datatables.css', - 'public/vendor/font-awesome/css/font-awesome.min.css', - 'public/vendor/bootstrap-datepicker/css/datepicker.css', - 'public/vendor/spectrum/spectrum.css', - 'public/css/bootstrap-combobox.css', - 'public/css/typeahead.js-bootstrap.css', - 'public/css/lightbox.css', - //'public/vendor/handsontable/dist/jquery.handsontable.full.css', - 'public/css/style.css', - ], - dest: 'public/built.css', - nonull: true, - options: { - process: false - } - }, - css_public: { - src: [ - 'public/vendor/bootstrap/dist/css/bootstrap.min.css', - /* - 'public/css/bootstrap.splash.css', - 'public/css/splash.css', - */ - 'public/vendor/datatables/media/css/jquery.dataTables.css', - 'public/vendor/datatables-bootstrap3/BS3/assets/css/datatables.css', - ], - dest: 'public/built.public.css', - nonull: true, - options: { - process: false - } - } - } - }); - - grunt.loadNpmTasks('grunt-contrib-concat'); - - grunt.registerTask('default', ['concat']); - -}; diff --git a/LICENSE b/LICENSE deleted file mode 100644 index eaa9f1e3672c..000000000000 --- a/LICENSE +++ /dev/null @@ -1,40 +0,0 @@ -Attribution Assurance License -Copyright (c) 2014 by Hillel Coren -http://www.hillelcoren.com - -All Rights Reserved -ATTRIBUTION ASSURANCE LICENSE (adapted from the original BSD license) -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the conditions below are met. -These conditions require a modest attribution to InvoiceNinja.com. The hope -is that its promotional value may help justify the thousands of dollars in -otherwise billable time invested in writing this and other freely available, -open-source software. - -1. Redistributions of source code, in whole or part and with or without -modification requires the express permission of the author and must prominently -display "Powered by InvoiceNinja" or the Invoice Ninja logo in verifiable form -with hyperlink to said site. -2. Neither the name nor any trademark of the Author may be used to -endorse or promote products derived from this software without specific -prior written permission. -3. Users are entirely responsible, to the exclusion of the Author and -any other persons, for compliance with (1) regulations set by owners or -administrators of employed equipment, (2) licensing terms of any other -software, and (3) local regulations regarding use, including those -regarding import, export, and use of encryption software. - -THIS FREE SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL THE AUTHOR OR ANY CONTRIBUTOR BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -EFFECTS OF UNAUTHORIZED OR MALICIOUS NETWORK ACCESS; -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index be9da430c5a8..000000000000 --- a/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# Invoice Ninja -## Simple, Intuitive Invoicing - -### [https://www.invoiceninja.com](https://www.invoiceninja.com) - -If you'd like to use our code to sell your own invoicing app we have an affiliate program. Get in touch for more details. - -### Introduction - -Most online invoicing sites are expensive. They shouldn't be. The aim of this project is to provide a free, open-source alternative. Additionally, the hope is the codebase will serve as a sample site for Laravel as well as other JavaScript technologies. - -To setup the site you can either use this [zip file](http://hillelcoren.com/invoice-ninja/self-hosting/) (easier to setup) or checkout the code from GitHub following the instructions below (easier to stay up to date). There's also a more detailed setup guide [available here](http://hillelcoren.com/invoice-ninja/laravel-ubuntu-virtualbox/). - -For a WAMP/MAMP/LAMP setup you can one-click install using Softaculous's [AMPPS](http://www.ampps.com/). To deploy the app with [Docker](http://www.docker.com/) you can use [this project](https://github.com/rollbrettler/Dockerfiles/tree/master/invoice-ninja). - -To connect follow [@invoiceninja](https://twitter.com/invoiceninja) or join the [Facebook Group](https://www.facebook.com/invoiceninja). For discussion of the code please use the [Google Group](https://groups.google.com/d/forum/invoiceninja). - -If you'd like to translate the site please use [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) for the starter files. - -Developed by [@hillelcoren](https://twitter.com/hillelcoren) | Designed by [kantorp-wegl.in](http://kantorp-wegl.in/). - -### Features - -* Core application built using Laravel 4.1 -* Invoice PDF generation directly in the browser -* Integrates with many payment providers -* Recurring invoices -* Tax rates and payment terms -* Multi-user support -* [Zapier](https://zapier.com/) integration -* [D3.js](http://d3js.org/) visualizations - -### Contributors - -* [Troels Liebe Bentsen](https://github.com/tlbdk) - -### Steps to setup - -If you plan on submitting changes it's best to [fork the repo](https://help.github.com/articles/fork-a-repo), otherwise you can just checkout the code. - - git clone https://github.com/hillelcoren/invoice-ninja.git ninja - cd ninja - -Install Laravel packages using Composer - -Note: you may be prompted for your Github user/pass due to their API limits. - - composer install - -Install JavaScript and HTML packages using Bower. This is optional, it's only needed if you want to modify the JavaScript. - - bower install - -Create database user and a database for ninja - - CREATE SCHEMA `ninja` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; - CREATE USER 'ninja'@'localhost' IDENTIFIED BY 'ninja'; - GRANT ALL PRIVILEGES ON `ninja`.* TO 'ninja'@'localhost'; - FLUSH PRIVILEGES; - -Add public/ to your web server root then load / to configure the application. - -### Developer Notes - -* The application requires PHP >= 5.4.0 -* If you make any changes to the JavaScript files you need to run grunt to create the built files. See Gruntfile.js for more details. -* The lookup tables are cached in memory (ie, Currencies, Timezones, Languages, etc). If you add a record to the database you need to clear the cache by uncommenting Cache::flush() in app/routes.php. -* If you run into any composer errors try running composer dump-autoload. - -### Ubuntu Notes - - # Install php-mcrypt - apt-get install php5-mcrypt - sudo php5enmod mcrypt - - # Install Composer - curl -sS https://getcomposer.org/installer | php - sudo mv composer.phar /usr/local/bin/composer - - # Install Bower - sudo apt-get install npm nodejs-legacy - sudo npm install -g bower - sudo ln -s /usr/local/lib/node_modules/bower/bin/bower /usr/local/bin/bower - - # Install Grunt (For development only) - npm install -g grunt-cli - -### Frameworks/Libraries -* [laravel/laravel](https://github.com/laravel/laravel) - A PHP Framework For Web Artisans -* [twbs/bootstrap](https://github.com/twbs/bootstrap) - Sleek, intuitive, and powerful front-end framework for faster and easier web development. -* [patricktalmadge/bootstrapper](https://github.com/patricktalmadge/bootstrapper) - Laravel Twitter Bootstrap Bundle -* [danielfarrell/bootstrap-combobox](https://github.com/danielfarrell/bootstrap-combobox) - A combobox plugin -* [jquery/jquery](https://github.com/jquery/jquery) - jQuery JavaScript Library -* [eternicode/bootstrap-datepicker](https://github.com/eternicode/bootstrap-datepicker) - A datepicker for @twitter bootstrap -* [jquery/jquery-ui](https://github.com/jquery/jquery-ui) - The official jQuery user interface library -* [knockout/knockout](https://github.com/knockout/knockout) - Knockout makes it easier to create rich, responsive UIs with JavaScript -* [rniemeyer/knockout-sortable](https://github.com/rniemeyer/knockout-sortable) - A Knockout.js binding to connect observableArrays with jQuery UI sortable functionality -* [MrRio/jsPDF](https://github.com/MrRio/jsPDF) - Generate PDF files in JavaScript. HTML5 FTW. -* [FortAwesome/Font-Awesome](https://github.com/FortAwesome/Font-Awesome) - The iconic font designed for Bootstrap that works with twitter bootstrap -* [jasonlewis/basset](https://github.com/jasonlewis/basset) - A better asset management package for Laravel -* [Zizaco/confide](https://github.com/Zizaco/confide) - Confide is a authentication solution for Laravel 4 -* [Anahkiasen/former](https://github.com/Anahkiasen/former) - A powerful form builder, for Laravel and other frameworks (stand-alone too) -* [barryvdh/laravel-debugbar](https://github.com/barryvdh/laravel-debugbar) - Laravel debugbar -* [DataTables/DataTables](https://github.com/DataTables/DataTables) - Tables plug-in for jQuery -* [Chumper/Datatable](https://github.com/Chumper/Datatable) - This is a laravel 4 package for the server and client side of datatables -* [omnipay/omnipay](https://github.com/omnipay/omnipay) - A framework agnostic, multi-gateway payment processing library for PHP 5.3+ -* [Intervention/image](https://github.com/Intervention/image) - PHP Image Manipulation -* [webpatser/laravel-countries](https://github.com/webpatser/laravel-countries) - Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries -* [briannesbitt/Carbon](https://github.com/briannesbitt/Carbon) - A simple API extension for DateTime with PHP 5.3+ -* [thomaspark/bootswatch](https://github.com/thomaspark/bootswatch) - Themes for Bootstrap -* [mozilla/pdf.js](https://github.com/mozilla/pdf.js) - PDF Reader in JavaScript -* [nnnick/Chart.js](https://github.com/nnnick/Chart.js) - Simple HTML5 Charts using the canvas tag -* [josscrowcroft/accounting.js](https://github.com/josscrowcroft/accounting.js) - A lightweight JavaScript library for number, money and currency formatting -* [jashkenas/underscore](https://github.com/jashkenas/underscore) - JavaScript's utility _ belt -* [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) - List of languages ​​for Laravel4 -* [calvinfroedge/PHP-Payments](https://github.com/calvinfroedge/PHP-Payments) - A uniform payments interface for PHP -* [bgrins/spectrum](https://github.com/bgrins/spectrum) - The No Hassle JavaScript Colorpicker -* [lokesh/lightbox2](https://github.com/lokesh/lightbox2/) - The original lightbox script diff --git a/_ide_helper.php b/_ide_helper.php deleted file mode 100644 index bc17f6f22034..000000000000 --- a/_ide_helper.php +++ /dev/null @@ -1,14351 +0,0 @@ - - * @see https://github.com/barryvdh/laravel-ide-helper - */ - -namespace { - exit("This file should not be included, only analyzed by your IDE"); - - class App extends \Illuminate\Support\Facades\App{ - - /** - * Bind the installation paths to the application. - * - * @param array $paths - * @return void - * @static - */ - public static function bindInstallPaths($paths){ - \Illuminate\Foundation\Application::bindInstallPaths($paths); - } - - /** - * Get the application bootstrap file. - * - * @return string - * @static - */ - public static function getBootstrapFile(){ - return \Illuminate\Foundation\Application::getBootstrapFile(); - } - - /** - * Start the exception handling for the request. - * - * @return void - * @static - */ - public static function startExceptionHandling(){ - \Illuminate\Foundation\Application::startExceptionHandling(); - } - - /** - * Get or check the current application environment. - * - * @param mixed - * @return string - * @static - */ - public static function environment(){ - return \Illuminate\Foundation\Application::environment(); - } - - /** - * Determine if application is in local environment. - * - * @return bool - * @static - */ - public static function isLocal(){ - return \Illuminate\Foundation\Application::isLocal(); - } - - /** - * Detect the application's current environment. - * - * @param array|string $envs - * @return string - * @static - */ - public static function detectEnvironment($envs){ - return \Illuminate\Foundation\Application::detectEnvironment($envs); - } - - /** - * Determine if we are running in the console. - * - * @return bool - * @static - */ - public static function runningInConsole(){ - return \Illuminate\Foundation\Application::runningInConsole(); - } - - /** - * Determine if we are running unit tests. - * - * @return bool - * @static - */ - public static function runningUnitTests(){ - return \Illuminate\Foundation\Application::runningUnitTests(); - } - - /** - * Force register a service provider with the application. - * - * @param \Illuminate\Support\ServiceProvider|string $provider - * @param array $options - * @return \Illuminate\Support\ServiceProvider - * @static - */ - public static function forgeRegister($provider, $options = array()){ - return \Illuminate\Foundation\Application::forgeRegister($provider, $options); - } - - /** - * Register a service provider with the application. - * - * @param \Illuminate\Support\ServiceProvider|string $provider - * @param array $options - * @param bool $force - * @return \Illuminate\Support\ServiceProvider - * @static - */ - public static function register($provider, $options = array(), $force = false){ - return \Illuminate\Foundation\Application::register($provider, $options, $force); - } - - /** - * Get the registered service provider instnace if it exists. - * - * @param \Illuminate\Support\ServiceProvider|string $provider - * @return \Illuminate\Support\ServiceProvider|null - * @static - */ - public static function getRegistered($provider){ - return \Illuminate\Foundation\Application::getRegistered($provider); - } - - /** - * Resolve a service provider instance from the class name. - * - * @param string $provider - * @return \Illuminate\Support\ServiceProvider - * @static - */ - public static function resolveProviderClass($provider){ - return \Illuminate\Foundation\Application::resolveProviderClass($provider); - } - - /** - * Load and boot all of the remaining deferred providers. - * - * @return void - * @static - */ - public static function loadDeferredProviders(){ - \Illuminate\Foundation\Application::loadDeferredProviders(); - } - - /** - * Register a deffered provider and service. - * - * @param string $provider - * @param string $service - * @return void - * @static - */ - public static function registerDeferredProvider($provider, $service = null){ - \Illuminate\Foundation\Application::registerDeferredProvider($provider, $service); - } - - /** - * Resolve the given type from the container. - * - * (Overriding Container::make) - * - * @param string $abstract - * @param array $parameters - * @return mixed - * @static - */ - public static function make($abstract, $parameters = array()){ - return \Illuminate\Foundation\Application::make($abstract, $parameters); - } - - /** - * Register a "before" application filter. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function before($callback){ - \Illuminate\Foundation\Application::before($callback); - } - - /** - * Register an "after" application filter. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function after($callback){ - \Illuminate\Foundation\Application::after($callback); - } - - /** - * Register a "finish" application filter. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function finish($callback){ - \Illuminate\Foundation\Application::finish($callback); - } - - /** - * Register a "shutdown" callback. - * - * @param callable $callback - * @return void - * @static - */ - public static function shutdown($callback = null){ - \Illuminate\Foundation\Application::shutdown($callback); - } - - /** - * Register a function for determining when to use array sessions. - * - * @param \Closure $callback - * @return void - * @static - */ - public static function useArraySessions($callback){ - \Illuminate\Foundation\Application::useArraySessions($callback); - } - - /** - * Determine if the application has booted. - * - * @return bool - * @static - */ - public static function isBooted(){ - return \Illuminate\Foundation\Application::isBooted(); - } - - /** - * Boot the application's service providers. - * - * @return void - * @static - */ - public static function boot(){ - \Illuminate\Foundation\Application::boot(); - } - - /** - * Register a new boot listener. - * - * @param mixed $callback - * @return void - * @static - */ - public static function booting($callback){ - \Illuminate\Foundation\Application::booting($callback); - } - - /** - * Register a new "booted" listener. - * - * @param mixed $callback - * @return void - * @static - */ - public static function booted($callback){ - \Illuminate\Foundation\Application::booted($callback); - } - - /** - * Run the application and send the response. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @return void - * @static - */ - public static function run($request = null){ - \Illuminate\Foundation\Application::run($request); - } - - /** - * Add a HttpKernel middleware onto the stack. - * - * @param string $class - * @param array $parameters - * @return \Illuminate\Foundation\Application - * @static - */ - public static function middleware($class, $parameters = array()){ - return \Illuminate\Foundation\Application::middleware($class, $parameters); - } - - /** - * Remove a custom middleware from the application. - * - * @param string $class - * @return void - * @static - */ - public static function forgetMiddleware($class){ - \Illuminate\Foundation\Application::forgetMiddleware($class); - } - - /** - * Handle the given request and get the response. - * - * Provides compatibility with BrowserKit functional testing. - * - * @implements HttpKernelInterface::handle - * @param \Symfony\Component\HttpFoundation\Request $request - * @param int $type - * @param bool $catch - * @return \Symfony\Component\HttpFoundation\Response - * @static - */ - public static function handle($request, $type = 1, $catch = true){ - return \Illuminate\Foundation\Application::handle($request, $type, $catch); - } - - /** - * Handle the given request and get the response. - * - * @param \Illuminate\Http\Request $request - * @return \Symfony\Component\HttpFoundation\Response - * @static - */ - public static function dispatch($request){ - return \Illuminate\Foundation\Application::dispatch($request); - } - - /** - * Terminate the request and send the response to the browser. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @param \Symfony\Component\HttpFoundation\Response $response - * @return void - * @static - */ - public static function terminate($request, $response){ - \Illuminate\Foundation\Application::terminate($request, $response); - } - - /** - * Call the "finish" callbacks assigned to the application. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @param \Symfony\Component\HttpFoundation\Response $response - * @return void - * @static - */ - public static function callFinishCallbacks($request, $response){ - \Illuminate\Foundation\Application::callFinishCallbacks($request, $response); - } - - /** - * Prepare the request by injecting any services. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Request - * @static - */ - public static function prepareRequest($request){ - return \Illuminate\Foundation\Application::prepareRequest($request); - } - - /** - * Prepare the given value as a Response object. - * - * @param mixed $value - * @return \Symfony\Component\HttpFoundation\Response - * @static - */ - public static function prepareResponse($value){ - return \Illuminate\Foundation\Application::prepareResponse($value); - } - - /** - * Determine if the application is ready for responses. - * - * @return bool - * @static - */ - public static function readyForResponses(){ - return \Illuminate\Foundation\Application::readyForResponses(); - } - - /** - * Determine if the application is currently down for maintenance. - * - * @return bool - * @static - */ - public static function isDownForMaintenance(){ - return \Illuminate\Foundation\Application::isDownForMaintenance(); - } - - /** - * Register a maintenance mode event listener. - * - * @param \Closure $callback - * @return void - * @static - */ - public static function down($callback){ - \Illuminate\Foundation\Application::down($callback); - } - - /** - * Throw an HttpException with the given data. - * - * @param int $code - * @param string $message - * @param array $headers - * @return void - * @throws \Symfony\Component\HttpKernel\Exception\HttpException - * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException - * @static - */ - public static function abort($code, $message = '', $headers = array()){ - \Illuminate\Foundation\Application::abort($code, $message, $headers); - } - - /** - * Register a 404 error handler. - * - * @param \Closure $callback - * @return void - * @static - */ - public static function missing($callback){ - \Illuminate\Foundation\Application::missing($callback); - } - - /** - * Register an application error handler. - * - * @param \Closure $callback - * @return void - * @static - */ - public static function error($callback){ - \Illuminate\Foundation\Application::error($callback); - } - - /** - * Register an error handler at the bottom of the stack. - * - * @param \Closure $callback - * @return void - * @static - */ - public static function pushError($callback){ - \Illuminate\Foundation\Application::pushError($callback); - } - - /** - * Register an error handler for fatal errors. - * - * @param \Closure $callback - * @return void - * @static - */ - public static function fatal($callback){ - \Illuminate\Foundation\Application::fatal($callback); - } - - /** - * Get the configuration loader instance. - * - * @return \Illuminate\Config\LoaderInterface - * @static - */ - public static function getConfigLoader(){ - return \Illuminate\Foundation\Application::getConfigLoader(); - } - - /** - * Get the environment variables loader instance. - * - * @return \Illuminate\Config\EnvironmentVariablesLoaderInterface - * @static - */ - public static function getEnvironmentVariablesLoader(){ - return \Illuminate\Foundation\Application::getEnvironmentVariablesLoader(); - } - - /** - * Get the service provider repository instance. - * - * @return \Illuminate\Foundation\ProviderRepository - * @static - */ - public static function getProviderRepository(){ - return \Illuminate\Foundation\Application::getProviderRepository(); - } - - /** - * Get the service providers that have been loaded. - * - * @return array - * @static - */ - public static function getLoadedProviders(){ - return \Illuminate\Foundation\Application::getLoadedProviders(); - } - - /** - * Set the application's deferred services. - * - * @param array $services - * @return void - * @static - */ - public static function setDeferredServices($services){ - \Illuminate\Foundation\Application::setDeferredServices($services); - } - - /** - * Determine if the given service is a deferred service. - * - * @param string $service - * @return bool - * @static - */ - public static function isDeferredService($service){ - return \Illuminate\Foundation\Application::isDeferredService($service); - } - - /** - * Get or set the request class for the application. - * - * @param string $class - * @return string - * @static - */ - public static function requestClass($class = null){ - return \Illuminate\Foundation\Application::requestClass($class); - } - - /** - * Set the application request for the console environment. - * - * @return void - * @static - */ - public static function setRequestForConsoleEnvironment(){ - \Illuminate\Foundation\Application::setRequestForConsoleEnvironment(); - } - - /** - * Call a method on the default request class. - * - * @param string $method - * @param array $parameters - * @return mixed - * @static - */ - public static function onRequest($method, $parameters = array()){ - return \Illuminate\Foundation\Application::onRequest($method, $parameters); - } - - /** - * Get the current application locale. - * - * @return string - * @static - */ - public static function getLocale(){ - return \Illuminate\Foundation\Application::getLocale(); - } - - /** - * Set the current application locale. - * - * @param string $locale - * @return void - * @static - */ - public static function setLocale($locale){ - \Illuminate\Foundation\Application::setLocale($locale); - } - - /** - * Register the core class aliases in the container. - * - * @return void - * @static - */ - public static function registerCoreContainerAliases(){ - \Illuminate\Foundation\Application::registerCoreContainerAliases(); - } - - /** - * Determine if the given abstract type has been bound. - * - * @param string $abstract - * @return bool - * @static - */ - public static function bound($abstract){ - //Method inherited from \Illuminate\Container\Container - return \Illuminate\Foundation\Application::bound($abstract); - } - - /** - * Determine if a given string is an alias. - * - * @param string $name - * @return bool - * @static - */ - public static function isAlias($name){ - //Method inherited from \Illuminate\Container\Container - return \Illuminate\Foundation\Application::isAlias($name); - } - - /** - * Register a binding with the container. - * - * @param string $abstract - * @param \Closure|string|null $concrete - * @param bool $shared - * @return void - * @static - */ - public static function bind($abstract, $concrete = null, $shared = false){ - //Method inherited from \Illuminate\Container\Container - \Illuminate\Foundation\Application::bind($abstract, $concrete, $shared); - } - - /** - * Register a binding if it hasn't already been registered. - * - * @param string $abstract - * @param \Closure|string|null $concrete - * @param bool $shared - * @return bool - * @static - */ - public static function bindIf($abstract, $concrete = null, $shared = false){ - //Method inherited from \Illuminate\Container\Container - return \Illuminate\Foundation\Application::bindIf($abstract, $concrete, $shared); - } - - /** - * Register a shared binding in the container. - * - * @param string $abstract - * @param \Closure|string|null $concrete - * @return void - * @static - */ - public static function singleton($abstract, $concrete = null){ - //Method inherited from \Illuminate\Container\Container - \Illuminate\Foundation\Application::singleton($abstract, $concrete); - } - - /** - * Wrap a Closure such that it is shared. - * - * @param \Closure $closure - * @return \Illuminate\Container\Closure - * @static - */ - public static function share($closure){ - //Method inherited from \Illuminate\Container\Container - return \Illuminate\Foundation\Application::share($closure); - } - - /** - * Bind a shared Closure into the container. - * - * @param string $abstract - * @param \Closure $closure - * @return void - * @static - */ - public static function bindShared($abstract, $closure){ - //Method inherited from \Illuminate\Container\Container - \Illuminate\Foundation\Application::bindShared($abstract, $closure); - } - - /** - * "Extend" an abstract type in the container. - * - * @param string $abstract - * @param \Closure $closure - * @return void - * @throws \InvalidArgumentException - * @static - */ - public static function extend($abstract, $closure){ - //Method inherited from \Illuminate\Container\Container - \Illuminate\Foundation\Application::extend($abstract, $closure); - } - - /** - * Register an existing instance as shared in the container. - * - * @param string $abstract - * @param mixed $instance - * @return void - * @static - */ - public static function instance($abstract, $instance){ - //Method inherited from \Illuminate\Container\Container - \Illuminate\Foundation\Application::instance($abstract, $instance); - } - - /** - * Alias a type to a shorter name. - * - * @param string $abstract - * @param string $alias - * @return void - * @static - */ - public static function alias($abstract, $alias){ - //Method inherited from \Illuminate\Container\Container - \Illuminate\Foundation\Application::alias($abstract, $alias); - } - - /** - * Bind a new callback to an abstract's rebind event. - * - * @param string $abstract - * @param \Closure $callback - * @return mixed - * @static - */ - public static function rebinding($abstract, $callback){ - //Method inherited from \Illuminate\Container\Container - return \Illuminate\Foundation\Application::rebinding($abstract, $callback); - } - - /** - * Refresh an instance on the given target and method. - * - * @param string $abstract - * @param mixed $target - * @param string $method - * @return mixed - * @static - */ - public static function refresh($abstract, $target, $method){ - //Method inherited from \Illuminate\Container\Container - return \Illuminate\Foundation\Application::refresh($abstract, $target, $method); - } - - /** - * Instantiate a concrete instance of the given type. - * - * @param string $concrete - * @param array $parameters - * @return mixed - * @throws BindingResolutionException - * @static - */ - public static function build($concrete, $parameters = array()){ - //Method inherited from \Illuminate\Container\Container - return \Illuminate\Foundation\Application::build($concrete, $parameters); - } - - /** - * Register a new resolving callback. - * - * @param string $abstract - * @param \Closure $callback - * @return void - * @static - */ - public static function resolving($abstract, $callback){ - //Method inherited from \Illuminate\Container\Container - \Illuminate\Foundation\Application::resolving($abstract, $callback); - } - - /** - * Register a new resolving callback for all types. - * - * @param \Closure $callback - * @return void - * @static - */ - public static function resolvingAny($callback){ - //Method inherited from \Illuminate\Container\Container - \Illuminate\Foundation\Application::resolvingAny($callback); - } - - /** - * Determine if a given type is shared. - * - * @param string $abstract - * @return bool - * @static - */ - public static function isShared($abstract){ - //Method inherited from \Illuminate\Container\Container - return \Illuminate\Foundation\Application::isShared($abstract); - } - - /** - * Get the container's bindings. - * - * @return array - * @static - */ - public static function getBindings(){ - //Method inherited from \Illuminate\Container\Container - return \Illuminate\Foundation\Application::getBindings(); - } - - /** - * Remove a resolved instance from the instance cache. - * - * @param string $abstract - * @return void - * @static - */ - public static function forgetInstance($abstract){ - //Method inherited from \Illuminate\Container\Container - \Illuminate\Foundation\Application::forgetInstance($abstract); - } - - /** - * Clear all of the instances from the container. - * - * @return void - * @static - */ - public static function forgetInstances(){ - //Method inherited from \Illuminate\Container\Container - \Illuminate\Foundation\Application::forgetInstances(); - } - - /** - * Determine if a given offset exists. - * - * @param string $key - * @return bool - * @static - */ - public static function offsetExists($key){ - //Method inherited from \Illuminate\Container\Container - return \Illuminate\Foundation\Application::offsetExists($key); - } - - /** - * Get the value at a given offset. - * - * @param string $key - * @return mixed - * @static - */ - public static function offsetGet($key){ - //Method inherited from \Illuminate\Container\Container - return \Illuminate\Foundation\Application::offsetGet($key); - } - - /** - * Set the value at a given offset. - * - * @param string $key - * @param mixed $value - * @return void - * @static - */ - public static function offsetSet($key, $value){ - //Method inherited from \Illuminate\Container\Container - \Illuminate\Foundation\Application::offsetSet($key, $value); - } - - /** - * Unset the value at a given offset. - * - * @param string $key - * @return void - * @static - */ - public static function offsetUnset($key){ - //Method inherited from \Illuminate\Container\Container - \Illuminate\Foundation\Application::offsetUnset($key); - } - - } - - - class Artisan extends \Illuminate\Support\Facades\Artisan{ - - /** - * Create and boot a new Console application. - * - * @param \Illuminate\Foundation\Application $app - * @return \Illuminate\Console\Application - * @static - */ - public static function start($app){ - return \Illuminate\Console\Application::start($app); - } - - /** - * Create a new Console application. - * - * @param \Illuminate\Foundation\Application $app - * @return \Illuminate\Console\Application - * @static - */ - public static function make($app){ - return \Illuminate\Console\Application::make($app); - } - - /** - * Boot the Console application. - * - * @return \Illuminate\Console\Application - * @static - */ - public static function boot(){ - return \Illuminate\Console\Application::boot(); - } - - /** - * Run an Artisan console command by name. - * - * @param string $command - * @param array $parameters - * @param \Symfony\Component\Console\Output\OutputInterface $output - * @return void - * @static - */ - public static function call($command, $parameters = array(), $output = null){ - \Illuminate\Console\Application::call($command, $parameters, $output); - } - - /** - * Add a command to the console. - * - * @param \Symfony\Component\Console\Command\Command $command - * @return \Symfony\Component\Console\Command\Command - * @static - */ - public static function add($command){ - return \Illuminate\Console\Application::add($command); - } - - /** - * Add a command, resolving through the application. - * - * @param string $command - * @return \Symfony\Component\Console\Command\Command - * @static - */ - public static function resolve($command){ - return \Illuminate\Console\Application::resolve($command); - } - - /** - * Resolve an array of commands through the application. - * - * @param array|mixed $commands - * @return void - * @static - */ - public static function resolveCommands($commands){ - \Illuminate\Console\Application::resolveCommands($commands); - } - - /** - * Render the given exception. - * - * @param \Exception $e - * @param \Symfony\Component\Console\Output\OutputInterface $output - * @return void - * @static - */ - public static function renderException($e, $output){ - \Illuminate\Console\Application::renderException($e, $output); - } - - /** - * Set the exception handler instance. - * - * @param \Illuminate\Exception\Handler $handler - * @return \Illuminate\Console\Application - * @static - */ - public static function setExceptionHandler($handler){ - return \Illuminate\Console\Application::setExceptionHandler($handler); - } - - /** - * Set the Laravel application instance. - * - * @param \Illuminate\Foundation\Application $laravel - * @return \Illuminate\Console\Application - * @static - */ - public static function setLaravel($laravel){ - return \Illuminate\Console\Application::setLaravel($laravel); - } - - /** - * Set whether the Console app should auto-exit when done. - * - * @param bool $boolean - * @return \Illuminate\Console\Application - * @static - */ - public static function setAutoExit($boolean){ - return \Illuminate\Console\Application::setAutoExit($boolean); - } - - /** - * - * - * @static - */ - public static function setDispatcher($dispatcher){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::setDispatcher($dispatcher); - } - - /** - * Runs the current application. - * - * @param \Symfony\Component\Console\InputInterface $input An Input instance - * @param \Symfony\Component\Console\OutputInterface $output An Output instance - * @return int 0 if everything went fine, or an error code - * @throws \Exception When doRun returns Exception - * @api - * @static - */ - public static function run($input = null, $output = null){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::run($input, $output); - } - - /** - * Runs the current application. - * - * @param \Symfony\Component\Console\InputInterface $input An Input instance - * @param \Symfony\Component\Console\OutputInterface $output An Output instance - * @return int 0 if everything went fine, or an error code - * @static - */ - public static function doRun($input, $output){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::doRun($input, $output); - } - - /** - * Set a helper set to be used with the command. - * - * @param \Symfony\Component\Console\HelperSet $helperSet The helper set - * @api - * @static - */ - public static function setHelperSet($helperSet){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::setHelperSet($helperSet); - } - - /** - * Get the helper set associated with the command. - * - * @return \Symfony\Component\Console\HelperSet The HelperSet instance associated with this command - * @api - * @static - */ - public static function getHelperSet(){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::getHelperSet(); - } - - /** - * Set an input definition set to be used with this application - * - * @param \Symfony\Component\Console\InputDefinition $definition The input definition - * @api - * @static - */ - public static function setDefinition($definition){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::setDefinition($definition); - } - - /** - * Gets the InputDefinition related to this Application. - * - * @return \Symfony\Component\Console\InputDefinition The InputDefinition instance - * @static - */ - public static function getDefinition(){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::getDefinition(); - } - - /** - * Gets the help message. - * - * @return string A help message. - * @static - */ - public static function getHelp(){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::getHelp(); - } - - /** - * Sets whether to catch exceptions or not during commands execution. - * - * @param bool $boolean Whether to catch exceptions or not during commands execution - * @api - * @static - */ - public static function setCatchExceptions($boolean){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::setCatchExceptions($boolean); - } - - /** - * Gets the name of the application. - * - * @return string The application name - * @api - * @static - */ - public static function getName(){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::getName(); - } - - /** - * Sets the application name. - * - * @param string $name The application name - * @api - * @static - */ - public static function setName($name){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::setName($name); - } - - /** - * Gets the application version. - * - * @return string The application version - * @api - * @static - */ - public static function getVersion(){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::getVersion(); - } - - /** - * Sets the application version. - * - * @param string $version The application version - * @api - * @static - */ - public static function setVersion($version){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::setVersion($version); - } - - /** - * Returns the long version of the application. - * - * @return string The long application version - * @api - * @static - */ - public static function getLongVersion(){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::getLongVersion(); - } - - /** - * Registers a new command. - * - * @param string $name The command name - * @return \Symfony\Component\Console\Command The newly created command - * @api - * @static - */ - public static function register($name){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::register($name); - } - - /** - * Adds an array of command objects. - * - * @param \Symfony\Component\Console\Command[] $commands An array of commands - * @api - * @static - */ - public static function addCommands($commands){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::addCommands($commands); - } - - /** - * Returns a registered command by name or alias. - * - * @param string $name The command name or alias - * @return \Symfony\Component\Console\Command A Command object - * @throws \InvalidArgumentException When command name given does not exist - * @api - * @static - */ - public static function get($name){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::get($name); - } - - /** - * Returns true if the command exists, false otherwise. - * - * @param string $name The command name or alias - * @return bool true if the command exists, false otherwise - * @api - * @static - */ - public static function has($name){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::has($name); - } - - /** - * Returns an array of all unique namespaces used by currently registered commands. - * - * It does not returns the global namespace which always exists. - * - * @return array An array of namespaces - * @static - */ - public static function getNamespaces(){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::getNamespaces(); - } - - /** - * Finds a registered namespace by a name or an abbreviation. - * - * @param string $namespace A namespace or abbreviation to search for - * @return string A registered namespace - * @throws \InvalidArgumentException When namespace is incorrect or ambiguous - * @static - */ - public static function findNamespace($namespace){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::findNamespace($namespace); - } - - /** - * Finds a command by name or alias. - * - * Contrary to get, this command tries to find the best - * match if you give it an abbreviation of a name or alias. - * - * @param string $name A command name or a command alias - * @return \Symfony\Component\Console\Command A Command instance - * @throws \InvalidArgumentException When command name is incorrect or ambiguous - * @api - * @static - */ - public static function find($name){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::find($name); - } - - /** - * Gets the commands (registered in the given namespace if provided). - * - * The array keys are the full names and the values the command instances. - * - * @param string $namespace A namespace name - * @return \Symfony\Component\Console\Command[] An array of Command instances - * @api - * @static - */ - public static function all($namespace = null){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::all($namespace); - } - - /** - * Returns an array of possible abbreviations given a set of names. - * - * @param array $names An array of names - * @return array An array of abbreviations - * @static - */ - public static function getAbbreviations($names){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::getAbbreviations($names); - } - - /** - * Returns a text representation of the Application. - * - * @param string $namespace An optional namespace name - * @param bool $raw Whether to return raw command list - * @return string A string representing the Application - * @deprecated Deprecated since version 2.3, to be removed in 3.0. - * @static - */ - public static function asText($namespace = null, $raw = false){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::asText($namespace, $raw); - } - - /** - * Returns an XML representation of the Application. - * - * @param string $namespace An optional namespace name - * @param bool $asDom Whether to return a DOM or an XML string - * @return string|\DOMDocument An XML string representing the Application - * @deprecated Deprecated since version 2.3, to be removed in 3.0. - * @static - */ - public static function asXml($namespace = null, $asDom = false){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::asXml($namespace, $asDom); - } - - /** - * Tries to figure out the terminal dimensions based on the current environment - * - * @return array Array containing width and height - * @static - */ - public static function getTerminalDimensions(){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::getTerminalDimensions(); - } - - /** - * Sets terminal dimensions. - * - * Can be useful to force terminal dimensions for functional tests. - * - * @param int $width The width - * @param int $height The height - * @return \Symfony\Component\Console\Application The current application - * @static - */ - public static function setTerminalDimensions($width, $height){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::setTerminalDimensions($width, $height); - } - - /** - * Returns the namespace part of the command name. - * - * This method is not part of public API and should not be used directly. - * - * @param string $name The full name of the command - * @param string $limit The maximum number of parts of the namespace - * @return string The namespace of the command - * @static - */ - public static function extractNamespace($name, $limit = null){ - //Method inherited from \Symfony\Component\Console\Application - return \Illuminate\Console\Application::extractNamespace($name, $limit); - } - - } - - - class Auth extends \Illuminate\Support\Facades\Auth{ - - /** - * Create an instance of the database driver. - * - * @return \Illuminate\Auth\Guard - * @static - */ - public static function createDatabaseDriver(){ - return \Illuminate\Auth\AuthManager::createDatabaseDriver(); - } - - /** - * Create an instance of the Eloquent driver. - * - * @return \Illuminate\Auth\Guard - * @static - */ - public static function createEloquentDriver(){ - return \Illuminate\Auth\AuthManager::createEloquentDriver(); - } - - /** - * Get the default authentication driver name. - * - * @return string - * @static - */ - public static function getDefaultDriver(){ - return \Illuminate\Auth\AuthManager::getDefaultDriver(); - } - - /** - * Set the default authentication driver name. - * - * @param string $name - * @return void - * @static - */ - public static function setDefaultDriver($name){ - \Illuminate\Auth\AuthManager::setDefaultDriver($name); - } - - /** - * Get a driver instance. - * - * @param string $driver - * @return mixed - * @static - */ - public static function driver($driver = null){ - //Method inherited from \Illuminate\Support\Manager - return \Illuminate\Auth\AuthManager::driver($driver); - } - - /** - * Register a custom driver creator Closure. - * - * @param string $driver - * @param \Closure $callback - * @return \Illuminate\Support\Manager|static - * @static - */ - public static function extend($driver, $callback){ - //Method inherited from \Illuminate\Support\Manager - return \Illuminate\Auth\AuthManager::extend($driver, $callback); - } - - /** - * Get all of the created "drivers". - * - * @return array - * @static - */ - public static function getDrivers(){ - //Method inherited from \Illuminate\Support\Manager - return \Illuminate\Auth\AuthManager::getDrivers(); - } - - /** - * Determine if the current user is authenticated. - * - * @return bool - * @static - */ - public static function check(){ - return \Illuminate\Auth\Guard::check(); - } - - /** - * Determine if the current user is a guest. - * - * @return bool - * @static - */ - public static function guest(){ - return \Illuminate\Auth\Guard::guest(); - } - - /** - * Get the currently authenticated user. - * - * @return \User|null - * @static - */ - public static function user(){ - return \Illuminate\Auth\Guard::user(); - } - - /** - * Log a user into the application without sessions or cookies. - * - * @param array $credentials - * @return bool - * @static - */ - public static function once($credentials = array()){ - return \Illuminate\Auth\Guard::once($credentials); - } - - /** - * Validate a user's credentials. - * - * @param array $credentials - * @return bool - * @static - */ - public static function validate($credentials = array()){ - return \Illuminate\Auth\Guard::validate($credentials); - } - - /** - * Attempt to authenticate using HTTP Basic Auth. - * - * @param string $field - * @param \Symfony\Component\HttpFoundation\Request $request - * @return \Symfony\Component\HttpFoundation\Response|null - * @static - */ - public static function basic($field = 'email', $request = null){ - return \Illuminate\Auth\Guard::basic($field, $request); - } - - /** - * Perform a stateless HTTP Basic login attempt. - * - * @param string $field - * @param \Symfony\Component\HttpFoundation\Request $request - * @return \Symfony\Component\HttpFoundation\Response|null - * @static - */ - public static function onceBasic($field = 'email', $request = null){ - return \Illuminate\Auth\Guard::onceBasic($field, $request); - } - - /** - * Attempt to authenticate a user using the given credentials. - * - * @param array $credentials - * @param bool $remember - * @param bool $login - * @return bool - * @static - */ - public static function attempt($credentials = array(), $remember = false, $login = true){ - return \Illuminate\Auth\Guard::attempt($credentials, $remember, $login); - } - - /** - * Register an authentication attempt event listener. - * - * @param mixed $callback - * @return void - * @static - */ - public static function attempting($callback){ - \Illuminate\Auth\Guard::attempting($callback); - } - - /** - * Log a user into the application. - * - * @param \Illuminate\Auth\UserInterface $user - * @param bool $remember - * @return void - * @static - */ - public static function login($user, $remember = false){ - \Illuminate\Auth\Guard::login($user, $remember); - } - - /** - * Log the given user ID into the application. - * - * @param mixed $id - * @param bool $remember - * @return \User - * @static - */ - public static function loginUsingId($id, $remember = false){ - return \Illuminate\Auth\Guard::loginUsingId($id, $remember); - } - - /** - * Log the given user ID into the application without sessions or cookies. - * - * @param mixed $id - * @return bool - * @static - */ - public static function onceUsingId($id){ - return \Illuminate\Auth\Guard::onceUsingId($id); - } - - /** - * Log the user out of the application. - * - * @return void - * @static - */ - public static function logout(){ - \Illuminate\Auth\Guard::logout(); - } - - /** - * Get the cookie creator instance used by the guard. - * - * @return \Illuminate\Cookie\CookieJar - * @throws \RuntimeException - * @static - */ - public static function getCookieJar(){ - return \Illuminate\Auth\Guard::getCookieJar(); - } - - /** - * Set the cookie creator instance used by the guard. - * - * @param \Illuminate\Cookie\CookieJar $cookie - * @return void - * @static - */ - public static function setCookieJar($cookie){ - \Illuminate\Auth\Guard::setCookieJar($cookie); - } - - /** - * Get the event dispatcher instance. - * - * @return \Illuminate\Events\Dispatcher - * @static - */ - public static function getDispatcher(){ - return \Illuminate\Auth\Guard::getDispatcher(); - } - - /** - * Set the event dispatcher instance. - * - * @param \Illuminate\Events\Dispatcher - * @static - */ - public static function setDispatcher($events){ - return \Illuminate\Auth\Guard::setDispatcher($events); - } - - /** - * Get the session store used by the guard. - * - * @return \Illuminate\Session\Store - * @static - */ - public static function getSession(){ - return \Illuminate\Auth\Guard::getSession(); - } - - /** - * Get the user provider used by the guard. - * - * @return \Illuminate\Auth\Guard - * @static - */ - public static function getProvider(){ - return \Illuminate\Auth\Guard::getProvider(); - } - - /** - * Set the user provider used by the guard. - * - * @param \Illuminate\Auth\UserProviderInterface $provider - * @return void - * @static - */ - public static function setProvider($provider){ - \Illuminate\Auth\Guard::setProvider($provider); - } - - /** - * Return the currently cached user of the application. - * - * @return \User|null - * @static - */ - public static function getUser(){ - return \Illuminate\Auth\Guard::getUser(); - } - - /** - * Set the current user of the application. - * - * @param \Illuminate\Auth\UserInterface $user - * @return void - * @static - */ - public static function setUser($user){ - \Illuminate\Auth\Guard::setUser($user); - } - - /** - * Get the current request instance. - * - * @return \Symfony\Component\HttpFoundation\Request - * @static - */ - public static function getRequest(){ - return \Illuminate\Auth\Guard::getRequest(); - } - - /** - * Set the current request instance. - * - * @param \Symfony\Component\HttpFoundation\Request - * @return \Illuminate\Auth\Guard - * @static - */ - public static function setRequest($request){ - return \Illuminate\Auth\Guard::setRequest($request); - } - - /** - * Get the last user we attempted to authenticate. - * - * @return \User - * @static - */ - public static function getLastAttempted(){ - return \Illuminate\Auth\Guard::getLastAttempted(); - } - - /** - * Get a unique identifier for the auth session value. - * - * @return string - * @static - */ - public static function getName(){ - return \Illuminate\Auth\Guard::getName(); - } - - /** - * Get the name of the cookie used to store the "recaller". - * - * @return string - * @static - */ - public static function getRecallerName(){ - return \Illuminate\Auth\Guard::getRecallerName(); - } - - /** - * Determine if the user was authenticated via "remember me" cookie. - * - * @return bool - * @static - */ - public static function viaRemember(){ - return \Illuminate\Auth\Guard::viaRemember(); - } - - } - - - class Blade extends \Illuminate\Support\Facades\Blade{ - - /** - * Compile the view at the given path. - * - * @param string $path - * @return void - * @static - */ - public static function compile($path = null){ - \Illuminate\View\Compilers\BladeCompiler::compile($path); - } - - /** - * Get the path currently being compiled. - * - * @return string - * @static - */ - public static function getPath(){ - return \Illuminate\View\Compilers\BladeCompiler::getPath(); - } - - /** - * Set the path currently being compiled. - * - * @param string $path - * @return void - * @static - */ - public static function setPath($path){ - \Illuminate\View\Compilers\BladeCompiler::setPath($path); - } - - /** - * Compile the given Blade template contents. - * - * @param string $value - * @return string - * @static - */ - public static function compileString($value){ - return \Illuminate\View\Compilers\BladeCompiler::compileString($value); - } - - /** - * Register a custom Blade compiler. - * - * @param \Closure $compiler - * @return void - * @static - */ - public static function extend($compiler){ - \Illuminate\View\Compilers\BladeCompiler::extend($compiler); - } - - /** - * Compile the default values for the echo statement. - * - * @param string $value - * @return string - * @static - */ - public static function compileEchoDefaults($value){ - return \Illuminate\View\Compilers\BladeCompiler::compileEchoDefaults($value); - } - - /** - * Get the regular expression for a generic Blade function. - * - * @param string $function - * @return string - * @static - */ - public static function createMatcher($function){ - return \Illuminate\View\Compilers\BladeCompiler::createMatcher($function); - } - - /** - * Get the regular expression for a generic Blade function. - * - * @param string $function - * @return string - * @static - */ - public static function createOpenMatcher($function){ - return \Illuminate\View\Compilers\BladeCompiler::createOpenMatcher($function); - } - - /** - * Create a plain Blade matcher. - * - * @param string $function - * @return string - * @static - */ - public static function createPlainMatcher($function){ - return \Illuminate\View\Compilers\BladeCompiler::createPlainMatcher($function); - } - - /** - * Sets the content tags used for the compiler. - * - * @param string $openTag - * @param string $closeTag - * @param bool $escaped - * @return void - * @static - */ - public static function setContentTags($openTag, $closeTag, $escaped = false){ - \Illuminate\View\Compilers\BladeCompiler::setContentTags($openTag, $closeTag, $escaped); - } - - /** - * Sets the escaped content tags used for the compiler. - * - * @param string $openTag - * @param string $closeTag - * @return void - * @static - */ - public static function setEscapedContentTags($openTag, $closeTag){ - \Illuminate\View\Compilers\BladeCompiler::setEscapedContentTags($openTag, $closeTag); - } - - /** - * Gets the content tags used for the compiler. - * - * @return string - * @static - */ - public static function getContentTags(){ - return \Illuminate\View\Compilers\BladeCompiler::getContentTags(); - } - - /** - * Gets the escaped content tags used for the compiler. - * - * @return string - * @static - */ - public static function getEscapedContentTags(){ - return \Illuminate\View\Compilers\BladeCompiler::getEscapedContentTags(); - } - - /** - * Get the path to the compiled version of a view. - * - * @param string $path - * @return string - * @static - */ - public static function getCompiledPath($path){ - //Method inherited from \Illuminate\View\Compilers\Compiler - return \Illuminate\View\Compilers\BladeCompiler::getCompiledPath($path); - } - - /** - * Determine if the view at the given path is expired. - * - * @param string $path - * @return bool - * @static - */ - public static function isExpired($path){ - //Method inherited from \Illuminate\View\Compilers\Compiler - return \Illuminate\View\Compilers\BladeCompiler::isExpired($path); - } - - } - - - class Cache extends \Illuminate\Support\Facades\Cache{ - - /** - * Get the cache "prefix" value. - * - * @return string - * @static - */ - public static function getPrefix(){ - return \Illuminate\Cache\CacheManager::getPrefix(); - } - - /** - * Set the cache "prefix" value. - * - * @param string $name - * @return void - * @static - */ - public static function setPrefix($name){ - \Illuminate\Cache\CacheManager::setPrefix($name); - } - - /** - * Get the default cache driver name. - * - * @return string - * @static - */ - public static function getDefaultDriver(){ - return \Illuminate\Cache\CacheManager::getDefaultDriver(); - } - - /** - * Set the default cache driver name. - * - * @param string $name - * @return void - * @static - */ - public static function setDefaultDriver($name){ - \Illuminate\Cache\CacheManager::setDefaultDriver($name); - } - - /** - * Get a driver instance. - * - * @param string $driver - * @return mixed - * @static - */ - public static function driver($driver = null){ - //Method inherited from \Illuminate\Support\Manager - return \Illuminate\Cache\CacheManager::driver($driver); - } - - /** - * Register a custom driver creator Closure. - * - * @param string $driver - * @param \Closure $callback - * @return \Illuminate\Support\Manager|static - * @static - */ - public static function extend($driver, $callback){ - //Method inherited from \Illuminate\Support\Manager - return \Illuminate\Cache\CacheManager::extend($driver, $callback); - } - - /** - * Get all of the created "drivers". - * - * @return array - * @static - */ - public static function getDrivers(){ - //Method inherited from \Illuminate\Support\Manager - return \Illuminate\Cache\CacheManager::getDrivers(); - } - - /** - * Determine if an item exists in the cache. - * - * @param string $key - * @return bool - * @static - */ - public static function has($key){ - return \Illuminate\Cache\Repository::has($key); - } - - /** - * Retrieve an item from the cache by key. - * - * @param string $key - * @param mixed $default - * @return mixed - * @static - */ - public static function get($key, $default = null){ - return \Illuminate\Cache\Repository::get($key, $default); - } - - /** - * Store an item in the cache. - * - * @param string $key - * @param mixed $value - * @param \DateTime|int $minutes - * @return void - * @static - */ - public static function put($key, $value, $minutes){ - \Illuminate\Cache\Repository::put($key, $value, $minutes); - } - - /** - * Store an item in the cache if the key does not exist. - * - * @param string $key - * @param mixed $value - * @param \DateTime|int $minutes - * @return bool - * @static - */ - public static function add($key, $value, $minutes){ - return \Illuminate\Cache\Repository::add($key, $value, $minutes); - } - - /** - * Get an item from the cache, or store the default value. - * - * @param string $key - * @param \DateTime|int $minutes - * @param \Closure $callback - * @return mixed - * @static - */ - public static function remember($key, $minutes, $callback){ - return \Illuminate\Cache\Repository::remember($key, $minutes, $callback); - } - - /** - * Get an item from the cache, or store the default value forever. - * - * @param string $key - * @param \Closure $callback - * @return mixed - * @static - */ - public static function sear($key, $callback){ - return \Illuminate\Cache\Repository::sear($key, $callback); - } - - /** - * Get an item from the cache, or store the default value forever. - * - * @param string $key - * @param \Closure $callback - * @return mixed - * @static - */ - public static function rememberForever($key, $callback){ - return \Illuminate\Cache\Repository::rememberForever($key, $callback); - } - - /** - * Get the default cache time. - * - * @return int - * @static - */ - public static function getDefaultCacheTime(){ - return \Illuminate\Cache\Repository::getDefaultCacheTime(); - } - - /** - * Set the default cache time in minutes. - * - * @param int $minutes - * @return void - * @static - */ - public static function setDefaultCacheTime($minutes){ - \Illuminate\Cache\Repository::setDefaultCacheTime($minutes); - } - - /** - * Get the cache store implementation. - * - * @return \Illuminate\Cache\FileStore - * @static - */ - public static function getStore(){ - return \Illuminate\Cache\Repository::getStore(); - } - - /** - * Determine if a cached value exists. - * - * @param string $key - * @return bool - * @static - */ - public static function offsetExists($key){ - return \Illuminate\Cache\Repository::offsetExists($key); - } - - /** - * Retrieve an item from the cache by key. - * - * @param string $key - * @return mixed - * @static - */ - public static function offsetGet($key){ - return \Illuminate\Cache\Repository::offsetGet($key); - } - - /** - * Store an item in the cache for the default time. - * - * @param string $key - * @param mixed $value - * @return void - * @static - */ - public static function offsetSet($key, $value){ - \Illuminate\Cache\Repository::offsetSet($key, $value); - } - - /** - * Remove an item from the cache. - * - * @param string $key - * @return void - * @static - */ - public static function offsetUnset($key){ - \Illuminate\Cache\Repository::offsetUnset($key); - } - - /** - * Register a macro with the Cache class. - * - * @param string $name - * @param callable $callback - * @return void - * @static - */ - public static function macro($name, $callback){ - \Illuminate\Cache\Repository::macro($name, $callback); - } - - /** - * Increment the value of an item in the cache. - * - * @param string $key - * @param mixed $value - * @return void - * @throws \LogicException - * @static - */ - public static function increment($key, $value = 1){ - \Illuminate\Cache\FileStore::increment($key, $value); - } - - /** - * Decrement the value of an item in the cache. - * - * @param string $key - * @param mixed $value - * @return void - * @throws \LogicException - * @static - */ - public static function decrement($key, $value = 1){ - \Illuminate\Cache\FileStore::decrement($key, $value); - } - - /** - * Store an item in the cache indefinitely. - * - * @param string $key - * @param mixed $value - * @return void - * @static - */ - public static function forever($key, $value){ - \Illuminate\Cache\FileStore::forever($key, $value); - } - - /** - * Remove an item from the cache. - * - * @param string $key - * @return void - * @static - */ - public static function forget($key){ - \Illuminate\Cache\FileStore::forget($key); - } - - /** - * Remove all items from the cache. - * - * @return void - * @static - */ - public static function flush(){ - \Illuminate\Cache\FileStore::flush(); - } - - /** - * Get the Filesystem instance. - * - * @return \Illuminate\Filesystem\Filesystem - * @static - */ - public static function getFilesystem(){ - return \Illuminate\Cache\FileStore::getFilesystem(); - } - - /** - * Get the working directory of the cache. - * - * @return string - * @static - */ - public static function getDirectory(){ - return \Illuminate\Cache\FileStore::getDirectory(); - } - - } - - - class ClassLoader extends \Illuminate\Support\ClassLoader{ - - } - - - class Config extends \Illuminate\Support\Facades\Config{ - - /** - * Determine if the given configuration value exists. - * - * @param string $key - * @return bool - * @static - */ - public static function has($key){ - return \Illuminate\Config\Repository::has($key); - } - - /** - * Determine if a configuration group exists. - * - * @param string $key - * @return bool - * @static - */ - public static function hasGroup($key){ - return \Illuminate\Config\Repository::hasGroup($key); - } - - /** - * Get the specified configuration value. - * - * @param string $key - * @param mixed $default - * @return mixed - * @static - */ - public static function get($key, $default = null){ - return \Illuminate\Config\Repository::get($key, $default); - } - - /** - * Set a given configuration value. - * - * @param string $key - * @param mixed $value - * @return void - * @static - */ - public static function set($key, $value){ - \Illuminate\Config\Repository::set($key, $value); - } - - /** - * Register a package for cascading configuration. - * - * @param string $package - * @param string $hint - * @param string $namespace - * @return void - * @static - */ - public static function package($package, $hint, $namespace = null){ - \Illuminate\Config\Repository::package($package, $hint, $namespace); - } - - /** - * Register an after load callback for a given namespace. - * - * @param string $namespace - * @param \Closure $callback - * @return void - * @static - */ - public static function afterLoading($namespace, $callback){ - \Illuminate\Config\Repository::afterLoading($namespace, $callback); - } - - /** - * Add a new namespace to the loader. - * - * @param string $namespace - * @param string $hint - * @return void - * @static - */ - public static function addNamespace($namespace, $hint){ - \Illuminate\Config\Repository::addNamespace($namespace, $hint); - } - - /** - * Returns all registered namespaces with the config - * loader. - * - * @return array - * @static - */ - public static function getNamespaces(){ - return \Illuminate\Config\Repository::getNamespaces(); - } - - /** - * Get the loader implementation. - * - * @return \Illuminate\Config\LoaderInterface - * @static - */ - public static function getLoader(){ - return \Illuminate\Config\Repository::getLoader(); - } - - /** - * Set the loader implementation. - * - * @param \Illuminate\Config\LoaderInterface $loader - * @return void - * @static - */ - public static function setLoader($loader){ - \Illuminate\Config\Repository::setLoader($loader); - } - - /** - * Get the current configuration environment. - * - * @return string - * @static - */ - public static function getEnvironment(){ - return \Illuminate\Config\Repository::getEnvironment(); - } - - /** - * Get the after load callback array. - * - * @return array - * @static - */ - public static function getAfterLoadCallbacks(){ - return \Illuminate\Config\Repository::getAfterLoadCallbacks(); - } - - /** - * Get all of the configuration items. - * - * @return array - * @static - */ - public static function getItems(){ - return \Illuminate\Config\Repository::getItems(); - } - - /** - * Determine if the given configuration option exists. - * - * @param string $key - * @return bool - * @static - */ - public static function offsetExists($key){ - return \Illuminate\Config\Repository::offsetExists($key); - } - - /** - * Get a configuration option. - * - * @param string $key - * @return mixed - * @static - */ - public static function offsetGet($key){ - return \Illuminate\Config\Repository::offsetGet($key); - } - - /** - * Set a configuration option. - * - * @param string $key - * @param mixed $value - * @return void - * @static - */ - public static function offsetSet($key, $value){ - \Illuminate\Config\Repository::offsetSet($key, $value); - } - - /** - * Unset a configuration option. - * - * @param string $key - * @return void - * @static - */ - public static function offsetUnset($key){ - \Illuminate\Config\Repository::offsetUnset($key); - } - - /** - * Parse a key into namespace, group, and item. - * - * @param string $key - * @return array - * @static - */ - public static function parseKey($key){ - //Method inherited from \Illuminate\Support\NamespacedItemResolver - return \Illuminate\Config\Repository::parseKey($key); - } - - /** - * Set the parsed value of a key. - * - * @param string $key - * @param array $parsed - * @return void - * @static - */ - public static function setParsedKey($key, $parsed){ - //Method inherited from \Illuminate\Support\NamespacedItemResolver - \Illuminate\Config\Repository::setParsedKey($key, $parsed); - } - - } - - - class Controller extends \Illuminate\Routing\Controller{ - - } - - - class Cookie extends \Illuminate\Support\Facades\Cookie{ - - /** - * Create a new cookie instance. - * - * @param string $name - * @param string $value - * @param int $minutes - * @param string $path - * @param string $domain - * @param bool $secure - * @param bool $httpOnly - * @return \Symfony\Component\HttpFoundation\Cookie - * @static - */ - public static function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true){ - return \Illuminate\Cookie\CookieJar::make($name, $value, $minutes, $path, $domain, $secure, $httpOnly); - } - - /** - * Create a cookie that lasts "forever" (five years). - * - * @param string $name - * @param string $value - * @param string $path - * @param string $domain - * @param bool $secure - * @param bool $httpOnly - * @return \Symfony\Component\HttpFoundation\Cookie - * @static - */ - public static function forever($name, $value, $path = null, $domain = null, $secure = false, $httpOnly = true){ - return \Illuminate\Cookie\CookieJar::forever($name, $value, $path, $domain, $secure, $httpOnly); - } - - /** - * Expire the given cookie. - * - * @param string $name - * @param string $path - * @param string $domain - * @return \Symfony\Component\HttpFoundation\Cookie - * @static - */ - public static function forget($name, $path = null, $domain = null){ - return \Illuminate\Cookie\CookieJar::forget($name, $path, $domain); - } - - /** - * Determine if a cookie has been queued. - * - * @param string $key - * @return bool - * @static - */ - public static function hasQueued($key){ - return \Illuminate\Cookie\CookieJar::hasQueued($key); - } - - /** - * Get a queued cookie instance. - * - * @param string $key - * @param mixed $default - * @return \Symfony\Component\HttpFoundation\Cookie - * @static - */ - public static function queued($key, $default = null){ - return \Illuminate\Cookie\CookieJar::queued($key, $default); - } - - /** - * Queue a cookie to send with the next response. - * - * @param mixed - * @return void - * @static - */ - public static function queue(){ - \Illuminate\Cookie\CookieJar::queue(); - } - - /** - * Remove a cookie from the queue. - * - * @param $cookieName - * @static - */ - public static function unqueue($name){ - return \Illuminate\Cookie\CookieJar::unqueue($name); - } - - /** - * Set the default path and domain for the jar. - * - * @param string $path - * @param string $domain - * @return self - * @static - */ - public static function setDefaultPathAndDomain($path, $domain){ - return \Illuminate\Cookie\CookieJar::setDefaultPathAndDomain($path, $domain); - } - - /** - * Get the cookies which have been queued for the next request - * - * @return array - * @static - */ - public static function getQueuedCookies(){ - return \Illuminate\Cookie\CookieJar::getQueuedCookies(); - } - - } - - - class Crypt extends \Illuminate\Support\Facades\Crypt{ - - /** - * Encrypt the given value. - * - * @param string $value - * @return string - * @static - */ - public static function encrypt($value){ - return \Illuminate\Encryption\Encrypter::encrypt($value); - } - - /** - * Decrypt the given value. - * - * @param string $payload - * @return string - * @static - */ - public static function decrypt($payload){ - return \Illuminate\Encryption\Encrypter::decrypt($payload); - } - - /** - * Set the encryption key. - * - * @param string $key - * @return void - * @static - */ - public static function setKey($key){ - \Illuminate\Encryption\Encrypter::setKey($key); - } - - /** - * Set the encryption cipher. - * - * @param string $cipher - * @return void - * @static - */ - public static function setCipher($cipher){ - \Illuminate\Encryption\Encrypter::setCipher($cipher); - } - - /** - * Set the encryption mode. - * - * @param string $mode - * @return void - * @static - */ - public static function setMode($mode){ - \Illuminate\Encryption\Encrypter::setMode($mode); - } - - } - - - class DB extends \Illuminate\Support\Facades\DB{ - - /** - * Get a database connection instance. - * - * @param string $name - * @return \Illuminate\Database\Connection - * @static - */ - public static function connection($name = null){ - return \Illuminate\Database\DatabaseManager::connection($name); - } - - /** - * Reconnect to the given database. - * - * @param string $name - * @return \Illuminate\Database\Connection - * @static - */ - public static function reconnect($name = null){ - return \Illuminate\Database\DatabaseManager::reconnect($name); - } - - /** - * Disconnect from the given database. - * - * @param string $name - * @return void - * @static - */ - public static function disconnect($name = null){ - \Illuminate\Database\DatabaseManager::disconnect($name); - } - - /** - * Get the default connection name. - * - * @return string - * @static - */ - public static function getDefaultConnection(){ - return \Illuminate\Database\DatabaseManager::getDefaultConnection(); - } - - /** - * Set the default connection name. - * - * @param string $name - * @return void - * @static - */ - public static function setDefaultConnection($name){ - \Illuminate\Database\DatabaseManager::setDefaultConnection($name); - } - - /** - * Register an extension connection resolver. - * - * @param string $name - * @param callable $resolver - * @return void - * @static - */ - public static function extend($name, $resolver){ - \Illuminate\Database\DatabaseManager::extend($name, $resolver); - } - - /** - * Return all of the created connections. - * - * @return array - * @static - */ - public static function getConnections(){ - return \Illuminate\Database\DatabaseManager::getConnections(); - } - - /** - * Get a schema builder instance for the connection. - * - * @return \Illuminate\Database\Schema\MySqlBuilder - * @static - */ - public static function getSchemaBuilder(){ - return \Illuminate\Database\MySqlConnection::getSchemaBuilder(); - } - - /** - * Set the query grammar to the default implementation. - * - * @return void - * @static - */ - public static function useDefaultQueryGrammar(){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::useDefaultQueryGrammar(); - } - - /** - * Set the schema grammar to the default implementation. - * - * @return void - * @static - */ - public static function useDefaultSchemaGrammar(){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::useDefaultSchemaGrammar(); - } - - /** - * Set the query post processor to the default implementation. - * - * @return void - * @static - */ - public static function useDefaultPostProcessor(){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::useDefaultPostProcessor(); - } - - /** - * Begin a fluent query against a database table. - * - * @param string $table - * @return \Illuminate\Database\Query\Builder - * @static - */ - public static function table($table){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::table($table); - } - - /** - * Get a new raw query expression. - * - * @param mixed $value - * @return \Illuminate\Database\Query\Expression - * @static - */ - public static function raw($value){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::raw($value); - } - - /** - * Run a select statement and return a single result. - * - * @param string $query - * @param array $bindings - * @return mixed - * @static - */ - public static function selectOne($query, $bindings = array()){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::selectOne($query, $bindings); - } - - /** - * Run a select statement against the database. - * - * @param string $query - * @param array $bindings - * @return array - * @static - */ - public static function select($query, $bindings = array()){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::select($query, $bindings); - } - - /** - * Run an insert statement against the database. - * - * @param string $query - * @param array $bindings - * @return bool - * @static - */ - public static function insert($query, $bindings = array()){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::insert($query, $bindings); - } - - /** - * Run an update statement against the database. - * - * @param string $query - * @param array $bindings - * @return int - * @static - */ - public static function update($query, $bindings = array()){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::update($query, $bindings); - } - - /** - * Run a delete statement against the database. - * - * @param string $query - * @param array $bindings - * @return int - * @static - */ - public static function delete($query, $bindings = array()){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::delete($query, $bindings); - } - - /** - * Execute an SQL statement and return the boolean result. - * - * @param string $query - * @param array $bindings - * @return bool - * @static - */ - public static function statement($query, $bindings = array()){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::statement($query, $bindings); - } - - /** - * Run an SQL statement and get the number of rows affected. - * - * @param string $query - * @param array $bindings - * @return int - * @static - */ - public static function affectingStatement($query, $bindings = array()){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::affectingStatement($query, $bindings); - } - - /** - * Run a raw, unprepared query against the PDO connection. - * - * @param string $query - * @return bool - * @static - */ - public static function unprepared($query){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::unprepared($query); - } - - /** - * Prepare the query bindings for execution. - * - * @param array $bindings - * @return array - * @static - */ - public static function prepareBindings($bindings){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::prepareBindings($bindings); - } - - /** - * Execute a Closure within a transaction. - * - * @param \Closure $callback - * @return mixed - * @throws \Exception - * @static - */ - public static function transaction($callback){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::transaction($callback); - } - - /** - * Start a new database transaction. - * - * @return void - * @static - */ - public static function beginTransaction(){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::beginTransaction(); - } - - /** - * Commit the active database transaction. - * - * @return void - * @static - */ - public static function commit(){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::commit(); - } - - /** - * Rollback the active database transaction. - * - * @return void - * @static - */ - public static function rollBack(){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::rollBack(); - } - - /** - * Execute the given callback in "dry run" mode. - * - * @param \Closure $callback - * @return array - * @static - */ - public static function pretend($callback){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::pretend($callback); - } - - /** - * Log a query in the connection's query log. - * - * @param string $query - * @param array $bindings - * @param $time - * @return void - * @static - */ - public static function logQuery($query, $bindings, $time = null){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::logQuery($query, $bindings, $time); - } - - /** - * Register a database query listener with the connection. - * - * @param \Closure $callback - * @return void - * @static - */ - public static function listen($callback){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::listen($callback); - } - - /** - * Get a Doctrine Schema Column instance. - * - * @param string $table - * @param string $column - * @return \Doctrine\DBAL\Schema\Column - * @static - */ - public static function getDoctrineColumn($table, $column){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getDoctrineColumn($table, $column); - } - - /** - * Get the Doctrine DBAL schema manager for the connection. - * - * @return \Doctrine\DBAL\Schema\AbstractSchemaManager - * @static - */ - public static function getDoctrineSchemaManager(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getDoctrineSchemaManager(); - } - - /** - * Get the Doctrine DBAL database connection instance. - * - * @return \Doctrine\DBAL\Connection - * @static - */ - public static function getDoctrineConnection(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getDoctrineConnection(); - } - - /** - * Get the current PDO connection. - * - * @return \Illuminate\Database\PDO - * @static - */ - public static function getPdo(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getPdo(); - } - - /** - * Get the current PDO connection used for reading. - * - * @return \Illuminate\Database\PDO - * @static - */ - public static function getReadPdo(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getReadPdo(); - } - - /** - * Set the PDO connection. - * - * @param \Illuminate\Database\PDO $pdo - * @return \Illuminate\Database\Connection - * @static - */ - public static function setPdo($pdo){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::setPdo($pdo); - } - - /** - * Set the PDO connection used for reading. - * - * @param \Illuminate\Database\PDO $pdo - * @return \Illuminate\Database\Connection - * @static - */ - public static function setReadPdo($pdo){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::setReadPdo($pdo); - } - - /** - * Get the database connection name. - * - * @return string|null - * @static - */ - public static function getName(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getName(); - } - - /** - * Get an option from the configuration options. - * - * @param string $option - * @return mixed - * @static - */ - public static function getConfig($option){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getConfig($option); - } - - /** - * Get the PDO driver name. - * - * @return string - * @static - */ - public static function getDriverName(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getDriverName(); - } - - /** - * Get the query grammar used by the connection. - * - * @return \Illuminate\Database\Query\Grammars\Grammar - * @static - */ - public static function getQueryGrammar(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getQueryGrammar(); - } - - /** - * Set the query grammar used by the connection. - * - * @param \Illuminate\Database\Query\Grammars\Grammar - * @return void - * @static - */ - public static function setQueryGrammar($grammar){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::setQueryGrammar($grammar); - } - - /** - * Get the schema grammar used by the connection. - * - * @return \Illuminate\Database\Query\Grammars\Grammar - * @static - */ - public static function getSchemaGrammar(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getSchemaGrammar(); - } - - /** - * Set the schema grammar used by the connection. - * - * @param \Illuminate\Database\Schema\Grammars\Grammar - * @return void - * @static - */ - public static function setSchemaGrammar($grammar){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::setSchemaGrammar($grammar); - } - - /** - * Get the query post processor used by the connection. - * - * @return \Illuminate\Database\Query\Processors\Processor - * @static - */ - public static function getPostProcessor(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getPostProcessor(); - } - - /** - * Set the query post processor used by the connection. - * - * @param \Illuminate\Database\Query\Processors\Processor - * @return void - * @static - */ - public static function setPostProcessor($processor){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::setPostProcessor($processor); - } - - /** - * Get the event dispatcher used by the connection. - * - * @return \Illuminate\Events\Dispatcher - * @static - */ - public static function getEventDispatcher(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getEventDispatcher(); - } - - /** - * Set the event dispatcher instance on the connection. - * - * @param \Illuminate\Events\Dispatcher - * @return void - * @static - */ - public static function setEventDispatcher($events){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::setEventDispatcher($events); - } - - /** - * Get the paginator environment instance. - * - * @return \Illuminate\Pagination\Environment - * @static - */ - public static function getPaginator(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getPaginator(); - } - - /** - * Set the pagination environment instance. - * - * @param \Illuminate\Pagination\Environment|\Closure $paginator - * @return void - * @static - */ - public static function setPaginator($paginator){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::setPaginator($paginator); - } - - /** - * Get the cache manager instance. - * - * @return \Illuminate\Cache\CacheManager - * @static - */ - public static function getCacheManager(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getCacheManager(); - } - - /** - * Set the cache manager instance on the connection. - * - * @param \Illuminate\Cache\CacheManager|\Closure $cache - * @return void - * @static - */ - public static function setCacheManager($cache){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::setCacheManager($cache); - } - - /** - * Determine if the connection in a "dry run". - * - * @return bool - * @static - */ - public static function pretending(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::pretending(); - } - - /** - * Get the default fetch mode for the connection. - * - * @return int - * @static - */ - public static function getFetchMode(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getFetchMode(); - } - - /** - * Set the default fetch mode for the connection. - * - * @param int $fetchMode - * @return int - * @static - */ - public static function setFetchMode($fetchMode){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::setFetchMode($fetchMode); - } - - /** - * Get the connection query log. - * - * @return array - * @static - */ - public static function getQueryLog(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getQueryLog(); - } - - /** - * Clear the query log. - * - * @return void - * @static - */ - public static function flushQueryLog(){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::flushQueryLog(); - } - - /** - * Enable the query log on the connection. - * - * @return void - * @static - */ - public static function enableQueryLog(){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::enableQueryLog(); - } - - /** - * Disable the query log on the connection. - * - * @return void - * @static - */ - public static function disableQueryLog(){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::disableQueryLog(); - } - - /** - * Determine whether we're logging queries. - * - * @return bool - * @static - */ - public static function logging(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::logging(); - } - - /** - * Get the name of the connected database. - * - * @return string - * @static - */ - public static function getDatabaseName(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getDatabaseName(); - } - - /** - * Set the name of the connected database. - * - * @param string $database - * @return string - * @static - */ - public static function setDatabaseName($database){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::setDatabaseName($database); - } - - /** - * Get the table prefix for the connection. - * - * @return string - * @static - */ - public static function getTablePrefix(){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::getTablePrefix(); - } - - /** - * Set the table prefix in use by the connection. - * - * @param string $prefix - * @return void - * @static - */ - public static function setTablePrefix($prefix){ - //Method inherited from \Illuminate\Database\Connection - \Illuminate\Database\MySqlConnection::setTablePrefix($prefix); - } - - /** - * Set the table prefix and return the grammar. - * - * @param \Illuminate\Database\Grammar $grammar - * @return \Illuminate\Database\Grammar - * @static - */ - public static function withTablePrefix($grammar){ - //Method inherited from \Illuminate\Database\Connection - return \Illuminate\Database\MySqlConnection::withTablePrefix($grammar); - } - - } - - - class Eloquent extends \Illuminate\Database\Eloquent\Model{ - - /** - * Find a model by its primary key. - * - * @param array $id - * @param array $columns - * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static - * @static - */ - public static function findMany($id, $columns = array()){ - return \Illuminate\Database\Eloquent\Builder::findMany($id, $columns); - } - - /** - * Execute the query and get the first result. - * - * @param array $columns - * @return \Illuminate\Database\Eloquent\Model|static|null - * @static - */ - public static function first($columns = array()){ - return \Illuminate\Database\Eloquent\Builder::first($columns); - } - - /** - * Execute the query and get the first result or throw an exception. - * - * @param array $columns - * @return \Illuminate\Database\Eloquent\Model|static - * @throws ModelNotFoundException - * @static - */ - public static function firstOrFail($columns = array()){ - return \Illuminate\Database\Eloquent\Builder::firstOrFail($columns); - } - - /** - * Execute the query as a "select" statement. - * - * @param array $columns - * @return \Illuminate\Database\Eloquent\Collection|static[] - * @static - */ - public static function get($columns = array()){ - return \Illuminate\Database\Eloquent\Builder::get($columns); - } - - /** - * Pluck a single column from the database. - * - * @param string $column - * @return mixed - * @static - */ - public static function pluck($column){ - return \Illuminate\Database\Eloquent\Builder::pluck($column); - } - - /** - * Chunk the results of the query. - * - * @param int $count - * @param callable $callback - * @return void - * @static - */ - public static function chunk($count, $callback){ - \Illuminate\Database\Eloquent\Builder::chunk($count, $callback); - } - - /** - * Get an array with the values of a given column. - * - * @param string $column - * @param string $key - * @return array - * @static - */ - public static function lists($column, $key = null){ - return \Illuminate\Database\Eloquent\Builder::lists($column, $key); - } - - /** - * Get a paginator for the "select" statement. - * - * @param int $perPage - * @param array $columns - * @return \Illuminate\Pagination\Paginator - * @static - */ - public static function paginate($perPage = null, $columns = array()){ - return \Illuminate\Database\Eloquent\Builder::paginate($perPage, $columns); - } - - /** - * Get the hydrated models without eager loading. - * - * @param array $columns - * @return array|static[] - * @static - */ - public static function getModels($columns = array()){ - return \Illuminate\Database\Eloquent\Builder::getModels($columns); - } - - /** - * Eager load the relationships for the models. - * - * @param array $models - * @return array - * @static - */ - public static function eagerLoadRelations($models){ - return \Illuminate\Database\Eloquent\Builder::eagerLoadRelations($models); - } - - /** - * Add a basic where clause to the query. - * - * @param string $column - * @param string $operator - * @param mixed $value - * @param string $boolean - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function where($column, $operator = null, $value = null, $boolean = 'and'){ - return \Illuminate\Database\Eloquent\Builder::where($column, $operator, $value, $boolean); - } - - /** - * Add an "or where" clause to the query. - * - * @param string $column - * @param string $operator - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function orWhere($column, $operator = null, $value = null){ - return \Illuminate\Database\Eloquent\Builder::orWhere($column, $operator, $value); - } - - /** - * Add a relationship count condition to the query. - * - * @param string $relation - * @param string $operator - * @param int $count - * @param string $boolean - * @param \Closure $callback - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null){ - return \Illuminate\Database\Eloquent\Builder::has($relation, $operator, $count, $boolean, $callback); - } - - /** - * Add a relationship count condition to the query with where clauses. - * - * @param string $relation - * @param \Closure $callback - * @param string $operator - * @param int $count - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function whereHas($relation, $callback, $operator = '>=', $count = 1){ - return \Illuminate\Database\Eloquent\Builder::whereHas($relation, $callback, $operator, $count); - } - - /** - * Add a relationship count condition to the query with an "or". - * - * @param string $relation - * @param string $operator - * @param int $count - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function orHas($relation, $operator = '>=', $count = 1){ - return \Illuminate\Database\Eloquent\Builder::orHas($relation, $operator, $count); - } - - /** - * Add a relationship count condition to the query with where clauses and an "or". - * - * @param string $relation - * @param \Closure $callback - * @param string $operator - * @param int $count - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function orWhereHas($relation, $callback, $operator = '>=', $count = 1){ - return \Illuminate\Database\Eloquent\Builder::orWhereHas($relation, $callback, $operator, $count); - } - - /** - * Get the underlying query builder instance. - * - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function getQuery(){ - return \Illuminate\Database\Eloquent\Builder::getQuery(); - } - - /** - * Set the underlying query builder instance. - * - * @param \Illuminate\Database\Query\Builder $query - * @return void - * @static - */ - public static function setQuery($query){ - \Illuminate\Database\Eloquent\Builder::setQuery($query); - } - - /** - * Get the relationships being eagerly loaded. - * - * @return array - * @static - */ - public static function getEagerLoads(){ - return \Illuminate\Database\Eloquent\Builder::getEagerLoads(); - } - - /** - * Set the relationships being eagerly loaded. - * - * @param array $eagerLoad - * @return void - * @static - */ - public static function setEagerLoads($eagerLoad){ - \Illuminate\Database\Eloquent\Builder::setEagerLoads($eagerLoad); - } - - /** - * Get the model instance being queried. - * - * @return \Illuminate\Database\Eloquent\Model - * @static - */ - public static function getModel(){ - return \Illuminate\Database\Eloquent\Builder::getModel(); - } - - /** - * Set a model instance for the model being queried. - * - * @param \Illuminate\Database\Eloquent\Model $model - * @return \Illuminate\Database\Eloquent\Builder - * @static - */ - public static function setModel($model){ - return \Illuminate\Database\Eloquent\Builder::setModel($model); - } - - /** - * Set the columns to be selected. - * - * @param array $columns - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function select($columns = array()){ - return \Illuminate\Database\Query\Builder::select($columns); - } - - /** - * Add a new "raw" select expression to the query. - * - * @param string $expression - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function selectRaw($expression){ - return \Illuminate\Database\Query\Builder::selectRaw($expression); - } - - /** - * Add a new select column to the query. - * - * @param mixed $column - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function addSelect($column){ - return \Illuminate\Database\Query\Builder::addSelect($column); - } - - /** - * Force the query to only return distinct results. - * - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function distinct(){ - return \Illuminate\Database\Query\Builder::distinct(); - } - - /** - * Set the table which the query is targeting. - * - * @param string $table - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function from($table){ - return \Illuminate\Database\Query\Builder::from($table); - } - - /** - * Add a join clause to the query. - * - * @param string $table - * @param string $first - * @param string $operator - * @param string $two - * @param string $type - * @param bool $where - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function join($table, $one, $operator = null, $two = null, $type = 'inner', $where = false){ - return \Illuminate\Database\Query\Builder::join($table, $one, $operator, $two, $type, $where); - } - - /** - * Add a "join where" clause to the query. - * - * @param string $table - * @param string $first - * @param string $operator - * @param string $two - * @param string $type - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function joinWhere($table, $one, $operator, $two, $type = 'inner'){ - return \Illuminate\Database\Query\Builder::joinWhere($table, $one, $operator, $two, $type); - } - - /** - * Add a left join to the query. - * - * @param string $table - * @param string $first - * @param string $operator - * @param string $second - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function leftJoin($table, $first, $operator = null, $second = null){ - return \Illuminate\Database\Query\Builder::leftJoin($table, $first, $operator, $second); - } - - /** - * Add a "join where" clause to the query. - * - * @param string $table - * @param string $first - * @param string $operator - * @param string $two - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function leftJoinWhere($table, $one, $operator, $two){ - return \Illuminate\Database\Query\Builder::leftJoinWhere($table, $one, $operator, $two); - } - - /** - * Add a raw where clause to the query. - * - * @param string $sql - * @param array $bindings - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereRaw($sql, $bindings = array(), $boolean = 'and'){ - return \Illuminate\Database\Query\Builder::whereRaw($sql, $bindings, $boolean); - } - - /** - * Add a raw or where clause to the query. - * - * @param string $sql - * @param array $bindings - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function orWhereRaw($sql, $bindings = array()){ - return \Illuminate\Database\Query\Builder::orWhereRaw($sql, $bindings); - } - - /** - * Add a where between statement to the query. - * - * @param string $column - * @param array $values - * @param string $boolean - * @param bool $not - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereBetween($column, $values, $boolean = 'and', $not = false){ - return \Illuminate\Database\Query\Builder::whereBetween($column, $values, $boolean, $not); - } - - /** - * Add an or where between statement to the query. - * - * @param string $column - * @param array $values - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function orWhereBetween($column, $values){ - return \Illuminate\Database\Query\Builder::orWhereBetween($column, $values); - } - - /** - * Add a where not between statement to the query. - * - * @param string $column - * @param array $values - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereNotBetween($column, $values, $boolean = 'and'){ - return \Illuminate\Database\Query\Builder::whereNotBetween($column, $values, $boolean); - } - - /** - * Add an or where not between statement to the query. - * - * @param string $column - * @param array $values - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function orWhereNotBetween($column, $values){ - return \Illuminate\Database\Query\Builder::orWhereNotBetween($column, $values); - } - - /** - * Add a nested where statement to the query. - * - * @param \Closure $callback - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereNested($callback, $boolean = 'and'){ - return \Illuminate\Database\Query\Builder::whereNested($callback, $boolean); - } - - /** - * Add another query builder as a nested where to the query builder. - * - * @param \Illuminate\Database\Query\Builder|static $query - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function addNestedWhereQuery($query, $boolean = 'and'){ - return \Illuminate\Database\Query\Builder::addNestedWhereQuery($query, $boolean); - } - - /** - * Add an exists clause to the query. - * - * @param \Closure $callback - * @param string $boolean - * @param bool $not - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereExists($callback, $boolean = 'and', $not = false){ - return \Illuminate\Database\Query\Builder::whereExists($callback, $boolean, $not); - } - - /** - * Add an or exists clause to the query. - * - * @param \Closure $callback - * @param bool $not - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function orWhereExists($callback, $not = false){ - return \Illuminate\Database\Query\Builder::orWhereExists($callback, $not); - } - - /** - * Add a where not exists clause to the query. - * - * @param \Closure $callback - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereNotExists($callback, $boolean = 'and'){ - return \Illuminate\Database\Query\Builder::whereNotExists($callback, $boolean); - } - - /** - * Add a where not exists clause to the query. - * - * @param \Closure $callback - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function orWhereNotExists($callback){ - return \Illuminate\Database\Query\Builder::orWhereNotExists($callback); - } - - /** - * Add a "where in" clause to the query. - * - * @param string $column - * @param mixed $values - * @param string $boolean - * @param bool $not - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereIn($column, $values, $boolean = 'and', $not = false){ - return \Illuminate\Database\Query\Builder::whereIn($column, $values, $boolean, $not); - } - - /** - * Add an "or where in" clause to the query. - * - * @param string $column - * @param mixed $values - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function orWhereIn($column, $values){ - return \Illuminate\Database\Query\Builder::orWhereIn($column, $values); - } - - /** - * Add a "where not in" clause to the query. - * - * @param string $column - * @param mixed $values - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereNotIn($column, $values, $boolean = 'and'){ - return \Illuminate\Database\Query\Builder::whereNotIn($column, $values, $boolean); - } - - /** - * Add an "or where not in" clause to the query. - * - * @param string $column - * @param mixed $values - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function orWhereNotIn($column, $values){ - return \Illuminate\Database\Query\Builder::orWhereNotIn($column, $values); - } - - /** - * Add a "where null" clause to the query. - * - * @param string $column - * @param string $boolean - * @param bool $not - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereNull($column, $boolean = 'and', $not = false){ - return \Illuminate\Database\Query\Builder::whereNull($column, $boolean, $not); - } - - /** - * Add an "or where null" clause to the query. - * - * @param string $column - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function orWhereNull($column){ - return \Illuminate\Database\Query\Builder::orWhereNull($column); - } - - /** - * Add a "where not null" clause to the query. - * - * @param string $column - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereNotNull($column, $boolean = 'and'){ - return \Illuminate\Database\Query\Builder::whereNotNull($column, $boolean); - } - - /** - * Add an "or where not null" clause to the query. - * - * @param string $column - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function orWhereNotNull($column){ - return \Illuminate\Database\Query\Builder::orWhereNotNull($column); - } - - /** - * Add a "where day" statement to the query. - * - * @param string $column - * @param string $operator - * @param int $value - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereDay($column, $operator, $value, $boolean = 'and'){ - return \Illuminate\Database\Query\Builder::whereDay($column, $operator, $value, $boolean); - } - - /** - * Add a "where month" statement to the query. - * - * @param string $column - * @param string $operator - * @param int $value - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereMonth($column, $operator, $value, $boolean = 'and'){ - return \Illuminate\Database\Query\Builder::whereMonth($column, $operator, $value, $boolean); - } - - /** - * Add a "where year" statement to the query. - * - * @param string $column - * @param string $operator - * @param int $value - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function whereYear($column, $operator, $value, $boolean = 'and'){ - return \Illuminate\Database\Query\Builder::whereYear($column, $operator, $value, $boolean); - } - - /** - * Handles dynamic "where" clauses to the query. - * - * @param string $method - * @param string $parameters - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function dynamicWhere($method, $parameters){ - return \Illuminate\Database\Query\Builder::dynamicWhere($method, $parameters); - } - - /** - * Add a "group by" clause to the query. - * - * @param mixed $columns - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function groupBy(){ - return \Illuminate\Database\Query\Builder::groupBy(); - } - - /** - * Add a "having" clause to the query. - * - * @param string $column - * @param string $operator - * @param string $value - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function having($column, $operator = null, $value = null){ - return \Illuminate\Database\Query\Builder::having($column, $operator, $value); - } - - /** - * Add a raw having clause to the query. - * - * @param string $sql - * @param array $bindings - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function havingRaw($sql, $bindings = array(), $boolean = 'and'){ - return \Illuminate\Database\Query\Builder::havingRaw($sql, $bindings, $boolean); - } - - /** - * Add a raw or having clause to the query. - * - * @param string $sql - * @param array $bindings - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function orHavingRaw($sql, $bindings = array()){ - return \Illuminate\Database\Query\Builder::orHavingRaw($sql, $bindings); - } - - /** - * Add an "order by" clause to the query. - * - * @param string $column - * @param string $direction - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function orderBy($column, $direction = 'asc'){ - return \Illuminate\Database\Query\Builder::orderBy($column, $direction); - } - - /** - * Add an "order by" clause for a timestamp to the query. - * - * @param string $column - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function latest($column = 'created_at'){ - return \Illuminate\Database\Query\Builder::latest($column); - } - - /** - * Add an "order by" clause for a timestamp to the query. - * - * @param string $column - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function oldest($column = 'created_at'){ - return \Illuminate\Database\Query\Builder::oldest($column); - } - - /** - * Add a raw "order by" clause to the query. - * - * @param string $sql - * @param array $bindings - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function orderByRaw($sql, $bindings = array()){ - return \Illuminate\Database\Query\Builder::orderByRaw($sql, $bindings); - } - - /** - * Set the "offset" value of the query. - * - * @param int $value - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function offset($value){ - return \Illuminate\Database\Query\Builder::offset($value); - } - - /** - * Alias to set the "offset" value of the query. - * - * @param int $value - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function skip($value){ - return \Illuminate\Database\Query\Builder::skip($value); - } - - /** - * Set the "limit" value of the query. - * - * @param int $value - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function limit($value){ - return \Illuminate\Database\Query\Builder::limit($value); - } - - /** - * Alias to set the "limit" value of the query. - * - * @param int $value - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function take($value){ - return \Illuminate\Database\Query\Builder::take($value); - } - - /** - * Set the limit and offset for a given page. - * - * @param int $page - * @param int $perPage - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function forPage($page, $perPage = 15){ - return \Illuminate\Database\Query\Builder::forPage($page, $perPage); - } - - /** - * Add a union statement to the query. - * - * @param \Illuminate\Database\Query\Builder|\Closure $query - * @param bool $all - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function union($query, $all = false){ - return \Illuminate\Database\Query\Builder::union($query, $all); - } - - /** - * Add a union all statement to the query. - * - * @param \Illuminate\Database\Query\Builder|\Closure $query - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function unionAll($query){ - return \Illuminate\Database\Query\Builder::unionAll($query); - } - - /** - * Lock the selected rows in the table. - * - * @param bool $update - * @return \Illuminate\Database\Query\Builder - * @static - */ - public static function lock($value = true){ - return \Illuminate\Database\Query\Builder::lock($value); - } - - /** - * Lock the selected rows in the table for updating. - * - * @return \Illuminate\Database\Query\Builder - * @static - */ - public static function lockForUpdate(){ - return \Illuminate\Database\Query\Builder::lockForUpdate(); - } - - /** - * Share lock the selected rows in the table. - * - * @return \Illuminate\Database\Query\Builder - * @static - */ - public static function sharedLock(){ - return \Illuminate\Database\Query\Builder::sharedLock(); - } - - /** - * Get the SQL representation of the query. - * - * @return string - * @static - */ - public static function toSql(){ - return \Illuminate\Database\Query\Builder::toSql(); - } - - /** - * Indicate that the query results should be cached. - * - * @param \DateTime|int $minutes - * @param string $key - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function remember($minutes, $key = null){ - return \Illuminate\Database\Query\Builder::remember($minutes, $key); - } - - /** - * Indicate that the query results should be cached forever. - * - * @param string $key - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function rememberForever($key = null){ - return \Illuminate\Database\Query\Builder::rememberForever($key); - } - - /** - * Indicate that the results, if cached, should use the given cache tags. - * - * @param array|mixed $cacheTags - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function cacheTags($cacheTags){ - return \Illuminate\Database\Query\Builder::cacheTags($cacheTags); - } - - /** - * Indicate that the results, if cached, should use the given cache driver. - * - * @param string $cacheDriver - * @return \Illuminate\Database\Query\Builder|static - * @static - */ - public static function cacheDriver($cacheDriver){ - return \Illuminate\Database\Query\Builder::cacheDriver($cacheDriver); - } - - /** - * Execute the query as a fresh "select" statement. - * - * @param array $columns - * @return array|static[] - * @static - */ - public static function getFresh($columns = array()){ - return \Illuminate\Database\Query\Builder::getFresh($columns); - } - - /** - * Execute the query as a cached "select" statement. - * - * @param array $columns - * @return array - * @static - */ - public static function getCached($columns = array()){ - return \Illuminate\Database\Query\Builder::getCached($columns); - } - - /** - * Get a unique cache key for the complete query. - * - * @return string - * @static - */ - public static function getCacheKey(){ - return \Illuminate\Database\Query\Builder::getCacheKey(); - } - - /** - * Generate the unique cache key for the query. - * - * @return string - * @static - */ - public static function generateCacheKey(){ - return \Illuminate\Database\Query\Builder::generateCacheKey(); - } - - /** - * Concatenate values of a given column as a string. - * - * @param string $column - * @param string $glue - * @return string - * @static - */ - public static function implode($column, $glue = null){ - return \Illuminate\Database\Query\Builder::implode($column, $glue); - } - - /** - * Build a paginator instance from a raw result array. - * - * @param \Illuminate\Pagination\Environment $paginator - * @param array $results - * @param int $perPage - * @return \Illuminate\Pagination\Paginator - * @static - */ - public static function buildRawPaginator($paginator, $results, $perPage){ - return \Illuminate\Database\Query\Builder::buildRawPaginator($paginator, $results, $perPage); - } - - /** - * Get the count of the total records for pagination. - * - * @return int - * @static - */ - public static function getPaginationCount(){ - return \Illuminate\Database\Query\Builder::getPaginationCount(); - } - - /** - * Determine if any rows exist for the current query. - * - * @return bool - * @static - */ - public static function exists(){ - return \Illuminate\Database\Query\Builder::exists(); - } - - /** - * Retrieve the "count" result of the query. - * - * @param string $column - * @return int - * @static - */ - public static function count($column = '*'){ - return \Illuminate\Database\Query\Builder::count($column); - } - - /** - * Retrieve the minimum value of a given column. - * - * @param string $column - * @return mixed - * @static - */ - public static function min($column){ - return \Illuminate\Database\Query\Builder::min($column); - } - - /** - * Retrieve the maximum value of a given column. - * - * @param string $column - * @return mixed - * @static - */ - public static function max($column){ - return \Illuminate\Database\Query\Builder::max($column); - } - - /** - * Retrieve the sum of the values of a given column. - * - * @param string $column - * @return mixed - * @static - */ - public static function sum($column){ - return \Illuminate\Database\Query\Builder::sum($column); - } - - /** - * Retrieve the average of the values of a given column. - * - * @param string $column - * @return mixed - * @static - */ - public static function avg($column){ - return \Illuminate\Database\Query\Builder::avg($column); - } - - /** - * Execute an aggregate function on the database. - * - * @param string $function - * @param array $columns - * @return mixed - * @static - */ - public static function aggregate($function, $columns = array()){ - return \Illuminate\Database\Query\Builder::aggregate($function, $columns); - } - - /** - * Insert a new record into the database. - * - * @param array $values - * @return bool - * @static - */ - public static function insert($values){ - return \Illuminate\Database\Query\Builder::insert($values); - } - - /** - * Insert a new record and get the value of the primary key. - * - * @param array $values - * @param string $sequence - * @return int - * @static - */ - public static function insertGetId($values, $sequence = null){ - return \Illuminate\Database\Query\Builder::insertGetId($values, $sequence); - } - - /** - * Run a truncate statement on the table. - * - * @return void - * @static - */ - public static function truncate(){ - \Illuminate\Database\Query\Builder::truncate(); - } - - /** - * Merge an array of where clauses and bindings. - * - * @param array $wheres - * @param array $bindings - * @return void - * @static - */ - public static function mergeWheres($wheres, $bindings){ - \Illuminate\Database\Query\Builder::mergeWheres($wheres, $bindings); - } - - /** - * Create a raw database expression. - * - * @param mixed $value - * @return \Illuminate\Database\Query\Expression - * @static - */ - public static function raw($value){ - return \Illuminate\Database\Query\Builder::raw($value); - } - - /** - * Get the current query value bindings. - * - * @return array - * @static - */ - public static function getBindings(){ - return \Illuminate\Database\Query\Builder::getBindings(); - } - - /** - * Set the bindings on the query builder. - * - * @param array $bindings - * @return \Illuminate\Database\Query\Builder - * @static - */ - public static function setBindings($bindings){ - return \Illuminate\Database\Query\Builder::setBindings($bindings); - } - - /** - * Add a binding to the query. - * - * @param mixed $value - * @return \Illuminate\Database\Query\Builder - * @static - */ - public static function addBinding($value){ - return \Illuminate\Database\Query\Builder::addBinding($value); - } - - /** - * Merge an array of bindings into our bindings. - * - * @param \Illuminate\Database\Query\Builder $query - * @return \Illuminate\Database\Query\Builder - * @static - */ - public static function mergeBindings($query){ - return \Illuminate\Database\Query\Builder::mergeBindings($query); - } - - /** - * Get the database query processor instance. - * - * @return \Illuminate\Database\Query\Processors\Processor - * @static - */ - public static function getProcessor(){ - return \Illuminate\Database\Query\Builder::getProcessor(); - } - - /** - * Get the query grammar instance. - * - * @return \Illuminate\Database\Grammar - * @static - */ - public static function getGrammar(){ - return \Illuminate\Database\Query\Builder::getGrammar(); - } - - } - - - class Event extends \Illuminate\Support\Facades\Event{ - - /** - * Register an event listener with the dispatcher. - * - * @param string|array $event - * @param mixed $listener - * @param int $priority - * @return void - * @static - */ - public static function listen($events, $listener, $priority = 0){ - \Illuminate\Events\Dispatcher::listen($events, $listener, $priority); - } - - /** - * Determine if a given event has listeners. - * - * @param string $eventName - * @return bool - * @static - */ - public static function hasListeners($eventName){ - return \Illuminate\Events\Dispatcher::hasListeners($eventName); - } - - /** - * Register a queued event and payload. - * - * @param string $event - * @param array $payload - * @return void - * @static - */ - public static function queue($event, $payload = array()){ - \Illuminate\Events\Dispatcher::queue($event, $payload); - } - - /** - * Register an event subscriber with the dispatcher. - * - * @param string $subscriber - * @return void - * @static - */ - public static function subscribe($subscriber){ - \Illuminate\Events\Dispatcher::subscribe($subscriber); - } - - /** - * Fire an event until the first non-null response is returned. - * - * @param string $event - * @param array $payload - * @return mixed - * @static - */ - public static function until($event, $payload = array()){ - return \Illuminate\Events\Dispatcher::until($event, $payload); - } - - /** - * Flush a set of queued events. - * - * @param string $event - * @return void - * @static - */ - public static function flush($event){ - \Illuminate\Events\Dispatcher::flush($event); - } - - /** - * Get the event that is currently firing. - * - * @return string - * @static - */ - public static function firing(){ - return \Illuminate\Events\Dispatcher::firing(); - } - - /** - * Fire an event and call the listeners. - * - * @param string $event - * @param mixed $payload - * @param bool $halt - * @return array|null - * @static - */ - public static function fire($event, $payload = array(), $halt = false){ - return \Illuminate\Events\Dispatcher::fire($event, $payload, $halt); - } - - /** - * Get all of the listeners for a given event name. - * - * @param string $eventName - * @return array - * @static - */ - public static function getListeners($eventName){ - return \Illuminate\Events\Dispatcher::getListeners($eventName); - } - - /** - * Register an event listener with the dispatcher. - * - * @param mixed $listener - * @return mixed - * @static - */ - public static function makeListener($listener){ - return \Illuminate\Events\Dispatcher::makeListener($listener); - } - - /** - * Create a class based listener using the IoC container. - * - * @param mixed $listener - * @return \Closure - * @static - */ - public static function createClassListener($listener){ - return \Illuminate\Events\Dispatcher::createClassListener($listener); - } - - /** - * Remove a set of listeners from the dispatcher. - * - * @param string $event - * @return void - * @static - */ - public static function forget($event){ - \Illuminate\Events\Dispatcher::forget($event); - } - - } - - - class File extends \Illuminate\Support\Facades\File{ - - /** - * Determine if a file exists. - * - * @param string $path - * @return bool - * @static - */ - public static function exists($path){ - return \Illuminate\Filesystem\Filesystem::exists($path); - } - - /** - * Get the contents of a file. - * - * @param string $path - * @return string - * @throws FileNotFoundException - * @static - */ - public static function get($path){ - return \Illuminate\Filesystem\Filesystem::get($path); - } - - /** - * Get the returned value of a file. - * - * @param string $path - * @return mixed - * @throws FileNotFoundException - * @static - */ - public static function getRequire($path){ - return \Illuminate\Filesystem\Filesystem::getRequire($path); - } - - /** - * Require the given file once. - * - * @param string $file - * @return mixed - * @static - */ - public static function requireOnce($file){ - return \Illuminate\Filesystem\Filesystem::requireOnce($file); - } - - /** - * Write the contents of a file. - * - * @param string $path - * @param string $contents - * @return int - * @static - */ - public static function put($path, $contents){ - return \Illuminate\Filesystem\Filesystem::put($path, $contents); - } - - /** - * Prepend to a file. - * - * @param string $path - * @param string $data - * @return int - * @static - */ - public static function prepend($path, $data){ - return \Illuminate\Filesystem\Filesystem::prepend($path, $data); - } - - /** - * Append to a file. - * - * @param string $path - * @param string $data - * @return int - * @static - */ - public static function append($path, $data){ - return \Illuminate\Filesystem\Filesystem::append($path, $data); - } - - /** - * Delete the file at a given path. - * - * @param string|array $paths - * @return bool - * @static - */ - public static function delete($paths){ - return \Illuminate\Filesystem\Filesystem::delete($paths); - } - - /** - * Move a file to a new location. - * - * @param string $path - * @param string $target - * @return bool - * @static - */ - public static function move($path, $target){ - return \Illuminate\Filesystem\Filesystem::move($path, $target); - } - - /** - * Copy a file to a new location. - * - * @param string $path - * @param string $target - * @return bool - * @static - */ - public static function copy($path, $target){ - return \Illuminate\Filesystem\Filesystem::copy($path, $target); - } - - /** - * Extract the file extension from a file path. - * - * @param string $path - * @return string - * @static - */ - public static function extension($path){ - return \Illuminate\Filesystem\Filesystem::extension($path); - } - - /** - * Get the file type of a given file. - * - * @param string $path - * @return string - * @static - */ - public static function type($path){ - return \Illuminate\Filesystem\Filesystem::type($path); - } - - /** - * Get the file size of a given file. - * - * @param string $path - * @return int - * @static - */ - public static function size($path){ - return \Illuminate\Filesystem\Filesystem::size($path); - } - - /** - * Get the file's last modification time. - * - * @param string $path - * @return int - * @static - */ - public static function lastModified($path){ - return \Illuminate\Filesystem\Filesystem::lastModified($path); - } - - /** - * Determine if the given path is a directory. - * - * @param string $directory - * @return bool - * @static - */ - public static function isDirectory($directory){ - return \Illuminate\Filesystem\Filesystem::isDirectory($directory); - } - - /** - * Determine if the given path is writable. - * - * @param string $path - * @return bool - * @static - */ - public static function isWritable($path){ - return \Illuminate\Filesystem\Filesystem::isWritable($path); - } - - /** - * Determine if the given path is a file. - * - * @param string $file - * @return bool - * @static - */ - public static function isFile($file){ - return \Illuminate\Filesystem\Filesystem::isFile($file); - } - - /** - * Find path names matching a given pattern. - * - * @param string $pattern - * @param int $flags - * @return array - * @static - */ - public static function glob($pattern, $flags = 0){ - return \Illuminate\Filesystem\Filesystem::glob($pattern, $flags); - } - - /** - * Get an array of all files in a directory. - * - * @param string $directory - * @return array - * @static - */ - public static function files($directory){ - return \Illuminate\Filesystem\Filesystem::files($directory); - } - - /** - * Get all of the files from the given directory (recursive). - * - * @param string $directory - * @return array - * @static - */ - public static function allFiles($directory){ - return \Illuminate\Filesystem\Filesystem::allFiles($directory); - } - - /** - * Get all of the directories within a given directory. - * - * @param string $directory - * @return array - * @static - */ - public static function directories($directory){ - return \Illuminate\Filesystem\Filesystem::directories($directory); - } - - /** - * Create a directory. - * - * @param string $path - * @param int $mode - * @param bool $recursive - * @param bool $force - * @return bool - * @static - */ - public static function makeDirectory($path, $mode = 511, $recursive = false, $force = false){ - return \Illuminate\Filesystem\Filesystem::makeDirectory($path, $mode, $recursive, $force); - } - - /** - * Copy a directory from one location to another. - * - * @param string $directory - * @param string $destination - * @param int $options - * @return bool - * @static - */ - public static function copyDirectory($directory, $destination, $options = null){ - return \Illuminate\Filesystem\Filesystem::copyDirectory($directory, $destination, $options); - } - - /** - * Recursively delete a directory. - * - * The directory itself may be optionally preserved. - * - * @param string $directory - * @param bool $preserve - * @return bool - * @static - */ - public static function deleteDirectory($directory, $preserve = false){ - return \Illuminate\Filesystem\Filesystem::deleteDirectory($directory, $preserve); - } - - /** - * Empty the specified directory of all files and folders. - * - * @param string $directory - * @return bool - * @static - */ - public static function cleanDirectory($directory){ - return \Illuminate\Filesystem\Filesystem::cleanDirectory($directory); - } - - } - - - class Hash extends \Illuminate\Support\Facades\Hash{ - - /** - * Hash the given value. - * - * @param string $value - * @param array $options - * @return string - * @throws \RuntimeException - * @static - */ - public static function make($value, $options = array()){ - return \Illuminate\Hashing\BcryptHasher::make($value, $options); - } - - /** - * Check the given plain value against a hash. - * - * @param string $value - * @param string $hashedValue - * @param array $options - * @return bool - * @static - */ - public static function check($value, $hashedValue, $options = array()){ - return \Illuminate\Hashing\BcryptHasher::check($value, $hashedValue, $options); - } - - /** - * Check if the given hash has been hashed using the given options. - * - * @param string $hashedValue - * @param array $options - * @return bool - * @static - */ - public static function needsRehash($hashedValue, $options = array()){ - return \Illuminate\Hashing\BcryptHasher::needsRehash($hashedValue, $options); - } - - } - - - class HTML extends \Illuminate\Support\Facades\HTML{ - - /** - * Register a custom HTML macro. - * - * @param string $name - * @param callable $macro - * @return void - * @static - */ - public static function macro($name, $macro){ - \Illuminate\Html\HtmlBuilder::macro($name, $macro); - } - - /** - * Convert an HTML string to entities. - * - * @param string $value - * @return string - * @static - */ - public static function entities($value){ - return \Illuminate\Html\HtmlBuilder::entities($value); - } - - /** - * Convert entities to HTML characters. - * - * @param string $value - * @return string - * @static - */ - public static function decode($value){ - return \Illuminate\Html\HtmlBuilder::decode($value); - } - - /** - * Generate a link to a JavaScript file. - * - * @param string $url - * @param array $attributes - * @param bool $secure - * @return string - * @static - */ - public static function script($url, $attributes = array(), $secure = null){ - return \Illuminate\Html\HtmlBuilder::script($url, $attributes, $secure); - } - - /** - * Generate a link to a CSS file. - * - * @param string $url - * @param array $attributes - * @param bool $secure - * @return string - * @static - */ - public static function style($url, $attributes = array(), $secure = null){ - return \Illuminate\Html\HtmlBuilder::style($url, $attributes, $secure); - } - - /** - * Generate an HTML image element. - * - * @param string $url - * @param string $alt - * @param array $attributes - * @param bool $secure - * @return string - * @static - */ - public static function image($url, $alt = null, $attributes = array(), $secure = null){ - return \Illuminate\Html\HtmlBuilder::image($url, $alt, $attributes, $secure); - } - - /** - * Generate a HTML link. - * - * @param string $url - * @param string $title - * @param array $attributes - * @param bool $secure - * @return string - * @static - */ - public static function link($url, $title = null, $attributes = array(), $secure = null){ - return \Illuminate\Html\HtmlBuilder::link($url, $title, $attributes, $secure); - } - - /** - * Generate a HTTPS HTML link. - * - * @param string $url - * @param string $title - * @param array $attributes - * @return string - * @static - */ - public static function secureLink($url, $title = null, $attributes = array()){ - return \Illuminate\Html\HtmlBuilder::secureLink($url, $title, $attributes); - } - - /** - * Generate a HTML link to an asset. - * - * @param string $url - * @param string $title - * @param array $attributes - * @param bool $secure - * @return string - * @static - */ - public static function linkAsset($url, $title = null, $attributes = array(), $secure = null){ - return \Illuminate\Html\HtmlBuilder::linkAsset($url, $title, $attributes, $secure); - } - - /** - * Generate a HTTPS HTML link to an asset. - * - * @param string $url - * @param string $title - * @param array $attributes - * @return string - * @static - */ - public static function linkSecureAsset($url, $title = null, $attributes = array()){ - return \Illuminate\Html\HtmlBuilder::linkSecureAsset($url, $title, $attributes); - } - - /** - * Generate a HTML link to a named route. - * - * @param string $name - * @param string $title - * @param array $parameters - * @param array $attributes - * @return string - * @static - */ - public static function linkRoute($name, $title = null, $parameters = array(), $attributes = array()){ - return \Illuminate\Html\HtmlBuilder::linkRoute($name, $title, $parameters, $attributes); - } - - /** - * Generate a HTML link to a controller action. - * - * @param string $action - * @param string $title - * @param array $parameters - * @param array $attributes - * @return string - * @static - */ - public static function linkAction($action, $title = null, $parameters = array(), $attributes = array()){ - return \Illuminate\Html\HtmlBuilder::linkAction($action, $title, $parameters, $attributes); - } - - /** - * Generate a HTML link to an email address. - * - * @param string $email - * @param string $title - * @param array $attributes - * @return string - * @static - */ - public static function mailto($email, $title = null, $attributes = array()){ - return \Illuminate\Html\HtmlBuilder::mailto($email, $title, $attributes); - } - - /** - * Obfuscate an e-mail address to prevent spam-bots from sniffing it. - * - * @param string $email - * @return string - * @static - */ - public static function email($email){ - return \Illuminate\Html\HtmlBuilder::email($email); - } - - /** - * Generate an ordered list of items. - * - * @param array $list - * @param array $attributes - * @return string - * @static - */ - public static function ol($list, $attributes = array()){ - return \Illuminate\Html\HtmlBuilder::ol($list, $attributes); - } - - /** - * Generate an un-ordered list of items. - * - * @param array $list - * @param array $attributes - * @return string - * @static - */ - public static function ul($list, $attributes = array()){ - return \Illuminate\Html\HtmlBuilder::ul($list, $attributes); - } - - /** - * Build an HTML attribute string from an array. - * - * @param array $attributes - * @return string - * @static - */ - public static function attributes($attributes){ - return \Illuminate\Html\HtmlBuilder::attributes($attributes); - } - - /** - * Obfuscate a string to prevent spam-bots from sniffing it. - * - * @param string $value - * @return string - * @static - */ - public static function obfuscate($value){ - return \Illuminate\Html\HtmlBuilder::obfuscate($value); - } - - } - - - class Input extends \Illuminate\Support\Facades\Input{ - - /** - * Return the Request instance. - * - * @return \Illuminate\Http\Request - * @static - */ - public static function instance(){ - return \Illuminate\Http\Request::instance(); - } - - /** - * Get the request method. - * - * @return string - * @static - */ - public static function method(){ - return \Illuminate\Http\Request::method(); - } - - /** - * Get the root URL for the application. - * - * @return string - * @static - */ - public static function root(){ - return \Illuminate\Http\Request::root(); - } - - /** - * Get the URL (no query string) for the request. - * - * @return string - * @static - */ - public static function url(){ - return \Illuminate\Http\Request::url(); - } - - /** - * Get the full URL for the request. - * - * @return string - * @static - */ - public static function fullUrl(){ - return \Illuminate\Http\Request::fullUrl(); - } - - /** - * Get the current path info for the request. - * - * @return string - * @static - */ - public static function path(){ - return \Illuminate\Http\Request::path(); - } - - /** - * Get the current encoded path info for the request. - * - * @return string - * @static - */ - public static function decodedPath(){ - return \Illuminate\Http\Request::decodedPath(); - } - - /** - * Get a segment from the URI (1 based index). - * - * @param string $index - * @param mixed $default - * @return string - * @static - */ - public static function segment($index, $default = null){ - return \Illuminate\Http\Request::segment($index, $default); - } - - /** - * Get all of the segments for the request path. - * - * @return array - * @static - */ - public static function segments(){ - return \Illuminate\Http\Request::segments(); - } - - /** - * Determine if the current request URI matches a pattern. - * - * @param mixed string - * @return bool - * @static - */ - public static function is(){ - return \Illuminate\Http\Request::is(); - } - - /** - * Determine if the request is the result of an AJAX call. - * - * @return bool - * @static - */ - public static function ajax(){ - return \Illuminate\Http\Request::ajax(); - } - - /** - * Determine if the request is over HTTPS. - * - * @return bool - * @static - */ - public static function secure(){ - return \Illuminate\Http\Request::secure(); - } - - /** - * Determine if the request contains a given input item. - * - * @param string|array $key - * @return bool - * @static - */ - public static function has($key){ - return \Illuminate\Http\Request::has($key); - } - - /** - * Get all of the input and files for the request. - * - * @return array - * @static - */ - public static function all(){ - return \Illuminate\Http\Request::all(); - } - - /** - * Retrieve an input item from the request. - * - * @param string $key - * @param mixed $default - * @return string - * @static - */ - public static function input($key = null, $default = null){ - return \Illuminate\Http\Request::input($key, $default); - } - - /** - * Get a subset of the items from the input data. - * - * @param array $keys - * @return array - * @static - */ - public static function only($keys){ - return \Illuminate\Http\Request::only($keys); - } - - /** - * Get all of the input except for a specified array of items. - * - * @param array $keys - * @return array - * @static - */ - public static function except($keys){ - return \Illuminate\Http\Request::except($keys); - } - - /** - * Retrieve a query string item from the request. - * - * @param string $key - * @param mixed $default - * @return string - * @static - */ - public static function query($key = null, $default = null){ - return \Illuminate\Http\Request::query($key, $default); - } - - /** - * Determine if a cookie is set on the request. - * - * @param string $key - * @return bool - * @static - */ - public static function hasCookie($key){ - return \Illuminate\Http\Request::hasCookie($key); - } - - /** - * Retrieve a cookie from the request. - * - * @param string $key - * @param mixed $default - * @return string - * @static - */ - public static function cookie($key = null, $default = null){ - return \Illuminate\Http\Request::cookie($key, $default); - } - - /** - * Retrieve a file from the request. - * - * @param string $key - * @param mixed $default - * @return \Symfony\Component\HttpFoundation\File\UploadedFile|array - * @static - */ - public static function file($key = null, $default = null){ - return \Illuminate\Http\Request::file($key, $default); - } - - /** - * Determine if the uploaded data contains a file. - * - * @param string $key - * @return bool - * @static - */ - public static function hasFile($key){ - return \Illuminate\Http\Request::hasFile($key); - } - - /** - * Retrieve a header from the request. - * - * @param string $key - * @param mixed $default - * @return string - * @static - */ - public static function header($key = null, $default = null){ - return \Illuminate\Http\Request::header($key, $default); - } - - /** - * Retrieve a server variable from the request. - * - * @param string $key - * @param mixed $default - * @return string - * @static - */ - public static function server($key = null, $default = null){ - return \Illuminate\Http\Request::server($key, $default); - } - - /** - * Retrieve an old input item. - * - * @param string $key - * @param mixed $default - * @return mixed - * @static - */ - public static function old($key = null, $default = null){ - return \Illuminate\Http\Request::old($key, $default); - } - - /** - * Flash the input for the current request to the session. - * - * @param string $filter - * @param array $keys - * @return void - * @static - */ - public static function flash($filter = null, $keys = array()){ - \Illuminate\Http\Request::flash($filter, $keys); - } - - /** - * Flash only some of the input to the session. - * - * @param mixed string - * @return void - * @static - */ - public static function flashOnly($keys){ - \Illuminate\Http\Request::flashOnly($keys); - } - - /** - * Flash only some of the input to the session. - * - * @param mixed string - * @return void - * @static - */ - public static function flashExcept($keys){ - \Illuminate\Http\Request::flashExcept($keys); - } - - /** - * Flush all of the old input from the session. - * - * @return void - * @static - */ - public static function flush(){ - \Illuminate\Http\Request::flush(); - } - - /** - * Merge new input into the current request's input array. - * - * @param array $input - * @return void - * @static - */ - public static function merge($input){ - \Illuminate\Http\Request::merge($input); - } - - /** - * Replace the input for the current request. - * - * @param array $input - * @return void - * @static - */ - public static function replace($input){ - \Illuminate\Http\Request::replace($input); - } - - /** - * Get the JSON payload for the request. - * - * @param string $key - * @param mixed $default - * @return mixed - * @static - */ - public static function json($key = null, $default = null){ - return \Illuminate\Http\Request::json($key, $default); - } - - /** - * Determine if the request is sending JSON. - * - * @return bool - * @static - */ - public static function isJson(){ - return \Illuminate\Http\Request::isJson(); - } - - /** - * Determine if the current request is asking for JSON in return. - * - * @return bool - * @static - */ - public static function wantsJson(){ - return \Illuminate\Http\Request::wantsJson(); - } - - /** - * Get the data format expected in the response. - * - * @return string - * @static - */ - public static function format($default = 'html'){ - return \Illuminate\Http\Request::format($default); - } - - /** - * Create an Illuminate request from a Symfony instance. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @return \Illuminate\Http\Request - * @static - */ - public static function createFromBase($request){ - return \Illuminate\Http\Request::createFromBase($request); - } - - /** - * Get the session associated with the request. - * - * @return \Illuminate\Session\Store - * @throws \RuntimeException - * @static - */ - public static function session(){ - return \Illuminate\Http\Request::session(); - } - - /** - * Sets the parameters for this request. - * - * This method also re-initializes all properties. - * - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @param string $content The raw body data - * @api - * @static - */ - public static function initialize($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::initialize($query, $request, $attributes, $cookies, $files, $server, $content); - } - - /** - * Creates a new request with values from PHP's super globals. - * - * @return \Symfony\Component\HttpFoundation\Request A new request - * @api - * @static - */ - public static function createFromGlobals(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::createFromGlobals(); - } - - /** - * Creates a Request based on a given URI and configuration. - * - * The information contained in the URI always take precedence - * over the other information (server and parameters). - * - * @param string $uri The URI - * @param string $method The HTTP method - * @param array $parameters The query (GET) or request (POST) parameters - * @param array $cookies The request cookies ($_COOKIE) - * @param array $files The request files ($_FILES) - * @param array $server The server parameters ($_SERVER) - * @param string $content The raw body data - * @return \Symfony\Component\HttpFoundation\Request A Request instance - * @api - * @static - */ - public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::create($uri, $method, $parameters, $cookies, $files, $server, $content); - } - - /** - * Sets a callable able to create a Request instance. - * - * This is mainly useful when you need to override the Request class - * to keep BC with an existing system. It should not be used for any - * other purpose. - * - * @param callable|null $callable A PHP callable - * @static - */ - public static function setFactory($callable){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setFactory($callable); - } - - /** - * Clones a request and overrides some of its parameters. - * - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @return \Symfony\Component\HttpFoundation\Request The duplicated request - * @api - * @static - */ - public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::duplicate($query, $request, $attributes, $cookies, $files, $server); - } - - /** - * Overrides the PHP global variables according to this request instance. - * - * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE. - * $_FILES is never override, see rfc1867 - * - * @api - * @static - */ - public static function overrideGlobals(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::overrideGlobals(); - } - - /** - * Sets a list of trusted proxies. - * - * You should only list the reverse proxies that you manage directly. - * - * @param array $proxies A list of trusted proxies - * @api - * @static - */ - public static function setTrustedProxies($proxies){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setTrustedProxies($proxies); - } - - /** - * Gets the list of trusted proxies. - * - * @return array An array of trusted proxies. - * @static - */ - public static function getTrustedProxies(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getTrustedProxies(); - } - - /** - * Sets a list of trusted host patterns. - * - * You should only list the hosts you manage using regexs. - * - * @param array $hostPatterns A list of trusted host patterns - * @static - */ - public static function setTrustedHosts($hostPatterns){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setTrustedHosts($hostPatterns); - } - - /** - * Gets the list of trusted host patterns. - * - * @return array An array of trusted host patterns. - * @static - */ - public static function getTrustedHosts(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getTrustedHosts(); - } - - /** - * Sets the name for trusted headers. - * - * The following header keys are supported: - * - * * Request::HEADER_CLIENT_IP: defaults to X-Forwarded-For (see getClientIp()) - * * Request::HEADER_CLIENT_HOST: defaults to X-Forwarded-Host (see getClientHost()) - * * Request::HEADER_CLIENT_PORT: defaults to X-Forwarded-Port (see getClientPort()) - * * Request::HEADER_CLIENT_PROTO: defaults to X-Forwarded-Proto (see getScheme() and isSecure()) - * - * Setting an empty value allows to disable the trusted header for the given key. - * - * @param string $key The header key - * @param string $value The header name - * @throws \InvalidArgumentException - * @static - */ - public static function setTrustedHeaderName($key, $value){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setTrustedHeaderName($key, $value); - } - - /** - * Gets the trusted proxy header name. - * - * @param string $key The header key - * @return string The header name - * @throws \InvalidArgumentException - * @static - */ - public static function getTrustedHeaderName($key){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getTrustedHeaderName($key); - } - - /** - * Normalizes a query string. - * - * It builds a normalized query string, where keys/value pairs are alphabetized, - * have consistent escaping and unneeded delimiters are removed. - * - * @param string $qs Query string - * @return string A normalized query string for the Request - * @static - */ - public static function normalizeQueryString($qs){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::normalizeQueryString($qs); - } - - /** - * Enables support for the _method request parameter to determine the intended HTTP method. - * - * Be warned that enabling this feature might lead to CSRF issues in your code. - * Check that you are using CSRF tokens when required. - * - * The HTTP method can only be overridden when the real HTTP method is POST. - * - * @static - */ - public static function enableHttpMethodParameterOverride(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::enableHttpMethodParameterOverride(); - } - - /** - * Checks whether support for the _method request parameter is enabled. - * - * @return bool True when the _method request parameter is enabled, false otherwise - * @static - */ - public static function getHttpMethodParameterOverride(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getHttpMethodParameterOverride(); - } - - /** - * Gets a "parameter" value. - * - * This method is mainly useful for libraries that want to provide some flexibility. - * - * Order of precedence: GET, PATH, POST - * - * Avoid using this method in controllers: - * - * * slow - * * prefer to get from a "named" source - * - * It is better to explicitly get request parameters from the appropriate - * public property instead (query, attributes, request). - * - * @param string $key the key - * @param mixed $default the default value - * @param bool $deep is parameter deep in multidimensional array - * @return mixed - * @static - */ - public static function get($key, $default = null, $deep = false){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::get($key, $default, $deep); - } - - /** - * Gets the Session. - * - * @return \Symfony\Component\HttpFoundation\SessionInterface|null The session - * @api - * @static - */ - public static function getSession(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getSession(); - } - - /** - * Whether the request contains a Session which was started in one of the - * previous requests. - * - * @return bool - * @api - * @static - */ - public static function hasPreviousSession(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::hasPreviousSession(); - } - - /** - * Whether the request contains a Session object. - * - * This method does not give any information about the state of the session object, - * like whether the session is started or not. It is just a way to check if this Request - * is associated with a Session instance. - * - * @return bool true when the Request contains a Session object, false otherwise - * @api - * @static - */ - public static function hasSession(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::hasSession(); - } - - /** - * Sets the Session. - * - * @param \Symfony\Component\HttpFoundation\SessionInterface $session The Session - * @api - * @static - */ - public static function setSession($session){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setSession($session); - } - - /** - * Returns the client IP addresses. - * - * In the returned array the most trusted IP address is first, and the - * least trusted one last. The "real" client IP address is the last one, - * but this is also the least trusted one. Trusted proxies are stripped. - * - * Use this method carefully; you should use getClientIp() instead. - * - * @return array The client IP addresses - * @see getClientIp() - * @static - */ - public static function getClientIps(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getClientIps(); - } - - /** - * Returns the client IP address. - * - * This method can read the client IP address from the "X-Forwarded-For" header - * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For" - * header value is a comma+space separated list of IP addresses, the left-most - * being the original client, and each successive proxy that passed the request - * adding the IP address where it received the request from. - * - * If your reverse proxy uses a different header name than "X-Forwarded-For", - * ("Client-Ip" for instance), configure it via "setTrustedHeaderName()" with - * the "client-ip" key. - * - * @return string The client IP address - * @see getClientIps() - * @see http://en.wikipedia.org/wiki/X-Forwarded-For - * @api - * @static - */ - public static function getClientIp(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getClientIp(); - } - - /** - * Returns current script name. - * - * @return string - * @api - * @static - */ - public static function getScriptName(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getScriptName(); - } - - /** - * Returns the path being requested relative to the executed script. - * - * The path info always starts with a /. - * - * Suppose this request is instantiated from /mysite on localhost: - * - * * http://localhost/mysite returns an empty string - * * http://localhost/mysite/about returns '/about' - * * http://localhost/mysite/enco%20ded returns '/enco%20ded' - * * http://localhost/mysite/about?var=1 returns '/about' - * - * @return string The raw path (i.e. not urldecoded) - * @api - * @static - */ - public static function getPathInfo(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getPathInfo(); - } - - /** - * Returns the root path from which this request is executed. - * - * Suppose that an index.php file instantiates this request object: - * - * * http://localhost/index.php returns an empty string - * * http://localhost/index.php/page returns an empty string - * * http://localhost/web/index.php returns '/web' - * * http://localhost/we%20b/index.php returns '/we%20b' - * - * @return string The raw path (i.e. not urldecoded) - * @api - * @static - */ - public static function getBasePath(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getBasePath(); - } - - /** - * Returns the root URL from which this request is executed. - * - * The base URL never ends with a /. - * - * This is similar to getBasePath(), except that it also includes the - * script filename (e.g. index.php) if one exists. - * - * @return string The raw URL (i.e. not urldecoded) - * @api - * @static - */ - public static function getBaseUrl(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getBaseUrl(); - } - - /** - * Gets the request's scheme. - * - * @return string - * @api - * @static - */ - public static function getScheme(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getScheme(); - } - - /** - * Returns the port on which the request is made. - * - * This method can read the client port from the "X-Forwarded-Port" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Port" header must contain the client port. - * - * If your reverse proxy uses a different header name than "X-Forwarded-Port", - * configure it via "setTrustedHeaderName()" with the "client-port" key. - * - * @return string - * @api - * @static - */ - public static function getPort(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getPort(); - } - - /** - * Returns the user. - * - * @return string|null - * @static - */ - public static function getUser(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getUser(); - } - - /** - * Returns the password. - * - * @return string|null - * @static - */ - public static function getPassword(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getPassword(); - } - - /** - * Gets the user info. - * - * @return string A user name and, optionally, scheme-specific information about how to gain authorization to access the server - * @static - */ - public static function getUserInfo(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getUserInfo(); - } - - /** - * Returns the HTTP host being requested. - * - * The port name will be appended to the host if it's non-standard. - * - * @return string - * @api - * @static - */ - public static function getHttpHost(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getHttpHost(); - } - - /** - * Returns the requested URI (path and query string). - * - * @return string The raw URI (i.e. not URI decoded) - * @api - * @static - */ - public static function getRequestUri(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getRequestUri(); - } - - /** - * Gets the scheme and HTTP host. - * - * If the URL was called with basic authentication, the user - * and the password are not added to the generated string. - * - * @return string The scheme and HTTP host - * @static - */ - public static function getSchemeAndHttpHost(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getSchemeAndHttpHost(); - } - - /** - * Generates a normalized URI (URL) for the Request. - * - * @return string A normalized URI (URL) for the Request - * @see getQueryString() - * @api - * @static - */ - public static function getUri(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getUri(); - } - - /** - * Generates a normalized URI for the given path. - * - * @param string $path A path to use instead of the current one - * @return string The normalized URI for the path - * @api - * @static - */ - public static function getUriForPath($path){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getUriForPath($path); - } - - /** - * Generates the normalized query string for the Request. - * - * It builds a normalized query string, where keys/value pairs are alphabetized - * and have consistent escaping. - * - * @return string|null A normalized query string for the Request - * @api - * @static - */ - public static function getQueryString(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getQueryString(); - } - - /** - * Checks whether the request is secure or not. - * - * This method can read the client port from the "X-Forwarded-Proto" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http". - * - * If your reverse proxy uses a different header name than "X-Forwarded-Proto" - * ("SSL_HTTPS" for instance), configure it via "setTrustedHeaderName()" with - * the "client-proto" key. - * - * @return bool - * @api - * @static - */ - public static function isSecure(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::isSecure(); - } - - /** - * Returns the host name. - * - * This method can read the client port from the "X-Forwarded-Host" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Host" header must contain the client host name. - * - * If your reverse proxy uses a different header name than "X-Forwarded-Host", - * configure it via "setTrustedHeaderName()" with the "client-host" key. - * - * @return string - * @throws \UnexpectedValueException when the host name is invalid - * @api - * @static - */ - public static function getHost(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getHost(); - } - - /** - * Sets the request method. - * - * @param string $method - * @api - * @static - */ - public static function setMethod($method){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setMethod($method); - } - - /** - * Gets the request "intended" method. - * - * If the X-HTTP-Method-Override header is set, and if the method is a POST, - * then it is used to determine the "real" intended HTTP method. - * - * The _method request parameter can also be used to determine the HTTP method, - * but only if enableHttpMethodParameterOverride() has been called. - * - * The method is always an uppercased string. - * - * @return string The request method - * @api - * @see getRealMethod - * @static - */ - public static function getMethod(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getMethod(); - } - - /** - * Gets the "real" request method. - * - * @return string The request method - * @see getMethod - * @static - */ - public static function getRealMethod(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getRealMethod(); - } - - /** - * Gets the mime type associated with the format. - * - * @param string $format The format - * @return string The associated mime type (null if not found) - * @api - * @static - */ - public static function getMimeType($format){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getMimeType($format); - } - - /** - * Gets the format associated with the mime type. - * - * @param string $mimeType The associated mime type - * @return string|null The format (null if not found) - * @api - * @static - */ - public static function getFormat($mimeType){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getFormat($mimeType); - } - - /** - * Associates a format with mime types. - * - * @param string $format The format - * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type) - * @api - * @static - */ - public static function setFormat($format, $mimeTypes){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setFormat($format, $mimeTypes); - } - - /** - * Gets the request format. - * - * Here is the process to determine the format: - * - * * format defined by the user (with setRequestFormat()) - * * _format request parameter - * * $default - * - * @param string $default The default format - * @return string The request format - * @api - * @static - */ - public static function getRequestFormat($default = 'html'){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getRequestFormat($default); - } - - /** - * Sets the request format. - * - * @param string $format The request format. - * @api - * @static - */ - public static function setRequestFormat($format){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setRequestFormat($format); - } - - /** - * Gets the format associated with the request. - * - * @return string|null The format (null if no content type is present) - * @api - * @static - */ - public static function getContentType(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getContentType(); - } - - /** - * Sets the default locale. - * - * @param string $locale - * @api - * @static - */ - public static function setDefaultLocale($locale){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setDefaultLocale($locale); - } - - /** - * Get the default locale. - * - * @return string - * @static - */ - public static function getDefaultLocale(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getDefaultLocale(); - } - - /** - * Sets the locale. - * - * @param string $locale - * @api - * @static - */ - public static function setLocale($locale){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setLocale($locale); - } - - /** - * Get the locale. - * - * @return string - * @static - */ - public static function getLocale(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getLocale(); - } - - /** - * Checks if the request method is of specified type. - * - * @param string $method Uppercase request method (GET, POST etc). - * @return bool - * @static - */ - public static function isMethod($method){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::isMethod($method); - } - - /** - * Checks whether the method is safe or not. - * - * @return bool - * @api - * @static - */ - public static function isMethodSafe(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::isMethodSafe(); - } - - /** - * Returns the request body content. - * - * @param bool $asResource If true, a resource will be returned - * @return string|resource The request body content or a resource to read the body stream. - * @throws \LogicException - * @static - */ - public static function getContent($asResource = false){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getContent($asResource); - } - - /** - * Gets the Etags. - * - * @return array The entity tags - * @static - */ - public static function getETags(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getETags(); - } - - /** - * - * - * @return bool - * @static - */ - public static function isNoCache(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::isNoCache(); - } - - /** - * Returns the preferred language. - * - * @param array $locales An array of ordered available locales - * @return string|null The preferred locale - * @api - * @static - */ - public static function getPreferredLanguage($locales = null){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getPreferredLanguage($locales); - } - - /** - * Gets a list of languages acceptable by the client browser. - * - * @return array Languages ordered in the user browser preferences - * @api - * @static - */ - public static function getLanguages(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getLanguages(); - } - - /** - * Gets a list of charsets acceptable by the client browser. - * - * @return array List of charsets in preferable order - * @api - * @static - */ - public static function getCharsets(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getCharsets(); - } - - /** - * Gets a list of encodings acceptable by the client browser. - * - * @return array List of encodings in preferable order - * @static - */ - public static function getEncodings(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getEncodings(); - } - - /** - * Gets a list of content types acceptable by the client browser - * - * @return array List of content types in preferable order - * @api - * @static - */ - public static function getAcceptableContentTypes(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getAcceptableContentTypes(); - } - - /** - * Returns true if the request is a XMLHttpRequest. - * - * It works if your JavaScript library set an X-Requested-With HTTP header. - * It is known to work with common JavaScript frameworks: - * - * @link http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript - * @return bool true if the request is an XMLHttpRequest, false otherwise - * @api - * @static - */ - public static function isXmlHttpRequest(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::isXmlHttpRequest(); - } - - } - - - class Lang extends \Illuminate\Support\Facades\Lang{ - - /** - * Determine if a translation exists. - * - * @param string $key - * @param string $locale - * @return bool - * @static - */ - public static function has($key, $locale = null){ - return \Illuminate\Translation\Translator::has($key, $locale); - } - - /** - * Get the translation for the given key. - * - * @param string $key - * @param array $replace - * @param string $locale - * @return string - * @static - */ - public static function get($key, $replace = array(), $locale = null){ - return \Illuminate\Translation\Translator::get($key, $replace, $locale); - } - - /** - * Get a translation according to an integer value. - * - * @param string $key - * @param int $number - * @param array $replace - * @param string $locale - * @return string - * @static - */ - public static function choice($key, $number, $replace = array(), $locale = null){ - return \Illuminate\Translation\Translator::choice($key, $number, $replace, $locale); - } - - /** - * Get the translation for a given key. - * - * @param string $id - * @param array $parameters - * @param string $domain - * @param string $locale - * @return string - * @static - */ - public static function trans($id, $parameters = array(), $domain = 'messages', $locale = null){ - return \Illuminate\Translation\Translator::trans($id, $parameters, $domain, $locale); - } - - /** - * Get a translation according to an integer value. - * - * @param string $id - * @param int $number - * @param array $parameters - * @param string $domain - * @param string $locale - * @return string - * @static - */ - public static function transChoice($id, $number, $parameters = array(), $domain = 'messages', $locale = null){ - return \Illuminate\Translation\Translator::transChoice($id, $number, $parameters, $domain, $locale); - } - - /** - * Load the specified language group. - * - * @param string $namespace - * @param string $group - * @param string $locale - * @return void - * @static - */ - public static function load($namespace, $group, $locale){ - \Illuminate\Translation\Translator::load($namespace, $group, $locale); - } - - /** - * Add a new namespace to the loader. - * - * @param string $namespace - * @param string $hint - * @return void - * @static - */ - public static function addNamespace($namespace, $hint){ - \Illuminate\Translation\Translator::addNamespace($namespace, $hint); - } - - /** - * Parse a key into namespace, group, and item. - * - * @param string $key - * @return array - * @static - */ - public static function parseKey($key){ - return \Illuminate\Translation\Translator::parseKey($key); - } - - /** - * Get the message selector instance. - * - * @return \Symfony\Component\Translation\MessageSelector - * @static - */ - public static function getSelector(){ - return \Illuminate\Translation\Translator::getSelector(); - } - - /** - * Set the message selector instance. - * - * @param \Symfony\Component\Translation\MessageSelector $selector - * @return void - * @static - */ - public static function setSelector($selector){ - \Illuminate\Translation\Translator::setSelector($selector); - } - - /** - * Get the language line loader implementation. - * - * @return \Illuminate\Translation\LoaderInterface - * @static - */ - public static function getLoader(){ - return \Illuminate\Translation\Translator::getLoader(); - } - - /** - * Get the default locale being used. - * - * @return string - * @static - */ - public static function locale(){ - return \Illuminate\Translation\Translator::locale(); - } - - /** - * Get the default locale being used. - * - * @return string - * @static - */ - public static function getLocale(){ - return \Illuminate\Translation\Translator::getLocale(); - } - - /** - * Set the default locale. - * - * @param string $locale - * @return void - * @static - */ - public static function setLocale($locale){ - \Illuminate\Translation\Translator::setLocale($locale); - } - - /** - * Set the fallback locale being used. - * - * @return string - * @static - */ - public static function getFallback(){ - return \Illuminate\Translation\Translator::getFallback(); - } - - /** - * Set the fallback locale being used. - * - * @param string $fallback - * @return void - * @static - */ - public static function setFallback($fallback){ - \Illuminate\Translation\Translator::setFallback($fallback); - } - - /** - * Set the parsed value of a key. - * - * @param string $key - * @param array $parsed - * @return void - * @static - */ - public static function setParsedKey($key, $parsed){ - //Method inherited from \Illuminate\Support\NamespacedItemResolver - \Illuminate\Translation\Translator::setParsedKey($key, $parsed); - } - - } - - - class Log extends \Illuminate\Support\Facades\Log{ - - /** - * Adds a log record at the DEBUG level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - * @static - */ - public static function debug($message, $context = array()){ - return \Monolog\Logger::debug($message, $context); - } - - /** - * Adds a log record at the INFO level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - * @static - */ - public static function info($message, $context = array()){ - return \Monolog\Logger::info($message, $context); - } - - /** - * Adds a log record at the NOTICE level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - * @static - */ - public static function notice($message, $context = array()){ - return \Monolog\Logger::notice($message, $context); - } - - /** - * Adds a log record at the WARNING level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - * @static - */ - public static function warning($message, $context = array()){ - return \Monolog\Logger::warning($message, $context); - } - - /** - * Adds a log record at the ERROR level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - * @static - */ - public static function error($message, $context = array()){ - return \Monolog\Logger::error($message, $context); - } - - /** - * Adds a log record at the CRITICAL level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - * @static - */ - public static function critical($message, $context = array()){ - return \Monolog\Logger::critical($message, $context); - } - - /** - * Adds a log record at the ALERT level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - * @static - */ - public static function alert($message, $context = array()){ - return \Monolog\Logger::alert($message, $context); - } - - /** - * Adds a log record at the EMERGENCY level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - * @static - */ - public static function emergency($message, $context = array()){ - return \Monolog\Logger::emergency($message, $context); - } - - /** - * Register a file log handler. - * - * @param string $path - * @param string $level - * @return void - * @static - */ - public static function useFiles($path, $level = 'debug'){ - \Illuminate\Log\Writer::useFiles($path, $level); - } - - /** - * Register a daily file log handler. - * - * @param string $path - * @param int $days - * @param string $level - * @return void - * @static - */ - public static function useDailyFiles($path, $days = 0, $level = 'debug'){ - \Illuminate\Log\Writer::useDailyFiles($path, $days, $level); - } - - /** - * Register a new callback handler for when - * a log event is triggered. - * - * @param \Closure $callback - * @return void - * @throws \RuntimeException - * @static - */ - public static function listen($callback){ - \Illuminate\Log\Writer::listen($callback); - } - - /** - * Get the underlying Monolog instance. - * - * @return \Monolog\Logger - * @static - */ - public static function getMonolog(){ - return \Illuminate\Log\Writer::getMonolog(); - } - - /** - * Get the event dispatcher instance. - * - * @return \Illuminate\Events\Dispatcher - * @static - */ - public static function getEventDispatcher(){ - return \Illuminate\Log\Writer::getEventDispatcher(); - } - - /** - * Set the event dispatcher instance. - * - * @param \Illuminate\Events\Dispatcher - * @return void - * @static - */ - public static function setEventDispatcher($dispatcher){ - \Illuminate\Log\Writer::setEventDispatcher($dispatcher); - } - - /** - * Dynamically pass log calls into the writer. - * - * @param mixed (level, param, param) - * @return mixed - * @static - */ - public static function write(){ - return \Illuminate\Log\Writer::write(); - } - - } - - - class Mail extends \Illuminate\Support\Facades\Mail{ - - /** - * Set the global from address and name. - * - * @param string $address - * @param string $name - * @return void - * @static - */ - public static function alwaysFrom($address, $name = null){ - \Illuminate\Mail\Mailer::alwaysFrom($address, $name); - } - - /** - * Send a new message when only a plain part. - * - * @param string $view - * @param array $data - * @param mixed $callback - * @return int - * @static - */ - public static function plain($view, $data, $callback){ - return \Illuminate\Mail\Mailer::plain($view, $data, $callback); - } - - /** - * Send a new message using a view. - * - * @param string|array $view - * @param array $data - * @param \Closure|string $callback - * @return int - * @static - */ - public static function send($view, $data, $callback){ - return \Illuminate\Mail\Mailer::send($view, $data, $callback); - } - - /** - * Queue a new e-mail message for sending. - * - * @param string|array $view - * @param array $data - * @param \Closure|string $callback - * @param string $queue - * @return void - * @static - */ - public static function queue($view, $data, $callback, $queue = null){ - \Illuminate\Mail\Mailer::queue($view, $data, $callback, $queue); - } - - /** - * Queue a new e-mail message for sending on the given queue. - * - * @param string $queue - * @param string|array $view - * @param array $data - * @param \Closure|string $callback - * @return void - * @static - */ - public static function queueOn($queue, $view, $data, $callback){ - \Illuminate\Mail\Mailer::queueOn($queue, $view, $data, $callback); - } - - /** - * Queue a new e-mail message for sending after (n) seconds. - * - * @param int $delay - * @param string|array $view - * @param array $data - * @param \Closure|string $callback - * @param string $queue - * @return void - * @static - */ - public static function later($delay, $view, $data, $callback, $queue = null){ - \Illuminate\Mail\Mailer::later($delay, $view, $data, $callback, $queue); - } - - /** - * Queue a new e-mail message for sending after (n) seconds on the given queue. - * - * @param string $queue - * @param int $delay - * @param string|array $view - * @param array $data - * @param \Closure|string $callback - * @return void - * @static - */ - public static function laterOn($queue, $delay, $view, $data, $callback){ - \Illuminate\Mail\Mailer::laterOn($queue, $delay, $view, $data, $callback); - } - - /** - * Handle a queued e-mail message job. - * - * @param \Illuminate\Queue\Jobs\Job $job - * @param array $data - * @return void - * @static - */ - public static function handleQueuedMessage($job, $data){ - \Illuminate\Mail\Mailer::handleQueuedMessage($job, $data); - } - - /** - * Tell the mailer to not really send messages. - * - * @param bool $value - * @return void - * @static - */ - public static function pretend($value = true){ - \Illuminate\Mail\Mailer::pretend($value); - } - - /** - * Get the view environment instance. - * - * @return \Illuminate\View\Environment - * @static - */ - public static function getViewEnvironment(){ - return \Illuminate\Mail\Mailer::getViewEnvironment(); - } - - /** - * Get the Swift Mailer instance. - * - * @return \Swift_Mailer - * @static - */ - public static function getSwiftMailer(){ - return \Illuminate\Mail\Mailer::getSwiftMailer(); - } - - /** - * Get the array of failed recipients. - * - * @return array - * @static - */ - public static function failures(){ - return \Illuminate\Mail\Mailer::failures(); - } - - /** - * Set the Swift Mailer instance. - * - * @param \Swift_Mailer $swift - * @return void - * @static - */ - public static function setSwiftMailer($swift){ - \Illuminate\Mail\Mailer::setSwiftMailer($swift); - } - - /** - * Set the log writer instance. - * - * @param \Illuminate\Log\Writer $logger - * @return \Illuminate\Mail\Mailer - * @static - */ - public static function setLogger($logger){ - return \Illuminate\Mail\Mailer::setLogger($logger); - } - - /** - * Set the queue manager instance. - * - * @param \Illuminate\Queue\QueueManager $queue - * @return \Illuminate\Mail\Mailer - * @static - */ - public static function setQueue($queue){ - return \Illuminate\Mail\Mailer::setQueue($queue); - } - - /** - * Set the IoC container instance. - * - * @param \Illuminate\Container\Container $container - * @return void - * @static - */ - public static function setContainer($container){ - \Illuminate\Mail\Mailer::setContainer($container); - } - - } - - - class Paginator extends \Bootstrapper\Paginator{ - - /** - * Get a new paginator instance. - * - * @param array $items - * @param int $total - * @param int $perPage - * @return \Illuminate\Pagination\Paginator - * @static - */ - public static function make($items, $total, $perPage){ - return \Illuminate\Pagination\Environment::make($items, $total, $perPage); - } - - /** - * Get the pagination view. - * - * @param \Illuminate\Pagination\Paginator $paginator - * @param string $view - * @return \Illuminate\View\View - * @static - */ - public static function getPaginationView($paginator, $view = null){ - return \Illuminate\Pagination\Environment::getPaginationView($paginator, $view); - } - - /** - * Get the number of the current page. - * - * @return int - * @static - */ - public static function getCurrentPage(){ - return \Illuminate\Pagination\Environment::getCurrentPage(); - } - - /** - * Set the number of the current page. - * - * @param int $number - * @return void - * @static - */ - public static function setCurrentPage($number){ - \Illuminate\Pagination\Environment::setCurrentPage($number); - } - - /** - * Get the root URL for the request. - * - * @return string - * @static - */ - public static function getCurrentUrl(){ - return \Illuminate\Pagination\Environment::getCurrentUrl(); - } - - /** - * Set the base URL in use by the paginator. - * - * @param string $baseUrl - * @return void - * @static - */ - public static function setBaseUrl($baseUrl){ - \Illuminate\Pagination\Environment::setBaseUrl($baseUrl); - } - - /** - * Set the input page parameter name used by the paginator. - * - * @param string $pageName - * @return void - * @static - */ - public static function setPageName($pageName){ - \Illuminate\Pagination\Environment::setPageName($pageName); - } - - /** - * Get the input page parameter name used by the paginator. - * - * @return string - * @static - */ - public static function getPageName(){ - return \Illuminate\Pagination\Environment::getPageName(); - } - - /** - * Get the name of the pagination view. - * - * @param string $view - * @return string - * @static - */ - public static function getViewName($view = null){ - return \Illuminate\Pagination\Environment::getViewName($view); - } - - /** - * Set the name of the pagination view. - * - * @param string $viewName - * @return void - * @static - */ - public static function setViewName($viewName){ - \Illuminate\Pagination\Environment::setViewName($viewName); - } - - /** - * Get the locale of the paginator. - * - * @return string - * @static - */ - public static function getLocale(){ - return \Illuminate\Pagination\Environment::getLocale(); - } - - /** - * Set the locale of the paginator. - * - * @param string $locale - * @return void - * @static - */ - public static function setLocale($locale){ - \Illuminate\Pagination\Environment::setLocale($locale); - } - - /** - * Get the active request instance. - * - * @return \Symfony\Component\HttpFoundation\Request - * @static - */ - public static function getRequest(){ - return \Illuminate\Pagination\Environment::getRequest(); - } - - /** - * Set the active request instance. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @return void - * @static - */ - public static function setRequest($request){ - \Illuminate\Pagination\Environment::setRequest($request); - } - - /** - * Get the current view driver. - * - * @return \Illuminate\View\Environment - * @static - */ - public static function getViewDriver(){ - return \Illuminate\Pagination\Environment::getViewDriver(); - } - - /** - * Set the current view driver. - * - * @param \Illuminate\View\Environment $view - * @return void - * @static - */ - public static function setViewDriver($view){ - \Illuminate\Pagination\Environment::setViewDriver($view); - } - - /** - * Get the translator instance. - * - * @return \Symfony\Component\Translation\TranslatorInterface - * @static - */ - public static function getTranslator(){ - return \Illuminate\Pagination\Environment::getTranslator(); - } - - } - - - class Password extends \Illuminate\Support\Facades\Password{ - - /** - * Send a password reminder to a user. - * - * @param array $credentials - * @param \Closure $callback - * @return string - * @static - */ - public static function remind($credentials, $callback = null){ - return \Illuminate\Auth\Reminders\PasswordBroker::remind($credentials, $callback); - } - - /** - * Send the password reminder e-mail. - * - * @param \Illuminate\Auth\Reminders\RemindableInterface $user - * @param string $token - * @param \Closure $callback - * @return void - * @static - */ - public static function sendReminder($user, $token, $callback = null){ - \Illuminate\Auth\Reminders\PasswordBroker::sendReminder($user, $token, $callback); - } - - /** - * Reset the password for the given token. - * - * @param array $credentials - * @param \Closure $callback - * @return mixed - * @static - */ - public static function reset($credentials, $callback){ - return \Illuminate\Auth\Reminders\PasswordBroker::reset($credentials, $callback); - } - - /** - * Set a custom password validator. - * - * @param \Closure $callback - * @return void - * @static - */ - public static function validator($callback){ - \Illuminate\Auth\Reminders\PasswordBroker::validator($callback); - } - - /** - * Get the user for the given credentials. - * - * @param array $credentials - * @return \Illuminate\Auth\Reminders\RemindableInterface - * @throws \UnexpectedValueException - * @static - */ - public static function getUser($credentials){ - return \Illuminate\Auth\Reminders\PasswordBroker::getUser($credentials); - } - - } - - - class Queue extends \Illuminate\Support\Facades\Queue{ - - /** - * Register an event listener for the failed job event. - * - * @param mixed $callback - * @return void - * @static - */ - public static function failing($callback){ - \Illuminate\Queue\QueueManager::failing($callback); - } - - /** - * Determine if the driver is connected. - * - * @param string $name - * @return bool - * @static - */ - public static function connected($name = null){ - return \Illuminate\Queue\QueueManager::connected($name); - } - - /** - * Resolve a queue connection instance. - * - * @param string $name - * @return \Illuminate\Queue\SyncQueue - * @static - */ - public static function connection($name = null){ - return \Illuminate\Queue\QueueManager::connection($name); - } - - /** - * Add a queue connection resolver. - * - * @param string $driver - * @param \Closure $resolver - * @return void - * @static - */ - public static function extend($driver, $resolver){ - \Illuminate\Queue\QueueManager::extend($driver, $resolver); - } - - /** - * Add a queue connection resolver. - * - * @param string $driver - * @param \Closure $resolver - * @return void - * @static - */ - public static function addConnector($driver, $resolver){ - \Illuminate\Queue\QueueManager::addConnector($driver, $resolver); - } - - /** - * Get the name of the default queue connection. - * - * @return string - * @static - */ - public static function getDefaultDriver(){ - return \Illuminate\Queue\QueueManager::getDefaultDriver(); - } - - /** - * Set the name of the default queue connection. - * - * @param string $name - * @return void - * @static - */ - public static function setDefaultDriver($name){ - \Illuminate\Queue\QueueManager::setDefaultDriver($name); - } - - /** - * Get the full name for the given connection. - * - * @param string $connection - * @return string - * @static - */ - public static function getName($connection = null){ - return \Illuminate\Queue\QueueManager::getName($connection); - } - - /** - * Push a new job onto the queue. - * - * @param string $job - * @param mixed $data - * @param string $queue - * @return mixed - * @static - */ - public static function push($job, $data = '', $queue = null){ - return \Illuminate\Queue\SyncQueue::push($job, $data, $queue); - } - - /** - * Push a raw payload onto the queue. - * - * @param string $payload - * @param string $queue - * @param array $options - * @return mixed - * @static - */ - public static function pushRaw($payload, $queue = null, $options = array()){ - return \Illuminate\Queue\SyncQueue::pushRaw($payload, $queue, $options); - } - - /** - * Push a new job onto the queue after a delay. - * - * @param \DateTime|int $delay - * @param string $job - * @param mixed $data - * @param string $queue - * @return mixed - * @static - */ - public static function later($delay, $job, $data = '', $queue = null){ - return \Illuminate\Queue\SyncQueue::later($delay, $job, $data, $queue); - } - - /** - * Pop the next job off of the queue. - * - * @param string $queue - * @return \Illuminate\Queue\Jobs\Job|null - * @static - */ - public static function pop($queue = null){ - return \Illuminate\Queue\SyncQueue::pop($queue); - } - - /** - * Marshal a push queue request and fire the job. - * - * @throws \RuntimeException - * @static - */ - public static function marshal(){ - //Method inherited from \Illuminate\Queue\Queue - return \Illuminate\Queue\SyncQueue::marshal(); - } - - /** - * Push a new an array of jobs onto the queue. - * - * @param array $jobs - * @param mixed $data - * @param string $queue - * @return mixed - * @static - */ - public static function bulk($jobs, $data = '', $queue = null){ - //Method inherited from \Illuminate\Queue\Queue - return \Illuminate\Queue\SyncQueue::bulk($jobs, $data, $queue); - } - - /** - * Get the current UNIX timestamp. - * - * @return int - * @static - */ - public static function getTime(){ - //Method inherited from \Illuminate\Queue\Queue - return \Illuminate\Queue\SyncQueue::getTime(); - } - - /** - * Set the IoC container instance. - * - * @param \Illuminate\Container\Container $container - * @return void - * @static - */ - public static function setContainer($container){ - //Method inherited from \Illuminate\Queue\Queue - \Illuminate\Queue\SyncQueue::setContainer($container); - } - - } - - - class Redirect extends \Illuminate\Support\Facades\Redirect{ - - /** - * Create a new redirect response to the "home" route. - * - * @param int $status - * @return \Illuminate\Http\RedirectResponse - * @static - */ - public static function home($status = 302){ - return \Illuminate\Routing\Redirector::home($status); - } - - /** - * Create a new redirect response to the previous location. - * - * @param int $status - * @param array $headers - * @return \Illuminate\Http\RedirectResponse - * @static - */ - public static function back($status = 302, $headers = array()){ - return \Illuminate\Routing\Redirector::back($status, $headers); - } - - /** - * Create a new redirect response to the current URI. - * - * @param int $status - * @param array $headers - * @return \Illuminate\Http\RedirectResponse - * @static - */ - public static function refresh($status = 302, $headers = array()){ - return \Illuminate\Routing\Redirector::refresh($status, $headers); - } - - /** - * Create a new redirect response, while putting the current URL in the session. - * - * @param string $path - * @param int $status - * @param array $headers - * @param bool $secure - * @return \Illuminate\Http\RedirectResponse - * @static - */ - public static function guest($path, $status = 302, $headers = array(), $secure = null){ - return \Illuminate\Routing\Redirector::guest($path, $status, $headers, $secure); - } - - /** - * Create a new redirect response to the previously intended location. - * - * @param string $default - * @param int $status - * @param array $headers - * @param bool $secure - * @return \Illuminate\Http\RedirectResponse - * @static - */ - public static function intended($default = '/', $status = 302, $headers = array(), $secure = null){ - return \Illuminate\Routing\Redirector::intended($default, $status, $headers, $secure); - } - - /** - * Create a new redirect response to the given path. - * - * @param string $path - * @param int $status - * @param array $headers - * @param bool $secure - * @return \Illuminate\Http\RedirectResponse - * @static - */ - public static function to($path, $status = 302, $headers = array(), $secure = null){ - return \Illuminate\Routing\Redirector::to($path, $status, $headers, $secure); - } - - /** - * Create a new redirect response to an external URL (no validation). - * - * @param string $path - * @param int $status - * @param array $headers - * @return \Illuminate\Http\RedirectResponse - * @static - */ - public static function away($path, $status = 302, $headers = array()){ - return \Illuminate\Routing\Redirector::away($path, $status, $headers); - } - - /** - * Create a new redirect response to the given HTTPS path. - * - * @param string $path - * @param int $status - * @param array $headers - * @return \Illuminate\Http\RedirectResponse - * @static - */ - public static function secure($path, $status = 302, $headers = array()){ - return \Illuminate\Routing\Redirector::secure($path, $status, $headers); - } - - /** - * Create a new redirect response to a named route. - * - * @param string $route - * @param array $parameters - * @param int $status - * @param array $headers - * @return \Illuminate\Http\RedirectResponse - * @static - */ - public static function route($route, $parameters = array(), $status = 302, $headers = array()){ - return \Illuminate\Routing\Redirector::route($route, $parameters, $status, $headers); - } - - /** - * Create a new redirect response to a controller action. - * - * @param string $action - * @param array $parameters - * @param int $status - * @param array $headers - * @return \Illuminate\Http\RedirectResponse - * @static - */ - public static function action($action, $parameters = array(), $status = 302, $headers = array()){ - return \Illuminate\Routing\Redirector::action($action, $parameters, $status, $headers); - } - - /** - * Get the URL generator instance. - * - * @return \Illuminate\Routing\UrlGenerator - * @static - */ - public static function getUrlGenerator(){ - return \Illuminate\Routing\Redirector::getUrlGenerator(); - } - - /** - * Set the active session store. - * - * @param \Illuminate\Session\Store $session - * @return void - * @static - */ - public static function setSession($session){ - \Illuminate\Routing\Redirector::setSession($session); - } - - } - - - class Redis extends \Illuminate\Support\Facades\Redis{ - - /** - * Get a specific Redis connection instance. - * - * @param string $name - * @return \Predis\Connection\SingleConnectionInterface - * @static - */ - public static function connection($name = 'default'){ - return \Illuminate\Redis\Database::connection($name); - } - - /** - * Run a command against the Redis database. - * - * @param string $method - * @param array $parameters - * @return mixed - * @static - */ - public static function command($method, $parameters = array()){ - return \Illuminate\Redis\Database::command($method, $parameters); - } - - } - - - class Request extends \Illuminate\Support\Facades\Request{ - - /** - * Return the Request instance. - * - * @return \Illuminate\Http\Request - * @static - */ - public static function instance(){ - return \Illuminate\Http\Request::instance(); - } - - /** - * Get the request method. - * - * @return string - * @static - */ - public static function method(){ - return \Illuminate\Http\Request::method(); - } - - /** - * Get the root URL for the application. - * - * @return string - * @static - */ - public static function root(){ - return \Illuminate\Http\Request::root(); - } - - /** - * Get the URL (no query string) for the request. - * - * @return string - * @static - */ - public static function url(){ - return \Illuminate\Http\Request::url(); - } - - /** - * Get the full URL for the request. - * - * @return string - * @static - */ - public static function fullUrl(){ - return \Illuminate\Http\Request::fullUrl(); - } - - /** - * Get the current path info for the request. - * - * @return string - * @static - */ - public static function path(){ - return \Illuminate\Http\Request::path(); - } - - /** - * Get the current encoded path info for the request. - * - * @return string - * @static - */ - public static function decodedPath(){ - return \Illuminate\Http\Request::decodedPath(); - } - - /** - * Get a segment from the URI (1 based index). - * - * @param string $index - * @param mixed $default - * @return string - * @static - */ - public static function segment($index, $default = null){ - return \Illuminate\Http\Request::segment($index, $default); - } - - /** - * Get all of the segments for the request path. - * - * @return array - * @static - */ - public static function segments(){ - return \Illuminate\Http\Request::segments(); - } - - /** - * Determine if the current request URI matches a pattern. - * - * @param mixed string - * @return bool - * @static - */ - public static function is(){ - return \Illuminate\Http\Request::is(); - } - - /** - * Determine if the request is the result of an AJAX call. - * - * @return bool - * @static - */ - public static function ajax(){ - return \Illuminate\Http\Request::ajax(); - } - - /** - * Determine if the request is over HTTPS. - * - * @return bool - * @static - */ - public static function secure(){ - return \Illuminate\Http\Request::secure(); - } - - /** - * Determine if the request contains a given input item. - * - * @param string|array $key - * @return bool - * @static - */ - public static function has($key){ - return \Illuminate\Http\Request::has($key); - } - - /** - * Get all of the input and files for the request. - * - * @return array - * @static - */ - public static function all(){ - return \Illuminate\Http\Request::all(); - } - - /** - * Retrieve an input item from the request. - * - * @param string $key - * @param mixed $default - * @return string - * @static - */ - public static function input($key = null, $default = null){ - return \Illuminate\Http\Request::input($key, $default); - } - - /** - * Get a subset of the items from the input data. - * - * @param array $keys - * @return array - * @static - */ - public static function only($keys){ - return \Illuminate\Http\Request::only($keys); - } - - /** - * Get all of the input except for a specified array of items. - * - * @param array $keys - * @return array - * @static - */ - public static function except($keys){ - return \Illuminate\Http\Request::except($keys); - } - - /** - * Retrieve a query string item from the request. - * - * @param string $key - * @param mixed $default - * @return string - * @static - */ - public static function query($key = null, $default = null){ - return \Illuminate\Http\Request::query($key, $default); - } - - /** - * Determine if a cookie is set on the request. - * - * @param string $key - * @return bool - * @static - */ - public static function hasCookie($key){ - return \Illuminate\Http\Request::hasCookie($key); - } - - /** - * Retrieve a cookie from the request. - * - * @param string $key - * @param mixed $default - * @return string - * @static - */ - public static function cookie($key = null, $default = null){ - return \Illuminate\Http\Request::cookie($key, $default); - } - - /** - * Retrieve a file from the request. - * - * @param string $key - * @param mixed $default - * @return \Symfony\Component\HttpFoundation\File\UploadedFile|array - * @static - */ - public static function file($key = null, $default = null){ - return \Illuminate\Http\Request::file($key, $default); - } - - /** - * Determine if the uploaded data contains a file. - * - * @param string $key - * @return bool - * @static - */ - public static function hasFile($key){ - return \Illuminate\Http\Request::hasFile($key); - } - - /** - * Retrieve a header from the request. - * - * @param string $key - * @param mixed $default - * @return string - * @static - */ - public static function header($key = null, $default = null){ - return \Illuminate\Http\Request::header($key, $default); - } - - /** - * Retrieve a server variable from the request. - * - * @param string $key - * @param mixed $default - * @return string - * @static - */ - public static function server($key = null, $default = null){ - return \Illuminate\Http\Request::server($key, $default); - } - - /** - * Retrieve an old input item. - * - * @param string $key - * @param mixed $default - * @return mixed - * @static - */ - public static function old($key = null, $default = null){ - return \Illuminate\Http\Request::old($key, $default); - } - - /** - * Flash the input for the current request to the session. - * - * @param string $filter - * @param array $keys - * @return void - * @static - */ - public static function flash($filter = null, $keys = array()){ - \Illuminate\Http\Request::flash($filter, $keys); - } - - /** - * Flash only some of the input to the session. - * - * @param mixed string - * @return void - * @static - */ - public static function flashOnly($keys){ - \Illuminate\Http\Request::flashOnly($keys); - } - - /** - * Flash only some of the input to the session. - * - * @param mixed string - * @return void - * @static - */ - public static function flashExcept($keys){ - \Illuminate\Http\Request::flashExcept($keys); - } - - /** - * Flush all of the old input from the session. - * - * @return void - * @static - */ - public static function flush(){ - \Illuminate\Http\Request::flush(); - } - - /** - * Merge new input into the current request's input array. - * - * @param array $input - * @return void - * @static - */ - public static function merge($input){ - \Illuminate\Http\Request::merge($input); - } - - /** - * Replace the input for the current request. - * - * @param array $input - * @return void - * @static - */ - public static function replace($input){ - \Illuminate\Http\Request::replace($input); - } - - /** - * Get the JSON payload for the request. - * - * @param string $key - * @param mixed $default - * @return mixed - * @static - */ - public static function json($key = null, $default = null){ - return \Illuminate\Http\Request::json($key, $default); - } - - /** - * Determine if the request is sending JSON. - * - * @return bool - * @static - */ - public static function isJson(){ - return \Illuminate\Http\Request::isJson(); - } - - /** - * Determine if the current request is asking for JSON in return. - * - * @return bool - * @static - */ - public static function wantsJson(){ - return \Illuminate\Http\Request::wantsJson(); - } - - /** - * Get the data format expected in the response. - * - * @return string - * @static - */ - public static function format($default = 'html'){ - return \Illuminate\Http\Request::format($default); - } - - /** - * Create an Illuminate request from a Symfony instance. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @return \Illuminate\Http\Request - * @static - */ - public static function createFromBase($request){ - return \Illuminate\Http\Request::createFromBase($request); - } - - /** - * Get the session associated with the request. - * - * @return \Illuminate\Session\Store - * @throws \RuntimeException - * @static - */ - public static function session(){ - return \Illuminate\Http\Request::session(); - } - - /** - * Sets the parameters for this request. - * - * This method also re-initializes all properties. - * - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @param string $content The raw body data - * @api - * @static - */ - public static function initialize($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::initialize($query, $request, $attributes, $cookies, $files, $server, $content); - } - - /** - * Creates a new request with values from PHP's super globals. - * - * @return \Symfony\Component\HttpFoundation\Request A new request - * @api - * @static - */ - public static function createFromGlobals(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::createFromGlobals(); - } - - /** - * Creates a Request based on a given URI and configuration. - * - * The information contained in the URI always take precedence - * over the other information (server and parameters). - * - * @param string $uri The URI - * @param string $method The HTTP method - * @param array $parameters The query (GET) or request (POST) parameters - * @param array $cookies The request cookies ($_COOKIE) - * @param array $files The request files ($_FILES) - * @param array $server The server parameters ($_SERVER) - * @param string $content The raw body data - * @return \Symfony\Component\HttpFoundation\Request A Request instance - * @api - * @static - */ - public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::create($uri, $method, $parameters, $cookies, $files, $server, $content); - } - - /** - * Sets a callable able to create a Request instance. - * - * This is mainly useful when you need to override the Request class - * to keep BC with an existing system. It should not be used for any - * other purpose. - * - * @param callable|null $callable A PHP callable - * @static - */ - public static function setFactory($callable){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setFactory($callable); - } - - /** - * Clones a request and overrides some of its parameters. - * - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @return \Symfony\Component\HttpFoundation\Request The duplicated request - * @api - * @static - */ - public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::duplicate($query, $request, $attributes, $cookies, $files, $server); - } - - /** - * Overrides the PHP global variables according to this request instance. - * - * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE. - * $_FILES is never override, see rfc1867 - * - * @api - * @static - */ - public static function overrideGlobals(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::overrideGlobals(); - } - - /** - * Sets a list of trusted proxies. - * - * You should only list the reverse proxies that you manage directly. - * - * @param array $proxies A list of trusted proxies - * @api - * @static - */ - public static function setTrustedProxies($proxies){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setTrustedProxies($proxies); - } - - /** - * Gets the list of trusted proxies. - * - * @return array An array of trusted proxies. - * @static - */ - public static function getTrustedProxies(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getTrustedProxies(); - } - - /** - * Sets a list of trusted host patterns. - * - * You should only list the hosts you manage using regexs. - * - * @param array $hostPatterns A list of trusted host patterns - * @static - */ - public static function setTrustedHosts($hostPatterns){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setTrustedHosts($hostPatterns); - } - - /** - * Gets the list of trusted host patterns. - * - * @return array An array of trusted host patterns. - * @static - */ - public static function getTrustedHosts(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getTrustedHosts(); - } - - /** - * Sets the name for trusted headers. - * - * The following header keys are supported: - * - * * Request::HEADER_CLIENT_IP: defaults to X-Forwarded-For (see getClientIp()) - * * Request::HEADER_CLIENT_HOST: defaults to X-Forwarded-Host (see getClientHost()) - * * Request::HEADER_CLIENT_PORT: defaults to X-Forwarded-Port (see getClientPort()) - * * Request::HEADER_CLIENT_PROTO: defaults to X-Forwarded-Proto (see getScheme() and isSecure()) - * - * Setting an empty value allows to disable the trusted header for the given key. - * - * @param string $key The header key - * @param string $value The header name - * @throws \InvalidArgumentException - * @static - */ - public static function setTrustedHeaderName($key, $value){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setTrustedHeaderName($key, $value); - } - - /** - * Gets the trusted proxy header name. - * - * @param string $key The header key - * @return string The header name - * @throws \InvalidArgumentException - * @static - */ - public static function getTrustedHeaderName($key){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getTrustedHeaderName($key); - } - - /** - * Normalizes a query string. - * - * It builds a normalized query string, where keys/value pairs are alphabetized, - * have consistent escaping and unneeded delimiters are removed. - * - * @param string $qs Query string - * @return string A normalized query string for the Request - * @static - */ - public static function normalizeQueryString($qs){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::normalizeQueryString($qs); - } - - /** - * Enables support for the _method request parameter to determine the intended HTTP method. - * - * Be warned that enabling this feature might lead to CSRF issues in your code. - * Check that you are using CSRF tokens when required. - * - * The HTTP method can only be overridden when the real HTTP method is POST. - * - * @static - */ - public static function enableHttpMethodParameterOverride(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::enableHttpMethodParameterOverride(); - } - - /** - * Checks whether support for the _method request parameter is enabled. - * - * @return bool True when the _method request parameter is enabled, false otherwise - * @static - */ - public static function getHttpMethodParameterOverride(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getHttpMethodParameterOverride(); - } - - /** - * Gets a "parameter" value. - * - * This method is mainly useful for libraries that want to provide some flexibility. - * - * Order of precedence: GET, PATH, POST - * - * Avoid using this method in controllers: - * - * * slow - * * prefer to get from a "named" source - * - * It is better to explicitly get request parameters from the appropriate - * public property instead (query, attributes, request). - * - * @param string $key the key - * @param mixed $default the default value - * @param bool $deep is parameter deep in multidimensional array - * @return mixed - * @static - */ - public static function get($key, $default = null, $deep = false){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::get($key, $default, $deep); - } - - /** - * Gets the Session. - * - * @return \Symfony\Component\HttpFoundation\SessionInterface|null The session - * @api - * @static - */ - public static function getSession(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getSession(); - } - - /** - * Whether the request contains a Session which was started in one of the - * previous requests. - * - * @return bool - * @api - * @static - */ - public static function hasPreviousSession(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::hasPreviousSession(); - } - - /** - * Whether the request contains a Session object. - * - * This method does not give any information about the state of the session object, - * like whether the session is started or not. It is just a way to check if this Request - * is associated with a Session instance. - * - * @return bool true when the Request contains a Session object, false otherwise - * @api - * @static - */ - public static function hasSession(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::hasSession(); - } - - /** - * Sets the Session. - * - * @param \Symfony\Component\HttpFoundation\SessionInterface $session The Session - * @api - * @static - */ - public static function setSession($session){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setSession($session); - } - - /** - * Returns the client IP addresses. - * - * In the returned array the most trusted IP address is first, and the - * least trusted one last. The "real" client IP address is the last one, - * but this is also the least trusted one. Trusted proxies are stripped. - * - * Use this method carefully; you should use getClientIp() instead. - * - * @return array The client IP addresses - * @see getClientIp() - * @static - */ - public static function getClientIps(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getClientIps(); - } - - /** - * Returns the client IP address. - * - * This method can read the client IP address from the "X-Forwarded-For" header - * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For" - * header value is a comma+space separated list of IP addresses, the left-most - * being the original client, and each successive proxy that passed the request - * adding the IP address where it received the request from. - * - * If your reverse proxy uses a different header name than "X-Forwarded-For", - * ("Client-Ip" for instance), configure it via "setTrustedHeaderName()" with - * the "client-ip" key. - * - * @return string The client IP address - * @see getClientIps() - * @see http://en.wikipedia.org/wiki/X-Forwarded-For - * @api - * @static - */ - public static function getClientIp(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getClientIp(); - } - - /** - * Returns current script name. - * - * @return string - * @api - * @static - */ - public static function getScriptName(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getScriptName(); - } - - /** - * Returns the path being requested relative to the executed script. - * - * The path info always starts with a /. - * - * Suppose this request is instantiated from /mysite on localhost: - * - * * http://localhost/mysite returns an empty string - * * http://localhost/mysite/about returns '/about' - * * http://localhost/mysite/enco%20ded returns '/enco%20ded' - * * http://localhost/mysite/about?var=1 returns '/about' - * - * @return string The raw path (i.e. not urldecoded) - * @api - * @static - */ - public static function getPathInfo(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getPathInfo(); - } - - /** - * Returns the root path from which this request is executed. - * - * Suppose that an index.php file instantiates this request object: - * - * * http://localhost/index.php returns an empty string - * * http://localhost/index.php/page returns an empty string - * * http://localhost/web/index.php returns '/web' - * * http://localhost/we%20b/index.php returns '/we%20b' - * - * @return string The raw path (i.e. not urldecoded) - * @api - * @static - */ - public static function getBasePath(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getBasePath(); - } - - /** - * Returns the root URL from which this request is executed. - * - * The base URL never ends with a /. - * - * This is similar to getBasePath(), except that it also includes the - * script filename (e.g. index.php) if one exists. - * - * @return string The raw URL (i.e. not urldecoded) - * @api - * @static - */ - public static function getBaseUrl(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getBaseUrl(); - } - - /** - * Gets the request's scheme. - * - * @return string - * @api - * @static - */ - public static function getScheme(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getScheme(); - } - - /** - * Returns the port on which the request is made. - * - * This method can read the client port from the "X-Forwarded-Port" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Port" header must contain the client port. - * - * If your reverse proxy uses a different header name than "X-Forwarded-Port", - * configure it via "setTrustedHeaderName()" with the "client-port" key. - * - * @return string - * @api - * @static - */ - public static function getPort(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getPort(); - } - - /** - * Returns the user. - * - * @return string|null - * @static - */ - public static function getUser(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getUser(); - } - - /** - * Returns the password. - * - * @return string|null - * @static - */ - public static function getPassword(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getPassword(); - } - - /** - * Gets the user info. - * - * @return string A user name and, optionally, scheme-specific information about how to gain authorization to access the server - * @static - */ - public static function getUserInfo(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getUserInfo(); - } - - /** - * Returns the HTTP host being requested. - * - * The port name will be appended to the host if it's non-standard. - * - * @return string - * @api - * @static - */ - public static function getHttpHost(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getHttpHost(); - } - - /** - * Returns the requested URI (path and query string). - * - * @return string The raw URI (i.e. not URI decoded) - * @api - * @static - */ - public static function getRequestUri(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getRequestUri(); - } - - /** - * Gets the scheme and HTTP host. - * - * If the URL was called with basic authentication, the user - * and the password are not added to the generated string. - * - * @return string The scheme and HTTP host - * @static - */ - public static function getSchemeAndHttpHost(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getSchemeAndHttpHost(); - } - - /** - * Generates a normalized URI (URL) for the Request. - * - * @return string A normalized URI (URL) for the Request - * @see getQueryString() - * @api - * @static - */ - public static function getUri(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getUri(); - } - - /** - * Generates a normalized URI for the given path. - * - * @param string $path A path to use instead of the current one - * @return string The normalized URI for the path - * @api - * @static - */ - public static function getUriForPath($path){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getUriForPath($path); - } - - /** - * Generates the normalized query string for the Request. - * - * It builds a normalized query string, where keys/value pairs are alphabetized - * and have consistent escaping. - * - * @return string|null A normalized query string for the Request - * @api - * @static - */ - public static function getQueryString(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getQueryString(); - } - - /** - * Checks whether the request is secure or not. - * - * This method can read the client port from the "X-Forwarded-Proto" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http". - * - * If your reverse proxy uses a different header name than "X-Forwarded-Proto" - * ("SSL_HTTPS" for instance), configure it via "setTrustedHeaderName()" with - * the "client-proto" key. - * - * @return bool - * @api - * @static - */ - public static function isSecure(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::isSecure(); - } - - /** - * Returns the host name. - * - * This method can read the client port from the "X-Forwarded-Host" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Host" header must contain the client host name. - * - * If your reverse proxy uses a different header name than "X-Forwarded-Host", - * configure it via "setTrustedHeaderName()" with the "client-host" key. - * - * @return string - * @throws \UnexpectedValueException when the host name is invalid - * @api - * @static - */ - public static function getHost(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getHost(); - } - - /** - * Sets the request method. - * - * @param string $method - * @api - * @static - */ - public static function setMethod($method){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setMethod($method); - } - - /** - * Gets the request "intended" method. - * - * If the X-HTTP-Method-Override header is set, and if the method is a POST, - * then it is used to determine the "real" intended HTTP method. - * - * The _method request parameter can also be used to determine the HTTP method, - * but only if enableHttpMethodParameterOverride() has been called. - * - * The method is always an uppercased string. - * - * @return string The request method - * @api - * @see getRealMethod - * @static - */ - public static function getMethod(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getMethod(); - } - - /** - * Gets the "real" request method. - * - * @return string The request method - * @see getMethod - * @static - */ - public static function getRealMethod(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getRealMethod(); - } - - /** - * Gets the mime type associated with the format. - * - * @param string $format The format - * @return string The associated mime type (null if not found) - * @api - * @static - */ - public static function getMimeType($format){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getMimeType($format); - } - - /** - * Gets the format associated with the mime type. - * - * @param string $mimeType The associated mime type - * @return string|null The format (null if not found) - * @api - * @static - */ - public static function getFormat($mimeType){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getFormat($mimeType); - } - - /** - * Associates a format with mime types. - * - * @param string $format The format - * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type) - * @api - * @static - */ - public static function setFormat($format, $mimeTypes){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setFormat($format, $mimeTypes); - } - - /** - * Gets the request format. - * - * Here is the process to determine the format: - * - * * format defined by the user (with setRequestFormat()) - * * _format request parameter - * * $default - * - * @param string $default The default format - * @return string The request format - * @api - * @static - */ - public static function getRequestFormat($default = 'html'){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getRequestFormat($default); - } - - /** - * Sets the request format. - * - * @param string $format The request format. - * @api - * @static - */ - public static function setRequestFormat($format){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setRequestFormat($format); - } - - /** - * Gets the format associated with the request. - * - * @return string|null The format (null if no content type is present) - * @api - * @static - */ - public static function getContentType(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getContentType(); - } - - /** - * Sets the default locale. - * - * @param string $locale - * @api - * @static - */ - public static function setDefaultLocale($locale){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setDefaultLocale($locale); - } - - /** - * Get the default locale. - * - * @return string - * @static - */ - public static function getDefaultLocale(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getDefaultLocale(); - } - - /** - * Sets the locale. - * - * @param string $locale - * @api - * @static - */ - public static function setLocale($locale){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::setLocale($locale); - } - - /** - * Get the locale. - * - * @return string - * @static - */ - public static function getLocale(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getLocale(); - } - - /** - * Checks if the request method is of specified type. - * - * @param string $method Uppercase request method (GET, POST etc). - * @return bool - * @static - */ - public static function isMethod($method){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::isMethod($method); - } - - /** - * Checks whether the method is safe or not. - * - * @return bool - * @api - * @static - */ - public static function isMethodSafe(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::isMethodSafe(); - } - - /** - * Returns the request body content. - * - * @param bool $asResource If true, a resource will be returned - * @return string|resource The request body content or a resource to read the body stream. - * @throws \LogicException - * @static - */ - public static function getContent($asResource = false){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getContent($asResource); - } - - /** - * Gets the Etags. - * - * @return array The entity tags - * @static - */ - public static function getETags(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getETags(); - } - - /** - * - * - * @return bool - * @static - */ - public static function isNoCache(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::isNoCache(); - } - - /** - * Returns the preferred language. - * - * @param array $locales An array of ordered available locales - * @return string|null The preferred locale - * @api - * @static - */ - public static function getPreferredLanguage($locales = null){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getPreferredLanguage($locales); - } - - /** - * Gets a list of languages acceptable by the client browser. - * - * @return array Languages ordered in the user browser preferences - * @api - * @static - */ - public static function getLanguages(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getLanguages(); - } - - /** - * Gets a list of charsets acceptable by the client browser. - * - * @return array List of charsets in preferable order - * @api - * @static - */ - public static function getCharsets(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getCharsets(); - } - - /** - * Gets a list of encodings acceptable by the client browser. - * - * @return array List of encodings in preferable order - * @static - */ - public static function getEncodings(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getEncodings(); - } - - /** - * Gets a list of content types acceptable by the client browser - * - * @return array List of content types in preferable order - * @api - * @static - */ - public static function getAcceptableContentTypes(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::getAcceptableContentTypes(); - } - - /** - * Returns true if the request is a XMLHttpRequest. - * - * It works if your JavaScript library set an X-Requested-With HTTP header. - * It is known to work with common JavaScript frameworks: - * - * @link http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript - * @return bool true if the request is an XMLHttpRequest, false otherwise - * @api - * @static - */ - public static function isXmlHttpRequest(){ - //Method inherited from \Symfony\Component\HttpFoundation\Request - return \Illuminate\Http\Request::isXmlHttpRequest(); - } - - } - - - class Response extends \Illuminate\Support\Facades\Response{ - - } - - - class Route extends \Illuminate\Support\Facades\Route{ - - /** - * Register a new GET route with the router. - * - * @param string $uri - * @param \Closure|array|string $action - * @return \Illuminate\Routing\Route - * @static - */ - public static function get($uri, $action){ - return \Illuminate\Routing\Router::get($uri, $action); - } - - /** - * Register a new POST route with the router. - * - * @param string $uri - * @param \Closure|array|string $action - * @return \Illuminate\Routing\Route - * @static - */ - public static function post($uri, $action){ - return \Illuminate\Routing\Router::post($uri, $action); - } - - /** - * Register a new PUT route with the router. - * - * @param string $uri - * @param \Closure|array|string $action - * @return \Illuminate\Routing\Route - * @static - */ - public static function put($uri, $action){ - return \Illuminate\Routing\Router::put($uri, $action); - } - - /** - * Register a new PATCH route with the router. - * - * @param string $uri - * @param \Closure|array|string $action - * @return \Illuminate\Routing\Route - * @static - */ - public static function patch($uri, $action){ - return \Illuminate\Routing\Router::patch($uri, $action); - } - - /** - * Register a new DELETE route with the router. - * - * @param string $uri - * @param \Closure|array|string $action - * @return \Illuminate\Routing\Route - * @static - */ - public static function delete($uri, $action){ - return \Illuminate\Routing\Router::delete($uri, $action); - } - - /** - * Register a new OPTIONS route with the router. - * - * @param string $uri - * @param \Closure|array|string $action - * @return \Illuminate\Routing\Route - * @static - */ - public static function options($uri, $action){ - return \Illuminate\Routing\Router::options($uri, $action); - } - - /** - * Register a new route responding to all verbs. - * - * @param string $uri - * @param \Closure|array|string $action - * @return \Illuminate\Routing\Route - * @static - */ - public static function any($uri, $action){ - return \Illuminate\Routing\Router::any($uri, $action); - } - - /** - * Register a new route with the given verbs. - * - * @param array|string $methods - * @param string $uri - * @param \Closure|array|string $action - * @return \Illuminate\Routing\Route - * @static - */ - public static function match($methods, $uri, $action){ - return \Illuminate\Routing\Router::match($methods, $uri, $action); - } - - /** - * Register an array of controllers with wildcard routing. - * - * @param array $controllers - * @return void - * @static - */ - public static function controllers($controllers){ - \Illuminate\Routing\Router::controllers($controllers); - } - - /** - * Route a controller to a URI with wildcard routing. - * - * @param string $uri - * @param string $controller - * @param array $names - * @return void - * @static - */ - public static function controller($uri, $controller, $names = array()){ - \Illuminate\Routing\Router::controller($uri, $controller, $names); - } - - /** - * Route a resource to a controller. - * - * @param string $name - * @param string $controller - * @param array $options - * @return void - * @static - */ - public static function resource($name, $controller, $options = array()){ - \Illuminate\Routing\Router::resource($name, $controller, $options); - } - - /** - * Get the base resource URI for a given resource. - * - * @param string $resource - * @return string - * @static - */ - public static function getResourceUri($resource){ - return \Illuminate\Routing\Router::getResourceUri($resource); - } - - /** - * Format a resource wildcard for usage. - * - * @param string $value - * @return string - * @static - */ - public static function getResourceWildcard($value){ - return \Illuminate\Routing\Router::getResourceWildcard($value); - } - - /** - * Create a route group with shared attributes. - * - * @param array $attributes - * @param \Closure $callback - * @return void - * @static - */ - public static function group($attributes, $callback){ - \Illuminate\Routing\Router::group($attributes, $callback); - } - - /** - * Merge the given array with the last group stack. - * - * @param array $new - * @return array - * @static - */ - public static function mergeWithLastGroup($new){ - return \Illuminate\Routing\Router::mergeWithLastGroup($new); - } - - /** - * Merge the given group attributes. - * - * @param array $new - * @param array $old - * @return array - * @static - */ - public static function mergeGroup($new, $old){ - return \Illuminate\Routing\Router::mergeGroup($new, $old); - } - - /** - * Dispatch the request to the application. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response - * @static - */ - public static function dispatch($request){ - return \Illuminate\Routing\Router::dispatch($request); - } - - /** - * Dispatch the request to a route and return the response. - * - * @param \Illuminate\Http\Request $request - * @return mixed - * @static - */ - public static function dispatchToRoute($request){ - return \Illuminate\Routing\Router::dispatchToRoute($request); - } - - /** - * Register a route matched event listener. - * - * @param callable $callback - * @return void - * @static - */ - public static function matched($callback){ - \Illuminate\Routing\Router::matched($callback); - } - - /** - * Register a new "before" filter with the router. - * - * @param mixed $callback - * @return void - * @static - */ - public static function before($callback){ - \Illuminate\Routing\Router::before($callback); - } - - /** - * Register a new "after" filter with the router. - * - * @param mixed $callback - * @return void - * @static - */ - public static function after($callback){ - \Illuminate\Routing\Router::after($callback); - } - - /** - * Register a new filter with the router. - * - * @param string $name - * @param mixed $callback - * @return void - * @static - */ - public static function filter($name, $callback){ - \Illuminate\Routing\Router::filter($name, $callback); - } - - /** - * Register a pattern-based filter with the router. - * - * @param string $pattern - * @param string $name - * @param array|null $methods - * @static - */ - public static function when($pattern, $name, $methods = null){ - return \Illuminate\Routing\Router::when($pattern, $name, $methods); - } - - /** - * Register a regular expression based filter with the router. - * - * @param string $pattern - * @param string $name - * @param array|null $methods - * @return void - * @static - */ - public static function whenRegex($pattern, $name, $methods = null){ - \Illuminate\Routing\Router::whenRegex($pattern, $name, $methods); - } - - /** - * Register a model binder for a wildcard. - * - * @param string $key - * @param string $class - * @param \Closure $callback - * @return void - * @throws NotFoundHttpException - * @static - */ - public static function model($key, $class, $callback = null){ - \Illuminate\Routing\Router::model($key, $class, $callback); - } - - /** - * Add a new route parameter binder. - * - * @param string $key - * @param callable $binder - * @return void - * @static - */ - public static function bind($key, $binder){ - \Illuminate\Routing\Router::bind($key, $binder); - } - - /** - * Set a global where pattern on all routes - * - * @param string $key - * @param string $pattern - * @return void - * @static - */ - public static function pattern($key, $pattern){ - \Illuminate\Routing\Router::pattern($key, $pattern); - } - - /** - * Call the given route's before filters. - * - * @param \Illuminate\Routing\Route $route - * @param \Illuminate\Http\Request $request - * @return mixed - * @static - */ - public static function callRouteBefore($route, $request){ - return \Illuminate\Routing\Router::callRouteBefore($route, $request); - } - - /** - * Find the patterned filters matching a request. - * - * @param \Illuminate\Http\Request $request - * @return array - * @static - */ - public static function findPatternFilters($request){ - return \Illuminate\Routing\Router::findPatternFilters($request); - } - - /** - * Call the given route's before filters. - * - * @param \Illuminate\Routing\Route $route - * @param \Illuminate\Http\Request $request - * @param \Illuminate\Http\Response $response - * @return mixed - * @static - */ - public static function callRouteAfter($route, $request, $response){ - return \Illuminate\Routing\Router::callRouteAfter($route, $request, $response); - } - - /** - * Call the given route filter. - * - * @param string $filter - * @param array $parameters - * @param \Illuminate\Routing\Route $route - * @param \Illuminate\Http\Request $request - * @param \Illuminate\Http\Response|null $response - * @return mixed - * @static - */ - public static function callRouteFilter($filter, $parameters, $route, $request, $response = null){ - return \Illuminate\Routing\Router::callRouteFilter($filter, $parameters, $route, $request, $response); - } - - /** - * Run a callback with filters disable on the router. - * - * @param callable $callback - * @return void - * @static - */ - public static function withoutFilters($callback){ - \Illuminate\Routing\Router::withoutFilters($callback); - } - - /** - * Enable route filtering on the router. - * - * @return void - * @static - */ - public static function enableFilters(){ - \Illuminate\Routing\Router::enableFilters(); - } - - /** - * Disable route filtering on the router. - * - * @return void - * @static - */ - public static function disableFilters(){ - \Illuminate\Routing\Router::disableFilters(); - } - - /** - * Get a route parameter for the current route. - * - * @param string $key - * @param string $default - * @return mixed - * @static - */ - public static function input($key, $default = null){ - return \Illuminate\Routing\Router::input($key, $default); - } - - /** - * Get the currently dispatched route instance. - * - * @return \Illuminate\Routing\Route - * @static - */ - public static function getCurrentRoute(){ - return \Illuminate\Routing\Router::getCurrentRoute(); - } - - /** - * Get the currently dispatched route instance. - * - * @return \Illuminate\Routing\Route - * @static - */ - public static function current(){ - return \Illuminate\Routing\Router::current(); - } - - /** - * Get the current route name. - * - * @return string|null - * @static - */ - public static function currentRouteName(){ - return \Illuminate\Routing\Router::currentRouteName(); - } - - /** - * Determine if the current route matches a given name. - * - * @param string $name - * @return bool - * @static - */ - public static function currentRouteNamed($name){ - return \Illuminate\Routing\Router::currentRouteNamed($name); - } - - /** - * Get the current route action. - * - * @return string|null - * @static - */ - public static function currentRouteAction(){ - return \Illuminate\Routing\Router::currentRouteAction(); - } - - /** - * Determine if the current route action matches a given action. - * - * @param string $action - * @return bool - * @static - */ - public static function currentRouteUses($action){ - return \Illuminate\Routing\Router::currentRouteUses($action); - } - - /** - * Get the request currently being dispatched. - * - * @return \Illuminate\Http\Request - * @static - */ - public static function getCurrentRequest(){ - return \Illuminate\Routing\Router::getCurrentRequest(); - } - - /** - * Get the underlying route collection. - * - * @return \Illuminate\Routing\RouteCollection - * @static - */ - public static function getRoutes(){ - return \Illuminate\Routing\Router::getRoutes(); - } - - /** - * Get the controller dispatcher instance. - * - * @return \Illuminate\Routing\ControllerDispatcher - * @static - */ - public static function getControllerDispatcher(){ - return \Illuminate\Routing\Router::getControllerDispatcher(); - } - - /** - * Set the controller dispatcher instance. - * - * @param \Illuminate\Routing\ControllerDispatcher $dispatcher - * @return void - * @static - */ - public static function setControllerDispatcher($dispatcher){ - \Illuminate\Routing\Router::setControllerDispatcher($dispatcher); - } - - /** - * Get a controller inspector instance. - * - * @return \Illuminate\Routing\ControllerInspector - * @static - */ - public static function getInspector(){ - return \Illuminate\Routing\Router::getInspector(); - } - - /** - * Get the response for a given request. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @return \Symfony\Component\HttpFoundation\Response - * @static - */ - public static function handle($request, $type = 1, $catch = true){ - return \Illuminate\Routing\Router::handle($request, $type, $catch); - } - - } - - - class Schema extends \Illuminate\Support\Facades\Schema{ - - /** - * Determine if the given table exists. - * - * @param string $table - * @return bool - * @static - */ - public static function hasTable($table){ - return \Illuminate\Database\Schema\MySqlBuilder::hasTable($table); - } - - /** - * Determine if the given table has a given column. - * - * @param string $table - * @param string $column - * @return bool - * @static - */ - public static function hasColumn($table, $column){ - //Method inherited from \Illuminate\Database\Schema\Builder - return \Illuminate\Database\Schema\MySqlBuilder::hasColumn($table, $column); - } - - /** - * Modify a table on the schema. - * - * @param string $table - * @param \Closure $callback - * @return \Illuminate\Database\Schema\Blueprint - * @static - */ - public static function table($table, $callback){ - //Method inherited from \Illuminate\Database\Schema\Builder - return \Illuminate\Database\Schema\MySqlBuilder::table($table, $callback); - } - - /** - * Create a new table on the schema. - * - * @param string $table - * @param \Closure $callback - * @return \Illuminate\Database\Schema\Blueprint - * @static - */ - public static function create($table, $callback){ - //Method inherited from \Illuminate\Database\Schema\Builder - return \Illuminate\Database\Schema\MySqlBuilder::create($table, $callback); - } - - /** - * Drop a table from the schema. - * - * @param string $table - * @return \Illuminate\Database\Schema\Blueprint - * @static - */ - public static function drop($table){ - //Method inherited from \Illuminate\Database\Schema\Builder - return \Illuminate\Database\Schema\MySqlBuilder::drop($table); - } - - /** - * Drop a table from the schema if it exists. - * - * @param string $table - * @return \Illuminate\Database\Schema\Blueprint - * @static - */ - public static function dropIfExists($table){ - //Method inherited from \Illuminate\Database\Schema\Builder - return \Illuminate\Database\Schema\MySqlBuilder::dropIfExists($table); - } - - /** - * Rename a table on the schema. - * - * @param string $from - * @param string $to - * @return \Illuminate\Database\Schema\Blueprint - * @static - */ - public static function rename($from, $to){ - //Method inherited from \Illuminate\Database\Schema\Builder - return \Illuminate\Database\Schema\MySqlBuilder::rename($from, $to); - } - - /** - * Get the database connection instance. - * - * @return \Illuminate\Database\Connection - * @static - */ - public static function getConnection(){ - //Method inherited from \Illuminate\Database\Schema\Builder - return \Illuminate\Database\Schema\MySqlBuilder::getConnection(); - } - - /** - * Set the database connection instance. - * - * @param \Illuminate\Database\Connection - * @return \Illuminate\Database\Schema\Builder - * @static - */ - public static function setConnection($connection){ - //Method inherited from \Illuminate\Database\Schema\Builder - return \Illuminate\Database\Schema\MySqlBuilder::setConnection($connection); - } - - /** - * Set the Schema Blueprint resolver callback. - * - * @param \Closure $resolver - * @return void - * @static - */ - public static function blueprintResolver($resolver){ - //Method inherited from \Illuminate\Database\Schema\Builder - \Illuminate\Database\Schema\MySqlBuilder::blueprintResolver($resolver); - } - - } - - - class Seeder extends \Illuminate\Database\Seeder{ - - } - - - class Session extends \Illuminate\Support\Facades\Session{ - - /** - * Get the session configuration. - * - * @return array - * @static - */ - public static function getSessionConfig(){ - return \Illuminate\Session\SessionManager::getSessionConfig(); - } - - /** - * Get the default session driver name. - * - * @return string - * @static - */ - public static function getDefaultDriver(){ - return \Illuminate\Session\SessionManager::getDefaultDriver(); - } - - /** - * Set the default session driver name. - * - * @param string $name - * @return void - * @static - */ - public static function setDefaultDriver($name){ - \Illuminate\Session\SessionManager::setDefaultDriver($name); - } - - /** - * Get a driver instance. - * - * @param string $driver - * @return mixed - * @static - */ - public static function driver($driver = null){ - //Method inherited from \Illuminate\Support\Manager - return \Illuminate\Session\SessionManager::driver($driver); - } - - /** - * Register a custom driver creator Closure. - * - * @param string $driver - * @param \Closure $callback - * @return \Illuminate\Support\Manager|static - * @static - */ - public static function extend($driver, $callback){ - //Method inherited from \Illuminate\Support\Manager - return \Illuminate\Session\SessionManager::extend($driver, $callback); - } - - /** - * Get all of the created "drivers". - * - * @return array - * @static - */ - public static function getDrivers(){ - //Method inherited from \Illuminate\Support\Manager - return \Illuminate\Session\SessionManager::getDrivers(); - } - - /** - * Starts the session storage. - * - * @return bool True if session started. - * @throws \RuntimeException If session fails to start. - * @api - * @static - */ - public static function start(){ - return \Illuminate\Session\Store::start(); - } - - /** - * Returns the session ID. - * - * @return string The session ID. - * @api - * @static - */ - public static function getId(){ - return \Illuminate\Session\Store::getId(); - } - - /** - * Sets the session ID - * - * @param string $id - * @api - * @static - */ - public static function setId($id){ - return \Illuminate\Session\Store::setId($id); - } - - /** - * Returns the session name. - * - * @return mixed The session name. - * @api - * @static - */ - public static function getName(){ - return \Illuminate\Session\Store::getName(); - } - - /** - * Sets the session name. - * - * @param string $name - * @api - * @static - */ - public static function setName($name){ - return \Illuminate\Session\Store::setName($name); - } - - /** - * Invalidates the current session. - * - * Clears all session attributes and flashes and regenerates the - * session and deletes the old session from persistence. - * - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - * @return bool True if session invalidated, false if error. - * @api - * @static - */ - public static function invalidate($lifetime = null){ - return \Illuminate\Session\Store::invalidate($lifetime); - } - - /** - * Migrates the current session to a new session id while maintaining all - * session attributes. - * - * @param bool $destroy Whether to delete the old session or leave it to garbage collection. - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - * @return bool True if session migrated, false if error. - * @api - * @static - */ - public static function migrate($destroy = false, $lifetime = null){ - return \Illuminate\Session\Store::migrate($destroy, $lifetime); - } - - /** - * Generate a new session identifier. - * - * @param bool $destroy - * @return bool - * @static - */ - public static function regenerate($destroy = false){ - return \Illuminate\Session\Store::regenerate($destroy); - } - - /** - * Force the session to be saved and closed. - * - * This method is generally not required for real sessions as - * the session will be automatically saved at the end of - * code execution. - * - * @static - */ - public static function save(){ - return \Illuminate\Session\Store::save(); - } - - /** - * Age the flash data for the session. - * - * @return void - * @static - */ - public static function ageFlashData(){ - \Illuminate\Session\Store::ageFlashData(); - } - - /** - * Checks if an attribute is defined. - * - * @param string $name The attribute name - * @return bool true if the attribute is defined, false otherwise - * @api - * @static - */ - public static function has($name){ - return \Illuminate\Session\Store::has($name); - } - - /** - * Returns an attribute. - * - * @param string $name The attribute name - * @param mixed $default The default value if not found. - * @return mixed - * @api - * @static - */ - public static function get($name, $default = null){ - return \Illuminate\Session\Store::get($name, $default); - } - - /** - * Determine if the session contains old input. - * - * @param string $key - * @return bool - * @static - */ - public static function hasOldInput($key = null){ - return \Illuminate\Session\Store::hasOldInput($key); - } - - /** - * Get the requested item from the flashed input array. - * - * @param string $key - * @param mixed $default - * @return mixed - * @static - */ - public static function getOldInput($key = null, $default = null){ - return \Illuminate\Session\Store::getOldInput($key, $default); - } - - /** - * Sets an attribute. - * - * @param string $name - * @param mixed $value - * @api - * @static - */ - public static function set($name, $value){ - return \Illuminate\Session\Store::set($name, $value); - } - - /** - * Put a key / value pair or array of key / value pairs in the session. - * - * @param string|array $key - * @param mixed|null $value - * @return void - * @static - */ - public static function put($key, $value){ - \Illuminate\Session\Store::put($key, $value); - } - - /** - * Push a value onto a session array. - * - * @param string $key - * @param mixed $value - * @return void - * @static - */ - public static function push($key, $value){ - \Illuminate\Session\Store::push($key, $value); - } - - /** - * Flash a key / value pair to the session. - * - * @param string $key - * @param mixed $value - * @return void - * @static - */ - public static function flash($key, $value){ - \Illuminate\Session\Store::flash($key, $value); - } - - /** - * Flash an input array to the session. - * - * @param array $value - * @return void - * @static - */ - public static function flashInput($value){ - \Illuminate\Session\Store::flashInput($value); - } - - /** - * Reflash all of the session flash data. - * - * @return void - * @static - */ - public static function reflash(){ - \Illuminate\Session\Store::reflash(); - } - - /** - * Reflash a subset of the current flash data. - * - * @param array|mixed $keys - * @return void - * @static - */ - public static function keep($keys = null){ - \Illuminate\Session\Store::keep($keys); - } - - /** - * Returns attributes. - * - * @return array Attributes - * @api - * @static - */ - public static function all(){ - return \Illuminate\Session\Store::all(); - } - - /** - * Sets attributes. - * - * @param array $attributes Attributes - * @static - */ - public static function replace($attributes){ - return \Illuminate\Session\Store::replace($attributes); - } - - /** - * Removes an attribute. - * - * @param string $name - * @return mixed The removed value or null when it does not exist - * @api - * @static - */ - public static function remove($name){ - return \Illuminate\Session\Store::remove($name); - } - - /** - * Remove an item from the session. - * - * @param string $key - * @return void - * @static - */ - public static function forget($key){ - \Illuminate\Session\Store::forget($key); - } - - /** - * Clears all attributes. - * - * @api - * @static - */ - public static function clear(){ - return \Illuminate\Session\Store::clear(); - } - - /** - * Remove all of the items from the session. - * - * @return void - * @static - */ - public static function flush(){ - \Illuminate\Session\Store::flush(); - } - - /** - * Checks if the session was started. - * - * @return bool - * @static - */ - public static function isStarted(){ - return \Illuminate\Session\Store::isStarted(); - } - - /** - * Registers a SessionBagInterface with the session. - * - * @param \Symfony\Component\HttpFoundation\Session\SessionBagInterface $bag - * @static - */ - public static function registerBag($bag){ - return \Illuminate\Session\Store::registerBag($bag); - } - - /** - * Gets a bag instance by name. - * - * @param string $name - * @return \Symfony\Component\HttpFoundation\Session\SessionBagInterface - * @static - */ - public static function getBag($name){ - return \Illuminate\Session\Store::getBag($name); - } - - /** - * Gets session meta. - * - * @return \Symfony\Component\HttpFoundation\Session\MetadataBag - * @static - */ - public static function getMetadataBag(){ - return \Illuminate\Session\Store::getMetadataBag(); - } - - /** - * Get the raw bag data array for a given bag. - * - * @param string $name - * @return array - * @static - */ - public static function getBagData($name){ - return \Illuminate\Session\Store::getBagData($name); - } - - /** - * Get the CSRF token value. - * - * @return string - * @static - */ - public static function token(){ - return \Illuminate\Session\Store::token(); - } - - /** - * Get the CSRF token value. - * - * @return string - * @static - */ - public static function getToken(){ - return \Illuminate\Session\Store::getToken(); - } - - /** - * Regenerate the CSRF token value. - * - * @return void - * @static - */ - public static function regenerateToken(){ - \Illuminate\Session\Store::regenerateToken(); - } - - /** - * Get the underlying session handler implementation. - * - * @return \SessionHandlerInterface - * @static - */ - public static function getHandler(){ - return \Illuminate\Session\Store::getHandler(); - } - - /** - * Determine if the session handler needs a request. - * - * @return bool - * @static - */ - public static function handlerNeedsRequest(){ - return \Illuminate\Session\Store::handlerNeedsRequest(); - } - - /** - * Set the request on the handler instance. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @return void - * @static - */ - public static function setRequestOnHandler($request){ - \Illuminate\Session\Store::setRequestOnHandler($request); - } - - } - - - class Str extends \Illuminate\Support\Str{ - - } - - - class URL extends \Illuminate\Support\Facades\URL{ - - /** - * Get the full URL for the current request. - * - * @return string - * @static - */ - public static function full(){ - return \Illuminate\Routing\UrlGenerator::full(); - } - - /** - * Get the current URL for the request. - * - * @return string - * @static - */ - public static function current(){ - return \Illuminate\Routing\UrlGenerator::current(); - } - - /** - * Get the URL for the previous request. - * - * @return string - * @static - */ - public static function previous(){ - return \Illuminate\Routing\UrlGenerator::previous(); - } - - /** - * Generate a absolute URL to the given path. - * - * @param string $path - * @param mixed $extra - * @param bool $secure - * @return string - * @static - */ - public static function to($path, $extra = array(), $secure = null){ - return \Illuminate\Routing\UrlGenerator::to($path, $extra, $secure); - } - - /** - * Generate a secure, absolute URL to the given path. - * - * @param string $path - * @param array $parameters - * @return string - * @static - */ - public static function secure($path, $parameters = array()){ - return \Illuminate\Routing\UrlGenerator::secure($path, $parameters); - } - - /** - * Generate a URL to an application asset. - * - * @param string $path - * @param bool $secure - * @return string - * @static - */ - public static function asset($path, $secure = null){ - return \Illuminate\Routing\UrlGenerator::asset($path, $secure); - } - - /** - * Generate a URL to a secure asset. - * - * @param string $path - * @return string - * @static - */ - public static function secureAsset($path){ - return \Illuminate\Routing\UrlGenerator::secureAsset($path); - } - - /** - * Get the URL to a named route. - * - * @param string $name - * @param mixed $parameters - * @param bool $absolute - * @param \Illuminate\Routing\Route $route - * @return string - * @throws \InvalidArgumentException - * @static - */ - public static function route($name, $parameters = array(), $absolute = true, $route = null){ - return \Illuminate\Routing\UrlGenerator::route($name, $parameters, $absolute, $route); - } - - /** - * Get the URL to a controller action. - * - * @param string $action - * @param mixed $parameters - * @param bool $absolute - * @return string - * @static - */ - public static function action($action, $parameters = array(), $absolute = true){ - return \Illuminate\Routing\UrlGenerator::action($action, $parameters, $absolute); - } - - /** - * Determine if the given path is a valid URL. - * - * @param string $path - * @return bool - * @static - */ - public static function isValidUrl($path){ - return \Illuminate\Routing\UrlGenerator::isValidUrl($path); - } - - /** - * Get the request instance. - * - * @return \Symfony\Component\HttpFoundation\Request - * @static - */ - public static function getRequest(){ - return \Illuminate\Routing\UrlGenerator::getRequest(); - } - - /** - * Set the current request instance. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @return void - * @static - */ - public static function setRequest($request){ - \Illuminate\Routing\UrlGenerator::setRequest($request); - } - - } - - - class Validator extends \Illuminate\Support\Facades\Validator{ - - /** - * Create a new Validator instance. - * - * @param array $data - * @param array $rules - * @param array $messages - * @return \Illuminate\Validation\Validator - * @static - */ - public static function make($data, $rules, $messages = array(), $customAttributes = array()){ - return \Illuminate\Validation\Factory::make($data, $rules, $messages, $customAttributes); - } - - /** - * Register a custom validator extension. - * - * @param string $rule - * @param \Closure|string $extension - * @param string $message - * @return void - * @static - */ - public static function extend($rule, $extension, $message = null){ - \Illuminate\Validation\Factory::extend($rule, $extension, $message); - } - - /** - * Register a custom implicit validator extension. - * - * @param string $rule - * @param \Closure|string $extension - * @param string $message - * @return void - * @static - */ - public static function extendImplicit($rule, $extension, $message = null){ - \Illuminate\Validation\Factory::extendImplicit($rule, $extension, $message); - } - - /** - * Register a custom implicit validator message replacer. - * - * @param string $rule - * @param \Closure|string $replacer - * @return void - * @static - */ - public static function replacer($rule, $replacer){ - \Illuminate\Validation\Factory::replacer($rule, $replacer); - } - - /** - * Set the Validator instance resolver. - * - * @param \Closure $resolver - * @return void - * @static - */ - public static function resolver($resolver){ - \Illuminate\Validation\Factory::resolver($resolver); - } - - /** - * Get the Translator implementation. - * - * @return \Symfony\Component\Translation\TranslatorInterface - * @static - */ - public static function getTranslator(){ - return \Illuminate\Validation\Factory::getTranslator(); - } - - /** - * Get the Presence Verifier implementation. - * - * @return \Illuminate\Validation\PresenceVerifierInterface - * @static - */ - public static function getPresenceVerifier(){ - return \Illuminate\Validation\Factory::getPresenceVerifier(); - } - - /** - * Set the Presence Verifier implementation. - * - * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier - * @return void - * @static - */ - public static function setPresenceVerifier($presenceVerifier){ - \Illuminate\Validation\Factory::setPresenceVerifier($presenceVerifier); - } - - } - - - class View extends \Illuminate\Support\Facades\View{ - - /** - * Get the evaluated view contents for the given view. - * - * @param string $view - * @param array $data - * @param array $mergeData - * @return \Illuminate\View\View - * @static - */ - public static function make($view, $data = array(), $mergeData = array()){ - return \Illuminate\View\Environment::make($view, $data, $mergeData); - } - - /** - * Get the evaluated view contents for a named view. - * - * @param string $view - * @param mixed $data - * @return \Illuminate\View\View - * @static - */ - public static function of($view, $data = array()){ - return \Illuminate\View\Environment::of($view, $data); - } - - /** - * Register a named view. - * - * @param string $view - * @param string $name - * @return void - * @static - */ - public static function name($view, $name){ - \Illuminate\View\Environment::name($view, $name); - } - - /** - * Determine if a given view exists. - * - * @param string $view - * @return bool - * @static - */ - public static function exists($view){ - return \Illuminate\View\Environment::exists($view); - } - - /** - * Get the rendered contents of a partial from a loop. - * - * @param string $view - * @param array $data - * @param string $iterator - * @param string $empty - * @return string - * @static - */ - public static function renderEach($view, $data, $iterator, $empty = 'raw|'){ - return \Illuminate\View\Environment::renderEach($view, $data, $iterator, $empty); - } - - /** - * Add a piece of shared data to the environment. - * - * @param string $key - * @param mixed $value - * @return void - * @static - */ - public static function share($key, $value = null){ - \Illuminate\View\Environment::share($key, $value); - } - - /** - * Register a view creator event. - * - * @param array|string $views - * @param \Closure|string $callback - * @return array - * @static - */ - public static function creator($views, $callback){ - return \Illuminate\View\Environment::creator($views, $callback); - } - - /** - * Register multiple view composers via an array. - * - * @param array $composers - * @return array - * @static - */ - public static function composers($composers){ - return \Illuminate\View\Environment::composers($composers); - } - - /** - * Register a view composer event. - * - * @param array|string $views - * @param \Closure|string $callback - * @return array - * @static - */ - public static function composer($views, $callback, $priority = null){ - return \Illuminate\View\Environment::composer($views, $callback, $priority); - } - - /** - * Call the composer for a given view. - * - * @param \Illuminate\View\View $view - * @return void - * @static - */ - public static function callComposer($view){ - \Illuminate\View\Environment::callComposer($view); - } - - /** - * Call the creator for a given view. - * - * @param \Illuminate\View\View $view - * @return void - * @static - */ - public static function callCreator($view){ - \Illuminate\View\Environment::callCreator($view); - } - - /** - * Start injecting content into a section. - * - * @param string $section - * @param string $content - * @return void - * @static - */ - public static function startSection($section, $content = ''){ - \Illuminate\View\Environment::startSection($section, $content); - } - - /** - * Inject inline content into a section. - * - * @param string $section - * @param string $content - * @return void - * @static - */ - public static function inject($section, $content){ - \Illuminate\View\Environment::inject($section, $content); - } - - /** - * Stop injecting content into a section and return its contents. - * - * @return string - * @static - */ - public static function yieldSection(){ - return \Illuminate\View\Environment::yieldSection(); - } - - /** - * Stop injecting content into a section. - * - * @param bool $overwrite - * @return string - * @static - */ - public static function stopSection($overwrite = false){ - return \Illuminate\View\Environment::stopSection($overwrite); - } - - /** - * Stop injecting content into a section and append it. - * - * @return string - * @static - */ - public static function appendSection(){ - return \Illuminate\View\Environment::appendSection(); - } - - /** - * Get the string contents of a section. - * - * @param string $section - * @param string $default - * @return string - * @static - */ - public static function yieldContent($section, $default = ''){ - return \Illuminate\View\Environment::yieldContent($section, $default); - } - - /** - * Flush all of the section contents. - * - * @return void - * @static - */ - public static function flushSections(){ - \Illuminate\View\Environment::flushSections(); - } - - /** - * Flush all of the section contents if done rendering. - * - * @return void - * @static - */ - public static function flushSectionsIfDoneRendering(){ - \Illuminate\View\Environment::flushSectionsIfDoneRendering(); - } - - /** - * Increment the rendering counter. - * - * @return void - * @static - */ - public static function incrementRender(){ - \Illuminate\View\Environment::incrementRender(); - } - - /** - * Decrement the rendering counter. - * - * @return void - * @static - */ - public static function decrementRender(){ - \Illuminate\View\Environment::decrementRender(); - } - - /** - * Check if there are no active render operations. - * - * @return bool - * @static - */ - public static function doneRendering(){ - return \Illuminate\View\Environment::doneRendering(); - } - - /** - * Add a location to the array of view locations. - * - * @param string $location - * @return void - * @static - */ - public static function addLocation($location){ - \Illuminate\View\Environment::addLocation($location); - } - - /** - * Add a new namespace to the loader. - * - * @param string $namespace - * @param string|array $hints - * @return void - * @static - */ - public static function addNamespace($namespace, $hints){ - \Illuminate\View\Environment::addNamespace($namespace, $hints); - } - - /** - * Prepend a new namespace to the loader. - * - * @param string $namespace - * @param string|array $hints - * @return void - * @static - */ - public static function prependNamespace($namespace, $hints){ - \Illuminate\View\Environment::prependNamespace($namespace, $hints); - } - - /** - * Register a valid view extension and its engine. - * - * @param string $extension - * @param string $engine - * @param \Closure $resolver - * @return void - * @static - */ - public static function addExtension($extension, $engine, $resolver = null){ - \Illuminate\View\Environment::addExtension($extension, $engine, $resolver); - } - - /** - * Get the extension to engine bindings. - * - * @return array - * @static - */ - public static function getExtensions(){ - return \Illuminate\View\Environment::getExtensions(); - } - - /** - * Get the engine resolver instance. - * - * @return \Illuminate\View\Engines\EngineResolver - * @static - */ - public static function getEngineResolver(){ - return \Illuminate\View\Environment::getEngineResolver(); - } - - /** - * Get the view finder instance. - * - * @return \Illuminate\View\ViewFinderInterface - * @static - */ - public static function getFinder(){ - return \Illuminate\View\Environment::getFinder(); - } - - /** - * Set the view finder instance. - * - * @return void - * @static - */ - public static function setFinder($finder){ - \Illuminate\View\Environment::setFinder($finder); - } - - /** - * Get the event dispatcher instance. - * - * @return \Illuminate\Events\Dispatcher - * @static - */ - public static function getDispatcher(){ - return \Illuminate\View\Environment::getDispatcher(); - } - - /** - * Set the event dispatcher instance. - * - * @param \Illuminate\Events\Dispatcher - * @return void - * @static - */ - public static function setDispatcher($events){ - \Illuminate\View\Environment::setDispatcher($events); - } - - /** - * Get the IoC container instance. - * - * @return \Illuminate\Container\Container - * @static - */ - public static function getContainer(){ - return \Illuminate\View\Environment::getContainer(); - } - - /** - * Set the IoC container instance. - * - * @param \Illuminate\Container\Container $container - * @return void - * @static - */ - public static function setContainer($container){ - \Illuminate\View\Environment::setContainer($container); - } - - /** - * Get an item from the shared data. - * - * @param string $key - * @param mixed $default - * @return mixed - * @static - */ - public static function shared($key, $default = null){ - return \Illuminate\View\Environment::shared($key, $default); - } - - /** - * Get all of the shared data for the environment. - * - * @return array - * @static - */ - public static function getShared(){ - return \Illuminate\View\Environment::getShared(); - } - - /** - * Get the entire array of sections. - * - * @return array - * @static - */ - public static function getSections(){ - return \Illuminate\View\Environment::getSections(); - } - - /** - * Get all of the registered named views in environment. - * - * @return array - * @static - */ - public static function getNames(){ - return \Illuminate\View\Environment::getNames(); - } - - } - - - class SSH extends \Illuminate\Support\Facades\SSH{ - - /** - * Get a remote connection instance. - * - * @param string|array|mixed $name - * @return \Illuminate\Remote\Connection - * @static - */ - public static function into($name){ - return \Illuminate\Remote\RemoteManager::into($name); - } - - /** - * Get a remote connection instance. - * - * @param string|array $name - * @return \Illuminate\Remote\Connection - * @static - */ - public static function connection($name = null){ - return \Illuminate\Remote\RemoteManager::connection($name); - } - - /** - * Get a connection group instance by name. - * - * @param string $name - * @return \Illuminate\Remote\Connection - * @static - */ - public static function group($name){ - return \Illuminate\Remote\RemoteManager::group($name); - } - - /** - * Resolve a multiple connection instance. - * - * @param array $names - * @return \Illuminate\Remote\MultiConnection - * @static - */ - public static function multiple($names){ - return \Illuminate\Remote\RemoteManager::multiple($names); - } - - /** - * Resolve a remote connection instance. - * - * @param string $name - * @return \Illuminate\Remote\Connection - * @static - */ - public static function resolve($name){ - return \Illuminate\Remote\RemoteManager::resolve($name); - } - - /** - * Get the default connection name. - * - * @return string - * @static - */ - public static function getDefaultConnection(){ - return \Illuminate\Remote\RemoteManager::getDefaultConnection(); - } - - /** - * Set the default connection name. - * - * @param string $name - * @return void - * @static - */ - public static function setDefaultConnection($name){ - \Illuminate\Remote\RemoteManager::setDefaultConnection($name); - } - - /** - * Define a set of commands as a task. - * - * @param string $task - * @param string|array $commands - * @return void - * @static - */ - public static function define($task, $commands){ - \Illuminate\Remote\Connection::define($task, $commands); - } - - /** - * Run a task against the connection. - * - * @param string $task - * @param \Closure $callback - * @return void - * @static - */ - public static function task($task, $callback = null){ - \Illuminate\Remote\Connection::task($task, $callback); - } - - /** - * Run a set of commands against the connection. - * - * @param string|array $commands - * @param \Closure $callback - * @return void - * @static - */ - public static function run($commands, $callback = null){ - \Illuminate\Remote\Connection::run($commands, $callback); - } - - /** - * Download the contents of a remote file. - * - * @param string $remote - * @param string $local - * @return void - * @static - */ - public static function get($remote, $local){ - \Illuminate\Remote\Connection::get($remote, $local); - } - - /** - * Get the contents of a remote file. - * - * @param string $remote - * @return string - * @static - */ - public static function getString($remote){ - return \Illuminate\Remote\Connection::getString($remote); - } - - /** - * Upload a local file to the server. - * - * @param string $local - * @param string $remote - * @return void - * @static - */ - public static function put($local, $remote){ - \Illuminate\Remote\Connection::put($local, $remote); - } - - /** - * Upload a string to to the given file on the server. - * - * @param string $remote - * @param string $contents - * @return void - * @static - */ - public static function putString($remote, $contents){ - \Illuminate\Remote\Connection::putString($remote, $contents); - } - - /** - * Display the given line using the default output. - * - * @param string $line - * @return void - * @static - */ - public static function display($line){ - \Illuminate\Remote\Connection::display($line); - } - - /** - * Get the exit status of the last command. - * - * @return int|bool - * @static - */ - public static function status(){ - return \Illuminate\Remote\Connection::status(); - } - - /** - * Get the gateway implementation. - * - * @return \Illuminate\Remote\GatewayInterface - * @throws \RuntimeException - * @static - */ - public static function getGateway(){ - return \Illuminate\Remote\Connection::getGateway(); - } - - /** - * Get the output implementation for the connection. - * - * @return \Symfony\Component\Console\Output\OutputInterface - * @static - */ - public static function getOutput(){ - return \Illuminate\Remote\Connection::getOutput(); - } - - /** - * Set the output implementation. - * - * @param \Symfony\Component\Console\Output\OutputInterface $output - * @return void - * @static - */ - public static function setOutput($output){ - \Illuminate\Remote\Connection::setOutput($output); - } - - } - - - class Alert extends \Bootstrapper\Alert{ - - } - - - class Badge extends \Bootstrapper\Badge{ - - } - - - class Breadcrumb extends \Bootstrapper\Breadcrumb{ - - } - - - class Button extends \Bootstrapper\Button{ - - } - - - class ButtonGroup extends \Bootstrapper\ButtonGroup{ - - } - - - class ButtonToolbar extends \Bootstrapper\ButtonToolbar{ - - } - - - class Carousel extends \Bootstrapper\Carousel{ - - } - - - class DropdownButton extends \Bootstrapper\DropdownButton{ - - } - - - class Form extends \Bootstrapper\Form{ - - /** - * Open up a new HTML form. - * - * @param array $options - * @return string - * @static - */ - public static function open($options = array()){ - return \Illuminate\Html\FormBuilder::open($options); - } - - /** - * Create a new model based form builder. - * - * @param mixed $model - * @param array $options - * @return string - * @static - */ - public static function model($model, $options = array()){ - return \Illuminate\Html\FormBuilder::model($model, $options); - } - - /** - * Set the model instance on the form builder. - * - * @param mixed $model - * @return void - * @static - */ - public static function setModel($model){ - \Illuminate\Html\FormBuilder::setModel($model); - } - - /** - * Close the current form. - * - * @return string - * @static - */ - public static function close(){ - return \Illuminate\Html\FormBuilder::close(); - } - - /** - * Generate a hidden field with the current CSRF token. - * - * @return string - * @static - */ - public static function token(){ - return \Illuminate\Html\FormBuilder::token(); - } - - /** - * Create a form label element. - * - * @param string $name - * @param string $value - * @param array $options - * @return string - * @static - */ - public static function label($name, $value = null, $options = array()){ - return \Illuminate\Html\FormBuilder::label($name, $value, $options); - } - - /** - * Create a form input field. - * - * @param string $type - * @param string $name - * @param string $value - * @param array $options - * @return string - * @static - */ - public static function input($type, $name, $value = null, $options = array()){ - return \Illuminate\Html\FormBuilder::input($type, $name, $value, $options); - } - - /** - * Create a text input field. - * - * @param string $name - * @param string $value - * @param array $options - * @return string - * @static - */ - public static function text($name, $value = null, $options = array()){ - return \Illuminate\Html\FormBuilder::text($name, $value, $options); - } - - /** - * Create a password input field. - * - * @param string $name - * @param array $options - * @return string - * @static - */ - public static function password($name, $options = array()){ - return \Illuminate\Html\FormBuilder::password($name, $options); - } - - /** - * Create a hidden input field. - * - * @param string $name - * @param string $value - * @param array $options - * @return string - * @static - */ - public static function hidden($name, $value = null, $options = array()){ - return \Illuminate\Html\FormBuilder::hidden($name, $value, $options); - } - - /** - * Create an e-mail input field. - * - * @param string $name - * @param string $value - * @param array $options - * @return string - * @static - */ - public static function email($name, $value = null, $options = array()){ - return \Illuminate\Html\FormBuilder::email($name, $value, $options); - } - - /** - * Create a url input field. - * - * @param string $name - * @param string $value - * @param array $options - * @return string - * @static - */ - public static function url($name, $value = null, $options = array()){ - return \Illuminate\Html\FormBuilder::url($name, $value, $options); - } - - /** - * Create a file input field. - * - * @param string $name - * @param array $options - * @return string - * @static - */ - public static function file($name, $options = array()){ - return \Illuminate\Html\FormBuilder::file($name, $options); - } - - /** - * Create a textarea input field. - * - * @param string $name - * @param string $value - * @param array $options - * @return string - * @static - */ - public static function textarea($name, $value = null, $options = array()){ - return \Illuminate\Html\FormBuilder::textarea($name, $value, $options); - } - - /** - * Create a select box field. - * - * @param string $name - * @param array $list - * @param string $selected - * @param array $options - * @return string - * @static - */ - public static function select($name, $list = array(), $selected = null, $options = array()){ - return \Illuminate\Html\FormBuilder::select($name, $list, $selected, $options); - } - - /** - * Create a select range field. - * - * @param string $name - * @param string $begin - * @param string $end - * @param string $selected - * @param array $options - * @return string - * @static - */ - public static function selectRange($name, $begin, $end, $selected = null, $options = array()){ - return \Illuminate\Html\FormBuilder::selectRange($name, $begin, $end, $selected, $options); - } - - /** - * Create a select year field. - * - * @param string $name - * @param string $begin - * @param string $end - * @param string $selected - * @param array $options - * @return string - * @static - */ - public static function selectYear(){ - return \Illuminate\Html\FormBuilder::selectYear(); - } - - /** - * Create a select month field. - * - * @param string $name - * @param string $selected - * @param array $options - * @return string - * @static - */ - public static function selectMonth($name, $selected = null, $options = array()){ - return \Illuminate\Html\FormBuilder::selectMonth($name, $selected, $options); - } - - /** - * Get the select option for the given value. - * - * @param string $display - * @param string $value - * @param string $selected - * @return string - * @static - */ - public static function getSelectOption($display, $value, $selected){ - return \Illuminate\Html\FormBuilder::getSelectOption($display, $value, $selected); - } - - /** - * Create a checkbox input field. - * - * @param string $name - * @param mixed $value - * @param bool $checked - * @param array $options - * @return string - * @static - */ - public static function checkbox($name, $value = 1, $checked = null, $options = array()){ - return \Illuminate\Html\FormBuilder::checkbox($name, $value, $checked, $options); - } - - /** - * Create a radio button input field. - * - * @param string $name - * @param mixed $value - * @param bool $checked - * @param array $options - * @return string - * @static - */ - public static function radio($name, $value = null, $checked = null, $options = array()){ - return \Illuminate\Html\FormBuilder::radio($name, $value, $checked, $options); - } - - /** - * Create a HTML reset input element. - * - * @param string $value - * @param array $attributes - * @return string - * @static - */ - public static function reset($value, $attributes = array()){ - return \Illuminate\Html\FormBuilder::reset($value, $attributes); - } - - /** - * Create a HTML image input element. - * - * @param string $url - * @param string $name - * @param array $attributes - * @return string - * @static - */ - public static function image($url, $name = null, $attributes = array()){ - return \Illuminate\Html\FormBuilder::image($url, $name, $attributes); - } - - /** - * Create a submit button element. - * - * @param string $value - * @param array $options - * @return string - * @static - */ - public static function submit($value = null, $options = array()){ - return \Illuminate\Html\FormBuilder::submit($value, $options); - } - - /** - * Create a button element. - * - * @param string $value - * @param array $options - * @return string - * @static - */ - public static function button($value = null, $options = array()){ - return \Illuminate\Html\FormBuilder::button($value, $options); - } - - /** - * Register a custom form macro. - * - * @param string $name - * @param callable $macro - * @return void - * @static - */ - public static function macro($name, $macro){ - \Illuminate\Html\FormBuilder::macro($name, $macro); - } - - /** - * Get the ID attribute for a field name. - * - * @param string $name - * @param array $attributes - * @return string - * @static - */ - public static function getIdAttribute($name, $attributes){ - return \Illuminate\Html\FormBuilder::getIdAttribute($name, $attributes); - } - - /** - * Get the value that should be assigned to the field. - * - * @param string $name - * @param string $value - * @return string - * @static - */ - public static function getValueAttribute($name, $value = null){ - return \Illuminate\Html\FormBuilder::getValueAttribute($name, $value); - } - - /** - * Get a value from the session's old input. - * - * @param string $name - * @return string - * @static - */ - public static function old($name){ - return \Illuminate\Html\FormBuilder::old($name); - } - - /** - * Determine if the old input is empty. - * - * @return bool - * @static - */ - public static function oldInputIsEmpty(){ - return \Illuminate\Html\FormBuilder::oldInputIsEmpty(); - } - - /** - * Get the session store implementation. - * - * @return \Illuminate\Session\Store $session - * @static - */ - public static function getSessionStore(){ - return \Illuminate\Html\FormBuilder::getSessionStore(); - } - - /** - * Set the session store implementation. - * - * @param \Illuminate\Session\Store $session - * @return \Illuminate\Html\FormBuilder - * @static - */ - public static function setSessionStore($session){ - return \Illuminate\Html\FormBuilder::setSessionStore($session); - } - - } - - - class Helpers extends \Bootstrapper\Helpers{ - - } - - - class Icon extends \Bootstrapper\Icon{ - - } - - - class Image extends \Intervention\Image\Facades\Image{ - - /** - * Open a new image resource from image file - * - * @param mixed $source - * @return \Intervention\Image\Image - * @static - */ - public static function make($source){ - return \Intervention\Image\Image::make($source); - } - - /** - * Create a new empty image resource - * - * @param int $width - * @param int $height - * @param mixed $bgcolor - * @return \Intervention\Image\Image - * @static - */ - public static function canvas($width, $height, $bgcolor = null){ - return \Intervention\Image\Image::canvas($width, $height, $bgcolor); - } - - /** - * Create a new image resource with image data from string - * - * @param string $data - * @return \Intervention\Image\Image - * @static - */ - public static function raw($string){ - return \Intervention\Image\Image::raw($string); - } - - /** - * Create new cached image and run callback - * (requires additional package intervention/imagecache) - * - * @param \Closure $callback - * @param integer $lifetime - * @param boolean $returnObj - * @return \Intervention\Image\Image - * @static - */ - public static function cache($callback = null, $lifetime = null, $returnObj = false){ - return \Intervention\Image\Image::cache($callback, $lifetime, $returnObj); - } - - /** - * Open a new image resource from image file - * - * @param string $path - * @return \Intervention\Image\Image - * @static - */ - public static function open($path){ - return \Intervention\Image\Image::open($path); - } - - /** - * Resize current image based on given width/height - * - * Width and height are optional, the not given parameter is calculated - * based on the given. The ratio boolean decides whether the resizing - * should keep the image ratio. You can also pass along a boolean to - * prevent the image from being upsized. - * - * @param integer $width The target width for the image - * @param integer $height The target height for the image - * @param boolean $ratio Determines if the image ratio should be preserved - * @param boolean $upsize Determines whether the image can be upsized - * @return \Intervention\Image\Image - * @static - */ - public static function resize($width = null, $height = null, $ratio = false, $upsize = true){ - return \Intervention\Image\Image::resize($width, $height, $ratio, $upsize); - } - - /** - * Legacy method to support old resizing calls - * - * @param array $dimensions - * @return \Intervention\Image\Image - * @static - */ - public static function legacyResize($dimensions = array()){ - return \Intervention\Image\Image::legacyResize($dimensions); - } - - /** - * Resize image to new width, constraining proportions - * - * @param integer $width - * @return \Intervention\Image\Image - * @static - */ - public static function widen($width){ - return \Intervention\Image\Image::widen($width); - } - - /** - * Resize image to new height, constraining proportions - * - * @param integer $height - * @return \Intervention\Image\Image - * @static - */ - public static function heighten($height){ - return \Intervention\Image\Image::heighten($height); - } - - /** - * Resize image canvas - * - * @param int $width - * @param int $height - * @param string $anchor - * @param boolean $relative - * @param mixed $bgcolor - * @return \Intervention\Image\Image - * @static - */ - public static function resizeCanvas($width, $height, $anchor = null, $relative = false, $bgcolor = null){ - return \Intervention\Image\Image::resizeCanvas($width, $height, $anchor, $relative, $bgcolor); - } - - /** - * Crop the current image - * - * @param integer $width - * @param integer $height - * @param integer $pos_x - * @param integer $pos_y - * @return \Intervention\Image\Image - * @static - */ - public static function crop($width, $height, $pos_x = null, $pos_y = null){ - return \Intervention\Image\Image::crop($width, $height, $pos_x, $pos_y); - } - - /** - * Cut out a detail of the image in given ratio and resize to output size - * - * @param integer $width - * @param integer $height - * @return \Intervention\Image\Image - * @static - */ - public static function grab($width = null, $height = null){ - return \Intervention\Image\Image::grab($width, $height); - } - - /** - * Legacy Method to support older grab calls - * - * @param array $dimensions - * @return \Intervention\Image\Image - * @static - */ - public static function legacyGrab($dimensions = array()){ - return \Intervention\Image\Image::legacyGrab($dimensions); - } - - /** - * Trim away image space in given color - * - * @param string $base Position of the color to trim away - * @param array $away Borders to trim away - * @param int $tolerance Tolerance of color comparison - * @param int $feather Amount of pixels outside (when positive) or inside (when negative) of the strict limit of the matched color - * @return \Intervention\Image\Image - * @static - */ - public static function trim($base = null, $away = null, $tolerance = null, $feather = 0){ - return \Intervention\Image\Image::trim($base, $away, $tolerance, $feather); - } - - /** - * Mirror image horizontally or vertically - * - * @param mixed $mode - * @return \Intervention\Image\Image - * @static - */ - public static function flip($mode = null){ - return \Intervention\Image\Image::flip($mode); - } - - /** - * Insert another image on top of the current image - * - * @param mixed $source - * @param integer $pos_x - * @param integer $pos_y - * @param string $anchor - * @return \Intervention\Image\Image - * @static - */ - public static function insert($source, $pos_x = 0, $pos_y = 0, $anchor = null){ - return \Intervention\Image\Image::insert($source, $pos_x, $pos_y, $anchor); - } - - /** - * Set opacity of current image - * - * @param integer $transparency - * @return \Intervention\Image\Image - * @static - */ - public static function opacity($transparency){ - return \Intervention\Image\Image::opacity($transparency); - } - - /** - * Apply given image as alpha mask on current image - * - * @param mixed $source - * @param boolean $mask_with_alpha - * @return \Intervention\Image\Image - * @static - */ - public static function mask($source, $mask_with_alpha = false){ - return \Intervention\Image\Image::mask($source, $mask_with_alpha); - } - - /** - * Rotate image with given angle - * - * @param float $angle - * @param string $color - * @param int $ignore_transparent - * @return \Intervention\Image\Image - * @static - */ - public static function rotate($angle = 0, $bgcolor = '#000000', $ignore_transparent = 0){ - return \Intervention\Image\Image::rotate($angle, $bgcolor, $ignore_transparent); - } - - /** - * Fill image with given color or image source at position x,y - * - * @param mixed $source - * @param integer $pos_x - * @param integer $pos_y - * @return \Intervention\Image\Image - * @static - */ - public static function fill($source, $pos_x = null, $pos_y = null){ - return \Intervention\Image\Image::fill($source, $pos_x, $pos_y); - } - - /** - * Set single pixel - * - * @param string $color - * @param integer $pos_x - * @param integer $pos_y - * @return \Intervention\Image\Image - * @static - */ - public static function pixel($color, $pos_x = 0, $pos_y = 0){ - return \Intervention\Image\Image::pixel($color, $pos_x, $pos_y); - } - - /** - * Draw rectangle in current image starting at point 1 and ending at point 2 - * - * @param string $color - * @param integer $x1 - * @param integer $y1 - * @param integer $x2 - * @param integer $y2 - * @param boolean $filled - * @return \Intervention\Image\Image - * @static - */ - public static function rectangle($color, $x1 = 0, $y1 = 0, $x2 = 10, $y2 = 10, $filled = true){ - return \Intervention\Image\Image::rectangle($color, $x1, $y1, $x2, $y2, $filled); - } - - /** - * Draw a line in current image starting at point 1 and ending at point 2 - * - * @param string $color - * @param integer $x1 - * @param integer $y1 - * @param integer $x2 - * @param integer $y2 - * @return \Intervention\Image\Image - * @static - */ - public static function line($color, $x1 = 0, $y1 = 0, $x2 = 10, $y2 = 10){ - return \Intervention\Image\Image::line($color, $x1, $y1, $x2, $y2); - } - - /** - * Draw an ellipse centered at given coordinates. - * - * @param string $color - * @param integer $pos_x - * @param integer $pos_y - * @param integer $width - * @param integer $height - * @param boolean $filled - * @return \Intervention\Image\Image - * @static - */ - public static function ellipse($color, $pos_x = 0, $pos_y = 0, $width = 10, $height = 10, $filled = true){ - return \Intervention\Image\Image::ellipse($color, $pos_x, $pos_y, $width, $height, $filled); - } - - /** - * Draw a circle centered at given coordinates - * - * @param string $color - * @param integer $x - * @param integer $y - * @param integer $radius - * @param boolean $filled - * @return \Intervention\Image\Image - * @static - */ - public static function circle($color, $x = 0, $y = 0, $radius = 10, $filled = true){ - return \Intervention\Image\Image::circle($color, $x, $y, $radius, $filled); - } - - /** - * Compatibility method to decide old or new style of text writing - * - * @param string $text - * @param integer $posx - * @param integer $posy - * @param mixed $size_or_callback - * @param string $color - * @param integer $angle - * @param string $fontfile - * @return \Intervention\Image\Image - * @static - */ - public static function text($text, $posx = 0, $posy = 0, $size_or_callback = null, $color = '000000', $angle = 0, $fontfile = null){ - return \Intervention\Image\Image::text($text, $posx, $posy, $size_or_callback, $color, $angle, $fontfile); - } - - /** - * Write text in current image, define details via callback - * - * @param string $text - * @param integer $posx - * @param integer $posy - * @param \Closure $callback - * @return \Intervention\Image\Image - * @static - */ - public static function textCallback($text, $posx = 0, $posy = 0, $callback = null){ - return \Intervention\Image\Image::textCallback($text, $posx, $posy, $callback); - } - - /** - * Legacy method to keep support of old style of text writing - * - * @param string $text - * @param integer $pos_x - * @param integer $pos_y - * @param integer $angle - * @param integer $size - * @param string $color - * @param string $fontfile - * @return \Intervention\Image\Image - * @static - */ - public static function legacyText($text, $pos_x = 0, $pos_y = 0, $size = 16, $color = '000000', $angle = 0, $fontfile = null){ - return \Intervention\Image\Image::legacyText($text, $pos_x, $pos_y, $size, $color, $angle, $fontfile); - } - - /** - * Changes the brightness of the current image - * - * @param int $level [description] - * @return \Intervention\Image\Image - * @static - */ - public static function brightness($level){ - return \Intervention\Image\Image::brightness($level); - } - - /** - * Changes the contrast of the current image - * - * @param int $level - * @return \Intervention\Image\Image - * @static - */ - public static function contrast($level){ - return \Intervention\Image\Image::contrast($level); - } - - /** - * Pixelate current image - * - * @param integer $size - * @param boolean $advanced - * @return \Intervention\Image\Image - * @static - */ - public static function pixelate($size = 10, $advanced = true){ - return \Intervention\Image\Image::pixelate($size, $advanced); - } - - /** - * Turn current image into a greyscale verision - * - * @return \Intervention\Image\Image - * @static - */ - public static function grayscale(){ - return \Intervention\Image\Image::grayscale(); - } - - /** - * Alias of greyscale - * - * @return \Intervention\Image\Image - * @static - */ - public static function greyscale(){ - return \Intervention\Image\Image::greyscale(); - } - - /** - * Invert colors of current image - * - * @return \Intervention\Image\Image - * @static - */ - public static function invert(){ - return \Intervention\Image\Image::invert(); - } - - /** - * Apply colorize filter to current image - * - * @param integer $red - * @param integer $green - * @param integer $blue - * @return \Intervention\Image\Image - * @static - */ - public static function colorize($red, $green, $blue){ - return \Intervention\Image\Image::colorize($red, $green, $blue); - } - - /** - * Apply blur filter on the current image - * - * @param integer $amount - * @return \Intervention\Image\Image - * @static - */ - public static function blur($amount = 1){ - return \Intervention\Image\Image::blur($amount); - } - - /** - * Set a maximum number of colors for the current image - * - * @param integer $count - * @param mixed $matte - * @return \Intervention\Image\Image - * @static - */ - public static function limitColors($count = null, $matte = null){ - return \Intervention\Image\Image::limitColors($count, $matte); - } - - /** - * Determine whether an Image should be interlaced - * - * @param boolean $interlace - * @return \Intervention\Image\Image - * @static - */ - public static function interlace($interlace = true){ - return \Intervention\Image\Image::interlace($interlace); - } - - /** - * Applies gamma correction - * - * @param float $input - * @param float $output - * @return \Intervention\Image\Image - * @static - */ - public static function gamma($input, $output){ - return \Intervention\Image\Image::gamma($input, $output); - } - - /** - * Set current image as original (reset will return to this) - * - * @return void - * @static - */ - public static function backup(){ - \Intervention\Image\Image::backup(); - } - - /** - * Reset to original image resource - * - * @return void - * @static - */ - public static function reset(){ - \Intervention\Image\Image::reset(); - } - - /** - * Encode image in different formats - * - * @param string $format - * @param integer $quality - * @return string - * @static - */ - public static function encode($format = null, $quality = 90){ - return \Intervention\Image\Image::encode($format, $quality); - } - - /** - * Picks and formats color at position - * - * @param int $x - * @param int $y - * @param string $format - * @return mixed - * @static - */ - public static function pickColor($x, $y, $format = null){ - return \Intervention\Image\Image::pickColor($x, $y, $format); - } - - /** - * Allocate color from given string - * - * @param string $value - * @return int - * @static - */ - public static function parseColor($value){ - return \Intervention\Image\Image::parseColor($value); - } - - /** - * Save image in filesystem - * - * @param string $path - * @param integer $quality - * @return \Intervention\Image\Image - * @static - */ - public static function save($path = null, $quality = 90){ - return \Intervention\Image\Image::save($path, $quality); - } - - /** - * Read Exif data from the current image - * - * Note: Windows PHP Users - in order to use this method you will need to - * enable the mbstring and exif extensions within the php.ini file. - * - * @param string $key - * @return mixed - * @static - */ - public static function exif($key = null){ - return \Intervention\Image\Image::exif($key); - } - - /** - * Send direct output with proper header - * - * @param string $type - * @param integer $quality - * @return string - * @static - */ - public static function response($type = null, $quality = 90){ - return \Intervention\Image\Image::response($type, $quality); - } - - /** - * Destroys image resource and frees memory - * - * @return void - * @static - */ - public static function destroy(){ - \Intervention\Image\Image::destroy(); - } - - /** - * Calculates checksum of current image - * - * @return String - * @static - */ - public static function checksum(){ - return \Intervention\Image\Image::checksum(); - } - - } - - - class Label extends \Bootstrapper\Label{ - - } - - - class MediaObject extends \Bootstrapper\MediaObject{ - - } - - - class Navbar extends \Bootstrapper\Navbar{ - - } - - - class Navigation extends \Bootstrapper\Navigation{ - - } - - - class Progress extends \Bootstrapper\Progress{ - - } - - - class Tabbable extends \Bootstrapper\Tabbable{ - - } - - - class Table extends \Bootstrapper\Table{ - - } - - - class Thumbnail extends \Bootstrapper\Thumbnail{ - - } - - - class Typography extends \Bootstrapper\Typography{ - - } - - - class Confide extends \Zizaco\Confide\ConfideFacade{ - - /** - * Returns the Laravel application - * - * @return \Zizaco\Confide\Illuminate\Foundation\Application - * @static - */ - public static function app(){ - return \Zizaco\Confide\Confide::app(); - } - - /** - * Returns an object of the model set in auth config - * - * @return object - * @static - */ - public static function model(){ - return \Zizaco\Confide\Confide::model(); - } - - /** - * Get the currently authenticated user or null. - * - * @return \Zizaco\Confide\Zizaco\Confide\ConfideUser|null - * @static - */ - public static function user(){ - return \Zizaco\Confide\Confide::user(); - } - - /** - * Set the user confirmation to true. - * - * @param string $code - * @return bool - * @static - */ - public static function confirm($code){ - return \Zizaco\Confide\Confide::confirm($code); - } - - /** - * Attempt to log a user into the application with - * password and identity field(s), usually email or username. - * - * @param array $credentials - * @param bool $confirmed_only - * @param mixed $identity_columns - * @return boolean Success - * @static - */ - public static function logAttempt($credentials, $confirmed_only = false, $identity_columns = array()){ - return \Zizaco\Confide\Confide::logAttempt($credentials, $confirmed_only, $identity_columns); - } - - /** - * Checks if the credentials has been throttled by too - * much failed login attempts - * - * @param array $credentials - * @return mixed Value. - * @static - */ - public static function isThrottled($credentials){ - return \Zizaco\Confide\Confide::isThrottled($credentials); - } - - /** - * Send email with information about password reset - * - * @param string $email - * @return bool - * @static - */ - public static function forgotPassword($email){ - return \Zizaco\Confide\Confide::forgotPassword($email); - } - - /** - * Checks to see if the user has a valid token. - * - * @param $token - * @return bool - * @static - */ - public static function isValidToken($token){ - return \Zizaco\Confide\Confide::isValidToken($token); - } - - /** - * Change user password - * - * @return string - * @static - */ - public static function resetPassword($params){ - return \Zizaco\Confide\Confide::resetPassword($params); - } - - /** - * Log the user out of the application. - * - * @return void - * @static - */ - public static function logout(){ - \Zizaco\Confide\Confide::logout(); - } - - /** - * Display the default login view - * - * @deprecated - * @return \Zizaco\Confide\Illuminate\View\View - * @static - */ - public static function makeLoginForm(){ - return \Zizaco\Confide\Confide::makeLoginForm(); - } - - /** - * Display the default signup view - * - * @deprecated - * @return \Zizaco\Confide\Illuminate\View\View - * @static - */ - public static function makeSignupForm(){ - return \Zizaco\Confide\Confide::makeSignupForm(); - } - - /** - * Display the forget password view - * - * @deprecated - * @return \Zizaco\Confide\Illuminate\View\View - * @static - */ - public static function makeForgotPasswordForm(){ - return \Zizaco\Confide\Confide::makeForgotPasswordForm(); - } - - /** - * Display the forget password view - * - * @deprecated - * @return \Zizaco\Confide\Illuminate\View\View - * @static - */ - public static function makeResetPasswordForm($token){ - return \Zizaco\Confide\Confide::makeResetPasswordForm($token); - } - - /** - * Check whether the controller's action exists. - * - * Returns the url if it does. Otherwise false. - * - * @param $controllerAction - * @return string - * @static - */ - public static function checkAction($action, $parameters = array(), $absolute = true){ - return \Zizaco\Confide\Confide::checkAction($action, $parameters, $absolute); - } - - } - - - class Former extends \Former\Facades\Former{ - - /** - * Register a macro with Former - * - * @param string $name The name of the macro - * @param Callable $macro The macro itself - * @return mixed - * @static - */ - public static function macro($name, $macro){ - return \Former\Former::macro($name, $macro); - } - - /** - * Check if a macro exists - * - * @param string $name - * @return boolean - * @static - */ - public static function hasMacro($name){ - return \Former\Former::hasMacro($name); - } - - /** - * Get a registered macro - * - * @param string $name - * @return \Former\Closure - * @static - */ - public static function getMacro($name){ - return \Former\Former::getMacro($name); - } - - /** - * Add values to populate the array - * - * @param mixed $values Can be an Eloquent object or an array - * @static - */ - public static function populate($values){ - return \Former\Former::populate($values); - } - - /** - * Set the value of a particular field - * - * @param string $field The field's name - * @param mixed $value Its new value - * @static - */ - public static function populateField($field, $value){ - return \Former\Former::populateField($field, $value); - } - - /** - * Get the value of a field - * - * @param string $field The field's name - * @param null $fallback - * @return mixed - * @static - */ - public static function getValue($field, $fallback = null){ - return \Former\Former::getValue($field, $fallback); - } - - /** - * Fetch a field value from both the new and old POST array - * - * @param string $name A field name - * @param string $fallback A fallback if nothing was found - * @return string The results - * @static - */ - public static function getPost($name, $fallback = null){ - return \Former\Former::getPost($name, $fallback); - } - - /** - * Set the errors to use for validations - * - * @param \Former\Message $validator The result from a validation - * @return void - * @static - */ - public static function withErrors($validator = null){ - \Former\Former::withErrors($validator); - } - - /** - * Add live validation rules - * - * @param array *$rules An array of Laravel rules - * @return void - * @static - */ - public static function withRules(){ - \Former\Former::withRules(); - } - - /** - * Switch the framework used by Former - * - * @param string $framework The name of the framework to use - * @static - */ - public static function framework($framework = null){ - return \Former\Former::framework($framework); - } - - /** - * Get a new framework instance - * - * @param string $framework - * @return \Former\Framework - * @static - */ - public static function getFrameworkInstance($framework){ - return \Former\Former::getFrameworkInstance($framework); - } - - /** - * Get an option from the config - * - * @param string $option The option - * @param mixed $default Optional fallback - * @return mixed - * @static - */ - public static function getOption($option, $default = null){ - return \Former\Former::getOption($option, $default); - } - - /** - * Set an option on the config - * - * @param string $option - * @param string $value - * @static - */ - public static function setOption($option, $value){ - return \Former\Former::setOption($option, $value); - } - - /** - * Closes a form - * - * @return string A form closing tag - * @static - */ - public static function close(){ - return \Former\Former::close(); - } - - /** - * Get the errors for the current field - * - * @param string $name A field name - * @return string An error message - * @static - */ - public static function getErrors($name = null){ - return \Former\Former::getErrors($name); - } - - /** - * Get a rule from the Rules array - * - * @param string $name The field to fetch - * @return array An array of rules - * @static - */ - public static function getRules($name){ - return \Former\Former::getRules($name); - } - - } - - - class Datatable extends \Chumper\Datatable\Facades\DatatableFacade{ - - /** - * - * - * @param $query - * @return \Chumper\Datatable\QueryEngine - * @static - */ - public static function query($query){ - return \Chumper\Datatable\Datatable::query($query); - } - - /** - * - * - * @param $collection - * @return \Chumper\Datatable\CollectionEngine - * @static - */ - public static function collection($collection){ - return \Chumper\Datatable\Datatable::collection($collection); - } - - /** - * - * - * @return \Chumper\Datatable\Table - * @static - */ - public static function table(){ - return \Chumper\Datatable\Datatable::table(); - } - - /** - * - * - * @return bool True if the plugin should handle this request, false otherwise - * @static - */ - public static function shouldHandle(){ - return \Chumper\Datatable\Datatable::shouldHandle(); - } - - } - - - class Omnipay extends \Omnipay\Omnipay{ - - } - - - class CreditCard extends \Omnipay\Common\CreditCard{ - - } - - - class Countries extends \Webpatser\Countries\CountriesFacade{ - - /** - * Returns one country - * - * @param string $id The country id - * @return array - * @static - */ - public static function getOne($id){ - return \Webpatser\Countries\Countries::getOne($id); - } - - /** - * Returns a list of countries - * - * @param string sort - * @return array - * @static - */ - public static function getList($sort = null){ - return \Webpatser\Countries\Countries::getList($sort); - } - - /** - * Register an observer with the Model. - * - * @param object $class - * @return void - * @static - */ - public static function observe($class){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::observe($class); - } - - /** - * Fill the model with an array of attributes. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model|static - * @throws MassAssignmentException - * @static - */ - public static function fill($attributes){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::fill($attributes); - } - - /** - * Create a new instance of the given model. - * - * @param array $attributes - * @param bool $exists - * @return \Illuminate\Database\Eloquent\Model|static - * @static - */ - public static function newInstance($attributes = array(), $exists = false){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::newInstance($attributes, $exists); - } - - /** - * Create a new model instance that is existing. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model|static - * @static - */ - public static function newFromBuilder($attributes = array()){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::newFromBuilder($attributes); - } - - /** - * Save a new model and return the instance. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model|static - * @static - */ - public static function create($attributes){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::create($attributes); - } - - /** - * Get the first record matching the attributes or create it. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model - * @static - */ - public static function firstOrCreate($attributes){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::firstOrCreate($attributes); - } - - /** - * Get the first record matching the attributes or instantiate it. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model - * @static - */ - public static function firstOrNew($attributes){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::firstOrNew($attributes); - } - - /** - * Begin querying the model. - * - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function query(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::query(); - } - - /** - * Begin querying the model on a given connection. - * - * @param string $connection - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function on($connection = null){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::on($connection); - } - - /** - * Get all of the models from the database. - * - * @param array $columns - * @return \Illuminate\Database\Eloquent\Collection|static[] - * @static - */ - public static function all($columns = array()){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::all($columns); - } - - /** - * Find a model by its primary key. - * - * @param mixed $id - * @param array $columns - * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static - * @static - */ - public static function find($id, $columns = array()){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::find($id, $columns); - } - - /** - * Find a model by its primary key or return new static. - * - * @param mixed $id - * @param array $columns - * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static - * @static - */ - public static function findOrNew($id, $columns = array()){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::findOrNew($id, $columns); - } - - /** - * Find a model by its primary key or throw an exception. - * - * @param mixed $id - * @param array $columns - * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static - * @throws ModelNotFoundException - * @static - */ - public static function findOrFail($id, $columns = array()){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::findOrFail($id, $columns); - } - - /** - * Eager load relations on the model. - * - * @param array|string $relations - * @return \Illuminate\Database\Eloquent\Model - * @static - */ - public static function load($relations){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::load($relations); - } - - /** - * Being querying a model with eager loading. - * - * @param array|string $relations - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function with($relations){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::with($relations); - } - - /** - * Define a one-to-one relationship. - * - * @param string $related - * @param string $foreignKey - * @param string $localKey - * @return \Illuminate\Database\Eloquent\Relations\HasOne - * @static - */ - public static function hasOne($related, $foreignKey = null, $localKey = null){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::hasOne($related, $foreignKey, $localKey); - } - - /** - * Define a polymorphic one-to-one relationship. - * - * @param string $related - * @param string $name - * @param string $type - * @param string $id - * @param string $localKey - * @return \Illuminate\Database\Eloquent\Relations\MorphOne - * @static - */ - public static function morphOne($related, $name, $type = null, $id = null, $localKey = null){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::morphOne($related, $name, $type, $id, $localKey); - } - - /** - * Define an inverse one-to-one or many relationship. - * - * @param string $related - * @param string $foreignKey - * @param string $otherKey - * @param string $relation - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo - * @static - */ - public static function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::belongsTo($related, $foreignKey, $otherKey, $relation); - } - - /** - * Define a polymorphic, inverse one-to-one or many relationship. - * - * @param string $name - * @param string $type - * @param string $id - * @return \Illuminate\Database\Eloquent\Relations\MorphTo - * @static - */ - public static function morphTo($name = null, $type = null, $id = null){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::morphTo($name, $type, $id); - } - - /** - * Define a one-to-many relationship. - * - * @param string $related - * @param string $foreignKey - * @param string $localKey - * @return \Illuminate\Database\Eloquent\Relations\HasMany - * @static - */ - public static function hasMany($related, $foreignKey = null, $localKey = null){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::hasMany($related, $foreignKey, $localKey); - } - - /** - * Define a has-many-through relationship. - * - * @param string $related - * @param string $through - * @param string|null $firstKey - * @param string|null $secondKey - * @return \Illuminate\Database\Eloquent\Relations\HasManyThrough - * @static - */ - public static function hasManyThrough($related, $through, $firstKey = null, $secondKey = null){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::hasManyThrough($related, $through, $firstKey, $secondKey); - } - - /** - * Define a polymorphic one-to-many relationship. - * - * @param string $related - * @param string $name - * @param string $type - * @param string $id - * @param string $localKey - * @return \Illuminate\Database\Eloquent\Relations\MorphMany - * @static - */ - public static function morphMany($related, $name, $type = null, $id = null, $localKey = null){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::morphMany($related, $name, $type, $id, $localKey); - } - - /** - * Define a many-to-many relationship. - * - * @param string $related - * @param string $table - * @param string $foreignKey - * @param string $otherKey - * @param string $relation - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - * @static - */ - public static function belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::belongsToMany($related, $table, $foreignKey, $otherKey, $relation); - } - - /** - * Define a polymorphic many-to-many relationship. - * - * @param string $related - * @param string $name - * @param string $table - * @param string $foreignKey - * @param string $otherKey - * @param bool $inverse - * @return \Illuminate\Database\Eloquent\Relations\MorphToMany - * @static - */ - public static function morphToMany($related, $name, $table = null, $foreignKey = null, $otherKey = null, $inverse = false){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::morphToMany($related, $name, $table, $foreignKey, $otherKey, $inverse); - } - - /** - * Define a polymorphic, inverse many-to-many relationship. - * - * @param string $related - * @param string $name - * @param string $table - * @param string $foreignKey - * @param string $otherKey - * @return \Illuminate\Database\Eloquent\Relations\MorphToMany - * @static - */ - public static function morphedByMany($related, $name, $table = null, $foreignKey = null, $otherKey = null){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::morphedByMany($related, $name, $table, $foreignKey, $otherKey); - } - - /** - * Get the joining table name for a many-to-many relation. - * - * @param string $related - * @return string - * @static - */ - public static function joiningTable($related){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::joiningTable($related); - } - - /** - * Destroy the models for the given IDs. - * - * @param array|int $ids - * @return int - * @static - */ - public static function destroy($ids){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::destroy($ids); - } - - /** - * Delete the model from the database. - * - * @return bool|null - * @static - */ - public static function delete(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::delete(); - } - - /** - * Force a hard delete on a soft deleted model. - * - * @return void - * @static - */ - public static function forceDelete(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::forceDelete(); - } - - /** - * Restore a soft-deleted model instance. - * - * @return bool|null - * @static - */ - public static function restore(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::restore(); - } - - /** - * Register a saving model event with the dispatcher. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function saving($callback){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::saving($callback); - } - - /** - * Register a saved model event with the dispatcher. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function saved($callback){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::saved($callback); - } - - /** - * Register an updating model event with the dispatcher. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function updating($callback){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::updating($callback); - } - - /** - * Register an updated model event with the dispatcher. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function updated($callback){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::updated($callback); - } - - /** - * Register a creating model event with the dispatcher. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function creating($callback){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::creating($callback); - } - - /** - * Register a created model event with the dispatcher. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function created($callback){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::created($callback); - } - - /** - * Register a deleting model event with the dispatcher. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function deleting($callback){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::deleting($callback); - } - - /** - * Register a deleted model event with the dispatcher. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function deleted($callback){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::deleted($callback); - } - - /** - * Register a restoring model event with the dispatcher. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function restoring($callback){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::restoring($callback); - } - - /** - * Register a restored model event with the dispatcher. - * - * @param \Closure|string $callback - * @return void - * @static - */ - public static function restored($callback){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::restored($callback); - } - - /** - * Remove all of the event listeners for the model. - * - * @return void - * @static - */ - public static function flushEventListeners(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::flushEventListeners(); - } - - /** - * Get the observable event names. - * - * @return array - * @static - */ - public static function getObservableEvents(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getObservableEvents(); - } - - /** - * Update the model in the database. - * - * @param array $attributes - * @return mixed - * @static - */ - public static function update($attributes = array()){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::update($attributes); - } - - /** - * Save the model and all of its relationships. - * - * @return bool - * @static - */ - public static function push(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::push(); - } - - /** - * Save the model to the database. - * - * @param array $options - * @return bool - * @static - */ - public static function save($options = array()){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::save($options); - } - - /** - * Touch the owning relations of the model. - * - * @return void - * @static - */ - public static function touchOwners(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::touchOwners(); - } - - /** - * Determine if the model touches a given relation. - * - * @param string $relation - * @return bool - * @static - */ - public static function touches($relation){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::touches($relation); - } - - /** - * Update the model's update timestamp. - * - * @return bool - * @static - */ - public static function touch(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::touch(); - } - - /** - * Set the value of the "created at" attribute. - * - * @param mixed $value - * @return void - * @static - */ - public static function setCreatedAt($value){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setCreatedAt($value); - } - - /** - * Set the value of the "updated at" attribute. - * - * @param mixed $value - * @return void - * @static - */ - public static function setUpdatedAt($value){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setUpdatedAt($value); - } - - /** - * Get the name of the "created at" column. - * - * @return string - * @static - */ - public static function getCreatedAtColumn(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getCreatedAtColumn(); - } - - /** - * Get the name of the "updated at" column. - * - * @return string - * @static - */ - public static function getUpdatedAtColumn(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getUpdatedAtColumn(); - } - - /** - * Get the name of the "deleted at" column. - * - * @return string - * @static - */ - public static function getDeletedAtColumn(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getDeletedAtColumn(); - } - - /** - * Get the fully qualified "deleted at" column. - * - * @return string - * @static - */ - public static function getQualifiedDeletedAtColumn(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getQualifiedDeletedAtColumn(); - } - - /** - * Get a fresh timestamp for the model. - * - * @return \Carbon\Carbon - * @static - */ - public static function freshTimestamp(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::freshTimestamp(); - } - - /** - * Get a fresh timestamp for the model. - * - * @return string - * @static - */ - public static function freshTimestampString(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::freshTimestampString(); - } - - /** - * Get a new query builder for the model's table. - * - * @param bool $excludeDeleted - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function newQuery($excludeDeleted = true){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::newQuery($excludeDeleted); - } - - /** - * Get a new query builder that includes soft deletes. - * - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function newQueryWithDeleted(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::newQueryWithDeleted(); - } - - /** - * Create a new Eloquent query builder for the model. - * - * @param \Illuminate\Database\Query\Builder $query - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function newEloquentBuilder($query){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::newEloquentBuilder($query); - } - - /** - * Determine if the model instance has been soft-deleted. - * - * @return bool - * @static - */ - public static function trashed(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::trashed(); - } - - /** - * Get a new query builder that includes soft deletes. - * - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function withTrashed(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::withTrashed(); - } - - /** - * Get a new query builder that only includes soft deletes. - * - * @return \Illuminate\Database\Eloquent\Builder|static - * @static - */ - public static function onlyTrashed(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::onlyTrashed(); - } - - /** - * Create a new Eloquent Collection instance. - * - * @param array $models - * @return \Illuminate\Database\Eloquent\Collection - * @static - */ - public static function newCollection($models = array()){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::newCollection($models); - } - - /** - * Create a new pivot model instance. - * - * @param \Illuminate\Database\Eloquent\Model $parent - * @param array $attributes - * @param string $table - * @param bool $exists - * @return \Illuminate\Database\Eloquent\Relations\Pivot - * @static - */ - public static function newPivot($parent, $attributes, $table, $exists){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::newPivot($parent, $attributes, $table, $exists); - } - - /** - * Get the table associated with the model. - * - * @return string - * @static - */ - public static function getTable(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getTable(); - } - - /** - * Set the table associated with the model. - * - * @param string $table - * @return void - * @static - */ - public static function setTable($table){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setTable($table); - } - - /** - * Get the value of the model's primary key. - * - * @return mixed - * @static - */ - public static function getKey(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getKey(); - } - - /** - * Get the primary key for the model. - * - * @return string - * @static - */ - public static function getKeyName(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getKeyName(); - } - - /** - * Get the table qualified key name. - * - * @return string - * @static - */ - public static function getQualifiedKeyName(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getQualifiedKeyName(); - } - - /** - * Determine if the model uses timestamps. - * - * @return bool - * @static - */ - public static function usesTimestamps(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::usesTimestamps(); - } - - /** - * Determine if the model instance uses soft deletes. - * - * @return bool - * @static - */ - public static function isSoftDeleting(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::isSoftDeleting(); - } - - /** - * Set the soft deleting property on the model. - * - * @param bool $enabled - * @return void - * @static - */ - public static function setSoftDeleting($enabled){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setSoftDeleting($enabled); - } - - /** - * Get the number of models to return per page. - * - * @return int - * @static - */ - public static function getPerPage(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getPerPage(); - } - - /** - * Set the number of models ot return per page. - * - * @param int $perPage - * @return void - * @static - */ - public static function setPerPage($perPage){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setPerPage($perPage); - } - - /** - * Get the default foreign key name for the model. - * - * @return string - * @static - */ - public static function getForeignKey(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getForeignKey(); - } - - /** - * Get the hidden attributes for the model. - * - * @return array - * @static - */ - public static function getHidden(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getHidden(); - } - - /** - * Set the hidden attributes for the model. - * - * @param array $hidden - * @return void - * @static - */ - public static function setHidden($hidden){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setHidden($hidden); - } - - /** - * Set the visible attributes for the model. - * - * @param array $visible - * @return void - * @static - */ - public static function setVisible($visible){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setVisible($visible); - } - - /** - * Set the accessors to append to model arrays. - * - * @param array $appends - * @return void - * @static - */ - public static function setAppends($appends){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setAppends($appends); - } - - /** - * Get the fillable attributes for the model. - * - * @return array - * @static - */ - public static function getFillable(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getFillable(); - } - - /** - * Set the fillable attributes for the model. - * - * @param array $fillable - * @return \Illuminate\Database\Eloquent\Model - * @static - */ - public static function fillable($fillable){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::fillable($fillable); - } - - /** - * Set the guarded attributes for the model. - * - * @param array $guarded - * @return \Illuminate\Database\Eloquent\Model - * @static - */ - public static function guard($guarded){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::guard($guarded); - } - - /** - * Disable all mass assignable restrictions. - * - * @return void - * @static - */ - public static function unguard(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::unguard(); - } - - /** - * Enable the mass assignment restrictions. - * - * @return void - * @static - */ - public static function reguard(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::reguard(); - } - - /** - * Set "unguard" to a given state. - * - * @param bool $state - * @return void - * @static - */ - public static function setUnguardState($state){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setUnguardState($state); - } - - /** - * Determine if the given attribute may be mass assigned. - * - * @param string $key - * @return bool - * @static - */ - public static function isFillable($key){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::isFillable($key); - } - - /** - * Determine if the given key is guarded. - * - * @param string $key - * @return bool - * @static - */ - public static function isGuarded($key){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::isGuarded($key); - } - - /** - * Determine if the model is totally guarded. - * - * @return bool - * @static - */ - public static function totallyGuarded(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::totallyGuarded(); - } - - /** - * Get the relationships that are touched on save. - * - * @return array - * @static - */ - public static function getTouchedRelations(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getTouchedRelations(); - } - - /** - * Set the relationships that are touched on save. - * - * @param array $touches - * @return void - * @static - */ - public static function setTouchedRelations($touches){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setTouchedRelations($touches); - } - - /** - * Get the value indicating whether the IDs are incrementing. - * - * @return bool - * @static - */ - public static function getIncrementing(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getIncrementing(); - } - - /** - * Set whether IDs are incrementing. - * - * @param bool $value - * @return void - * @static - */ - public static function setIncrementing($value){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setIncrementing($value); - } - - /** - * Convert the model instance to JSON. - * - * @param int $options - * @return string - * @static - */ - public static function toJson($options = 0){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::toJson($options); - } - - /** - * Convert the model instance to an array. - * - * @return array - * @static - */ - public static function toArray(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::toArray(); - } - - /** - * Convert the model's attributes to an array. - * - * @return array - * @static - */ - public static function attributesToArray(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::attributesToArray(); - } - - /** - * Get the model's relationships in array form. - * - * @return array - * @static - */ - public static function relationsToArray(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::relationsToArray(); - } - - /** - * Get an attribute from the model. - * - * @param string $key - * @return mixed - * @static - */ - public static function getAttribute($key){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getAttribute($key); - } - - /** - * Determine if a get mutator exists for an attribute. - * - * @param string $key - * @return bool - * @static - */ - public static function hasGetMutator($key){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::hasGetMutator($key); - } - - /** - * Set a given attribute on the model. - * - * @param string $key - * @param mixed $value - * @return void - * @static - */ - public static function setAttribute($key, $value){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setAttribute($key, $value); - } - - /** - * Determine if a set mutator exists for an attribute. - * - * @param string $key - * @return bool - * @static - */ - public static function hasSetMutator($key){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::hasSetMutator($key); - } - - /** - * Get the attributes that should be converted to dates. - * - * @return array - * @static - */ - public static function getDates(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getDates(); - } - - /** - * Convert a DateTime to a storable string. - * - * @param \DateTime|int $value - * @return string - * @static - */ - public static function fromDateTime($value){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::fromDateTime($value); - } - - /** - * Clone the model into a new, non-existing instance. - * - * @return \Illuminate\Database\Eloquent\Model - * @static - */ - public static function replicate(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::replicate(); - } - - /** - * Get all of the current attributes on the model. - * - * @return array - * @static - */ - public static function getAttributes(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getAttributes(); - } - - /** - * Set the array of model attributes. No checking is done. - * - * @param array $attributes - * @param bool $sync - * @return void - * @static - */ - public static function setRawAttributes($attributes, $sync = false){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setRawAttributes($attributes, $sync); - } - - /** - * Get the model's original attribute values. - * - * @param string $key - * @param mixed $default - * @return array - * @static - */ - public static function getOriginal($key = null, $default = null){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getOriginal($key, $default); - } - - /** - * Sync the original attributes with the current. - * - * @return \Illuminate\Database\Eloquent\Model - * @static - */ - public static function syncOriginal(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::syncOriginal(); - } - - /** - * Determine if a given attribute is dirty. - * - * @param string $attribute - * @return bool - * @static - */ - public static function isDirty($attribute){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::isDirty($attribute); - } - - /** - * Get the attributes that have been changed since last sync. - * - * @return array - * @static - */ - public static function getDirty(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getDirty(); - } - - /** - * Get all the loaded relations for the instance. - * - * @return array - * @static - */ - public static function getRelations(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getRelations(); - } - - /** - * Get a specified relationship. - * - * @param string $relation - * @return mixed - * @static - */ - public static function getRelation($relation){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getRelation($relation); - } - - /** - * Set the specific relationship in the model. - * - * @param string $relation - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Model - * @static - */ - public static function setRelation($relation, $value){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::setRelation($relation, $value); - } - - /** - * Set the entire relations array on the model. - * - * @param array $relations - * @return \Illuminate\Database\Eloquent\Model - * @static - */ - public static function setRelations($relations){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::setRelations($relations); - } - - /** - * Get the database connection for the model. - * - * @return \Illuminate\Database\Connection - * @static - */ - public static function getConnection(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getConnection(); - } - - /** - * Get the current connection name for the model. - * - * @return string - * @static - */ - public static function getConnectionName(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getConnectionName(); - } - - /** - * Set the connection associated with the model. - * - * @param string $name - * @return \Illuminate\Database\Eloquent\Model - * @static - */ - public static function setConnection($name){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::setConnection($name); - } - - /** - * Resolve a connection instance. - * - * @param string $connection - * @return \Illuminate\Database\Connection - * @static - */ - public static function resolveConnection($connection = null){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::resolveConnection($connection); - } - - /** - * Get the connection resolver instance. - * - * @return \Illuminate\Database\ConnectionResolverInterface - * @static - */ - public static function getConnectionResolver(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getConnectionResolver(); - } - - /** - * Set the connection resolver instance. - * - * @param \Illuminate\Database\ConnectionResolverInterface $resolver - * @return void - * @static - */ - public static function setConnectionResolver($resolver){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setConnectionResolver($resolver); - } - - /** - * Get the event dispatcher instance. - * - * @return \Illuminate\Events\Dispatcher - * @static - */ - public static function getEventDispatcher(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getEventDispatcher(); - } - - /** - * Set the event dispatcher instance. - * - * @param \Illuminate\Events\Dispatcher $dispatcher - * @return void - * @static - */ - public static function setEventDispatcher($dispatcher){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::setEventDispatcher($dispatcher); - } - - /** - * Unset the event dispatcher for models. - * - * @return void - * @static - */ - public static function unsetEventDispatcher(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::unsetEventDispatcher(); - } - - /** - * Get the mutated attributes for a given instance. - * - * @return array - * @static - */ - public static function getMutatedAttributes(){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::getMutatedAttributes(); - } - - /** - * Determine if the given attribute exists. - * - * @param mixed $offset - * @return bool - * @static - */ - public static function offsetExists($offset){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::offsetExists($offset); - } - - /** - * Get the value for a given offset. - * - * @param mixed $offset - * @return mixed - * @static - */ - public static function offsetGet($offset){ - //Method inherited from \Illuminate\Database\Eloquent\Model - return \Webpatser\Countries\Countries::offsetGet($offset); - } - - /** - * Set the value for a given offset. - * - * @param mixed $offset - * @param mixed $value - * @return void - * @static - */ - public static function offsetSet($offset, $value){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::offsetSet($offset, $value); - } - - /** - * Unset the value for a given offset. - * - * @param mixed $offset - * @return void - * @static - */ - public static function offsetUnset($offset){ - //Method inherited from \Illuminate\Database\Eloquent\Model - \Webpatser\Countries\Countries::offsetUnset($offset); - } - - } - - - class Carbon extends \Carbon\Carbon{ - - } - - -} - diff --git a/_ide_helper_models.php b/_ide_helper_models.php deleted file mode 100644 index 2c7606d3c901..000000000000 --- a/_ide_helper_models.php +++ /dev/null @@ -1,1239 +0,0 @@ - - */ - - -namespace { -/** - * Client - * - * @property integer $id - * @property integer $user_id - * @property integer $account_id - * @property integer $currency_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $name - * @property string $address1 - * @property string $address2 - * @property string $city - * @property string $state - * @property string $postal_code - * @property integer $country_id - * @property string $work_phone - * @property string $private_notes - * @property float $balance - * @property float $paid_to_date - * @property string $last_login - * @property string $website - * @property integer $industry_id - * @property integer $size_id - * @property boolean $is_deleted - * @property integer $payment_terms - * @property integer $public_id - * @property string $custom_value1 - * @property string $custom_value2 - * @property string $vat_number - * @property-read \Account $account - * @property-read \Illuminate\Database\Eloquent\Collection|\Invoice[] $invoices - * @property-read \Illuminate\Database\Eloquent\Collection|\Payment[] $payments - * @property-read \Illuminate\Database\Eloquent\Collection|\Contact[] $contacts - * @property-read \Illuminate\Database\Eloquent\Collection|\Project[] $projects - * @property-read \Country $country - * @property-read \Currency $currency - * @property-read \Size $size - * @property-read \Industry $industry - * @method static \Illuminate\Database\Query\Builder|\Client whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereCurrencyId($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereName($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereAddress1($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereAddress2($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereCity($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereState($value) - * @method static \Illuminate\Database\Query\Builder|\Client wherePostalCode($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereCountryId($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereWorkPhone($value) - * @method static \Illuminate\Database\Query\Builder|\Client wherePrivateNotes($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereBalance($value) - * @method static \Illuminate\Database\Query\Builder|\Client wherePaidToDate($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereLastLogin($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereWebsite($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereIndustryId($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereSizeId($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereIsDeleted($value) - * @method static \Illuminate\Database\Query\Builder|\Client wherePaymentTerms($value) - * @method static \Illuminate\Database\Query\Builder|\Client wherePublicId($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereCustomValue1($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereCustomValue2($value) - * @method static \Illuminate\Database\Query\Builder|\Client whereVatNumber($value) - * @method static \EntityModel scope($publicId = false, $accountId = false) - */ - class Client {} -} - -namespace { -/** - * User - * - * @property integer $id - * @property integer $account_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $first_name - * @property string $last_name - * @property string $phone - * @property string $username - * @property string $email - * @property string $password - * @property string $confirmation_code - * @property boolean $registered - * @property boolean $confirmed - * @property integer $theme_id - * @property boolean $notify_sent - * @property boolean $notify_viewed - * @property boolean $notify_paid - * @property integer $public_id - * @property boolean $force_pdfjs - * @property string $remember_token - * @property integer $news_feed_id - * @property-read \Account $account - * @property-read \Theme $theme - * @method static \Illuminate\Database\Query\Builder|\User whereId($value) - * @method static \Illuminate\Database\Query\Builder|\User whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\User whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\User whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\User whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\User whereFirstName($value) - * @method static \Illuminate\Database\Query\Builder|\User whereLastName($value) - * @method static \Illuminate\Database\Query\Builder|\User wherePhone($value) - * @method static \Illuminate\Database\Query\Builder|\User whereUsername($value) - * @method static \Illuminate\Database\Query\Builder|\User whereEmail($value) - * @method static \Illuminate\Database\Query\Builder|\User wherePassword($value) - * @method static \Illuminate\Database\Query\Builder|\User whereConfirmationCode($value) - * @method static \Illuminate\Database\Query\Builder|\User whereRegistered($value) - * @method static \Illuminate\Database\Query\Builder|\User whereConfirmed($value) - * @method static \Illuminate\Database\Query\Builder|\User whereThemeId($value) - * @method static \Illuminate\Database\Query\Builder|\User whereNotifySent($value) - * @method static \Illuminate\Database\Query\Builder|\User whereNotifyViewed($value) - * @method static \Illuminate\Database\Query\Builder|\User whereNotifyPaid($value) - * @method static \Illuminate\Database\Query\Builder|\User wherePublicId($value) - * @method static \Illuminate\Database\Query\Builder|\User whereForcePdfjs($value) - * @method static \Illuminate\Database\Query\Builder|\User whereRememberToken($value) - * @method static \Illuminate\Database\Query\Builder|\User whereNewsFeedId($value) - */ - class User {} -} - -namespace { -/** - * Size - * - * @property integer $id - * @property string $name - * @method static \Illuminate\Database\Query\Builder|\Size whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Size whereName($value) - */ - class Size {} -} - -namespace { -/** - * Country - * - * @property integer $id - * @property string $capital - * @property string $citizenship - * @property string $country_code - * @property string $currency - * @property string $currency_code - * @property string $currency_sub_unit - * @property string $full_name - * @property string $iso_3166_2 - * @property string $iso_3166_3 - * @property string $name - * @property string $region_code - * @property string $sub_region_code - * @property boolean $eea - * @method static \Illuminate\Database\Query\Builder|\Country whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereCapital($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereCitizenship($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereCountryCode($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereCurrency($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereCurrencyCode($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereCurrencySubUnit($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereFullName($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereIso31662($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereIso31663($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereName($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereRegionCode($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereSubRegionCode($value) - * @method static \Illuminate\Database\Query\Builder|\Country whereEea($value) - */ - class Country {} -} - -namespace { -/** - * Language - * - * @property integer $id - * @property string $name - * @property string $locale - * @method static \Illuminate\Database\Query\Builder|\Language whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Language whereName($value) - * @method static \Illuminate\Database\Query\Builder|\Language whereLocale($value) - */ - class Language {} -} - -namespace { -/** - * Contact - * - * @property integer $id - * @property integer $account_id - * @property integer $user_id - * @property integer $client_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property boolean $is_primary - * @property boolean $send_invoice - * @property string $first_name - * @property string $last_name - * @property string $email - * @property string $phone - * @property string $last_login - * @property integer $public_id - * @property-read \Client $client - * @method static \Illuminate\Database\Query\Builder|\Contact whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Contact whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\Contact whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\Contact whereClientId($value) - * @method static \Illuminate\Database\Query\Builder|\Contact whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Contact whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Contact whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Contact whereIsPrimary($value) - * @method static \Illuminate\Database\Query\Builder|\Contact whereSendInvoice($value) - * @method static \Illuminate\Database\Query\Builder|\Contact whereFirstName($value) - * @method static \Illuminate\Database\Query\Builder|\Contact whereLastName($value) - * @method static \Illuminate\Database\Query\Builder|\Contact whereEmail($value) - * @method static \Illuminate\Database\Query\Builder|\Contact wherePhone($value) - * @method static \Illuminate\Database\Query\Builder|\Contact whereLastLogin($value) - * @method static \Illuminate\Database\Query\Builder|\Contact wherePublicId($value) - * @method static \EntityModel scope($publicId = false, $accountId = false) - */ - class Contact {} -} - -namespace { -/** - * PaymentLibrary - * - * @property integer $id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property string $name - * @property boolean $visible - * @property-read \Illuminate\Database\Eloquent\Collection|\Gateway[] $gateways - * @method static \Illuminate\Database\Query\Builder|\PaymentLibrary whereId($value) - * @method static \Illuminate\Database\Query\Builder|\PaymentLibrary whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\PaymentLibrary whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\PaymentLibrary whereName($value) - * @method static \Illuminate\Database\Query\Builder|\PaymentLibrary whereVisible($value) - */ - class PaymentLibrary {} -} - -namespace { -/** - * Frequency - * - * @property integer $id - * @property string $name - * @method static \Illuminate\Database\Query\Builder|\Frequency whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Frequency whereName($value) - */ - class Frequency {} -} - -namespace { -/** - * InvoiceItem - * - * @property integer $id - * @property integer $account_id - * @property integer $user_id - * @property integer $invoice_id - * @property integer $product_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $product_key - * @property string $notes - * @property float $cost - * @property float $qty - * @property string $tax_name - * @property float $tax_rate - * @property integer $public_id - * @property-read \Invoice $invoice - * @property-read \Product $product - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereId($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereInvoiceId($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereProductId($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereProductKey($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereNotes($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereCost($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereQty($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereTaxName($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem whereTaxRate($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceItem wherePublicId($value) - * @method static \EntityModel scope($publicId = false, $accountId = false) - */ - class InvoiceItem {} -} - -namespace { -/** - * AccountGateway - * - * @property integer $id - * @property integer $account_id - * @property integer $user_id - * @property integer $gateway_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $config - * @property integer $public_id - * @property integer $accepted_credit_cards - * @property-read \Gateway $gateway - * @method static \Illuminate\Database\Query\Builder|\AccountGateway whereId($value) - * @method static \Illuminate\Database\Query\Builder|\AccountGateway whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\AccountGateway whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\AccountGateway whereGatewayId($value) - * @method static \Illuminate\Database\Query\Builder|\AccountGateway whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\AccountGateway whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\AccountGateway whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\AccountGateway whereConfig($value) - * @method static \Illuminate\Database\Query\Builder|\AccountGateway wherePublicId($value) - * @method static \Illuminate\Database\Query\Builder|\AccountGateway whereAcceptedCreditCards($value) - * @method static \EntityModel scope($publicId = false, $accountId = false) - */ - class AccountGateway {} -} - -namespace { -/** - * Theme - * - * @property integer $id - * @property string $name - * @method static \Illuminate\Database\Query\Builder|\Theme whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Theme whereName($value) - */ - class Theme {} -} - -namespace { -/** - * Payment - * - * @property integer $id - * @property integer $invoice_id - * @property integer $account_id - * @property integer $client_id - * @property integer $contact_id - * @property integer $invitation_id - * @property integer $user_id - * @property integer $account_gateway_id - * @property integer $payment_type_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property boolean $is_deleted - * @property float $amount - * @property string $payment_date - * @property string $transaction_reference - * @property string $payer_id - * @property integer $public_id - * @property-read \Invoice $invoice - * @property-read \Invitation $invitation - * @property-read \Client $client - * @property-read \Account $account - * @property-read \Contact $contact - * @method static \Illuminate\Database\Query\Builder|\Payment whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereInvoiceId($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereClientId($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereContactId($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereInvitationId($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereAccountGatewayId($value) - * @method static \Illuminate\Database\Query\Builder|\Payment wherePaymentTypeId($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereIsDeleted($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereAmount($value) - * @method static \Illuminate\Database\Query\Builder|\Payment wherePaymentDate($value) - * @method static \Illuminate\Database\Query\Builder|\Payment whereTransactionReference($value) - * @method static \Illuminate\Database\Query\Builder|\Payment wherePayerId($value) - * @method static \Illuminate\Database\Query\Builder|\Payment wherePublicId($value) - * @method static \EntityModel scope($publicId = false, $accountId = false) - */ - class Payment {} -} - -namespace { -/** - * Invoice - * - * @property integer $id - * @property integer $client_id - * @property integer $user_id - * @property integer $account_id - * @property integer $invoice_status_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $invoice_number - * @property float $discount - * @property string $po_number - * @property string $invoice_date - * @property string $due_date - * @property string $terms - * @property string $public_notes - * @property boolean $is_deleted - * @property boolean $is_recurring - * @property integer $frequency_id - * @property string $start_date - * @property string $end_date - * @property string $last_sent_date - * @property integer $recurring_invoice_id - * @property string $tax_name - * @property float $tax_rate - * @property float $amount - * @property float $balance - * @property integer $public_id - * @property integer $invoice_design_id - * @property boolean $is_quote - * @property integer $quote_id - * @property integer $quote_invoice_id - * @property float $custom_value1 - * @property float $custom_value2 - * @property boolean $custom_taxes1 - * @property boolean $custom_taxes2 - * @property-read \Account $account - * @property-read \User $user - * @property-read \Client $client - * @property-read \Illuminate\Database\Eloquent\Collection|\InvoiceItem[] $invoice_items - * @property-read \InvoiceStatus $invoice_status - * @property-read \InvoiceDesign $invoice_design - * @property-read \Illuminate\Database\Eloquent\Collection|\Invitation[] $invitations - * @method static \Illuminate\Database\Query\Builder|\Invoice whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereClientId($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereInvoiceStatusId($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereInvoiceNumber($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereDiscount($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice wherePoNumber($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereInvoiceDate($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereDueDate($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereTerms($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice wherePublicNotes($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereIsDeleted($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereIsRecurring($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereFrequencyId($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereStartDate($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereEndDate($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereLastSentDate($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereRecurringInvoiceId($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereTaxName($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereTaxRate($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereAmount($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereBalance($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice wherePublicId($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereInvoiceDesignId($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereIsQuote($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereQuoteId($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereQuoteInvoiceId($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereCustomValue1($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereCustomValue2($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereCustomTaxes1($value) - * @method static \Illuminate\Database\Query\Builder|\Invoice whereCustomTaxes2($value) - * @method static \EntityModel scope($publicId = false, $accountId = false) - */ - class Invoice {} -} - -namespace { -/** - * Subscription - * - * @property integer $id - * @property integer $account_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property integer $event_id - * @property string $target_url - * @method static \Illuminate\Database\Query\Builder|\Subscription whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Subscription whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\Subscription whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Subscription whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Subscription whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Subscription whereEventId($value) - * @method static \Illuminate\Database\Query\Builder|\Subscription whereTargetUrl($value) - */ - class Subscription {} -} - -namespace { -/** - * InvoiceStatus - * - * @property integer $id - * @property string $name - * @method static \Illuminate\Database\Query\Builder|\InvoiceStatus whereId($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceStatus whereName($value) - */ - class InvoiceStatus {} -} - -namespace { -/** - * Industry - * - * @property integer $id - * @property string $name - * @method static \Illuminate\Database\Query\Builder|\Industry whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Industry whereName($value) - */ - class Industry {} -} - -namespace { -/** - * Activity - * - * @property integer $id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property integer $account_id - * @property integer $client_id - * @property integer $user_id - * @property integer $contact_id - * @property integer $payment_id - * @property integer $invoice_id - * @property integer $credit_id - * @property integer $invitation_id - * @property string $message - * @property string $json_backup - * @property integer $activity_type_id - * @property float $adjustment - * @property float $balance - * @property-read \Account $account - * @method static \Illuminate\Database\Query\Builder|\Activity whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereClientId($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereContactId($value) - * @method static \Illuminate\Database\Query\Builder|\Activity wherePaymentId($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereInvoiceId($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereCreditId($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereInvitationId($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereMessage($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereJsonBackup($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereActivityTypeId($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereAdjustment($value) - * @method static \Illuminate\Database\Query\Builder|\Activity whereBalance($value) - * @method static \Activity scope() - */ - class Activity {} -} - -namespace { -/** - * Timesheet - * - * @property integer $id - * @property integer $user_id - * @property integer $account_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $start_date - * @property string $end_date - * @property float $discount - * @property float $hours - * @property integer $public_id - * @property-read \Account $account - * @property-read \User $user - * @property-read \Illuminate\Database\Eloquent\Collection|\TimeSheetEvent[] $timesheet_events - * @method static \Illuminate\Database\Query\Builder|\Timesheet whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Timesheet whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\Timesheet whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\Timesheet whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Timesheet whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Timesheet whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Timesheet whereStartDate($value) - * @method static \Illuminate\Database\Query\Builder|\Timesheet whereEndDate($value) - * @method static \Illuminate\Database\Query\Builder|\Timesheet whereDiscount($value) - * @method static \Illuminate\Database\Query\Builder|\Timesheet whereHours($value) - * @method static \Illuminate\Database\Query\Builder|\Timesheet wherePublicId($value) - */ - class Timesheet {} -} - -namespace { -/** - * Credit - * - * @property integer $id - * @property integer $account_id - * @property integer $client_id - * @property integer $user_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property boolean $is_deleted - * @property float $amount - * @property float $balance - * @property string $credit_date - * @property string $credit_number - * @property string $private_notes - * @property integer $public_id - * @property-read \Invoice $invoice - * @property-read \Client $client - * @method static \Illuminate\Database\Query\Builder|\Credit whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Credit whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\Credit whereClientId($value) - * @method static \Illuminate\Database\Query\Builder|\Credit whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\Credit whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Credit whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Credit whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Credit whereIsDeleted($value) - * @method static \Illuminate\Database\Query\Builder|\Credit whereAmount($value) - * @method static \Illuminate\Database\Query\Builder|\Credit whereBalance($value) - * @method static \Illuminate\Database\Query\Builder|\Credit whereCreditDate($value) - * @method static \Illuminate\Database\Query\Builder|\Credit whereCreditNumber($value) - * @method static \Illuminate\Database\Query\Builder|\Credit wherePrivateNotes($value) - * @method static \Illuminate\Database\Query\Builder|\Credit wherePublicId($value) - * @method static \EntityModel scope($publicId = false, $accountId = false) - */ - class Credit {} -} - -namespace { -/** - * Product - * - * @property integer $id - * @property integer $account_id - * @property integer $user_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $product_key - * @property string $notes - * @property float $cost - * @property float $qty - * @property integer $public_id - * @method static \Illuminate\Database\Query\Builder|\Product whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Product whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\Product whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\Product whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Product whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Product whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Product whereProductKey($value) - * @method static \Illuminate\Database\Query\Builder|\Product whereNotes($value) - * @method static \Illuminate\Database\Query\Builder|\Product whereCost($value) - * @method static \Illuminate\Database\Query\Builder|\Product whereQty($value) - * @method static \Illuminate\Database\Query\Builder|\Product wherePublicId($value) - * @method static \EntityModel scope($publicId = false, $accountId = false) - */ - class Product {} -} - -namespace { -/** - * PaymentTerm - * - * @property integer $id - * @property integer $num_days - * @property string $name - * @method static \Illuminate\Database\Query\Builder|\PaymentTerm whereId($value) - * @method static \Illuminate\Database\Query\Builder|\PaymentTerm whereNumDays($value) - * @method static \Illuminate\Database\Query\Builder|\PaymentTerm whereName($value) - */ - class PaymentTerm {} -} - -namespace { -/** - * EntityModel - * - * @method static \EntityModel scope($publicId = false, $accountId = false) - */ - class EntityModel {} -} - -namespace { -/** - * Timezone - * - * @property integer $id - * @property string $name - * @property string $location - * @method static \Illuminate\Database\Query\Builder|\Timezone whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Timezone whereName($value) - * @method static \Illuminate\Database\Query\Builder|\Timezone whereLocation($value) - */ - class Timezone {} -} - -namespace { -/** - * ProjectCode - * - * @property integer $id - * @property integer $user_id - * @property integer $account_id - * @property integer $project_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $name - * @property string $description - * @property-read \Account $account - * @property-read \User $user - * @property-read \Project $project - * @property-read \Illuminate\Database\Eloquent\Collection|\TimesheetEvent[] $events - * @method static \Illuminate\Database\Query\Builder|\ProjectCode whereId($value) - * @method static \Illuminate\Database\Query\Builder|\ProjectCode whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\ProjectCode whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\ProjectCode whereProjectId($value) - * @method static \Illuminate\Database\Query\Builder|\ProjectCode whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\ProjectCode whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\ProjectCode whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\ProjectCode whereName($value) - * @method static \Illuminate\Database\Query\Builder|\ProjectCode whereDescription($value) - */ - class ProjectCode {} -} - -namespace { -/** - * Invitation - * - * @property integer $id - * @property integer $account_id - * @property integer $user_id - * @property integer $contact_id - * @property integer $invoice_id - * @property string $invitation_key - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $transaction_reference - * @property string $sent_date - * @property string $viewed_date - * @property integer $public_id - * @property-read \Invoice $invoice - * @property-read \Contact $contact - * @property-read \User $user - * @method static \Illuminate\Database\Query\Builder|\Invitation whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Invitation whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\Invitation whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\Invitation whereContactId($value) - * @method static \Illuminate\Database\Query\Builder|\Invitation whereInvoiceId($value) - * @method static \Illuminate\Database\Query\Builder|\Invitation whereInvitationKey($value) - * @method static \Illuminate\Database\Query\Builder|\Invitation whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Invitation whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Invitation whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Invitation whereTransactionReference($value) - * @method static \Illuminate\Database\Query\Builder|\Invitation whereSentDate($value) - * @method static \Illuminate\Database\Query\Builder|\Invitation whereViewedDate($value) - * @method static \Illuminate\Database\Query\Builder|\Invitation wherePublicId($value) - * @method static \EntityModel scope($publicId = false, $accountId = false) - */ - class Invitation {} -} - -namespace { -/** - * Currency - * - * @property integer $id - * @property string $name - * @property string $symbol - * @property string $precision - * @property string $thousand_separator - * @property string $decimal_separator - * @property string $code - * @method static \Illuminate\Database\Query\Builder|\Currency whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Currency whereName($value) - * @method static \Illuminate\Database\Query\Builder|\Currency whereSymbol($value) - * @method static \Illuminate\Database\Query\Builder|\Currency wherePrecision($value) - * @method static \Illuminate\Database\Query\Builder|\Currency whereThousandSeparator($value) - * @method static \Illuminate\Database\Query\Builder|\Currency whereDecimalSeparator($value) - * @method static \Illuminate\Database\Query\Builder|\Currency whereCode($value) - */ - class Currency {} -} - -namespace { -/** - * InvoiceDesign - * - * @property integer $id - * @property string $name - * @property string $javascript - * @method static \Illuminate\Database\Query\Builder|\InvoiceDesign whereId($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceDesign whereName($value) - * @method static \Illuminate\Database\Query\Builder|\InvoiceDesign whereJavascript($value) - */ - class InvoiceDesign {} -} - -namespace { -/** - * DatetimeFormat - * - * @property integer $id - * @property string $format - * @property string $label - * @method static \Illuminate\Database\Query\Builder|\DatetimeFormat whereId($value) - * @method static \Illuminate\Database\Query\Builder|\DatetimeFormat whereFormat($value) - * @method static \Illuminate\Database\Query\Builder|\DatetimeFormat whereLabel($value) - */ - class DatetimeFormat {} -} - -namespace { -/** - * Affiliate - * - * @property integer $id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $name - * @property string $affiliate_key - * @property string $payment_title - * @property string $payment_subtitle - * @method static \Illuminate\Database\Query\Builder|\Affiliate whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Affiliate whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Affiliate whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Affiliate whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Affiliate whereName($value) - * @method static \Illuminate\Database\Query\Builder|\Affiliate whereAffiliateKey($value) - * @method static \Illuminate\Database\Query\Builder|\Affiliate wherePaymentTitle($value) - * @method static \Illuminate\Database\Query\Builder|\Affiliate wherePaymentSubtitle($value) - */ - class Affiliate {} -} - -namespace { -/** - * TaxRate - * - * @property integer $id - * @property integer $account_id - * @property integer $user_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $name - * @property float $rate - * @property integer $public_id - * @method static \Illuminate\Database\Query\Builder|\TaxRate whereId($value) - * @method static \Illuminate\Database\Query\Builder|\TaxRate whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\TaxRate whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\TaxRate whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\TaxRate whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\TaxRate whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\TaxRate whereName($value) - * @method static \Illuminate\Database\Query\Builder|\TaxRate whereRate($value) - * @method static \Illuminate\Database\Query\Builder|\TaxRate wherePublicId($value) - * @method static \EntityModel scope($publicId = false, $accountId = false) - */ - class TaxRate {} -} - -namespace { -/** - * Gateway - * - * @property integer $id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property string $name - * @property string $provider - * @property boolean $visible - * @property integer $payment_library_id - * @property integer $sort_order - * @property boolean $recommended - * @property string $site_url - * @property-read \PaymentLibrary $paymentlibrary - * @method static \Illuminate\Database\Query\Builder|\Gateway whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Gateway whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Gateway whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Gateway whereName($value) - * @method static \Illuminate\Database\Query\Builder|\Gateway whereProvider($value) - * @method static \Illuminate\Database\Query\Builder|\Gateway whereVisible($value) - * @method static \Illuminate\Database\Query\Builder|\Gateway wherePaymentLibraryId($value) - * @method static \Illuminate\Database\Query\Builder|\Gateway whereSortOrder($value) - * @method static \Illuminate\Database\Query\Builder|\Gateway whereRecommended($value) - * @method static \Illuminate\Database\Query\Builder|\Gateway whereSiteUrl($value) - */ - class Gateway {} -} - -namespace { -/** - * PaymentType - * - * @property integer $id - * @property string $name - * @method static \Illuminate\Database\Query\Builder|\PaymentType whereId($value) - * @method static \Illuminate\Database\Query\Builder|\PaymentType whereName($value) - */ - class PaymentType {} -} - -namespace { -/** - * License - * - * @property integer $id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property integer $affiliate_id - * @property string $first_name - * @property string $last_name - * @property string $email - * @property string $license_key - * @property boolean $is_claimed - * @property string $transaction_reference - * @method static \Illuminate\Database\Query\Builder|\License whereId($value) - * @method static \Illuminate\Database\Query\Builder|\License whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\License whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\License whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\License whereAffiliateId($value) - * @method static \Illuminate\Database\Query\Builder|\License whereFirstName($value) - * @method static \Illuminate\Database\Query\Builder|\License whereLastName($value) - * @method static \Illuminate\Database\Query\Builder|\License whereEmail($value) - * @method static \Illuminate\Database\Query\Builder|\License whereLicenseKey($value) - * @method static \Illuminate\Database\Query\Builder|\License whereIsClaimed($value) - * @method static \Illuminate\Database\Query\Builder|\License whereTransactionReference($value) - */ - class License {} -} - -namespace { -/** - * DateFormat - * - * @property integer $id - * @property string $format - * @property string $picker_format - * @property string $label - * @method static \Illuminate\Database\Query\Builder|\DateFormat whereId($value) - * @method static \Illuminate\Database\Query\Builder|\DateFormat whereFormat($value) - * @method static \Illuminate\Database\Query\Builder|\DateFormat wherePickerFormat($value) - * @method static \Illuminate\Database\Query\Builder|\DateFormat whereLabel($value) - */ - class DateFormat {} -} - -namespace { -/** - * TimesheetEvent - * - * @property integer $id - * @property integer $user_id - * @property integer $account_id - * @property integer $timesheet_event_source_id - * @property integer $timesheet_id - * @property integer $project_id - * @property integer $project_code_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $uid - * @property string $summary - * @property string $description - * @property string $location - * @property string $owner - * @property string $start_date - * @property string $end_date - * @property float $hours - * @property float $discount - * @property boolean $manualedit - * @property string $org_code - * @property string $org_created_at - * @property string $org_updated_at - * @property string $org_deleted_at - * @property string $org_start_date_timezone - * @property string $org_end_date_timezone - * @property string $org_data - * @property string $import_error - * @property string $import_warning - * @property string $updated_data - * @property string $updated_data_at - * @property-read \Account $account - * @property-read \User $user - * @property-read \TimesheetEventSource $source - * @property-read \Timesheet $timesheet - * @property-read \Project $project - * @property-read \ProjectCode $project_code - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereId($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereTimesheetEventSourceId($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereTimesheetId($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereProjectId($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereProjectCodeId($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereUid($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereSummary($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereDescription($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereLocation($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereOwner($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereStartDate($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereEndDate($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereHours($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereDiscount($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereManualedit($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereOrgCode($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereOrgCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereOrgUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereOrgDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereOrgStartDateTimezone($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereOrgEndDateTimezone($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereOrgData($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereImportError($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereImportWarning($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereUpdatedData($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEvent whereUpdatedDataAt($value) - */ - class TimesheetEvent {} -} - -namespace { -/** - * Project - * - * @property integer $id - * @property integer $user_id - * @property integer $account_id - * @property integer $client_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $name - * @property string $description - * @property-read \Account $account - * @property-read \User $user - * @property-read \Client $client - * @property-read \Illuminate\Database\Eloquent\Collection|\ProjectCode[] $codes - * @method static \Illuminate\Database\Query\Builder|\Project whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Project whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\Project whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\Project whereClientId($value) - * @method static \Illuminate\Database\Query\Builder|\Project whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Project whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Project whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Project whereName($value) - * @method static \Illuminate\Database\Query\Builder|\Project whereDescription($value) - */ - class Project {} -} - -namespace { -/** - * Account - * - * @property integer $id - * @property integer $timezone_id - * @property integer $date_format_id - * @property integer $datetime_format_id - * @property integer $currency_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $name - * @property string $ip - * @property string $account_key - * @property string $last_login - * @property string $address1 - * @property string $address2 - * @property string $city - * @property string $state - * @property string $postal_code - * @property integer $country_id - * @property string $invoice_terms - * @property string $email_footer - * @property integer $industry_id - * @property integer $size_id - * @property boolean $invoice_taxes - * @property boolean $invoice_item_taxes - * @property integer $invoice_design_id - * @property string $work_phone - * @property string $work_email - * @property integer $language_id - * @property string $pro_plan_paid - * @property string $custom_label1 - * @property string $custom_value1 - * @property string $custom_label2 - * @property string $custom_value2 - * @property string $custom_client_label1 - * @property string $custom_client_label2 - * @property boolean $fill_products - * @property boolean $update_products - * @property string $primary_color - * @property string $secondary_color - * @property boolean $hide_quantity - * @property boolean $hide_paid_to_date - * @property string $custom_invoice_label1 - * @property string $custom_invoice_label2 - * @property boolean $custom_invoice_taxes1 - * @property boolean $custom_invoice_taxes2 - * @property string $vat_number - * @property string $invoice_design - * @property string $invoice_number_prefix - * @property integer $invoice_number_counter - * @property string $quote_number_prefix - * @property integer $quote_number_counter - * @property boolean $share_counter - * @property-read \Illuminate\Database\Eloquent\Collection|\User[] $users - * @property-read \Illuminate\Database\Eloquent\Collection|\Client[] $clients - * @property-read \Illuminate\Database\Eloquent\Collection|\Invoice[] $invoices - * @property-read \Illuminate\Database\Eloquent\Collection|\AccountGateway[] $account_gateways - * @property-read \Illuminate\Database\Eloquent\Collection|\TaxRate[] $tax_rates - * @property-read \Country $country - * @property-read \Timezone $timezone - * @property-read \Language $language - * @property-read \DateFormat $date_format - * @property-read \DatetimeFormat $datetime_format - * @property-read \Size $size - * @property-read \Industry $industry - * @method static \Illuminate\Database\Query\Builder|\Account whereId($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereTimezoneId($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereDateFormatId($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereDatetimeFormatId($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCurrencyId($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereName($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereIp($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereAccountKey($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereLastLogin($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereAddress1($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereAddress2($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCity($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereState($value) - * @method static \Illuminate\Database\Query\Builder|\Account wherePostalCode($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCountryId($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereInvoiceTerms($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereEmailFooter($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereIndustryId($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereSizeId($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereInvoiceTaxes($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereInvoiceItemTaxes($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereInvoiceDesignId($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereWorkPhone($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereWorkEmail($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereLanguageId($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereProPlanPaid($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCustomLabel1($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCustomValue1($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCustomLabel2($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCustomValue2($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCustomClientLabel1($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCustomClientLabel2($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereFillProducts($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereUpdateProducts($value) - * @method static \Illuminate\Database\Query\Builder|\Account wherePrimaryColor($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereSecondaryColor($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereHideQuantity($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereHidePaidToDate($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCustomInvoiceLabel1($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCustomInvoiceLabel2($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCustomInvoiceTaxes1($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereCustomInvoiceTaxes2($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereVatNumber($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereInvoiceDesign($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereInvoiceNumberPrefix($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereInvoiceNumberCounter($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereQuoteNumberPrefix($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereQuoteNumberCounter($value) - * @method static \Illuminate\Database\Query\Builder|\Account whereShareCounter($value) - */ - class Account {} -} - -namespace { -/** - * TimesheetEventSource - * - * @property integer $id - * @property integer $user_id - * @property integer $account_id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $owner - * @property string $name - * @property string $url - * @property string $type - * @property string $from_date - * @property string $to_date - * @property-read \Account $account - * @property-read \User $user - * @property-read \Illuminate\Database\Eloquent\Collection|\TimesheetEvent[] $events - * @method static \Illuminate\Database\Query\Builder|\TimesheetEventSource whereId($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEventSource whereUserId($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEventSource whereAccountId($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEventSource whereCreatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEventSource whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEventSource whereDeletedAt($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEventSource whereOwner($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEventSource whereName($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEventSource whereUrl($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEventSource whereType($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEventSource whereFromDate($value) - * @method static \Illuminate\Database\Query\Builder|\TimesheetEventSource whereToDate($value) - */ - class TimesheetEventSource {} -} - diff --git a/app/commands/.gitkeep b/app/commands/.gitkeep deleted file mode 100755 index e69de29bb2d1..000000000000 diff --git a/app/commands/CheckData.php b/app/commands/CheckData.php deleted file mode 100644 index f2a0610f632a..000000000000 --- a/app/commands/CheckData.php +++ /dev/null @@ -1,266 +0,0 @@ - - - Limits the script to a single client - ---fix=true - - By default the script only checks for errors, adding this option - makes the script apply the fixes. - -*/ - - -class CheckData extends Command { - - protected $name = 'ninja:check-data'; - protected $description = 'Check/fix data'; - - public function fire() - { - $this->info(date('Y-m-d') . ' Running CheckData...'); - $today = new DateTime(); - - if (!$this->option('client_id')) { - // update client deletion activities with the client's current balance - $activities = DB::table('activities') - ->join('clients', 'clients.id', '=', 'activities.client_id') - ->where('activities.activity_type_id', '=', ACTIVITY_TYPE_DELETE_CLIENT) - ->where('activities.balance', '=', 0) - ->where('clients.balance', '!=', 0) - ->get(['activities.id', 'clients.balance']); - - $this->info(count($activities) . ' delete client activities with zero balance'); - - if ($this->option('fix') == 'true') { - foreach ($activities as $activity) { - DB::table('activities') - ->where('id', $activity->id) - ->update(['balance' => $activity->balance]); - } - } - - // update client paid_to_date value - $clients = DB::table('clients') - ->join('payments', 'payments.client_id', '=', 'clients.id') - ->join('invoices', 'invoices.id', '=', 'payments.invoice_id') - ->where('payments.is_deleted', '=', 0) - ->where('invoices.is_deleted', '=', 0) - ->groupBy('clients.id') - ->havingRaw('clients.paid_to_date != sum(payments.amount) and clients.paid_to_date != 999999999.9999') - ->get(['clients.id', 'clients.paid_to_date', DB::raw('sum(payments.amount) as amount')]); - $this->info(count($clients) . ' clients with incorrect paid to date'); - - if ($this->option('fix') == 'true') { - foreach ($clients as $client) { - DB::table('clients') - ->where('id', $client->id) - ->update(['paid_to_date' => $client->amount]); - } - } - } - - // find all clients where the balance doesn't equal the sum of the outstanding invoices - $clients = DB::table('clients') - ->join('invoices', 'invoices.client_id', '=', 'clients.id') - ->join('accounts', 'accounts.id', '=', 'clients.account_id'); - - if ($this->option('client_id')) { - $clients->where('clients.id', '=', $this->option('client_id')); - } else { - $clients->where('invoices.is_deleted', '=', 0) - ->where('invoices.is_quote', '=', 0) - ->where('invoices.is_recurring', '=', 0) - ->havingRaw('abs(clients.balance - sum(invoices.balance)) > .01 and clients.balance != 999999999.9999'); - } - - $clients = $clients->groupBy('clients.id', 'clients.balance', 'clients.created_at') - ->orderBy('clients.id', 'DESC') - ->get(['clients.id', 'clients.balance', 'clients.paid_to_date']); - $this->info(count($clients) . ' clients with incorrect balance/activities'); - - foreach ($clients as $client) { - $this->info("=== Client:{$client->id} Balance:{$client->balance} ==="); - $foundProblem = false; - $lastBalance = 0; - $clientFix = false; - $activities = DB::table('activities') - ->where('client_id', '=', $client->id) - ->orderBy('activities.id') - ->get(['activities.id', 'activities.created_at', 'activities.activity_type_id', 'activities.message', 'activities.adjustment', 'activities.balance', 'activities.invoice_id']); - //$this->info(var_dump($activities)); - - foreach ($activities as $activity) { - - $activityFix = false; - - if ($activity->invoice_id) { - $invoice = DB::table('invoices') - ->where('id', '=', $activity->invoice_id) - ->first(['invoices.amount', 'invoices.is_recurring', 'invoices.is_quote', 'invoices.deleted_at', 'invoices.id', 'invoices.is_deleted']); - - // Check if this invoice was once set as recurring invoice - if (!$invoice->is_recurring && DB::table('invoices') - ->where('recurring_invoice_id', '=', $activity->invoice_id) - ->first(['invoices.id'])) { - $invoice->is_recurring = 1; - - // **Fix for enabling a recurring invoice to be set as non-recurring** - if ($this->option('fix') == 'true') { - DB::table('invoices') - ->where('id', $invoice->id) - ->update(['is_recurring' => 1]); - } - } - } - - - if ($activity->activity_type_id == ACTIVITY_TYPE_CREATE_INVOICE - || $activity->activity_type_id == ACTIVITY_TYPE_CREATE_QUOTE) { - - // Get original invoice amount - $update = DB::table('activities') - ->where('invoice_id', '=', $activity->invoice_id) - ->where('activity_type_id', '=', ACTIVITY_TYPE_UPDATE_INVOICE) - ->orderBy('id') - ->first(['json_backup']); - if ($update) { - $backup = json_decode($update->json_backup); - $invoice->amount = floatval($backup->amount); - } - - $noAdjustment = $activity->activity_type_id == ACTIVITY_TYPE_CREATE_INVOICE - && $activity->adjustment == 0 - && $invoice->amount > 0; - - // **Fix for allowing converting a recurring invoice to a normal one without updating the balance** - if ($noAdjustment && !$invoice->is_quote && !$invoice->is_recurring) { - $this->info("No adjustment for new invoice:{$activity->invoice_id} amount:{$invoice->amount} isQuote:{$invoice->is_quote} isRecurring:{$invoice->is_recurring}"); - $foundProblem = true; - $clientFix += $invoice->amount; - $activityFix = $invoice->amount; - // **Fix for updating balance when creating a quote or recurring invoice** - } elseif ($activity->adjustment != 0 && ($invoice->is_quote || $invoice->is_recurring)) { - $this->info("Incorrect adjustment for new invoice:{$activity->invoice_id} adjustment:{$activity->adjustment} isQuote:{$invoice->is_quote} isRecurring:{$invoice->is_recurring}"); - $foundProblem = true; - $clientFix -= $activity->adjustment; - $activityFix = 0; - } - } elseif ($activity->activity_type_id == ACTIVITY_TYPE_DELETE_INVOICE) { - // **Fix for updating balance when deleting a recurring invoice** - if ($activity->adjustment != 0 && $invoice->is_recurring) { - $this->info("Incorrect adjustment for deleted invoice adjustment:{$activity->adjustment}"); - $foundProblem = true; - if ($activity->balance != $lastBalance) { - $clientFix -= $activity->adjustment; - } - $activityFix = 0; - } - } elseif ($activity->activity_type_id == ACTIVITY_TYPE_ARCHIVE_INVOICE) { - // **Fix for updating balance when archiving an invoice** - if ($activity->adjustment != 0 && !$invoice->is_recurring) { - $this->info("Incorrect adjustment for archiving invoice adjustment:{$activity->adjustment}"); - $foundProblem = true; - $activityFix = 0; - $clientFix += $activity->adjustment; - } - } elseif ($activity->activity_type_id == ACTIVITY_TYPE_UPDATE_INVOICE) { - // **Fix for updating balance when updating recurring invoice** - if ($activity->adjustment != 0 && $invoice->is_recurring) { - $this->info("Incorrect adjustment for updated recurring invoice adjustment:{$activity->adjustment}"); - $foundProblem = true; - $clientFix -= $activity->adjustment; - $activityFix = 0; - } - } elseif ($activity->activity_type_id == ACTIVITY_TYPE_UPDATE_QUOTE) { - // **Fix for updating balance when updating a quote** - if ($activity->balance != $lastBalance) { - $this->info("Incorrect adjustment for updated quote adjustment:{$activity->adjustment}"); - $foundProblem = true; - $clientFix += $lastBalance - $activity->balance; - $activityFix = 0; - } - } else if ($activity->activity_type_id == ACTIVITY_TYPE_DELETE_PAYMENT) { - // **Fix for delting payment after deleting invoice** - if ($activity->adjustment != 0 && $invoice->is_deleted && $activity->created_at > $invoice->deleted_at) { - $this->info("Incorrect adjustment for deleted payment adjustment:{$activity->adjustment}"); - $foundProblem = true; - $activityFix = 0; - $clientFix -= $activity->adjustment; - } - } - - if ($activityFix !== false || $clientFix !== false) { - $data = [ - 'balance' => $activity->balance + $clientFix - ]; - - if ($activityFix !== false) { - $data['adjustment'] = $activityFix; - } - - if ($this->option('fix') == 'true') { - DB::table('activities') - ->where('id', $activity->id) - ->update($data); - } - } - - $lastBalance = $activity->balance; - } - - if ($clientFix !== false) { - $balance = $activity->balance + $clientFix; - $data = ['balance' => $balance]; - $this->info("Corrected balance:{$balance}"); - if ($this->option('fix') == 'true') { - DB::table('clients') - ->where('id', $client->id) - ->update($data); - } - } - } - - $this->info('Done'); - } - - protected function getArguments() - { - return array( - //array('example', InputArgument::REQUIRED, 'An example argument.'), - ); - } - - protected function getOptions() - { - return array( - array('fix', null, InputOption::VALUE_OPTIONAL, 'Fix data', null), - array('client_id', null, InputOption::VALUE_OPTIONAL, 'Client id', null), - ); - } - -} \ No newline at end of file diff --git a/app/commands/CreateRandomData.php b/app/commands/CreateRandomData.php deleted file mode 100644 index 0a019454be01..000000000000 --- a/app/commands/CreateRandomData.php +++ /dev/null @@ -1,88 +0,0 @@ -info(date('Y-m-d') . ' Running CreateRandomData...'); - - $user = User::first(); - - if (!$user) { - $this->error("Error: please create user account by logging in"); - return; - } - - $productNames = ['Arkansas', 'New York', 'Arizona', 'California', 'Colorado', 'Alabama', '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', 'Alaska', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming']; - $clientNames = ['IBM', 'Nestle', 'Mitsubishi UFJ Financial', 'Vodafone', 'Eni', 'Procter & Gamble', 'Johnson & Johnson', 'American International Group', 'Banco Santander', 'BHP Billiton', 'Pfizer', 'Itaú Unibanco Holding', 'Ford Motor', 'BMW Group', 'Commonwealth Bank', 'EDF', 'Statoil', 'Google', 'Siemens', 'Novartis', 'Royal Bank of Canada', 'Sumitomo Mitsui Financial', 'Comcast', 'Sberbank', 'Goldman Sachs Group', 'Westpac Banking Group', 'Nippon Telegraph & Tel', 'Ping An Insurance Group', 'Banco Bradesco', 'Anheuser-Busch InBev', 'Bank of Communications', 'China Life Insurance', 'General Motors', 'Telefónica', 'MetLife', 'Honda Motor', 'Enel', 'BASF', 'Softbank', 'National Australia Bank', 'ANZ', 'ConocoPhillips', 'TD Bank Group', 'Intel', 'UBS', 'Hewlett-Packard', 'Coca-Cola', 'Cisco Systems', 'UnitedHealth Group', 'Boeing', 'Zurich Insurance Group', 'Hyundai Motor', 'Sanofi', 'Credit Agricole', 'United Technologies', 'Roche Holding', 'Munich Re', 'PepsiCo', 'Oracle', 'Bank of Nova Scotia']; - - foreach ($productNames as $i => $value) { - $product = Product::createNew($user); - $product->id = $i+1; - $product->product_key = $value; - $product->save(); - } - - foreach ($clientNames as $i => $value) { - $client = Client::createNew($user); - $client->name = $value; - $client->save(); - - $contact = Contact::createNew($user); - $contact->email = "client@aol.com"; - $contact->is_primary = 1; - $client->contacts()->save($contact); - - $numInvoices = rand(1, 25); - if ($numInvoices == 4 || $numInvoices == 10 || $numInvoices == 25) { - // leave these - } else if ($numInvoices % 3 == 0) { - $numInvoices = 1; - } else if ($numInvoices > 10) { - $numInvoices = $numInvoices % 2; - } - - $paidUp = rand(0, 1) == 1; - - for ($j=1; $j<=$numInvoices; $j++) { - - $price = rand(10, 1000); - if ($price < 900) { - $price = rand(10, 150); - } - - $invoice = Invoice::createNew($user); - $invoice->invoice_number = $user->account->getNextInvoiceNumber(); - $invoice->amount = $invoice->balance = $price; - $invoice->created_at = date('Y-m-d', strtotime(date("Y-m-d") . ' - ' . rand(1, 100) . ' days')); - $client->invoices()->save($invoice); - - $productId = rand(0, 40); - if ($productId > 20) { - $productId = ($productId % 2) + rand(0, 2); - } - - $invoiceItem = InvoiceItem::createNew($user); - $invoiceItem->product_id = $productId+1; - $invoiceItem->product_key = $productNames[$invoiceItem->product_id]; - $invoiceItem->cost = $invoice->amount; - $invoiceItem->qty = 1; - $invoice->invoice_items()->save($invoiceItem); - - if ($paidUp || rand(0,2) > 1) { - $payment = Payment::createNew($user); - $payment->invoice_id = $invoice->id; - $payment->amount = $invoice->amount; - $client->payments()->save($payment); - } - } - } - } -} \ No newline at end of file diff --git a/app/commands/ImportTimesheetData.php b/app/commands/ImportTimesheetData.php deleted file mode 100644 index edb5a277eb08..000000000000 --- a/app/commands/ImportTimesheetData.php +++ /dev/null @@ -1,335 +0,0 @@ -info(date('Y-m-d') . ' Running ImportTimesheetData...'); - - // Seems we are using the console timezone - DB::statement("SET SESSION time_zone = '+00:00'"); - - // Get the Unix epoch - $unix_epoch = new DateTime('1970-01-01T00:00:01', new DateTimeZone("UTC")); - - // Create some initial sources we can test with - $user = User::first(); - if (!$user) { - $this->error("Error: please create user account by logging in"); - return; - } - - // TODO: Populate with own test data until test data has been created - // Truncate the tables - /*$this->info("Truncate tables"); - DB::statement('SET FOREIGN_KEY_CHECKS=0;'); - DB::table('projects')->truncate(); - DB::table('project_codes')->truncate(); - DB::table('timesheet_event_sources')->truncate(); - DB::table('timesheet_events')->truncate(); - DB::statement('SET FOREIGN_KEY_CHECKS=1;'); */ - - if (!Project::find(1)) { - $this->info("Import old project codes"); - $oldcodes = json_decode(file_get_contents("/home/tlb/git/itktime/codes.json"), true); - foreach ($oldcodes as $name => $options) { - $project = Project::createNew($user); - $project->name = $options['description']; - $project->save(); - - $code = ProjectCode::createNew($user); - $code->name = $name; - $project->codes()->save($code); - } - } - - if (!TimesheetEventSource::find(1)) { - $this->info("Import old event sources"); - - $oldevent_sources = json_decode(file_get_contents("/home/tlb/git/itktime/employes.json"), true); - - foreach ($oldevent_sources as $source) { - $event_source = TimesheetEventSource::createNew($user); - $event_source->name = $source['name']; - $event_source->url = $source['url']; - $event_source->owner = $source['owner']; - $event_source->type = 'ical'; - //$event_source->from_date = new DateTime("2009-01-01"); - $event_source->save(); - } - } - - // Add all URL's to Curl - $this->info("Download ICAL feeds"); - $T = new Timer; - $T->start(); - - $T->lap("Get Event Sources"); - $event_sources = TimesheetEventSource::all(); // TODO: Filter based on ical feeds - - $T->lap("Get ICAL responses"); - $urls = []; - $event_sources->map(function($item) use(&$urls) { - $urls[] = $item->url; - }); - $icalresponses = TimesheetUtils::curlGetUrls($urls); - - $T->lap("Fetch all codes so we can do a quick lookup"); - $codes = array(); - ProjectCode::all()->map(function($item) use(&$codes) { - $codes[$item->name] = $item; - }); - - $this->info("Start parsing ICAL files"); - foreach ($event_sources as $i => $event_source) { - if (!is_array($icalresponses[$i])) { - $this->info("Find events in " . $event_source->name); - file_put_contents("/tmp/" . $event_source->name . ".ical", $icalresponses[$i]); // FIXME: Remove - $T->lap("Split on events for ".$event_source->name); - - // Check if the file is complete - if(!preg_match("/^\s*BEGIN:VCALENDAR/", $icalresponses[$i]) || !preg_match("/END:VCALENDAR\s*$/", $icalresponses[$i])) { - $this->error("Missing start or end of ical file"); - continue; - } - - // Extract all events from ical file - if (preg_match_all('/BEGIN:VEVENT\r?\n(.+?)\r?\nEND:VEVENT/s', $icalresponses[$i], $icalmatches)) { - $this->info("Found ".(count($icalmatches[1])-1)." events"); - $T->lap("Fetch all uids and last updated at so we can do a quick lookup to find out if the event needs to be updated in the database".$event_source->name); - $uids = []; - $org_deleted = []; // Create list of events we know are deleted on the source, but still have in the db - $event_source->events()->withTrashed()->get(['uid', 'org_updated_at', 'updated_data_at', 'org_deleted_at'])->map(function($item) use(&$uids, &$org_deleted) { - if($item->org_updated_at > $item->updated_data_at) { - $uids[$item->uid] = $item->org_updated_at; - } else { - $uids[$item->uid] = $item->updated_data_at; - } - if($item->org_deleted_at > '0000-00-00 00:00:00') { - $org_deleted[$item->uid] = $item->updated_data_at; - } - }); - $deleted = $uids; - - // Loop over all the found events - $T->lap("Parse events for ".$event_source->name); - foreach ($icalmatches[1] as $eventstr) { - //print "---\n"; - //print $eventstr."\n"; - //print "---\n"; - //$this->info("Match event"); - # Fix lines broken by 76 char limit - $eventstr = preg_replace('/\r?\n\s/s', '', $eventstr); - //$this->info("Parse data"); - $data = TimesheetUtils::parseICALEvent($eventstr); - if ($data) { - // Extract code for summary so we only import events we use - list($codename, $tags, $title) = TimesheetUtils::parseEventSummary($data['summary']); - if ($codename != null) { - $event = TimesheetEvent::createNew($user); - - // Copy data to new object - $event->uid = $data['uid']; - $event->summary = $title; - $event->org_data = $eventstr; - $event->org_code = $codename; - if(isset($data['description'])) { - $event->description = $data['description']; - } - $event->owner = $event_source->owner; - $event->timesheet_event_source_id = $event_source->id; - if (isset($codes[$codename])) { - $event->project_id = $codes[$codename]->project_id; - $event->project_code_id = $codes[$codename]->id; - } - if (isset($data['location'])) { - $event->location = $data['location']; - } - - - # Add RECURRENCE-ID to the UID to make sure the event is unique - if (isset($data['recurrence-id'])) { - $event->uid .= "::".$data['recurrence-id']; - } - - //TODO: Add support for recurring event, make limit on number of events created : https://github.com/tplaner/When - // Bail on RRULE as we don't support that - if(isset($event['rrule'])) { - die("Recurring event not supported: {$event['summary']} - {$event['dtstart']}"); - } - - // Convert to DateTime objects - foreach (['dtstart', 'dtend', 'created', 'last-modified'] as $key) { - // Parse and create DataTime object from ICAL format - list($dt, $timezone) = TimesheetUtils::parseICALDate($data[$key]); - - // Handle bad dates in created and last-modified - if ($dt == null || $dt < $unix_epoch) { - if ($key == 'created' || $key == 'last-modified') { - $dt = $unix_epoch; // Default to UNIX epoch - $event->import_warning = "Could not parse date for $key: '" . $data[$key] . "' so default to UNIX Epoc\n"; - } else { - $event->import_error = "Could not parse date for $key: '" . $data[$key] . "' so default to UNIX Epoc\n"; - // TODO: Bail on this event or write to error table - die("Could not parse date for $key: '" . $data[$key] . "'\n"); - } - } - - // Assign DateTime object to - switch ($key) { - case 'dtstart': - $event->start_date = $dt; - if($timezone) { - $event->org_start_date_timezone = $timezone; - } - break; - case 'dtend': - $event->end_date = $dt; - if($timezone) { - $event->org_end_date_timezone = $timezone; - } - break; - case 'created': - $event->org_created_at = $dt; - break; - case 'last-modified': - $event->org_updated_at = $dt; - break; - } - } - - // Check that we are witin the range - if ($event_source->from_date != null) { - $from_date = new DateTime($event_source->from_date, new DateTimeZone('UTC')); - if ($from_date > $event->end_date) { - // Skip this event - echo "Skiped: $codename: $title\n"; - continue; - } - } - - // Calculate number of hours - $di = $event->end_date->diff($event->start_date); - $event->hours = $di->h + $di->i / 60; - - // Check for events we already have - if (isset($uids[$event->uid])) { - // Remove from deleted list - unset($deleted[$event->uid]); - - // See if the event has been updated compared to the one in the database - $db_event_org_updated_at = new DateTime($uids[$event->uid], new DateTimeZone('UTC')); - - // Check if same or older version of new event then skip - if($event->org_updated_at <= $db_event_org_updated_at) { - // SKIP - - // Updated version of the event - } else { - // Get the old event from the database - /* @var $db_event TimesheetEvent */ - $db_event = $event_source->events()->where('uid', $event->uid)->firstOrFail(); - $changes = $db_event->toChangesArray($event); - - // Make sure it's more than the org_updated_at that has been changed - if (count($changes) > 1) { - // Check if we have manually changed the event in the database or used it in a timesheet - if ($db_event->manualedit || $db_event->timesheet) { - $this->info("Updated Data"); - $db_event->updated_data = $event->org_data; - $db_event->updated_data_at = $event->org_updated_at; - - // Update the db_event with the changes - } else { - $this->info("Updated Event"); - foreach ($changes as $key => $value) { - if($value == null) { - unset($db_event->$key); - } else { - $db_event->$key = $value; - } - } - } - - } else { - $this->info("Nothing Changed"); - // Nothing has been changed so update the org_updated_at - $db_event->org_updated_at = $changes['org_updated_at']; - } - $db_event->save(); - } - - } else { - try { - $this->info("New event: " . $event->summary); - $event->save(); - - } catch (Exception $ex) { - echo "'" . $event->summary . "'\n"; - var_dump($data); - echo $ex->getMessage(); - echo $ex->getTraceAsString(); - exit(0); - } - } - // Add new uid to know uids - $uids[$event->uid] = $event->org_updated_at; - } - } - } - // Delete events in database that no longer exists in the source - foreach($deleted as $uid => $lastupdated_date) { - // Skip we already marked this a deleted - if(isset($org_deleted[$uid])) { - unset($deleted[$uid]); - continue; - } - // Delete or update event in db - $db_event = $event_source->events()->where('uid', $uid)->firstOrFail(); - if($db_event->timesheet_id === null && !$db_event->manualedit) { - // Hard delete if this event has not been assigned to a timesheet or have been manually edited - $db_event->forceDelete(); - - } else { - // Mark as deleted in source - $db_event->org_deleted_at = new DateTime('now', new DateTimeZone('UTC')); - $db_event->save(); - - } - } - $this->info("Deleted ".count($deleted). " events"); - - } else { - // TODO: Parse error - } - - } else { - // TODO: Curl Error - } - } - - foreach($T->end()['laps'] as $lap) { - echo number_format($lap['total'], 3)." : {$lap['name']}\n"; - } - - $this->info('Done'); - } - - protected function getArguments() { - return array( - ); - } - - protected function getOptions() { - return array( - ); - } - -} diff --git a/app/commands/ResetData.php b/app/commands/ResetData.php deleted file mode 100644 index 39150407ea93..000000000000 --- a/app/commands/ResetData.php +++ /dev/null @@ -1,24 +0,0 @@ -info(date('Y-m-d') . ' Running ResetData...'); - - if (!Utils::isNinjaDev()) { - return; - } - - Artisan::call('migrate:reset'); - Artisan::call('migrate'); - Artisan::call('db:seed'); - } -} \ No newline at end of file diff --git a/app/commands/SendRecurringInvoices.php b/app/commands/SendRecurringInvoices.php deleted file mode 100755 index b527e7ae48bd..000000000000 --- a/app/commands/SendRecurringInvoices.php +++ /dev/null @@ -1,113 +0,0 @@ -mailer = $mailer; - } - - public function fire() - { - $this->info(date('Y-m-d').' Running SendRecurringInvoices...'); - $today = new DateTime(); - - $invoices = Invoice::with('account.timezone', 'invoice_items', 'client', 'user') - ->whereRaw('is_deleted IS FALSE AND deleted_at IS NULL AND is_recurring IS TRUE AND start_date <= ? AND (end_date IS NULL OR end_date >= ?)', array($today, $today))->get(); - $this->info(count($invoices).' recurring invoice(s) found'); - - foreach ($invoices as $recurInvoice) { - if ($recurInvoice->client->deleted_at) { - continue; - } - - if (!$recurInvoice->user->confirmed) { - continue; - } - - $this->info('Processing Invoice '.$recurInvoice->id.' - Should send '.($recurInvoice->shouldSendToday() ? 'YES' : 'NO')); - - if (!$recurInvoice->shouldSendToday()) { - continue; - } - - $invoice = Invoice::createNew($recurInvoice); - $invoice->client_id = $recurInvoice->client_id; - $invoice->recurring_invoice_id = $recurInvoice->id; - $invoice->invoice_number = 'R'.$recurInvoice->account->getNextInvoiceNumber(); - $invoice->amount = $recurInvoice->amount; - $invoice->balance = $recurInvoice->amount; - $invoice->invoice_date = date_create()->format('Y-m-d'); - $invoice->discount = $recurInvoice->discount; - $invoice->po_number = $recurInvoice->po_number; - $invoice->public_notes = $recurInvoice->public_notes; - $invoice->terms = $recurInvoice->terms; - $invoice->invoice_footer = $recurInvoice->invoice_footer; - $invoice->tax_name = $recurInvoice->tax_name; - $invoice->tax_rate = $recurInvoice->tax_rate; - $invoice->invoice_design_id = $recurInvoice->invoice_design_id; - $invoice->custom_value1 = $recurInvoice->custom_value1; - $invoice->custom_value2 = $recurInvoice->custom_value2; - $invoice->custom_taxes1 = $recurInvoice->custom_taxes1; - $invoice->custom_taxes2 = $recurInvoice->custom_taxes2; - $invoice->is_amount_discount = $recurInvoice->is_amount_discount; - - if ($invoice->client->payment_terms) { - $invoice->due_date = date_create()->modify($invoice->client->payment_terms.' day')->format('Y-m-d'); - } - - $invoice->save(); - - foreach ($recurInvoice->invoice_items as $recurItem) { - $item = InvoiceItem::createNew($recurItem); - $item->product_id = $recurItem->product_id; - $item->qty = $recurItem->qty; - $item->cost = $recurItem->cost; - $item->notes = Utils::processVariables($recurItem->notes); - $item->product_key = Utils::processVariables($recurItem->product_key); - $item->tax_name = $recurItem->tax_name; - $item->tax_rate = $recurItem->tax_rate; - $invoice->invoice_items()->save($item); - } - - foreach ($recurInvoice->invitations as $recurInvitation) { - $invitation = Invitation::createNew($recurInvitation); - $invitation->contact_id = $recurInvitation->contact_id; - $invitation->invitation_key = str_random(RANDOM_KEY_LENGTH); - $invoice->invitations()->save($invitation); - } - - $this->mailer->sendInvoice($invoice); - - $recurInvoice->last_sent_date = Carbon::now()->toDateTimeString(); - $recurInvoice->save(); - } - - $this->info('Done'); - } - - protected function getArguments() - { - return array( - //array('example', InputArgument::REQUIRED, 'An example argument.'), - ); - } - - protected function getOptions() - { - return array( - //array('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null), - ); - } -} diff --git a/app/config/app.php b/app/config/app.php deleted file mode 100755 index 68bfd7bc24eb..000000000000 --- a/app/config/app.php +++ /dev/null @@ -1,225 +0,0 @@ - true, - - /* - |-------------------------------------------------------------------------- - | Application URL - |-------------------------------------------------------------------------- - | - | This URL is used by the console to properly generate URLs when using - | the Artisan command line tool. You should set this to the root of - | your application so that it is used when running Artisan tasks. - | - */ - - 'url' => '', - - /* - |-------------------------------------------------------------------------- - | Application Timezone - |-------------------------------------------------------------------------- - | - | Here you may specify the default timezone for your application, which - | will be used by the PHP date and date-time functions. We have gone - | ahead and set this to a sensible default for you out of the box. - | - */ - - 'timezone' => 'UTC', - - /* - |-------------------------------------------------------------------------- - | Application Locale Configuration - |-------------------------------------------------------------------------- - | - | The application locale determines the default locale that will be used - | by the translation service provider. You are free to set this value - | to any of the locales which will be supported by the application. - | - */ - - 'locale' => 'en', - - /* - |-------------------------------------------------------------------------- - | Encryption Key - |-------------------------------------------------------------------------- - | - | This key is used by the Illuminate encrypter service and should be set - | to a random, 32 character string, otherwise these encrypted strings - | will not be safe. Please do this before deploying an application! - | - | Command below will generate a random 32 character alphanumeric string - | cat /dev/random | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 - */ - - 'key' => '', - - /* - |-------------------------------------------------------------------------- - | Autoloaded Service Providers - |-------------------------------------------------------------------------- - | - | The service providers listed here will be automatically loaded on the - | request to your application. Feel free to add your own services to - | this array to grant expanded functionality to your applications. - | - */ - - 'providers' => array( - - 'Illuminate\Foundation\Providers\ArtisanServiceProvider', - 'Illuminate\Auth\AuthServiceProvider', - 'Illuminate\Cache\CacheServiceProvider', - 'Illuminate\Foundation\Providers\CommandCreatorServiceProvider', - 'Illuminate\Session\CommandsServiceProvider', - 'Illuminate\Foundation\Providers\ComposerServiceProvider', - 'Illuminate\Routing\ControllerServiceProvider', - 'Illuminate\Cookie\CookieServiceProvider', - 'Illuminate\Database\DatabaseServiceProvider', - 'Illuminate\Encryption\EncryptionServiceProvider', - 'Illuminate\Filesystem\FilesystemServiceProvider', - 'Illuminate\Hashing\HashServiceProvider', - 'Illuminate\Html\HtmlServiceProvider', - 'Illuminate\Foundation\Providers\KeyGeneratorServiceProvider', - 'Illuminate\Log\LogServiceProvider', - 'Illuminate\Mail\MailServiceProvider', - 'Illuminate\Foundation\Providers\MaintenanceServiceProvider', - 'Illuminate\Database\MigrationServiceProvider', - 'Illuminate\Foundation\Providers\OptimizeServiceProvider', - 'Illuminate\Pagination\PaginationServiceProvider', - 'Illuminate\Foundation\Providers\PublisherServiceProvider', - 'Illuminate\Queue\QueueServiceProvider', - 'Illuminate\Redis\RedisServiceProvider', - 'Illuminate\Auth\Reminders\ReminderServiceProvider', - 'Illuminate\Foundation\Providers\RouteListServiceProvider', - 'Illuminate\Database\SeedServiceProvider', - 'Illuminate\Foundation\Providers\ServerServiceProvider', - 'Illuminate\Session\SessionServiceProvider', - 'Illuminate\Foundation\Providers\TinkerServiceProvider', - 'Illuminate\Translation\TranslationServiceProvider', - 'Illuminate\Validation\ValidationServiceProvider', - 'Illuminate\View\ViewServiceProvider', - 'Illuminate\Workbench\WorkbenchServiceProvider', - 'Illuminate\Remote\RemoteServiceProvider', - 'Bootstrapper\BootstrapperServiceProvider', - 'Zizaco\Confide\ConfideServiceProvider', - 'Former\FormerServiceProvider', - 'Barryvdh\Debugbar\ServiceProvider', - 'Chumper\Datatable\DatatableServiceProvider', - 'Intervention\Image\ImageServiceProvider', - 'Webpatser\Countries\CountriesServiceProvider', - 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider', - ), - - /* - |-------------------------------------------------------------------------- - | Service Provider Manifest - |-------------------------------------------------------------------------- - | - | The service provider manifest is used by Laravel to lazy load service - | providers which are not needed for each request, as well to keep a - | list of all of the services. Here, you may set its storage spot. - | - */ - - 'manifest' => storage_path() . '/meta', - - /* - |-------------------------------------------------------------------------- - | Class Aliases - |-------------------------------------------------------------------------- - | - | This array of class aliases will be registered when this application - | is started. However, feel free to register as many as you wish as - | the aliases are "lazy" loaded so they don't hinder performance. - | - */ - - 'aliases' => array( - - 'App' => 'Illuminate\Support\Facades\App', - 'Artisan' => 'Illuminate\Support\Facades\Artisan', - 'Auth' => 'Illuminate\Support\Facades\Auth', - 'Blade' => 'Illuminate\Support\Facades\Blade', - 'Cache' => 'Illuminate\Support\Facades\Cache', - 'ClassLoader' => 'Illuminate\Support\ClassLoader', - 'Config' => 'Illuminate\Support\Facades\Config', - 'Controller' => 'Illuminate\Routing\Controller', - 'Cookie' => 'Illuminate\Support\Facades\Cookie', - 'Crypt' => 'Illuminate\Support\Facades\Crypt', - 'DB' => 'Illuminate\Support\Facades\DB', - 'Eloquent' => 'Illuminate\Database\Eloquent\Model', - 'Event' => 'Illuminate\Support\Facades\Event', - 'File' => 'Illuminate\Support\Facades\File', - //'Form' => 'Illuminate\Support\Facades\Form', - 'Hash' => 'Illuminate\Support\Facades\Hash', - 'HTML' => 'Illuminate\Support\Facades\HTML', - 'Input' => 'Illuminate\Support\Facades\Input', - 'Lang' => 'Illuminate\Support\Facades\Lang', - 'Log' => 'Illuminate\Support\Facades\Log', - 'Mail' => 'Illuminate\Support\Facades\Mail', - //'Paginator' => 'Illuminate\Support\Facades\Paginator', - 'Password' => 'Illuminate\Support\Facades\Password', - 'Queue' => 'Illuminate\Support\Facades\Queue', - 'Redirect' => 'Illuminate\Support\Facades\Redirect', - 'Redis' => 'Illuminate\Support\Facades\Redis', - 'Request' => 'Illuminate\Support\Facades\Request', - 'Response' => 'Illuminate\Support\Facades\Response', - 'Route' => 'Illuminate\Support\Facades\Route', - 'Schema' => 'Illuminate\Support\Facades\Schema', - 'Seeder' => 'Illuminate\Database\Seeder', - 'Session' => 'Illuminate\Support\Facades\Session', - 'Str' => 'Illuminate\Support\Str', - 'URL' => 'Illuminate\Support\Facades\URL', - 'Validator' => 'Illuminate\Support\Facades\Validator', - 'View' => 'Illuminate\Support\Facades\View', - 'SSH' => 'Illuminate\Support\Facades\SSH', - 'Alert' => 'Bootstrapper\Alert', - 'Badge' => 'Bootstrapper\Badge', - 'Breadcrumb' => 'Bootstrapper\Breadcrumb', - 'Button' => 'Bootstrapper\Button', - 'ButtonGroup' => 'Bootstrapper\ButtonGroup', - 'ButtonToolbar' => 'Bootstrapper\ButtonToolbar', - 'Carousel' => 'Bootstrapper\Carousel', - 'DropdownButton' => 'Bootstrapper\DropdownButton', - 'Form' => 'Bootstrapper\Form', - 'Helpers' => 'Bootstrapper\Helpers', - 'Icon' => 'Bootstrapper\Icon', - //'Image' => 'Bootstrapper\Image', - 'Label' => 'Bootstrapper\Label', - 'MediaObject' => 'Bootstrapper\MediaObject', - 'Navbar' => 'Bootstrapper\Navbar', - 'Navigation' => 'Bootstrapper\Navigation', - 'Paginator' => 'Bootstrapper\Paginator', - 'Progress' => 'Bootstrapper\Progress', - 'Tabbable' => 'Bootstrapper\Tabbable', - 'Table' => 'Bootstrapper\Table', - 'Thumbnail' => 'Bootstrapper\Thumbnail', - 'Typeahead' => 'Bootstrapper\Typeahead', - 'Typography' => 'Bootstrapper\Typography', - 'Confide' => 'Zizaco\Confide\ConfideFacade', - 'Former' => 'Former\Facades\Former', - 'Datatable' => 'Chumper\Datatable\Facades\DatatableFacade', - 'Omnipay' => 'Omnipay\Omnipay', - 'CreditCard' => 'Omnipay\Common\CreditCard', - 'Image' => 'Intervention\Image\Facades\Image', - 'Countries' => 'Webpatser\Countries\CountriesFacade', - 'Carbon' => 'Carbon\Carbon', - 'Rocketeer' => 'Rocketeer\Facades\Rocketeer', - ), -); diff --git a/app/config/auth.php b/app/config/auth.php deleted file mode 100755 index 38eb282b7c4c..000000000000 --- a/app/config/auth.php +++ /dev/null @@ -1,71 +0,0 @@ - 'eloquent', - - /* - |-------------------------------------------------------------------------- - | Authentication Model - |-------------------------------------------------------------------------- - | - | When using the "Eloquent" authentication driver, we need to know which - | Eloquent model should be used to retrieve your users. Of course, it - | is often just the "User" model but you may use whatever you like. - | - */ - - 'model' => 'User', - - /* - |-------------------------------------------------------------------------- - | Authentication Table - |-------------------------------------------------------------------------- - | - | When using the "Database" authentication driver, we need to know which - | table should be used to retrieve your users. We have chosen a basic - | default value but you may easily change it to any table you like. - | - */ - - 'table' => 'users', - - /* - |-------------------------------------------------------------------------- - | Password Reminder Settings - |-------------------------------------------------------------------------- - | - | Here you may set the settings for password reminders, including a view - | that should be used as your password reminder e-mail. You will also - | be able to set the name of the table that holds the reset tokens. - | - | The "expire" time is the number of minutes that the reminder should be - | considered valid. This security feature keeps tokens short-lived so - | they have less time to be guessed. You may change this as needed. - | - */ - - 'reminder' => array( - - 'email' => 'emails.auth.reminder', - - 'table' => 'password_reminders', - - 'expire' => 60, - - ), - -); \ No newline at end of file diff --git a/app/config/cache.php b/app/config/cache.php deleted file mode 100755 index ce89842399e8..000000000000 --- a/app/config/cache.php +++ /dev/null @@ -1,89 +0,0 @@ - 'file', - - /* - |-------------------------------------------------------------------------- - | File Cache Location - |-------------------------------------------------------------------------- - | - | When using the "file" cache driver, we need a location where the cache - | files may be stored. A sensible default has been specified, but you - | are free to change it to any other place on disk that you desire. - | - */ - - 'path' => storage_path().'/cache', - - /* - |-------------------------------------------------------------------------- - | Database Cache Connection - |-------------------------------------------------------------------------- - | - | When using the "database" cache driver you may specify the connection - | that should be used to store the cached items. When this option is - | null the default database connection will be utilized for cache. - | - */ - - 'connection' => null, - - /* - |-------------------------------------------------------------------------- - | Database Cache Table - |-------------------------------------------------------------------------- - | - | When using the "database" cache driver we need to know the table that - | should be used to store the cached items. A default table name has - | been provided but you're free to change it however you deem fit. - | - */ - - 'table' => 'cache', - - /* - |-------------------------------------------------------------------------- - | Memcached Servers - |-------------------------------------------------------------------------- - | - | Now you may specify an array of your Memcached servers that should be - | used when utilizing the Memcached cache driver. All of the servers - | should contain a value for "host", "port", and "weight" options. - | - */ - - 'memcached' => array( - - array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100), - - ), - - /* - |-------------------------------------------------------------------------- - | Cache Key Prefix - |-------------------------------------------------------------------------- - | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. - | - */ - - 'prefix' => 'laravel', - -); diff --git a/app/config/compile.php b/app/config/compile.php deleted file mode 100755 index 54d7185bfbb0..000000000000 --- a/app/config/compile.php +++ /dev/null @@ -1,18 +0,0 @@ - PDO::FETCH_CLASS, - - /* - |-------------------------------------------------------------------------- - | Default Database Connection Name - |-------------------------------------------------------------------------- - | - | Here you may specify which of the database connections below you wish - | to use as your default connection for all database work. Of course - | you may use many connections at once using the Database library. - | - */ - - 'default' => 'mysql', - - /* - |-------------------------------------------------------------------------- - | Database Connections - |-------------------------------------------------------------------------- - | - | Here are each of the database connections setup for your application. - | Of course, examples of configuring each database platform that is - | supported by Laravel is shown below to make development simple. - | - | - | All database work in Laravel is done through the PHP PDO facilities - | so make sure you have the driver for your particular database of - | choice installed on your machine before you begin development. - | - */ - - 'connections' => array( - - 'sqlite' => array( - 'driver' => 'sqlite', - 'database' => __DIR__.'/../database/production.sqlite', - 'prefix' => '', - ), - - 'mysql' => array( - 'driver' => 'mysql', - 'host' => 'localhost', - 'database' => 'ninja', - 'username' => 'ninja', - 'password' => 'ninja', - 'charset' => 'utf8', - 'collation' => 'utf8_unicode_ci', - 'prefix' => '', - ), - - 'pgsql' => array( - 'driver' => 'pgsql', - 'host' => 'localhost', - 'database' => 'database', - 'username' => 'root', - 'password' => '', - 'charset' => 'utf8', - 'prefix' => '', - 'schema' => 'public', - ), - - 'sqlsrv' => array( - 'driver' => 'sqlsrv', - 'host' => 'localhost', - 'database' => 'database', - 'username' => 'root', - 'password' => '', - 'prefix' => '', - ), - - ), - - /* - |-------------------------------------------------------------------------- - | Migration Repository Table - |-------------------------------------------------------------------------- - | - | This table keeps track of all the migrations that have already run for - | your application. Using this information, we can determine which of - | the migrations on disk have not actually be run in the databases. - | - */ - - 'migrations' => 'migrations', - - /* - |-------------------------------------------------------------------------- - | Redis Databases - |-------------------------------------------------------------------------- - | - | Redis is an open source, fast, and advanced key-value store that also - | provides a richer set of commands than a typical key-value systems - | such as APC or Memcached. Laravel makes it easy to dig right in. - | - */ - - 'redis' => array( - - 'cluster' => false, - - 'default' => array( - 'host' => '127.0.0.1', - 'port' => 6379, - 'database' => 0, - ), - - ), - -); diff --git a/app/config/gae-development/database.php b/app/config/gae-development/database.php deleted file mode 100755 index d64dbb1eed23..000000000000 --- a/app/config/gae-development/database.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - - 'mysql' => array( - 'driver' => 'mysql', - 'host' => getenv('DEVELOPMENT_DB_HOST'), - 'database' => getenv('DEVELOPMENT_DB_NAME'), - 'username' => getenv('DEVELOPMENT_DB_USERNAME'), - 'password' => getenv('DEVELOPMENT_DB_PASSWORD'), - 'charset' => 'utf8', - 'collation' => 'utf8_unicode_ci', - 'prefix' => '', - ), - ), -); diff --git a/app/config/gae-production/app.php b/app/config/gae-production/app.php deleted file mode 100755 index bb7ab27c4c0b..000000000000 --- a/app/config/gae-production/app.php +++ /dev/null @@ -1,9 +0,0 @@ - true, - - 'manifest' => 'gs://invoice-ninja/meta', - -); \ No newline at end of file diff --git a/app/config/gae-production/cache.php b/app/config/gae-production/cache.php deleted file mode 100755 index 9476804df76c..000000000000 --- a/app/config/gae-production/cache.php +++ /dev/null @@ -1,7 +0,0 @@ - 'memcached', - -); \ No newline at end of file diff --git a/app/config/gae-production/database.php b/app/config/gae-production/database.php deleted file mode 100755 index ef8d2d58cc30..000000000000 --- a/app/config/gae-production/database.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - - 'mysql' => array( - 'driver' => 'mysql', - 'unix_socket' => getenv('PRODUCTION_CLOUD_SQL_INSTANCE'), - 'host' => '', - 'database' => getenv('PRODUCTION_DB_NAME'), - 'username' => getenv('PRODUCTION_DB_USERNAME'), - 'password' => getenv('PRODUCTION_DB_PASSWORD'), - 'charset' => 'utf8', - 'collation' => 'utf8_unicode_ci', - 'prefix' => '', - ), - ), -); diff --git a/app/config/gae-production/session.php b/app/config/gae-production/session.php deleted file mode 100755 index 9476804df76c..000000000000 --- a/app/config/gae-production/session.php +++ /dev/null @@ -1,7 +0,0 @@ - 'memcached', - -); \ No newline at end of file diff --git a/app/config/mail.php b/app/config/mail.php deleted file mode 100755 index 62dac9c3a572..000000000000 --- a/app/config/mail.php +++ /dev/null @@ -1,124 +0,0 @@ - 'smtp', - - /* - |-------------------------------------------------------------------------- - | SMTP Host Address - |-------------------------------------------------------------------------- - | - | Here you may provide the host address of the SMTP server used by your - | applications. A default option is provided that is compatible with - | the Postmark mail service, which will provide reliable delivery. - | - */ - - 'host' => '', - - /* - |-------------------------------------------------------------------------- - | SMTP Host Port - |-------------------------------------------------------------------------- - | - | This is the SMTP port used by your application to delivery e-mails to - | users of your application. Like the host we have set this value to - | stay compatible with the Postmark e-mail application by default. - | - */ - - 'port' => 587, - - /* - |-------------------------------------------------------------------------- - | Global "From" Address - |-------------------------------------------------------------------------- - | - | You may wish for all e-mails sent by your application to be sent from - | the same address. Here, you may specify a name and address that is - | used globally for all e-mails that are sent by your application. - | - */ - - 'from' => array('address' => 'contact@invoiceninja.com', 'name' => 'Invoice Ninja'), - - /* - |-------------------------------------------------------------------------- - | E-Mail Encryption Protocol - |-------------------------------------------------------------------------- - | - | Here you may specify the encryption protocol that should be used when - | the application send e-mail messages. A sensible default using the - | transport layer security protocol should provide great security. - | - */ - - 'encryption' => 'tls', - - /* - |-------------------------------------------------------------------------- - | SMTP Server Username - |-------------------------------------------------------------------------- - | - | If your SMTP server requires a username for authentication, you should - | set it here. This will get used to authenticate with your server on - | connection. You may also set the "password" value below this one. - | - */ - - 'username' => '', - - /* - |-------------------------------------------------------------------------- - | SMTP Server Password - |-------------------------------------------------------------------------- - | - | Here you may set the password required by your SMTP server to send out - | messages from your application. This will be given to the server on - | connection so that the application will be able to send messages. - | - */ - - 'password' => '', - - /* - |-------------------------------------------------------------------------- - | Sendmail System Path - |-------------------------------------------------------------------------- - | - | When using the "sendmail" driver to send e-mails, we will need to know - | the path to where Sendmail lives on this server. A default path has - | been provided here, which will work well on most of your systems. - | - */ - - 'sendmail' => '/usr/sbin/sendmail -bs', - - /* - |-------------------------------------------------------------------------- - | Mail "Pretend" - |-------------------------------------------------------------------------- - | - | When this option is enabled, e-mail will not actually be sent over the - | web and will instead be written to your application's logs files so - | you may inspect the message. This is great for local development. - | - */ - - 'pretend' => false, - -); \ No newline at end of file diff --git a/app/config/packages/.gitkeep b/app/config/packages/.gitkeep deleted file mode 100755 index e69de29bb2d1..000000000000 diff --git a/app/config/packages/anahkiasen/former/Nude.php b/app/config/packages/anahkiasen/former/Nude.php deleted file mode 100755 index 18f5239b82d0..000000000000 --- a/app/config/packages/anahkiasen/former/Nude.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - - 'tag' => 'i', - 'set' => null, - 'prefix' => 'icon', - - ), - -); \ No newline at end of file diff --git a/app/config/packages/anahkiasen/former/TwitterBootstrap.php b/app/config/packages/anahkiasen/former/TwitterBootstrap.php deleted file mode 100755 index dfac6d7bc77e..000000000000 --- a/app/config/packages/anahkiasen/former/TwitterBootstrap.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - - 'tag' => 'i', - 'set' => null, - 'prefix' => 'icon', - - ), - -); \ No newline at end of file diff --git a/app/config/packages/anahkiasen/former/TwitterBootstrap3.php b/app/config/packages/anahkiasen/former/TwitterBootstrap3.php deleted file mode 100755 index fad6b7882c89..000000000000 --- a/app/config/packages/anahkiasen/former/TwitterBootstrap3.php +++ /dev/null @@ -1,26 +0,0 @@ - array( - 'large' => 'lg', - 'medium' => 'md', - 'small' => 'sm', - 'mini' => 'xs', - ), - - // Width of labels for horizontal forms expressed as viewport => grid columns - 'labelWidths' => array( - 'large' => 4, - 'small' => 4, - ), - - // HTML markup and classes used by Bootstrap 3 for icons - 'icon' => array( - 'tag' => 'span', - 'set' => 'glyphicon', - 'prefix' => 'glyphicon', - ), - -); \ No newline at end of file diff --git a/app/config/packages/anahkiasen/former/ZurbFoundation.php b/app/config/packages/anahkiasen/former/ZurbFoundation.php deleted file mode 100755 index 9223978736d5..000000000000 --- a/app/config/packages/anahkiasen/former/ZurbFoundation.php +++ /dev/null @@ -1,35 +0,0 @@ - array( - - 'large' => '', - 'medium' => null, - 'small' => 'mobile-', - 'mini' => null, - - ), - - // Width of labels for horizontal forms expressed as viewport => grid columns - 'labelWidths' => array( - - 'large' => 2, - 'small' => 4, - - ), - - // Classes to be applied to wrapped labels in horizontal forms - 'wrappedLabelClasses' => array('right','inline'), - - // HTML markup and classes used by Foundation 3 for icons - 'icon' => array( - - 'tag' => 'i', - 'set' => null, - 'prefix' => 'fi', - - ), - -); \ No newline at end of file diff --git a/app/config/packages/anahkiasen/former/ZurbFoundation4.php b/app/config/packages/anahkiasen/former/ZurbFoundation4.php deleted file mode 100755 index 4f55a44f9c40..000000000000 --- a/app/config/packages/anahkiasen/former/ZurbFoundation4.php +++ /dev/null @@ -1,36 +0,0 @@ - array( - - 'large' => 'large', - 'medium' => null, - 'small' => 'small', - 'mini' => null, - - ), - - // Width of labels for horizontal forms expressed as viewport => grid columns - 'labelWidths' => array( - - 'small' => 3, - - ), - - // Classes to be applied to wrapped labels in horizontal forms - 'wrappedLabelClasses' => array('right','inline'), - - // HTML markup and classes used by Foundation 4 for icons - 'icon' => array( - - 'tag' => 'i', - 'set' => 'general', - 'prefix' => 'foundicon', - - ), - -); \ No newline at end of file diff --git a/app/config/packages/anahkiasen/former/config.php b/app/config/packages/anahkiasen/former/config.php deleted file mode 100755 index 327019638f9d..000000000000 --- a/app/config/packages/anahkiasen/former/config.php +++ /dev/null @@ -1,59 +0,0 @@ - true, - - // The default form type - 'default_form_type' => 'horizontal', - - // The framework to be used by Former - 'framework' => 'TwitterBootstrap3', - - // Validation - //////////////////////////////////////////////////////////////////// - - // Whether Former should fetch errors from Session - 'fetch_errors' => true, - - // Whether Former should try to apply Validator rules as attributes - 'live_validation' => true, - - // Whether Former should automatically fetch error messages and - // display them next to the matching fields - 'error_messages' => true, - - // Checkables - //////////////////////////////////////////////////////////////////// - - // Whether checkboxes should always be present in the POST data, - // no matter if you checked them or not - 'push_checkboxes' => false, - - // The value a checkbox will have in the POST array if unchecked - 'unchecked_value' => 0, - - // Required fields - //////////////////////////////////////////////////////////////////// - - // The class to be added to required fields - 'required_class' => 'required', - - // A facultative text to append to the labels of required fields - 'required_text' => '', //'*', - - // Translations - //////////////////////////////////////////////////////////////////// - - // Where Former should look for translations - 'translate_from' => 'texts', - - // An array of attributes to automatically translate - 'translatable' => array( - 'help', 'inlineHelp', 'blockHelp', - 'placeholder', 'data_placeholder', - 'label' - ), -); diff --git a/app/config/packages/ignited/laravel-omnipay/config.php b/app/config/packages/ignited/laravel-omnipay/config.php deleted file mode 100755 index 493f73319c5f..000000000000 --- a/app/config/packages/ignited/laravel-omnipay/config.php +++ /dev/null @@ -1,19 +0,0 @@ - 'paypal', - - // Add in each gateway here - 'gateways' => array( - 'paypal' => array( - 'driver' => 'Paypal_Express', - 'options' => array( - 'solutionType' => '', - 'landingPage' => '', - 'headerImageUrl' => '' - ) - ) - ) -); \ No newline at end of file diff --git a/app/config/packages/zizaco/confide/.gitkeep b/app/config/packages/zizaco/confide/.gitkeep deleted file mode 100755 index e69de29bb2d1..000000000000 diff --git a/app/config/packages/zizaco/confide/config.php b/app/config/packages/zizaco/confide/config.php deleted file mode 100755 index e26ae0a94eab..000000000000 --- a/app/config/packages/zizaco/confide/config.php +++ /dev/null @@ -1,117 +0,0 @@ - 9, - 'throttle_time_period' => 2, - - /* - |-------------------------------------------------------------------------- - | Login Throttle Field - |-------------------------------------------------------------------------- - | - | Login throttle is done using the remote ip address - | and a provided credential. Email and username are likely values. - | - | Default: email - | - */ - 'login_cache_field' => 'email', - - /* - |-------------------------------------------------------------------------- - | Form Views - |-------------------------------------------------------------------------- - | - | The VIEWS used to render forms with Confide methods: - | makeLoginForm, makeSignupForm, makeForgotPasswordForm - | and makeResetPasswordForm. - | - | By default, the out of the box confide views are used - | but you can create your own forms and replace the view - | names here. For example - | - | // To use app/views/user/signup.blade.php: - | - | 'signup_form' => 'user.signup' - | - | - */ - 'login_form' => 'users.login', - 'signup_form' => 'confide::signup', - 'forgot_password_form' => 'users.forgot_password', - 'reset_password_form' => 'users.reset_password', - - /* - |-------------------------------------------------------------------------- - | Email Views - |-------------------------------------------------------------------------- - | - | The VIEWS used to email messages for some Confide events: - | - | By default, the out of the box confide views are used - | but you can create your own forms and replace the view - | names here. For example - | - | // To use app/views/email/confirmation.blade.php: - | - | 'email_account_confirmation' => 'email.confirmation' - | - | - */ - - 'email_reset_password' => 'emails.passwordreset_html', // with $user and $token. - 'email_account_confirmation' => 'emails.confirm_html', // with $user - - /* - |-------------------------------------------------------------------------- - | Signup (create) Cache - |-------------------------------------------------------------------------- - | - | By default you will only can only register once every 2 hours - | (120 minutes) because you are not able to receive a registration - | email more often then that. - | - | You can adjust that limitation here, set to 0 for no caching. - | Time is in minutes. - | - | - */ - 'signup_cache' => 0, - - /* - |-------------------------------------------------------------------------- - | Signup E-mail and confirmation (true or false) - |-------------------------------------------------------------------------- - | - | By default a signup e-mail will be send by the system, however if you - | do not want this to happen, change the line below in false and handle - | the confirmation using another technique, for example by using the IPN - | from a payment-processor. Very usefull for websites offering products. - | - | signup_email: - | is for the transport of the email, true or false - | If you want to use an IPN to trigger the email, then set it to false - | - | signup_confirm: - | is to decide of a member needs to be confirmed before he is able to login - | so when you set this to true, then a member has to be confirmed before - | he is able to login, so if you want to use an IPN for confirmation, be - | sure that the ipn process also changes the confirmed flag in the member - | table, otherwise they will not be able to login after the payment. - | - */ - 'signup_email' => false, - 'signup_confirm' => false, - -); diff --git a/app/config/queue.php b/app/config/queue.php deleted file mode 100755 index da1512ca7d5e..000000000000 --- a/app/config/queue.php +++ /dev/null @@ -1,78 +0,0 @@ - 'sync', - - /* - |-------------------------------------------------------------------------- - | Queue Connections - |-------------------------------------------------------------------------- - | - | Here you may configure the connection information for each server that - | is used by your application. A default configuration has been added - | for each back-end shipped with Laravel. You are free to add more. - | - */ - - 'connections' => array( - - 'sync' => array( - 'driver' => 'sync', - ), - - 'beanstalkd' => array( - 'driver' => 'beanstalkd', - 'host' => 'localhost', - 'queue' => 'default', - ), - - 'sqs' => array( - 'driver' => 'sqs', - 'key' => 'your-public-key', - 'secret' => 'your-secret-key', - 'queue' => 'your-queue-url', - 'region' => 'us-east-1', - ), - - 'iron' => array( - 'driver' => 'iron', - 'project' => 'your-project-id', - 'token' => 'your-token', - 'queue' => 'your-queue-name', - ), - - ), - - - /* - |-------------------------------------------------------------------------- - | Failed Queue Jobs - |-------------------------------------------------------------------------- - | - | These options configure the behavior of failed queue job logging so you - | can control which database and table are used to store the jobs that - | have failed. You may change them to any database / table you wish. - | - */ - - 'failed' => array( - - 'database' => 'mysql', 'table' => 'failed_jobs', - - ), - -); diff --git a/app/config/remote.php b/app/config/remote.php deleted file mode 100755 index ea960e03a5c0..000000000000 --- a/app/config/remote.php +++ /dev/null @@ -1,59 +0,0 @@ - 'production', - - /* - |-------------------------------------------------------------------------- - | Remote Server Connections - |-------------------------------------------------------------------------- - | - | These are the servers that will be accessible via the SSH task runner - | facilities of Laravel. This feature radically simplifies executing - | tasks on your servers, such as deploying out these applications. - | - */ - - 'connections' => array( - - 'production' => array( - 'host' => '', - 'username' => '', - 'password' => '', - 'key' => '', - 'keyphrase' => '', - 'root' => '/var/www', - ), - - ), - - /* - |-------------------------------------------------------------------------- - | Remote Server Groups - |-------------------------------------------------------------------------- - | - | Here you may list connections under a single group name, which allows - | you to easily access all of the servers at once using a short name - | that is extremely easy to remember, such as "web" or "database". - | - */ - - 'groups' => array( - - 'web' => array('production') - - ), - -); \ No newline at end of file diff --git a/app/config/session.php b/app/config/session.php deleted file mode 100755 index 64b3795f3d66..000000000000 --- a/app/config/session.php +++ /dev/null @@ -1,141 +0,0 @@ - 'native', - - /* - |-------------------------------------------------------------------------- - | Session Lifetime - |-------------------------------------------------------------------------- - | - | Here you may specify the number of minutes that you wish the session - | to be allowed to remain idle before it expires. If you want them - | to immediately expire when the browser closes, set it to zero. - | - */ - - 'lifetime' => 120, - - 'expire_on_close' => false, - - /* - |-------------------------------------------------------------------------- - | Session File Location - |-------------------------------------------------------------------------- - | - | When using the native session driver, we need a location where session - | files may be stored. A default has been set for you but a different - | location may be specified. This is only needed for file sessions. - | - */ - - 'files' => storage_path().'/sessions', - - /* - |-------------------------------------------------------------------------- - | Session Database Connection - |-------------------------------------------------------------------------- - | - | When using the "database" session driver, you may specify the database - | connection that should be used to manage your sessions. This should - | correspond to a connection in your "database" configuration file. - | - */ - - 'connection' => null, - - /* - |-------------------------------------------------------------------------- - | Session Database Table - |-------------------------------------------------------------------------- - | - | When using the "database" session driver, you may specify the table we - | should use to manage the sessions. Of course, a sensible default is - | provided for you; however, you are free to change this as needed. - | - */ - - 'table' => 'sessions', - - /* - |-------------------------------------------------------------------------- - | Session Sweeping Lottery - |-------------------------------------------------------------------------- - | - | Some session drivers must manually sweep their storage location to get - | rid of old sessions from storage. Here are the chances that it will - | happen on a given request. By default, the odds are 2 out of 100. - | - */ - - 'lottery' => array(2, 100), - - /* - |-------------------------------------------------------------------------- - | Session Cookie Name - |-------------------------------------------------------------------------- - | - | Here you may change the name of the cookie used to identify a session - | instance by ID. The name specified here will get used every time a - | new session cookie is created by the framework for every driver. - | - */ - - 'cookie' => 'laravel_session', - - /* - |-------------------------------------------------------------------------- - | Session Cookie Path - |-------------------------------------------------------------------------- - | - | The session cookie path determines the path for which the cookie will - | be regarded as available. Typically, this will be the root path of - | your application but you are free to change this when necessary. - | - */ - - 'path' => '/', - - /* - |-------------------------------------------------------------------------- - | Session Cookie Domain - |-------------------------------------------------------------------------- - | - | Here you may change the domain of the cookie used to identify a session - | in your application. This will determine which domains the cookie is - | available to in your application. A sensible default has been set. - | - */ - - 'domain' => null, - - - /* - |-------------------------------------------------------------------------- - | HTTPS Only Cookies - |-------------------------------------------------------------------------- - | - | By setting this option to true, session cookies will only be sent back - | to the server if the browser has a HTTPS connection. This will keep - | the cookie from being sent to you if it can not be done securely. - | - */ - - 'secure' => false, - -); diff --git a/app/config/testing/cache.php b/app/config/testing/cache.php deleted file mode 100755 index 16d3ae2fa5b2..000000000000 --- a/app/config/testing/cache.php +++ /dev/null @@ -1,20 +0,0 @@ - 'array', - -); \ No newline at end of file diff --git a/app/config/testing/session.php b/app/config/testing/session.php deleted file mode 100755 index a18c1b9fe54a..000000000000 --- a/app/config/testing/session.php +++ /dev/null @@ -1,21 +0,0 @@ - 'array', - -); \ No newline at end of file diff --git a/app/config/view.php b/app/config/view.php deleted file mode 100755 index 08e56af1d6d6..000000000000 --- a/app/config/view.php +++ /dev/null @@ -1,31 +0,0 @@ - array(__DIR__.'/../views'), - - /* - |-------------------------------------------------------------------------- - | Pagination View - |-------------------------------------------------------------------------- - | - | This view will be used to render the pagination link output, and can - | be easily customized here to show any view you like. A clean view - | compatible with Twitter's Bootstrap is given to you by default. - | - */ - - 'pagination' => 'pagination::bootstrap3', - -); diff --git a/app/config/workbench.php b/app/config/workbench.php deleted file mode 100755 index 56bee5265864..000000000000 --- a/app/config/workbench.php +++ /dev/null @@ -1,31 +0,0 @@ - '', - - /* - |-------------------------------------------------------------------------- - | Workbench Author E-Mail Address - |-------------------------------------------------------------------------- - | - | Like the option above, your e-mail address is used when generating new - | workbench packages. The e-mail is placed in your composer.json file - | automatically after the package is created by the workbench tool. - | - */ - - 'email' => '', - -); \ No newline at end of file diff --git a/app/controllers/.gitkeep b/app/controllers/.gitkeep deleted file mode 100755 index e69de29bb2d1..000000000000 diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php deleted file mode 100755 index 6036a93b3753..000000000000 --- a/app/controllers/AccountController.php +++ /dev/null @@ -1,715 +0,0 @@ -accountRepo = $accountRepo; - $this->userMailer = $userMailer; - $this->contactMailer = $contactMailer; - } - - public function demo() - { - $demoAccountId = Utils::getDemoAccountId(); - - if (!$demoAccountId) { - return Redirect::to('/'); - } - - $account = Account::find($demoAccountId); - $user = $account->users()->first(); - - Auth::login($user, true); - - return Redirect::to('invoices/create'); - } - - public function getStarted() - { - if (Auth::check()) { - return Redirect::to('invoices/create'); - } elseif (!Utils::isNinja() && Account::count() > 0) { - return Redirect::to('/login'); - } - - $user = false; - $guestKey = Input::get('guest_key'); - - if ($guestKey) { - $user = User::where('password', '=', $guestKey)->first(); - - if ($user && $user->registered) { - return Redirect::to('/'); - } - } - - if (!$user) { - $account = $this->accountRepo->create(); - $user = $account->users()->first(); - - Session::forget(RECENTLY_VIEWED); - } - - Auth::login($user, true); - Event::fire('user.login'); - - return Redirect::to('invoices/create')->with('sign_up', Input::get('sign_up')); - } - - public function enableProPlan() - { - $invitation = $this->accountRepo->enableProPlan(); - - /* - if ($invoice) - { - $this->contactMailer->sendInvoice($invoice); - } - */ - - return $invitation->invitation_key; - } - - public function setTrashVisible($entityType, $visible) - { - Session::put("show_trash:{$entityType}", $visible == 'true'); - - if ($entityType == 'user') { - return Redirect::to('company/'.ACCOUNT_ADVANCED_SETTINGS.'/'.ACCOUNT_USER_MANAGEMENT); - } elseif ($entityType == 'token') { - return Redirect::to('company/'.ACCOUNT_ADVANCED_SETTINGS.'/'.ACCOUNT_TOKEN_MANAGEMENT); - } else { - return Redirect::to("{$entityType}s"); - } - } - - public function getSearchData() - { - $data = $this->accountRepo->getSearchData(); - return Response::json($data); - } - - public function showSection($section = ACCOUNT_DETAILS, $subSection = false) - { - if ($section == ACCOUNT_DETAILS) { - $data = [ - 'account' => Account::with('users')->findOrFail(Auth::user()->account_id), - 'countries' => Country::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'sizes' => Size::remember(DEFAULT_QUERY_CACHE)->orderBy('id')->get(), - 'industries' => Industry::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'timezones' => Timezone::remember(DEFAULT_QUERY_CACHE)->orderBy('location')->get(), - 'dateFormats' => DateFormat::remember(DEFAULT_QUERY_CACHE)->get(), - 'datetimeFormats' => DatetimeFormat::remember(DEFAULT_QUERY_CACHE)->get(), - 'currencies' => Currency::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'languages' => Language::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'showUser' => Auth::user()->id === Auth::user()->account->users()->first()->id, - ]; - - return View::make('accounts.details', $data); - } elseif ($section == ACCOUNT_PAYMENTS) { - - $account = Auth::user()->account; - $account->load('account_gateways'); - $count = count($account->account_gateways); - - if ($count == 0) { - return Redirect::to('gateways/create'); - } else { - return View::make('accounts.payments', ['showAdd' => $count < 2]); - } - } elseif ($section == ACCOUNT_NOTIFICATIONS) { - $data = [ - 'account' => Account::with('users')->findOrFail(Auth::user()->account_id), - ]; - - return View::make('accounts.notifications', $data); - } elseif ($section == ACCOUNT_IMPORT_EXPORT) { - return View::make('accounts.import_export'); - } elseif ($section == ACCOUNT_ADVANCED_SETTINGS) { - $account = Auth::user()->account; - $data = [ - 'account' => $account, - 'feature' => $subSection, - ]; - - if ($subSection == ACCOUNT_INVOICE_DESIGN) { - $invoice = new stdClass(); - $client = new stdClass(); - $invoiceItem = new stdClass(); - - $client->name = 'Sample Client'; - $client->address1 = ''; - $client->city = ''; - $client->state = ''; - $client->postal_code = ''; - $client->work_phone = ''; - $client->work_email = ''; - - $invoice->invoice_number = Auth::user()->account->getNextInvoiceNumber(); - $invoice->invoice_date = date_create()->format('Y-m-d'); - $invoice->account = json_decode(Auth::user()->account->toJson()); - $invoice->amount = $invoice->balance = 100; - - $invoiceItem->cost = 100; - $invoiceItem->qty = 1; - $invoiceItem->notes = 'Notes'; - $invoiceItem->product_key = 'Item'; - - $invoice->client = $client; - $invoice->invoice_items = [$invoiceItem]; - - $data['invoice'] = $invoice; - $data['invoiceDesigns'] = InvoiceDesign::remember(DEFAULT_QUERY_CACHE, 'invoice_designs_cache_'.Auth::user()->maxInvoiceDesignId()) - ->where('id', '<=', Auth::user()->maxInvoiceDesignId())->orderBy('id')->get(); - } else if ($subSection == ACCOUNT_EMAIL_TEMPLATES) { - $data['invoiceEmail'] = $account->getEmailTemplate(ENTITY_INVOICE); - $data['quoteEmail'] = $account->getEmailTemplate(ENTITY_QUOTE); - $data['paymentEmail'] = $account->getEmailTemplate(ENTITY_PAYMENT); - $data['emailFooter'] = $account->getEmailFooter(); - } - - return View::make("accounts.{$subSection}", $data); - } elseif ($section == ACCOUNT_PRODUCTS) { - $data = [ - 'account' => Auth::user()->account, - ]; - - return View::make('accounts.products', $data); - } - } - - public function doSection($section = ACCOUNT_DETAILS, $subSection = false) - { - if ($section == ACCOUNT_DETAILS) { - return AccountController::saveDetails(); - } elseif ($section == ACCOUNT_IMPORT_EXPORT) { - return AccountController::importFile(); - } elseif ($section == ACCOUNT_MAP) { - return AccountController::mapFile(); - } elseif ($section == ACCOUNT_NOTIFICATIONS) { - return AccountController::saveNotifications(); - } elseif ($section == ACCOUNT_EXPORT) { - return AccountController::export(); - } elseif ($section == ACCOUNT_ADVANCED_SETTINGS) { - if ($subSection == ACCOUNT_INVOICE_SETTINGS) { - return AccountController::saveInvoiceSettings(); - } elseif ($subSection == ACCOUNT_INVOICE_DESIGN) { - return AccountController::saveInvoiceDesign(); - } elseif ($subSection == ACCOUNT_EMAIL_TEMPLATES) { - return AccountController::saveEmailTemplates(); - } - } elseif ($section == ACCOUNT_PRODUCTS) { - return AccountController::saveProducts(); - } - } - - private function saveEmailTemplates() - { - if (Auth::user()->account->isPro()) { - $account = Auth::user()->account; - - $account->email_template_invoice = Input::get('email_template_invoice', $account->getEmailTemplate(ENTITY_INVOICE)); - $account->email_template_quote = Input::get('email_template_quote', $account->getEmailTemplate(ENTITY_QUOTE)); - $account->email_template_payment = Input::get('email_template_payment', $account->getEmailTemplate(ENTITY_PAYMENT)); - - $account->save(); - - Session::flash('message', trans('texts.updated_settings')); - } - - return Redirect::to('company/advanced_settings/email_templates'); - } - - private function saveProducts() - { - $account = Auth::user()->account; - - $account->fill_products = Input::get('fill_products') ? true : false; - $account->update_products = Input::get('update_products') ? true : false; - $account->save(); - - Session::flash('message', trans('texts.updated_settings')); - return Redirect::to('company/products'); - } - - private function saveInvoiceSettings() - { - if (Auth::user()->account->isPro()) { - $account = Auth::user()->account; - - $account->custom_label1 = trim(Input::get('custom_label1')); - $account->custom_value1 = trim(Input::get('custom_value1')); - $account->custom_label2 = trim(Input::get('custom_label2')); - $account->custom_value2 = trim(Input::get('custom_value2')); - $account->custom_client_label1 = trim(Input::get('custom_client_label1')); - $account->custom_client_label2 = trim(Input::get('custom_client_label2')); - $account->custom_invoice_label1 = trim(Input::get('custom_invoice_label1')); - $account->custom_invoice_label2 = trim(Input::get('custom_invoice_label2')); - $account->custom_invoice_taxes1 = Input::get('custom_invoice_taxes1') ? true : false; - $account->custom_invoice_taxes2 = Input::get('custom_invoice_taxes2') ? true : false; - - $account->invoice_number_prefix = Input::get('invoice_number_prefix'); - $account->invoice_number_counter = Input::get('invoice_number_counter'); - $account->quote_number_prefix = Input::get('quote_number_prefix'); - $account->share_counter = Input::get('share_counter') ? true : false; - - if (!$account->share_counter) { - $account->quote_number_counter = Input::get('quote_number_counter'); - } - - if (!$account->share_counter && $account->invoice_number_prefix == $account->quote_number_prefix) { - Session::flash('error', trans('texts.invalid_counter')); - - return Redirect::to('company/advanced_settings/invoice_settings')->withInput(); - } else { - $account->save(); - Session::flash('message', trans('texts.updated_settings')); - } - } - - return Redirect::to('company/advanced_settings/invoice_settings'); - } - - private function saveInvoiceDesign() - { - if (Auth::user()->account->isPro()) { - $account = Auth::user()->account; - $account->hide_quantity = Input::get('hide_quantity') ? true : false; - $account->hide_paid_to_date = Input::get('hide_paid_to_date') ? true : false; - $account->primary_color = Input::get('primary_color'); - $account->secondary_color = Input::get('secondary_color'); - $account->invoice_design_id = Input::get('invoice_design_id'); - $account->save(); - - Session::flash('message', trans('texts.updated_settings')); - } - - return Redirect::to('company/advanced_settings/invoice_design'); - } - - private function export() - { - $output = fopen('php://output', 'w') or Utils::fatalError(); - header('Content-Type:application/csv'); - header('Content-Disposition:attachment;filename=export.csv'); - - $clients = Client::scope()->get(); - AccountController::exportData($output, $clients->toArray()); - - $contacts = Contact::scope()->get(); - AccountController::exportData($output, $contacts->toArray()); - - $invoices = Invoice::scope()->get(); - AccountController::exportData($output, $invoices->toArray()); - - $invoiceItems = InvoiceItem::scope()->get(); - AccountController::exportData($output, $invoiceItems->toArray()); - - $payments = Payment::scope()->get(); - AccountController::exportData($output, $payments->toArray()); - - $credits = Credit::scope()->get(); - AccountController::exportData($output, $credits->toArray()); - - fclose($output); - exit; - } - - private function exportData($output, $data) - { - if (count($data) > 0) { - fputcsv($output, array_keys($data[0])); - } - - foreach ($data as $record) { - fputcsv($output, $record); - } - - fwrite($output, "\n"); - } - - private function importFile() - { - $data = Session::get('data'); - Session::forget('data'); - - $map = Input::get('map'); - $count = 0; - $hasHeaders = Input::get('header_checkbox'); - - $countries = Country::remember(DEFAULT_QUERY_CACHE)->get(); - $countryMap = []; - - foreach ($countries as $country) { - $countryMap[strtolower($country->name)] = $country->id; - } - - foreach ($data as $row) { - if ($hasHeaders) { - $hasHeaders = false; - continue; - } - - $client = Client::createNew(); - $contact = Contact::createNew(); - $contact->is_primary = true; - $contact->send_invoice = true; - $count++; - - foreach ($row as $index => $value) { - $field = $map[$index]; - $value = trim($value); - - if ($field == Client::$fieldName && !$client->name) { - $client->name = $value; - } elseif ($field == Client::$fieldPhone && !$client->work_phone) { - $client->work_phone = $value; - } elseif ($field == Client::$fieldAddress1 && !$client->address1) { - $client->address1 = $value; - } elseif ($field == Client::$fieldAddress2 && !$client->address2) { - $client->address2 = $value; - } elseif ($field == Client::$fieldCity && !$client->city) { - $client->city = $value; - } elseif ($field == Client::$fieldState && !$client->state) { - $client->state = $value; - } elseif ($field == Client::$fieldPostalCode && !$client->postal_code) { - $client->postal_code = $value; - } elseif ($field == Client::$fieldCountry && !$client->country_id) { - $value = strtolower($value); - $client->country_id = isset($countryMap[$value]) ? $countryMap[$value] : null; - } elseif ($field == Client::$fieldNotes && !$client->private_notes) { - $client->private_notes = $value; - } elseif ($field == Contact::$fieldFirstName && !$contact->first_name) { - $contact->first_name = $value; - } elseif ($field == Contact::$fieldLastName && !$contact->last_name) { - $contact->last_name = $value; - } elseif ($field == Contact::$fieldPhone && !$contact->phone) { - $contact->phone = $value; - } elseif ($field == Contact::$fieldEmail && !$contact->email) { - $contact->email = strtolower($value); - } - } - - $client->save(); - $client->contacts()->save($contact); - Activity::createClient($client, false); - } - - $message = Utils::pluralize('created_client', $count); - Session::flash('message', $message); - - return Redirect::to('clients'); - } - - private function mapFile() - { - $file = Input::file('file'); - - if ($file == null) { - Session::flash('error', trans('texts.select_file')); - - return Redirect::to('company/import_export'); - } - - $name = $file->getRealPath(); - - require_once app_path().'/includes/parsecsv.lib.php'; - $csv = new parseCSV(); - $csv->heading = false; - $csv->auto($name); - - if (count($csv->data) + Client::scope()->count() > Auth::user()->getMaxNumClients()) { - $message = trans('texts.limit_clients', ['count' => Auth::user()->getMaxNumClients()]); - Session::flash('error', $message); - - return Redirect::to('company/import_export'); - } - - Session::put('data', $csv->data); - - $headers = false; - $hasHeaders = false; - $mapped = array(); - $columns = array('', - Client::$fieldName, - Client::$fieldPhone, - Client::$fieldAddress1, - Client::$fieldAddress2, - Client::$fieldCity, - Client::$fieldState, - Client::$fieldPostalCode, - Client::$fieldCountry, - Client::$fieldNotes, - Contact::$fieldFirstName, - Contact::$fieldLastName, - Contact::$fieldPhone, - Contact::$fieldEmail, - ); - - if (count($csv->data) > 0) { - $headers = $csv->data[0]; - foreach ($headers as $title) { - if (strpos(strtolower($title), 'name') > 0) { - $hasHeaders = true; - break; - } - } - - for ($i = 0; $i Contact::$fieldFirstName, - 'last' => Contact::$fieldLastName, - 'email' => Contact::$fieldEmail, - 'mobile' => Contact::$fieldPhone, - 'phone' => Client::$fieldPhone, - 'name|organization' => Client::$fieldName, - 'street|address|address1' => Client::$fieldAddress1, - 'street2|address2' => Client::$fieldAddress2, - 'city' => Client::$fieldCity, - 'state|province' => Client::$fieldState, - 'zip|postal|code' => Client::$fieldPostalCode, - 'country' => Client::$fieldCountry, - 'note' => Client::$fieldNotes, - ); - - foreach ($map as $search => $column) { - foreach (explode("|", $search) as $string) { - if (strpos($title, 'sec') === 0) { - continue; - } - - if (strpos($title, $string) !== false) { - $mapped[$i] = $column; - break(2); - } - } - } - } - } - } - - $data = array( - 'data' => $csv->data, - 'headers' => $headers, - 'hasHeaders' => $hasHeaders, - 'columns' => $columns, - 'mapped' => $mapped, - ); - - return View::make('accounts.import_map', $data); - } - - private function saveNotifications() - { - $account = Auth::user()->account; - $account->invoice_terms = Input::get('invoice_terms'); - $account->invoice_footer = Input::get('invoice_footer'); - $account->email_footer = Input::get('email_footer'); - $account->save(); - - $user = Auth::user(); - $user->notify_sent = Input::get('notify_sent'); - $user->notify_viewed = Input::get('notify_viewed'); - $user->notify_paid = Input::get('notify_paid'); - $user->save(); - - Session::flash('message', trans('texts.updated_settings')); - - return Redirect::to('company/notifications'); - } - - private function saveDetails() - { - $rules = array( - 'name' => 'required', - ); - - $user = Auth::user()->account->users()->first(); - - if (Auth::user()->id === $user->id) { - $rules['email'] = 'email|required|unique:users,email,'.$user->id.',id'; - } - - $validator = Validator::make(Input::all(), $rules); - - if ($validator->fails()) { - return Redirect::to('company/details') - ->withErrors($validator) - ->withInput(); - } else { - $account = Auth::user()->account; - $account->name = trim(Input::get('name')); - $account->id_number = trim(Input::get('id_number')); - $account->vat_number = trim(Input::get('vat_number')); - $account->work_email = trim(Input::get('work_email')); - $account->work_phone = trim(Input::get('work_phone')); - $account->address1 = trim(Input::get('address1')); - $account->address2 = trim(Input::get('address2')); - $account->city = trim(Input::get('city')); - $account->state = trim(Input::get('state')); - $account->postal_code = trim(Input::get('postal_code')); - $account->country_id = Input::get('country_id') ? Input::get('country_id') : null; - $account->size_id = Input::get('size_id') ? Input::get('size_id') : null; - $account->industry_id = Input::get('industry_id') ? Input::get('industry_id') : null; - $account->timezone_id = Input::get('timezone_id') ? Input::get('timezone_id') : null; - $account->date_format_id = Input::get('date_format_id') ? Input::get('date_format_id') : null; - $account->datetime_format_id = Input::get('datetime_format_id') ? Input::get('datetime_format_id') : null; - $account->currency_id = Input::get('currency_id') ? Input::get('currency_id') : 1; // US Dollar - $account->language_id = Input::get('language_id') ? Input::get('language_id') : 1; // English - $account->save(); - - if (Auth::user()->id === $user->id) { - $user->first_name = trim(Input::get('first_name')); - $user->last_name = trim(Input::get('last_name')); - $user->username = trim(Input::get('email')); - $user->email = trim(strtolower(Input::get('email'))); - $user->phone = trim(Input::get('phone')); - $user->save(); - } - - /* Logo image file */ - if ($file = Input::file('logo')) { - $path = Input::file('logo')->getRealPath(); - File::delete('logo/'.$account->account_key.'.jpg'); - - $image = Image::make($path); - $mimeType = $file->getMimeType(); - - if ($image->width == 200 && $mimeType == 'image/jpeg') { - $file->move('logo/', $account->account_key . '.jpg'); - } else { - $image->resize(200, 120, true, false); - Image::canvas($image->width, $image->height, '#FFFFFF')->insert($image)->save($account->getLogoPath()); - } - - //$image = Image::make($path)->resize(200, 120, true, false); - //Image::canvas($image->width, $image->height, '#FFFFFF')->insert($image)->save($account->getLogoPath()); - } - - Event::fire('user.refresh'); - Session::flash('message', trans('texts.updated_settings')); - - return Redirect::to('company/details'); - } - } - - public function removeLogo() - { - File::delete('logo/'.Auth::user()->account->account_key.'.jpg'); - - Session::flash('message', trans('texts.removed_logo')); - - return Redirect::to('company/details'); - } - - public function checkEmail() - { - $email = User::withTrashed()->where('email', '=', Input::get('email'))->where('id', '<>', Auth::user()->id)->first(); - - if ($email) { - return "taken"; - } else { - return "available"; - } - } - - public function submitSignup() - { - $rules = array( - 'new_first_name' => 'required', - 'new_last_name' => 'required', - 'new_password' => 'required|min:6', - 'new_email' => 'email|required|unique:users,email,'.Auth::user()->id.',id', - ); - - $validator = Validator::make(Input::all(), $rules); - - if ($validator->fails()) { - return ''; - } - - $user = Auth::user(); - $user->first_name = trim(Input::get('new_first_name')); - $user->last_name = trim(Input::get('new_last_name')); - $user->email = trim(strtolower(Input::get('new_email'))); - $user->username = $user->email; - $user->password = trim(Input::get('new_password')); - $user->password_confirmation = trim(Input::get('new_password')); - $user->registered = true; - $user->amend(); - - if (Utils::isNinja()) { - $this->userMailer->sendConfirmation($user); - } else { - $this->accountRepo->registerUser($user); - } - - $activities = Activity::scope()->get(); - foreach ($activities as $activity) { - $activity->message = str_replace('Guest', $user->getFullName(), $activity->message); - $activity->save(); - } - - if (Input::get('go_pro') == 'true') { - Session::set(REQUESTED_PRO_PLAN, true); - } - - Session::set(SESSION_COUNTER, -1); - - return "{$user->first_name} {$user->last_name}"; - } - - public function doRegister() - { - $affiliate = Affiliate::where('affiliate_key', '=', SELF_HOST_AFFILIATE_KEY)->first(); - - $license = new License(); - $license->first_name = Input::get('first_name'); - $license->last_name = Input::get('last_name'); - $license->email = Input::get('email'); - $license->transaction_reference = Request::getClientIp(); - $license->license_key = Utils::generateLicense(); - $license->affiliate_id = $affiliate->id; - $license->product_id = PRODUCT_SELF_HOST; - $license->is_claimed = 1; - $license->save(); - - return ''; - } - - public function cancelAccount() - { - if ($reason = trim(Input::get('reason'))) { - $email = Auth::user()->email; - $name = Auth::user()->getDisplayName(); - - $data = [ - 'text' => $reason, - ]; - - $this->userMailer->sendTo(CONTACT_EMAIL, $email, $name, 'Invoice Ninja Feedback [Canceled Account]', 'contact', $data); - } - - $account = Auth::user()->account; - $account->forceDelete(); - - Confide::logout(); - - return Redirect::to('/')->with('clearGuestKey', true); - } -} diff --git a/app/controllers/AccountGatewayController.php b/app/controllers/AccountGatewayController.php deleted file mode 100755 index e6f646e4e70a..000000000000 --- a/app/controllers/AccountGatewayController.php +++ /dev/null @@ -1,292 +0,0 @@ -join('gateways', 'gateways.id', '=', 'account_gateways.gateway_id') - ->where('account_gateways.deleted_at', '=', null) - ->where('account_gateways.account_id', '=', \Auth::user()->account_id) - ->select('account_gateways.public_id', 'gateways.name', 'account_gateways.deleted_at'); - - return Datatable::query($query) - ->addColumn('name', function ($model) { return link_to('gateways/'.$model->public_id.'/edit', $model->name); }) - ->addColumn('dropdown', function ($model) { - $actions = ''; - - return $actions; - }) - ->orderColumns(['name']) - ->make(); - } - - public function edit($publicId) - { - $accountGateway = AccountGateway::scope($publicId)->firstOrFail(); - $config = $accountGateway->config; - $selectedCards = $accountGateway->accepted_credit_cards; - - $configFields = json_decode($config); - - foreach ($configFields as $configField => $value) { - $configFields->$configField = str_repeat('*', strlen($value)); - } - - $data = self::getViewModel($accountGateway); - $data['url'] = 'gateways/'.$publicId; - $data['method'] = 'PUT'; - $data['title'] = trans('texts.edit_gateway') . ' - ' . $accountGateway->gateway->name; - $data['config'] = $configFields; - - return View::make('accounts.account_gateway', $data); - } - - public function update($publicId) - { - return $this->save($publicId); - } - - public function store() - { - return $this->save(); - } - - /** - * Displays the form for account creation - * - */ - public function create() - { - $data = self::getViewModel(); - $data['url'] = 'gateways'; - $data['method'] = 'POST'; - $data['title'] = trans('texts.add_gateway'); - - return View::make('accounts.account_gateway', $data); - } - - private function getViewModel($accountGateway = false) - { - $selectedCards = $accountGateway ? $accountGateway->accepted_credit_cards : 0; - $account = Auth::user()->account; - - $recommendedGateways = Gateway::remember(DEFAULT_QUERY_CACHE) - ->where('recommended', '=', '1') - ->orderBy('sort_order') - ->get(); - $recommendedGatewayArray = array(); - - foreach ($recommendedGateways as $recommendedGateway) { - $arrayItem = array( - 'value' => $recommendedGateway->id, - 'other' => 'false', - 'data-imageUrl' => asset($recommendedGateway->getLogoUrl()), - 'data-siteUrl' => $recommendedGateway->site_url, - ); - $recommendedGatewayArray[$recommendedGateway->name] = $arrayItem; - } - - $creditCardsArray = unserialize(CREDIT_CARDS); - $creditCards = []; - foreach ($creditCardsArray as $card => $name) { - if ($selectedCards > 0 && ($selectedCards & $card) == $card) { - $creditCards[$name['text']] = ['value' => $card, 'data-imageUrl' => asset($name['card']), 'checked' => 'checked']; - } else { - $creditCards[$name['text']] = ['value' => $card, 'data-imageUrl' => asset($name['card'])]; - } - } - - $otherItem = array( - 'value' => 1000000, - 'other' => 'true', - 'data-imageUrl' => '', - 'data-siteUrl' => '', - ); - $recommendedGatewayArray['Other Options'] = $otherItem; - - $account->load('account_gateways'); - $currentGateways = $account->account_gateways; - $gateways = Gateway::where('payment_library_id', '=', 1)->orderBy('name'); - $onlyPayPal = false; - if (!$accountGateway) { - if (count($currentGateways) > 0) { - $currentGateway = $currentGateways[0]; - if ($currentGateway->isPayPal()) { - $gateways->where('id', '!=', GATEWAY_PAYPAL_EXPRESS); - } else { - $gateways->where('id', '=', GATEWAY_PAYPAL_EXPRESS); - $onlyPayPal = true; - } - } - } - $gateways = $gateways->get(); - - foreach ($gateways as $gateway) { - $paymentLibrary = $gateway->paymentlibrary; - $gateway->fields = $gateway->getFields(); - - if ($accountGateway && $accountGateway->gateway_id == $gateway->id) { - $accountGateway->fields = $gateway->fields; - } - } - - $tokenBillingOptions = []; - for ($i=1; $i<=4; $i++) { - $tokenBillingOptions[$i] = trans("texts.token_billing_{$i}"); - } - - return [ - 'account' => $account, - 'accountGateway' => $accountGateway, - 'config' => false, - 'gateways' => $gateways, - 'recommendedGateways' => $recommendedGatewayArray, - 'creditCardTypes' => $creditCards, - 'tokenBillingOptions' => $tokenBillingOptions, - 'showBreadcrumbs' => false, - 'onlyPayPal' => $onlyPayPal, - 'countGateways' => count($currentGateways) - ]; - } - - public function delete() - { - $accountGatewayPublicId = Input::get('accountGatewayPublicId'); - $gateway = AccountGateway::scope($accountGatewayPublicId)->firstOrFail(); - - $gateway->delete(); - - Session::flash('message', trans('texts.deleted_gateway')); - - return Redirect::to('company/payments'); - } - - /** - * Stores new account - * - */ - public function save($accountGatewayPublicId = false) - { - $rules = array(); - $recommendedId = Input::get('recommendedGateway_id'); - - $gatewayId = ($recommendedId == 1000000 ? Input::get('gateway_id') : $recommendedId); - - if (!$gatewayId) { - Session::flash('error', trans('validation.required', ['attribute' => 'gateway'])); - return Redirect::to('gateways/create') - ->withInput(); - } - - $gateway = Gateway::findOrFail($gatewayId); - $paymentLibrary = $gateway->paymentlibrary; - $fields = $gateway->getFields(); - - foreach ($fields as $field => $details) { - if (!in_array($field, ['testMode', 'developerMode', 'headerImageUrl', 'solutionType', 'landingPage', 'brandName', 'logoImageUrl', 'borderColor'])) { - if (strtolower($gateway->name) == 'beanstream') { - if (in_array($field, ['merchant_id', 'passCode'])) { - $rules[$gateway->id.'_'.$field] = 'required'; - } - } else { - $rules[$gateway->id.'_'.$field] = 'required'; - } - } - } - - $creditcards = Input::get('creditCardTypes'); - $validator = Validator::make(Input::all(), $rules); - - if ($validator->fails()) { - return Redirect::to('gateways/create') - ->withErrors($validator) - ->withInput(); - } else { - $account = Account::with('account_gateways')->findOrFail(Auth::user()->account_id); - - if ($accountGatewayPublicId) { - $accountGateway = AccountGateway::scope($accountGatewayPublicId)->firstOrFail(); - } else { - $accountGateway = AccountGateway::createNew(); - $accountGateway->gateway_id = $gatewayId; - } - - $isMasked = false; - - $config = new stdClass(); - foreach ($fields as $field => $details) { - $value = trim(Input::get($gateway->id.'_'.$field)); - - if ($value && $value === str_repeat('*', strlen($value))) { - $isMasked = true; - } - - $config->$field = $value; - } - - $cardCount = 0; - if ($creditcards) { - foreach ($creditcards as $card => $value) { - $cardCount += intval($value); - } - } - - // if the values haven't changed don't update the config - if ($isMasked && $accountGatewayPublicId) { - $accountGateway->accepted_credit_cards = $cardCount; - $accountGateway->save(); - // if there's an existing config for this gateway update it - } elseif (!$isMasked && $accountGatewayPublicId && $accountGateway->gateway_id == $gatewayId) { - $accountGateway->accepted_credit_cards = $cardCount; - $accountGateway->config = json_encode($config); - $accountGateway->save(); - // otherwise, create a new gateway config - } else { - $accountGateway->config = json_encode($config); - $accountGateway->accepted_credit_cards = $cardCount; - $account->account_gateways()->save($accountGateway); - } - - if (Input::get('token_billing_type_id')) { - $account->token_billing_type_id = Input::get('token_billing_type_id'); - $account->save(); - } - - if ($accountGatewayPublicId) { - $message = trans('texts.updated_gateway'); - } else { - $message = trans('texts.created_gateway'); - } - - Session::flash('message', $message); - - return Redirect::to('company/payments'); - } - } - -} \ No newline at end of file diff --git a/app/controllers/ActivityController.php b/app/controllers/ActivityController.php deleted file mode 100755 index ba8797bb1d00..000000000000 --- a/app/controllers/ActivityController.php +++ /dev/null @@ -1,20 +0,0 @@ -join('clients', 'clients.id', '=', 'activities.client_id') - ->where('clients.public_id', '=', $clientPublicId) - ->where('activities.account_id', '=', Auth::user()->account_id) - ->select('activities.id', 'activities.message', 'activities.created_at', 'clients.currency_id', 'activities.balance', 'activities.adjustment'); - - return Datatable::query($query) - ->addColumn('id', function ($model) { return Utils::timestampToDateTimeString(strtotime($model->created_at)); }) - ->addColumn('message', function ($model) { return Utils::decodeActivity($model->message); }) - ->addColumn('balance', function ($model) { return Utils::formatMoney($model->balance, $model->currency_id); }) - ->addColumn('adjustment', function ($model) { return $model->adjustment != 0 ? Utils::formatMoney($model->adjustment, $model->currency_id) : ''; }) - ->make(); - } -} diff --git a/app/controllers/AppController.php b/app/controllers/AppController.php deleted file mode 100644 index 1378c43c9c95..000000000000 --- a/app/controllers/AppController.php +++ /dev/null @@ -1,171 +0,0 @@ -accountRepo = $accountRepo; - $this->mailer = $mailer; - } - - public function showSetup() - { - if (Utils::isNinja() || Utils::isDatabaseSetup()) { - return Redirect::to('/'); - } - - return View::make('setup'); - } - - public function doSetup() - { - if (Utils::isNinja() || Utils::isDatabaseSetup()) { - return Redirect::to('/'); - } - - $valid = false; - $test = Input::get('test'); - - $app = Input::get('app'); - $app['key'] = str_random(RANDOM_KEY_LENGTH); - $app['debug'] = false; - - $database = Input::get('database'); - $dbType = $database['default']; - $database['connections'] = [$dbType => $database['type']]; - unset($database['type']); - - $mail = Input::get('mail'); - $email = $mail['username']; - $mail['from']['address'] = $email; - - if ($test == 'mail') { - return self::testMail($mail); - } - - $valid = self::testDatabase($database); - - if ($test == 'db') { - return $valid === true ? 'Success' : $valid; - } elseif (!$valid) { - return Redirect::to('/setup')->withInput(); - } - - $content = " $app, 'database' => $database, 'mail' => $mail] as $key => $config) { - $content = 'accountRepo->create(); - $user = $account->users()->first(); - - $user->first_name = trim(Input::get('first_name')); - $user->last_name = trim(Input::get('last_name')); - $user->email = trim(strtolower(Input::get('email'))); - $user->username = $user->email; - $user->password = trim(Input::get('password')); - $user->password_confirmation = trim(Input::get('password')); - $user->registered = true; - $user->amend(); - - //Auth::login($user, true); - $this->accountRepo->registerUser($user); - - return Redirect::to('/invoices/create'); - } - - private function testDatabase($database) - { - $dbType = $database['default']; - - Config::set('database.default', $dbType); - - foreach ($database['connections'][$dbType] as $key => $val) { - Config::set("database.connections.{$dbType}.{$key}", $val); - } - - try { - $valid = DB::connection()->getDatabaseName() ? true : false; - } catch (Exception $e) { - return $e->getMessage(); - } - - return $valid; - } - - private function testMail($mail) - { - $email = $mail['username']; - $fromName = $mail['from']['name']; - - foreach ($mail as $key => $val) { - Config::set("mail.{$key}", $val); - } - - Config::set('mail.from.address', $email); - Config::set('mail.from.name', $fromName); - - $data = [ - 'text' => 'Test email', - ]; - - try { - $this->mailer->sendTo($email, $email, $fromName, 'Test email', 'contact', $data); - - return 'Sent'; - } catch (Exception $e) { - return $e->getMessage(); - } - } - - public function install() - { - if (!Utils::isNinja() && !Utils::isDatabaseSetup()) { - try { - Artisan::call('migrate'); - Artisan::call('db:seed'); - } catch (Exception $e) { - Response::make($e->getMessage(), 500); - } - } - - return Redirect::to('/'); - } - - public function update() - { - if (!Utils::isNinja()) { - try { - Artisan::call('migrate'); - Cache::flush(); - } catch (Exception $e) { - Response::make($e->getMessage(), 500); - } - } - - return Redirect::to('/'); - } -} diff --git a/app/controllers/BaseController.php b/app/controllers/BaseController.php deleted file mode 100755 index 11891536c641..000000000000 --- a/app/controllers/BaseController.php +++ /dev/null @@ -1,21 +0,0 @@ -layout)) { - $this->layout = View::make($this->layout); - } - } - - public function __construct() - { - $this->beforeFilter('csrf', array('on' => array('post', 'delete', 'put'))); - } -} diff --git a/app/controllers/ClientApiController.php b/app/controllers/ClientApiController.php deleted file mode 100644 index 138a92aabcdb..000000000000 --- a/app/controllers/ClientApiController.php +++ /dev/null @@ -1,51 +0,0 @@ -clientRepo = $clientRepo; - } - - public function ping() - { - $headers = Utils::getApiHeaders(); - - return Response::make('', 200, $headers); - } - - public function index() - { - $clients = Client::scope()->with('contacts')->orderBy('created_at', 'desc')->get(); - $clients = Utils::remapPublicIds($clients->toArray()); - - $response = json_encode($clients, JSON_PRETTY_PRINT); - $headers = Utils::getApiHeaders(count($clients)); - - return Response::make($response, 200, $headers); - } - - public function store() - { - $data = Input::all(); - $error = $this->clientRepo->getErrors($data); - - if ($error) { - $headers = Utils::getApiHeaders(); - - return Response::make($error, 500, $headers); - } else { - $client = $this->clientRepo->save(false, $data, false); - $client->load('contacts'); - $client = Utils::remapPublicIds($client->toArray()); - $response = json_encode($client, JSON_PRETTY_PRINT); - $headers = Utils::getApiHeaders(); - - return Response::make($response, 200, $headers); - } - } -} diff --git a/app/controllers/ClientController.php b/app/controllers/ClientController.php deleted file mode 100755 index a06b6c5bdc8e..000000000000 --- a/app/controllers/ClientController.php +++ /dev/null @@ -1,278 +0,0 @@ -clientRepo = $clientRepo; - } - - /** - * Display a listing of the resource. - * - * @return Response - */ - public function index() - { - return View::make('list', array( - 'entityType' => ENTITY_CLIENT, - 'title' => trans('texts.clients'), - 'columns' => Utils::trans(['checkbox', 'client', 'contact', 'email', 'date_created', 'last_login', 'balance', 'action']), - )); - } - - public function getDatatable() - { - $clients = $this->clientRepo->find(Input::get('sSearch')); - - return Datatable::query($clients) - ->addColumn('checkbox', function ($model) { return ''; }) - ->addColumn('name', function ($model) { return link_to('clients/'.$model->public_id, $model->name); }) - ->addColumn('first_name', function ($model) { return link_to('clients/'.$model->public_id, $model->first_name.' '.$model->last_name); }) - ->addColumn('email', function ($model) { return link_to('clients/'.$model->public_id, $model->email); }) - ->addColumn('created_at', function ($model) { return Utils::timestampToDateString(strtotime($model->created_at)); }) - ->addColumn('last_login', function ($model) { return Utils::timestampToDateString(strtotime($model->last_login)); }) - ->addColumn('balance', function ($model) { return Utils::formatMoney($model->balance, $model->currency_id); }) - ->addColumn('dropdown', function ($model) { - if ($model->is_deleted) { - return '
'; - } - - $str = ''; - }) - ->make(); - } - - /** - * Store a newly created resource in storage. - * - * @return Response - */ - public function store() - { - return $this->save(); - } - - /** - * Display the specified resource. - * - * @param int $id - * @return Response - */ - public function show($publicId) - { - $client = Client::withTrashed()->scope($publicId)->with('contacts', 'size', 'industry')->firstOrFail(); - Utils::trackViewed($client->getDisplayName(), ENTITY_CLIENT); - - $actionLinks = [ - [trans('texts.create_invoice'), URL::to('invoices/create/'.$client->public_id)], - [trans('texts.enter_payment'), URL::to('payments/create/'.$client->public_id)], - [trans('texts.enter_credit'), URL::to('credits/create/'.$client->public_id)], - ]; - - if (Utils::isPro()) { - array_unshift($actionLinks, [trans('texts.create_quote'), URL::to('quotes/create/'.$client->public_id)]); - } - - $data = array( - 'actionLinks' => $actionLinks, - 'showBreadcrumbs' => false, - 'client' => $client, - 'credit' => $client->getTotalCredit(), - 'title' => trans('texts.view_client'), - 'hasRecurringInvoices' => Invoice::scope()->where('is_recurring', '=', true)->whereClientId($client->id)->count() > 0, - 'gatewayLink' => $client->getGatewayLink(), - ); - - return View::make('clients.show', $data); - } - - /** - * Show the form for creating a new resource. - * - * @return Response - */ - public function create() - { - if (Client::scope()->count() > Auth::user()->getMaxNumClients()) { - return View::make('error', ['hideHeader' => true, 'error' => "Sorry, you've exceeded the limit of ".Auth::user()->getMaxNumClients()." clients"]); - } - - $data = [ - 'client' => null, - 'method' => 'POST', - 'url' => 'clients', - 'title' => trans('texts.new_client'), - ]; - - $data = array_merge($data, self::getViewModel()); - - return View::make('clients.edit', $data); - } - - /** - * Show the form for editing the specified resource. - * - * @param int $id - * @return Response - */ - public function edit($publicId) - { - $client = Client::scope($publicId)->with('contacts')->firstOrFail(); - $data = [ - 'client' => $client, - 'method' => 'PUT', - 'url' => 'clients/'.$publicId, - 'title' => trans('texts.edit_client'), - ]; - - $data = array_merge($data, self::getViewModel()); - - return View::make('clients.edit', $data); - } - - private static function getViewModel() - { - return [ - 'sizes' => Size::remember(DEFAULT_QUERY_CACHE)->orderBy('id')->get(), - 'paymentTerms' => PaymentTerm::remember(DEFAULT_QUERY_CACHE)->orderBy('num_days')->get(['name', 'num_days']), - 'industries' => Industry::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'currencies' => Currency::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'countries' => Country::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'customLabel1' => Auth::user()->account->custom_client_label1, - 'customLabel2' => Auth::user()->account->custom_client_label2, - ]; - } - - /** - * Update the specified resource in storage. - * - * @param int $id - * @return Response - */ - public function update($publicId) - { - return $this->save($publicId); - } - - private function save($publicId = null) - { - $rules = array( - 'email' => 'required', - ); - $validator = Validator::make(Input::all(), $rules); - - if ($validator->fails()) { - $url = $publicId ? 'clients/'.$publicId.'/edit' : 'clients/create'; - - return Redirect::to($url) - ->withErrors($validator) - ->withInput(Input::except('password')); - } else { - if ($publicId) { - $client = Client::scope($publicId)->firstOrFail(); - } else { - $client = Client::createNew(); - } - - $client->name = trim(Input::get('name')); - $client->id_number = trim(Input::get('id_number')); - $client->vat_number = trim(Input::get('vat_number')); - $client->work_phone = trim(Input::get('work_phone')); - $client->custom_value1 = trim(Input::get('custom_value1')); - $client->custom_value2 = trim(Input::get('custom_value2')); - $client->address1 = trim(Input::get('address1')); - $client->address2 = trim(Input::get('address2')); - $client->city = trim(Input::get('city')); - $client->state = trim(Input::get('state')); - $client->postal_code = trim(Input::get('postal_code')); - $client->country_id = Input::get('country_id') ?: null; - $client->private_notes = trim(Input::get('private_notes')); - $client->size_id = Input::get('size_id') ?: null; - $client->industry_id = Input::get('industry_id') ?: null; - $client->currency_id = Input::get('currency_id') ?: null; - $client->payment_terms = Input::get('payment_terms') ?: 0; - $client->website = trim(Input::get('website')); - - $client->save(); - - $data = json_decode(Input::get('data')); - $contactIds = []; - $isPrimary = true; - - foreach ($data->contacts as $contact) { - if (isset($contact->public_id) && $contact->public_id) { - $record = Contact::scope($contact->public_id)->firstOrFail(); - } else { - $record = Contact::createNew(); - } - - $record->email = trim(strtolower($contact->email)); - $record->first_name = trim($contact->first_name); - $record->last_name = trim($contact->last_name); - $record->phone = trim($contact->phone); - $record->is_primary = $isPrimary; - $isPrimary = false; - - $client->contacts()->save($record); - $contactIds[] = $record->public_id; - } - - foreach ($client->contacts as $contact) { - if (!in_array($contact->public_id, $contactIds)) { - $contact->delete(); - } - } - - if ($publicId) { - Session::flash('message', trans('texts.updated_client')); - } else { - Activity::createClient($client); - Session::flash('message', trans('texts.created_client')); - } - - return Redirect::to('clients/'.$client->public_id); - } - } - - public function bulk() - { - $action = Input::get('action'); - $ids = Input::get('id') ? Input::get('id') : Input::get('ids'); - $count = $this->clientRepo->bulk($ids, $action); - - $message = Utils::pluralize($action.'d_client', $count); - Session::flash('message', $message); - - if ($action == 'restore' && $count == 1) { - return Redirect::to('clients/'.$ids[0]); - } else { - return Redirect::to('clients'); - } - } -} diff --git a/app/controllers/CreditController.php b/app/controllers/CreditController.php deleted file mode 100755 index 6b1d7e8a85ce..000000000000 --- a/app/controllers/CreditController.php +++ /dev/null @@ -1,149 +0,0 @@ -creditRepo = $creditRepo; - } - - /** - * Display a listing of the resource. - * - * @return Response - */ - public function index() - { - return View::make('list', array( - 'entityType' => ENTITY_CREDIT, - 'title' => trans('texts.credits'), - 'columns' => Utils::trans(['checkbox', 'client', 'credit_amount', 'credit_balance', 'credit_date', 'private_notes', 'action']), - )); - } - - public function getDatatable($clientPublicId = null) - { - $credits = $this->creditRepo->find($clientPublicId, Input::get('sSearch')); - - $table = Datatable::query($credits); - - if (!$clientPublicId) { - $table->addColumn('checkbox', function ($model) { return ''; }) - ->addColumn('client_name', function ($model) { return link_to('clients/'.$model->client_public_id, Utils::getClientDisplayName($model)); }); - } - - return $table->addColumn('amount', function ($model) { return Utils::formatMoney($model->amount, $model->currency_id).''; }) - ->addColumn('balance', function ($model) { return Utils::formatMoney($model->balance, $model->currency_id); }) - ->addColumn('credit_date', function ($model) { return Utils::fromSqlDate($model->credit_date); }) - ->addColumn('private_notes', function ($model) { return $model->private_notes; }) - ->addColumn('dropdown', function ($model) { - if ($model->is_deleted) { - return '
'; - } - - $str = ''; - }) - ->make(); - } - - public function create($clientPublicId = 0) - { - $data = array( - 'clientPublicId' => Input::old('client') ? Input::old('client') : $clientPublicId, - //'invoicePublicId' => Input::old('invoice') ? Input::old('invoice') : $invoicePublicId, - 'credit' => null, - 'method' => 'POST', - 'url' => 'credits', - 'title' => trans('texts.new_credit'), - //'currencies' => Currency::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - //'invoices' => Invoice::scope()->with('client', 'invoice_status')->orderBy('invoice_number')->get(), - 'clients' => Client::scope()->with('contacts')->orderBy('name')->get(), ); - - return View::make('credits.edit', $data); - } - - public function edit($publicId) - { - $credit = Credit::scope($publicId)->firstOrFail(); - $credit->credit_date = Utils::fromSqlDate($credit->credit_date); - - $data = array( - 'client' => null, - 'credit' => $credit, - 'method' => 'PUT', - 'url' => 'credits/'.$publicId, - 'title' => 'Edit Credit', - //'currencies' => Currency::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'clients' => Client::scope()->with('contacts')->orderBy('name')->get(), ); - - return View::make('credit.edit', $data); - } - - public function store() - { - return $this->save(); - } - - public function update($publicId) - { - return $this->save($publicId); - } - - private function save($publicId = null) - { - $rules = array( - 'client' => 'required', - 'amount' => 'required|positive', - ); - - $validator = Validator::make(Input::all(), $rules); - - if ($validator->fails()) { - $url = $publicId ? 'credits/'.$publicId.'/edit' : 'credits/create'; - - return Redirect::to($url) - ->withErrors($validator) - ->withInput(); - } else { - $this->creditRepo->save($publicId, Input::all()); - - $message = trans('texts.created_credit'); - Session::flash('message', $message); - - return Redirect::to('clients/'.Input::get('client')); - } - } - - public function bulk() - { - $action = Input::get('action'); - $ids = Input::get('id') ? Input::get('id') : Input::get('ids'); - $count = $this->creditRepo->bulk($ids, $action); - - if ($count > 0) { - $message = Utils::pluralize($action.'d_credit', $count); - Session::flash('message', $message); - } - - return Redirect::to('credits'); - } -} diff --git a/app/controllers/DashboardController.php b/app/controllers/DashboardController.php deleted file mode 100644 index 6038c812da7c..000000000000 --- a/app/controllers/DashboardController.php +++ /dev/null @@ -1,79 +0,0 @@ -= '.INVOICE_STATUS_SENT.' THEN 1 ELSE 0 END) invoices_sent, - COUNT(DISTINCT clients.id) active_clients'); - $metrics = DB::table('accounts') - ->select($select) - ->leftJoin('clients', 'accounts.id', '=', 'clients.account_id') - ->leftJoin('invoices', 'clients.id', '=', 'invoices.client_id') - ->where('accounts.id', '=', Auth::user()->account_id) - ->where('clients.is_deleted', '=', false) - ->where('invoices.is_deleted', '=', false) - ->where('invoices.is_recurring', '=', false) - ->where('invoices.is_quote', '=', false) - ->groupBy('accounts.id') - ->first(); - - $select = DB::raw('SUM(clients.paid_to_date) as value, clients.currency_id as currency_id'); - $paidToDate = DB::table('accounts') - ->select($select) - ->leftJoin('clients', 'accounts.id', '=', 'clients.account_id') - ->where('accounts.id', '=', Auth::user()->account_id) - ->where('clients.is_deleted', '=', false) - ->groupBy('accounts.id') - ->groupBy(DB::raw('CASE WHEN clients.currency_id IS NULL THEN CASE WHEN accounts.currency_id IS NULL THEN 1 ELSE accounts.currency_id END ELSE clients.currency_id END')) - ->get(); - - $select = DB::raw('AVG(invoices.amount) as invoice_avg, clients.currency_id as currency_id'); - $averageInvoice = DB::table('accounts') - ->select($select) - ->leftJoin('clients', 'accounts.id', '=', 'clients.account_id') - ->leftJoin('invoices', 'clients.id', '=', 'invoices.client_id') - ->where('accounts.id', '=', Auth::user()->account_id) - ->where('clients.is_deleted', '=', false) - ->where('invoices.is_deleted', '=', false) - ->groupBy('accounts.id') - ->groupBy(DB::raw('CASE WHEN clients.currency_id IS NULL THEN CASE WHEN accounts.currency_id IS NULL THEN 1 ELSE accounts.currency_id END ELSE clients.currency_id END')) - ->get(); - - - - $activities = Activity::where('activities.account_id', '=', Auth::user()->account_id) - ->orderBy('created_at', 'desc')->take(6)->get(); - - $pastDue = Invoice::scope() - ->where('due_date', '<', date('Y-m-d')) - ->where('balance', '>', 0) - ->where('is_recurring', '=', false) - ->where('is_quote', '=', false) - ->where('is_deleted', '=', false) - ->orderBy('due_date', 'asc')->take(6)->get(); - - $upcoming = Invoice::scope() - ->where('due_date', '>=', date('Y-m-d')) - ->where('balance', '>', 0) - ->where('is_recurring', '=', false) - ->where('is_quote', '=', false) - ->where('is_deleted', '=', false) - ->orderBy('due_date', 'asc')->take(6)->get(); - - $data = [ - 'paidToDate' => $paidToDate, - 'averageInvoice' => $averageInvoice, - 'billedClients' => $metrics ? $metrics->billed_clients : 0, - 'invoicesSent' => $metrics ? $metrics->invoices_sent : 0, - 'activeClients' => $metrics ? $metrics->active_clients : 0, - 'activities' => $activities, - 'pastDue' => $pastDue, - 'upcoming' => $upcoming, - ]; - - return View::make('dashboard', $data); - } -} diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php deleted file mode 100755 index 27e8a9983fd7..000000000000 --- a/app/controllers/HomeController.php +++ /dev/null @@ -1,68 +0,0 @@ -mailer = $mailer; - } - - public function showIndex() - { - if (!Utils::isDatabaseSetup()) { - return Redirect::to('/setup'); - } elseif (Account::count() == 0) { - return Redirect::to('/invoice_now'); - } else { - return Redirect::to('/login'); - } - } - - public function showTerms() - { - return View::make('public.terms', ['hideHeader' => true]); - } - - public function invoiceNow() - { - if (Auth::check()) { - return Redirect::to('invoices/create')->with('sign_up', Input::get('sign_up')); - } else { - return View::make('public.header', ['invoiceNow' => true]); - } - } - - public function newsFeed($userType, $version) - { - $response = Utils::getNewsFeedResponse($userType); - - return Response::json($response); - } - - public function hideMessage() - { - if (Auth::check() && Session::has('news_feed_id')) { - $newsFeedId = Session::get('news_feed_id'); - if ($newsFeedId != NEW_VERSION_AVAILABLE && $newsFeedId > Auth::user()->news_feed_id) { - $user = Auth::user(); - $user->news_feed_id = $newsFeedId; - $user->save(); - } - - Session::forget('news_feed_message'); - } - - return 'success'; - } - - public function logError() - { - return Utils::logError(Input::get('error'), 'JavaScript'); - } -} diff --git a/app/controllers/IntegrationController.php b/app/controllers/IntegrationController.php deleted file mode 100644 index 8353d972745e..000000000000 --- a/app/controllers/IntegrationController.php +++ /dev/null @@ -1,26 +0,0 @@ -account_id)->where('event_id', '=', $eventId)->first(); - - if (!$subscription) { - $subscription = new Subscription(); - $subscription->account_id = Auth::user()->account_id; - $subscription->event_id = $eventId; - } - - $subscription->target_url = trim(Input::get('target_url')); - $subscription->save(); - - return Response::json('{"id":'.$subscription->id.'}', 201); - } -} diff --git a/app/controllers/InvoiceApiController.php b/app/controllers/InvoiceApiController.php deleted file mode 100644 index 40c63ea30d9c..000000000000 --- a/app/controllers/InvoiceApiController.php +++ /dev/null @@ -1,192 +0,0 @@ -invoiceRepo = $invoiceRepo; - $this->mailer = $mailer; - } - - public function index() - { - $invoices = Invoice::scope()->where('invoices.is_quote', '=', false)->orderBy('created_at', 'desc')->get(); - $invoices = Utils::remapPublicIds($invoices->toArray()); - - $response = json_encode($invoices, JSON_PRETTY_PRINT); - $headers = Utils::getApiHeaders(count($invoices)); - - return Response::make($response, 200, $headers); - } - - public function store() - { - $data = Input::all(); - $error = null; - - // check if the invoice number is set and unique - if (!isset($data['invoice_number'])) { - $data['invoice_number'] = Auth::user()->account->getNextInvoiceNumber(); - } else { - $invoice = Invoice::scope()->where('invoice_number', '=', $data['invoice_number'])->first(); - if ($invoice) { - $error = trans('validation.unique', ['attribute' => 'texts.invoice_number']); - } - } - - // check the client id is set and exists - if (!isset($data['client_id'])) { - $error = trans('validation.required', ['attribute' => 'client_id']); - } else { - $client = Client::scope($data['client_id'])->first(); - if (!$client) { - $error = trans('validation.not_in', ['attribute' => 'client_id']); - } - } - - if ($error) { - $response = json_encode($error, JSON_PRETTY_PRINT); - } else { - $data = self::prepareData($data); - $invoice = $this->invoiceRepo->save(false, $data, false); - - $invitation = Invitation::createNew(); - $invitation->invoice_id = $invoice->id; - $invitation->contact_id = $client->contacts[0]->id; - $invitation->invitation_key = str_random(RANDOM_KEY_LENGTH); - $invitation->save(); - - // prepare the return data - $invoice->load('invoice_items'); - $invoice = $invoice->toArray(); - $invoice['link'] = $invitation->getLink(); - unset($invoice['account']); - unset($invoice['client']); - $invoice = Utils::remapPublicIds($invoice); - $invoice['client_id'] = $client->public_id; - - $response = json_encode($invoice, JSON_PRETTY_PRINT); - } - - $headers = Utils::getApiHeaders(); - - return Response::make($response, $error ? 400 : 200, $headers); - } - - private function prepareData($data) - { - $account = Auth::user()->account; - $account->loadLocalizationSettings(); - - // set defaults for optional fields - $fields = [ - 'discount' => 0, - 'is_amount_discount' => false, - 'terms' => '', - 'invoice_footer' => '', - 'public_notes' => '', - 'po_number' => '', - 'invoice_design_id' => $account->invoice_design_id, - 'invoice_items' => [], - 'custom_value1' => 0, - 'custom_value2' => 0, - 'custom_taxes1' => false, - 'custom_taxes2' => false, - ]; - - if (!isset($data['invoice_date'])) { - $fields['invoice_date_sql'] = date_create()->format('Y-m-d'); - } - if (!isset($data['due_date'])) { - $fields['due_date_sql'] = false; - } - - foreach ($fields as $key => $val) { - if (!isset($data[$key])) { - $data[$key] = $val; - } - } - - // hardcode some fields - $fields = [ - 'is_recurring' => false - ]; - - foreach ($fields as $key => $val) { - $data[$key] = $val; - } - - // initialize the line items - if (isset($data['product_key']) || isset($data['cost']) || isset($data['notes']) || isset($data['qty'])) { - $data['invoice_items'] = [self::prepareItem($data)]; - } else { - foreach ($data['invoice_items'] as $index => $item) { - $data['invoice_items'][$index] = self::prepareItem($item); - } - } - - return $data; - } - - private function prepareItem($item) - { - $fields = [ - 'cost' => 0, - 'product_key' => '', - 'notes' => '', - 'qty' => 1 - ]; - - foreach ($fields as $key => $val) { - if (!isset($item[$key])) { - $item[$key] = $val; - } - } - - // if only the product key is set we'll load the cost and notes - if ($item['product_key'] && (!$item['cost'] || !$item['notes'])) { - $product = Product::findProductByKey($item['product_key']); - if ($product) { - if (!$item['cost']) { - $item['cost'] = $product->cost; - } - if (!$item['notes']) { - $item['notes'] = $product->notes; - } - } - } - - return $item; - } - - public function emailInvoice() - { - $data = Input::all(); - $error = null; - - if (!isset($data['id'])) { - $error = trans('validation.required', ['attribute' => 'id']); - } else { - $invoice = Invoice::scope($data['id'])->first(); - if (!$invoice) { - $error = trans('validation.not_in', ['attribute' => 'id']); - } else { - $this->mailer->sendInvoice($invoice); - } - } - - if ($error) { - $response = json_encode($error, JSON_PRETTY_PRINT); - } else { - $response = json_encode(RESULT_SUCCESS, JSON_PRETTY_PRINT); - } - - $headers = Utils::getApiHeaders(); - return Response::make($response, $error ? 400 : 200, $headers); - } -} diff --git a/app/controllers/InvoiceController.php b/app/controllers/InvoiceController.php deleted file mode 100755 index 28a04b3cbaf9..000000000000 --- a/app/controllers/InvoiceController.php +++ /dev/null @@ -1,542 +0,0 @@ -mailer = $mailer; - $this->invoiceRepo = $invoiceRepo; - $this->clientRepo = $clientRepo; - $this->taxRateRepo = $taxRateRepo; - } - - public function index() - { - $data = [ - 'title' => trans('texts.invoices'), - 'entityType' => ENTITY_INVOICE, - 'columns' => Utils::trans(['checkbox', 'invoice_number', 'client', 'invoice_date', 'invoice_total', 'balance_due', 'due_date', 'status', 'action']), - ]; - - $recurringInvoices = Invoice::scope()->where('is_recurring', '=', true); - - if (Session::get('show_trash:invoice')) { - $recurringInvoices->withTrashed(); - } - - if ($recurringInvoices->count() > 0) { - $data['secEntityType'] = ENTITY_RECURRING_INVOICE; - $data['secColumns'] = Utils::trans(['checkbox', 'frequency', 'client', 'start_date', 'end_date', 'invoice_total', 'action']); - } - - return View::make('list', $data); - } - - public function clientIndex() - { - $invitationKey = Session::get('invitation_key'); - if (!$invitationKey) { - return Redirect::to('/setup'); - } - - $invitation = Invitation::with('account')->where('invitation_key', '=', $invitationKey)->first(); - $color = $invitation->account->primary_color ? $invitation->account->primary_color : '#0b4d78'; - - $data = [ - 'color' => $color, - 'hideLogo' => Session::get('white_label'), - 'title' => trans('texts.invoices'), - 'entityType' => ENTITY_INVOICE, - 'columns' => Utils::trans(['invoice_number', 'invoice_date', 'invoice_total', 'balance_due', 'due_date']), - ]; - - return View::make('public_list', $data); - } - - public function getDatatable($clientPublicId = null) - { - $accountId = Auth::user()->account_id; - $search = Input::get('sSearch'); - - return $this->invoiceRepo->getDatatable($accountId, $clientPublicId, ENTITY_INVOICE, $search); - } - - public function getClientDatatable() - { - //$accountId = Auth::user()->account_id; - $search = Input::get('sSearch'); - $invitationKey = Session::get('invitation_key'); - $invitation = Invitation::where('invitation_key', '=', $invitationKey)->first(); - - if (!$invitation || $invitation->is_deleted) { - return []; - } - - $invoice = $invitation->invoice; - - if (!$invoice || $invoice->is_deleted) { - return []; - } - - return $this->invoiceRepo->getClientDatatable($invitation->contact_id, ENTITY_INVOICE, $search); - } - - public function getRecurringDatatable($clientPublicId = null) - { - $query = $this->invoiceRepo->getRecurringInvoices(Auth::user()->account_id, $clientPublicId, Input::get('sSearch')); - $table = Datatable::query($query); - - if (!$clientPublicId) { - $table->addColumn('checkbox', function ($model) { return ''; }); - } - - $table->addColumn('frequency', function ($model) { return link_to('invoices/'.$model->public_id, $model->frequency); }); - - if (!$clientPublicId) { - $table->addColumn('client_name', function ($model) { return link_to('clients/'.$model->client_public_id, Utils::getClientDisplayName($model)); }); - } - - return $table->addColumn('start_date', function ($model) { return Utils::fromSqlDate($model->start_date); }) - ->addColumn('end_date', function ($model) { return Utils::fromSqlDate($model->end_date); }) - ->addColumn('amount', function ($model) { return Utils::formatMoney($model->amount, $model->currency_id); }) - ->addColumn('dropdown', function ($model) { - if ($model->is_deleted) { - return '
'; - } - - $str = ''; - - }) - ->make(); - } - - public function view($invitationKey) - { - $invitation = Invitation::where('invitation_key', '=', $invitationKey)->firstOrFail(); - $invoice = $invitation->invoice; - - if (!$invoice || $invoice->is_deleted) { - return View::make('invoices.deleted'); - } - - $invoice->load('user', 'invoice_items', 'invoice_design', 'account.country', 'client.contacts', 'client.country'); - $client = $invoice->client; - - if (!$client || $client->is_deleted) { - return View::make('invoices.deleted'); - } - - if (!Session::has($invitationKey) && (!Auth::check() || Auth::user()->account_id != $invoice->account_id)) { - Activity::viewInvoice($invitation); - Event::fire('invoice.viewed', $invoice); - } - - Session::set($invitationKey, true); - Session::set('invitation_key', $invitationKey); - Session::set('white_label', $client->account->isWhiteLabel()); - - $client->account->loadLocalizationSettings(); - - $invoice->invoice_date = Utils::fromSqlDate($invoice->invoice_date); - $invoice->due_date = Utils::fromSqlDate($invoice->due_date); - $invoice->is_pro = $client->account->isPro(); - - $contact = $invitation->contact; - $contact->setVisible([ - 'first_name', - 'last_name', - 'email', - 'phone', ]); - - $data = array( - 'isConverted' => $invoice->quote_invoice_id ? true : false, - 'showBreadcrumbs' => false, - 'hideLogo' => $client->account->isWhiteLabel(), - 'invoice' => $invoice->hidePrivateFields(), - 'invitation' => $invitation, - 'invoiceLabels' => $client->account->getInvoiceLabels(), - 'contact' => $contact, - 'hasToken' => $client->getGatewayToken(), - 'countGateways' => AccountGateway::scope(false, $client->account->id)->count(), - ); - - return View::make('invoices.view', $data); - } - - public function edit($publicId, $clone = false) - { - $invoice = Invoice::scope($publicId)->withTrashed()->with('invitations', 'account.country', 'client.contacts', 'client.country', 'invoice_items')->firstOrFail(); - $entityType = $invoice->getEntityType(); - - $contactIds = DB::table('invitations') - ->join('contacts', 'contacts.id', '=', 'invitations.contact_id') - ->where('invitations.invoice_id', '=', $invoice->id) - ->where('invitations.account_id', '=', Auth::user()->account_id) - ->where('invitations.deleted_at', '=', null) - ->select('contacts.public_id')->lists('public_id'); - - if ($clone) { - $invoice->id = null; - $invoice->invoice_number = Auth::user()->account->getNextInvoiceNumber($invoice->is_quote); - $invoice->balance = $invoice->amount; - $invoice->invoice_status_id = 0; - $invoice->invoice_date = date_create()->format('Y-m-d'); - $method = 'POST'; - $url = "{$entityType}s"; - } else { - Utils::trackViewed($invoice->invoice_number.' - '.$invoice->client->getDisplayName(), $invoice->getEntityType()); - $method = 'PUT'; - $url = "{$entityType}s/{$publicId}"; - } - - $invoice->invoice_date = Utils::fromSqlDate($invoice->invoice_date); - $invoice->due_date = Utils::fromSqlDate($invoice->due_date); - $invoice->start_date = Utils::fromSqlDate($invoice->start_date); - $invoice->end_date = Utils::fromSqlDate($invoice->end_date); - $invoice->is_pro = Auth::user()->isPro(); - - $data = array( - 'entityType' => $entityType, - 'showBreadcrumbs' => $clone, - 'account' => $invoice->account, - 'invoice' => $invoice, - 'data' => false, - 'method' => $method, - 'invitationContactIds' => $contactIds, - 'url' => $url, - 'title' => trans("texts.edit_{$entityType}"), - 'client' => $invoice->client, ); - $data = array_merge($data, self::getViewModel()); - - // Set the invitation link on the client's contacts - if (!$clone) { - $clients = $data['clients']; - foreach ($clients as $client) { - if ($client->id == $invoice->client->id) { - foreach ($invoice->invitations as $invitation) { - foreach ($client->contacts as $contact) { - if ($invitation->contact_id == $contact->id) { - $contact->invitation_link = $invitation->getLink(); - } - } - } - break; - } - } - } - - return View::make('invoices.edit', $data); - } - - public function create($clientPublicId = 0) - { - $client = null; - $invoiceNumber = Auth::user()->account->getNextInvoiceNumber(); - $account = Account::with('country')->findOrFail(Auth::user()->account_id); - - if ($clientPublicId) { - $client = Client::scope($clientPublicId)->firstOrFail(); - } - - $data = array( - 'entityType' => ENTITY_INVOICE, - 'account' => $account, - 'invoice' => null, - 'data' => Input::old('data'), - 'invoiceNumber' => $invoiceNumber, - 'method' => 'POST', - 'url' => 'invoices', - 'title' => trans('texts.new_invoice'), - 'client' => $client, ); - $data = array_merge($data, self::getViewModel()); - - return View::make('invoices.edit', $data); - } - - private static function getViewModel() - { - $recurringHelp = ''; - foreach (preg_split("/((\r?\n)|(\r\n?))/", trans('texts.recurring_help')) as $line) { - $parts = explode("=>", $line); - if (count($parts) > 1) { - $line = $parts[0].' => '.Utils::processVariables($parts[0]); - $recurringHelp .= '
  • '.strip_tags($line).'
  • '; - } else { - $recurringHelp .= $line; - } - } - - return [ - 'account' => Auth::user()->account, - 'products' => Product::scope()->orderBy('id')->get(array('product_key', 'notes', 'cost', 'qty')), - 'countries' => Country::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'clients' => Client::scope()->with('contacts', 'country')->orderBy('name')->get(), - 'taxRates' => TaxRate::scope()->orderBy('name')->get(), - 'currencies' => Currency::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'sizes' => Size::remember(DEFAULT_QUERY_CACHE)->orderBy('id')->get(), - 'paymentTerms' => PaymentTerm::remember(DEFAULT_QUERY_CACHE)->orderBy('num_days')->get(['name', 'num_days']), - 'industries' => Industry::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'invoiceDesigns' => InvoiceDesign::remember(DEFAULT_QUERY_CACHE, 'invoice_designs_cache_'.Auth::user()->maxInvoiceDesignId()) - ->where('id', '<=', Auth::user()->maxInvoiceDesignId())->orderBy('id')->get(), - 'frequencies' => array( - 1 => 'Weekly', - 2 => 'Two weeks', - 3 => 'Four weeks', - 4 => 'Monthly', - 5 => 'Three months', - 6 => 'Six months', - 7 => 'Annually', - ), - 'recurringHelp' => $recurringHelp - ]; - } - - /** - * Store a newly created resource in storage. - * - * @return Response - */ - public function store() - { - return InvoiceController::save(); - } - - private function save($publicId = null) - { - $action = Input::get('action'); - $entityType = Input::get('entityType'); - - if (in_array($action, ['archive', 'delete', 'mark', 'restore'])) { - return InvoiceController::bulk($entityType); - } - - $input = json_decode(Input::get('data')); - $invoice = $input->invoice; - - if ($errors = $this->invoiceRepo->getErrors($invoice)) { - Session::flash('error', trans('texts.invoice_error')); - - return Redirect::to("{$entityType}s/create") - ->withInput()->withErrors($errors); - } else { - $this->taxRateRepo->save($input->tax_rates); - - $clientData = (array) $invoice->client; - $client = $this->clientRepo->save($invoice->client->public_id, $clientData); - - $invoiceData = (array) $invoice; - $invoiceData['client_id'] = $client->id; - $invoice = $this->invoiceRepo->save($publicId, $invoiceData, $entityType); - - $account = Auth::user()->account; - if ($account->invoice_taxes != $input->invoice_taxes - || $account->invoice_item_taxes != $input->invoice_item_taxes - || $account->invoice_design_id != $input->invoice->invoice_design_id) { - $account->invoice_taxes = $input->invoice_taxes; - $account->invoice_item_taxes = $input->invoice_item_taxes; - $account->invoice_design_id = $input->invoice->invoice_design_id; - $account->save(); - } - - $client->load('contacts'); - $sendInvoiceIds = []; - - foreach ($client->contacts as $contact) { - if ($contact->send_invoice || count($client->contacts) == 1) { - $sendInvoiceIds[] = $contact->id; - } - } - - foreach ($client->contacts as $contact) { - $invitation = Invitation::scope()->whereContactId($contact->id)->whereInvoiceId($invoice->id)->first(); - - if (in_array($contact->id, $sendInvoiceIds) && !$invitation) { - $invitation = Invitation::createNew(); - $invitation->invoice_id = $invoice->id; - $invitation->contact_id = $contact->id; - $invitation->invitation_key = str_random(RANDOM_KEY_LENGTH); - $invitation->save(); - } elseif (!in_array($contact->id, $sendInvoiceIds) && $invitation) { - $invitation->delete(); - } - } - - $message = trans($publicId ? "texts.updated_{$entityType}" : "texts.created_{$entityType}"); - if ($input->invoice->client->public_id == '-1') { - $message = $message.' '.trans('texts.and_created_client'); - - $url = URL::to('clients/'.$client->public_id); - Utils::trackViewed($client->getDisplayName(), ENTITY_CLIENT, $url); - } - - if ($action == 'clone') { - return $this->cloneInvoice($publicId); - } elseif ($action == 'convert') { - return $this->convertQuote($publicId); - } elseif ($action == 'email') { - if (Auth::user()->confirmed && !Auth::user()->isDemo()) { - $message = trans("texts.emailed_{$entityType}"); - $this->mailer->sendInvoice($invoice); - Session::flash('message', $message); - } else { - $errorMessage = trans(Auth::user()->registered ? 'texts.confirmation_required' : 'texts.registration_required'); - Session::flash('error', $errorMessage); - Session::flash('message', $message); - } - } else { - Session::flash('message', $message); - } - - $url = "{$entityType}s/".$invoice->public_id.'/edit'; - - return Redirect::to($url); - } - } - - /** - * Display the specified resource. - * - * @param int $id - * @return Response - */ - public function show($publicId) - { - Session::reflash(); - - return Redirect::to('invoices/'.$publicId.'/edit'); - } - - /** - * Update the specified resource in storage. - * - * @param int $id - * @return Response - */ - public function update($publicId) - { - return InvoiceController::save($publicId); - } - - /** - * Remove the specified resource from storage. - * - * @param int $id - * @return Response - */ - public function bulk($entityType = ENTITY_INVOICE) - { - $action = Input::get('action'); - $statusId = Input::get('statusId', INVOICE_STATUS_SENT); - $ids = Input::get('id') ? Input::get('id') : Input::get('ids'); - $count = $this->invoiceRepo->bulk($ids, $action, $statusId); - - if ($count > 0) { - $key = $action == 'mark' ? "updated_{$entityType}" : "{$action}d_{$entityType}"; - $message = Utils::pluralize($key, $count); - Session::flash('message', $message); - } - - if ($action == 'restore' && $count == 1) { - return Redirect::to("{$entityType}s/".$ids[0]); - } else { - return Redirect::to("{$entityType}s"); - } - } - - public function convertQuote($publicId) - { - $invoice = Invoice::with('invoice_items')->scope($publicId)->firstOrFail(); - $clone = $this->invoiceRepo->cloneInvoice($invoice, $invoice->id); - - Session::flash('message', trans('texts.converted_to_invoice')); - return Redirect::to('invoices/'.$clone->public_id); - } - - public function cloneInvoice($publicId) - { - /* - $invoice = Invoice::with('invoice_items')->scope($publicId)->firstOrFail(); - $clone = $this->invoiceRepo->cloneInvoice($invoice); - $entityType = $invoice->getEntityType(); - - Session::flash('message', trans('texts.cloned_invoice')); - return Redirect::to("{$entityType}s/" . $clone->public_id); - */ - - return self::edit($publicId, true); - } - - public function invoiceHistory($publicId) - { - $invoice = Invoice::withTrashed()->scope($publicId)->firstOrFail(); - $invoice->load('user', 'invoice_items', 'account.country', 'client.contacts', 'client.country'); - $invoice->invoice_date = Utils::fromSqlDate($invoice->invoice_date); - $invoice->due_date = Utils::fromSqlDate($invoice->due_date); - $invoice->is_pro = Auth::user()->isPro(); - $invoice->is_quote = intval($invoice->is_quote); - - $activityTypeId = $invoice->is_quote ? ACTIVITY_TYPE_UPDATE_QUOTE : ACTIVITY_TYPE_UPDATE_INVOICE; - $activities = Activity::scope(false, $invoice->account_id) - ->where('activity_type_id', '=', $activityTypeId) - ->where('invoice_id', '=', $invoice->id) - ->orderBy('id', 'desc') - ->get(['id', 'created_at', 'user_id', 'json_backup', 'message']); - - $versionsJson = []; - $versionsSelect = []; - $lastId = false; - - foreach ($activities as $activity) { - $backup = json_decode($activity->json_backup); - $backup->invoice_date = Utils::fromSqlDate($backup->invoice_date); - $backup->due_date = Utils::fromSqlDate($backup->due_date); - $backup->is_pro = Auth::user()->isPro(); - $backup->is_quote = isset($backup->is_quote) && intval($backup->is_quote); - $backup->account = $invoice->account->toArray(); - - $versionsJson[$activity->id] = $backup; - $key = Utils::timestampToDateTimeString(strtotime($activity->created_at)) . ' - ' . Utils::decodeActivity($activity->message); - $versionsSelect[$lastId ? $lastId : 0] = $key; - $lastId = $activity->id; - } - - $versionsSelect[$lastId] = Utils::timestampToDateTimeString(strtotime($invoice->created_at)) . ' - ' . $invoice->user->getDisplayName(); - - $data = [ - 'invoice' => $invoice, - 'versionsJson' => json_encode($versionsJson), - 'versionsSelect' => $versionsSelect, - 'invoiceDesigns' => InvoiceDesign::remember(DEFAULT_QUERY_CACHE, 'invoice_designs_cache_'.Auth::user()->maxInvoiceDesignId())->where('id', '<=', Auth::user()->maxInvoiceDesignId())->orderBy('id')->get(), - ]; - - return View::make('invoices.history', $data); - } -} diff --git a/app/controllers/PaymentApiController.php b/app/controllers/PaymentApiController.php deleted file mode 100644 index 46db0d353d2b..000000000000 --- a/app/controllers/PaymentApiController.php +++ /dev/null @@ -1,36 +0,0 @@ -paymentRepo = $paymentRepo; - } - - public function index() - { - $payments = Payment::scope()->orderBy('created_at', 'desc')->get(); - $payments = Utils::remapPublicIds($payments->toArray()); - - $response = json_encode($payments, JSON_PRETTY_PRINT); - $headers = Utils::getApiHeaders(count($payments)); - - return Response::make($response, 200, $headers); - } - - /* - public function store() - { - $data = Input::all(); - $invoice = $this->invoiceRepo->save(false, $data, false); - - $response = json_encode($invoice, JSON_PRETTY_PRINT); - $headers = Utils::getApiHeaders(); - return Response::make($response, 200, $headers); - } - */ -} diff --git a/app/controllers/PaymentController.php b/app/controllers/PaymentController.php deleted file mode 100755 index c0241a8979fe..000000000000 --- a/app/controllers/PaymentController.php +++ /dev/null @@ -1,748 +0,0 @@ -paymentRepo = $paymentRepo; - $this->invoiceRepo = $invoiceRepo; - $this->accountRepo = $accountRepo; - $this->contactMailer = $contactMailer; - } - - public function index() - { - return View::make('list', array( - 'entityType' => ENTITY_PAYMENT, - 'title' => trans('texts.payments'), - 'columns' => Utils::trans(['checkbox', 'invoice', 'client', 'transaction_reference', 'method', 'payment_amount', 'payment_date', 'action']), - )); - } - - public function clientIndex() - { - $invitationKey = Session::get('invitation_key'); - if (!$invitationKey) { - return Redirect::to('/setup'); - } - - $invitation = Invitation::with('account')->where('invitation_key', '=', $invitationKey)->first(); - $color = $invitation->account->primary_color ? $invitation->account->primary_color : '#0b4d78'; - - $data = [ - 'color' => $color, - 'hideLogo' => Session::get('white_label'), - 'entityType' => ENTITY_PAYMENT, - 'title' => trans('texts.payments'), - 'columns' => Utils::trans(['invoice', 'transaction_reference', 'method', 'payment_amount', 'payment_date']) - ]; - - return View::make('public_list', $data); - } - - public function getDatatable($clientPublicId = null) - { - $payments = $this->paymentRepo->find($clientPublicId, Input::get('sSearch')); - $table = Datatable::query($payments); - - if (!$clientPublicId) { - $table->addColumn('checkbox', function ($model) { return ''; }); - } - - $table->addColumn('invoice_number', function ($model) { return $model->invoice_public_id ? link_to('invoices/'.$model->invoice_public_id.'/edit', $model->invoice_number, ['class' => Utils::getEntityRowClass($model)]) : ''; }); - - if (!$clientPublicId) { - $table->addColumn('client_name', function ($model) { return link_to('clients/'.$model->client_public_id, Utils::getClientDisplayName($model)); }); - } - - $table->addColumn('transaction_reference', function ($model) { return $model->transaction_reference ? $model->transaction_reference : 'Manual entry'; }) - ->addColumn('payment_type', function ($model) { return $model->payment_type ? $model->payment_type : ($model->account_gateway_id ? 'Online payment' : ''); }); - - return $table->addColumn('amount', function ($model) { return Utils::formatMoney($model->amount, $model->currency_id); }) - ->addColumn('payment_date', function ($model) { return Utils::dateToString($model->payment_date); }) - ->addColumn('dropdown', function ($model) { - if ($model->is_deleted || $model->invoice_is_deleted) { - return '
    '; - } - - $str = ''; - }) - ->make(); - } - - public function getClientDatatable() - { - $search = Input::get('sSearch'); - $invitationKey = Session::get('invitation_key'); - $invitation = Invitation::where('invitation_key', '=', $invitationKey)->with('contact.client')->first(); - - if (!$invitation) { - return []; - } - - $invoice = $invitation->invoice; - - if (!$invoice || $invoice->is_deleted) { - return []; - } - - $payments = $this->paymentRepo->findForContact($invitation->contact->id, Input::get('sSearch')); - - return Datatable::query($payments) - ->addColumn('invoice_number', function ($model) { return $model->invitation_key ? link_to('/view/'.$model->invitation_key, $model->invoice_number) : $model->invoice_number; }) - ->addColumn('transaction_reference', function ($model) { return $model->transaction_reference ? $model->transaction_reference : 'Manual entry'; }) - ->addColumn('payment_type', function ($model) { return $model->payment_type ? $model->payment_type : ($model->account_gateway_id ? 'Online payment' : ''); }) - ->addColumn('amount', function ($model) { return Utils::formatMoney($model->amount, $model->currency_id); }) - ->addColumn('payment_date', function ($model) { return Utils::dateToString($model->payment_date); }) - ->make(); - } - - public function create($clientPublicId = 0, $invoicePublicId = 0) - { - $data = array( - 'clientPublicId' => Input::old('client') ? Input::old('client') : $clientPublicId, - 'invoicePublicId' => Input::old('invoice') ? Input::old('invoice') : $invoicePublicId, - 'invoice' => null, - 'invoices' => Invoice::scope()->where('is_recurring', '=', false)->where('is_quote', '=', false) - ->with('client', 'invoice_status')->orderBy('invoice_number')->get(), - 'payment' => null, - 'method' => 'POST', - 'url' => "payments", - 'title' => trans('texts.new_payment'), - //'currencies' => Currency::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'paymentTypes' => PaymentType::remember(DEFAULT_QUERY_CACHE)->orderBy('id')->get(), - 'clients' => Client::scope()->with('contacts')->orderBy('name')->get(), ); - - return View::make('payments.edit', $data); - } - - public function edit($publicId) - { - $payment = Payment::scope($publicId)->firstOrFail(); - $payment->payment_date = Utils::fromSqlDate($payment->payment_date); - - $data = array( - 'client' => null, - 'invoice' => null, - 'invoices' => Invoice::scope()->where('is_recurring', '=', false)->where('is_quote', '=', false) - ->with('client', 'invoice_status')->orderBy('invoice_number')->get(), - 'payment' => $payment, - 'method' => 'PUT', - 'url' => 'payments/'.$publicId, - 'title' => trans('texts.edit_payment'), - //'currencies' => Currency::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'paymentTypes' => PaymentType::remember(DEFAULT_QUERY_CACHE)->orderBy('id')->get(), - 'clients' => Client::scope()->with('contacts')->orderBy('name')->get(), ); - - return View::make('payments.edit', $data); - } - - private function createGateway($accountGateway) - { - $gateway = Omnipay::create($accountGateway->gateway->provider); - $config = json_decode($accountGateway->config); - - /* - $gateway->setSolutionType("Sole"); - $gateway->setLandingPage("Billing"); - */ - - foreach ($config as $key => $val) { - if (!$val) { - continue; - } - - $function = "set".ucfirst($key); - $gateway->$function($val); - } - - if (Utils::isNinjaDev()) { - $gateway->setTestMode(true); - } - - return $gateway; - } - - private function getLicensePaymentDetails($input, $affiliate) - { - $data = self::convertInputForOmnipay($input); - $card = new CreditCard($data); - - return [ - 'amount' => $affiliate->price, - 'card' => $card, - 'currency' => 'USD', - 'returnUrl' => URL::to('license_complete'), - 'cancelUrl' => URL::to('/') - ]; - } - - private function convertInputForOmnipay($input) - { - return [ - 'firstName' => $input['first_name'], - 'lastName' => $input['last_name'], - 'number' => $input['card_number'], - 'expiryMonth' => $input['expiration_month'], - 'expiryYear' => $input['expiration_year'], - 'cvv' => $input['cvv'], - 'billingAddress1' => $input['address1'], - 'billingAddress2' => $input['address2'], - 'billingCity' => $input['city'], - 'billingState' => $input['state'], - 'billingPostcode' => $input['postal_code'], - 'shippingAddress1' => $input['address1'], - 'shippingAddress2' => $input['address2'], - 'shippingCity' => $input['city'], - 'shippingState' => $input['state'], - 'shippingPostcode' => $input['postal_code'] - ]; - } - - private function getPaymentDetails($invitation, $input = null) - { - $invoice = $invitation->invoice; - $key = $invoice->invoice_number.'_details'; - $gateway = $invoice->client->account->getGatewayByType(Session::get('payment_type'))->gateway; - $paymentLibrary = $gateway->paymentlibrary; - $currencyCode = $invoice->client->currency ? $invoice->client->currency->code : ($invoice->account->currency ? $invoice->account->currency->code : 'USD'); - - if ($input && $paymentLibrary->id == PAYMENT_LIBRARY_OMNIPAY) { - $data = self::convertInputForOmnipay($input); - - Session::put($key, $data); - } elseif ($input && $paymentLibrary->id == PAYMENT_LIBRARY_PHP_PAYMENTS) { - $input = Input::all(); - $data = [ - 'first_name' => $input['first_name'], - 'last_name' => $input['last_name'], - 'cc_number' => $input['card_number'], - 'cc_exp' => $input['expiration_month'].$input['expiration_year'], - 'cc_code' => $input['cvv'], - 'street' => $input['address1'], - 'street2' => $input['address2'], - 'city' => $input['city'], - 'state' => $input['state'], - 'postal_code' => $input['postal_code'], - 'amt' => $invoice->balance, - 'ship_to_street' => $input['address1'], - 'ship_to_city' => $input['city'], - 'ship_to_state' => $input['state'], - 'ship_to_postal_code' => $input['postal_code'], - 'currency_code' => $currencyCode, - ]; - - switch ($gateway->id) { - case GATEWAY_BEANSTREAM: - $data['phone'] = $input['phone']; - $data['email'] = $input['email']; - $data['country'] = $input['country']; - $data['ship_to_country'] = $input['country']; - break; - case GATEWAY_BRAINTREE: - $data['ship_to_state'] = 'Ohio'; //$input['state']; - break; - } - - if (strlen($data['cc_exp']) == 5) { - $data['cc_exp'] = '0'.$data['cc_exp']; - } - - Session::put($key, $data); - - return $data; - } elseif (Session::get($key)) { - $data = Session::get($key); - } else { - $data = []; - } - - if ($paymentLibrary->id == PAYMENT_LIBRARY_OMNIPAY) { - $card = new CreditCard($data); - - return [ - 'amount' => $invoice->balance, - 'card' => $card, - 'currency' => $currencyCode, - 'returnUrl' => URL::to('complete'), - 'cancelUrl' => $invitation->getLink(), - 'description' => trans('texts.' . $invoice->getEntityType()) . " {$invoice->invoice_number}", - ]; - } else { - return $data; - } - } - - public function show_payment($invitationKey) - { - // Handle token billing - if (Input::get('use_token') == 'true') { - return self::do_payment($invitationKey, false, true); - } - - if (Input::has('use_paypal')) { - Session::put('payment_type', Input::get('use_paypal') == 'true' ? PAYMENT_TYPE_PAYPAL : PAYMENT_TYPE_CREDIT_CARD); - } elseif (!Session::has('payment_type')) { - Session::put('payment_type', PAYMENT_TYPE_ANY); - } - - // For PayPal we redirect straight to their site - $usePayPal = false; - if ($usePayPal = Input::get('use_paypal')) { - $usePayPal = $usePayPal == 'true'; - } else { - $invitation = Invitation::with('invoice.client.account', 'invoice.client.account.account_gateways.gateway')->where('invitation_key', '=', $invitationKey)->firstOrFail(); - $account = $invitation->invoice->client->account; - if (count($account->account_gateways) == 1 && $account->getGatewayByType(PAYMENT_TYPE_PAYPAL)) { - $usePayPal = true; - } - } - if ($usePayPal) { - if (Session::has('error')) { - Session::reflash(); - return Redirect::to('view/'.$invitationKey); - } else { - return self::do_payment($invitationKey, false); - } - } - - $invitation = Invitation::with('invoice.invoice_items', 'invoice.client.currency', 'invoice.client.account.account_gateways.gateway')->where('invitation_key', '=', $invitationKey)->firstOrFail(); - $invoice = $invitation->invoice; - $client = $invoice->client; - $accountGateway = $invoice->client->account->getGatewayByType(Session::get('payment_type')); - $gateway = $invoice->client->account->getGatewayByType(Session::get('payment_type'))->gateway; - $paymentLibrary = $gateway->paymentlibrary; - $acceptedCreditCardTypes = $accountGateway->getCreditcardTypes(); - - $data = [ - 'showBreadcrumbs' => false, - 'url' => 'payment/'.$invitationKey, - 'amount' => $invoice->balance, - 'invoiceNumber' => $invoice->invoice_number, - 'client' => $client, - 'contact' => $invitation->contact, - 'paymentLibrary' => $paymentLibrary, - 'gateway' => $gateway, - 'acceptedCreditCardTypes' => $acceptedCreditCardTypes, - 'countries' => Country::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'currencyId' => $client->currency_id, - 'account' => $client->account - ]; - - return View::make('payments.payment', $data); - } - - public function show_license_payment() - { - if (Input::has('return_url')) { - Session::set('return_url', Input::get('return_url')); - } - - if (Input::has('affiliate_key')) { - if ($affiliate = Affiliate::where('affiliate_key', '=', Input::get('affiliate_key'))->first()) { - Session::set('affiliate_id', $affiliate->id); - } - } - - Session::set('product_id', Input::get('product_id', PRODUCT_ONE_CLICK_INSTALL)); - - if (!Session::get('affiliate_id')) { - return Utils::fatalError(); - } - - if (Utils::isNinjaDev() && Input::has('test_mode')) { - Session::set('test_mode', Input::get('test_mode')); - } - - $account = $this->accountRepo->getNinjaAccount(); - $account->load('account_gateways.gateway'); - $accountGateway = $account->getGatewayByType(Session::get('payment_type')); - $gateway = $accountGateway->gateway; - $paymentLibrary = $gateway->paymentlibrary; - $acceptedCreditCardTypes = $accountGateway->getCreditcardTypes(); - - $affiliate = Affiliate::find(Session::get('affiliate_id')); - - $data = [ - 'showBreadcrumbs' => false, - 'hideHeader' => true, - 'url' => 'license', - 'amount' => $affiliate->price, - 'client' => false, - 'contact' => false, - 'paymentLibrary' => $paymentLibrary, - 'gateway' => $gateway, - 'acceptedCreditCardTypes' => $acceptedCreditCardTypes, - 'countries' => Country::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'currencyId' => 1, - 'paymentTitle' => $affiliate->payment_title, - 'paymentSubtitle' => $affiliate->payment_subtitle, - ]; - - return View::make('payments.payment', $data); - } - - public function do_license_payment() - { - $testMode = Session::get('test_mode') === 'true'; - - $rules = array( - 'first_name' => 'required', - 'last_name' => 'required', - 'card_number' => 'required', - 'expiration_month' => 'required', - 'expiration_year' => 'required', - 'cvv' => 'required', - 'address1' => 'required', - 'city' => 'required', - 'state' => 'required', - 'postal_code' => 'required', - ); - - $validator = Validator::make(Input::all(), $rules); - - if ($validator->fails()) { - return Redirect::to('license') - ->withErrors($validator); - } - - $account = $this->accountRepo->getNinjaAccount(); - $account->load('account_gateways.gateway'); - $accountGateway = $account->getGatewayByType(PAYMENT_TYPE_CREDIT_CARD); - - try { - $affiliate = Affiliate::find(Session::get('affiliate_id')); - - if ($testMode) { - $ref = 'TEST_MODE'; - } else { - $gateway = self::createGateway($accountGateway); - $details = self::getLicensePaymentDetails(Input::all(), $affiliate); - $response = $gateway->purchase($details)->send(); - $ref = $response->getTransactionReference(); - - if (!$ref) { - Session::flash('error', $response->getMessage()); - - return Redirect::to('license')->withInput(); - } - - if (!$response->isSuccessful()) { - Session::flash('error', $response->getMessage()); - Utils::logError($response->getMessage()); - - return Redirect::to('license')->withInput(); - } - } - - $licenseKey = Utils::generateLicense(); - - $license = new License(); - $license->first_name = Input::get('first_name'); - $license->last_name = Input::get('last_name'); - $license->email = Input::get('email'); - $license->transaction_reference = $ref; - $license->license_key = $licenseKey; - $license->affiliate_id = Session::get('affiliate_id'); - $license->product_id = Session::get('product_id'); - $license->save(); - - $data = [ - 'message' => $affiliate->payment_subtitle, - 'license' => $licenseKey, - 'hideHeader' => true, - ]; - - $name = "{$license->first_name} {$license->last_name}"; - $this->contactMailer->sendLicensePaymentConfirmation($name, $license->email, $affiliate->price, $license->license_key, $license->product_id); - - if (Session::has('return_url')) { - return Redirect::away(Session::get('return_url')."?license_key={$license->license_key}&product_id=".Session::get('product_id')); - } else { - return View::make('public.license', $data); - } - } catch (\Exception $e) { - $errorMessage = trans('texts.payment_error'); - Session::flash('error', $errorMessage); - Utils::logError(Utils::getErrorString($e)); - - return Redirect::to('license')->withInput(); - } - } - - public function claim_license() - { - $licenseKey = Input::get('license_key'); - $productId = Input::get('product_id', PRODUCT_ONE_CLICK_INSTALL); - - $license = License::where('license_key', '=', $licenseKey) - ->where('is_claimed', '=', false) - ->where('product_id', '=', $productId) - ->first(); - - if ($license) { - if ($license->transaction_reference != 'TEST_MODE') { - $license->is_claimed = true; - $license->save(); - } - - return $productId == PRODUCT_INVOICE_DESIGNS ? $_ENV['INVOICE_DESIGNS'] : 'valid'; - } else { - return 'invalid'; - } - } - - public function do_payment($invitationKey, $onSite = true, $useToken = false) - { - $rules = array( - 'first_name' => 'required', - 'last_name' => 'required', - 'card_number' => 'required', - 'expiration_month' => 'required', - 'expiration_year' => 'required', - 'cvv' => 'required', - 'address1' => 'required', - 'city' => 'required', - 'state' => 'required', - 'postal_code' => 'required', - ); - - if ($onSite) { - $validator = Validator::make(Input::all(), $rules); - - if ($validator->fails()) { - return Redirect::to('payment/'.$invitationKey) - ->withErrors($validator); - } - } - - $invitation = Invitation::with('invoice.invoice_items', 'invoice.client.currency', 'invoice.client.account.account_gateways.gateway')->where('invitation_key', '=', $invitationKey)->firstOrFail(); - $invoice = $invitation->invoice; - $client = $invoice->client; - $account = $client->account; - $accountGateway = $account->getGatewayByType(Session::get('payment_type')); - $paymentLibrary = $accountGateway->gateway->paymentlibrary; - - if ($onSite) { - $client->address1 = trim(Input::get('address1')); - $client->address2 = trim(Input::get('address2')); - $client->city = trim(Input::get('city')); - $client->state = trim(Input::get('state')); - $client->postal_code = trim(Input::get('postal_code')); - $client->save(); - } - - try { - if ($paymentLibrary->id == PAYMENT_LIBRARY_OMNIPAY) { - $gateway = self::createGateway($accountGateway); - $details = self::getPaymentDetails($invitation, $useToken || !$onSite ? false : Input::all()); - - if ($accountGateway->gateway_id == GATEWAY_STRIPE) { - if ($useToken) { - $details['cardReference'] = $client->getGatewayToken(); - } elseif ($account->token_billing_type_id == TOKEN_BILLING_ALWAYS || Input::get('token_billing')) { - $tokenResponse = $gateway->createCard($details)->send(); - $cardReference = $tokenResponse->getCardReference(); - $details['cardReference'] = $cardReference; - - $token = AccountGatewayToken::where('client_id', '=', $client->id) - ->where('account_gateway_id', '=', $accountGateway->id)->first(); - - if (!$token) { - $token = new AccountGatewayToken(); - $token->account_id = $account->id; - $token->contact_id = $invitation->contact_id; - $token->account_gateway_id = $accountGateway->id; - $token->client_id = $client->id; - } - - $token->token = $cardReference; - $token->save(); - } - } - - $response = $gateway->purchase($details)->send(); - $ref = $response->getTransactionReference(); - - if (!$ref) { - - Session::flash('error', $response->getMessage()); - - if ($onSite) { - return Redirect::to('payment/'.$invitationKey)->withInput(); - } else { - return Redirect::to('view/'.$invitationKey); - } - } - - if ($response->isSuccessful()) { - $payment = self::createPayment($invitation, $ref); - Session::flash('message', trans('texts.applied_payment')); - - return Redirect::to('view/'.$payment->invitation->invitation_key); - } elseif ($response->isRedirect()) { - $invitation->transaction_reference = $ref; - $invitation->save(); - - Session::save(); - $response->redirect(); - } else { - Session::flash('error', $response->getMessage()); - - return Utils::fatalError('Sorry, there was an error processing your payment. Please try again later.

    ', $response->getMessage()); - } - } - } catch (\Exception $e) { - $errorMessage = trans('texts.payment_error'); - Session::flash('error', $errorMessage."

    ".$e->getMessage()); - Utils::logError(Utils::getErrorString($e)); - - if ($onSite) { - return Redirect::to('payment/'.$invitationKey)->withInput(); - } else { - return Redirect::to('view/'.$invitationKey); - } - } - } - - private function createPayment($invitation, $ref, $payerId = null) - { - $invoice = $invitation->invoice; - $accountGateway = $invoice->client->account->getGatewayByType(Session::get('payment_type')); - - if ($invoice->account->account_key == NINJA_ACCOUNT_KEY) { - $account = Account::find($invoice->client->public_id); - $account->pro_plan_paid = date_create()->format('Y-m-d'); - $account->save(); - } - - $payment = Payment::createNew($invitation); - $payment->invitation_id = $invitation->id; - $payment->account_gateway_id = $accountGateway->id; - $payment->invoice_id = $invoice->id; - $payment->amount = $invoice->balance; - $payment->client_id = $invoice->client_id; - $payment->contact_id = $invitation->contact_id; - $payment->transaction_reference = $ref; - $payment->payment_date = date_create()->format('Y-m-d'); - - if ($payerId) { - $payment->payer_id = $payerId; - } - - $payment->save(); - - Event::fire('invoice.paid', $payment); - - return $payment; - } - - public function offsite_payment() - { - $payerId = Request::query('PayerID'); - $token = Request::query('token'); - - $invitation = Invitation::with('invoice.client.currency', 'invoice.client.account.account_gateways.gateway')->where('transaction_reference', '=', $token)->firstOrFail(); - $invoice = $invitation->invoice; - - $accountGateway = $invoice->client->account->getGatewayByType(Session::get('payment_type')); - $gateway = self::createGateway($accountGateway); - - try { - $details = self::getPaymentDetails($invitation); - $response = $gateway->completePurchase($details)->send(); - $ref = $response->getTransactionReference(); - - if ($response->isSuccessful()) { - $payment = self::createPayment($invitation, $ref, $payerId); - - Session::flash('message', trans('texts.applied_payment')); - - return Redirect::to('view/'.$invitation->invitation_key); - } else { - $errorMessage = trans('texts.payment_error')."\n\n".$response->getMessage(); - Session::flash('error', $errorMessage); - Utils::logError($errorMessage); - - return Redirect::to('view/'.$invitation->invitation_key); - } - } catch (\Exception $e) { - $errorMessage = trans('texts.payment_error'); - Session::flash('error', $errorMessage); - Utils::logError($errorMessage."\n\n".$e->getMessage()); - - return Redirect::to('view/'.$invitation->invitation_key); - } - } - - public function store() - { - return $this->save(); - } - - public function update($publicId) - { - return $this->save($publicId); - } - - private function save($publicId = null) - { - if (!$publicId && $errors = $this->paymentRepo->getErrors(Input::all())) { - $url = $publicId ? 'payments/'.$publicId.'/edit' : 'payments/create'; - - return Redirect::to($url) - ->withErrors($errors) - ->withInput(); - } else { - $this->paymentRepo->save($publicId, Input::all()); - - if ($publicId) { - Session::flash('message', trans('texts.updated_payment')); - - return Redirect::to('payments/'); - } else { - Session::flash('message', trans('texts.created_payment')); - - return Redirect::to('clients/'.Input::get('client')); - } - } - } - - public function bulk() - { - $action = Input::get('action'); - $ids = Input::get('id') ? Input::get('id') : Input::get('ids'); - $count = $this->paymentRepo->bulk($ids, $action); - - if ($count > 0) { - $message = Utils::pluralize($action.'d_payment', $count); - Session::flash('message', $message); - } - - return Redirect::to('payments'); - } -} diff --git a/app/controllers/ProductController.php b/app/controllers/ProductController.php deleted file mode 100644 index 5be7ab1339fa..000000000000 --- a/app/controllers/ProductController.php +++ /dev/null @@ -1,96 +0,0 @@ -where('products.account_id', '=', Auth::user()->account_id) - ->where('products.deleted_at', '=', null) - ->select('products.public_id', 'products.product_key', 'products.notes', 'products.cost'); - - return Datatable::query($query) - ->addColumn('product_key', function ($model) { return link_to('products/'.$model->public_id.'/edit', $model->product_key); }) - ->addColumn('notes', function ($model) { return nl2br(Str::limit($model->notes, 100)); }) - ->addColumn('cost', function ($model) { return Utils::formatMoney($model->cost); }) - ->addColumn('dropdown', function ($model) { - return '

    '; - }) - ->orderColumns(['cost', 'product_key', 'cost']) - ->make(); - } - - public function edit($publicId) - { - $data = [ - 'showBreadcrumbs' => false, - 'product' => Product::scope($publicId)->firstOrFail(), - 'method' => 'PUT', - 'url' => 'products/'.$publicId, - 'title' => trans('texts.edit_product'), - ]; - - return View::make('accounts.product', $data); - } - - public function create() - { - $data = [ - 'showBreadcrumbs' => false, - 'product' => null, - 'method' => 'POST', - 'url' => 'products', - 'title' => trans('texts.create_product'), - ]; - - return View::make('accounts.product', $data); - } - - public function store() - { - return $this->save(); - } - - public function update($publicId) - { - return $this->save($publicId); - } - - private function save($productPublicId = false) - { - if ($productPublicId) { - $product = Product::scope($productPublicId)->firstOrFail(); - } else { - $product = Product::createNew(); - } - - $product->product_key = trim(Input::get('product_key')); - $product->notes = trim(Input::get('notes')); - $product->cost = trim(Input::get('cost')); - $product->save(); - - $message = $productPublicId ? trans('texts.updated_product') : trans('texts.created_product'); - Session::flash('message', $message); - - return Redirect::to('company/products'); - } - - public function archive($publicId) - { - $product = Product::scope($publicId)->firstOrFail(); - $product->delete(); - - Session::flash('message', trans('texts.archived_product')); - - return Redirect::to('company/products'); - } -} diff --git a/app/controllers/QuoteApiController.php b/app/controllers/QuoteApiController.php deleted file mode 100644 index 713f92997cb6..000000000000 --- a/app/controllers/QuoteApiController.php +++ /dev/null @@ -1,36 +0,0 @@ -invoiceRepo = $invoiceRepo; - } - - public function index() - { - $invoices = Invoice::scope()->where('invoices.is_quote', '=', true)->orderBy('created_at', 'desc')->get(); - $invoices = Utils::remapPublicIds($invoices->toArray()); - - $response = json_encode($invoices, JSON_PRETTY_PRINT); - $headers = Utils::getApiHeaders(count($invoices)); - - return Response::make($response, 200, $headers); - } - - /* - public function store() - { - $data = Input::all(); - $invoice = $this->invoiceRepo->save(false, $data, false); - - $response = json_encode($invoice, JSON_PRETTY_PRINT); - $headers = Utils::getApiHeaders(); - return Response::make($response, 200, $headers); - } - */ -} diff --git a/app/controllers/QuoteController.php b/app/controllers/QuoteController.php deleted file mode 100644 index 199d6b1130a9..000000000000 --- a/app/controllers/QuoteController.php +++ /dev/null @@ -1,187 +0,0 @@ -mailer = $mailer; - $this->invoiceRepo = $invoiceRepo; - $this->clientRepo = $clientRepo; - $this->taxRateRepo = $taxRateRepo; - } - - public function index() - { - if (!Utils::isPro()) { - return Redirect::to('/invoices/create'); - } - - $data = [ - 'title' => trans('texts.quotes'), - 'entityType' => ENTITY_QUOTE, - 'columns' => Utils::trans(['checkbox', 'quote_number', 'client', 'quote_date', 'quote_total', 'due_date', 'status', 'action']), - ]; - - /* - if (Invoice::scope()->where('is_recurring', '=', true)->count() > 0) - { - $data['secEntityType'] = ENTITY_RECURRING_INVOICE; - $data['secColumns'] = Utils::trans(['checkbox', 'frequency', 'client', 'start_date', 'end_date', 'quote_total', 'action']); - } - */ - - return View::make('list', $data); - } - - public function clientIndex() - { - $invitationKey = Session::get('invitation_key'); - if (!$invitationKey) { - return Redirect::to('/setup'); - } - - $invitation = Invitation::with('account')->where('invitation_key', '=', $invitationKey)->first(); - $color = $invitation->account->primary_color ? $invitation->account->primary_color : '#0b4d78'; - - $data = [ - 'color' => $color, - 'hideLogo' => Session::get('white_label'), - 'title' => trans('texts.quotes'), - 'entityType' => ENTITY_QUOTE, - 'columns' => Utils::trans(['quote_number', 'quote_date', 'quote_total', 'due_date']), - ]; - - return View::make('public_list', $data); - } - - public function getDatatable($clientPublicId = null) - { - $accountId = Auth::user()->account_id; - $search = Input::get('sSearch'); - - return $this->invoiceRepo->getDatatable($accountId, $clientPublicId, ENTITY_QUOTE, $search); - } - - public function getClientDatatable() - { - $search = Input::get('sSearch'); - $invitationKey = Session::get('invitation_key'); - $invitation = Invitation::where('invitation_key', '=', $invitationKey)->first(); - - if (!$invitation || $invitation->is_deleted) { - return []; - } - - $invoice = $invitation->invoice; - - if (!$invoice || $invoice->is_deleted) { - return []; - } - - return $this->invoiceRepo->getClientDatatable($invitation->contact_id, ENTITY_QUOTE, $search); - } - - public function create($clientPublicId = 0) - { - if (!Utils::isPro()) { - return Redirect::to('/invoices/create'); - } - - $client = null; - $invoiceNumber = Auth::user()->account->getNextInvoiceNumber(true); - $account = Account::with('country')->findOrFail(Auth::user()->account_id); - - if ($clientPublicId) { - $client = Client::scope($clientPublicId)->firstOrFail(); - } - - $data = array( - 'account' => $account, - 'invoice' => null, - 'data' => Input::old('data'), - 'invoiceNumber' => $invoiceNumber, - 'method' => 'POST', - 'url' => 'invoices', - 'title' => trans('texts.new_quote'), - 'client' => $client, ); - $data = array_merge($data, self::getViewModel()); - - return View::make('invoices.edit', $data); - } - - private static function getViewModel() - { - return [ - 'entityType' => ENTITY_QUOTE, - 'account' => Auth::user()->account, - 'products' => Product::scope()->orderBy('id')->get(array('product_key', 'notes', 'cost', 'qty')), - 'countries' => Country::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'clients' => Client::scope()->with('contacts', 'country')->orderBy('name')->get(), - 'taxRates' => TaxRate::scope()->orderBy('name')->get(), - 'currencies' => Currency::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'sizes' => Size::remember(DEFAULT_QUERY_CACHE)->orderBy('id')->get(), - 'paymentTerms' => PaymentTerm::remember(DEFAULT_QUERY_CACHE)->orderBy('num_days')->get(['name', 'num_days']), - 'industries' => Industry::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'invoiceDesigns' => InvoiceDesign::remember(DEFAULT_QUERY_CACHE, 'invoice_designs_cache_'.Auth::user()->maxInvoiceDesignId()) - ->where('id', '<=', Auth::user()->maxInvoiceDesignId())->orderBy('id')->get(), - 'invoiceLabels' => Auth::user()->account->getInvoiceLabels() - ]; - } - - public function bulk() - { - $action = Input::get('action'); - - if ($action == 'convert') { - $invoice = Invoice::with('invoice_items')->scope(Input::get('id'))->firstOrFail(); - $clone = $this->invoiceRepo->cloneInvoice($invoice, $invoice->id); - - Session::flash('message', trans('texts.converted_to_invoice')); - return Redirect::to('invoices/'.$clone->public_id); - } - - $statusId = Input::get('statusId'); - $ids = Input::get('id') ? Input::get('id') : Input::get('ids'); - $count = $this->invoiceRepo->bulk($ids, $action, $statusId); - - if ($count > 0) { - $key = $action == 'mark' ? "updated_quote" : "{$action}d_quote"; - $message = Utils::pluralize($key, $count); - Session::flash('message', $message); - } - - return Redirect::to('quotes'); - } - - public function approve($invitationKey) - { - $invitation = Invitation::with('invoice.invoice_items', 'invoice.invitations')->where('invitation_key', '=', $invitationKey)->firstOrFail(); - $invoice = $invitation->invoice; - - if ($invoice->is_quote && !$invoice->quote_invoice_id) { - Activity::approveQuote($invitation); - $invoice = $this->invoiceRepo->cloneInvoice($invoice, $invoice->id); - Session::flash('message', trans('texts.converted_to_invoice')); - - foreach ($invoice->invitations as $invitationClone) { - if ($invitation->contact_id == $invitationClone->contact_id) { - $invitationKey = $invitationClone->invitation_key; - } - } - } - - return Redirect::to("view/{$invitationKey}"); - } -} diff --git a/app/controllers/ReportController.php b/app/controllers/ReportController.php deleted file mode 100755 index 9000b8165444..000000000000 --- a/app/controllers/ReportController.php +++ /dev/null @@ -1,127 +0,0 @@ -account->isPro()) { - $account = Account::where('id', '=', Auth::user()->account->id)->with(['clients.invoices.invoice_items', 'clients.contacts'])->first(); - $account = $account->hideFieldsForViz(); - $clients = $account->clients->toJson(); - } elseif (isset($_ENV['DATA_VIZ_SAMPLE'])) { - $clients = $_ENV['DATA_VIZ_SAMPLE']; - $message = trans('texts.sample_data'); - } else { - $clients = '[]'; - } - - $data = [ - 'feature' => ACCOUNT_DATA_VISUALIZATIONS, - 'clients' => $clients, - 'message' => $message, - ]; - - return View::make('reports.d3', $data); - } - - public function report() - { - if (Input::all()) { - $groupBy = Input::get('group_by'); - $chartType = Input::get('chart_type'); - $startDate = Utils::toSqlDate(Input::get('start_date'), false); - $endDate = Utils::toSqlDate(Input::get('end_date'), false); - } else { - $groupBy = 'MONTH'; - $chartType = 'Bar'; - $startDate = Utils::today(false)->modify('-3 month'); - $endDate = Utils::today(false); - } - - $padding = $groupBy == 'DAYOFYEAR' ? 'day' : ($groupBy == 'WEEK' ? 'week' : 'month'); - $endDate->modify('+1 '.$padding); - $datasets = []; - $labels = []; - $maxTotals = 0; - $width = 10; - - if (Auth::user()->account->isPro()) { - foreach ([ENTITY_INVOICE, ENTITY_PAYMENT, ENTITY_CREDIT] as $entityType) { - $records = DB::table($entityType.'s') - ->select(DB::raw('sum(amount) as total, '.$groupBy.'('.$entityType.'_date) as '.$groupBy)) - ->where('account_id', '=', Auth::user()->account_id) - ->where($entityType.'s.is_deleted', '=', false) - ->where($entityType.'s.'.$entityType.'_date', '>=', $startDate->format('Y-m-d')) - ->where($entityType.'s.'.$entityType.'_date', '<=', $endDate->format('Y-m-d')) - ->groupBy($groupBy); - - if ($entityType == ENTITY_INVOICE) { - $records->where('is_quote', '=', false) - ->where('is_recurring', '=', false); - } - - $totals = $records->lists('total'); - $dates = $records->lists($groupBy); - $data = array_combine($dates, $totals); - - $interval = new DateInterval('P1'.substr($groupBy, 0, 1)); - $period = new DatePeriod($startDate, $interval, $endDate); - - $totals = []; - - foreach ($period as $d) { - $dateFormat = $groupBy == 'DAYOFYEAR' ? 'z' : ($groupBy == 'WEEK' ? 'W' : 'n'); - $date = $d->format($dateFormat); - $totals[] = isset($data[$date]) ? $data[$date] : 0; - - if ($entityType == ENTITY_INVOICE) { - $labelFormat = $groupBy == 'DAYOFYEAR' ? 'j' : ($groupBy == 'WEEK' ? 'W' : 'F'); - $label = $d->format($labelFormat); - $labels[] = $label; - } - } - - $max = max($totals); - - if ($max > 0) { - $datasets[] = [ - 'totals' => $totals, - 'colors' => $entityType == ENTITY_INVOICE ? '78,205,196' : ($entityType == ENTITY_CREDIT ? '199,244,100' : '255,107,107'), - ]; - $maxTotals = max($max, $maxTotals); - } - } - - $width = (ceil($maxTotals / 100) * 100) / 10; - $width = max($width, 10); - } - - $dateTypes = [ - 'DAYOFYEAR' => 'Daily', - 'WEEK' => 'Weekly', - 'MONTH' => 'Monthly', - ]; - - $chartTypes = [ - 'Bar' => 'Bar', - 'Line' => 'Line', - ]; - - $params = [ - 'labels' => $labels, - 'datasets' => $datasets, - 'scaleStepWidth' => $width, - 'dateTypes' => $dateTypes, - 'chartTypes' => $chartTypes, - 'chartType' => $chartType, - 'startDate' => $startDate->format(Session::get(SESSION_DATE_FORMAT)), - 'endDate' => $endDate->modify('-1'.$padding)->format(Session::get(SESSION_DATE_FORMAT)), - 'groupBy' => $groupBy, - 'feature' => ACCOUNT_CHART_BUILDER, - ]; - - return View::make('reports.report_builder', $params); - } -} diff --git a/app/controllers/TimesheetController.php b/app/controllers/TimesheetController.php deleted file mode 100644 index afc6982a5d5e..000000000000 --- a/app/controllers/TimesheetController.php +++ /dev/null @@ -1,93 +0,0 @@ - false, - 'timesheet' => [ - 'timesheet_number' => 1 - ] - ]; - - return View::make('timesheets.edit', $data); - } - - - /** - * Show the form for creating a new resource. - * - * @return Response - */ - public function create() - { - // - } - - - /** - * Store a newly created resource in storage. - * - * @return Response - */ - public function store() - { - // - } - - - /** - * Display the specified resource. - * - * @param int $id - * @return Response - */ - public function show($id) - { - // - } - - - /** - * Show the form for editing the specified resource. - * - * @param int $id - * @return Response - */ - public function edit($id) - { - // - } - - - /** - * Update the specified resource in storage. - * - * @param int $id - * @return Response - */ - public function update($id) - { - // - } - - - /** - * Remove the specified resource from storage. - * - * @param int $id - * @return Response - */ - public function destroy($id) - { - // - } - - -} diff --git a/app/controllers/TokenController.php b/app/controllers/TokenController.php deleted file mode 100755 index ba7924d49479..000000000000 --- a/app/controllers/TokenController.php +++ /dev/null @@ -1,161 +0,0 @@ -where('account_tokens.account_id', '=', Auth::user()->account_id); - - if (!Session::get('show_trash:token')) { - $query->where('account_tokens.deleted_at', '=', null); - } - - $query->select('account_tokens.public_id', 'account_tokens.name', 'account_tokens.token', 'account_tokens.public_id', 'account_tokens.deleted_at'); - - return Datatable::query($query) - ->addColumn('name', function ($model) { return link_to('tokens/'.$model->public_id.'/edit', $model->name); }) - ->addColumn('token', function ($model) { return $model->token; }) - ->addColumn('dropdown', function ($model) { - $actions = ''; - - return $actions; - }) - ->orderColumns(['name', 'token']) - ->make(); - } - - public function edit($publicId) - { - $token = AccountToken::where('account_id', '=', Auth::user()->account_id) - ->where('public_id', '=', $publicId)->firstOrFail(); - - $data = [ - 'showBreadcrumbs' => false, - 'token' => $token, - 'method' => 'PUT', - 'url' => 'tokens/'.$publicId, - 'title' => trans('texts.edit_token'), - ]; - - return View::make('accounts.token', $data); - } - - public function update($publicId) - { - return $this->save($publicId); - } - - public function store() - { - return $this->save(); - } - - /** - * Displays the form for account creation - * - */ - public function create() - { - if (!Auth::user()->confirmed) { - Session::flash('error', trans('texts.register_to_add_user')); - return Redirect::to('company/advanced_settings/user_management'); - } - - $data = [ - 'showBreadcrumbs' => false, - 'token' => null, - 'method' => 'POST', - 'url' => 'tokens', - 'title' => trans('texts.add_token'), - ]; - - return View::make('accounts.token', $data); - } - - public function delete() - { - $tokenPublicId = Input::get('tokenPublicId'); - $token = AccountToken::where('account_id', '=', Auth::user()->account_id) - ->where('public_id', '=', $tokenPublicId)->firstOrFail(); - - $token->delete(); - - Session::flash('message', trans('texts.deleted_token')); - - return Redirect::to('company/advanced_settings/token_management'); - } - - /** - * Stores new account - * - */ - public function save($tokenPublicId = false) - { - if (Auth::user()->account->isPro()) { - $rules = [ - 'name' => 'required', - ]; - - if ($tokenPublicId) { - $token = AccountToken::where('account_id', '=', Auth::user()->account_id) - ->where('public_id', '=', $tokenPublicId)->firstOrFail(); - } - - $validator = Validator::make(Input::all(), $rules); - - if ($validator->fails()) { - return Redirect::to($tokenPublicId ? 'tokens/edit' : 'tokens/create')->withInput()->withErrors($validator); - } - - if ($tokenPublicId) { - $token->name = trim(Input::get('name')); - } else { - $lastToken = AccountToken::withTrashed()->where('account_id', '=', Auth::user()->account_id) - ->orderBy('public_id', 'DESC')->first(); - - $token = AccountToken::createNew(); - $token->name = trim(Input::get('name')); - $token->token = str_random(RANDOM_KEY_LENGTH); - $token->public_id = $lastToken ? $lastToken->public_id + 1 : 1; - } - - $token->save(); - - if ($tokenPublicId) { - $message = trans('texts.updated_token'); - } else { - $message = trans('texts.created_token'); - } - - Session::flash('message', $message); - } - - return Redirect::to('company/advanced_settings/token_management'); - } - -} diff --git a/app/controllers/UserController.php b/app/controllers/UserController.php deleted file mode 100755 index 85fff4f86da3..000000000000 --- a/app/controllers/UserController.php +++ /dev/null @@ -1,507 +0,0 @@ -accountRepo = $accountRepo; - $this->contactMailer = $contactMailer; - $this->userMailer = $userMailer; - } - - public function getDatatable() - { - $query = DB::table('users') - ->where('users.account_id', '=', Auth::user()->account_id); - - if (!Session::get('show_trash:user')) { - $query->where('users.deleted_at', '=', null); - } - - $query->where('users.public_id', '>', 0) - ->select('users.public_id', 'users.first_name', 'users.last_name', 'users.email', 'users.confirmed', 'users.public_id', 'users.deleted_at'); - - return Datatable::query($query) - ->addColumn('first_name', function ($model) { return link_to('users/'.$model->public_id.'/edit', $model->first_name.' '.$model->last_name); }) - ->addColumn('email', function ($model) { return $model->email; }) - ->addColumn('confirmed', function ($model) { return $model->deleted_at ? trans('texts.deleted') : ($model->confirmed ? trans('texts.active') : trans('texts.pending')); }) - ->addColumn('dropdown', function ($model) { - $actions = ''; - - return $actions; - }) - ->orderColumns(['first_name', 'email', 'confirmed']) - ->make(); - } - - public function setTheme() - { - $user = User::find(Auth::user()->id); - $user->theme_id = Input::get('theme_id'); - $user->save(); - - return Redirect::to(Input::get('path')); - } - - public function forcePDFJS() - { - $user = Auth::user(); - $user->force_pdfjs = true; - $user->save(); - - Session::flash('message', trans('texts.confide.updated_settings')); - - return Redirect::to('/dashboard'); - } - - public function edit($publicId) - { - $user = User::where('account_id', '=', Auth::user()->account_id) - ->where('public_id', '=', $publicId)->firstOrFail(); - - $data = [ - 'showBreadcrumbs' => false, - 'user' => $user, - 'method' => 'PUT', - 'url' => 'users/'.$publicId, - 'title' => trans('texts.edit_user'), - ]; - - return View::make('users.edit', $data); - } - - public function update($publicId) - { - return $this->save($publicId); - } - - public function store() - { - return $this->save(); - } - - /** - * Displays the form for account creation - * - */ - public function create() - { - if (!Auth::user()->confirmed) { - Session::flash('error', trans('texts.register_to_add_user')); - - return Redirect::to('company/advanced_settings/user_management'); - } - - if (Utils::isNinja()) { - $count = User::where('account_id', '=', Auth::user()->account_id)->count(); - if ($count >= MAX_NUM_USERS) { - Session::flash('error', trans('texts.limit_users')); - - return Redirect::to('company/advanced_settings/user_management'); - } - } - - $data = [ - 'showBreadcrumbs' => false, - 'user' => null, - 'method' => 'POST', - 'url' => 'users', - 'title' => trans('texts.add_user'), - ]; - - return View::make('users.edit', $data); - } - - public function delete() - { - $userPublicId = Input::get('userPublicId'); - $user = User::where('account_id', '=', Auth::user()->account_id) - ->where('public_id', '=', $userPublicId)->firstOrFail(); - - $user->delete(); - - Session::flash('message', trans('texts.deleted_user')); - - return Redirect::to('company/advanced_settings/user_management'); - } - - public function restoreUser($userPublicId) - { - $user = User::where('account_id', '=', Auth::user()->account_id) - ->where('public_id', '=', $userPublicId) - ->withTrashed()->firstOrFail(); - - $user->restore(); - - Session::flash('message', trans('texts.restored_user')); - - return Redirect::to('company/advanced_settings/user_management'); - } - - /** - * Stores new account - * - */ - public function save($userPublicId = false) - { - if (Auth::user()->account->isPro()) { - $rules = [ - 'first_name' => 'required', - 'last_name' => 'required', - ]; - - if ($userPublicId) { - $user = User::where('account_id', '=', Auth::user()->account_id) - ->where('public_id', '=', $userPublicId)->firstOrFail(); - - $rules['email'] = 'required|email|unique:users,email,'.$user->id.',id'; - } else { - $rules['email'] = 'required|email|unique:users'; - } - - $validator = Validator::make(Input::all(), $rules); - - if ($validator->fails()) { - return Redirect::to($userPublicId ? 'users/edit' : 'users/create')->withInput()->withErrors($validator); - } - - if ($userPublicId) { - $user->first_name = trim(Input::get('first_name')); - $user->last_name = trim(Input::get('last_name')); - $user->username = trim(Input::get('email')); - $user->email = trim(Input::get('email')); - } else { - $lastUser = User::withTrashed()->where('account_id', '=', Auth::user()->account_id) - ->orderBy('public_id', 'DESC')->first(); - - $user = new User(); - $user->account_id = Auth::user()->account_id; - $user->first_name = trim(Input::get('first_name')); - $user->last_name = trim(Input::get('last_name')); - $user->username = trim(Input::get('email')); - $user->email = trim(Input::get('email')); - $user->registered = true; - $user->password = str_random(RANDOM_KEY_LENGTH); - $user->password_confirmation = $user->password; - $user->public_id = $lastUser->public_id + 1; - } - - $user->save(); - - if (!$user->confirmed) { - $this->userMailer->sendConfirmation($user, Auth::user()); - $message = trans('texts.sent_invite'); - } else { - $message = trans('texts.updated_user'); - } - - Session::flash('message', $message); - } - - return Redirect::to('company/advanced_settings/user_management'); - } - - public function sendConfirmation($userPublicId) - { - $user = User::where('account_id', '=', Auth::user()->account_id) - ->where('public_id', '=', $userPublicId)->firstOrFail(); - - $this->userMailer->sendConfirmation($user, Auth::user()); - Session::flash('message', trans('texts.sent_invite')); - - return Redirect::to('company/advanced_settings/user_management'); - } - - /** - * Displays the login form - * - */ - public function login() - { - if (Confide::user()) { - Event::fire('user.login'); - Session::reflash(); - - return Redirect::to('/dashboard'); - - /* - $invoice = Invoice::scope()->orderBy('id', 'desc')->first(); - - if ($invoice) - { - return Redirect::to('/invoices/' . $invoice->public_id); - } - else - { - return Redirect::to('/dashboard'); - } - */ - } else { - return View::make(Config::get('confide::login_form')); - } - } - - /** - * Attempt to do login - * - */ - public function do_login() - { - $input = array( - 'email' => Input::get('login_email'), // May be the username too - 'username' => Input::get('login_email'), // so we have to pass both - 'password' => Input::get('login_password'), - 'remember' => true, - ); - - // If you wish to only allow login from confirmed users, call logAttempt - // with the second parameter as true. - // logAttempt will check if the 'email' perhaps is the username. - // Get the value from the config file instead of changing the controller - if (Input::get('login_email') && Confide::logAttempt($input, false)) { - Event::fire('user.login'); - // Redirect the user to the URL they were trying to access before - // caught by the authentication filter IE Redirect::guest('user/login'). - // Otherwise fallback to '/' - // Fix pull #145 - return Redirect::intended('/dashboard'); // change it to '/admin', '/dashboard' or something - } else { - //$user = new User; - - // Check if there was too many login attempts - if (Confide::isThrottled($input)) { - $err_msg = trans('texts.confide.too_many_attempts'); - } - /* - elseif( $user->checkUserExists( $input ) and ! $user->isConfirmed( $input ) ) - { - $err_msg = Lang::get('confide::confide.alerts.not_confirmed'); - } - */ - else { - $err_msg = trans('texts.confide.wrong_credentials'); - } - - return Redirect::action('UserController@login') - ->withInput(Input::except('login_password')) - ->with('error', $err_msg); - } - } - - /** - * Attempt to confirm account with code - * - * @param string $code - */ - public function confirm($code) - { - if (Confide::confirm($code)) { - $notice_msg = trans('texts.confide.confirmation'); - - $user = User::where('confirmation_code', '=', $code)->get()->first(); - $user->confirmation_code = ''; - $user->save(); - - if ($user->public_id) { - Auth::login($user); - - return Redirect::to('user/reset'); - } else { - if (Session::has(REQUESTED_PRO_PLAN)) { - Session::forget(REQUESTED_PRO_PLAN); - $invitation = $this->accountRepo->enableProPlan(); - - return Redirect::to($invitation->getLink()); - } else { - return Redirect::action('UserController@login')->with('message', $notice_msg); - } - } - } else { - $error_msg = trans('texts.confide.wrong_confirmation'); - - return Redirect::action('UserController@login')->with('error', $error_msg); - } - } - - /** - * Displays the forgot password form - * - */ - public function forgot_password() - { - return View::make(Config::get('confide::forgot_password_form')); - } - - /** - * Attempt to send change password link to the given email - * - */ - public function do_forgot_password() - { - Confide::forgotPassword(Input::get('email')); - - $notice_msg = trans('texts.confide.password_forgot'); - - return Redirect::action('UserController@login') - ->with('notice', $notice_msg); - - /* - if( Confide::forgotPassword( Input::get( 'email' ) ) ) - { - $notice_msg = Lang::get('confide::confide.alerts.password_forgot'); - return Redirect::action('UserController@login') - ->with( 'notice', $notice_msg ); - } - else - { - $error_msg = Lang::get('confide::confide.alerts.wrong_password_forgot'); - return Redirect::action('UserController@forgot_password') - ->withInput() - ->with( 'error', $error_msg ); - } - */ - } - - /** - * Shows the change password form with the given token - * - */ - public function reset_password($token = false) - { - return View::make(Config::get('confide::reset_password_form')) - ->with('token', $token); - } - - /** - * Attempt change password of the user - * - */ - public function do_reset_password() - { - if (Auth::check()) { - $rules = [ - 'password' => 'required|between:4,11|confirmed', - 'password_confirmation' => 'between:4,11', - ]; - $validator = Validator::make(Input::all(), $rules); - - if ($validator->fails()) { - return Redirect::to('user/reset')->withInput()->withErrors($validator); - } - - $user = Auth::user(); - $user->password = Input::get('password'); - $user->save(); - - Session::flash('message', trans('texts.confide.password_reset')); - - return Redirect::to('/dashboard'); - } else { - $input = array( - 'token' => Input::get('token'), - 'password' => Input::get('password'), - 'password_confirmation' => Input::get('password_confirmation'), - ); - - // By passing an array with the token, password and confirmation - if (Confide::resetPassword($input)) { - $notice_msg = trans('texts.confide.password_reset'); - - return Redirect::action('UserController@login') - ->with('notice', $notice_msg); - } else { - $error_msg = trans('texts.confide.wrong_password_reset'); - - return Redirect::action('UserController@reset_password', array('token' => $input['token'])) - ->withInput() - ->with('error', $error_msg); - } - } - } - - /** - * Log the user out of the application. - * - */ - public function logout() - { - if (Auth::check()) { - if (!Auth::user()->registered) { - $account = Auth::user()->account; - $account->forceDelete(); - } - } - - Session::forget('news_feed_id'); - Session::forget('news_feed_message'); - - Confide::logout(); - - return Redirect::to('/')->with('clearGuestKey', true); - } - - public function changePassword() - { - // check the current password is correct - if (!Auth::validate([ - 'email' => Auth::user()->email, - 'password' => Input::get('current_password') - ])) { - return trans('texts.password_error_incorrect'); - } - - // validate the new password - $password = Input::get('new_password'); - $confirm = Input::get('confirm_password'); - - if (strlen($password) < 6 || $password != $confirm) { - return trans('texts.password_error_invalid'); - } - - // save the new password - $user = Auth::user(); - $user->password = $password; - $user->save(); - - return RESULT_SUCCESS; - } -} diff --git a/app/database/migrations/.gitkeep b/app/database/migrations/.gitkeep deleted file mode 100755 index e69de29bb2d1..000000000000 diff --git a/app/database/migrations/2013_11_05_180133_confide_setup_users_table.php b/app/database/migrations/2013_11_05_180133_confide_setup_users_table.php deleted file mode 100755 index cb2594770923..000000000000 --- a/app/database/migrations/2013_11_05_180133_confide_setup_users_table.php +++ /dev/null @@ -1,550 +0,0 @@ -increments('id'); - $table->string('capital', 255)->nullable(); - $table->string('citizenship', 255)->nullable(); - $table->string('country_code', 3)->default(''); - $table->string('currency', 255)->nullable(); - $table->string('currency_code', 255)->nullable(); - $table->string('currency_sub_unit', 255)->nullable(); - $table->string('full_name', 255)->nullable(); - $table->string('iso_3166_2', 2)->default(''); - $table->string('iso_3166_3', 3)->default(''); - $table->string('name', 255)->default(''); - $table->string('region_code', 3)->default(''); - $table->string('sub_region_code', 3)->default(''); - $table->boolean('eea')->default(0); - }); - - Schema::create('themes', function($t) - { - $t->increments('id'); - $t->string('name'); - }); - - Schema::create('payment_types', function($t) - { - $t->increments('id'); - $t->string('name'); - }); - - Schema::create('payment_terms', function($t) - { - $t->increments('id'); - $t->integer('num_days'); - $t->string('name'); - }); - - Schema::create('timezones', function($t) - { - $t->increments('id'); - $t->string('name'); - $t->string('location'); - }); - - Schema::create('date_formats', function($t) - { - $t->increments('id'); - $t->string('format'); - $t->string('picker_format'); - $t->string('label'); - }); - - Schema::create('datetime_formats', function($t) - { - $t->increments('id'); - $t->string('format'); - $t->string('label'); - }); - - Schema::create('currencies', function($t) - { - $t->increments('id'); - - $t->string('name'); - $t->string('symbol'); - $t->string('precision'); - $t->string('thousand_separator'); - $t->string('decimal_separator'); - $t->string('code'); - }); - - Schema::create('sizes', function($t) - { - $t->increments('id'); - $t->string('name'); - }); - - Schema::create('industries', function($t) - { - $t->increments('id'); - $t->string('name'); - }); - - Schema::create('accounts', function($t) - { - $t->increments('id'); - $t->unsignedInteger('timezone_id')->nullable(); - $t->unsignedInteger('date_format_id')->nullable(); - $t->unsignedInteger('datetime_format_id')->nullable(); - $t->unsignedInteger('currency_id')->nullable(); - - $t->timestamps(); - $t->softDeletes(); - - $t->string('name')->nullable(); - $t->string('ip'); - $t->string('account_key')->unique(); - $t->timestamp('last_login')->nullable(); - - $t->string('address1')->nullable(); - $t->string('address2')->nullable(); - $t->string('city')->nullable(); - $t->string('state')->nullable(); - $t->string('postal_code')->nullable(); - $t->unsignedInteger('country_id')->nullable(); - $t->text('invoice_terms')->nullable(); - $t->text('email_footer')->nullable(); - $t->unsignedInteger('industry_id')->nullable(); - $t->unsignedInteger('size_id')->nullable(); - - $t->boolean('invoice_taxes')->default(true); - $t->boolean('invoice_item_taxes')->default(false); - - $t->foreign('timezone_id')->references('id')->on('timezones'); - $t->foreign('date_format_id')->references('id')->on('date_formats'); - $t->foreign('datetime_format_id')->references('id')->on('datetime_formats'); - $t->foreign('country_id')->references('id')->on('countries'); - $t->foreign('currency_id')->references('id')->on('currencies'); - $t->foreign('industry_id')->references('id')->on('industries'); - $t->foreign('size_id')->references('id')->on('sizes'); - }); - - Schema::create('gateways', function($t) - { - $t->increments('id'); - $t->timestamps(); - - $t->string('name'); - $t->string('provider'); - $t->boolean('visible')->default(true); - }); - - Schema::create('users', function($t) - { - $t->increments('id'); - $t->unsignedInteger('account_id')->index(); - $t->timestamps(); - $t->softDeletes(); - - $t->string('first_name')->nullable(); - $t->string('last_name')->nullable(); - $t->string('phone')->nullable(); - $t->string('username')->unique(); - $t->string('email')->nullable(); - $t->string('password'); - $t->string('confirmation_code'); - $t->boolean('registered')->default(false); - $t->boolean('confirmed')->default(false); - $t->integer('theme_id')->nullable(); - - $t->boolean('notify_sent')->default(true); - $t->boolean('notify_viewed')->default(false); - $t->boolean('notify_paid')->default(true); - - $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - - $t->unsignedInteger('public_id')->nullable(); - $t->unique( array('account_id','public_id') ); - }); - - Schema::create('account_gateways', function($t) - { - $t->increments('id'); - $t->unsignedInteger('account_id'); - $t->unsignedInteger('user_id'); - $t->unsignedInteger('gateway_id'); - $t->timestamps(); - $t->softDeletes(); - - $t->text('config'); - - $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $t->foreign('gateway_id')->references('id')->on('gateways'); - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - - $t->unsignedInteger('public_id')->index(); - $t->unique( array('account_id','public_id') ); - }); - - - Schema::create('password_reminders', function($t) - { - $t->string('email'); - $t->timestamps(); - - $t->string('token'); - }); - - Schema::create('clients', function($t) - { - $t->increments('id'); - $t->unsignedInteger('user_id'); - $t->unsignedInteger('account_id')->index(); - $t->unsignedInteger('currency_id')->nullable(); - $t->timestamps(); - $t->softDeletes(); - - $t->string('name')->nullable(); - $t->string('address1')->nullable(); - $t->string('address2')->nullable(); - $t->string('city')->nullable(); - $t->string('state')->nullable(); - $t->string('postal_code')->nullable(); - $t->unsignedInteger('country_id')->nullable(); - $t->string('work_phone')->nullable(); - $t->text('private_notes')->nullable(); - $t->decimal('balance', 13, 2)->nullable(); - $t->decimal('paid_to_date', 13, 2)->nullable(); - $t->timestamp('last_login')->nullable(); - $t->string('website')->nullable(); - $t->unsignedInteger('industry_id')->nullable(); - $t->unsignedInteger('size_id')->nullable(); - $t->boolean('is_deleted')->default(false); - $t->integer('payment_terms')->nullable(); - - $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - $t->foreign('country_id')->references('id')->on('countries'); - $t->foreign('industry_id')->references('id')->on('industries'); - $t->foreign('size_id')->references('id')->on('sizes'); - $t->foreign('currency_id')->references('id')->on('currencies'); - - $t->unsignedInteger('public_id')->index(); - $t->unique( array('account_id','public_id') ); - }); - - Schema::create('contacts', function($t) - { - $t->increments('id'); - $t->unsignedInteger('account_id'); - $t->unsignedInteger('user_id'); - $t->unsignedInteger('client_id')->index(); - $t->timestamps(); - $t->softDeletes(); - - $t->boolean('is_primary')->default(0); - $t->boolean('send_invoice')->default(0); - $t->string('first_name')->nullable(); - $t->string('last_name')->nullable(); - $t->string('email')->nullable(); - $t->string('phone')->nullable(); - $t->timestamp('last_login')->nullable(); - - $t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; - - $t->unsignedInteger('public_id')->nullable(); - $t->unique( array('account_id','public_id') ); - }); - - Schema::create('invoice_statuses', function($t) - { - $t->increments('id'); - $t->string('name'); - }); - - Schema::create('frequencies', function($t) - { - $t->increments('id'); - $t->string('name'); - }); - - Schema::create('invoices', function($t) - { - $t->increments('id'); - $t->unsignedInteger('client_id')->index(); - $t->unsignedInteger('user_id'); - $t->unsignedInteger('account_id')->index(); - $t->unsignedInteger('invoice_status_id')->default(1); - $t->timestamps(); - $t->softDeletes(); - - $t->string('invoice_number'); - $t->float('discount'); - $t->string('po_number'); - $t->date('invoice_date')->nullable(); - $t->date('due_date')->nullable(); - $t->text('terms'); - $t->text('public_notes'); - $t->boolean('is_deleted')->default(false); - $t->boolean('is_recurring'); - $t->unsignedInteger('frequency_id'); - $t->date('start_date')->nullable(); - $t->date('end_date')->nullable(); - $t->timestamp('last_sent_date')->nullable(); - $t->unsignedInteger('recurring_invoice_id')->index()->nullable(); - - $t->string('tax_name'); - $t->decimal('tax_rate', 13, 2); - - $t->decimal('amount', 13, 2); - $t->decimal('balance', 13, 2); - - $t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); - $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - $t->foreign('invoice_status_id')->references('id')->on('invoice_statuses'); - $t->foreign('recurring_invoice_id')->references('id')->on('invoices')->onDelete('cascade'); - - $t->unsignedInteger('public_id')->index(); - $t->unique( array('account_id','public_id') ); - $t->unique( array('account_id','invoice_number') ); - }); - - - Schema::create('invitations', function($t) - { - $t->increments('id'); - $t->unsignedInteger('account_id'); - $t->unsignedInteger('user_id'); - $t->unsignedInteger('contact_id'); - $t->unsignedInteger('invoice_id')->index(); - $t->string('invitation_key')->index()->unique(); - $t->timestamps(); - $t->softDeletes(); - - $t->string('transaction_reference')->nullable(); - $t->timestamp('sent_date'); - $t->timestamp('viewed_date'); - - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; - $t->foreign('contact_id')->references('id')->on('contacts')->onDelete('cascade'); - $t->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade'); - - $t->unsignedInteger('public_id')->index(); - $t->unique( array('account_id','public_id') ); - }); - - Schema::create('tax_rates', function($t) - { - $t->increments('id'); - $t->unsignedInteger('account_id')->index(); - $t->unsignedInteger('user_id'); - $t->timestamps(); - $t->softDeletes(); - - $t->string('name'); - $t->decimal('rate', 13, 2); - - $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; - - $t->unsignedInteger('public_id'); - $t->unique( array('account_id','public_id') ); - }); - - Schema::create('products', function($t) - { - $t->increments('id'); - $t->unsignedInteger('account_id')->index(); - $t->unsignedInteger('user_id'); - $t->timestamps(); - $t->softDeletes(); - - $t->string('product_key'); - $t->text('notes'); - $t->decimal('cost', 13, 2); - $t->decimal('qty', 13, 2)->nullable(); - - $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; - - $t->unsignedInteger('public_id'); - $t->unique( array('account_id','public_id') ); - }); - - - Schema::create('invoice_items', function($t) - { - $t->increments('id'); - $t->unsignedInteger('account_id'); - $t->unsignedInteger('user_id'); - $t->unsignedInteger('invoice_id')->index(); - $t->unsignedInteger('product_id')->nullable(); - $t->timestamps(); - $t->softDeletes(); - - $t->string('product_key'); - $t->text('notes'); - $t->decimal('cost', 13, 2); - $t->decimal('qty', 13, 2)->nullable(); - - $t->string('tax_name')->nullable(); - $t->decimal('tax_rate', 13, 2)->nullable(); - - $t->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade'); - $t->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; - - $t->unsignedInteger('public_id'); - $t->unique( array('account_id','public_id') ); - }); - - Schema::create('payments', function($t) - { - $t->increments('id'); - $t->unsignedInteger('invoice_id')->nullable(); - $t->unsignedInteger('account_id')->index(); - $t->unsignedInteger('client_id')->index(); - $t->unsignedInteger('contact_id')->nullable(); - $t->unsignedInteger('invitation_id')->nullable(); - $t->unsignedInteger('user_id')->nullable(); - $t->unsignedInteger('account_gateway_id')->nullable(); - $t->unsignedInteger('payment_type_id')->nullable(); - $t->timestamps(); - $t->softDeletes(); - - $t->boolean('is_deleted')->default(false); - $t->decimal('amount', 13, 2); - $t->date('payment_date')->nullable(); - $t->string('transaction_reference')->nullable(); - $t->string('payer_id')->nullable(); - - $t->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade'); - $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); - $t->foreign('contact_id')->references('id')->on('contacts')->onDelete('cascade'); - $t->foreign('account_gateway_id')->references('id')->on('account_gateways')->onDelete('cascade'); - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; - $t->foreign('payment_type_id')->references('id')->on('payment_types'); - - $t->unsignedInteger('public_id')->index(); - $t->unique( array('account_id','public_id') ); - }); - - Schema::create('credits', function($t) - { - $t->increments('id'); - $t->unsignedInteger('account_id')->index(); - $t->unsignedInteger('client_id')->index(); - $t->unsignedInteger('user_id'); - $t->timestamps(); - $t->softDeletes(); - - $t->boolean('is_deleted')->default(false); - $t->decimal('amount', 13, 2); - $t->decimal('balance', 13, 2); - $t->date('credit_date')->nullable(); - $t->string('credit_number')->nullable(); - $t->text('private_notes'); - - $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; - - $t->unsignedInteger('public_id')->index(); - $t->unique( array('account_id','public_id') ); - }); - - Schema::create('activities', function($t) - { - $t->increments('id'); - $t->timestamps(); - - $t->unsignedInteger('account_id'); - $t->unsignedInteger('client_id'); - $t->unsignedInteger('user_id'); - $t->unsignedInteger('contact_id')->nullable(); - $t->unsignedInteger('payment_id')->nullable(); - $t->unsignedInteger('invoice_id')->nullable(); - $t->unsignedInteger('credit_id')->nullable(); - $t->unsignedInteger('invitation_id')->nullable(); - - $t->text('message')->nullable(); - $t->text('json_backup')->nullable(); - $t->integer('activity_type_id'); - $t->decimal('adjustment', 13, 2)->nullable(); - $t->decimal('balance', 13, 2)->nullable(); - - $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('payment_terms'); - Schema::dropIfExists('themes'); - Schema::dropIfExists('credits'); - Schema::dropIfExists('activities'); - Schema::dropIfExists('invitations'); - Schema::dropIfExists('payments'); - Schema::dropIfExists('account_gateways'); - Schema::dropIfExists('invoice_items'); - Schema::dropIfExists('products'); - Schema::dropIfExists('tax_rates'); - Schema::dropIfExists('contacts'); - Schema::dropIfExists('invoices'); - Schema::dropIfExists('password_reminders'); - Schema::dropIfExists('clients'); - Schema::dropIfExists('users'); - Schema::dropIfExists('accounts'); - Schema::dropIfExists('currencies'); - Schema::dropIfExists('invoice_statuses'); - Schema::dropIfExists('countries'); - Schema::dropIfExists('timezones'); - Schema::dropIfExists('frequencies'); - Schema::dropIfExists('date_formats'); - Schema::dropIfExists('datetime_formats'); - Schema::dropIfExists('sizes'); - Schema::dropIfExists('industries'); - Schema::dropIfExists('gateways'); - Schema::dropIfExists('payment_types'); - } -} diff --git a/app/database/migrations/2013_11_28_195703_setup_countries_table.php b/app/database/migrations/2013_11_28_195703_setup_countries_table.php deleted file mode 100755 index 09e8c8eca2e0..000000000000 --- a/app/database/migrations/2013_11_28_195703_setup_countries_table.php +++ /dev/null @@ -1,47 +0,0 @@ -integer('id')->index(); - $table->string('capital', 255)->nullable(); - $table->string('citizenship', 255)->nullable(); - $table->string('country_code', 3)->default(''); - $table->string('currency', 255)->nullable(); - $table->string('currency_code', 255)->nullable(); - $table->string('currency_sub_unit', 255)->nullable(); - $table->string('full_name', 255)->nullable(); - $table->string('iso_3166_2', 2)->default(''); - $table->string('iso_3166_3', 3)->default(''); - $table->string('name', 255)->default(''); - $table->string('region_code', 3)->default(''); - $table->string('sub_region_code', 3)->default(''); - $table->boolean('eea')->default(0); - - $table->primary('id'); - }); - */ - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - //Schema::drop('countries'); - } - -} \ No newline at end of file diff --git a/app/database/migrations/2014_02_13_151500_add_cascase_drops.php b/app/database/migrations/2014_02_13_151500_add_cascase_drops.php deleted file mode 100644 index 66d362317dfd..000000000000 --- a/app/database/migrations/2014_02_13_151500_add_cascase_drops.php +++ /dev/null @@ -1,32 +0,0 @@ -dropForeign('invoices_account_id_foreign'); - $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - - } - -} diff --git a/app/database/migrations/2014_02_19_151817_add_support_for_invoice_designs.php b/app/database/migrations/2014_02_19_151817_add_support_for_invoice_designs.php deleted file mode 100644 index 4bd8daf912df..000000000000 --- a/app/database/migrations/2014_02_19_151817_add_support_for_invoice_designs.php +++ /dev/null @@ -1,72 +0,0 @@ -increments('id'); - $table->string('name'); - }); - - DB::table('invoice_designs')->insert(['name' => 'Clean']); - DB::table('invoice_designs')->insert(['name' => 'Bold']); - DB::table('invoice_designs')->insert(['name' => 'Modern']); - DB::table('invoice_designs')->insert(['name' => 'Plain']); - - Schema::table('invoices', function($table) - { - $table->unsignedInteger('invoice_design_id')->default(1); - }); - - Schema::table('accounts', function($table) - { - $table->unsignedInteger('invoice_design_id')->default(1); - }); - - DB::table('invoices')->update(['invoice_design_id' => 1]); - DB::table('accounts')->update(['invoice_design_id' => 1]); - - Schema::table('invoices', function($table) - { - $table->foreign('invoice_design_id')->references('id')->on('invoice_designs'); - }); - - Schema::table('accounts', function($table) - { - $table->foreign('invoice_design_id')->references('id')->on('invoice_designs'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('invoices', function($table) - { - $table->dropForeign('invoices_invoice_design_id_foreign'); - $table->dropColumn('invoice_design_id'); - }); - - Schema::table('accounts', function($table) - { - $table->dropForeign('accounts_invoice_design_id_foreign'); - $table->dropColumn('invoice_design_id'); - }); - - Schema::dropIfExists('invoice_designs'); - } - -} diff --git a/app/database/migrations/2014_03_03_155556_add_phone_to_account.php b/app/database/migrations/2014_03_03_155556_add_phone_to_account.php deleted file mode 100644 index 79e03e9d183a..000000000000 --- a/app/database/migrations/2014_03_03_155556_add_phone_to_account.php +++ /dev/null @@ -1,36 +0,0 @@ -string('work_phone')->nullable(); - $table->string('work_email')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropColumn('work_phone'); - $table->dropColumn('work_email'); - }); - } - -} \ No newline at end of file diff --git a/app/database/migrations/2014_03_19_201454_add_language_support.php b/app/database/migrations/2014_03_19_201454_add_language_support.php deleted file mode 100644 index cdb092a9a498..000000000000 --- a/app/database/migrations/2014_03_19_201454_add_language_support.php +++ /dev/null @@ -1,60 +0,0 @@ -increments('id'); - $table->string('name'); - $table->string('locale'); - }); - - DB::table('languages')->insert(['name' => 'English', 'locale' => 'en']); - DB::table('languages')->insert(['name' => 'Italian', 'locale' => 'it']); - DB::table('languages')->insert(['name' => 'German', 'locale' => 'de']); - DB::table('languages')->insert(['name' => 'French', 'locale' => 'fr']); - DB::table('languages')->insert(['name' => 'Brazilian Portuguese', 'locale' => 'pt_BR']); - DB::table('languages')->insert(['name' => 'Dutch', 'locale' => 'nl']); - DB::table('languages')->insert(['name' => 'Spanish', 'locale' => 'es']); - DB::table('languages')->insert(['name' => 'Norwegian', 'locale' => 'nb_NO']); - - Schema::table('accounts', function($table) - { - $table->unsignedInteger('language_id')->default(1); - }); - - DB::table('accounts')->update(['language_id' => 1]); - - Schema::table('accounts', function($table) - { - $table->foreign('language_id')->references('id')->on('languages'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropForeign('accounts_language_id_foreign'); - $table->dropColumn('language_id'); - }); - - Schema::drop('languages'); - } - -} diff --git a/app/database/migrations/2014_03_20_200300_create_payment_libraries.php b/app/database/migrations/2014_03_20_200300_create_payment_libraries.php deleted file mode 100644 index dc8074c913bd..000000000000 --- a/app/database/migrations/2014_03_20_200300_create_payment_libraries.php +++ /dev/null @@ -1,58 +0,0 @@ -increments('id'); - $t->timestamps(); - - $t->string('name'); - $t->boolean('visible')->default(true); - }); - - Schema::table('gateways', function($table) - { - $table->unsignedInteger('payment_library_id')->default(1); - }); - - DB::table('gateways')->update(['payment_library_id' => 1]); - - Schema::table('gateways', function($table) - { - $table->foreign('payment_library_id')->references('id')->on('payment_libraries')->onDelete('cascade'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - if (Schema::hasColumn('gateways', 'payment_library_id')) - { - Schema::table('gateways', function($table) - { - $table->dropForeign('gateways_payment_library_id_foreign'); - $table->dropColumn('payment_library_id'); - }); - } - - Schema::dropIfExists('payment_libraries'); - } - -} \ No newline at end of file diff --git a/app/database/migrations/2014_03_23_051736_enable_forcing_jspdf.php b/app/database/migrations/2014_03_23_051736_enable_forcing_jspdf.php deleted file mode 100644 index 30d7c664e451..000000000000 --- a/app/database/migrations/2014_03_23_051736_enable_forcing_jspdf.php +++ /dev/null @@ -1,34 +0,0 @@ -boolean('force_pdfjs')->default(false); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function($table) - { - $table->dropColumn('force_pdfjs'); - }); - } - -} diff --git a/app/database/migrations/2014_03_25_102200_add_sort_and_recommended_to_gateways.php b/app/database/migrations/2014_03_25_102200_add_sort_and_recommended_to_gateways.php deleted file mode 100644 index a49fe8f855ef..000000000000 --- a/app/database/migrations/2014_03_25_102200_add_sort_and_recommended_to_gateways.php +++ /dev/null @@ -1,49 +0,0 @@ -unsignedInteger('sort_order')->default(10000); - $table->boolean('recommended')->default(0); - $table->string('site_url', 200)->nullable(); - }); - } - - public function down() - { - if (Schema::hasColumn('gateways', 'sort_order')) - { - Schema::table('gateways', function($table) - { - $table->dropColumn('sort_order'); - }); - } - - if (Schema::hasColumn('gateways', 'recommended')) - { - Schema::table('gateways', function($table) - { - $table->dropColumn('recommended'); - }); - } - - if (Schema::hasColumn('gateways', 'site_url')) - { - Schema::table('gateways', function($table) - { - $table->dropColumn('site_url'); - }); - } - } -} diff --git a/app/database/migrations/2014_04_03_191105_add_pro_plan.php b/app/database/migrations/2014_04_03_191105_add_pro_plan.php deleted file mode 100644 index cbc714971f1d..000000000000 --- a/app/database/migrations/2014_04_03_191105_add_pro_plan.php +++ /dev/null @@ -1,34 +0,0 @@ -date('pro_plan_paid')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropColumn('pro_plan_paid'); - }); - } - -} diff --git a/app/database/migrations/2014_04_17_100523_add_remember_token.php b/app/database/migrations/2014_04_17_100523_add_remember_token.php deleted file mode 100644 index 6a436001075a..000000000000 --- a/app/database/migrations/2014_04_17_100523_add_remember_token.php +++ /dev/null @@ -1,34 +0,0 @@ -string('remember_token', 100)->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function($table) - { - $table->dropColumn('remember_token'); - }); - } - -} diff --git a/app/database/migrations/2014_04_17_145108_add_custom_fields.php b/app/database/migrations/2014_04_17_145108_add_custom_fields.php deleted file mode 100644 index f6ff7c8f45a1..000000000000 --- a/app/database/migrations/2014_04_17_145108_add_custom_fields.php +++ /dev/null @@ -1,60 +0,0 @@ -string('custom_label1')->nullable(); - $table->string('custom_value1')->nullable(); - - $table->string('custom_label2')->nullable(); - $table->string('custom_value2')->nullable(); - - $table->string('custom_client_label1')->nullable(); - $table->string('custom_client_label2')->nullable(); - }); - - Schema::table('clients', function($table) - { - $table->string('custom_value1')->nullable(); - $table->string('custom_value2')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropColumn('custom_label1'); - $table->dropColumn('custom_value1'); - - $table->dropColumn('custom_label2'); - $table->dropColumn('custom_value2'); - - $table->dropColumn('custom_client_label1'); - $table->dropColumn('custom_client_label2'); - }); - - Schema::table('clients', function($table) - { - $table->dropColumn('custom_value1'); - $table->dropColumn('custom_value2'); - }); - } - -} diff --git a/app/database/migrations/2014_04_23_170909_add_products_settings.php b/app/database/migrations/2014_04_23_170909_add_products_settings.php deleted file mode 100644 index a5e5541177b5..000000000000 --- a/app/database/migrations/2014_04_23_170909_add_products_settings.php +++ /dev/null @@ -1,39 +0,0 @@ -boolean('fill_products')->default(true); - $table->boolean('update_products')->default(true); - }); - - DB::table('accounts')->update(['fill_products' => true]); - DB::table('accounts')->update(['update_products' => true]); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropColumn('fill_products'); - $table->dropColumn('update_products'); - }); - } - -} diff --git a/app/database/migrations/2014_04_29_174315_add_advanced_settings.php b/app/database/migrations/2014_04_29_174315_add_advanced_settings.php deleted file mode 100644 index ae91740d21f3..000000000000 --- a/app/database/migrations/2014_04_29_174315_add_advanced_settings.php +++ /dev/null @@ -1,42 +0,0 @@ -string('primary_color')->nullable(); - $table->string('secondary_color')->nullable(); - }); - - Schema::table('payments', function($table) - { - $table->dropForeign('payments_invoice_id_foreign'); - $table->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropColumn('primary_color'); - $table->dropColumn('secondary_color'); - }); - } - -} diff --git a/app/database/migrations/2014_05_17_175626_add_quotes.php b/app/database/migrations/2014_05_17_175626_add_quotes.php deleted file mode 100644 index 6299ad124dc0..000000000000 --- a/app/database/migrations/2014_05_17_175626_add_quotes.php +++ /dev/null @@ -1,38 +0,0 @@ -boolean('is_quote')->default(0); - $table->unsignedInteger('quote_id')->nullable(); - $table->unsignedInteger('quote_invoice_id')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('invoices', function($table) - { - $table->dropColumn('is_quote'); - $table->dropColumn('quote_id'); - $table->dropColumn('quote_invoice_id'); - }); - } - -} diff --git a/app/database/migrations/2014_06_17_131940_add_accepted_credit_cards_to_account_gateways.php b/app/database/migrations/2014_06_17_131940_add_accepted_credit_cards_to_account_gateways.php deleted file mode 100644 index dfcbdc90559a..000000000000 --- a/app/database/migrations/2014_06_17_131940_add_accepted_credit_cards_to_account_gateways.php +++ /dev/null @@ -1,34 +0,0 @@ -unsignedInteger('accepted_credit_cards')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('account_gateways', function($table) - { - $table->dropColumn('accepted_credit_cards'); - }); - } - -} diff --git a/app/database/migrations/2014_07_13_142654_one_click_install.php b/app/database/migrations/2014_07_13_142654_one_click_install.php deleted file mode 100644 index 943117bed3a7..000000000000 --- a/app/database/migrations/2014_07_13_142654_one_click_install.php +++ /dev/null @@ -1,58 +0,0 @@ -increments('id'); - $table->timestamps(); - $table->softDeletes(); - - $table->string('name'); - $table->string('affiliate_key')->unique(); - - $table->text('payment_title'); - $table->text('payment_subtitle'); - }); - - Schema::create('licenses', function($table) - { - $table->increments('id'); - $table->timestamps(); - $table->softDeletes(); - $table->unsignedInteger('affiliate_id'); - - $table->string('first_name'); - $table->string('last_name'); - $table->string('email'); - - $table->string('license_key')->unique(); - $table->boolean('is_claimed'); - $table->string('transaction_reference'); - - $table->foreign('affiliate_id')->references('id')->on('affiliates'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('licenses'); - Schema::dropIfExists('affiliates'); - } - -} diff --git a/app/database/migrations/2014_07_17_205900_support_hiding_quantity.php b/app/database/migrations/2014_07_17_205900_support_hiding_quantity.php deleted file mode 100644 index c7104ef88c8d..000000000000 --- a/app/database/migrations/2014_07_17_205900_support_hiding_quantity.php +++ /dev/null @@ -1,66 +0,0 @@ -boolean('hide_quantity')->default(0); - $table->boolean('hide_paid_to_date')->default(0); - - $table->string('custom_invoice_label1')->nullable(); - $table->string('custom_invoice_label2')->nullable(); - - $table->boolean('custom_invoice_taxes1')->nullable(); - $table->boolean('custom_invoice_taxes2')->nullable(); - }); - - Schema::table('invoices', function($table) - { - $table->decimal('custom_value1', 13, 2)->default(0); - $table->decimal('custom_value2', 13, 2)->default(0); - - $table->boolean('custom_taxes1')->default(0); - $table->boolean('custom_taxes2')->default(0); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropColumn('hide_quantity'); - $table->dropColumn('hide_paid_to_date'); - - $table->dropColumn('custom_invoice_label1'); - $table->dropColumn('custom_invoice_label2'); - - $table->dropColumn('custom_invoice_taxes1'); - $table->dropColumn('custom_invoice_taxes2'); - }); - - Schema::table('invoices', function($table) - { - $table->dropColumn('custom_value1'); - $table->dropColumn('custom_value2'); - - $table->dropColumn('custom_taxes1'); - $table->dropColumn('custom_taxes2'); - }); - } - -} diff --git a/app/database/migrations/2014_07_24_171214_add_zapier_support.php b/app/database/migrations/2014_07_24_171214_add_zapier_support.php deleted file mode 100644 index b7bfc0a5bae3..000000000000 --- a/app/database/migrations/2014_07_24_171214_add_zapier_support.php +++ /dev/null @@ -1,42 +0,0 @@ -increments('id'); - $table->unsignedInteger('account_id')->nullable(); - - $table->timestamps(); - $table->softDeletes(); - - $table->unsignedInteger('event_id')->nullable(); - $table->string('target_url'); - - $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $table->unique( ['account_id', 'event_id'] ); - }); - - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('subscriptions'); - } - -} diff --git a/app/database/migrations/2014_10_01_141248_add_company_vat_number.php b/app/database/migrations/2014_10_01_141248_add_company_vat_number.php deleted file mode 100644 index b93a217712ed..000000000000 --- a/app/database/migrations/2014_10_01_141248_add_company_vat_number.php +++ /dev/null @@ -1,43 +0,0 @@ -string('vat_number')->nullable(); - }); - - Schema::table('clients', function($table) - { - $table->string('vat_number')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropColumn('vat_number'); - }); - Schema::table('clients', function($table) - { - $table->dropColumn('vat_number'); - }); - } - -} diff --git a/app/database/migrations/2014_10_05_141856_track_last_seen_message.php b/app/database/migrations/2014_10_05_141856_track_last_seen_message.php deleted file mode 100644 index 7446782a6ac3..000000000000 --- a/app/database/migrations/2014_10_05_141856_track_last_seen_message.php +++ /dev/null @@ -1,46 +0,0 @@ -unsignedInteger('news_feed_id')->nullable(); - }); - - if (DB::table('payment_libraries')->count() > 0) { - DB::table('gateways')->update(['recommended' => 0]); - DB::table('gateways')->insert([ - 'name' => 'moolah', - 'provider' => 'AuthorizeNet_AIM', - 'sort_order' => 1, - 'recommended' => 1, - 'site_url' => 'https://invoiceninja.mymoolah.com/', - 'payment_library_id' => 1 - ]); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function($table) - { - $table->dropColumn('news_feed_id'); - }); - } - -} diff --git a/app/database/migrations/2014_10_06_103529_add_timesheets.php b/app/database/migrations/2014_10_06_103529_add_timesheets.php deleted file mode 100644 index 879cd450402d..000000000000 --- a/app/database/migrations/2014_10_06_103529_add_timesheets.php +++ /dev/null @@ -1,152 +0,0 @@ -increments('id'); - $t->unsignedInteger('user_id'); - $t->unsignedInteger('account_id')->index(); - $t->unsignedInteger('client_id')->nullable(); - $t->timestamps(); - $t->softDeletes(); - - $t->string('name'); - $t->string('description'); - - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - $t->foreign('account_id')->references('id')->on('accounts'); - - $t->unique( array('account_id','name') ); - }); - - Schema::create('project_codes', function($t) { - $t->increments('id'); - $t->unsignedInteger('user_id'); - $t->unsignedInteger('account_id')->index(); - $t->unsignedInteger('project_id'); - $t->timestamps(); - $t->softDeletes(); - - $t->string('name'); - $t->string('description'); - - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - $t->foreign('account_id')->references('id')->on('accounts'); - $t->foreign('project_id')->references('id')->on('projects')->onDelete('cascade'); - - $t->unique( array('account_id','name') ); - }); - - - Schema::create('timesheets', function($t) { - $t->increments('id'); - $t->unsignedInteger('user_id'); - $t->unsignedInteger('account_id')->index(); - $t->timestamps(); - $t->softDeletes(); - - $t->dateTime('start_date'); - $t->dateTime('end_date'); - $t->float('discount'); - - $t->decimal('hours'); - - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - $t->foreign('account_id')->references('id')->on('accounts'); - - $t->unsignedInteger('public_id'); - $t->unique( array('account_id','public_id') ); - }); - - Schema::create('timesheet_event_sources', function($t) { - $t->increments('id'); - $t->unsignedInteger('user_id'); - $t->unsignedInteger('account_id')->index(); - $t->timestamps(); - $t->softDeletes(); - - $t->string('owner'); - $t->string('name'); - $t->string('url'); - $t->enum('type', array('ical', 'googlejson')); - - $t->dateTime('from_date')->nullable(); - $t->dateTime('to_date')->nullable(); - - $t->foreign('account_id')->references('id')->on('accounts'); - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - }); - - Schema::create('timesheet_events', function($t) { - $t->increments('id'); - $t->unsignedInteger('user_id'); - $t->unsignedInteger('account_id')->index(); - $t->unsignedInteger('timesheet_event_source_id'); - $t->unsignedInteger('timesheet_id')->nullable()->index(); - $t->unsignedInteger('project_id')->nullable()->index(); - $t->unsignedInteger('project_code_id')->nullable()->index(); - $t->timestamps(); - $t->softDeletes(); - - // Basic fields - $t->string('uid'); - $t->string('summary'); - $t->text('description'); - $t->string('location'); - $t->string('owner'); - $t->dateTime('start_date'); - $t->dateTime('end_date'); - - # Calculated values - $t->decimal('hours'); - $t->float('discount'); - $t->boolean('manualedit'); - - // Original data - $t->string('org_code'); - $t->timeStamp('org_created_at'); - $t->timeStamp('org_updated_at'); - $t->timeStamp('org_deleted_at')->default('0000-00-00T00:00:00'); - $t->string('org_start_date_timezone')->nullable(); - $t->string('org_end_date_timezone')->nullable(); - $t->text('org_data'); - - // Error and merge handling - $t->string('import_error')->nullable(); - $t->string('import_warning')->nullable(); - $t->text('updated_data')->nullable(); - $t->timeStamp('updated_data_at')->default('0000-00-00T00:00:00'); - - $t->foreign('account_id')->references('id')->on('accounts'); - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - $t->foreign('timesheet_event_source_id')->references('id')->on('timesheet_event_sources')->onDelete('cascade'); - - $t->unique( array('timesheet_event_source_id', 'uid') ); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('timesheet_events'); - Schema::drop('timesheet_event_sources'); - Schema::drop('timesheets'); - Schema::drop('project_codes'); - Schema::drop('projects'); - } - -} diff --git a/app/database/migrations/2014_10_06_195330_add_invoice_design_table.php b/app/database/migrations/2014_10_06_195330_add_invoice_design_table.php deleted file mode 100644 index 81442b001b3f..000000000000 --- a/app/database/migrations/2014_10_06_195330_add_invoice_design_table.php +++ /dev/null @@ -1,519 +0,0 @@ -text('javascript')->nullable(); - }); - - Schema::table('accounts', function($table) - { - $table->text('invoice_design')->nullable(); - }); - - DB::table('invoice_designs')->where('id', 1)->update([ - 'javascript' => "var GlobalY=0;//Y position of line at current page - - var client = invoice.client; - var account = invoice.account; - var currencyId = client.currency_id; - - layout.headerRight = 550; - layout.rowHeight = 15; - - doc.setFontSize(9); - - if (invoice.image) - { - var left = layout.headerRight - invoice.imageWidth; - doc.addImage(invoice.image, 'JPEG', layout.marginLeft, 30); - } - - if (!invoice.is_pro && logoImages.imageLogo1) - { - pageHeight=820; - y=pageHeight-logoImages.imageLogoHeight1; - doc.addImage(logoImages.imageLogo1, 'JPEG', layout.marginLeft, y, logoImages.imageLogoWidth1, logoImages.imageLogoHeight1); - } - - doc.setFontSize(9); - SetPdfColor('LightBlue', doc, 'primary'); - displayAccount(doc, invoice, 220, layout.accountTop, layout); - - SetPdfColor('LightBlue', doc, 'primary'); - doc.setFontSize('11'); - doc.text(50, layout.headerTop, (invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice).toUpperCase()); - - - SetPdfColor('Black',doc); //set black color - doc.setFontSize(9); - - var invoiceHeight = displayInvoice(doc, invoice, 50, 170, layout); - var clientHeight = displayClient(doc, invoice, 220, 170, layout); - var detailsHeight = Math.max(invoiceHeight, clientHeight); - layout.tableTop = Math.max(layout.tableTop, layout.headerTop + detailsHeight + (3 * layout.rowHeight)); - - doc.setLineWidth(0.3); - doc.setDrawColor(200,200,200); - doc.line(layout.marginLeft - layout.tablePadding, layout.headerTop + 6, layout.marginRight + layout.tablePadding, layout.headerTop + 6); - doc.line(layout.marginLeft - layout.tablePadding, layout.headerTop + detailsHeight + 14, layout.marginRight + layout.tablePadding, layout.headerTop + detailsHeight + 14); - - doc.setFontSize(10); - doc.setFontType('bold'); - displayInvoiceHeader(doc, invoice, layout); - var y = displayInvoiceItems(doc, invoice, layout); - - doc.setFontSize(9); - doc.setFontType('bold'); - - GlobalY=GlobalY+25; - - - doc.setLineWidth(0.3); - doc.setDrawColor(241,241,241); - doc.setFillColor(241,241,241); - var x1 = layout.marginLeft - 12; - var y1 = GlobalY-layout.tablePadding; - - var w2 = 510 + 24; - var h2 = doc.internal.getFontSize()*3+layout.tablePadding*2; - - if (invoice.discount) { - h2 += doc.internal.getFontSize()*2; - } - if (invoice.tax_amount) { - h2 += doc.internal.getFontSize()*2; - } - - //doc.rect(x1, y1, w2, h2, 'FD'); - - doc.setFontSize(9); - displayNotesAndTerms(doc, layout, invoice, y); - y += displaySubtotals(doc, layout, invoice, y, layout.unitCostRight); - - - doc.setFontSize(10); - Msg = invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due; - var TmpMsgX = layout.unitCostRight-(doc.getStringUnitWidth(Msg) * doc.internal.getFontSize()); - - doc.text(TmpMsgX, y, Msg); - - SetPdfColor('LightBlue', doc, 'primary'); - AmountText = formatMoney(invoice.balance_amount, currencyId); - headerLeft=layout.headerRight+400; - var AmountX = layout.lineTotalRight - (doc.getStringUnitWidth(AmountText) * doc.internal.getFontSize()); - doc.text(AmountX, y, AmountText);" - ]); - - DB::table('invoice_designs')->where('id', 2)->update([ - 'javascript' => " var GlobalY=0;//Y position of line at current page - - var client = invoice.client; - var account = invoice.account; - var currencyId = client.currency_id; - - layout.headerRight = 150; - layout.rowHeight = 15; - layout.headerTop = 125; - layout.tableTop = 300; - - doc.setLineWidth(0.5); - - if (NINJA.primaryColor) { - setDocHexFill(doc, NINJA.primaryColor); - setDocHexDraw(doc, NINJA.primaryColor); - } else { - doc.setFillColor(46,43,43); - } - - var x1 =0; - var y1 = 0; - var w2 = 595; - var h2 = 100; - doc.rect(x1, y1, w2, h2, 'FD'); - - if (invoice.image) - { - var left = layout.headerRight - invoice.imageWidth; - doc.addImage(invoice.image, 'JPEG', layout.marginLeft, 30); - } - - doc.setLineWidth(0.5); - if (NINJA.primaryColor) { - setDocHexFill(doc, NINJA.primaryColor); - setDocHexDraw(doc, NINJA.primaryColor); - } else { - doc.setFillColor(46,43,43); - doc.setDrawColor(46,43,43); - } - - // return doc.setTextColor(240,240,240);//select color Custom Report GRAY Colour - var x1 = 0;//tableLeft-tablePadding ; - var y1 = 750; - var w2 = 596; - var h2 = 94;//doc.internal.getFontSize()*length+length*1.1;//+h;//+tablePadding; - - doc.rect(x1, y1, w2, h2, 'FD'); - if (!invoice.is_pro && logoImages.imageLogo2) - { - pageHeight=820; - var left = 250;//headerRight ; - y=pageHeight-logoImages.imageLogoHeight2; - var headerRight=370; - - var left = headerRight - logoImages.imageLogoWidth2; - doc.addImage(logoImages.imageLogo2, 'JPEG', left, y, logoImages.imageLogoWidth2, logoImages.imageLogoHeight2); - } - - doc.setFontSize(7); - doc.setFontType('bold'); - SetPdfColor('White',doc); - - displayAccount(doc, invoice, 300, layout.accountTop, layout); - - - var y = layout.accountTop; - var left = layout.marginLeft; - var headerY = layout.headerTop; - - SetPdfColor('GrayLogo',doc); //set black color - doc.setFontSize(7); - - //show left column - SetPdfColor('Black',doc); //set black color - doc.setFontType('normal'); - - //publish filled box - doc.setDrawColor(200,200,200); - - if (NINJA.secondaryColor) { - setDocHexFill(doc, NINJA.secondaryColor); - } else { - doc.setFillColor(54,164,152); - } - - GlobalY=190; - doc.setLineWidth(0.5); - - var BlockLenght=220; - var x1 =595-BlockLenght; - var y1 = GlobalY-12; - var w2 = BlockLenght; - var h2 = getInvoiceDetailsHeight(invoice, layout) + layout.tablePadding + 2; - - doc.rect(x1, y1, w2, h2, 'FD'); - - SetPdfColor('SomeGreen', doc, 'secondary'); - doc.setFontSize('14'); - doc.setFontType('bold'); - doc.text(50, GlobalY, (invoice.is_quote ? invoiceLabels.your_quote : invoiceLabels.your_invoice).toUpperCase()); - - - var z=GlobalY; - z=z+30; - - doc.setFontSize('8'); - SetPdfColor('Black',doc); - var clientHeight = displayClient(doc, invoice, layout.marginLeft, z, layout); - layout.tableTop += Math.max(0, clientHeight - 75); - marginLeft2=395; - - //publish left side information - SetPdfColor('White',doc); - doc.setFontSize('8'); - var detailsHeight = displayInvoice(doc, invoice, marginLeft2, z-25, layout) + 75; - layout.tableTop = Math.max(layout.tableTop, layout.headerTop + detailsHeight + (2 * layout.tablePadding)); - - y=z+60; - x = GlobalY + 100; - doc.setFontType('bold'); - - doc.setFontSize(12); - doc.setFontType('bold'); - SetPdfColor('Black',doc); - displayInvoiceHeader(doc, invoice, layout); - - var y = displayInvoiceItems(doc, invoice, layout); - doc.setLineWidth(0.3); - displayNotesAndTerms(doc, layout, invoice, y); - y += displaySubtotals(doc, layout, invoice, y, layout.unitCostRight); - - doc.setFontType('bold'); - - doc.setFontSize(12); - x += doc.internal.getFontSize()*4; - Msg = invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due; - var TmpMsgX = layout.unitCostRight-(doc.getStringUnitWidth(Msg) * doc.internal.getFontSize()); - - doc.text(TmpMsgX, y, Msg); - - //SetPdfColor('LightBlue',doc); - AmountText = formatMoney(invoice.balance_amount , currencyId); - headerLeft=layout.headerRight+400; - var AmountX = headerLeft - (doc.getStringUnitWidth(AmountText) * doc.internal.getFontSize()); - SetPdfColor('SomeGreen', doc, 'secondary'); - doc.text(AmountX, y, AmountText);" - ]); - - DB::table('invoice_designs')->where('id', 3)->update([ - 'javascript' => " var client = invoice.client; - var account = invoice.account; - var currencyId = client.currency_id; - - layout.headerRight = 400; - layout.rowHeight = 15; - - - doc.setFontSize(7); - - // add header - doc.setLineWidth(0.5); - - if (NINJA.primaryColor) { - setDocHexFill(doc, NINJA.primaryColor); - setDocHexDraw(doc, NINJA.primaryColor); - } else { - doc.setDrawColor(242,101,34); - doc.setFillColor(242,101,34); - } - - var x1 =0; - var y1 = 0; - var w2 = 595; - var h2 = Math.max(110, getInvoiceDetailsHeight(invoice, layout) + 30); - doc.rect(x1, y1, w2, h2, 'FD'); - - SetPdfColor('White',doc); - - //second column - doc.setFontType('bold'); - var name = invoice.account.name; - if (name) { - doc.setFontSize('30'); - doc.setFontType('bold'); - doc.text(40, 50, name); - } - - if (invoice.image) - { - y=130; - var left = layout.headerRight - invoice.imageWidth; - doc.addImage(invoice.image, 'JPEG', layout.marginLeft, y); - } - - // add footer - doc.setLineWidth(0.5); - - if (NINJA.primaryColor) { - setDocHexFill(doc, NINJA.primaryColor); - setDocHexDraw(doc, NINJA.primaryColor); - } else { - doc.setDrawColor(242,101,34); - doc.setFillColor(242,101,34); - } - - var x1 = 0;//tableLeft-tablePadding ; - var y1 = 750; - var w2 = 596; - var h2 = 94;//doc.internal.getFontSize()*length+length*1.1;//+h;//+tablePadding; - - doc.rect(x1, y1, w2, h2, 'FD'); - - if (!invoice.is_pro && logoImages.imageLogo3) - { - pageHeight=820; - // var left = 25;//250;//headerRight ; - y=pageHeight-logoImages.imageLogoHeight3; - //var headerRight=370; - - //var left = headerRight - invoice.imageLogoWidth3; - doc.addImage(logoImages.imageLogo3, 'JPEG', 40, y, logoImages.imageLogoWidth3, logoImages.imageLogoHeight3); - } - - doc.setFontSize(10); - var marginLeft = 340; - displayAccount(doc, invoice, marginLeft, 780, layout); - - - SetPdfColor('White',doc); - doc.setFontSize('8'); - var detailsHeight = displayInvoice(doc, invoice, layout.headerRight, layout.accountTop-10, layout); - layout.headerTop = Math.max(layout.headerTop, detailsHeight + 50); - layout.tableTop = Math.max(layout.tableTop, detailsHeight + 150); - - SetPdfColor('Black',doc); //set black color - doc.setFontSize(7); - doc.setFontType('normal'); - displayClient(doc, invoice, layout.headerRight, layout.headerTop, layout); - - - - SetPdfColor('White',doc); - doc.setFontType('bold'); - - doc.setLineWidth(0.3); - if (NINJA.secondaryColor) { - setDocHexFill(doc, NINJA.secondaryColor); - setDocHexDraw(doc, NINJA.secondaryColor); - } else { - doc.setDrawColor(63,60,60); - doc.setFillColor(63,60,60); - } - - var left = layout.marginLeft - layout.tablePadding; - var top = layout.tableTop - layout.tablePadding; - var width = layout.marginRight - (2 * layout.tablePadding); - var height = 20; - doc.rect(left, top, width, height, 'FD'); - - - displayInvoiceHeader(doc, invoice, layout); - SetPdfColor('Black',doc); - var y = displayInvoiceItems(doc, invoice, layout); - - - var height1 = displayNotesAndTerms(doc, layout, invoice, y); - var height2 = displaySubtotals(doc, layout, invoice, y, layout.unitCostRight); - y += Math.max(height1, height2); - - - var left = layout.marginLeft - layout.tablePadding; - var top = y - layout.tablePadding; - var width = layout.marginRight - (2 * layout.tablePadding); - var height = 20; - if (NINJA.secondaryColor) { - setDocHexFill(doc, NINJA.secondaryColor); - setDocHexDraw(doc, NINJA.secondaryColor); - } else { - doc.setDrawColor(63,60,60); - doc.setFillColor(63,60,60); - } - doc.rect(left, top, width, height, 'FD'); - - doc.setFontType('bold'); - SetPdfColor('White', doc); - doc.setFontSize(12); - - var label = invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due; - var labelX = layout.unitCostRight-(doc.getStringUnitWidth(label) * doc.internal.getFontSize()); - doc.text(labelX, y+2, label); - - - doc.setFontType('normal'); - var amount = formatMoney(invoice.balance_amount , currencyId); - headerLeft=layout.headerRight+400; - var amountX = layout.lineTotalRight - (doc.getStringUnitWidth(amount) * doc.internal.getFontSize()); - doc.text(amountX, y+2, amount);" - ]); - - DB::table('invoice_designs')->where('id', 4)->update([ - 'javascript' => " var client = invoice.client; - var account = invoice.account; - var currencyId = client.currency_id; - - layout.accountTop += 25; - layout.headerTop += 25; - layout.tableTop += 25; - - if (invoice.image) - { - var left = layout.headerRight - invoice.imageWidth; - doc.addImage(invoice.image, 'JPEG', left, 50); - } - - /* table header */ - doc.setDrawColor(200,200,200); - doc.setFillColor(230,230,230); - - var detailsHeight = getInvoiceDetailsHeight(invoice, layout); - var left = layout.headerLeft - layout.tablePadding; - var top = layout.headerTop + detailsHeight - layout.rowHeight - layout.tablePadding; - var width = layout.headerRight - layout.headerLeft + (2 * layout.tablePadding); - var height = layout.rowHeight + 1; - doc.rect(left, top, width, height, 'FD'); - - doc.setFontSize(10); - doc.setFontType('normal'); - - displayAccount(doc, invoice, layout.marginLeft, layout.accountTop, layout); - displayClient(doc, invoice, layout.marginLeft, layout.headerTop, layout); - - displayInvoice(doc, invoice, layout.headerLeft, layout.headerTop, layout, layout.headerRight); - layout.tableTop = Math.max(layout.tableTop, layout.headerTop + detailsHeight + (2 * layout.tablePadding)); - - var headerY = layout.headerTop; - var total = 0; - - doc.setDrawColor(200,200,200); - doc.setFillColor(230,230,230); - var left = layout.marginLeft - layout.tablePadding; - var top = layout.tableTop - layout.tablePadding; - var width = layout.headerRight - layout.marginLeft + (2 * layout.tablePadding); - var height = layout.rowHeight + 2; - doc.rect(left, top, width, height, 'FD'); - - displayInvoiceHeader(doc, invoice, layout); - var y = displayInvoiceItems(doc, invoice, layout); - - doc.setFontSize(10); - - displayNotesAndTerms(doc, layout, invoice, y+20); - - y += displaySubtotals(doc, layout, invoice, y+20, 480) + 20; - - doc.setDrawColor(200,200,200); - doc.setFillColor(230,230,230); - - var left = layout.footerLeft - layout.tablePadding; - var top = y - layout.tablePadding; - var width = layout.headerRight - layout.footerLeft + (2 * layout.tablePadding); - var height = layout.rowHeight + 2; - doc.rect(left, top, width, height, 'FD'); - - doc.setFontType('bold'); - doc.text(layout.footerLeft, y, invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due); - - total = formatMoney(invoice.balance_amount, currencyId); - var totalX = layout.headerRight - (doc.getStringUnitWidth(total) * doc.internal.getFontSize()); - doc.text(totalX, y, total); - - if (!invoice.is_pro) { - doc.setFontType('normal'); - doc.text(layout.marginLeft, 790, 'Created by InvoiceNinja.com'); - }" - - ]); - - - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('invoice_designs', function($table) - { - $table->dropColumn('javascript'); - }); - - Schema::table('accounts', function($table) - { - $table->dropColumn('invoice_design'); - }); - } - -} diff --git a/app/database/migrations/2014_10_13_054100_add_invoice_number_settings.php b/app/database/migrations/2014_10_13_054100_add_invoice_number_settings.php deleted file mode 100644 index 377e9e013fa3..000000000000 --- a/app/database/migrations/2014_10_13_054100_add_invoice_number_settings.php +++ /dev/null @@ -1,63 +0,0 @@ -text('invoice_number_prefix')->nullable(); - $table->integer('invoice_number_counter')->default(1)->nullable(); - - $table->text('quote_number_prefix')->nullable(); - $table->integer('quote_number_counter')->default(1)->nullable(); - - $table->boolean('share_counter')->default(true); - }); - - // set initial counter value for accounts with invoices - $accounts = DB::table('accounts')->lists('id'); - - foreach ($accounts as $accountId) { - - $invoiceNumbers = DB::table('invoices')->where('account_id', $accountId)->lists('invoice_number'); - $max = 0; - - foreach ($invoiceNumbers as $invoiceNumber) { - $number = intval(preg_replace('/[^0-9]/', '', $invoiceNumber)); - $max = max($max, $number); - } - - DB::table('accounts')->where('id', $accountId)->update(['invoice_number_counter' => ++$max]); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropColumn('invoice_number_prefix'); - $table->dropColumn('invoice_number_counter'); - - $table->dropColumn('quote_number_prefix'); - $table->dropColumn('quote_number_counter'); - - $table->dropColumn('share_counter'); - }); - - } - -} diff --git a/app/database/migrations/2014_10_14_225227_add_danish_translation.php b/app/database/migrations/2014_10_14_225227_add_danish_translation.php deleted file mode 100644 index b7f8b42d5b42..000000000000 --- a/app/database/migrations/2014_10_14_225227_add_danish_translation.php +++ /dev/null @@ -1,29 +0,0 @@ -insert(['name' => 'Danish', 'locale' => 'da']); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - $language = Language::whereLocale('da')->first(); - $language->delete(); - } - -} diff --git a/app/database/migrations/2014_10_22_174452_add_affiliate_price.php b/app/database/migrations/2014_10_22_174452_add_affiliate_price.php deleted file mode 100644 index 305ad1f42135..000000000000 --- a/app/database/migrations/2014_10_22_174452_add_affiliate_price.php +++ /dev/null @@ -1,44 +0,0 @@ -decimal('price', 7, 2)->nullable(); - }); - - Schema::table('licenses', function($table) - { - $table->unsignedInteger('product_id')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('affiliates', function($table) - { - $table->dropColumn('price'); - }); - - Schema::table('licenses', function($table) - { - $table->dropColumn('product_id'); - }); - } - -} diff --git a/app/database/migrations/2014_10_30_184126_add_company_id_number.php b/app/database/migrations/2014_10_30_184126_add_company_id_number.php deleted file mode 100644 index 9e0fcb75b494..000000000000 --- a/app/database/migrations/2014_10_30_184126_add_company_id_number.php +++ /dev/null @@ -1,43 +0,0 @@ -string('id_number')->nullable(); - }); - - Schema::table('clients', function($table) - { - $table->string('id_number')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropColumn('id_number'); - }); - Schema::table('clients', function($table) - { - $table->dropColumn('id_number'); - }); - } - -} diff --git a/app/database/migrations/2014_11_04_200406_allow_null_client_currency.php b/app/database/migrations/2014_11_04_200406_allow_null_client_currency.php deleted file mode 100644 index 8007e8cb65c4..000000000000 --- a/app/database/migrations/2014_11_04_200406_allow_null_client_currency.php +++ /dev/null @@ -1,31 +0,0 @@ -boolean('is_amount_discount')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('invoices', function($table) - { - $table->dropColumn('is_amount_discount'); - }); - } - -} diff --git a/app/database/migrations/2015_02_12_102940_add_email_templates.php b/app/database/migrations/2015_02_12_102940_add_email_templates.php deleted file mode 100644 index 756466a79113..000000000000 --- a/app/database/migrations/2015_02_12_102940_add_email_templates.php +++ /dev/null @@ -1,38 +0,0 @@ -text('email_template_invoice')->nullable(); - $table->text('email_template_quote')->nullable(); - $table->text('email_template_payment')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropColumn('email_template_invoice'); - $table->dropColumn('email_template_quote'); - $table->dropColumn('email_template_payment'); - }); - } - -} diff --git a/app/database/migrations/2015_02_17_131714_support_token_billing.php b/app/database/migrations/2015_02_17_131714_support_token_billing.php deleted file mode 100644 index 0022d44cf2ef..000000000000 --- a/app/database/migrations/2015_02_17_131714_support_token_billing.php +++ /dev/null @@ -1,56 +0,0 @@ -smallInteger('token_billing_type_id')->default(TOKEN_BILLING_OPT_IN); - }); - - Schema::create('account_gateway_tokens', function($table) - { - $table->increments('id'); - $table->unsignedInteger('account_id'); - $table->unsignedInteger('contact_id'); - $table->unsignedInteger('account_gateway_id'); - $table->unsignedInteger('client_id'); - $table->string('token'); - - $table->timestamps(); - $table->softDeletes(); - - $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $table->foreign('contact_id')->references('id')->on('contacts')->onDelete('cascade'); - $table->foreign('account_gateway_id')->references('id')->on('account_gateways')->onDelete('cascade'); - $table->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); - }); - - DB::table('accounts')->update(['token_billing_type_id' => TOKEN_BILLING_OPT_IN]); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropColumn('token_billing_type_id'); - }); - - Schema::drop('account_gateway_tokens'); - } - -} \ No newline at end of file diff --git a/app/database/migrations/2015_02_27_081836_add_invoice_footer.php b/app/database/migrations/2015_02_27_081836_add_invoice_footer.php deleted file mode 100644 index 6d1cfb7a9efa..000000000000 --- a/app/database/migrations/2015_02_27_081836_add_invoice_footer.php +++ /dev/null @@ -1,44 +0,0 @@ -text('invoice_footer')->nullable(); - }); - - Schema::table('invoices', function($table) - { - $table->text('invoice_footer')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('accounts', function($table) - { - $table->dropColumn('invoice_footer'); - }); - - Schema::table('invoices', function($table) - { - $table->dropColumn('invoice_footer'); - }); - } - -} diff --git a/app/database/migrations/2015_03_03_140259_add_tokens.php b/app/database/migrations/2015_03_03_140259_add_tokens.php deleted file mode 100644 index 45b54e3ca4f8..000000000000 --- a/app/database/migrations/2015_03_03_140259_add_tokens.php +++ /dev/null @@ -1,54 +0,0 @@ -increments('id'); - $table->unsignedInteger('account_id')->index(); - $table->unsignedInteger('user_id'); - $table->timestamps(); - $table->softDeletes(); - - $table->string('name')->nullable(); - $table->string('token')->unique(); - - $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - - $table->unsignedInteger('public_id')->nullable(); - $table->unique(['account_id', 'public_id']); - }); - - Schema::table('activities', function($table) - { - $table->unsignedInteger('token_id')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('account_tokens'); - - Schema::table('activities', function($table) - { - $table->dropColumn('token_id'); - }); - } - -} diff --git a/app/database/migrations/2015_03_09_151011_add_ip_to_activity.php b/app/database/migrations/2015_03_09_151011_add_ip_to_activity.php deleted file mode 100644 index 552f75dfa808..000000000000 --- a/app/database/migrations/2015_03_09_151011_add_ip_to_activity.php +++ /dev/null @@ -1,34 +0,0 @@ -string('ip')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('activities', function($table) - { - $table->dropColumn('ip'); - }); - } - -} diff --git a/app/database/production.sqlite b/app/database/production.sqlite deleted file mode 100755 index 4380c89b7fb1d1b04413ac81eb40710bed26d4a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22528 zcmeHPKX2Pc6z7Sy8OQn8rj3Tcz(tEAByLO#iQ7y~U84wK1WB8q&BUImvrU8|Y4Vs@ zXggT0o26Znsox??zChOw{SIBabZLezS^Dls#-c>JfMvlJ^aP9K-6KzTzsGm{y?2lP z>cOfbI9>O{78A6gO=yH@pHix6+A4f6!8iMS1P3H5^c;6p=MGo3`9H5rLe-@HmlS-c zzt#WM|IzEDd27mZL1Q3DIM&Jg~ zZL+vvHZ0S$7H(SR$8g-RY~NdVn%s)GhyyE*cojfUqw0MXgV1Yqk82E*)dflq~&acOgO$5?H^T^zg)TVaD_g+^V#YOt?dhH^y+@8MxV0K z-ee*5d_ld~b+6Of8WZ+rjXIv-8+>0$?vpjOy$x`RO~=CbMln_C%EJ^;|2ptXhu1Y4&%J2BFhpVVgeTZOUTd zJDwf#7WV`U3XXs`HZ3May*4dIzeHz>u>m0zyyF? z06+A;u%0!W(gw_fgo}kj+Y!Z0MgqoMcuC-c%!S}vvskVa6}GJ+J=FQ6QEkkU9mDaO zd^=N{1p~8U&w(2ztC~y|{OI1@2ai_h-Fu&}d_yx~*ZI`KO_yR7Uv^VG8aRNkJm>d~?1AoQO?EIRBrnR+KMjOzS6*}K?1m08&s z)0_HTc{&e8ulP`qWQ`QrB+P(mR|-vb$P=WD+Lum}0gIw%eh3qK!DJXY8y*vJSTGAI z`$zwOFpI^j5rI)fKtBJ`{zp}N*l$E&Fa#3*zod~R{nlVDjn&n=-=8w7)hc=ZwPLC& zqe5*?=Q*jW8wL>_rYpYggpsgHxu(kwk_MZ;S3op@93Mzvd5bx2A$vWL+N#7BnYs#r zn{r3niL8y7M-a6Tj@O2m%)6ikZSr*%yMoS{bCSQyJejb?fk&60xiDAX`C{6rnkMOd zqST*t(Sk^cbl1bEzvfK-#^^sm-X-NI461M8KjB_KzR3T_YTClVA_92?kpJiLz!D-b zP6#Oeuf5W=SCyYfVcffqPaD2O0s7y!Xp8)R6ed0FBO)*)1d#s^30Q0v5f}jkr2XsKOHF%OnX2rahz@sx zGYJiBC>rQ^PkjfHs0btCReITw5kSJ?`)qls&jK>??$)AEy#^*Wol0f7YlWt$PRS_WFss|_Zg;& zArGn<+oH?|$;731K;l6ar2E*Ac37bNEt$XAmye3?|D1?94?BSf918--|BnTB{82>U zL?D3neqip{{ h55$T44U3S6coFg#F+AG10IvTH&Em0PMBwBj@E^9}Y$yN# diff --git a/app/database/seeds/.gitkeep b/app/database/seeds/.gitkeep deleted file mode 100755 index e69de29bb2d1..000000000000 diff --git a/app/database/seeds/ConstantsSeeder.php b/app/database/seeds/ConstantsSeeder.php deleted file mode 100755 index 53e3a26cf6d8..000000000000 --- a/app/database/seeds/ConstantsSeeder.php +++ /dev/null @@ -1,327 +0,0 @@ -first_name = 'Hillel'; - $contact->last_name = 'Hillel'; - $contact->email = 'hillelcoren@gmail.com'; - $contact->last_name = '2125551234'; - $client->contacts()->save($contact); - - $invoice = new Invoice; - $invoice->invoice_number = '0001'; - $client->invoices()->save($invoice); - - $invoice = new Invoice; - $invoice->invoice_number = '0002'; - $client->invoices()->save($invoice); - - $invoice = new Invoice; - $invoice->invoice_number = '0003'; - $client->invoices()->save($invoice); - - $invoice = new Invoice; - $invoice->invoice_number = '0004'; - $client->invoices()->save($invoice); - */ - - PaymentType::create(array('name' => 'Apply Credit')); - PaymentType::create(array('name' => 'Bank Transfer')); - PaymentType::create(array('name' => 'Cash')); - PaymentType::create(array('name' => 'Debit')); - PaymentType::create(array('name' => 'ACH')); - PaymentType::create(array('name' => 'Visa Card')); - PaymentType::create(array('name' => 'MasterCard')); - PaymentType::create(array('name' => 'American Express')); - PaymentType::create(array('name' => 'Discover Card')); - PaymentType::create(array('name' => 'Diners Card')); - PaymentType::create(array('name' => 'EuroCard')); - PaymentType::create(array('name' => 'Nova')); - PaymentType::create(array('name' => 'Credit Card Other')); - PaymentType::create(array('name' => 'PayPal')); - PaymentType::create(array('name' => 'Google Wallet')); - PaymentType::create(array('name' => 'Check')); - - Theme::create(array('name' => 'amelia')); - Theme::create(array('name' => 'cerulean')); - Theme::create(array('name' => 'cosmo')); - Theme::create(array('name' => 'cyborg')); - Theme::create(array('name' => 'flatly')); - Theme::create(array('name' => 'journal')); - Theme::create(array('name' => 'readable')); - Theme::create(array('name' => 'simplex')); - Theme::create(array('name' => 'slate')); - Theme::create(array('name' => 'spacelab')); - Theme::create(array('name' => 'united')); - Theme::create(array('name' => 'yeti')); - - InvoiceStatus::create(array('name' => 'Draft')); - InvoiceStatus::create(array('name' => 'Sent')); - InvoiceStatus::create(array('name' => 'Viewed')); - InvoiceStatus::create(array('name' => 'Partial')); - InvoiceStatus::create(array('name' => 'Paid')); - - Frequency::create(array('name' => 'Weekly')); - Frequency::create(array('name' => 'Two weeks')); - Frequency::create(array('name' => 'Four weeks')); - Frequency::create(array('name' => 'Monthly')); - Frequency::create(array('name' => 'Three months')); - Frequency::create(array('name' => 'Six months')); - Frequency::create(array('name' => 'Annually')); - - Industry::create(array('name' => 'Accounting & Legal')); - Industry::create(array('name' => 'Advertising')); - Industry::create(array('name' => 'Aerospace')); - Industry::create(array('name' => 'Agriculture')); - Industry::create(array('name' => 'Automotive')); - Industry::create(array('name' => 'Banking & Finance')); - Industry::create(array('name' => 'Biotechnology')); - Industry::create(array('name' => 'Broadcasting')); - Industry::create(array('name' => 'Business Services')); - Industry::create(array('name' => 'Commodities & Chemicals')); - Industry::create(array('name' => 'Communications')); - Industry::create(array('name' => 'Computers & Hightech')); - Industry::create(array('name' => 'Defense')); - Industry::create(array('name' => 'Energy')); - Industry::create(array('name' => 'Entertainment')); - Industry::create(array('name' => 'Government')); - Industry::create(array('name' => 'Healthcare & Life Sciences')); - Industry::create(array('name' => 'Insurance')); - Industry::create(array('name' => 'Manufacturing')); - Industry::create(array('name' => 'Marketing')); - Industry::create(array('name' => 'Media')); - Industry::create(array('name' => 'Nonprofit & Higher Ed')); - Industry::create(array('name' => 'Pharmaceuticals')); - Industry::create(array('name' => 'Professional Services & Consulting')); - Industry::create(array('name' => 'Real Estate')); - Industry::create(array('name' => 'Retail & Wholesale')); - Industry::create(array('name' => 'Sports')); - Industry::create(array('name' => 'Transportation')); - Industry::create(array('name' => 'Travel & Luxury')); - Industry::create(array('name' => 'Other')); - Industry::create(array('name' => 'Photography')); - - Size::create(array('name' => '1 - 3')); - Size::create(array('name' => '4 - 10')); - Size::create(array('name' => '11 - 50')); - Size::create(array('name' => '51 - 100')); - Size::create(array('name' => '101 - 500')); - Size::create(array('name' => '500+')); - - PaymentTerm::create(array('num_days' => 7, 'name' => 'Net 7')); - PaymentTerm::create(array('num_days' => 10, 'name' => 'Net 10')); - PaymentTerm::create(array('num_days' => 14, 'name' => 'Net 14')); - PaymentTerm::create(array('num_days' => 15, 'name' => 'Net 15')); - PaymentTerm::create(array('num_days' => 30, 'name' => 'Net 30')); - PaymentTerm::create(array('num_days' => 60, 'name' => 'Net 60')); - PaymentTerm::create(array('num_days' => 90, 'name' => 'Net 90')); - - Currency::create(array('name' => 'US Dollar', 'code' => 'USD', 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Pound Sterling', 'code' => 'GBP', 'symbol' => '£', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Euro', 'code' => 'EUR', 'symbol' => '€', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Rand', 'code' => 'ZAR', 'symbol' => 'R', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Danish Krone', 'code' => 'DKK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Israeli Shekel', 'code' => 'ILS', 'symbol' => 'NIS ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Swedish Krona', 'code' => 'SEK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Kenyan Shilling', 'code' => 'KES', 'symbol' => 'KSh ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Canadian Dollar', 'code' => 'CAD', 'symbol' => 'C$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Philippine Peso', 'code' => 'PHP', 'symbol' => 'P ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Indian Rupee', 'code' => 'INR', 'symbol' => 'Rs. ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Australian Dollar', 'code' => 'AUD', 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Singapore Dollar', 'code' => 'SGD', 'symbol' => 'SGD ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Norske Kroner', 'code' => 'NOK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'New Zealand Dollar', 'code' => 'NZD', 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Vietnamese Dong', 'code' => 'VND', 'symbol' => 'VND ', 'precision' => '0', 'thousand_separator' => ',', 'decimal_separator' => '.')); - Currency::create(array('name' => 'Swiss Franc', 'code' => 'CHF', 'symbol' => 'CHF ', 'precision' => '2', 'thousand_separator' => '\'', 'decimal_separator' => '.')); - - - DatetimeFormat::create(array('format' => 'd/M/Y g:i a', 'label' => '10/Mar/2013')); - DatetimeFormat::create(array('format' => 'd-M-Yk g:i a', 'label' => '10-Mar-2013')); - DatetimeFormat::create(array('format' => 'd/F/Y g:i a', 'label' => '10/March/2013')); - DatetimeFormat::create(array('format' => 'd-F-Y g:i a', 'label' => '10-March-2013')); - DatetimeFormat::create(array('format' => 'M j, Y g:i a', 'label' => 'Mar 10, 2013 6:15 pm')); - DatetimeFormat::create(array('format' => 'F j, Y g:i a', 'label' => 'March 10, 2013 6:15 pm')); - DatetimeFormat::create(array('format' => 'D M jS, Y g:ia', 'label' => 'Mon March 10th, 2013 6:15 pm')); - - DateFormat::create(array('format' => 'd/M/Y', 'picker_format' => 'dd/M/yyyy', 'label' => '10/Mar/2013')); - DateFormat::create(array('format' => 'd-M-Y', 'picker_format' => 'dd-M-yyyy', 'label' => '10-Mar-2013')); - DateFormat::create(array('format' => 'd/F/Y', 'picker_format' => 'dd/MM/yyyy', 'label' => '10/March/2013')); - DateFormat::create(array('format' => 'd-F-Y', 'picker_format' => 'dd-MM-yyyy', 'label' => '10-March-2013')); - DateFormat::create(array('format' => 'M j, Y', 'picker_format' => 'M d, yyyy', 'label' => 'Mar 10, 2013')); - DateFormat::create(array('format' => 'F j, Y', 'picker_format' => 'MM d, yyyy', 'label' => 'March 10, 2013')); - DateFormat::create(array('format' => 'D M j, Y', 'picker_format' => 'D MM d, yyyy', 'label' => 'Mon March 10, 2013')); - - PaymentLibrary::create(['name' => 'Omnipay']); - PaymentLibrary::create(['name' => 'PHP-Payments']); - - /* - d, dd: Numeric date, no leading zero and leading zero, respectively. Eg, 5, 05. - D, DD: Abbreviated and full weekday names, respectively. Eg, Mon, Monday. - m, mm: Numeric month, no leading zero and leading zero, respectively. Eg, 7, 07. - M, MM: Abbreviated and full month names, respectively. Eg, Jan, January - yy, yyyy: 2- and 4-digit years, respectively. Eg, 12, 2012.) - */ - - $gateways = [ - array('name'=>'Authorize.Net AIM', 'provider'=>'AuthorizeNet_AIM'), - array('name'=>'Authorize.Net SIM', 'provider'=>'AuthorizeNet_SIM'), - array('name'=>'CardSave', 'provider'=>'CardSave'), - array('name'=>'Eway Rapid', 'provider'=>'Eway_Rapid'), - array('name'=>'FirstData Connect', 'provider'=>'FirstData_Connect'), - array('name'=>'GoCardless', 'provider'=>'GoCardless'), - array('name'=>'Migs ThreeParty', 'provider'=>'Migs_ThreeParty'), - array('name'=>'Migs TwoParty', 'provider'=>'Migs_TwoParty'), - array('name'=>'Mollie', 'provider'=>'Mollie'), - array('name'=>'MultiSafepay', 'provider'=>'MultiSafepay'), - array('name'=>'Netaxept', 'provider'=>'Netaxept'), - array('name'=>'NetBanx', 'provider'=>'NetBanx'), - array('name'=>'PayFast', 'provider'=>'PayFast'), - array('name'=>'Payflow Pro', 'provider'=>'Payflow_Pro'), - array('name'=>'PaymentExpress PxPay', 'provider'=>'PaymentExpress_PxPay'), - array('name'=>'PaymentExpress PxPost', 'provider'=>'PaymentExpress_PxPost'), - array('name'=>'PayPal Express', 'provider'=>'PayPal_Express'), - array('name'=>'PayPal Pro', 'provider'=>'PayPal_Pro'), - array('name'=>'Pin', 'provider'=>'Pin'), - array('name'=>'SagePay Direct', 'provider'=>'SagePay_Direct'), - array('name'=>'SagePay Server', 'provider'=>'SagePay_Server'), - array('name'=>'SecurePay DirectPost', 'provider'=>'SecurePay_DirectPost'), - array('name'=>'Stripe', 'provider'=>'Stripe'), - array('name'=>'TargetPay Direct eBanking', 'provider'=>'TargetPay_Directebanking'), - array('name'=>'TargetPay Ideal', 'provider'=>'TargetPay_Ideal'), - array('name'=>'TargetPay Mr Cash', 'provider'=>'TargetPay_Mrcash'), - array('name'=>'TwoCheckout', 'provider'=>'TwoCheckout'), - array('name'=>'WorldPay', 'provider'=>'WorldPay'), - ]; - - foreach ($gateways as $gateway) - { - Gateway::create($gateway); - } - - $timezones = array( - 'Pacific/Midway' => "(GMT-11:00) Midway Island", - 'US/Samoa' => "(GMT-11:00) Samoa", - 'US/Hawaii' => "(GMT-10:00) Hawaii", - 'US/Alaska' => "(GMT-09:00) Alaska", - 'US/Pacific' => "(GMT-08:00) Pacific Time (US & Canada)", - 'America/Tijuana' => "(GMT-08:00) Tijuana", - 'US/Arizona' => "(GMT-07:00) Arizona", - 'US/Mountain' => "(GMT-07:00) Mountain Time (US & Canada)", - 'America/Chihuahua' => "(GMT-07:00) Chihuahua", - 'America/Mazatlan' => "(GMT-07:00) Mazatlan", - 'America/Mexico_City' => "(GMT-06:00) Mexico City", - 'America/Monterrey' => "(GMT-06:00) Monterrey", - 'Canada/Saskatchewan' => "(GMT-06:00) Saskatchewan", - 'US/Central' => "(GMT-06:00) Central Time (US & Canada)", - 'US/Eastern' => "(GMT-05:00) Eastern Time (US & Canada)", - 'US/East-Indiana' => "(GMT-05:00) Indiana (East)", - 'America/Bogota' => "(GMT-05:00) Bogota", - 'America/Lima' => "(GMT-05:00) Lima", - 'America/Caracas' => "(GMT-04:30) Caracas", - 'Canada/Atlantic' => "(GMT-04:00) Atlantic Time (Canada)", - 'America/La_Paz' => "(GMT-04:00) La Paz", - 'America/Santiago' => "(GMT-04:00) Santiago", - 'Canada/Newfoundland' => "(GMT-03:30) Newfoundland", - 'America/Buenos_Aires' => "(GMT-03:00) Buenos Aires", - 'Greenland' => "(GMT-03:00) Greenland", - 'Atlantic/Stanley' => "(GMT-02:00) Stanley", - 'Atlantic/Azores' => "(GMT-01:00) Azores", - 'Atlantic/Cape_Verde' => "(GMT-01:00) Cape Verde Is.", - 'Africa/Casablanca' => "(GMT) Casablanca", - 'Europe/Dublin' => "(GMT) Dublin", - 'Europe/Lisbon' => "(GMT) Lisbon", - 'Europe/London' => "(GMT) London", - 'Africa/Monrovia' => "(GMT) Monrovia", - 'Europe/Amsterdam' => "(GMT+01:00) Amsterdam", - 'Europe/Belgrade' => "(GMT+01:00) Belgrade", - 'Europe/Berlin' => "(GMT+01:00) Berlin", - 'Europe/Bratislava' => "(GMT+01:00) Bratislava", - 'Europe/Brussels' => "(GMT+01:00) Brussels", - 'Europe/Budapest' => "(GMT+01:00) Budapest", - 'Europe/Copenhagen' => "(GMT+01:00) Copenhagen", - 'Europe/Ljubljana' => "(GMT+01:00) Ljubljana", - 'Europe/Madrid' => "(GMT+01:00) Madrid", - 'Europe/Paris' => "(GMT+01:00) Paris", - 'Europe/Prague' => "(GMT+01:00) Prague", - 'Europe/Rome' => "(GMT+01:00) Rome", - 'Europe/Sarajevo' => "(GMT+01:00) Sarajevo", - 'Europe/Skopje' => "(GMT+01:00) Skopje", - 'Europe/Stockholm' => "(GMT+01:00) Stockholm", - 'Europe/Vienna' => "(GMT+01:00) Vienna", - 'Europe/Warsaw' => "(GMT+01:00) Warsaw", - 'Europe/Zagreb' => "(GMT+01:00) Zagreb", - 'Europe/Athens' => "(GMT+02:00) Athens", - 'Europe/Bucharest' => "(GMT+02:00) Bucharest", - 'Africa/Cairo' => "(GMT+02:00) Cairo", - 'Africa/Harare' => "(GMT+02:00) Harare", - 'Europe/Helsinki' => "(GMT+02:00) Helsinki", - 'Europe/Istanbul' => "(GMT+02:00) Istanbul", - 'Asia/Jerusalem' => "(GMT+02:00) Jerusalem", - 'Europe/Kiev' => "(GMT+02:00) Kyiv", - 'Europe/Minsk' => "(GMT+02:00) Minsk", - 'Europe/Riga' => "(GMT+02:00) Riga", - 'Europe/Sofia' => "(GMT+02:00) Sofia", - 'Europe/Tallinn' => "(GMT+02:00) Tallinn", - 'Europe/Vilnius' => "(GMT+02:00) Vilnius", - 'Asia/Baghdad' => "(GMT+03:00) Baghdad", - 'Asia/Kuwait' => "(GMT+03:00) Kuwait", - 'Africa/Nairobi' => "(GMT+03:00) Nairobi", - 'Asia/Riyadh' => "(GMT+03:00) Riyadh", - 'Asia/Tehran' => "(GMT+03:30) Tehran", - 'Europe/Moscow' => "(GMT+04:00) Moscow", - 'Asia/Baku' => "(GMT+04:00) Baku", - 'Europe/Volgograd' => "(GMT+04:00) Volgograd", - 'Asia/Muscat' => "(GMT+04:00) Muscat", - 'Asia/Tbilisi' => "(GMT+04:00) Tbilisi", - 'Asia/Yerevan' => "(GMT+04:00) Yerevan", - 'Asia/Kabul' => "(GMT+04:30) Kabul", - 'Asia/Karachi' => "(GMT+05:00) Karachi", - 'Asia/Tashkent' => "(GMT+05:00) Tashkent", - 'Asia/Kolkata' => "(GMT+05:30) Kolkata", - 'Asia/Kathmandu' => "(GMT+05:45) Kathmandu", - 'Asia/Yekaterinburg' => "(GMT+06:00) Ekaterinburg", - 'Asia/Almaty' => "(GMT+06:00) Almaty", - 'Asia/Dhaka' => "(GMT+06:00) Dhaka", - 'Asia/Novosibirsk' => "(GMT+07:00) Novosibirsk", - 'Asia/Bangkok' => "(GMT+07:00) Bangkok", - 'Asia/Ho_Chi_Minh' => "(GMT+07.00) Ho Chi Minh", - 'Asia/Jakarta' => "(GMT+07:00) Jakarta", - 'Asia/Krasnoyarsk' => "(GMT+08:00) Krasnoyarsk", - 'Asia/Chongqing' => "(GMT+08:00) Chongqing", - 'Asia/Hong_Kong' => "(GMT+08:00) Hong Kong", - 'Asia/Kuala_Lumpur' => "(GMT+08:00) Kuala Lumpur", - 'Australia/Perth' => "(GMT+08:00) Perth", - 'Asia/Singapore' => "(GMT+08:00) Singapore", - 'Asia/Taipei' => "(GMT+08:00) Taipei", - 'Asia/Ulaanbaatar' => "(GMT+08:00) Ulaan Bataar", - 'Asia/Urumqi' => "(GMT+08:00) Urumqi", - 'Asia/Irkutsk' => "(GMT+09:00) Irkutsk", - 'Asia/Seoul' => "(GMT+09:00) Seoul", - 'Asia/Tokyo' => "(GMT+09:00) Tokyo", - 'Australia/Adelaide' => "(GMT+09:30) Adelaide", - 'Australia/Darwin' => "(GMT+09:30) Darwin", - 'Asia/Yakutsk' => "(GMT+10:00) Yakutsk", - 'Australia/Brisbane' => "(GMT+10:00) Brisbane", - 'Australia/Canberra' => "(GMT+10:00) Canberra", - 'Pacific/Guam' => "(GMT+10:00) Guam", - 'Australia/Hobart' => "(GMT+10:00) Hobart", - 'Australia/Melbourne' => "(GMT+10:00) Melbourne", - 'Pacific/Port_Moresby' => "(GMT+10:00) Port Moresby", - 'Australia/Sydney' => "(GMT+10:00) Sydney", - 'Asia/Vladivostok' => "(GMT+11:00) Vladivostok", - 'Asia/Magadan' => "(GMT+12:00) Magadan", - 'Pacific/Auckland' => "(GMT+12:00) Auckland", - 'Pacific/Fiji' => "(GMT+12:00) Fiji", - ); - - foreach ($timezones as $name => $location) { - Timezone::create(array('name'=>$name, 'location'=>$location)); - } - } -} diff --git a/app/database/seeds/CountriesSeeder.php b/app/database/seeds/CountriesSeeder.php deleted file mode 100755 index 7fe9c9e3fb05..000000000000 --- a/app/database/seeds/CountriesSeeder.php +++ /dev/null @@ -1,37 +0,0 @@ -delete(); - - //Get all of the countries - $countries = Countries::getList(); - foreach ($countries as $countryId => $country){ - DB::table('countries')->insert(array( - 'id' => $countryId, - 'capital' => ((isset($country['capital'])) ? $country['capital'] : null), - 'citizenship' => ((isset($country['citizenship'])) ? $country['citizenship'] : null), - 'country_code' => $country['country-code'], - 'currency' => ((isset($country['currency'])) ? $country['currency'] : null), - 'currency_code' => ((isset($country['currency_code'])) ? $country['currency_code'] : null), - 'currency_sub_unit' => ((isset($country['currency_sub_unit'])) ? $country['currency_sub_unit'] : null), - 'full_name' => ((isset($country['full_name'])) ? $country['full_name'] : null), - 'iso_3166_2' => $country['iso_3166_2'], - 'iso_3166_3' => $country['iso_3166_3'], - 'name' => $country['name'], - 'region_code' => $country['region-code'], - 'sub_region_code' => $country['sub-region-code'], - 'eea' => (bool)$country['eea'] - )); - } - } -} \ No newline at end of file diff --git a/app/database/seeds/DatabaseSeeder.php b/app/database/seeds/DatabaseSeeder.php deleted file mode 100755 index 955e643203b9..000000000000 --- a/app/database/seeds/DatabaseSeeder.php +++ /dev/null @@ -1,26 +0,0 @@ -command->info('Running DatabaseSeeder'); - - Eloquent::unguard(); - - $this->call('UserTableSeeder'); - $this->call('ConstantsSeeder'); - - $this->call('CountriesSeeder'); - $this->command->info('Seeded the countries!'); - - $this->call('PaymentLibrariesSeeder'); - $this->command->info('Seeded the Payment Libraries!'); - } - -} \ No newline at end of file diff --git a/app/database/seeds/PaymentLibrariesSeeder.php b/app/database/seeds/PaymentLibrariesSeeder.php deleted file mode 100644 index 186b656f769f..000000000000 --- a/app/database/seeds/PaymentLibrariesSeeder.php +++ /dev/null @@ -1,35 +0,0 @@ - 'BeanStream', 'provider' => 'BeanStream', 'payment_library_id' => 2], - ['name' => 'Psigate', 'provider' => 'Psigate', 'payment_library_id' => 2], - ['name' => 'moolah', 'provider' => 'AuthorizeNet_AIM', 'sort_order' => 1, 'recommended' => 1, 'site_url' => 'https://invoiceninja.mymoolah.com/', 'payment_library_id' => 1], - ['name' => 'Alipay', 'provider' => 'Alipay_Express', 'payment_library_id' => 1], - ['name' => 'Buckaroo', 'provider' => 'Buckaroo_CreditCard', 'payment_library_id' => 1], - ['name' => 'Coinbase', 'provider' => 'Coinbase', 'payment_library_id' => 1], - ['name' => 'DataCash', 'provider' => 'DataCash', 'payment_library_id' => 1], - ['name' => 'Neteller', 'provider' => 'Neteller', 'payment_library_id' => 1], - ['name' => 'Pacnet', 'provider' => 'Pacnet', 'payment_library_id' => 1], - ['name' => 'PaymentSense', 'provider' => 'PaymentSense', 'payment_library_id' => 1], - ['name' => 'Realex', 'provider' => 'Realex_Remote', 'payment_library_id' => 1], - ['name' => 'Sisow', 'provider' => 'Sisow', 'payment_library_id' => 1], - ['name' => 'Skrill', 'provider' => 'Skrill', 'payment_library_id' => 1] - ]; - - foreach ($gateways as $gateway) - { - if (!DB::table('gateways')->where('name', '=', $gateway['name'])->get()) - { - Gateway::create($gateway); - } - } - - } -} \ No newline at end of file diff --git a/app/database/seeds/SecurePaymentFormSeeder.php b/app/database/seeds/SecurePaymentFormSeeder.php deleted file mode 100644 index 77bbe1ba6cf2..000000000000 --- a/app/database/seeds/SecurePaymentFormSeeder.php +++ /dev/null @@ -1,187 +0,0 @@ -delete(); - DB::table('invoices')->delete(); - DB::table('contacts')->delete(); - DB::table('clients')->delete(); - DB::table('account_gateways')->delete(); - //To reset the auto increment - $statement = " - ALTER TABLE invitations AUTO_INCREMENT = 1; - ALTER TABLE invoices AUTO_INCREMENT = 1; - ALTER TABLE contacts AUTO_INCREMENT = 1; - ALTER TABLE clients AUTO_INCREMENT = 1; - ALTER TABLE account_gateways AUTO_INCREMENT = 1; - "; - - DB::unprepared($statement); - - //$firstName = 'Oscar'; -// $lastName = 'Thompson'; -// $firstName_2 = 'Philip'; -// $lastName_2 = 'Jonsson'; -// -// $user = AccountGateway::create(array( -// 'account_id' => 1, -// 'user_id' => 1, -// 'gateway_id' => 4, -// 'config' => '{"bla":"vla","bli":"cla"}', -// 'public_id' => 1, -// 'accepted_credit_cards' => 8 -// )); -// -// $user2 = AccountGateway::create(array( -// 'account_id' => 2, -// 'user_id' => 2, -// 'gateway_id' => 5, -// 'config' => '{"bla":"vla","bli":"cla"}', -// 'public_id' => 2, -// 'accepted_credit_cards' => 7 -// )); -// -// $client = Client::create(array( -// 'user_id' => 1, -// 'account_id' => 1, -// 'currency_id' => 1, -// 'name' => $firstName.' '.$lastName, -// 'address1' => '2119 Howe Course', -// 'address2' => '2118 Howe Course', -// 'city' => 'West Chazport', -// 'state' => 'Utah', -// 'postal_code' => '31572', -// 'country_id' => 752, -// 'work_phone' => '012-345678', -// 'private_notes' => 'bla bla bla bla bla bla bla', -// 'balance' => 10.4, -// 'paid_to_date' => 10.2, -// 'website' => 'awebsite.com', -// 'industry_id' => 8, -// 'is_deleted' => 0, -// 'payment_terms' => 2, -// 'public_id' => 1, -// 'custom_value1' => $firstName, -// 'custom_value2' => $firstName -// )); -// -// $client2 = Client::create(array( -// 'user_id' => 2, -// 'account_id' => 2, -// 'currency_id' => 1, -// 'name' => $firstName_2.' '.$lastName_2, -// 'address1' => '1118 Muma Road', -// 'address2' => '1118 Muma Road', -// 'city' => 'New Orleans', -// 'state' => 'Arizona', -// 'postal_code' => '31572', -// 'country_id' => 752, -// 'work_phone' => '012-345678', -// 'private_notes' => 'bla bla bla bla bla bla bla', -// 'balance' => 10.4, -// 'paid_to_date' => 10.2, -// 'website' => 'bodosite.com', -// 'industry_id' => 8, -// 'is_deleted' => 0, -// 'payment_terms' => 2, -// 'public_id' => 1, -// 'custom_value1' => $firstName_2, -// 'custom_value2' => $firstName_2 -// )); -// -// $contact = Contact::create(array( -// 'account_id' => 1, -// 'user_id' => 1, -// 'client_id' => 1, -// 'is_primary' => 0, -// 'send_invoice' => 0, -// 'first_name' => $firstName, -// 'last_name' => $lastName, -// 'email' => 'an@email.com', -// 'phone' => '012-345678', -// 'public_id' => 1 -// )); -// -// $contact2 = Contact::create(array( -// 'account_id' => 2, -// 'user_id' => 2, -// 'client_id' => 2, -// 'is_primary' => 0, -// 'send_invoice' => 0, -// 'first_name' => $firstName_2, -// 'last_name' => $lastName_2, -// 'email' => 'the@email.com', -// 'phone' => '012-345678', -// 'public_id' => 2 -// )); -// -// $invoice = Invoice::create(array( -// 'client_id' => 1, -// 'user_id' => 1, -// 'account_id' => 1, -// 'invoice_number' => 1, -// 'discount' => 0.4, -// 'po_number' => $firstName, -// 'terms' => 'bla bla bla bla bla bla bla', -// 'public_notes' => 'bla bla bla bla bla bla bla', -// 'is_deleted' => 0, -// 'is_recurring' => 0, -// 'frequency_id' => 1, -// 'tax_name' => 'moms', -// 'tax_rate' => 33.0, -// 'amount' => 10.0, -// 'balance' => 8.0, -// 'public_id' => 1, -// 'is_quote' => 0 -// )); -// -// $invoice2 = Invoice::create(array( -// 'client_id' => 2, -// 'user_id' => 2, -// 'account_id' => 2, -// 'invoice_number' => 2, -// 'discount' => 0.4, -// 'po_number' => $firstName_2, -// 'terms' => 'bla bla bla bla bla bla bla', -// 'public_notes' => 'bla bla bla bla bla bla bla', -// 'is_deleted' => 0, -// 'is_recurring' => 0, -// 'frequency_id' => 1, -// 'tax_name' => 'moms', -// 'tax_rate' => 33.0, -// 'amount' => 10.0, -// 'balance' => 8.0, -// 'public_id' => 2, -// 'is_quote' => 0 -// )); -// -// $invitation = Invitation::create(array( -// 'account_id' => 1, -// 'user_id' => 1, -// 'contact_id' => 1, -// 'invoice_id' => 1, -// 'invitation_key' => 'aaabbb', -// 'transaction_reference' => 'bla bla bla bla bla bla bla', -// 'public_id' => 1 -// )); -// -// $invitation2 = Invitation::create(array( -// 'account_id' => 2, -// 'user_id' => 2, -// 'contact_id' => 2, -// 'invoice_id' => 2, -// 'invitation_key' => 'cccddd', -// 'transaction_reference' => 'bla bla bla bla bla bla bla', -// 'public_id' => 2 -// )); - } -} \ No newline at end of file diff --git a/app/database/seeds/UserTableSeeder.php b/app/database/seeds/UserTableSeeder.php deleted file mode 100755 index 4250450755d8..000000000000 --- a/app/database/seeds/UserTableSeeder.php +++ /dev/null @@ -1,11 +0,0 @@ -version != NINJA_VERSION) { - $params = [ - 'user_version' => NINJA_VERSION, - 'latest_version'=> $data->version, - 'releases_link' => link_to(RELEASES_URL, 'Invoice Ninja', ['target' => '_blank']) - ]; - Session::put('news_feed_id', NEW_VERSION_AVAILABLE); - Session::put('news_feed_message', trans('texts.new_version_available', $params)); - } else { - Session::put('news_feed_id', $data->id); - if ($data->message && $data->id > Auth::user()->news_feed_id) { - Session::put('news_feed_message', $data->message); - } - } - } else { - Session::put('news_feed_id', true); - } - } - } - - // Check if we're requesting to change the account's language - if (Input::has('lang')) - { - $locale = Input::get('lang'); - App::setLocale($locale); - Session::set(SESSION_LOCALE, $locale); - - if (Auth::check()) - { - if ($language = Language::whereLocale($locale)->first()) - { - $account = Auth::user()->account; - $account->language_id = $language->id; - $account->save(); - } - } - } - else if (Auth::check()) - { - $locale = Session::get(SESSION_LOCALE, DEFAULT_LOCALE); - App::setLocale($locale); - } - - // Make sure the account/user localization settings are in the session - if (Auth::check() && !Session::has(SESSION_TIMEZONE)) - { - Event::fire('user.refresh'); - } - - // Check if the user is claiming a license (ie, additional invoices, white label, etc.) - $claimingLicense = Utils::startsWith($_SERVER['REQUEST_URI'], '/claim_license'); - if (!$claimingLicense && Input::has('license_key') && Input::has('product_id')) - { - $licenseKey = Input::get('license_key'); - $productId = Input::get('product_id'); - - $data = trim(file_get_contents((Utils::isNinjaDev() ? 'http://ninja.dev' : NINJA_APP_URL) . "/claim_license?license_key={$licenseKey}&product_id={$productId}")); - - if ($productId == PRODUCT_INVOICE_DESIGNS) - { - if ($data = json_decode($data)) - { - foreach ($data as $item) - { - $design = new InvoiceDesign(); - $design->id = $item->id; - $design->name = $item->name; - $design->javascript = $item->javascript; - $design->save(); - } - - if (!Utils::isNinjaProd()) { - Cache::forget('invoice_designs_cache_' . Auth::user()->maxInvoiceDesignId()); - } - - Session::flash('message', trans('texts.bought_designs')); - } - } - else if ($productId == PRODUCT_WHITE_LABEL) - { - if ($data == 'valid') - { - $account = Auth::user()->account; - $account->pro_plan_paid = NINJA_DATE; - $account->save(); - - Session::flash('message', trans('texts.bought_white_label')); - } - } - } -}); - - -App::after(function($request, $response) -{ - // -}); - -/* -|-------------------------------------------------------------------------- -| Authentication Filters -|-------------------------------------------------------------------------- -| -| The following filters are used to verify that the user of the current -| session is logged into this application. The "basic" filter easily -| integrates HTTP Basic authentication for quick, simple checking. -| -*/ - -Route::filter('auth', function() -{ - if (Auth::guest()) - { - if (Utils::isNinja() || Account::count() == 0) - { - return Redirect::guest('/'); - } - else - { - return Redirect::guest('/login'); - } - } -}); - - -Route::filter('auth.basic', function() -{ - return Auth::basic(); -}); - -Route::filter('api.access', function() -{ - $headers = Utils::getApiHeaders(); - - // check for a valid token - $token = AccountToken::where('token', '=', Request::header('X-Ninja-Token'))->first(['id', 'user_id']); - - if ($token) { - Auth::loginUsingId($token->user_id); - Session::set('token_id', $token->id); - } else { - sleep(3); - return Response::make('Invalid token', 403, $headers); - } - - if (!Utils::isNinja()) { - return null; - } - - if (!Utils::isPro()) { - return Response::make('API requires pro plan', 403, $headers); - } else { - $accountId = Auth::user()->account->id; - - // http://stackoverflow.com/questions/1375501/how-do-i-throttle-my-sites-api-users - $hour = 60 * 60; - $hour_limit = 100; # users are limited to 100 requests/hour - $hour_throttle = Cache::get("hour_throttle:{$accountId}", null); - $last_api_request = Cache::get("last_api_request:{$accountId}", 0); - $last_api_diff = time() - $last_api_request; - - if (is_null($hour_throttle)) { - $new_hour_throttle = 0; - } else { - $new_hour_throttle = $hour_throttle - $last_api_diff; - $new_hour_throttle = $new_hour_throttle < 0 ? 0 : $new_hour_throttle; - $new_hour_throttle += $hour / $hour_limit; - $hour_hits_remaining = floor(( $hour - $new_hour_throttle ) * $hour_limit / $hour); - $hour_hits_remaining = $hour_hits_remaining >= 0 ? $hour_hits_remaining : 0; - } - - if ($new_hour_throttle > $hour) { - $wait = ceil($new_hour_throttle - $hour); - sleep(1); - return Response::make("Please wait {$wait} second(s)", 403, $headers); - } - - Cache::put("hour_throttle:{$accountId}", $new_hour_throttle, 10); - Cache::put("last_api_request:{$accountId}", time(), 10); - } - - return null; -}); - - - -/* -|-------------------------------------------------------------------------- -| Guest Filter -|-------------------------------------------------------------------------- -| -| The "guest" filter is the counterpart of the authentication filters as -| it simply checks that the current user is not logged in. A redirect -| response will be issued if they are, which you may freely change. -| -*/ - -Route::filter('guest', function() -{ - if (Auth::check()) return Redirect::to('/'); -}); - -/* -|-------------------------------------------------------------------------- -| CSRF Protection Filter -|-------------------------------------------------------------------------- -| -| The CSRF filter is responsible for protecting your application against -| cross-site request forgery attacks. If this special token in a user -| session does not match the one given in this request, we'll bail. -| -*/ - -Route::filter('csrf', function() -{ - if ($_SERVER['REQUEST_URI'] != '/signup/register') - { - $token = Request::ajax() ? Request::header('X-CSRF-Token') : Input::get('_token'); - - if (Session::token() != $token) - { - Session::flash('warning', trans('texts.session_expired')); - - return Redirect::to('/'); - //throw new Illuminate\Session\TokenMismatchException; - } - } -}); \ No newline at end of file diff --git a/app/handlers/InvoiceEventHandler.php b/app/handlers/InvoiceEventHandler.php deleted file mode 100755 index 7b6f4e9cc52b..000000000000 --- a/app/handlers/InvoiceEventHandler.php +++ /dev/null @@ -1,51 +0,0 @@ -userMailer = $userMailer; - $this->contactMailer = $contactMailer; - } - - public function subscribe($events) - { - $events->listen('invoice.sent', 'InvoiceEventHandler@onSent'); - $events->listen('invoice.viewed', 'InvoiceEventHandler@onViewed'); - $events->listen('invoice.paid', 'InvoiceEventHandler@onPaid'); - } - - public function onSent($invoice) - { - $this->sendNotifications($invoice, 'sent'); - } - - public function onViewed($invoice) - { - $this->sendNotifications($invoice, 'viewed'); - } - - public function onPaid($payment) - { - $this->contactMailer->sendPaymentConfirmation($payment); - - $this->sendNotifications($payment->invoice, 'paid', $payment); - } - - private function sendNotifications($invoice, $type, $payment = null) - { - foreach ($invoice->account->users as $user) - { - if ($user->{'notify_' . $type}) - { - $this->userMailer->sendNotification($user, $invoice, $type, $payment); - } - } - } -} \ No newline at end of file diff --git a/app/handlers/UserEventHandler.php b/app/handlers/UserEventHandler.php deleted file mode 100755 index 19ee6f5de936..000000000000 --- a/app/handlers/UserEventHandler.php +++ /dev/null @@ -1,30 +0,0 @@ -listen('user.signup', 'UserEventHandler@onSignup'); - $events->listen('user.login', 'UserEventHandler@onLogin'); - - $events->listen('user.refresh', 'UserEventHandler@onRefresh'); - } - - public function onSignup() - { - } - - public function onLogin() - { - $account = Auth::user()->account; - $account->last_login = Carbon::now()->toDateTimeString(); - $account->save(); - - Event::fire('user.refresh'); - } - - public function onRefresh() - { - Auth::user()->account->loadLocalizationSettings(); - } -} diff --git a/app/includes/parsecsv.lib.php b/app/includes/parsecsv.lib.php deleted file mode 100755 index c5941b9dbcbd..000000000000 --- a/app/includes/parsecsv.lib.php +++ /dev/null @@ -1,695 +0,0 @@ -data); - ---------------- - # tab delimited, and encoding conversion - $csv = new parseCSV(); - $csv->encoding('UTF-16', 'UTF-8'); - $csv->delimiter = "\t"; - $csv->parse('data.tsv'); - print_r($csv->data); - ---------------- - # auto-detect delimiter character - $csv = new parseCSV(); - $csv->auto('data.csv'); - print_r($csv->data); - ---------------- - # modify data in a csv file - $csv = new parseCSV(); - $csv->sort_by = 'id'; - $csv->parse('data.csv'); - # "4" is the value of the "id" column of the CSV row - $csv->data[4] = array('firstname' => 'John', 'lastname' => 'Doe', 'email' => 'john@doe.com'); - $csv->save(); - ---------------- - # add row/entry to end of CSV file - # - only recommended when you know the extact sctructure of the file - $csv = new parseCSV(); - $csv->save('data.csv', array('1986', 'Home', 'Nowhere', ''), true); - ---------------- - # convert 2D array to csv data and send headers - # to browser to treat output as a file and download it - $csv = new parseCSV(); - $csv->output (true, 'movies.csv', $array); - ---------------- - - -*/ - - - /** - * Configuration - * - set these options with $object->var_name = 'value'; - */ - - # use first line/entry as field names - var $heading = true; - - # override field names - var $fields = array(); - - # sort entries by this field - var $sort_by = null; - var $sort_reverse = false; - - # delimiter (comma) and enclosure (double quote) - var $delimiter = ','; - var $enclosure = '"'; - - # basic SQL-like conditions for row matching - var $conditions = null; - - # number of rows to ignore from beginning of data - var $offset = null; - - # limits the number of returned rows to specified amount - var $limit = null; - - # number of rows to analyze when attempting to auto-detect delimiter - var $auto_depth = 15; - - # characters to ignore when attempting to auto-detect delimiter - var $auto_non_chars = "a-zA-Z0-9\n\r"; - - # preferred delimiter characters, only used when all filtering method - # returns multiple possible delimiters (happens very rarely) - var $auto_preferred = ",;\t.:|"; - - # character encoding options - var $convert_encoding = false; - var $input_encoding = 'ISO-8859-1'; - var $output_encoding = 'ISO-8859-1'; - - # used by unparse(), save(), and output() functions - var $linefeed = "\r\n"; - - # only used by output() function - var $output_delimiter = ','; - var $output_filename = 'data.csv'; - - - /** - * Internal variables - */ - - # current file - var $file; - - # loaded file contents - var $file_data; - - # array of field values in data parsed - var $titles = array(); - - # two dimentional array of CSV data - var $data = array(); - - - /** - * Constructor - * @param input CSV file or string - * @return nothing - */ - function parseCSV ($input = null, $offset = null, $limit = null, $conditions = null) { - if ( $offset !== null ) $this->offset = $offset; - if ( $limit !== null ) $this->limit = $limit; - if ( count($conditions) > 0 ) $this->conditions = $conditions; - if ( !empty($input) ) $this->parse($input); - } - - - // ============================================== - // ----- [ Main Functions ] --------------------- - // ============================================== - - /** - * Parse CSV file or string - * @param input CSV file or string - * @return nothing - */ - function parse ($input = null, $offset = null, $limit = null, $conditions = null) { - if ( !empty($input) ) { - if ( $offset !== null ) $this->offset = $offset; - if ( $limit !== null ) $this->limit = $limit; - if ( count($conditions) > 0 ) $this->conditions = $conditions; - if ( is_readable($input) ) { - $this->data = $this->parse_file($input); - } else { - $this->file_data = &$input; - $this->data = $this->parse_string(); - } - if ( $this->data === false ) return false; - } - return true; - } - - /** - * Save changes, or new file and/or data - * @param file file to save to - * @param data 2D array with data - * @param append append current data to end of target CSV if exists - * @param fields field names - * @return true or false - */ - function save ($file = null, $data = array(), $append = false, $fields = array()) { - if ( empty($file) ) $file = &$this->file; - $mode = ( $append ) ? 'at' : 'wt' ; - $is_php = ( preg_match('/\.php$/i', $file) ) ? true : false ; - return $this->_wfile($file, $this->unparse($data, $fields, $append, $is_php), $mode); - } - - /** - * Generate CSV based string for output - * @param output if true, prints headers and strings to browser - * @param filename filename sent to browser in headers if output is true - * @param data 2D array with data - * @param fields field names - * @param delimiter delimiter used to separate data - * @return CSV data using delimiter of choice, or default - */ - function output ($output = true, $filename = null, $data = array(), $fields = array(), $delimiter = null) { - if ( empty($filename) ) $filename = $this->output_filename; - if ( $delimiter === null ) $delimiter = $this->output_delimiter; - $data = $this->unparse($data, $fields, null, null, $delimiter); - if ( $output ) { - header('Content-type: application/csv'); - header('Content-Disposition: inline; filename="'.$filename.'"'); - echo $data; - } - return $data; - } - - /** - * Convert character encoding - * @param input input character encoding, uses default if left blank - * @param output output character encoding, uses default if left blank - * @return nothing - */ - function encoding ($input = null, $output = null) { - $this->convert_encoding = true; - if ( $input !== null ) $this->input_encoding = $input; - if ( $output !== null ) $this->output_encoding = $output; - } - - /** - * Auto-Detect Delimiter: Find delimiter by analyzing a specific number of - * rows to determine most probable delimiter character - * @param file local CSV file - * @param parse true/false parse file directly - * @param search_depth number of rows to analyze - * @param preferred preferred delimiter characters - * @param enclosure enclosure character, default is double quote ("). - * @return delimiter character - */ - function auto ($file = null, $parse = true, $search_depth = null, $preferred = null, $enclosure = null) { - - if ( $file === null ) $file = $this->file; - if ( empty($search_depth) ) $search_depth = $this->auto_depth; - if ( $enclosure === null ) $enclosure = $this->enclosure; - - if ( $preferred === null ) $preferred = $this->auto_preferred; - - if ( empty($this->file_data) ) { - if ( $this->_check_data($file) ) { - $data = &$this->file_data; - } else return false; - } else { - $data = &$this->file_data; - } - - $chars = array(); - $strlen = strlen($data); - $enclosed = false; - $n = 1; - $to_end = true; - - // walk specific depth finding posssible delimiter characters - for ( $i=0; $i < $strlen; $i++ ) { - $ch = $data{$i}; - $nch = ( isset($data{$i+1}) ) ? $data{$i+1} : false ; - $pch = ( isset($data{$i-1}) ) ? $data{$i-1} : false ; - - // open and closing quotes - if ( $ch == $enclosure && (!$enclosed || $nch != $enclosure) ) { - $enclosed = ( $enclosed ) ? false : true ; - - // inline quotes - } elseif ( $ch == $enclosure && $enclosed ) { - $i++; - - // end of row - } elseif ( ($ch == "\n" && $pch != "\r" || $ch == "\r") && !$enclosed ) { - if ( $n >= $search_depth ) { - $strlen = 0; - $to_end = false; - } else { - $n++; - } - - // count character - } elseif (!$enclosed) { - if ( !preg_match('/['.preg_quote($this->auto_non_chars, '/').']/i', $ch) ) { - if ( !isset($chars[$ch][$n]) ) { - $chars[$ch][$n] = 1; - } else { - $chars[$ch][$n]++; - } - } - } - } - - // filtering - $depth = ( $to_end ) ? $n-1 : $n ; - $filtered = array(); - foreach( $chars as $char => $value ) { - if ( $match = $this->_check_count($char, $value, $depth, $preferred) ) { - $filtered[$match] = $char; - } - } - - // capture most probable delimiter - ksort($filtered); - $delimiter = reset($filtered); - $this->delimiter = $delimiter; - - // parse data - if ( $parse ) $this->data = $this->parse_string(); - - return $delimiter; - - } - - - // ============================================== - // ----- [ Core Functions ] --------------------- - // ============================================== - - /** - * Read file to string and call parse_string() - * @param file local CSV file - * @return 2D array with CSV data, or false on failure - */ - function parse_file ($file = null) { - if ( $file === null ) $file = $this->file; - if ( empty($this->file_data) ) $this->load_data($file); - return ( !empty($this->file_data) ) ? $this->parse_string() : false ; - } - - /** - * Parse CSV strings to arrays - * @param data CSV string - * @return 2D array with CSV data, or false on failure - */ - function parse_string ($data = null) { - if ( empty($data) ) { - if ( $this->_check_data() ) { - $data = &$this->file_data; - } else return false; - } - - $rows = array(); - $row = array(); - $row_count = 0; - $current = ''; - $head = ( !empty($this->fields) ) ? $this->fields : array() ; - $col = 0; - $enclosed = false; - $was_enclosed = false; - $strlen = strlen($data); - - // walk through each character - for ( $i=0; $i < $strlen; $i++ ) { - $ch = $data{$i}; - $nch = ( isset($data{$i+1}) ) ? $data{$i+1} : false ; - $pch = ( isset($data{$i-1}) ) ? $data{$i-1} : false ; - - // open and closing quotes - if ( $ch == $this->enclosure && (!$enclosed || $nch != $this->enclosure) ) { - $enclosed = ( $enclosed ) ? false : true ; - if ( $enclosed ) $was_enclosed = true; - - // inline quotes - } elseif ( $ch == $this->enclosure && $enclosed ) { - $current .= $ch; - $i++; - - // end of field/row - } elseif ( ($ch == $this->delimiter || ($ch == "\n" && $pch != "\r") || $ch == "\r") && !$enclosed ) { - if ( !$was_enclosed ) $current = trim($current); - $key = ( !empty($head[$col]) ) ? $head[$col] : $col ; - $row[$key] = $current; - $current = ''; - $col++; - - // end of row - if ( $ch == "\n" || $ch == "\r" ) { - if ( $this->_validate_offset($row_count) && $this->_validate_row_conditions($row, $this->conditions) ) { - if ( $this->heading && empty($head) ) { - $head = $row; - } elseif ( empty($this->fields) || (!empty($this->fields) && (($this->heading && $row_count > 0) || !$this->heading)) ) { - if ( !empty($this->sort_by) && !empty($row[$this->sort_by]) ) { - if ( isset($rows[$row[$this->sort_by]]) ) { - $rows[$row[$this->sort_by].'_0'] = &$rows[$row[$this->sort_by]]; - unset($rows[$row[$this->sort_by]]); - for ( $sn=1; isset($rows[$row[$this->sort_by].'_'.$sn]); $sn++ ) {} - $rows[$row[$this->sort_by].'_'.$sn] = $row; - } else $rows[$row[$this->sort_by]] = $row; - } else $rows[] = $row; - } - } - $row = array(); - $col = 0; - $row_count++; - if ( $this->sort_by === null && $this->limit !== null && count($rows) == $this->limit ) { - $i = $strlen; - } - } - - // append character to current field - } else { - $current .= $ch; - } - } - $this->titles = $head; - if ( !empty($this->sort_by) ) { - ( $this->sort_reverse ) ? krsort($rows) : ksort($rows) ; - if ( $this->offset !== null || $this->limit !== null ) { - $rows = array_slice($rows, ($this->offset === null ? 0 : $this->offset) , $this->limit, true); - } - } - return $rows; - } - - /** - * Create CSV data from array - * @param data 2D array with data - * @param fields field names - * @param append if true, field names will not be output - * @param is_php if a php die() call should be put on the first - * line of the file, this is later ignored when read. - * @param delimiter field delimiter to use - * @return CSV data (text string) - */ - function unparse ( $data = array(), $fields = array(), $append = false , $is_php = false, $delimiter = null) { - if ( !is_array($data) || empty($data) ) $data = &$this->data; - if ( !is_array($fields) || empty($fields) ) $fields = &$this->titles; - if ( $delimiter === null ) $delimiter = $this->delimiter; - - $string = ( $is_php ) ? "".$this->linefeed : '' ; - $entry = array(); - - // create heading - if ( $this->heading && !$append ) { - foreach( $fields as $key => $value ) { - $entry[] = $this->_enclose_value($value); - } - $string .= implode($delimiter, $entry).$this->linefeed; - $entry = array(); - } - - // create data - foreach( $data as $key => $row ) { - foreach( $row as $field => $value ) { - $entry[] = $this->_enclose_value($value); - } - $string .= implode($delimiter, $entry).$this->linefeed; - $entry = array(); - } - - return $string; - } - - /** - * Load local file or string - * @param input local CSV file - * @return true or false - */ - function load_data ($input = null) { - $data = null; - $file = null; - if ( $input === null ) { - $file = $this->file; - } elseif ( file_exists($input) ) { - $file = $input; - } else { - $data = $input; - } - if ( !empty($data) || $data = $this->_rfile($file) ) { - if ( $this->file != $file ) $this->file = $file; - if ( preg_match('/\.php$/i', $file) && preg_match('/<\?.*?\?>(.*)/ims', $data, $strip) ) { - $data = ltrim($strip[1]); - } - if ( $this->convert_encoding ) $data = iconv($this->input_encoding, $this->output_encoding, $data); - if ( substr($data, -1) != "\n" ) $data .= "\n"; - $this->file_data = &$data; - return true; - } - return false; - } - - - // ============================================== - // ----- [ Internal Functions ] ----------------- - // ============================================== - - /** - * Validate a row against specified conditions - * @param row array with values from a row - * @param conditions specified conditions that the row must match - * @return true of false - */ - function _validate_row_conditions ($row = array(), $conditions = null) { - if ( !empty($row) ) { - if ( !empty($conditions) ) { - $conditions = (strpos($conditions, ' OR ') !== false) ? explode(' OR ', $conditions) : array($conditions) ; - $or = ''; - foreach( $conditions as $key => $value ) { - if ( strpos($value, ' AND ') !== false ) { - $value = explode(' AND ', $value); - $and = ''; - foreach( $value as $k => $v ) { - $and .= $this->_validate_row_condition($row, $v); - } - $or .= (strpos($and, '0') !== false) ? '0' : '1' ; - } else { - $or .= $this->_validate_row_condition($row, $value); - } - } - return (strpos($or, '1') !== false) ? true : false ; - } - return true; - } - return false; - } - - /** - * Validate a row against a single condition - * @param row array with values from a row - * @param condition specified condition that the row must match - * @return true of false - */ - function _validate_row_condition ($row, $condition) { - $operators = array( - '=', 'equals', 'is', - '!=', 'is not', - '<', 'is less than', - '>', 'is greater than', - '<=', 'is less than or equals', - '>=', 'is greater than or equals', - 'contains', - 'does not contain', - ); - $operators_regex = array(); - foreach( $operators as $value ) { - $operators_regex[] = preg_quote($value, '/'); - } - $operators_regex = implode('|', $operators_regex); - if ( preg_match('/^(.+) ('.$operators_regex.') (.+)$/i', trim($condition), $capture) ) { - $field = $capture[1]; - $op = $capture[2]; - $value = $capture[3]; - if ( preg_match('/^([\'\"]{1})(.*)([\'\"]{1})$/i', $value, $capture) ) { - if ( $capture[1] == $capture[3] ) { - $value = $capture[2]; - $value = str_replace("\\n", "\n", $value); - $value = str_replace("\\r", "\r", $value); - $value = str_replace("\\t", "\t", $value); - $value = stripslashes($value); - } - } - if ( array_key_exists($field, $row) ) { - if ( ($op == '=' || $op == 'equals' || $op == 'is') && $row[$field] == $value ) { - return '1'; - } elseif ( ($op == '!=' || $op == 'is not') && $row[$field] != $value ) { - return '1'; - } elseif ( ($op == '<' || $op == 'is less than' ) && $row[$field] < $value ) { - return '1'; - } elseif ( ($op == '>' || $op == 'is greater than') && $row[$field] > $value ) { - return '1'; - } elseif ( ($op == '<=' || $op == 'is less than or equals' ) && $row[$field] <= $value ) { - return '1'; - } elseif ( ($op == '>=' || $op == 'is greater than or equals') && $row[$field] >= $value ) { - return '1'; - } elseif ( $op == 'contains' && preg_match('/'.preg_quote($value, '/').'/i', $row[$field]) ) { - return '1'; - } elseif ( $op == 'does not contain' && !preg_match('/'.preg_quote($value, '/').'/i', $row[$field]) ) { - return '1'; - } else { - return '0'; - } - } - } - return '1'; - } - - /** - * Validates if the row is within the offset or not if sorting is disabled - * @param current_row the current row number being processed - * @return true of false - */ - function _validate_offset ($current_row) { - if ( $this->sort_by === null && $this->offset !== null && $current_row < $this->offset ) return false; - return true; - } - - /** - * Enclose values if needed - * - only used by unparse() - * @param value string to process - * @return Processed value - */ - function _enclose_value ($value = null) { - if ( $value !== null && $value != '' ) { - $delimiter = preg_quote($this->delimiter, '/'); - $enclosure = preg_quote($this->enclosure, '/'); - if ( preg_match("/".$delimiter."|".$enclosure."|\n|\r/i", $value) || ($value{0} == ' ' || substr($value, -1) == ' ') ) { - $value = str_replace($this->enclosure, $this->enclosure.$this->enclosure, $value); - $value = $this->enclosure.$value.$this->enclosure; - } - } - return $value; - } - - /** - * Check file data - * @param file local filename - * @return true or false - */ - function _check_data ($file = null) { - if ( empty($this->file_data) ) { - if ( $file === null ) $file = $this->file; - return $this->load_data($file); - } - return true; - } - - - /** - * Check if passed info might be delimiter - * - only used by find_delimiter() - * @return special string used for delimiter selection, or false - */ - function _check_count ($char, $array, $depth, $preferred) { - if ( $depth == count($array) ) { - $first = null; - $equal = null; - $almost = false; - foreach( $array as $key => $value ) { - if ( $first == null ) { - $first = $value; - } elseif ( $value == $first && $equal !== false) { - $equal = true; - } elseif ( $value == $first+1 && $equal !== false ) { - $equal = true; - $almost = true; - } else { - $equal = false; - } - } - if ( $equal ) { - $match = ( $almost ) ? 2 : 1 ; - $pref = strpos($preferred, $char); - $pref = ( $pref !== false ) ? str_pad($pref, 3, '0', STR_PAD_LEFT) : '999' ; - return $pref.$match.'.'.(99999 - str_pad($first, 5, '0', STR_PAD_LEFT)); - } else return false; - } - } - - /** - * Read local file - * @param file local filename - * @return Data from file, or false on failure - */ - function _rfile ($file = null) { - if ( is_readable($file) ) { - if ( !($fh = fopen($file, 'r')) ) return false; - $data = fread($fh, filesize($file)); - fclose($fh); - return $data; - } - return false; - } - - /** - * Write to local file - * @param file local filename - * @param string data to write to file - * @param mode fopen() mode - * @param lock flock() mode - * @return true or false - */ - function _wfile ($file, $string = '', $mode = 'wb', $lock = 2) { - if ( $fp = fopen($file, $mode) ) { - flock($fp, $lock); - $re = fwrite($fp, $string); - $re2 = fclose($fp); - if ( $re != false && $re2 != false ) return true; - } - return false; - } - -} - -?> \ No newline at end of file diff --git a/app/lang/da/pagination.php b/app/lang/da/pagination.php deleted file mode 100644 index f07b64dfa85f..000000000000 --- a/app/lang/da/pagination.php +++ /dev/null @@ -1,20 +0,0 @@ - '« Forrige', - - 'next' => 'Næste »', - -); \ No newline at end of file diff --git a/app/lang/da/public.php b/app/lang/da/public.php deleted file mode 100644 index 24e4d6c04227..000000000000 --- a/app/lang/da/public.php +++ /dev/null @@ -1,209 +0,0 @@ - 'Gratis Open-Source Online Fakturering', - 'description' => 'Invoice Ninja er en gratis, open-source løsning til fakturering af kunder. Med Invoice Ninja, kan du nemt opbygge og sende smukke fakturaer fra enhver enhed, der har adgang til internettet. Dine kunder kan printe dine fakturaer, downloade dem som PDF-filer, og endda betale dig online via systemet.', - 'invoice_now' => 'Fakturér nu', - 'no_signup_needed' => 'Ingen tilmelding pÃ¥krævet', - - 'link_blog' => 'Blog', - 'link_about_us' => 'Om Os', - 'link_contact_us' => 'Kontakt Os', - 'link_features' => 'Funktioner', - 'link_plans' => 'Løsninger', - 'link_compare' => 'Sammenlign', - 'link_testimonials' => 'Anbefalinger', - 'link_faq' => 'OSS', - - 'my_account' => 'Min konto', - 'login' => 'Login', - 'connect_with_us' => 'Forbind med os', - 'safe_and_secure' => 'Safe & Secure', - 'toggle_navigation' => 'Vis/Skjul navigation', - - - 'home' => [ - 'header' => 'THE SIMPLE & FREE WAY TO INVOICE CLIENTS', - 'sub_header' => 'It\'s just that easy. Stop spending time on complicated and expensive invoicing.
    No fuss, just get started and get paid.', - 'footer' => 'Simple, Intuitive Invoicing,Anywhere.', - - 'free_always' => 'Free, Always', - 'free_always_text' => 'Send unlimited invoices to 500 clients per month and never pay a dime. You are welcome to unlock still more awesome features with our Pro Plan, but our free app is a top-notch product that will do everything you need it to do, without any subscription or fees.', - - 'open_source' => 'Open-Source', - 'open_source_text' => 'No mysterious corporate silos here! Just full source code transparency and a devotion to working with anyone interested to build a better electronic invoicing platform. We even offer a handy zip download for a self-hosted version of Invoice Ninja.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text' => 'See how your edited invoice will look as a print-friendly pdf while you make the changes. Our pdf generator works in real time as you make your changes. You can even preview four beautiful preset designs. Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text' => 'Invoices sent with our app integrate seamlessly with the gateway credit card processor of your choice, to make it super easy for your clients to send you money with just a few clicks. We play nicely with Authorize.Net, Stripe, PayPal and loads more - 23 in all!', - ], - - 'about' => [ - 'header' => 'About Invoice Ninja', - 'what_is' => 'What is Invoice Ninja?', - - 'team_ninja' => 'Team Ninja', - 'team_ninja_text' => 'Invoice Ninja is managed by a team of seasoned web workers. We launched in early 2014 and have been thrilled by the enthusiastic response we’ve received from our growing community of users.', - - 'co_founder' => 'Co-Founder', - 'ceo' => 'CEO', - 'cto' => '', - 'designer' => 'Designer', - 'marketing' => 'Marketing', - - 'shalom_bio' => 'Shalom has specialized in small business development for nearly 10 years. In addition to InvoiceNinja.com Shalom is CEO of a leading tour agency in Israel.', - 'hillel_bio' => 'Hillel has been developing enterprise applications for 15 years. His open-source AutoComplete component has been used by thousands of developers around the world.', - 'razi_bio' => 'Razi is a pixel nerd with a great deal of experience in design for web sites and applications. When she isn\'t busy with InvoiceNinja she runs a small web agency in Stockholm called kantorp-wegl.in', - 'ben_bio' => 'A veteran digital marketer and content strategist, Ben specializes in building communities around brands that make business easier for freelancers, SMBs and micro-entrepreneurs.', - ], - - 'contact' => [ - 'header' => 'Questions, special requests, or just want to say hi?', - 'sub_header' => 'Fill in the form below and we\'ll get back to you as soon as possible. Hope to hear from you!', - 'other_ways' => 'Other ways to reach us', - - 'name' => 'Name', - 'name_help' => 'Please enter your name.', - - 'email' => 'Email Address', - 'email_help' => 'Please enter a valid e-mail address.', - - 'message' => 'Message', - 'message_help' => 'Please enter a message.', - 'send_message' => 'Send Message', - ], - - 'features' => [ - 'header' => 'The Features', - 'footer' => 'Like what you see?', - 'footer_action' => 'Get started today!', - - 'open_source' => 'Open Source Platform', - 'open_source_text1' => 'Set the code free! Here at Invoice Ninja, we’re all about creating the best possible app, and inviting scrutiny via full code transparency is a central manifestation of this value.', - 'open_source_text2' => 'We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.', - - 'free_forever' => 'FREE. Forever.', - 'free_forever_text1' => 'Yeah, you read that correctly. You don’t have to pay us a cent to use our tools. We know how tough it is to make ends meet as a web-based business, and we’re bent on providing a top-notch product that will do everything you need it to do, without any subscription or opt-in fees.', - 'free_forever_text2' => 'Try Invoice Ninja out. You literally have nothing to lose. We’re confident that you’ll find the experience so positive that you’ll never need to turn elsewhere.', - - 'secure' => 'Secure & Private', - 'secure_text1' => 'Invoice Ninja has been built from the ground up to keep your data safe. Only you have access to your login & accounting details, & we will never share your transaction data to any third party.', - 'secure_text2' => 'Our website operates with 256-bit encryption, which is even more secure than most banking websites. Invoice Ninja uses the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. We feel safe here and have invested heavily in measures to ensure that you do too.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text1' => 'With Invoice Ninja, we’ve done away with the need for cumbersome multi-click invoice previewing after each save.', - 'live_pdf_text2' => 'When you enter the details of your customer and/or invoice in our editor, you can instantly see the results in the pdf preview pane below. Want to see what your invoice would look like in a different layout style? The live pdf can show you four beautiful preset styles in real time too.', - 'live_pdf_text3' => 'Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text1' => 'Invoice Ninja seamlessly integrates with all of the top internet payment processors and gateways so you can get paid for your work quickly and easily.', - 'online_payments_text2' => 'Invoices created with our tools aren’t just for bookkeeping purposes - they bring in the Benjamins. We also make it super easy to choose the right gateway for the specific needs of your business and are happy to help you to get started working with the gateway of your choice. What’s more, we’re constantly working on rolling out additional gateway integrations, so if you don’t see the one you use here, just let us know, and there’s a good chance we’ll add it for you.', - ], - - 'plans' => [ - 'header' => 'The Plans', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - 'pro_plan' => 'Pro Plan', - - 'go_pro' => 'Go Pro to Unlock Premium Invoice Ninja Features', - 'go_pro_text' => 'We believe that the free version of Invoice Ninja is a truly awesome product loaded with the key features you need to bill your clients electronically. But for those who crave still more Ninja awesomeness, we\'ve unmasked the Invoice Ninja Pro plan, which offers more versatility, power and customization options for just $50 per year.', - - 'number_clients' => 'Number of clients per account', - 'unlimited_invoices' => 'Unlimited client invoices', - 'company_logo' => 'Add your company logo', - 'live_pdf' => 'Live .PDF invoice creation', - 'four_templates' => '4 beautiful invoice templates', - 'payments' => 'Accept credit card payments', - 'additional_templates' => 'Additional invoice templates', - 'multi_user' => 'Multi-user support', - 'quotes' => 'Quotes/pro-forma invoices', - 'advanced_settings' => 'Advanced invoice settings', - 'data_vizualizations' => 'Dynamic data vizualizations', - 'email_support' => 'Priority email support', - 'remove_created_by' => 'Remove "Created by Invoice Ninja"', - 'latest_features' => 'Latest and greatest features', - 'pricing' => 'Pricing', - 'free_always' => 'Free /Always!', - 'year_price' => '$50 /Year', - ], - - 'compare' => [ - 'header' => 'How We Compare', - 'free_plan_comparison' => 'Free Plan Comparison', - 'paid_plan_comparison' => 'Paid Plan Comparison', - 'app' => 'App', - 'cost' => 'Cost', - 'clients' => 'Clients', - 'invoices' => 'Invoices', - 'payment_gateways' => 'Payment Gateways', - 'custom_logo' => 'Custom Logo', - 'multiple_templates' => 'Multiple Templates', - 'recurring_payments' => 'Recurring Payments', - 'open_source' => 'Open Source', - 'per_month' => 'per month', - 'per_year' => 'per year', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - ], - - 'testimonials' => [ - 'testimonials' => 'testimonials', - 'header' => 'Since we launched Invoice Ninja in March of 2014, we\'ve been overwhelmed by a deluge of user love. Here\'s a small taste of the glowing things people have to say about the great experiences the\'ve been having with our free e-invoicing app!', - ], - - 'faq' => [ - 'header' => 'The FAQs', - - 'question1' => 'I know it isn’t standard ninja practice to reveal too many identity details, but who are you guys exactly?', - 'answer1' => 'We’re a small team of highly skilled digital journeymen based in Israel. We love open source, we love disrupting the big business status quo, and we love building helpful tools that are easy to use. We believe that everyone else’s web-based cash flow tools are unnecessarily expensive, clunky and complicated - and we’re bent on proving these beliefs with Invoice Ninja.', - - 'question2' => 'How do I get started using Invoice Ninja?', - 'answer2' => 'Just click on the big, yellow "Invoice Now" button on our homepage!', - - 'question3' => 'Do you offer customer support?', - 'answer3' => 'We sure do. Support is super important to us. Feel free to email us at support@invoiceninja.com with any questions you might have. We almost always reply within one business day.', - - 'question4' => 'Is Invoice Ninja really free? For how long?', - 'answer4' => 'Yes, our basic app is 100% free. Forever and ever. For real. We also offer a paid Pro version of Invoice Ninja (you can learn all about its awesome features here), but it\'s important to us that the free version have all of the key features people need to do business.', - - 'question5' => 'How is Invoice Ninja able to offer this all for free? How are you making any money?', - 'answer5' => 'We’re mostly in this line of work because we believe it’s high time that a good electronic invoicing tool be available for free. There isn’t much money in it - yet. We do offer a paid Pro version of the app that we\'ve souped up with premium features. And when our users open up new accounts with payment processor gateways by clicking on links from our site, we make modest commissions as a gateway affiliate. So if zillions of freelancers and small businesses start running credit card charges through Invoice Ninja, or if scores of users go Pro, there’s a decent chance we\'ll recover our investment.', - - 'question6' => 'Really? So does that mean you’re not collecting information about me so you can sell me stuff or so that some other company can spam me according to my interests?', - 'answer6' => 'No way. We’re not mining your data, and we’re not selling you out. That wouldn’t be very ninja of us, would it?', - - 'question7' => 'But don’t you have access to my merchant and banking accounts?', - 'answer7' => 'Actually, we don’t. When you link an account at a third party financial institution with your Invoice Ninja account, you’re essentially giving our app permission to send money to you and nothing more. This is all managed by the tech teams at your financial service providers, who go to great lengths to ensure their integrations can’t be exploited or abused.', - - 'question8' => 'Given that Invoice Ninja is an open source app, how can I be sure that my financial information is safe with you?', - 'answer8' => 'There\'s a big difference between “open source" and “open data.†Anyone who wants to use the code that drives Invoice Ninja to create their own products or to make improvements to ours can do so. It’s available for anyone who wants to download and work with. But that’s just the source code - totally separate from what happens with that code on the Invoice Ninja servers. You’re the only one who has full access to what you\'re doing with our product. For more details on the security of our servers and how we handle our users\' information, please read the next question.', - - 'question9' => 'So just how secure is this app?', - 'answer9' => 'Extremely. Data uploaded by our users runs through connections with 256-bit encryption, which is twice as many encryption bits that most bank websites use. We use the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. It’s fancy stuff that we put in place to make sure no one can gain access to your information except you.', - - 'question10' => 'How do I remove the small "Created by Invoice Ninja†image from the bottom of my invoices?', - 'answer10' => 'The amazingly affordable Pro version of Invoice Ninja allows you to do this and oh so much more.', - - 'question11' => 'Can I see what the application looks like with sample data?', - 'answer11' => 'Sure, click here to try out our demo account.', - - 'question12' => 'I hear that there\'s a version of Invoice Ninja that I can install myself on my own servers? Where can I learn more about this?', - 'answer12' => 'The rumors are true! Full instructions are available here.', - - 'question13' => 'I\'m seeing the options to assign various statuses to my invoices, clients, credits and payments. What\'s the difference between "active," "archived" and "deleted"?', - 'answer13' => 'These three handy statuses for invoices, clients, credits and payments allow you to keep your own cash flow management as straightforward and accessible as possible from your Invoice Ninja dashboard. None of these statuses will actually purge any records from your account - even "deleted" can always be recovered at any point in the future. "Active" means the record will appear in the relevant queue of records. To stash a record away so it\'s still fully operational but no longer cluttering up your interface, simply set it to be "archived." To deactivate a record and render it inaccessible to your clients, mark it "deleted."', - - 'question14' => 'My question wasn\'t covered by any of the content on this FAQ page. How can I get in touch with you?', - 'answer14' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - 'miss_something' => 'Did we miss something?', - 'miss_something_text' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - ], - - -]; diff --git a/app/lang/da/reminders.php b/app/lang/da/reminders.php deleted file mode 100644 index 2c17b1ffeccc..000000000000 --- a/app/lang/da/reminders.php +++ /dev/null @@ -1,26 +0,0 @@ - "Passwords skal minimum være 6 tegn og matche sikkerhedstjekket.", - - "user" => "Vi kan ikke finde en bruger med den email-adresse.", - - "token" => "Password-nulstillingskoden er ugyldig.", - - "sent" => "Password-påmindelse sendt!", - - "reset" => "Password has been reset!", - -); diff --git a/app/lang/da/texts.php b/app/lang/da/texts.php deleted file mode 100644 index 9df8d9e79d82..000000000000 --- a/app/lang/da/texts.php +++ /dev/null @@ -1,582 +0,0 @@ - 'Organisation', - 'name' => 'Navn', - 'id_number' => 'SE/CVR nummer', - 'vat_number' => 'SE/CVR nummer', - 'website' => 'Webside', - 'work_phone' => 'Telefon', - 'address' => 'Adresse', - 'address1' => 'Gade', - 'address2' => 'Nummer', - 'city' => 'By', - 'state' => 'Område', - 'postal_code' => 'Postnummer', - 'country_id' => 'Land', - 'contacts' => 'Kontakter', - 'first_name' => 'Fornavn', - 'last_name' => 'Efternavn', - 'phone' => 'Telefon', - 'email' => 'E-mail', - 'additional_info' => 'Ekstra information', - 'payment_terms' => 'Betalingsvilkår', - 'currency_id' => 'Valuta', - 'size_id' => 'Størrelse', - 'industry_id' => 'Sektor', - 'private_notes' => 'Private notater', - - // invoice - 'invoice' => 'Faktura', - 'client' => 'Klient', - 'invoice_date' => 'Faktureringsdato', - 'due_date' => 'Betalingsfrist', - 'invoice_number' => 'Fakturanummer', - 'invoice_number_short' => 'Faktura #', - 'po_number' => 'Ordrenummer', - 'po_number_short' => 'Ordre #', - 'frequency_id' => 'Frekvens', - 'discount' => 'Rabat', - 'taxes' => 'Skatter', - 'tax' => 'Skat', - 'item' => 'Produkttype', - 'description' => 'Beskrivelse', - 'unit_cost' => 'Pris', - 'quantity' => 'Stk.', - 'line_total' => 'Sum', - 'subtotal' => 'Subtotal', - 'paid_to_date' => 'Betalt', - 'balance_due' => 'Udestående beløb', - 'invoice_design_id' => 'Design', - 'terms' => 'Vilkår', - 'your_invoice' => 'Din faktura', - - 'remove_contact' => 'Fjern kontakt', - 'add_contact' => 'Tilføj til kontakt', - 'create_new_client' => 'Opret ny klient', - 'edit_client_details' => 'Ændre klientdetaljer', - 'enable' => 'Aktiver', - 'learn_more' => 'Lær mere', - 'manage_rates' => 'Administrer priser', - 'note_to_client' => 'Note til klient', - 'invoice_terms' => 'Vilkår for fakturaen', - 'save_as_default_terms' => 'Gem som standard vilkår', - 'download_pdf' => 'Download PDF', - 'pay_now' => 'Betal nu', - 'save_invoice' => 'Gem faktura', - 'clone_invoice' => 'Kopier faktura', - 'archive_invoice' => 'Arkiver faktura', - 'delete_invoice' => 'Slet faktura', - 'email_invoice' => 'Send faktura som e-mail', - 'enter_payment' => 'Tilføj betaling', - 'tax_rates' => 'Skattesatser', - 'rate' => 'Sats', - 'settings' => 'Indstillinger', - 'enable_invoice_tax' => 'Aktiver for at specificere en faktura skat', - 'enable_line_item_tax' => 'Aktiver for at specificere per faktura linje skat', - - // navigation - 'dashboard' => 'Dashboard', - 'clients' => 'Klienter', - 'invoices' => 'Fakturaer', - 'payments' => 'Betalinger', - 'credits' => 'Kreditter', - 'history' => 'Historie', - 'search' => 'Søg', - 'sign_up' => 'Registrer dig', - 'guest' => 'Gjest', - 'company_details' => 'Firmainformation', - 'online_payments' => 'Online betaling', - 'notifications' => 'Varsler', - 'import_export' => 'Import/Export', - 'done' => 'Færdig', - 'save' => 'Gem', - 'create' => 'Opret', - 'upload' => 'Upload', - 'import' => 'Importer', - 'download' => 'Download', - 'cancel' => 'Afbrud', - 'close' => 'Luk', - 'provide_email' => 'Venligst opgiv en gyldig e-mail', - 'powered_by' => 'Drevet af', - 'no_items' => 'Ingen elementer', - - // recurring invoices - 'recurring_invoices' => 'Gentagende fakturaer', - 'recurring_help' => '

    Automatisk send klienter de samme fakturaene ugentlig, bi-månedlig, månedlig, kvartalsvis eller årlig.

    -

    Brug :MONTH, :QUARTER eller :YEAR for dynamiske datoer. Grundliggende matematik fungerer også, for eksempel :MONTH-1.

    -

    Eksempler på dynamiske faktura variabler:

    -
      -
    • "Træningsmedlemskab for mÃ¥neden :MONTH" => "Træningsmedlemskab for mÃ¥neden Juli"
    • -
    • ":YEAR+1 Ã¥rlig abonnement" => "2015 Ã¥rlig abonnement"
    • -
    • "Forudbetaling for :QUARTER+1" => "Forudbetaling for Q2"
    • -
    ', - - // dashboard - 'in_total_revenue' => 'totale indtægter', - 'billed_client' => 'faktureret klient', - 'billed_clients' => 'fakturerede klienter', - 'active_client' => 'aktiv klient', - 'active_clients' => 'aktive klienter', - 'invoices_past_due' => 'Forfaldne fakturaer', - 'upcoming_invoices' => 'Forestående fakturaer', - 'average_invoice' => 'Gennemsnitlige fakturaer', - - // list pages - 'archive' => 'Arkiv', - 'delete' => 'Slet', - 'archive_client' => 'Arkiver klient', - 'delete_client' => 'Slet klient', - 'archive_payment' => 'Arkiver betaling', - 'delete_payment' => 'Slet betaling', - 'archive_credit' => 'Arkiver kredit', - 'delete_credit' => 'Slet kredit', - 'show_archived_deleted' => 'Vis slettet/arkiverede', - 'filter' => 'Filter', - 'new_client' => 'Ny klient', - 'new_invoice' => 'Ny faktura', - 'new_payment' => 'Ny betaling', - 'new_credit' => 'Ny kredit', - 'contact' => 'Kontakt', - 'date_created' => 'Dato oprettet', - 'last_login' => 'Sidst på-logging', - 'balance' => 'Balance', - 'action' => 'Handling', - 'status' => 'Status', - 'invoice_total' => 'Faktura total', - 'frequency' => 'Frekvens', - 'start_date' => 'Startdato', - 'end_date' => 'Slutdato', - 'transaction_reference' => 'Transaktionsreference', - 'method' => 'Betalingsmåde', - 'payment_amount' => 'Beløb', - 'payment_date' => 'Betalingsdato', - 'credit_amount' => 'Kreditbeløb', - 'credit_balance' => 'Kreditsaldo', - 'credit_date' => 'Kreditdato', - 'empty_table' => 'Ingen data er tilgængelige i tabellen', - 'select' => 'Vælg', - 'edit_client' => 'Rediger klient', - 'edit_invoice' => 'Rediger faktura', - - // client view page - 'create_invoice' => 'Lag faktura', - 'enter_credit' => 'Tilføj kredit', - 'last_logged_in' => 'Sidst på-logget', - 'details' => 'Detaljer', - 'standing' => 'Stående', - 'credit' => 'Kredit', - 'activity' => 'Aktivitet', - 'date' => 'Dato', - 'message' => 'Besked', - 'adjustment' => 'Justering', - 'are_you_sure' => 'Er du sikker?', - - // payment pages - 'payment_type_id' => 'Betalingsmetode', - 'amount' => 'Beløb', - - // account/company pages - 'work_email' => 'E-mail', - 'language_id' => 'Sprog', - 'timezone_id' => 'Tidszone', - 'date_format_id' => 'Dato format', - 'datetime_format_id' => 'Dato/Tidsformat', - 'users' => 'Brugere', - 'localization' => 'Lokalisering', - 'remove_logo' => 'Fjern logo', - 'logo_help' => 'Understøttede filtyper: JPEG, GIF og PNG. Anbefalet størrelse: 200px brede og 120px højde', - 'payment_gateway' => 'Betalingsløsning', - 'gateway_id' => 'Tilbyder', - 'email_notifications' => 'Varsel via e-mail', - 'email_sent' => 'Varsle når en faktura er sendt', - 'email_viewed' => 'Varsle når en faktura er set', - 'email_paid' => 'Varsle når en faktura er betalt', - 'site_updates' => 'Webside opdateringer', - 'custom_messages' => 'Tilpassede meldinger', - 'default_invoice_terms' => 'Sæt standard fakturavilkår', - 'default_email_footer' => 'Sæt standard e-mailsignatur', - 'import_clients' => 'Importer klientdata', - 'csv_file' => 'Vælg CSV-fil', - 'export_clients' => 'Eksporter klientdata', - 'select_file' => 'Venligst vælg en fil', - 'first_row_headers' => 'Brug første række som overskrifter', - 'column' => 'Kolonne', - 'sample' => 'Eksempel', - 'import_to' => 'Importer til', - 'client_will_create' => 'Klient vil blive oprettet', - 'clients_will_create' => 'Klienter vil blive oprettet', - - // application messages - 'created_client' => 'Klient oprettet succesfuldt', - 'created_clients' => 'Klienter oprettet succesfuldt', - 'updated_settings' => 'Indstillinger opdateret', - 'removed_logo' => 'Logo fjernet', - 'sent_message' => 'Melding sendt', - 'invoice_error' => 'Venligst vælge en klient og rette eventuelle fejl', - 'limit_clients' => 'Desværre, dette vil overstige græsen på :count klienter', - 'payment_error' => 'Det opstod en fejl under din betaling. Venligst prøv igen senere.', - 'registration_required' => 'Venligst registrer dig for at sende e-mailfaktura', - 'confirmation_required' => 'Venligst bekræft din e-mail', - - 'updated_client' => 'Klient opdateret', - 'created_client' => 'Klient lagret', - 'archived_client' => 'Klient arkiveret', - 'archived_clients' => 'Arkiverede :count klienter', - 'deleted_client' => 'Klient slettet', - 'deleted_clients' => 'Slettet :count klienter', - - 'updated_invoice' => 'Faktura opdateret', - 'created_invoice' => 'Faktura oprettet', - 'cloned_invoice' => 'Faktura kopieret', - 'emailed_invoice' => 'E-mailfaktura sendt', - 'and_created_client' => 'og klient oprettet', - 'archived_invoice' => 'Faktura arkiveret', - 'archived_invoices' => 'Arkiverede :count fakturaer', - 'deleted_invoice' => 'Faktura slettet', - 'deleted_invoices' => 'Slettet :count fakturaer', - - 'created_payment' => 'Betaling oprettet', - 'archived_payment' => 'Betaling arkiveret', - 'archived_payments' => 'Arkiverede :count betalinger', - 'deleted_payment' => 'Betaling slettet', - 'deleted_payments' => 'Slettet :count betalinger', - 'applied_payment' => 'Betaling lagret', - - 'created_credit' => 'Kredit oprettet', - 'archived_credit' => 'Kredit arkiveret', - 'archived_credits' => 'Arkiverede :count kreditter', - 'deleted_credit' => 'Kredit slettet', - 'deleted_credits' => 'Slettet :count kreditter', - - // Emails - 'confirmation_subject' => 'Invoice Ninja kontobekræftelse', - 'confirmation_header' => 'Kontobekræftelse', - 'confirmation_message' => 'Venligst åbne linket nedenfor for å bekræfte din konto.', - 'invoice_subject' => 'Ny faktura fra :account', - 'invoice_message' => 'For at se din faktura på :amount, klik på linket nedenfor.', - 'payment_subject' => 'Betaling modtaget', - 'payment_message' => 'Tak for din betaling pålydende :amount.', - 'email_salutation' => 'Kære :name,', - 'email_signature' => 'Med venlig hilsen,', - 'email_from' => 'The InvoiceNinja Team', - 'user_email_footer' => 'For at justere varslingsindstillingene venligst besøg '.SITE_URL.'/company/notifications', - 'invoice_link_message' => 'Hvis du vil se din klientfaktura klik på linket under:', - 'notification_invoice_paid_subject' => 'Faktura :invoice betalt af :client', - 'notification_invoice_sent_subject' => 'Faktura :invoice sendt til :client', - 'notification_invoice_viewed_subject' => 'Faktura :invoice set av :client', - 'notification_invoice_paid' => 'En betaling pålydende :amount blev gjort af :client for faktura :invoice.', - 'notification_invoice_sent' => 'E-mail er blevet sendt til :client - Faktura :invoice pålydende :amount.', - 'notification_invoice_viewed' => ':client har set faktura :invoice pålydende :amount.', - 'reset_password' => 'Du kan nulstille din adgangskode ved at besøge følgende link:', - 'reset_password_footer' => 'Hvis du ikke bad om at få nulstillet din adgangskode venligst kontakt kundeservice: ' . CONTACT_EMAIL, - - - // Payment page - 'secure_payment' => 'Sikker betaling', - 'card_number' => 'Kortnummer', - 'expiration_month' => 'Udløbsdato', - 'expiration_year' => 'Udløbsår', - 'cvv' => 'CVV', - - // Security alerts - 'confide' => [ - 'too_many_attempts' => 'For mange forsøg. Prøv igen om nogen få minutter.', - 'wrong_credentials' => 'Fejl e-mail eller adgangskode.', - 'confirmation' => 'Din konto har blevet bekræftet!', - 'wrong_confirmation' => 'Fejl bekræftelseskode.', - 'password_forgot' => 'Informationen om nulstilling af din adgangskode er blevet sendt til din e-mail.', - 'password_reset' => 'Adgangskode ændret', - 'wrong_password_reset' => 'Ugyldig adgangskode. Prøv på ny', - ], - - // Pro Plan - 'pro_plan' => [ - 'remove_logo' => ':link for å fjerne Invoice Ninja-logoen, oppgrader til en Pro Plan', - 'remove_logo_link' => 'Klik her', - ], - - 'logout' => 'Log ud', - 'sign_up_to_save' => 'Registrer dig for at gemme dit arbejde', - 'agree_to_terms' =>'Jeg acceptere Invoice Ninja :terms', - 'terms_of_service' => 'vilkår for brug', - 'email_taken' => 'E-mailadressen er allerede registreret', - 'working' => 'Arbejder', - 'success' => 'Succes', - - 'success_message' => 'Du er blevet registreret. Venligst gå ind på linket som du har modtaget i e-mailbekræftelsen for at bekræfte e-mailaddressen.', - 'erase_data' => 'Dette vil permanent slette dine data.', - 'password' => 'Adgangskode', - - 'pro_plan_product' => 'Pro Plan', - 'pro_plan_description' => 'Et års indmelding i Invoice Ninja Pro Plan.', - 'pro_plan_success' => 'Tak for at du valgte Invoice Ninja\'s Pro plan!

     
    - De næste skridt

    En betalbar faktura er send til e-emailaddesse - som er tilknyttet din konto. For at låse op for alle de utrolige - Pro-funktioner, kan du følge instruktionerne på fakturaen til at - betale for et år med Pro-niveau funktionerer.

    - Kan du ikke finde fakturaen? Har behov for mere hjælp? Vi hjælper dig gerne om det skulle være noget - -- kontakt os pÃ¥ contact@invoiceninja.com', - - 'unsaved_changes' => 'Du har ugemente ændringer', - 'custom_fields' => 'Egendefineret felt', - 'company_fields' => 'Selskabets felt', - 'client_fields' => 'Klientens felt', - 'field_label' => 'Felt etikette', - 'field_value' => 'Feltets værdi', - 'edit' => 'Rediger', - 'set_name' => 'Sæt dit firmanavn', - 'view_as_recipient' => 'Vis som modtager', - - // product management - 'product_library' => 'Produktbibliotek', - 'product' => 'Produkt', - 'products' => 'Produkter', - 'fill_products' => 'Automatisk-udfyld produkter', - 'fill_products_help' => 'Valg af produkt vil automatisk udfylde beskrivelse og pris', - 'update_products' => 'Automatisk opdatering af produkter', - 'update_products_help' => 'En opdatering af en faktura vil automatisk opdaterer Produktbiblioteket', - 'create_product' => 'Opret nyt produkt', - 'edit_product' => 'Rediger produkt', - 'archive_product' => 'Arkiver produkt', - 'updated_product' => 'Produkt opdateret', - 'created_product' => 'Produkt lagret', - 'archived_product' => 'Produkt arkiveret', - 'pro_plan_custom_fields' => ':link for at aktivere egendefinerede felter ved at bliver medlem af Pro Plan', - - 'advanced_settings' => 'avancerede indstillinger', - 'pro_plan_advanced_settings' => ':link for at aktivere avancerede indstillinger felter ved at bliver medlem af Pro Plan', - 'invoice_design' => 'Fakturadesign', - 'specify_colors' => 'Egendefineret farve', - 'specify_colors_label' => 'Vælg farver som bruges i fakturaen', - - 'chart_builder' => 'Diagram bygger', - 'ninja_email_footer' => 'Brug :sitet til at fakturere dine kunder og fÃ¥ betalt pÃ¥ nettet - gratis!', - 'go_pro' => 'Vælg Pro', - - // Quotes - 'quote' => 'Pristilbud', - 'quotes' => 'Pristilbud', - 'quote_number' => 'Tilbuds nummer', - 'quote_number_short' => 'Tilbuds #', - 'quote_date' => 'Tilbudsdato', - 'quote_total' => 'Tilbud total', - 'your_quote' => 'Dit tilbud', - 'total' => 'Total', - 'clone' => 'Kopier', - - 'new_quote' => 'Nyt tilbud', - 'create_quote' => 'Gem tilbud', - 'edit_quote' => 'Rediger tilbud', - 'archive_quote' => 'Arkiver tilbud', - 'delete_quote' => 'Slet tilbud', - 'save_quote' => 'Lagre tilbud', - 'email_quote' => 'E-mail tilbudet', - 'clone_quote' => 'Kopier tilbud', - 'convert_to_invoice' => 'Konverter til en faktura', - 'view_invoice' => 'Se faktura', - 'view_client' => 'Vis klient', - 'view_quote' => 'Se tilbud', - - 'updated_quote' => 'Tilbud opdatert', - 'created_quote' => 'Tilbud oprettet', - 'cloned_quote' => 'Tilbud kopieret', - 'emailed_quote' => 'Tilbud sendt som e-mail', - 'archived_quote' => 'Tilbud arkiveret', - 'archived_quotes' => 'Arkiverede :count tilbud', - 'deleted_quote' => 'Tilbud slettet', - 'deleted_quotes' => 'Slettet :count tilbud', - 'converted_to_invoice' => 'Tilbud konverteret til faktura', - - 'quote_subject' => 'Nyt tilbud fra :account', - 'quote_message' => 'For Ã¥ se dit tilbud pÃ¥lydende :amount, klik pÃ¥ linket nedenfor.', - 'quote_link_message' => 'Hvis du vil se din klients tilbud, klik pÃ¥ linket under:', - 'notification_quote_sent_subject' => 'Tilbud :invoice sendt til :client', - 'notification_quote_viewed_subject' => 'Tilbudet :invoice er set af :client', - 'notification_quote_sent' => 'Følgende klient :client blev sendt tilbudsfaktura :invoice pÃ¥lydende :amount.', - 'notification_quote_viewed' => 'Følgende klient :client har set tilbudsfakturaen :invoice pÃ¥lydende :amount.', - - 'session_expired' => 'Session er udløbet.', - - 'invoice_fields' => 'Faktura felt', - 'invoice_options' => 'Faktura alternativer', - 'hide_quantity' => 'Skjul antal', - 'hide_quantity_help' => 'Hvis du altid kun har 1 som antal pÃ¥ dine fakturalinjer pÃ¥ fakturaen, kan du vælge ikke at vise antal pÃ¥ fakturaen.', - 'hide_paid_to_date' => 'Skjul delbetalinger', - 'hide_paid_to_date_help' => 'Vis kun delbetalinger hvis der er forekommet en delbetaling.', - - 'charge_taxes' => 'Inkluder skat', - 'user_management' => 'BrugerhÃ¥ndtering', - 'add_user' => 'Tilføj bruger', - 'send_invite' => 'Send invitation', - 'sent_invite' => 'Invitation sendt', - 'updated_user' => 'Bruger opdateret', - 'invitation_message' => 'Du har blevet inviteret af :invitor. ', - 'register_to_add_user' => 'Venligst registrer dig for at oprette en bruger', - 'user_state' => 'Status', - 'edit_user' => 'Rediger bruger', - 'delete_user' => 'Slet bruger', - 'active' => 'Aktiv', - 'pending' => 'Afventer', - 'deleted_user' => 'Bruger slettet', - 'limit_users' => 'Desværre, vil dette overstiger grænsen pÃ¥ ' . MAX_NUM_USERS . ' brugere', - - 'confirm_email_invoice' => 'Er du sikker pÃ¥ at du vil sende denne faktura?', - 'confirm_email_quote' => 'Er du sikker pÃ¥ du ville sende dette tilbud?', - 'confirm_recurring_email_invoice' => 'Gentagende er slÃ¥et til, er du sikker pÃ¥ du vil have denne faktura sendt?', - - 'cancel_account' => 'Annuller konto', - 'cancel_account_message' => 'Advarsel: Dette ville slette alle dine data og kan ikke omgøres', - 'go_back' => 'Go Back', - - 'data_visualizations' => 'Data visualisering', - 'sample_data' => 'Eksempel data vis', - 'hide' => 'Skjul', - 'new_version_available' => 'En ny version af :releases_link er tilgængelig. Din nuværende version er v:user_version, den nyeste version er v:latest_version', - - 'invoice_settings' => 'Faktura indstillinger', - 'invoice_number_prefix' => 'Faktura nummer præfiks', - 'invoice_number_counter' => 'Faktura nummer tæller', - 'quote_number_prefix' => 'Tilbuds nummer præfiks', - 'quote_number_counter' => 'Tilbuds nummer tæller', - 'share_invoice_counter' => 'Del faktura nummer tæller', - 'invoice_issued_to' => 'Faktura udstedt til', - 'invalid_counter' => 'For at undgÃ¥ mulige overlap, sæt venligst et faktura eller tilbuds nummer præfiks', - 'mark_sent' => 'Marker som sendt', - - 'gateway_help_1' => ':link to sign up for Authorize.net.', - 'gateway_help_2' => ':link to sign up for Authorize.net.', - 'gateway_help_17' => ':link to get your PayPal API signature.', - 'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.', - 'gateway_help_27' => ':link to sign up for TwoCheckout.', - - 'more_designs' => 'More designs', - 'more_designs_title' => 'Additional Invoice Designs', - 'more_designs_cloud_header' => 'Go Pro for more invoice designs', - 'more_designs_cloud_text' => '', - 'more_designs_self_host_header' => 'Get 6 more invoice designs for just $'.INVOICE_DESIGNS_PRICE, - 'more_designs_self_host_text' => '', - 'buy' => 'Buy', - 'bought_designs' => 'Successfully added additional invoice designs', - - 'sent' => 'sent', - 'timesheets' => 'Timesheets', - - 'payment_title' => 'Enter Your Billing Address and Credit Card information', - 'payment_cvv' => '*This is the 3-4 digit number onthe back of your card', - 'payment_footer1' => '*Billing address must match address associated with credit card.', - 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - - 'id_number' => 'ID Number', - 'white_label_link' => 'White label', - 'white_label_text' => 'Purchase a white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the top of the client pages.', - 'white_label_header' => 'White Label', - 'bought_white_label' => 'Successfully enabled white label license', - 'white_labeled' => 'White labeled', - - 'restore' => 'Restore', - 'restore_invoice' => 'Restore Invoice', - 'restore_quote' => 'Restore Quote', - 'restore_client' => 'Restore Client', - 'restore_credit' => 'Restore Credit', - 'restore_payment' => 'Restore Payment', - - 'restored_invoice' => 'Successfully restored invoice', - 'restored_quote' => 'Successfully restored quote', - 'restored_client' => 'Successfully restored client', - 'restored_payment' => 'Successfully restored payment', - 'restored_credit' => 'Successfully restored credit', - - 'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.', - 'discount_percent' => 'Percent', - 'discount_amount' => 'Amount', - - 'invoice_history' => 'Invoice History', - 'quote_history' => 'Quote History', - 'current_version' => 'Current version', - 'select_versiony' => 'Select version', - 'view_history' => 'View History', - - 'edit_payment' => 'Edit Payment', - 'updated_payment' => 'Successfully updated payment', - 'deleted' => 'Deleted', - 'restore_user' => 'Restore User', - 'restored_user' => 'Successfully restored user', - 'show_deleted_users' => 'Show deleted users', - 'email_templates' => 'Email Templates', - 'invoice_email' => 'Invoice Email', - 'payment_email' => 'Payment Email', - 'quote_email' => 'Quote Email', - 'reset_all' => 'Reset All', - 'approve' => 'Approve', - - 'token_billing_type_id' => 'Token Billing', - 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', - 'token_billing_1' => 'Disabled', - 'token_billing_2' => 'Opt-in - checkbox is shown but not selected', - 'token_billing_3' => 'Opt-out - checkbox is shown and selected', - 'token_billing_4' => 'Always', - 'token_billing_checkbox' => 'Store credit card details', - 'view_in_stripe' => 'View in Stripe', - 'use_card_on_file' => 'Use card on file', - 'edit_payment_details' => 'Edit payment details', - 'token_billing' => 'Save card details', - 'token_billing_secure' => 'The data is stored securely by :stripe_link', - - 'support' => 'Support', - 'contact_information' => 'Contact information', - '256_encryption' => '256-Bit Encryption', - 'amount_due' => 'Amount due', - 'billing_address' => 'Billing address', - 'billing_method' => 'Billing method', - 'order_overview' => 'Order overview', - 'match_address' => '*Address must match address associated with credit card.', - 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - - 'default_invoice_footer' => 'Set default invoice footer', - 'invoice_footer' => 'Invoice footer', - 'save_as_default_footer' => 'Save as default footer', - - 'token_management' => 'Token Management', - 'tokens' => 'Tokens', - 'add_token' => 'Add Token', - 'show_deleted_tokens' => 'Show deleted tokens', - 'deleted_token' => 'Successfully deleted token', - 'created_token' => 'Successfully created token', - 'updated_token' => 'Successfully updated token', - 'edit_token' => 'Edit Token', - 'delete_token' => 'Delete Token', - 'token' => 'Token', - - 'add_gateway' => 'Add Gateway', - 'delete_gateway' => 'Delete Gateway', - 'edit_gateway' => 'Edit Gateway', - 'updated_gateway' => 'Successfully updated gateway', - 'created_gateway' => 'Successfully created gateway', - 'deleted_gateway' => 'Successfully deleted gateway', - 'pay_with_paypal' => 'PayPal', - 'pay_with_card' => 'Credit card', - - 'change_password' => 'Change password', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'confirm_password' => 'Confirm password', - 'password_error_incorrect' => 'The current password is incorrect.', - 'password_error_invalid' => 'The new password is invalid.', - 'updated_password' => 'Successfully updated password', - - 'api_tokens' => 'API Tokens', - 'users_and_tokens' => 'Users & Tokens', - 'account_login' => 'Account Login', - 'recover_password' => 'Recover your password', - 'forgot_password' => 'Forgot your password?', - 'email_address' => 'Email address', - 'lets_go' => 'Let’s go', - 'password_recovery' => 'Password Recovery', - 'send_email' => 'Send email', - 'set_password' => 'Set Password', - 'converted' => 'Converted', - -); diff --git a/app/lang/da/validation.php b/app/lang/da/validation.php deleted file mode 100644 index acdb9c443adc..000000000000 --- a/app/lang/da/validation.php +++ /dev/null @@ -1,106 +0,0 @@ - ":attribute skal accepteres.", - "active_url" => ":attribute er ikke en valid URL.", - "after" => ":attribute skal være en dato efter :date.", - "alpha" => ":attribute mÃ¥ kun bestÃ¥ af bogstaver.", - "alpha_dash" => ":attribute mÃ¥ kun bestÃ¥ af bogstaver, tal og bindestreger.", - "alpha_num" => ":attribute mÃ¥ kun bestÃ¥ af bogstaver og tal.", - "array" => ":attribute skal være et array.", - "before" => ":attribute skal være en dato før :date.", - "between" => array( - "numeric" => ":attribute skal være imellem :min - :max.", - "file" => ":attribute skal være imellem :min - :max kilobytes.", - "string" => ":attribute skal være imellem :min - :max tegn.", - "array" => ":attribute skal indeholde mellem :min - :max elementer." - ), - "boolean" => ":attribute skal være sandt eller falsk", - "confirmed" => ":attribute er ikke det samme som bekræftelsesfeltet.", - "date" => ":attribute er ikke en gyldig dato.", - "date_format" => ":attribute matcher ikke formatet :format.", - "different" => ":attribute og :other skal være forskellige.", - "digits" => ":attribute skal have :digits cifre.", - "digits_between" => ":attribute skal have mellem :min og :max cifre.", - "email" => ":attribute skal være en gyldig e-mailadresse.", - "exists" => "Det valgte :attribute er ugyldig.", - "image" => ":attribute skal være et billede.", - "in" => "Det valgte :attribute er ugyldig.", - "integer" => ":attribute skal være et heltal.", - "ip" => ":attribute skal være en gyldig IP adresse.", - "max" => array( - "numeric" => ":attribute skal være højest :max.", - "file" => ":attribute skal være højest :max kilobytes.", - "string" => ":attribute skal være højest :max tegn.", - "array" => ":attribute mÃ¥ ikke indeholde mere end :max elementer." - ), - "mimes" => ":attribute skal være en fil af typen: :values.", - "min" => array( - "numeric" => ":attribute skal være mindst :min.", - "file" => ":attribute skal være mindst :min kilobytes.", - "string" => ":attribute skal være mindst :min tegn.", - "array" => ":attribute skal indeholde mindst :min elementer." - ), - "not_in" => "Den valgte :attribute er ugyldig.", - "numeric" => ":attribute skal være et tal.", - "regex" => ":attribute formatet er ugyldigt.", - "required" => ":attribute skal udfyldes.", - "required_if" => ":attribute skal udfyldes nÃ¥r :other er :value.", - "required_with" => ":attribute skal udfyldes nÃ¥r :values er udfyldt.", - "required_with_all" => ":attribute skal udfyldes nÃ¥r :values er udfyldt.", - "required_without" => ":attribute skal udfyldes nÃ¥r :values ikke er udfyldt.", - "required_without_all" => ":attribute skal udfyldes nÃ¥r ingen af :values er udfyldt.", - "same" => ":attribute og :other skal være ens.", - "size" => array( - "numeric" => ":attribute skal være :size.", - "file" => ":attribute skal være :size kilobytes.", - "string" => ":attribute skal være :size tegn lang.", - "array" => ":attribute skal indeholde :size elementer." - ), - "timezone" => "The :attribute must be a valid zone.", - "unique" => ":attribute er allerede taget.", - "url" => ":attribute formatet er ugyldigt.", - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => array( - 'attribute-name' => array( - 'rule-name' => 'custom-message', - ), - ), - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => array(), - -); diff --git a/app/lang/de/pagination.php b/app/lang/de/pagination.php deleted file mode 100644 index 5f83d3e960ee..000000000000 --- a/app/lang/de/pagination.php +++ /dev/null @@ -1,20 +0,0 @@ - '« zurück', - - 'next' => 'weiter »', - -); \ No newline at end of file diff --git a/app/lang/de/public.php b/app/lang/de/public.php deleted file mode 100644 index cd5d665bd2d5..000000000000 --- a/app/lang/de/public.php +++ /dev/null @@ -1,209 +0,0 @@ - 'Kostenlose & Open-Source Online-Rechnungsausstellung', - 'description' => 'Invoice Ninja ist eine kostenlose, Open-Source Lösung für die Rechnungsstellung und Abrechnung deiner Kunden. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - 'invoice_now' => 'Jetzt Rechnungen schreiben', - 'no_signup_needed' => 'Keine Anmeldung benötigt', - - 'link_blog' => 'Blog', - 'link_about_us' => 'Über uns', - 'link_contact_us' => 'Kontaktiere uns', - 'link_features' => 'Funktionen', - 'link_plans' => 'Mitgliedschaften', - 'link_compare' => 'Vergleich', - 'link_testimonials' => 'Referenzen', - 'link_faq' => 'FAQ', - - 'my_account' => 'Mein Konto', - 'login' => 'Einloggen', - 'connect_with_us' => 'Trete mit uns in Kontakt', - 'safe_and_secure' => 'Safe & Secure', - 'toggle_navigation' => 'Navigation umschalten', - - - 'home' => [ - 'header' => 'DER EINFACHE & KOSTENLOSE WEG RECHNUNGEN AUSZUSTELLEN', - 'sub_header' => 'Es ist so einfach. Hör auf Zeit mit komplizierten und teuren Methoden der Rechnungsstellung zu verschwenden.
    Keine Aufregung, einfach loslegen und bezahlt werden.', - 'footer' => 'Einfache, intuitive Rechnungsausstellung,Überall.', - - 'free_always' => 'Kostenlos, immer', - 'free_always_text' => 'Send unlimited invoices to 500 clients per month and never pay a dime. You are welcome to unlock still more awesome features with our Pro Plan, but our free app is a top-notch product that will do everything you need it to do, without any subscription or fees.', - - 'open_source' => 'Open-Source', - 'open_source_text' => 'No mysterious corporate silos here! Just full source code transparency and a devotion to working with anyone interested to build a better electronic invoicing platform. We even offer a handy zip download for a self-hosted version of Invoice Ninja.', - - 'live_pdf' => 'Live .PDF Vorschau', - 'live_pdf_text' => 'See how your edited invoice will look as a print-friendly pdf while you make the changes. Our pdf generator works in real time as you make your changes. You can even preview four beautiful preset designs. Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Bezahlungen', - 'online_payments_text' => 'Invoices sent with our app integrate seamlessly with the gateway credit card processor of your choice, to make it super easy for your clients to send you money with just a few clicks. We play nicely with Authorize.Net, Stripe, PayPal and loads more - 23 in all!', - ], - - 'about' => [ - 'header' => 'Über Invoice Ninja', - 'what_is' => 'Was ist Invoice Ninja?', - - 'team_ninja' => 'Team Ninja', - 'team_ninja_text' => 'Invoice Ninja is managed by a team of seasoned web workers. We launched in early 2014 and have been thrilled by the enthusiastic response we’ve received from our growing community of users.', - - 'co_founder' => 'Co-Founder', - 'ceo' => 'CEO', - 'cto' => '', - 'designer' => 'Designer', - 'marketing' => 'Marketing', - - 'shalom_bio' => 'Shalom has specialized in small business development for nearly 10 years. In addition to InvoiceNinja.com Shalom is CEO of a leading tour agency in Israel.', - 'hillel_bio' => 'Hillel has been developing enterprise applications for 15 years. His open-source AutoComplete component has been used by thousands of developers around the world.', - 'razi_bio' => 'Razi is a pixel nerd with a great deal of experience in design for web sites and applications. When she isn\'t busy with InvoiceNinja she runs a small web agency in Stockholm called kantorp-wegl.in', - 'ben_bio' => 'A veteran digital marketer and content strategist, Ben specializes in building communities around brands that make business easier for freelancers, SMBs and micro-entrepreneurs.', - ], - - 'contact' => [ - 'header' => 'Fragen, spezielle Anfragen, oder einfach nur Hallo sagen?', - 'sub_header' => 'Fülle das Formular aus und wir werden uns sobald wie möglich bei dir melden! Wir freuen uns von dir zuhören!', - 'other_ways' => 'Andere Wege uns zu erreichen', - - 'name' => 'Name', - 'name_help' => 'Bitte gib deinen Namen ein.', - - 'email' => 'E-Mail-Adresse', - 'email_help' => 'Bitte gib eine gültige E-Mail-Adresse ein.', - - 'message' => 'Nachricht', - 'message_help' => 'Bitte gib eine Nachricht ein.', - 'send_message' => 'Nachricht abschicken', - ], - - 'features' => [ - 'header' => 'Die Funktionen', - 'footer' => 'Dir gefällt, was du siehst?', - 'footer_action' => 'Beginne noch heute!', - - 'open_source' => 'Open-Source-Plattform', - 'open_source_text1' => 'Set the code free! Here at Invoice Ninja, we’re all about creating the best possible app, and inviting scrutiny via full code transparency is a central manifestation of this value.', - 'open_source_text2' => 'We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.', - - 'free_forever' => 'KOSTENLOS. Für immer.', - 'free_forever_text1' => 'Yeah, you read that correctly. You don’t have to pay us a cent to use our tools. We know how tough it is to make ends meet as a web-based business, and we’re bent on providing a top-notch product that will do everything you need it to do, without any subscription or opt-in fees.', - 'free_forever_text2' => 'Teste Invoice Ninja. Du hast buchstäblich nichts zu verlieren. Wir sind uns sicher, deine Erfahrung wird so positiv sein, dass du nie wieder einen anderen Service brauchen wirst.', - - 'secure' => 'Sicher & Privat', - 'secure_text1' => 'Invoice Ninja wurde von Grund auf entworfen, um Ihre Daten sicher zu halten. Nur du hast Zugriff auf deine Anmeldungs-und Buchaltungsdaten und wir werden deine Transaktionen niemals an dritte weitergeben.', - 'secure_text2' => 'Unsere Webseite benutzt 256-bit verschlüsselung, das ist sicherer, als die meisten Online-Banking-Seiten! Invoice Ninja benutzt das kryptographische Protokoll TLS 1.0, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. Wir fühlen uns hier sicher und haben masiv darin investiert, dass es dir genauso geht.', - - 'live_pdf' => 'Live .PDF Vorschau', - 'live_pdf_text1' => 'With Invoice Ninja, we’ve done away with the need for cumbersome multi-click invoice previewing after each save.', - 'live_pdf_text2' => 'When you enter the details of your customer and/or invoice in our editor, you can instantly see the results in the pdf preview pane below. Want to see what your invoice would look like in a different layout style? The live pdf can show you four beautiful preset styles in real time too.', - 'live_pdf_text3' => 'Einfach erstellen, speichern, senden und du bist fertig!', - - 'online_payments' => 'Online Bezahlungen', - 'online_payments_text1' => 'Invoice Ninja seamlessly integrates with all of the top internet payment processors and gateways so you can get paid for your work quickly and easily.', - 'online_payments_text2' => 'Invoices created with our tools aren’t just for bookkeeping purposes - they bring in the Benjamins. We also make it super easy to choose the right gateway for the specific needs of your business and are happy to help you to get started working with the gateway of your choice. What’s more, we’re constantly working on rolling out additional gateway integrations, so if you don’t see the one you use here, just let us know, and there’s a good chance we’ll add it for you.', - ], - - 'plans' => [ - 'header' => 'Die Mitgliedschaften', - 'free' => 'Kostenlos', - 'unlimited' => 'Uneingeschränkt', - 'pro_plan' => 'Pro-Mitgliedschaft', - - 'go_pro' => 'Go Pro to Unlock Premium Invoice Ninja Features', - 'go_pro_text' => 'We believe that the free version of Invoice Ninja is a truly awesome product loaded with the key features you need to bill your clients electronically. But for those who crave still more Ninja awesomeness, we\'ve unmasked the Invoice Ninja Pro plan, which offers more versatility, power and customization options for just $50 per year.', - - 'number_clients' => 'Number of clients per account', - 'unlimited_invoices' => 'Unlimited client invoices', - 'company_logo' => 'Add your company logo', - 'live_pdf' => 'Live .PDF invoice creation', - 'four_templates' => '4 beautiful invoice templates', - 'payments' => 'Accept credit card payments', - 'additional_templates' => 'Additional invoice templates', - 'multi_user' => 'Multi-user support', - 'quotes' => 'Quotes/pro-forma invoices', - 'advanced_settings' => 'Advanced invoice settings', - 'data_vizualizations' => 'Dynamic data vizualizations', - 'email_support' => 'Priority email support', - 'remove_created_by' => 'Remove "Created by Invoice Ninja"', - 'latest_features' => 'Latest and greatest features', - 'pricing' => 'Pricing', - 'free_always' => 'Kostenlos /Immer!', - 'year_price' => '$50 /Jahre', - ], - - 'compare' => [ - 'header' => 'How We Compare', - 'free_plan_comparison' => 'Gratis-Mitgledschaften-Vergleich', - 'paid_plan_comparison' => 'Kostenpflichtige-Mitgledschaften-Vergleich', - 'app' => 'Service', - 'cost' => 'Kosten', - 'clients' => 'Kunden', - 'invoices' => 'Rechnungen', - 'payment_gateways' => 'Zahlungsanbieter', - 'custom_logo' => 'Custom Logo', - 'multiple_templates' => 'Mehrere Vorlagen', - 'recurring_payments' => 'Wiederkehrende Zahlungen', - 'open_source' => 'Open-Source', - 'per_month' => 'pro Monat', - 'per_year' => 'pro Jahr', - 'free' => 'Kostenlos', - 'unlimited' => 'Unbegrenzt', - ], - - 'testimonials' => [ - 'testimonials' => 'Referenzen', - 'header' => 'Since we launched Invoice Ninja in March of 2014, we\'ve been overwhelmed by a deluge of user love. Here\'s a small taste of the glowing things people have to say about the great experiences the\'ve been having with our free e-invoicing app!', - ], - - 'faq' => [ - 'header' => 'Das FAQ', - - 'question1' => 'I know it isn’t standard ninja practice to reveal too many identity details, but who are you guys exactly?', - 'answer1' => 'We’re a small team of highly skilled digital journeymen based in Israel. We love open source, we love disrupting the big business status quo, and we love building helpful tools that are easy to use. We believe that everyone else’s web-based cash flow tools are unnecessarily expensive, clunky and complicated - and we’re bent on proving these beliefs with Invoice Ninja.', - - 'question2' => 'How do I get started using Invoice Ninja?', - 'answer2' => 'Just click on the big, yellow "Invoice Now" button on our homepage!', - - 'question3' => 'Do you offer customer support?', - 'answer3' => 'We sure do. Support is super important to us. Feel free to email us at support@invoiceninja.com with any questions you might have. We almost always reply within one business day.', - - 'question4' => 'Ist Invoice Ninja wirklich kostenlos? Für wie lange?', - 'answer4' => 'Yes, our basic app is 100% free. Forever and ever. For real. We also offer a paid Pro version of Invoice Ninja (you can learn all about its awesome features here), but it\'s important to us that the free version have all of the key features people need to do business.', - - 'question5' => 'How is Invoice Ninja able to offer this all for free? How are you making any money?', - 'answer5' => 'We’re mostly in this line of work because we believe it’s high time that a good electronic invoicing tool be available for free. There isn’t much money in it - yet. We do offer a paid Pro version of the app that we\'ve souped up with premium features. And when our users open up new accounts with payment processor gateways by clicking on links from our site, we make modest commissions as a gateway affiliate. So if zillions of freelancers and small businesses start running credit card charges through Invoice Ninja, or if scores of users go Pro, there’s a decent chance we\'ll recover our investment.', - - 'question6' => 'Really? So does that mean you’re not collecting information about me so you can sell me stuff or so that some other company can spam me according to my interests?', - 'answer6' => 'No way. We’re not mining your data, and we’re not selling you out. That wouldn’t be very ninja of us, would it?', - - 'question7' => 'But don’t you have access to my merchant and banking accounts?', - 'answer7' => 'Actually, we don’t. When you link an account at a third party financial institution with your Invoice Ninja account, you’re essentially giving our app permission to send money to you and nothing more. This is all managed by the tech teams at your financial service providers, who go to great lengths to ensure their integrations can’t be exploited or abused.', - - 'question8' => 'Given that Invoice Ninja is an open source app, how can I be sure that my financial information is safe with you?', - 'answer8' => 'There\'s a big difference between “open source" and “open data.†Anyone who wants to use the code that drives Invoice Ninja to create their own products or to make improvements to ours can do so. It’s available for anyone who wants to download and work with. But that’s just the source code - totally separate from what happens with that code on the Invoice Ninja servers. You’re the only one who has full access to what you\'re doing with our product. For more details on the security of our servers and how we handle our users\' information, please read the next question.', - - 'question9' => 'Also, wie sicher ist diese App?', - 'answer9' => 'Extremely. Data uploaded by our users runs through connections with 256-bit encryption, which is twice as many encryption bits that most bank websites use. We use the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. It’s fancy stuff that we put in place to make sure no one can gain access to your information except you.', - - 'question10' => 'How do I remove the small "Created by Invoice Ninja†image from the bottom of my invoices?', - 'answer10' => 'The amazingly affordable Pro version of Invoice Ninja allows you to do this and oh so much more.', - - 'question11' => 'Can I see what the application looks like with sample data?', - 'answer11' => 'Sure, click here to try out our demo account.', - - 'question12' => 'I hear that there\'s a version of Invoice Ninja that I can install myself on my own servers? Where can I learn more about this?', - 'answer12' => 'The rumors are true! Full instructions are available here.', - - 'question13' => 'I\'m seeing the options to assign various statuses to my invoices, clients, credits and payments. What\'s the difference between "active," "archived" and "deleted"?', - 'answer13' => 'These three handy statuses for invoices, clients, credits and payments allow you to keep your own cash flow management as straightforward and accessible as possible from your Invoice Ninja dashboard. None of these statuses will actually purge any records from your account - even "deleted" can always be recovered at any point in the future. "Active" means the record will appear in the relevant queue of records. To stash a record away so it\'s still fully operational but no longer cluttering up your interface, simply set it to be "archived." To deactivate a record and render it inaccessible to your clients, mark it "deleted."', - - 'question14' => 'My question wasn\'t covered by any of the content on this FAQ page. How can I get in touch with you?', - 'answer14' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - 'miss_something' => 'Haben wir etwas vergessen?', - 'miss_something_text' => 'Schreib uns eine E-Mail an contact@invoiceninja.com mit jeder Frage und jedem Kommentar, den du uns gerne mitteilen möchtest. Wir lieben es von den Menschen zu hören, die unsere Angebot nutzen! Wir werden unser bestes geben, um deine E-Mail innerhalb eines Werktages zu beantworten.', - - ], - - -]; \ No newline at end of file diff --git a/app/lang/de/reminders.php b/app/lang/de/reminders.php deleted file mode 100644 index 6f0a413e0093..000000000000 --- a/app/lang/de/reminders.php +++ /dev/null @@ -1,24 +0,0 @@ - "Passwörter müssen 6 Zeichen lang sein und korrekt bestätigt werden.", - - "user" => "Wir konnten leider keinen Nutzer mit dieser E-Mail Adresse finden.", - - "token" => "Der Passwort-Wiederherstellungs-Schlüssel ist ungültig.", - - "sent" => "Passworterinnerung wurde gesendet!", - -); diff --git a/app/lang/de/texts.php b/app/lang/de/texts.php deleted file mode 100644 index 87de74960d85..000000000000 --- a/app/lang/de/texts.php +++ /dev/null @@ -1,574 +0,0 @@ - 'Organisation', - 'name' => 'Name', - 'website' => 'Webseite', - 'work_phone' => 'Telefon', - 'address' => 'Adresse', - 'address1' => 'Straße', - 'address2' => 'Adresszusatz', - 'city' => 'Stadt', - 'state' => 'Bundesland', - 'postal_code' => 'Postleitzahl', - 'country_id' => 'Land', - 'contacts' => 'Kontakte', - 'first_name' => 'Vorname', - 'last_name' => 'Nachname', - 'phone' => 'Telefon', - 'email' => 'Email', - 'additional_info' => 'Zusätzliche Info', - 'payment_terms' => 'Zahlungsbedingungen', - 'currency_id' => 'Währung', - 'size_id' => 'Größe', - 'industry_id' => 'Kategorie', - 'private_notes' => 'Notizen', - - // invoice - 'invoice' => 'Rechnung', - 'client' => 'Kunde', - 'invoice_date' => 'Rechnungsdatum', - 'due_date' => 'Fällig am', - 'invoice_number' => 'Rechungsnummer', - 'invoice_number_short' => 'Rechnung #', - 'po_number' => 'Bestellnummer', - 'po_number_short' => 'BN #', - 'frequency_id' => 'Wie oft', - 'discount' => 'Rabatt', - 'taxes' => 'Steuern', - 'tax' => 'Steuer', - 'item' => 'Artikel', - 'description' => 'Beschreibung', - 'unit_cost' => 'Kosten pro Einheit', - 'quantity' => 'Menge', - 'line_total' => 'Summe', - 'subtotal' => 'Zwischensumme', - 'paid_to_date' => 'Bereits gezahlt', - 'balance_due' => 'Rechnungsbetrag', - 'invoice_design_id' => 'Design', - 'terms' => 'Bedingungen', - 'your_invoice' => 'Ihre Rechnung', - - 'remove_contact' => 'Kontakt löschen', - 'add_contact' => 'Kontakt hinzufügen', - 'create_new_client' => 'Einen neuen Kunden erstellen', - 'edit_client_details' => 'Kundendetails bearbeiten', - 'enable' => 'Aktivieren', - 'learn_more' => 'Mehr erfahren', - 'manage_rates' => 'Steuersätze verwalten', - 'note_to_client' => 'Notiz an den Kunden', - 'invoice_terms' => 'Zahlungsbedingungen', - 'save_as_default_terms' => 'Als Standardbedingungen speichern', - 'download_pdf' => 'PDF herunterladen', - 'pay_now' => 'Jetzt bezahlen', - 'save_invoice' => 'Rechnung speichern', - 'clone_invoice' => 'Rechnung duplizieren', - 'archive_invoice' => 'Rechnung archivieren', - 'delete_invoice' => 'Rechnung löschen', - 'email_invoice' => 'Rechnung versenden', - 'enter_payment' => 'Zahlung eingeben', - 'tax_rates' => 'Steuersätze', - 'rate' => 'Satz', - 'settings' => 'Einstellungen', - 'enable_invoice_tax' => 'Ermögliche das Bestimmen einer Rechnungssteuer', - 'enable_line_item_tax' => 'Ermögliche das Bestimmen von Steuern für Belegpositionen', - - // navigation - 'dashboard' => 'Dashboard', - 'clients' => 'Kunden', - 'invoices' => 'Rechnungen', - 'payments' => 'Zahlungen', - 'credits' => 'Guthaben', - 'history' => 'Verlauf', - 'search' => 'Suche', - 'sign_up' => 'Anmeldung', - 'guest' => 'Gast', - 'company_details' => 'Firmendaten', - 'online_payments' => 'Online-Zahlungen', - 'notifications' => 'Benachrichtigungen', - 'import_export' => 'Import/Export', - 'done' => 'Erledigt', - 'save' => 'Speichern', - 'create' => 'Erstellen', - 'upload' => 'Hochladen', - 'import' => 'Importieren', - 'download' => 'Downloaden', - 'cancel' => 'Abbrechen', - 'provide_email' => 'Bitte gib eine gültige E-Mail Adresse an', - 'powered_by' => 'Powered by', - 'no_items' => 'Keine Objekte', - - // recurring invoices - 'recurring_invoices' => 'Wiederkehrende Rechnungen', - 'recurring_help' => '

    Sende deinem Kunden wöchentlich, zwei mal im Monat, monatlich, vierteljährlich oder jährlich automatisch die gleiche Rechnung.

    -

    Benutze :MONTH, :QUARTER oder :YEAR für ein dynamisches Datum. Grundlegende Mathematik funktioniert genauso gut, zum Beispiel :MONTH-1.

    -

    Beispiel zu dynamischen Rechnungs-Variabeln:

    -
      -
    • "Fitnessstudio Mitgliedschaft für den Monat :MONTH" => "Fitnessstudio Mitgliedschaft für den Monat Juli"
    • -
    • ":YEAR+1 Jahresbeitrag" => "2015 Jahresbeitrag"
    • -
    • "Vorschusszahlung für :QUARTER+1" => "Vorschusszahlung für Q2"
    • -
    ', - - // dashboard - 'in_total_revenue' => 'Gesamtumsatz', - 'billed_client' => 'abgerechneter Kunde', - 'billed_clients' => 'abgerechnete Kunden', - 'active_client' => 'aktiver Kunde', - 'active_clients' => 'aktive Kunden', - 'invoices_past_due' => 'Fällige Rechnungen', - 'upcoming_invoices' => 'Kommende Rechnungen', - 'average_invoice' => 'Durchschnittlicher Rechnungsbetrag', - - // list pages - 'archive' => 'archivieren', - 'delete' => 'löschen', - 'archive_client' => 'Kunde archivieren', - 'delete_client' => 'Kunde löschen', - 'archive_payment' => 'Zahlung archivieren', - 'delete_payment' => 'Zahlung löschen', - 'archive_credit' => 'Guthaben archivieren', - 'delete_credit' => 'Guthaben löschen', - 'show_archived_deleted' => 'Zeige archivierte/gelöschte', - 'filter' => 'Filter', - 'new_client' => 'Neuer Kunde', - 'new_invoice' => 'Neue Rechnung', - 'new_payment' => 'Neue Zahlung', - 'new_credit' => 'Neues Guthaben', - 'contact' => 'Kontakt', - 'date_created' => 'Erstellungsdatum', - 'last_login' => 'Letzter Login', - 'balance' => 'Saldo', - 'action' => 'Aktion', - 'status' => 'Status', - 'invoice_total' => 'Rechnungsbetrag', - 'frequency' => 'Häufigkeit', - 'start_date' => 'Startdatum', - 'end_date' => 'Enddatum', - 'transaction_reference' => 'Abwicklungsreferenz', - 'method' => 'Verfahren', - 'payment_amount' => 'Zahlungsbetrag', - 'payment_date' => 'Zahlungsdatum', - 'credit_amount' => 'Guthabenbetrag', - 'credit_balance' => 'Guthabenstand', - 'credit_date' => 'Guthabendatum', - 'empty_table' => 'Es sind keine Daten vorhanden', - 'select' => 'Wählen', - 'edit_client' => 'Kunde bearbeiten', - 'edit_invoice' => 'Rechnung bearbeiten', - - // client view page - 'create_invoice' => 'Rechnung erstellen', - 'enter_credit' => 'Guthaben eingeben', - 'last_logged_in' => 'Zuletzt eingeloggt', - 'details' => 'Details', - 'standing' => 'Aktueller Stand', - 'credit' => 'Guthaben', - 'activity' => 'Aktivität', - 'date' => 'Datum', - 'message' => 'Nachricht', - 'adjustment' => 'Anpassung', - 'are_you_sure' => 'Bist du dir sicher?', - - // payment pages - 'payment_type_id' => 'Zahlungsart', - 'amount' => 'Betrag', - - // account/company pages - 'work_email' => 'E-Mail', - 'language_id' => 'Sprache', - 'timezone_id' => 'Zeitzone', - 'date_format_id' => 'Datumsformat', - 'datetime_format_id' => 'Datums-/Zeitformat', - 'users' => 'Benutzer', - 'localization' => 'Lokalisierung', - 'remove_logo' => 'Logo entfernen', - 'logo_help' => 'Unterstützt: JPEG, GIF und PNG. Empfohlene Höhe: 120px', - 'payment_gateway' => 'Zahlungseingang', - 'gateway_id' => 'Provider', - 'email_notifications' => 'E-Mail Benachrichtigungen', - 'email_sent' => 'Benachrichtigen, wenn eine Rechnung versendet wurde', - 'email_viewed' => 'Benachrichtigen, wenn eine Rechnung betrachtet wurde', - 'email_paid' => 'Benachrichtigen, wenn eine Rechnung bezahlt wurde', - 'site_updates' => 'Seiten Updates', - 'custom_messages' => 'Benutzerdefinierte Nachrichten', - 'default_invoice_terms' => 'Standard Rechnungsbedingungen', - 'default_email_footer' => 'Standard E-Mail Signatur', - 'import_clients' => 'Importiere Kundendaten', - 'csv_file' => 'Wähle CSV Datei', - 'export_clients' => 'Exportiere Kundendaten', - 'select_file' => 'Bitte wähle eine Datei', - 'first_row_headers' => 'Benutze erste Zeile als Kopfzeile', - 'column' => 'Spalte', - 'sample' => 'Beispiel', - 'import_to' => 'Importieren nach', - 'client_will_create' => 'Kunde wird erstellt', - 'clients_will_create' => 'Kunden werden erstellt', - - // application messages - 'created_client' => 'Kunde erfolgreich angelegt', - 'created_clients' => ':count Kunden erfolgreich angelegt', - 'updated_settings' => 'Einstellungen erfolgreich aktualisiert', - 'removed_logo' => 'Logo erfolgreich entfernt', - 'sent_message' => 'Nachricht erfolgreich versendet', - 'invoice_error' => 'Bitte stelle sicher, dass ein Kunde ausgewählt und alle Fehler behoben wurden', - 'limit_clients' => 'Entschuldige, das überschreitet das Limit von :count Kunden', - 'payment_error' => 'Es ist ein Fehler während der Zahlung aufgetreten. Bitte versuche es später noch einmal.', - 'registration_required' => 'Bitte melde dich an um eine Rechnung zu versenden', - 'confirmation_required' => 'Bitte bestätige deine E-Mail Adresse', - - 'updated_client' => 'Kunde erfolgreich aktualisiert', - 'created_client' => 'Kunde erfolgreich erstellt', - 'archived_client' => 'Kunde erfolgreich archiviert', - 'archived_clients' => ':count Kunden erfolgreich archiviert', - 'deleted_client' => 'Kunde erfolgreich gelöscht', - 'deleted_clients' => ':count Kunden erfolgreich gelöscht', - - 'updated_invoice' => 'Rechnung erfolgreich aktualisiert', - 'created_invoice' => 'Rechnung erfolgreich erstellt', - 'cloned_invoice' => 'Rechnung erfolgreich dupliziert', - 'emailed_invoice' => 'Rechnung erfolgreich versendet', - 'and_created_client' => 'und Kunde erstellt', - 'archived_invoice' => 'Rechnung erfolgreich archiviert', - 'archived_invoices' => ':count Rechnungen erfolgreich archiviert', - 'deleted_invoice' => 'Rechnung erfolgreich gelöscht', - 'deleted_invoices' => ':count Rechnungen erfolgreich gelöscht', - - 'created_payment' => 'Zahlung erfolgreich erstellt', - 'archived_payment' => 'Zahlung erfolgreich archiviert', - 'archived_payments' => ':count Zahlungen erfolgreich archiviert', - 'deleted_payment' => 'Zahlung erfolgreich gelöscht', - 'deleted_payments' => ':count Zahlungen erfolgreich gelöscht', - 'applied_payment' => 'Zahlung erfolgreich angewandt', - - 'created_credit' => 'Guthaben erfolgreich erstellt', - 'archived_credit' => 'Guthaben erfolgreich archiviert', - 'archived_credits' => ':count Guthaben erfolgreich archiviert', - 'deleted_credit' => 'Guthaben erfolgreich gelöscht', - 'deleted_credits' => ':count Guthaben erfolgreich gelöscht', - - // Emails - 'confirmation_subject' => 'Invoice Ninja Kontobestätigung', - 'confirmation_header' => 'Kontobestätigung', - 'confirmation_message' => 'Bitte klicke auf den folgenden Link um dein Konto zu bestätigen.', - 'invoice_message' => 'Um Ihre Rechnung über :amount einzusehen, klicken Sie bitte auf den folgenden Link.', - 'payment_subject' => 'Zahlungseingang', - 'payment_message' => 'Vielen Dank für Ihre Zahlung von :amount.', - 'email_salutation' => 'Sehr geehrte/r :name,', - 'email_signature' => 'Mit freundlichen Grüßen,', - 'email_from' => 'Das InvoiceNinja Team', - 'user_email_footer' => 'Um deine E-Mail Benachrichtigungen anzupassen besuche bitte '.SITE_URL.'/company/notifications', - 'invoice_link_message' => 'Um deine Kundenrechnung anzuschauen, klicke auf den folgenden Link:', - 'notification_invoice_paid_subject' => 'Die Rechnung :invoice wurde von :client bezahlt', - 'notification_invoice_sent_subject' => 'Die Rechnung :invoice wurde an :client versendet', - 'notification_invoice_viewed_subject' => 'Die Rechnung :invoice wurde von :client angeschaut', - 'notification_invoice_paid' => 'Eine Zahlung von :amount wurde von :client bezüglich Rechnung :invoice getätigt.', - 'notification_invoice_sent' => 'Dem folgenden Kunden :client wurde die Rechnung :invoice über :amount zugesendet.', - 'notification_invoice_viewed' => 'Der folgende Kunde :client hat sich Rechnung :invoice über :amount angesehen.', - 'reset_password' => 'Du kannst dein Passwort zurücksetzen, indem du auf den folgenden Link klickst:', - 'reset_password_footer' => 'Wenn du das Zurücksetzen des Passworts nicht beantragt hast benachrichtige bitte unseren Support: ' . CONTACT_EMAIL, - - // Payment page - 'secure_payment' => 'Sichere Zahlung', - 'card_number' => 'Kartennummer', - 'expiration_month' => 'Ablaufmonat', - 'expiration_year' => 'Ablaufjahr', - 'cvv' => 'Kartenprüfziffer', - - // Security alerts - 'confide' => array( - 'too_many_attempts' => 'Zu viele Versuche. Bitte probiere es in ein paar Minuten erneut.', - 'wrong_credentials' => 'Falsche E-Mail Adresse oder falsches Passwort.', - 'confirmation' => 'Dein Konto wurde bestätigt!', - 'wrong_confirmation' => 'Falscher Bestätigungscode.', - 'password_forgot' => 'Weitere Informationen um das Passwort zurückzusetzen wurden dir per E-Mail zugeschickt.', - 'password_reset' => 'Dein Passwort wurde erfolgreich geändert.', - 'wrong_password_reset' => 'Ungültiges Passwort. Versuche es erneut', - ), - - // Pro Plan - 'pro_plan' => [ - 'remove_logo' => ':link, um das Invoice Ninja Logo zu entfernen, indem du dem Pro Plan beitrittst', - 'remove_logo_link' => 'Klicke hier', - ], - - 'logout' => 'Ausloggen', - 'sign_up_to_save' => 'Melde dich an, um deine Arbeit zu speichern', - 'agree_to_terms' =>'Ich akzeptiere die Invoice Ninja :terms', - 'terms_of_service' => 'Service-Bedingungen', - 'email_taken' => 'Diese E-Mail Adresse ist bereits registriert', - 'working' => 'Wird bearbeitet', - 'success' => 'Erfolg', - 'success_message' => 'Du hast dich erfolgreich registriert. Bitte besuche den Link in deiner Bestätigungsmail um deine E-Mail Adresse zu verifizieren.', - 'erase_data' => 'Diese Aktion wird deine Daten dauerhaft löschen.', - 'password' => 'Passwort', - 'invoice_subject' => 'Neue Rechnung von :account', - 'close' => 'Schließen', - - 'pro_plan_product' => 'Pro Plan', - 'pro_plan_description' => 'Jahresmitgliedschaft beim Invoice Ninja Pro Plan.', - 'pro_plan_success' => 'Danke für den Beitritt! Sobald die Rechnung bezahlt wurde, beginnt deine Pro Plan Mitgliedschaft.', - 'pro_plan_success' => 'Danke für den Beitritt! Sobald die Rechnung bezahlt wurde,Beim Auswählen eines Produktes werden beginnt deine Pro Plan Mitgliedschaft.', - - 'unsaved_changes' => 'Es liegen ungespeicherte Änderungen vor', - 'custom_fields' => 'Benutzerdefinierte Felder', - 'company_fields' => 'Firmenfelder', - 'client_fields' => 'Kundenfelder', - 'field_label' => 'Feldbezeichnung', - 'field_value' => 'Feldwert', - 'edit' => 'Bearbeiten', - 'view_as_recipient' => 'Als Empfänger betrachten', - - // product management - 'product' => 'Produkt', - 'products' => 'Produkte', - 'fill_products' => 'Produkte automatisch ausfüllen', - 'fill_products_help' => 'Beim Auswählen eines Produktes werden automatisch Beschreibung und Kosten ausgefüllt', - 'update_products' => 'Produkte automatisch aktualisieren', - 'update_products_help' => 'Beim Aktualisieren einer Rechnung werden die Produkte automatisch aktualisiert', - 'create_product' => 'Produkt erstellen', - 'edit_product' => 'Produkt bearbeiten', - 'archive_product' => 'Produkt archivieren', - 'updated_product' => 'Produkt erfolgreich aktualisiert', - 'created_product' => 'Produkt erfolgreich erstellt', - 'archived_product' => 'Produkt erfolgreich archiviert', - 'product_library' => 'Produktbibliothek', - 'pro_plan_custom_fields' => ':link to enable custom fields by joining the Pro Plan', - - 'advanced_settings' => 'Erweiterte Einstellungen', - 'pro_plan_advanced_settings' => ':link um durch eine Pro-Mitgliedschaft erweiterte Einstellungen zu aktivieren', - 'invoice_design' => 'Rechnungsvorlage', - 'specify_colors' => 'Farben wählen', - 'specify_colors_label' => 'Wähle die in der Rechnung verwendeten Farben', - - 'chart_builder' => 'Diagrammersteller', - 'ninja_email_footer' => 'Nutze :site um Kunden Rechnungen zu stellen und online bezahlt zu werden, kostenlos!', - 'go_pro' => 'Werde Pro-Mitglied', - - // Quotes - 'quote' => 'Angebot', - 'quotes' => 'Angebote', - 'quote_number' => 'Angebotsnummer', - 'quote_number_short' => 'Angebot #', - 'quote_date' => 'Angebotsdatum', - 'quote_total' => 'Gesamtanzahl Angebote', - 'your_quote' => 'Ihr Angebot', - 'total' => 'Gesamt', - 'clone' => 'Duplizieren', - - 'new_quote' => 'Neues Angebot', - 'create_quote' => 'Angebot erstellen', - 'edit_quote' => 'Angebot bearbeiten', - 'archive_quote' => 'Angebot archivieren', - 'delete_quote' => 'Angebot löschen', - 'save_quote' => 'Angebot speichern', - 'email_quote' => 'Angebot per E-Mail senden', - 'clone_quote' => 'Angebot duplizieren', - 'convert_to_invoice' => 'In Rechnung umwandeln', - 'view_invoice' => 'Rechnung anschauen', - 'view_quote' => 'Angebot anschauen', - 'view_client' => 'Kunde anschauen', - - 'updated_quote' => 'Angebot erfolgreich aktualisiert', - 'created_quote' => 'Angebot erfolgreich erstellt', - 'cloned_quote' => 'Angebot erfolgreich dupliziert', - 'emailed_quote' => 'Angebot erfolgreich versendet', - 'archived_quote' => 'Angebot erfolgreich archiviert', - 'archived_quotes' => ':count Angebote erfolgreich archiviert', - 'deleted_quote' => 'Angebot erfolgreich gelöscht', - 'deleted_quotes' => ':count Angebote erfolgreich gelöscht', - 'converted_to_invoice' => 'Angebot erfolgreich in Rechnung umgewandelt', - - 'quote_subject' => 'Neues Angebot von :account', - 'quote_message' => 'Klicken Sie auf den folgenden Link um das Angebot über :amount anzuschauen.', - 'quote_link_message' => 'Klicke auf den folgenden Link um das Angebot deines Kunden anzuschauen:', - 'notification_quote_sent_subject' => 'Angebot :invoice wurde an :client versendet', - 'notification_quote_viewed_subject' => 'Angebot :invoice wurde von :client angeschaut', - 'notification_quote_sent' => 'Der folgende Kunde :client erhielt das Angebot :invoice über :amount.', - 'notification_quote_viewed' => 'Der folgende Kunde :client hat sich das Angebot :client über :amount angesehen.', - - 'session_expired' => 'Deine Sitzung ist abgelaufen.', - - 'invoice_fields' => 'Rechnungsfelder', - 'invoice_options' => 'Rechnungsoptionen', - 'hide_quantity' => 'Anzahl verbergen', - 'hide_quantity_help' => 'Wenn deine Menge immer 1 beträgt, kannst du deine Rechnung einfach halten, indem du dieses Feld entfernst.', - 'hide_paid_to_date' => 'Bereits gezahlt ausblenden', - 'hide_paid_to_date_help' => 'Bereits gezahlt nur anzeigen, wenn eine Zahlung eingegangen ist.', - - 'charge_taxes' => 'Steuern erheben', - 'user_management' => 'Benutzerverwaltung', - 'add_user' => 'Add User', - 'send_invite' => 'Einladung senden', - 'sent_invite' => 'Einladung erfolgreich gesendet', - 'updated_user' => 'Benutzer erfolgreich aktualisiert', - 'invitation_message' => 'Du wurdest von :invitor eingeladen.', - 'register_to_add_user' => 'Bitte registrieren um einen Benutzer hinzuzufügen', - 'user_state' => 'Status', - 'edit_user' => 'Benutzer bearbeiten', - 'delete_user' => 'Benutzer löschen', - 'active' => 'Aktiv', - 'pending' => 'Ausstehend', - 'deleted_user' => 'Benutzer erfolgreich gelöscht', - 'limit_users' => 'Entschuldige, das würde das Limit von ' . MAX_NUM_USERS . ' Benutzern überschreiten', - - 'confirm_email_invoice' => 'Bist du sicher, dass du diese Rechnung per E-Mail versenden möchtest?', - 'confirm_email_quote' => 'Bist du sicher, dass du dieses Angebot per E-Mail versenden möchtest', - 'confirm_recurring_email_invoice' => 'Wiederkehrende Rechnung ist aktiv. Bis du sicher, dass du diese Rechnung weiterhin als E-Mail verschicken möchtest?', - - 'cancel_account' => 'Account Kündigen', - 'cancel_account_message' => 'Warnung: Alle Daten werden unwiderruflich und vollständig gelöscht, es gibt kein zurück.', - 'go_back' => 'Zurück', - - 'data_visualizations' => 'Datenvisualisierungen', - 'sample_data' => 'Beispieldaten werden angezeigt', - 'hide' => 'Verbergen', - 'new_version_available' => 'Eine neue Version von :releases_link ist verfügbar. Du benutzt v:user_version, die aktuelle ist v:latest_version', - - 'invoice_settings' => 'Rechnungseinstellungen', - 'invoice_number_prefix' => 'Präfix für Rechnungsnummer', - 'invoice_number_counter' => 'Zähler für Rechnungsnummer', - 'quote_number_prefix' => 'Präfix für Angebotsnummer', - 'quote_number_counter' => 'Zähler für Angebotsnummer', - 'share_invoice_counter' => 'Zähler der Rechnung teilen', - 'invoice_issued_to' => 'Rechnung ausgestellt für', - 'invalid_counter' => 'Bitte setze, um Probleme zu vermeiden, entweder ein Rechnungs-oder Angebotspräfix.', - 'mark_sent' => 'Als gesendet markieren', - - 'gateway_help_1' => ':link um sich bei Authorize.net anzumelden.', - 'gateway_help_2' => ':link um sich bei Authorize.net anzumelden.', - 'gateway_help_17' => ':link um deine PayPal API-Signatur zu erhalten.', - 'gateway_help_23' => 'Anmerkung: benutze deinen secret API key, nicht deinen publishable API key.', - 'gateway_help_27' => ':link um sich bei TwoCheckout anzumelden.', - - 'more_designs' => 'Weitere Vorlagen', - 'more_designs_title' => 'Zusätzliche Rechnungsvorlagen', - 'more_designs_cloud_header' => 'Werde Pro-Mitglied für zusätzliche Rechnungsvorlagen', - 'more_designs_cloud_text' => '', - 'more_designs_self_host_header' => 'Erhalte 6 zusätzliche Rechnungsvorlagen für nur $'.INVOICE_DESIGNS_PRICE, - 'more_designs_self_host_text' => '', - 'buy' => 'Kaufen', - 'bought_designs' => 'Die zusätzliche Rechnungsvorlagen wurden erfolgreich hinzugefügt', - - 'sent' => 'gesendet', - 'timesheets' => 'Timesheets', - - 'payment_title' => 'Geben Sie Ihre Rechnungsadresse und Ihre Kreditkarteninformationen ein', - 'payment_cvv' => '*Dies ist die 3-4-stellige Nummer auf der Rückseite Ihrer Kreditkarte', - 'payment_footer1' => '*Die Rechnungsadresse muss mit der Adresse der Kreditkarte übereinstimmen.', - 'payment_footer2' => '*Bitte drücken Sie nur einmal auf "Jetzt bezahlen" - die Verarbeitung der Transaktion kann bis zu einer Minute dauern.', - 'vat_number' => 'USt-IdNr.', - - 'id_number' => 'ID-Nummer', - 'white_label_link' => 'Branding entfernen', - 'white_label_text' => 'Um das Invoice Ninja Logo auf der Kundenseite zu entfernen, kaufe bitte eine Lizenz für $'.WHITE_LABEL_PRICE, - 'white_label_header' => 'Branding entfernen', - 'bought_white_label' => 'Branding-freie Lizenz erfolgreich aktiviert', - 'white_labeled' => 'Branding entfernt', - - 'restore' => 'Wiederherstellen', - 'restore_invoice' => 'Rechnung wiederherstellen', - 'restore_quote' => 'Angebot wiederherstellen', - 'restore_client' => 'Kunde wiederherstellen', - 'restore_credit' => 'Guthaben wiederherstellen', - 'restore_payment' => 'Zahlung wiederherstellen', - - 'restored_invoice' => 'Rechnung erfolgreich wiederhergestellt', - 'restored_quote' => 'Angebot erfolgreich wiederhergestellt', - 'restored_client' => 'Kunde erfolgreich wiederhergestellt', - 'restored_payment' => 'Zahlung erfolgreich wiederhergestellt', - 'restored_credit' => 'Guthaben erfolgreich wiederhergestellt', - - 'reason_for_canceling' => 'Hilf uns, unser Angebot zu verbessern, indem du uns mitteilst, weswegen du dich dazu entschieden hast, unseren Service nicht länger zu nutzen.', - 'discount_percent' => 'Prozent', - 'discount_amount' => 'Wert', - - 'invoice_history' => 'Rechnungshistorie', - 'quote_history' => 'Angebotshistorie', - 'current_version' => 'Aktuelle Version', - 'select_versiony' => 'Version auswählen', - 'view_history' => 'Historie anzeigen', - - 'edit_payment' => 'Zahlung bearbeiten', - 'updated_payment' => 'Zahlung erfolgreich aktualisiert', - 'deleted' => 'Gelöscht', - 'restore_user' => 'Benutzer wiederherstellen', - 'restored_user' => 'Benutzer erfolgreich wiederhergestellt', - 'show_deleted_users' => 'Zeige gelöschte Benutzer', - 'email_templates' => 'E-Mail Vorlagen', - 'invoice_email' => 'Rechnungsmail', - 'payment_email' => 'Zahlungsmail', - 'quote_email' => 'Angebotsmail', - 'reset_all' => 'Alle zurücksetzen', - 'approve' => 'Zustimmen', - - 'token_billing_type_id' => 'Token Billing', - 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', - 'token_billing_1' => 'Deaktiviert', - 'token_billing_2' => 'Opt-in - Kontrollkästchen wird angezeigt ist aber nicht ausgewählt', - 'token_billing_3' => 'Opt-out - Kontrollkästchen wird angezeigt und ist ausgewählt', - 'token_billing_4' => 'Immer', - 'token_billing_checkbox' => 'Kreditkarteninformationen speichern', - 'view_in_stripe' => 'Auf Stripe anzeigen', - 'use_card_on_file' => 'Verwende gespeicherte Kreditkarte', - 'edit_payment_details' => 'Zahlungsdetails bearbeiten', - 'token_billing' => 'Kreditkarte merken', - 'token_billing_secure' => 'Die Daten werden sicher von :stripe_link gespeichert.', - - 'support' => 'Support', - 'contact_information' => 'Kontakt Informationen', - '256_encryption' => '256-Bit Verschlüsselung', - 'amount_due' => 'Fälliger Betrag', - 'billing_address' => 'Rechnungsadresse', - 'billing_method' => 'Abrechnungsmethode', - 'order_overview' => 'Bestellübersicht', - 'match_address' => '*Die Rechnungsadresse muss mit der Adresse der Kreditkarte übereinstimmen.', - 'click_once' => '*Bitte drücken Sie nur einmal auf "Jetzt bezahlen" - die Verarbeitung der Transaktion kann bis zu einer Minute dauern.', - - 'default_invoice_footer' => 'Standard Fußzeile festlegen', - 'invoice_footer' => 'Fußzeile', - 'save_as_default_footer' => 'Als Standard Fußzeile speichern', - - 'token_management' => 'Token Verwaltung', - 'tokens' => 'Token', - 'add_token' => 'Token hinzufügen', - 'show_deleted_tokens' => 'Zeige gelöschte Token', - 'deleted_token' => 'Token erfolgreich gelöscht', - 'created_token' => 'Token erfolgreich erstellt', - 'updated_token' => 'Token erfolgreich aktualisiert', - 'edit_token' => 'Token bearbeiten', - 'delete_token' => 'Token löschen', - 'token' => 'Token', - - 'add_gateway' => 'Add Gateway', - 'delete_gateway' => 'Delete Gateway', - 'edit_gateway' => 'Edit Gateway', - 'updated_gateway' => 'Successfully updated gateway', - 'created_gateway' => 'Successfully created gateway', - 'deleted_gateway' => 'Successfully deleted gateway', - 'pay_with_paypal' => 'PayPal', - 'pay_with_card' => 'Credit card', - - 'change_password' => 'Passwort ändern', - 'current_password' => 'Aktuelles Passwort', - 'new_password' => 'Neues Passwort', - 'confirm_password' => 'Passwort bestätigen', - 'password_error_incorrect' => 'Das aktuelle Passwort ist nicht korrekt.', - 'password_error_invalid' => 'Das neue Kennwort ist ungültig.', - 'updated_password' => 'Passwort erfolgreich aktualisiert', - - 'api_tokens' => 'API Tokens', - 'users_and_tokens' => 'Users & Tokens', - 'account_login' => 'Account Login', - 'recover_password' => 'Recover your password', - 'forgot_password' => 'Forgot your password?', - 'email_address' => 'Email address', - 'lets_go' => 'Let’s go', - 'password_recovery' => 'Password Recovery', - 'send_email' => 'Send email', - 'set_password' => 'Set Password', - 'converted' => 'Converted', - - -); diff --git a/app/lang/de/validation.php b/app/lang/de/validation.php deleted file mode 100644 index 489dfee02fb3..000000000000 --- a/app/lang/de/validation.php +++ /dev/null @@ -1,108 +0,0 @@ - ":attribute muss akzeptiert werden.", - "active_url" => ":attribute ist keine gültige Internet-Adresse.", - "after" => ":attribute muss ein Datum nach dem :date sein.", - "alpha" => ":attribute darf nur aus Buchstaben bestehen.", - "alpha_dash" => ":attribute darf nur aus Buchstaben, Zahlen, Binde- und Unterstrichen bestehen. Umlaute (ä, ö, ü) und Eszett (ß) sind nicht erlaubt.", - "alpha_num" => ":attribute darf nur aus Buchstaben und Zahlen bestehen.", - "array" => ":attribute muss ein Array sein.", - "before" => ":attribute muss ein Datum vor dem :date sein.", - "between" => array( - "numeric" => ":attribute muss zwischen :min & :max liegen.", - "file" => ":attribute muss zwischen :min & :max Kilobytes groß sein.", - "string" => ":attribute muss zwischen :min & :max Zeichen lang sein.", - "array" => ":attribute muss zwischen :min & :max Elemente haben." - ), - "confirmed" => ":attribute stimmt nicht mit der Bestätigung überein.", - "date" => ":attribute muss ein gültiges Datum sein.", - "date_format" => ":attribute entspricht nicht dem gültigen Format für :format.", - "different" => ":attribute und :other müssen sich unterscheiden.", - "digits" => ":attribute muss :digits Stellen haben.", - "digits_between" => ":attribute muss zwischen :min und :max Stellen haben.", - "email" => ":attribute Format ist ungültig.", - "exists" => "Der gewählte Wert für :attribute ist ungültig.", - "image" => ":attribute muss ein Bild sein.", - "in" => "Der gewählte Wert für :attribute ist ungültig.", - "integer" => ":attribute muss eine ganze Zahl sein.", - "ip" => ":attribute muss eine gültige IP-Adresse sein.", - "max" => array( - "numeric" => ":attribute darf maximal :max sein.", - "file" => ":attribute darf maximal :max Kilobytes groß sein.", - "string" => ":attribute darf maximal :max Zeichen haben.", - "array" => ":attribute darf nicht mehr als :max Elemente haben." - ), - "mimes" => ":attribute muss den Dateityp :values haben.", - "min" => array( - "numeric" => ":attribute muss mindestens :min sein.", - "file" => ":attribute muss mindestens :min Kilobytes groß sein.", - "string" => ":attribute muss mindestens :min Zeichen lang sein.", - "array" => ":attribute muss mindestens :min Elemente haben." - ), - "not_in" => "Der gewählte Wert für :attribute ist ungültig.", - "numeric" => ":attribute muss eine Zahl sein.", - "regex" => ":attribute Format ist ungültig.", - "required" => ":attribute muss ausgefüllt sein.", - "required_if" => ":attribute muss ausgefüllt sein wenn :other :value ist.", - "required_with" => ":attribute muss angegeben werden wenn :values ausgefüllt wurde.", - "required_with_all" => "The :attribute field is required when :values is present.", - "required_without" => ":attribute muss angegeben werden wenn :values nicht ausgefüllt wurde.", - "required_without_all" => ":attribute muss angegeben werden wenn keines der Felder :values ausgefüllt wurde.", - "same" => ":attribute und :other müssen übereinstimmen.", - "size" => array( - "numeric" => ":attribute muss gleich :size sein.", - "file" => ":attribute muss :size Kilobyte groß sein.", - "string" => ":attribute muss :size Zeichen lang sein.", - "array" => ":attribute muss genau :size Elemente haben." - ), - "unique" => ":attribute ist schon vergeben.", - "url" => "Das Format von :attribute ist ungültig.", - - "positive" => ":attribute muss größer als null sein.", - "has_credit" => "Der Kunde hat nicht genug Guthaben.", - "notmasked" => "The values are masked", - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => array( - 'attribute-name' => array( - 'rule-name' => 'custom-message', - ), - ), - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => array(), - -); diff --git a/app/lang/en/pagination.php b/app/lang/en/pagination.php deleted file mode 100755 index eb9be3baaed5..000000000000 --- a/app/lang/en/pagination.php +++ /dev/null @@ -1,20 +0,0 @@ - '« Previous', - - 'next' => 'Next »', - -); \ No newline at end of file diff --git a/app/lang/en/public.php b/app/lang/en/public.php deleted file mode 100644 index 7f5ecb9008e2..000000000000 --- a/app/lang/en/public.php +++ /dev/null @@ -1,209 +0,0 @@ - 'Free Open-Source Online Invoicing', - 'description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - 'invoice_now' => 'Invoice Now', - 'no_signup_needed' => 'No signup needed', - - 'link_blog' => 'Blog', - 'link_about_us' => 'About Us', - 'link_contact_us' => 'Contact Us', - 'link_features' => 'Features', - 'link_plans' => 'Plans', - 'link_compare' => 'Compare', - 'link_testimonials' => 'Testimonials', - 'link_faq' => 'FAQ', - - 'my_account' => 'My Account', - 'login' => 'Login', - 'connect_with_us' => 'Connect with Us', - 'safe_and_secure' => 'Safe & Secure', - 'toggle_navigation' => 'Toggle navigation', - - - 'home' => [ - 'header' => 'THE SIMPLE & FREE WAY TO INVOICE CLIENTS', - 'sub_header' => 'It\'s just that easy. Stop spending time on complicated and expensive invoicing.
    No fuss, just get started and get paid.', - 'footer' => 'Simple, Intuitive Invoicing,Anywhere.', - - 'free_always' => 'Free, Always', - 'free_always_text' => 'Send unlimited invoices to 500 clients per month and never pay a dime. You are welcome to unlock still more awesome features with our Pro Plan, but our free app is a top-notch product that will do everything you need it to do, without any subscription or fees.', - - 'open_source' => 'Open-Source', - 'open_source_text' => 'No mysterious corporate silos here! Just full source code transparency and a devotion to working with anyone interested to build a better electronic invoicing platform. We even offer a handy zip download for a self-hosted version of Invoice Ninja.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text' => 'See how your edited invoice will look as a print-friendly pdf while you make the changes. Our pdf generator works in real time as you make your changes. You can even preview four beautiful preset designs. Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text' => 'Invoices sent with our app integrate seamlessly with the gateway credit card processor of your choice, to make it super easy for your clients to send you money with just a few clicks. We play nicely with Authorize.Net, Stripe, PayPal and loads more - 23 in all!', - ], - - 'about' => [ - 'header' => 'About Invoice Ninja', - 'what_is' => 'What is Invoice Ninja?', - - 'team_ninja' => 'Team Ninja', - 'team_ninja_text' => 'Invoice Ninja is managed by a team of seasoned web workers. We launched in early 2014 and have been thrilled by the enthusiastic response we’ve received from our growing community of users.', - - 'co_founder' => 'Co-Founder', - 'ceo' => 'CEO', - 'cto' => '', - 'designer' => 'Designer', - 'marketing' => 'Marketing', - - 'shalom_bio' => 'Shalom has specialized in small business development for nearly 10 years. In addition to InvoiceNinja.com Shalom is CEO of a leading tour agency in Israel.', - 'hillel_bio' => 'Hillel has been developing enterprise applications for 15 years. His open-source AutoComplete component has been used by thousands of developers around the world.', - 'razi_bio' => 'Razi is a pixel nerd with a great deal of experience in design for web sites and applications. When she isn\'t busy with InvoiceNinja she runs a small web agency in Stockholm called kantorp-wegl.in', - 'ben_bio' => 'A veteran digital marketer and content strategist, Ben specializes in building communities around brands that make business easier for freelancers, SMBs and micro-entrepreneurs.', - ], - - 'contact' => [ - 'header' => 'Questions, special requests, or just want to say hi?', - 'sub_header' => 'Fill in the form below and we\'ll get back to you as soon as possible. Hope to hear from you!', - 'other_ways' => 'Other ways to reach us', - - 'name' => 'Name', - 'name_help' => 'Please enter your name.', - - 'email' => 'Email Address', - 'email_help' => 'Please enter a valid e-mail address.', - - 'message' => 'Message', - 'message_help' => 'Please enter a message.', - 'send_message' => 'Send Message', - ], - - 'features' => [ - 'header' => 'The Features', - 'footer' => 'Like what you see?', - 'footer_action' => 'Get started today!', - - 'open_source' => 'Open Source Platform', - 'open_source_text1' => 'Set the code free! Here at Invoice Ninja, we’re all about creating the best possible app, and inviting scrutiny via full code transparency is a central manifestation of this value.', - 'open_source_text2' => 'We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.', - - 'free_forever' => 'FREE. Forever.', - 'free_forever_text1' => 'Yeah, you read that correctly. You don’t have to pay us a cent to use our tools. We know how tough it is to make ends meet as a web-based business, and we’re bent on providing a top-notch product that will do everything you need it to do, without any subscription or opt-in fees.', - 'free_forever_text2' => 'Try Invoice Ninja out. You literally have nothing to lose. We’re confident that you’ll find the experience so positive that you’ll never need to turn elsewhere.', - - 'secure' => 'Secure & Private', - 'secure_text1' => 'Invoice Ninja has been built from the ground up to keep your data safe. Only you have access to your login & accounting details, & we will never share your transaction data to any third party.', - 'secure_text2' => 'Our website operates with 256-bit encryption, which is even more secure than most banking websites. Invoice Ninja uses the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. We feel safe here and have invested heavily in measures to ensure that you do too.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text1' => 'With Invoice Ninja, we’ve done away with the need for cumbersome multi-click invoice previewing after each save.', - 'live_pdf_text2' => 'When you enter the details of your customer and/or invoice in our editor, you can instantly see the results in the pdf preview pane below. Want to see what your invoice would look like in a different layout style? The live pdf can show you four beautiful preset styles in real time too.', - 'live_pdf_text3' => 'Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text1' => 'Invoice Ninja seamlessly integrates with all of the top internet payment processors and gateways so you can get paid for your work quickly and easily.', - 'online_payments_text2' => 'Invoices created with our tools aren’t just for bookkeeping purposes - they bring in the Benjamins. We also make it super easy to choose the right gateway for the specific needs of your business and are happy to help you to get started working with the gateway of your choice. What’s more, we’re constantly working on rolling out additional gateway integrations, so if you don’t see the one you use here, just let us know, and there’s a good chance we’ll add it for you.', - ], - - 'plans' => [ - 'header' => 'The Plans', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - 'pro_plan' => 'Pro Plan', - - 'go_pro' => 'Go Pro to Unlock Premium Invoice Ninja Features', - 'go_pro_text' => 'We believe that the free version of Invoice Ninja is a truly awesome product loaded with the key features you need to bill your clients electronically. But for those who crave still more Ninja awesomeness, we\'ve unmasked the Invoice Ninja Pro plan, which offers more versatility, power and customization options for just $50 per year.', - - 'number_clients' => 'Number of clients per account', - 'unlimited_invoices' => 'Unlimited client invoices', - 'company_logo' => 'Add your company logo', - 'live_pdf' => 'Live .PDF invoice creation', - 'four_templates' => '4 beautiful invoice templates', - 'payments' => 'Accept credit card payments', - 'additional_templates' => 'Additional invoice templates', - 'multi_user' => 'Multi-user support', - 'quotes' => 'Quotes/pro-forma invoices', - 'advanced_settings' => 'Advanced invoice settings', - 'data_vizualizations' => 'Dynamic data vizualizations', - 'email_support' => 'Priority email support', - 'remove_created_by' => 'Remove "Created by Invoice Ninja"', - 'latest_features' => 'Latest and greatest features', - 'pricing' => 'Pricing', - 'free_always' => 'Free /Always!', - 'year_price' => '$50 /Year', - ], - - 'compare' => [ - 'header' => 'How We Compare', - 'free_plan_comparison' => 'Free Plan Comparison', - 'paid_plan_comparison' => 'Paid Plan Comparison', - 'app' => 'App', - 'cost' => 'Cost', - 'clients' => 'Clients', - 'invoices' => 'Invoices', - 'payment_gateways' => 'Payment Gateways', - 'custom_logo' => 'Custom Logo', - 'multiple_templates' => 'Multiple Templates', - 'recurring_payments' => 'Recurring Payments', - 'open_source' => 'Open Source', - 'per_month' => 'per month', - 'per_year' => 'per year', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - ], - - 'testimonials' => [ - 'testimonials' => 'testimonials', - 'header' => 'Since we launched Invoice Ninja in March of 2014, we\'ve been overwhelmed by a deluge of user love. Here\'s a small taste of the glowing things people have to say about the great experiences the\'ve been having with our free e-invoicing app!', - ], - - 'faq' => [ - 'header' => 'The FAQs', - - 'question1' => 'I know it isn’t standard ninja practice to reveal too many identity details, but who are you guys exactly?', - 'answer1' => 'We’re a small team of highly skilled digital journeymen based in Israel. We love open source, we love disrupting the big business status quo, and we love building helpful tools that are easy to use. We believe that everyone else’s web-based cash flow tools are unnecessarily expensive, clunky and complicated - and we’re bent on proving these beliefs with Invoice Ninja.', - - 'question2' => 'How do I get started using Invoice Ninja?', - 'answer2' => 'Just click on the big, yellow "Invoice Now" button on our homepage!', - - 'question3' => 'Do you offer customer support?', - 'answer3' => 'We sure do. Support is super important to us. Feel free to email us at support@invoiceninja.com with any questions you might have. We almost always reply within one business day.', - - 'question4' => 'Is Invoice Ninja really free? For how long?', - 'answer4' => 'Yes, our basic app is 100% free. Forever and ever. For real. We also offer a paid Pro version of Invoice Ninja (you can learn all about its awesome features here), but it\'s important to us that the free version have all of the key features people need to do business.', - - 'question5' => 'How is Invoice Ninja able to offer this all for free? How are you making any money?', - 'answer5' => 'We’re mostly in this line of work because we believe it’s high time that a good electronic invoicing tool be available for free. There isn’t much money in it - yet. We do offer a paid Pro version of the app that we\'ve souped up with premium features. And when our users open up new accounts with payment processor gateways by clicking on links from our site, we make modest commissions as a gateway affiliate. So if zillions of freelancers and small businesses start running credit card charges through Invoice Ninja, or if scores of users go Pro, there’s a decent chance we\'ll recover our investment.', - - 'question6' => 'Really? So does that mean you’re not collecting information about me so you can sell me stuff or so that some other company can spam me according to my interests?', - 'answer6' => 'No way. We’re not mining your data, and we’re not selling you out. That wouldn’t be very ninja of us, would it?', - - 'question7' => 'But don’t you have access to my merchant and banking accounts?', - 'answer7' => 'Actually, we don’t. When you link an account at a third party financial institution with your Invoice Ninja account, you’re essentially giving our app permission to send money to you and nothing more. This is all managed by the tech teams at your financial service providers, who go to great lengths to ensure their integrations can’t be exploited or abused.', - - 'question8' => 'Given that Invoice Ninja is an open source app, how can I be sure that my financial information is safe with you?', - 'answer8' => 'There\'s a big difference between “open source" and “open data.†Anyone who wants to use the code that drives Invoice Ninja to create their own products or to make improvements to ours can do so. It’s available for anyone who wants to download and work with. But that’s just the source code - totally separate from what happens with that code on the Invoice Ninja servers. You’re the only one who has full access to what you\'re doing with our product. For more details on the security of our servers and how we handle our users\' information, please read the next question.', - - 'question9' => 'So just how secure is this app?', - 'answer9' => 'Extremely. Data uploaded by our users runs through connections with 256-bit encryption, which is twice as many encryption bits that most bank websites use. We use the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. It’s fancy stuff that we put in place to make sure no one can gain access to your information except you.', - - 'question10' => 'How do I remove the small "Created by Invoice Ninja†image from the bottom of my invoices?', - 'answer10' => 'The amazingly affordable Pro version of Invoice Ninja allows you to do this and oh so much more.', - - 'question11' => 'Can I see what the application looks like with sample data?', - 'answer11' => 'Sure, click here to try out our demo account.', - - 'question12' => 'I hear that there\'s a version of Invoice Ninja that I can install myself on my own servers? Where can I learn more about this?', - 'answer12' => 'The rumors are true! Full instructions are available here.', - - 'question13' => 'I\'m seeing the options to assign various statuses to my invoices, clients, credits and payments. What\'s the difference between "active," "archived" and "deleted"?', - 'answer13' => 'These three handy statuses for invoices, clients, credits and payments allow you to keep your own cash flow management as straightforward and accessible as possible from your Invoice Ninja dashboard. None of these statuses will actually purge any records from your account - even "deleted" can always be recovered at any point in the future. "Active" means the record will appear in the relevant queue of records. To stash a record away so it\'s still fully operational but no longer cluttering up your interface, simply set it to be "archived." To deactivate a record and render it inaccessible to your clients, mark it "deleted."', - - 'question14' => 'My question wasn\'t covered by any of the content on this FAQ page. How can I get in touch with you?', - 'answer14' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - 'miss_something' => 'Did we miss something?', - 'miss_something_text' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - ], - - -]; \ No newline at end of file diff --git a/app/lang/en/reminders.php b/app/lang/en/reminders.php deleted file mode 100755 index ad2262124d4d..000000000000 --- a/app/lang/en/reminders.php +++ /dev/null @@ -1,24 +0,0 @@ - "Passwords must be at least six characters and match the confirmation.", - - "user" => "We can't find a user with that e-mail address.", - - "token" => "This password reset token is invalid.", - - "sent" => "Password reminder sent!", - -); \ No newline at end of file diff --git a/app/lang/en/texts.php b/app/lang/en/texts.php deleted file mode 100644 index 50727cfdd6c2..000000000000 --- a/app/lang/en/texts.php +++ /dev/null @@ -1,581 +0,0 @@ - 'Organization', - 'name' => 'Name', - 'website' => 'Website', - 'work_phone' => 'Phone', - 'address' => 'Address', - 'address1' => 'Street', - 'address2' => 'Apt/Suite', - 'city' => 'City', - 'state' => 'State/Province', - 'postal_code' => 'Postal Code', - 'country_id' => 'Country', - 'contacts' => 'Contacts', - 'first_name' => 'First Name', - 'last_name' => 'Last Name', - 'phone' => 'Phone', - 'email' => 'Email', - 'additional_info' => 'Additional Info', - 'payment_terms' => 'Payment Terms', - 'currency_id' => 'Currency', - 'size_id' => 'Size', - 'industry_id' => 'Industry', - 'private_notes' => 'Private Notes', - - // invoice - 'invoice' => 'Invoice', - 'client' => 'Client', - 'invoice_date' => 'Invoice Date', - 'due_date' => 'Due Date', - 'invoice_number' => 'Invoice Number', - 'invoice_number_short' => 'Invoice #', - 'po_number' => 'PO Number', - 'po_number_short' => 'PO #', - 'frequency_id' => 'How often', - 'discount' => 'Discount', - 'taxes' => 'Taxes', - 'tax' => 'Tax', - 'item' => 'Item', - 'description' => 'Description', - 'unit_cost' => 'Unit Cost', - 'quantity' => 'Quantity', - 'line_total' => 'Line Total', - 'subtotal' => 'Subtotal', - 'paid_to_date' => 'Paid to Date', - 'balance_due' => 'Balance Due', - 'invoice_design_id' => 'Design', - 'terms' => 'Terms', - 'your_invoice' => 'Your Invoice', - - 'remove_contact' => 'Remove contact', - 'add_contact' => 'Add contact', - 'create_new_client' => 'Create new client', - 'edit_client_details' => 'Edit client details', - 'enable' => 'Enable', - 'learn_more' => 'Learn more', - 'manage_rates' => 'Manage rates', - 'note_to_client' => 'Note to client', - 'invoice_terms' => 'Invoice terms', - 'save_as_default_terms' => 'Save as default terms', - 'download_pdf' => 'Download PDF', - 'pay_now' => 'Pay Now', - 'save_invoice' => 'Save Invoice', - 'clone_invoice' => 'Clone Invoice', - 'archive_invoice' => 'Archive Invoice', - 'delete_invoice' => 'Delete Invoice', - 'email_invoice' => 'Email Invoice', - 'enter_payment' => 'Enter Payment', - 'tax_rates' => 'Tax Rates', - 'rate' => 'Rate', - 'settings' => 'Settings', - 'enable_invoice_tax' => 'Enable specifying an invoice tax', - 'enable_line_item_tax' => 'Enable specifying line item taxes', - - // navigation - 'dashboard' => 'Dashboard', - 'clients' => 'Clients', - 'invoices' => 'Invoices', - 'payments' => 'Payments', - 'credits' => 'Credits', - 'history' => 'History', - 'search' => 'Search', - 'sign_up' => 'Sign Up', - 'guest' => 'Guest', - 'company_details' => 'Company Details', - 'online_payments' => 'Online Payments', - 'notifications' => 'Notifications', - 'import_export' => 'Import/Export', - 'done' => 'Done', - 'save' => 'Save', - 'create' => 'Create', - 'upload' => 'Upload', - 'import' => 'Import', - 'download' => 'Download', - 'cancel' => 'Cancel', - 'close' => 'Close', - 'provide_email' => 'Please provide a valid email address', - 'powered_by' => 'Powered by', - 'no_items' => 'No items', - - // recurring invoices - 'recurring_invoices' => 'Recurring Invoices', - 'recurring_help' => '

    Automatically send clients the same invoices weekly, bi-monthly, monthly, quarterly or annually.

    -

    Use :MONTH, :QUARTER or :YEAR for dynamic dates. Basic math works as well, for example :MONTH-1.

    -

    Examples of dynamic invoice variables:

    -
      -
    • "Gym membership for the month of :MONTH" => "Gym membership for the month of July"
    • -
    • ":YEAR+1 yearly subscription" => "2015 Yearly Subscription"
    • -
    • "Retainer payment for :QUARTER+1" => "Retainer payment for Q2"
    • -
    ', - - // dashboard - 'in_total_revenue' => 'in total revenue', - 'billed_client' => 'billed client', - 'billed_clients' => 'billed clients', - 'active_client' => 'active client', - 'active_clients' => 'active clients', - 'invoices_past_due' => 'Invoices Past Due', - 'upcoming_invoices' => 'Upcoming invoices', - 'average_invoice' => 'Average invoice', - - // list pages - 'archive' => 'Archive', - 'delete' => 'Delete', - 'archive_client' => 'Archive client', - 'delete_client' => 'Delete client', - 'archive_payment' => 'Archive payment', - 'delete_payment' => 'Delete payment', - 'archive_credit' => 'Archive credit', - 'delete_credit' => 'Delete credit', - 'show_archived_deleted' => 'Show archived/deleted', - 'filter' => 'Filter', - 'new_client' => 'New Client', - 'new_invoice' => 'New Invoice', - 'new_payment' => 'New Payment', - 'new_credit' => 'New Credit', - 'contact' => 'Contact', - 'date_created' => 'Date Created', - 'last_login' => 'Last Login', - 'balance' => 'Balance', - 'action' => 'Action', - 'status' => 'Status', - 'invoice_total' => 'Invoice Total', - 'frequency' => 'Frequency', - 'start_date' => 'Start Date', - 'end_date' => 'End Date', - 'transaction_reference' => 'Transaction Reference', - 'method' => 'Method', - 'payment_amount' => 'Payment Amount', - 'payment_date' => 'Payment Date', - 'credit_amount' => 'Credit Amount', - 'credit_balance' => 'Credit Balance', - 'credit_date' => 'Credit Date', - 'empty_table' => 'No data available in table', - 'select' => 'Select', - 'edit_client' => 'Edit Client', - 'edit_invoice' => 'Edit Invoice', - - // client view page - 'create_invoice' => 'Create Invoice', - 'enter_credit' => 'Enter Credit', - 'last_logged_in' => 'Last logged in', - 'details' => 'Details', - 'standing' => 'Standing', - 'credit' => 'Credit', - 'activity' => 'Activity', - 'date' => 'Date', - 'message' => 'Message', - 'adjustment' => 'Adjustment', - 'are_you_sure' => 'Are you sure?', - - // payment pages - 'payment_type_id' => 'Payment type', - 'amount' => 'Amount', - - // account/company pages - 'work_email' => 'Email', - 'language_id' => 'Language', - 'timezone_id' => 'Timezone', - 'date_format_id' => 'Date format', - 'datetime_format_id' => 'Date/Time Format', - 'users' => 'Users', - 'localization' => 'Localization', - 'remove_logo' => 'Remove logo', - 'logo_help' => 'Supported: JPEG, GIF and PNG. Recommended size: 200px width by 120px height', - 'payment_gateway' => 'Payment Gateway', - 'gateway_id' => 'Provider', - 'email_notifications' => 'Email Notifications', - 'email_sent' => 'Email me when an invoice is sent', - 'email_viewed' => 'Email me when an invoice is viewed', - 'email_paid' => 'Email me when an invoice is paid', - 'site_updates' => 'Site Updates', - 'custom_messages' => 'Custom Messages', - 'default_invoice_terms' => 'Set default invoice terms', - 'default_email_footer' => 'Set default email signature', - 'import_clients' => 'Import Client Data', - 'csv_file' => 'Select CSV file', - 'export_clients' => 'Export Client Data', - 'select_file' => 'Please select a file', - 'first_row_headers' => 'Use first row as headers', - 'column' => 'Column', - 'sample' => 'Sample', - 'import_to' => 'Import to', - 'client_will_create' => 'client will be created', - 'clients_will_create' => 'clients will be created', - - // application messages - 'created_client' => 'Successfully created client', - 'created_clients' => 'Successfully created :count clients', - 'updated_settings' => 'Successfully updated settings', - 'removed_logo' => 'Successfully removed logo', - 'sent_message' => 'Successfully sent message', - 'invoice_error' => 'Please make sure to select a client and correct any errors', - 'limit_clients' => 'Sorry, this will exceed the limit of :count clients', - 'payment_error' => 'There was an error processing your payment. Please try again later.', - 'registration_required' => 'Please sign up to email an invoice', - 'confirmation_required' => 'Please confirm your email address', - - 'updated_client' => 'Successfully updated client', - 'created_client' => 'Successfully created client', - 'archived_client' => 'Successfully archived client', - 'archived_clients' => 'Successfully archived :count clients', - 'deleted_client' => 'Successfully deleted client', - 'deleted_clients' => 'Successfully deleted :count clients', - - 'updated_invoice' => 'Successfully updated invoice', - 'created_invoice' => 'Successfully created invoice', - 'cloned_invoice' => 'Successfully cloned invoice', - 'emailed_invoice' => 'Successfully emailed invoice', - 'and_created_client' => 'and created client', - 'archived_invoice' => 'Successfully archived invoice', - 'archived_invoices' => 'Successfully archived :count invoices', - 'deleted_invoice' => 'Successfully deleted invoice', - 'deleted_invoices' => 'Successfully deleted :count invoices', - - 'created_payment' => 'Successfully created payment', - 'archived_payment' => 'Successfully archived payment', - 'archived_payments' => 'Successfully archived :count payments', - 'deleted_payment' => 'Successfully deleted payment', - 'deleted_payments' => 'Successfully deleted :count payments', - 'applied_payment' => 'Successfully applied payment', - - 'created_credit' => 'Successfully created credit', - 'archived_credit' => 'Successfully archived credit', - 'archived_credits' => 'Successfully archived :count credits', - 'deleted_credit' => 'Successfully deleted credit', - 'deleted_credits' => 'Successfully deleted :count credits', - - // Emails - 'confirmation_subject' => 'Invoice Ninja Account Confirmation', - 'confirmation_header' => 'Account Confirmation', - 'confirmation_message' => 'Please access the link below to confirm your account.', - 'invoice_subject' => 'New invoice from :account', - 'invoice_message' => 'To view your invoice for :amount, click the link below.', - 'payment_subject' => 'Payment Received', - 'payment_message' => 'Thank you for your payment of :amount.', - 'email_salutation' => 'Dear :name,', - 'email_signature' => 'Regards,', - 'email_from' => 'The InvoiceNinja Team', - 'user_email_footer' => 'To adjust your email notification settings please visit '.SITE_URL.'/company/notifications', - 'invoice_link_message' => 'To view your client invoice click the link below:', - 'notification_invoice_paid_subject' => 'Invoice :invoice was paid by :client', - 'notification_invoice_sent_subject' => 'Invoice :invoice was sent to :client', - 'notification_invoice_viewed_subject' => 'Invoice :invoice was viewed by :client', - 'notification_invoice_paid' => 'A payment of :amount was made by client :client towards Invoice :invoice.', - 'notification_invoice_sent' => 'The following client :client was emailed Invoice :invoice for :amount.', - 'notification_invoice_viewed' => 'The following client :client viewed Invoice :invoice for :amount.', - 'reset_password' => 'You can reset your account password by clicking the following link:', - 'reset_password_footer' => 'If you did not request this password reset please email our support: ' . CONTACT_EMAIL, - - - // Payment page - 'secure_payment' => 'Secure Payment', - 'card_number' => 'Card number', - 'expiration_month' => 'Expiration month', - 'expiration_year' => 'Expiration year', - 'cvv' => 'CVV', - - // Security alerts - 'confide' => [ - 'too_many_attempts' => 'Too many attempts. Try again in few minutes.', - 'wrong_credentials' => 'Incorrect email or password.', - 'confirmation' => 'Your account has been confirmed!', - 'wrong_confirmation' => 'Wrong confirmation code.', - 'password_forgot' => 'The information regarding password reset was sent to your email.', - 'password_reset' => 'Your password has been changed successfully.', - 'wrong_password_reset' => 'Invalid password. Try again', - ], - - // Pro Plan - 'pro_plan' => [ - 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the Pro Plan', - 'remove_logo_link' => 'Click here', - ], - - 'logout' => 'Log Out', - 'sign_up_to_save' => 'Sign up to save your work', - 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', - 'terms_of_service' => 'Terms of Service', - 'email_taken' => 'The email address is already registered', - 'working' => 'Working', - 'success' => 'Success', - 'success_message' => 'You have successfully registered. Please visit the link in the account confirmation email to verify your email address.', - 'erase_data' => 'This will permanently erase your data.', - 'password' => 'Password', - - 'pro_plan_product' => 'Pro Plan', - 'pro_plan_description' => 'One year enrollment in the Invoice Ninja Pro Plan.', - 'pro_plan_success' => 'Thanks for choosing Invoice Ninja\'s Pro plan!

     
    - Next Steps

    A payable invoice has been sent to the email - address associated with your account. To unlock all of the awesome - Pro features, please follow the instructions on the invoice to pay - for a year of Pro-level invoicing.

    - Can\'t find the invoice? Need further assistance? We\'re happy to help - -- email us at contact@invoiceninja.com', - - 'unsaved_changes' => 'You have unsaved changes', - 'custom_fields' => 'Custom fields', - 'company_fields' => 'Company Fields', - 'client_fields' => 'Client Fields', - 'field_label' => 'Field Label', - 'field_value' => 'Field Value', - 'edit' => 'Edit', - 'set_name' => 'Set your company name', - 'view_as_recipient' => 'View as recipient', - - // product management - 'product_library' => 'Product Library', - 'product' => 'Product', - 'products' => 'Products', - 'fill_products' => 'Auto-fill products', - 'fill_products_help' => 'Selecting a product will automatically fill in the description and cost', - 'update_products' => 'Auto-update products', - 'update_products_help' => 'Updating an invoice will automatically update the product library', - 'create_product' => 'Create Product', - 'edit_product' => 'Edit Product', - 'archive_product' => 'Archive Product', - 'updated_product' => 'Successfully updated product', - 'created_product' => 'Successfully created product', - 'archived_product' => 'Successfully archived product', - 'pro_plan_custom_fields' => ':link to enable custom fields by joining the Pro Plan', - - 'advanced_settings' => 'Advanced Settings', - 'pro_plan_advanced_settings' => ':link to enable the advanced settings by joining the Pro Plan', - 'invoice_design' => 'Invoice Design', - 'specify_colors' => 'Specify colors', - 'specify_colors_label' => 'Select the colors used in the invoice', - - 'chart_builder' => 'Chart Builder', - 'ninja_email_footer' => 'Use :site to invoice your clients and get paid online for free!', - 'go_pro' => 'Go Pro', - - // Quotes - 'quote' => 'Quote', - 'quotes' => 'Quotes', - 'quote_number' => 'Quote Number', - 'quote_number_short' => 'Quote #', - 'quote_date' => 'Quote Date', - 'quote_total' => 'Quote Total', - 'your_quote' => 'Your Quote', - 'total' => 'Total', - 'clone' => 'Clone', - - 'new_quote' => 'New Quote', - 'create_quote' => 'Create Quote', - 'edit_quote' => 'Edit Quote', - 'archive_quote' => 'Archive Quote', - 'delete_quote' => 'Delete Quote', - 'save_quote' => 'Save Quote', - 'email_quote' => 'Email Quote', - 'clone_quote' => 'Clone Quote', - 'convert_to_invoice' => 'Convert to Invoice', - 'view_invoice' => 'View Invoice', - 'view_client' => 'View Client', - 'view_quote' => 'View Quote', - - 'updated_quote' => 'Successfully updated quote', - 'created_quote' => 'Successfully created quote', - 'cloned_quote' => 'Successfully cloned quote', - 'emailed_quote' => 'Successfully emailed quote', - 'archived_quote' => 'Successfully archived quote', - 'archived_quotes' => 'Successfully archived :count quotes', - 'deleted_quote' => 'Successfully deleted quote', - 'deleted_quotes' => 'Successfully deleted :count quotes', - 'converted_to_invoice' => 'Successfully converted quote to invoice', - - 'quote_subject' => 'New quote from :account', - 'quote_message' => 'To view your quote for :amount, click the link below.', - 'quote_link_message' => 'To view your client quote click the link below:', - 'notification_quote_sent_subject' => 'Quote :invoice was sent to :client', - 'notification_quote_viewed_subject' => 'Quote :invoice was viewed by :client', - 'notification_quote_sent' => 'The following client :client was emailed Quote :invoice for :amount.', - 'notification_quote_viewed' => 'The following client :client viewed Quote :invoice for :amount.', - - 'session_expired' => 'Your session has expired.', - - 'invoice_fields' => 'Invoice Fields', - 'invoice_options' => 'Invoice Options', - 'hide_quantity' => 'Hide quantity', - 'hide_quantity_help' => 'If your line items quantities are always 1, then you can declutter invoices by no longer displaying this field.', - 'hide_paid_to_date' => 'Hide paid to date', - 'hide_paid_to_date_help' => 'Only display the "Paid to Date" area on your invoices once a payment has been received.', - - 'charge_taxes' => 'Charge taxes', - 'user_management' => 'User Management', - 'add_user' => 'Add User', - 'send_invite' => 'Send invitation', - 'sent_invite' => 'Successfully sent invitation', - 'updated_user' => 'Successfully updated user', - 'invitation_message' => 'You\'ve been invited by :invitor. ', - 'register_to_add_user' => 'Please sign up to add a user', - 'user_state' => 'State', - 'edit_user' => 'Edit User', - 'delete_user' => 'Delete User', - 'active' => 'Active', - 'pending' => 'Pending', - 'deleted_user' => 'Successfully deleted user', - 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', - - 'confirm_email_invoice' => 'Are you sure you want to email this invoice?', - 'confirm_email_quote' => 'Are you sure you want to email this quote?', - 'confirm_recurring_email_invoice' => 'Recurring is enabled, are you sure you want this invoice emailed?', - - 'cancel_account' => 'Cancel Account', - 'cancel_account_message' => 'Warning: This will permanently erase all of your data, there is no undo.', - 'go_back' => 'Go Back', - - 'data_visualizations' => 'Data Visualizations', - 'sample_data' => 'Sample data shown', - 'hide' => 'Hide', - 'new_version_available' => 'A new version of :releases_link is available. You\'re running v:user_version, the latest is v:latest_version', - - 'invoice_settings' => 'Invoice Settings', - 'invoice_number_prefix' => 'Invoice Number Prefix', - 'invoice_number_counter' => 'Invoice Number Counter', - 'quote_number_prefix' => 'Quote Number Prefix', - 'quote_number_counter' => 'Quote Number Counter', - 'share_invoice_counter' => 'Share invoice counter', - 'invoice_issued_to' => 'Invoice issued to', - 'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix', - 'mark_sent' => 'Mark sent', - - 'gateway_help_1' => ':link to sign up for Authorize.net.', - 'gateway_help_2' => ':link to sign up for Authorize.net.', - 'gateway_help_17' => ':link to get your PayPal API signature.', - 'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.', - 'gateway_help_27' => ':link to sign up for TwoCheckout.', - - 'more_designs' => 'More designs', - 'more_designs_title' => 'Additional Invoice Designs', - 'more_designs_cloud_header' => 'Go Pro for more invoice designs', - 'more_designs_cloud_text' => '', - 'more_designs_self_host_header' => 'Get 6 more invoice designs for just $'.INVOICE_DESIGNS_PRICE, - 'more_designs_self_host_text' => '', - 'buy' => 'Buy', - 'bought_designs' => 'Successfully added additional invoice designs', - 'sent' => 'sent', - - 'vat_number' => 'VAT Number', - 'timesheets' => 'Timesheets', - - 'payment_title' => 'Enter Your Billing Address and Credit Card information', - 'payment_cvv' => '*This is the 3-4 digit number onthe back of your card', - 'payment_footer1' => '*Billing address must match address associated with credit card.', - 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - - 'id_number' => 'ID Number', - 'white_label_link' => 'White label', - 'white_label_text' => 'Purchase a white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the top of the client pages.', - 'white_label_header' => 'White Label', - 'bought_white_label' => 'Successfully enabled white label license', - 'white_labeled' => 'White labeled', - - 'restore' => 'Restore', - 'restore_invoice' => 'Restore Invoice', - 'restore_quote' => 'Restore Quote', - 'restore_client' => 'Restore Client', - 'restore_credit' => 'Restore Credit', - 'restore_payment' => 'Restore Payment', - - 'restored_invoice' => 'Successfully restored invoice', - 'restored_quote' => 'Successfully restored quote', - 'restored_client' => 'Successfully restored client', - 'restored_payment' => 'Successfully restored payment', - 'restored_credit' => 'Successfully restored credit', - - 'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.', - 'discount_percent' => 'Percent', - 'discount_amount' => 'Amount', - - 'invoice_history' => 'Invoice History', - 'quote_history' => 'Quote History', - 'current_version' => 'Current version', - 'select_versiony' => 'Select version', - 'view_history' => 'View History', - - 'edit_payment' => 'Edit Payment', - 'updated_payment' => 'Successfully updated payment', - 'deleted' => 'Deleted', - 'restore_user' => 'Restore User', - 'restored_user' => 'Successfully restored user', - 'show_deleted_users' => 'Show deleted users', - 'email_templates' => 'Email Templates', - 'invoice_email' => 'Invoice Email', - 'payment_email' => 'Payment Email', - 'quote_email' => 'Quote Email', - 'reset_all' => 'Reset All', - 'approve' => 'Approve', - - 'token_billing_type_id' => 'Token Billing', - 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', - 'token_billing_1' => 'Disabled', - 'token_billing_2' => 'Opt-in - checkbox is shown but not selected', - 'token_billing_3' => 'Opt-out - checkbox is shown and selected', - 'token_billing_4' => 'Always', - 'token_billing_checkbox' => 'Store credit card details', - 'view_in_stripe' => 'View in Stripe', - 'use_card_on_file' => 'Use card on file', - 'edit_payment_details' => 'Edit payment details', - 'token_billing' => 'Save card details', - 'token_billing_secure' => 'The data is stored securely by :stripe_link', - - 'support' => 'Support', - 'contact_information' => 'Contact information', - '256_encryption' => '256-Bit Encryption', - 'amount_due' => 'Amount due', - 'billing_address' => 'Billing address', - 'billing_method' => 'Billing method', - 'order_overview' => 'Order overview', - 'match_address' => '*Address must match address associated with credit card.', - 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - - 'default_invoice_footer' => 'Set default invoice footer', - 'invoice_footer' => 'Invoice footer', - 'save_as_default_footer' => 'Save as default footer', - - 'token_management' => 'Token Management', - 'tokens' => 'Tokens', - 'add_token' => 'Add Token', - 'show_deleted_tokens' => 'Show deleted tokens', - 'deleted_token' => 'Successfully deleted token', - 'created_token' => 'Successfully created token', - 'updated_token' => 'Successfully updated token', - 'edit_token' => 'Edit Token', - 'delete_token' => 'Delete Token', - 'token' => 'Token', - - 'add_gateway' => 'Add Gateway', - 'delete_gateway' => 'Delete Gateway', - 'edit_gateway' => 'Edit Gateway', - 'updated_gateway' => 'Successfully updated gateway', - 'created_gateway' => 'Successfully created gateway', - 'deleted_gateway' => 'Successfully deleted gateway', - 'pay_with_paypal' => 'PayPal', - 'pay_with_card' => 'Credit card', - - 'change_password' => 'Change password', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'confirm_password' => 'Confirm password', - 'password_error_incorrect' => 'The current password is incorrect.', - 'password_error_invalid' => 'The new password is invalid.', - 'updated_password' => 'Successfully updated password', - - 'api_tokens' => 'API Tokens', - 'users_and_tokens' => 'Users & Tokens', - 'account_login' => 'Account Login', - 'recover_password' => 'Recover your password', - 'forgot_password' => 'Forgot your password?', - 'email_address' => 'Email address', - 'lets_go' => 'Let’s go', - 'password_recovery' => 'Password Recovery', - 'send_email' => 'Send email', - 'set_password' => 'Set Password', - 'converted' => 'Converted', - - -); diff --git a/app/lang/en/validation.php b/app/lang/en/validation.php deleted file mode 100755 index 68b39c68af2f..000000000000 --- a/app/lang/en/validation.php +++ /dev/null @@ -1,102 +0,0 @@ - "The :attribute must be accepted.", - "active_url" => "The :attribute is not a valid URL.", - "after" => "The :attribute must be a date after :date.", - "alpha" => "The :attribute may only contain letters.", - "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.", - "alpha_num" => "The :attribute may only contain letters and numbers.", - "array" => "The :attribute must be an array.", - "before" => "The :attribute must be a date before :date.", - "between" => array( - "numeric" => "The :attribute must be between :min - :max.", - "file" => "The :attribute must be between :min - :max kilobytes.", - "string" => "The :attribute must be between :min - :max characters.", - "array" => "The :attribute must have between :min - :max items.", - ), - "confirmed" => "The :attribute confirmation does not match.", - "date" => "The :attribute is not a valid date.", - "date_format" => "The :attribute does not match the format :format.", - "different" => "The :attribute and :other must be different.", - "digits" => "The :attribute must be :digits digits.", - "digits_between" => "The :attribute must be between :min and :max digits.", - "email" => "The :attribute format is invalid.", - "exists" => "The selected :attribute is invalid.", - "image" => "The :attribute must be an image.", - "in" => "The selected :attribute is invalid.", - "integer" => "The :attribute must be an integer.", - "ip" => "The :attribute must be a valid IP address.", - "max" => array( - "numeric" => "The :attribute may not be greater than :max.", - "file" => "The :attribute may not be greater than :max kilobytes.", - "string" => "The :attribute may not be greater than :max characters.", - "array" => "The :attribute may not have more than :max items.", - ), - "mimes" => "The :attribute must be a file of type: :values.", - "min" => array( - "numeric" => "The :attribute must be at least :min.", - "file" => "The :attribute must be at least :min kilobytes.", - "string" => "The :attribute must be at least :min characters.", - "array" => "The :attribute must have at least :min items.", - ), - "not_in" => "The selected :attribute is invalid.", - "numeric" => "The :attribute must be a number.", - "regex" => "The :attribute format is invalid.", - "required" => "The :attribute field is required.", - "required_if" => "The :attribute field is required when :other is :value.", - "required_with" => "The :attribute field is required when :values is present.", - "required_without" => "The :attribute field is required when :values is not present.", - "same" => "The :attribute and :other must match.", - "size" => array( - "numeric" => "The :attribute must be :size.", - "file" => "The :attribute must be :size kilobytes.", - "string" => "The :attribute must be :size characters.", - "array" => "The :attribute must contain :size items.", - ), - "unique" => "The :attribute has already been taken.", - "url" => "The :attribute format is invalid.", - - "positive" => "The :attribute must be greater than zero.", - "has_credit" => "The client does not have enough credit.", - "notmasked" => "The values are masked", - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => array(), - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => array(), - -); diff --git a/app/lang/es/pagination.php b/app/lang/es/pagination.php deleted file mode 100755 index 9cbe91da3011..000000000000 --- a/app/lang/es/pagination.php +++ /dev/null @@ -1,20 +0,0 @@ - '« Anterior', - - 'next' => 'Siguiente »', - -); diff --git a/app/lang/es/public.php b/app/lang/es/public.php deleted file mode 100644 index 7f5ecb9008e2..000000000000 --- a/app/lang/es/public.php +++ /dev/null @@ -1,209 +0,0 @@ - 'Free Open-Source Online Invoicing', - 'description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - 'invoice_now' => 'Invoice Now', - 'no_signup_needed' => 'No signup needed', - - 'link_blog' => 'Blog', - 'link_about_us' => 'About Us', - 'link_contact_us' => 'Contact Us', - 'link_features' => 'Features', - 'link_plans' => 'Plans', - 'link_compare' => 'Compare', - 'link_testimonials' => 'Testimonials', - 'link_faq' => 'FAQ', - - 'my_account' => 'My Account', - 'login' => 'Login', - 'connect_with_us' => 'Connect with Us', - 'safe_and_secure' => 'Safe & Secure', - 'toggle_navigation' => 'Toggle navigation', - - - 'home' => [ - 'header' => 'THE SIMPLE & FREE WAY TO INVOICE CLIENTS', - 'sub_header' => 'It\'s just that easy. Stop spending time on complicated and expensive invoicing.
    No fuss, just get started and get paid.', - 'footer' => 'Simple, Intuitive Invoicing,Anywhere.', - - 'free_always' => 'Free, Always', - 'free_always_text' => 'Send unlimited invoices to 500 clients per month and never pay a dime. You are welcome to unlock still more awesome features with our Pro Plan, but our free app is a top-notch product that will do everything you need it to do, without any subscription or fees.', - - 'open_source' => 'Open-Source', - 'open_source_text' => 'No mysterious corporate silos here! Just full source code transparency and a devotion to working with anyone interested to build a better electronic invoicing platform. We even offer a handy zip download for a self-hosted version of Invoice Ninja.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text' => 'See how your edited invoice will look as a print-friendly pdf while you make the changes. Our pdf generator works in real time as you make your changes. You can even preview four beautiful preset designs. Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text' => 'Invoices sent with our app integrate seamlessly with the gateway credit card processor of your choice, to make it super easy for your clients to send you money with just a few clicks. We play nicely with Authorize.Net, Stripe, PayPal and loads more - 23 in all!', - ], - - 'about' => [ - 'header' => 'About Invoice Ninja', - 'what_is' => 'What is Invoice Ninja?', - - 'team_ninja' => 'Team Ninja', - 'team_ninja_text' => 'Invoice Ninja is managed by a team of seasoned web workers. We launched in early 2014 and have been thrilled by the enthusiastic response we’ve received from our growing community of users.', - - 'co_founder' => 'Co-Founder', - 'ceo' => 'CEO', - 'cto' => '', - 'designer' => 'Designer', - 'marketing' => 'Marketing', - - 'shalom_bio' => 'Shalom has specialized in small business development for nearly 10 years. In addition to InvoiceNinja.com Shalom is CEO of a leading tour agency in Israel.', - 'hillel_bio' => 'Hillel has been developing enterprise applications for 15 years. His open-source AutoComplete component has been used by thousands of developers around the world.', - 'razi_bio' => 'Razi is a pixel nerd with a great deal of experience in design for web sites and applications. When she isn\'t busy with InvoiceNinja she runs a small web agency in Stockholm called kantorp-wegl.in', - 'ben_bio' => 'A veteran digital marketer and content strategist, Ben specializes in building communities around brands that make business easier for freelancers, SMBs and micro-entrepreneurs.', - ], - - 'contact' => [ - 'header' => 'Questions, special requests, or just want to say hi?', - 'sub_header' => 'Fill in the form below and we\'ll get back to you as soon as possible. Hope to hear from you!', - 'other_ways' => 'Other ways to reach us', - - 'name' => 'Name', - 'name_help' => 'Please enter your name.', - - 'email' => 'Email Address', - 'email_help' => 'Please enter a valid e-mail address.', - - 'message' => 'Message', - 'message_help' => 'Please enter a message.', - 'send_message' => 'Send Message', - ], - - 'features' => [ - 'header' => 'The Features', - 'footer' => 'Like what you see?', - 'footer_action' => 'Get started today!', - - 'open_source' => 'Open Source Platform', - 'open_source_text1' => 'Set the code free! Here at Invoice Ninja, we’re all about creating the best possible app, and inviting scrutiny via full code transparency is a central manifestation of this value.', - 'open_source_text2' => 'We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.', - - 'free_forever' => 'FREE. Forever.', - 'free_forever_text1' => 'Yeah, you read that correctly. You don’t have to pay us a cent to use our tools. We know how tough it is to make ends meet as a web-based business, and we’re bent on providing a top-notch product that will do everything you need it to do, without any subscription or opt-in fees.', - 'free_forever_text2' => 'Try Invoice Ninja out. You literally have nothing to lose. We’re confident that you’ll find the experience so positive that you’ll never need to turn elsewhere.', - - 'secure' => 'Secure & Private', - 'secure_text1' => 'Invoice Ninja has been built from the ground up to keep your data safe. Only you have access to your login & accounting details, & we will never share your transaction data to any third party.', - 'secure_text2' => 'Our website operates with 256-bit encryption, which is even more secure than most banking websites. Invoice Ninja uses the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. We feel safe here and have invested heavily in measures to ensure that you do too.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text1' => 'With Invoice Ninja, we’ve done away with the need for cumbersome multi-click invoice previewing after each save.', - 'live_pdf_text2' => 'When you enter the details of your customer and/or invoice in our editor, you can instantly see the results in the pdf preview pane below. Want to see what your invoice would look like in a different layout style? The live pdf can show you four beautiful preset styles in real time too.', - 'live_pdf_text3' => 'Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text1' => 'Invoice Ninja seamlessly integrates with all of the top internet payment processors and gateways so you can get paid for your work quickly and easily.', - 'online_payments_text2' => 'Invoices created with our tools aren’t just for bookkeeping purposes - they bring in the Benjamins. We also make it super easy to choose the right gateway for the specific needs of your business and are happy to help you to get started working with the gateway of your choice. What’s more, we’re constantly working on rolling out additional gateway integrations, so if you don’t see the one you use here, just let us know, and there’s a good chance we’ll add it for you.', - ], - - 'plans' => [ - 'header' => 'The Plans', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - 'pro_plan' => 'Pro Plan', - - 'go_pro' => 'Go Pro to Unlock Premium Invoice Ninja Features', - 'go_pro_text' => 'We believe that the free version of Invoice Ninja is a truly awesome product loaded with the key features you need to bill your clients electronically. But for those who crave still more Ninja awesomeness, we\'ve unmasked the Invoice Ninja Pro plan, which offers more versatility, power and customization options for just $50 per year.', - - 'number_clients' => 'Number of clients per account', - 'unlimited_invoices' => 'Unlimited client invoices', - 'company_logo' => 'Add your company logo', - 'live_pdf' => 'Live .PDF invoice creation', - 'four_templates' => '4 beautiful invoice templates', - 'payments' => 'Accept credit card payments', - 'additional_templates' => 'Additional invoice templates', - 'multi_user' => 'Multi-user support', - 'quotes' => 'Quotes/pro-forma invoices', - 'advanced_settings' => 'Advanced invoice settings', - 'data_vizualizations' => 'Dynamic data vizualizations', - 'email_support' => 'Priority email support', - 'remove_created_by' => 'Remove "Created by Invoice Ninja"', - 'latest_features' => 'Latest and greatest features', - 'pricing' => 'Pricing', - 'free_always' => 'Free /Always!', - 'year_price' => '$50 /Year', - ], - - 'compare' => [ - 'header' => 'How We Compare', - 'free_plan_comparison' => 'Free Plan Comparison', - 'paid_plan_comparison' => 'Paid Plan Comparison', - 'app' => 'App', - 'cost' => 'Cost', - 'clients' => 'Clients', - 'invoices' => 'Invoices', - 'payment_gateways' => 'Payment Gateways', - 'custom_logo' => 'Custom Logo', - 'multiple_templates' => 'Multiple Templates', - 'recurring_payments' => 'Recurring Payments', - 'open_source' => 'Open Source', - 'per_month' => 'per month', - 'per_year' => 'per year', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - ], - - 'testimonials' => [ - 'testimonials' => 'testimonials', - 'header' => 'Since we launched Invoice Ninja in March of 2014, we\'ve been overwhelmed by a deluge of user love. Here\'s a small taste of the glowing things people have to say about the great experiences the\'ve been having with our free e-invoicing app!', - ], - - 'faq' => [ - 'header' => 'The FAQs', - - 'question1' => 'I know it isn’t standard ninja practice to reveal too many identity details, but who are you guys exactly?', - 'answer1' => 'We’re a small team of highly skilled digital journeymen based in Israel. We love open source, we love disrupting the big business status quo, and we love building helpful tools that are easy to use. We believe that everyone else’s web-based cash flow tools are unnecessarily expensive, clunky and complicated - and we’re bent on proving these beliefs with Invoice Ninja.', - - 'question2' => 'How do I get started using Invoice Ninja?', - 'answer2' => 'Just click on the big, yellow "Invoice Now" button on our homepage!', - - 'question3' => 'Do you offer customer support?', - 'answer3' => 'We sure do. Support is super important to us. Feel free to email us at support@invoiceninja.com with any questions you might have. We almost always reply within one business day.', - - 'question4' => 'Is Invoice Ninja really free? For how long?', - 'answer4' => 'Yes, our basic app is 100% free. Forever and ever. For real. We also offer a paid Pro version of Invoice Ninja (you can learn all about its awesome features here), but it\'s important to us that the free version have all of the key features people need to do business.', - - 'question5' => 'How is Invoice Ninja able to offer this all for free? How are you making any money?', - 'answer5' => 'We’re mostly in this line of work because we believe it’s high time that a good electronic invoicing tool be available for free. There isn’t much money in it - yet. We do offer a paid Pro version of the app that we\'ve souped up with premium features. And when our users open up new accounts with payment processor gateways by clicking on links from our site, we make modest commissions as a gateway affiliate. So if zillions of freelancers and small businesses start running credit card charges through Invoice Ninja, or if scores of users go Pro, there’s a decent chance we\'ll recover our investment.', - - 'question6' => 'Really? So does that mean you’re not collecting information about me so you can sell me stuff or so that some other company can spam me according to my interests?', - 'answer6' => 'No way. We’re not mining your data, and we’re not selling you out. That wouldn’t be very ninja of us, would it?', - - 'question7' => 'But don’t you have access to my merchant and banking accounts?', - 'answer7' => 'Actually, we don’t. When you link an account at a third party financial institution with your Invoice Ninja account, you’re essentially giving our app permission to send money to you and nothing more. This is all managed by the tech teams at your financial service providers, who go to great lengths to ensure their integrations can’t be exploited or abused.', - - 'question8' => 'Given that Invoice Ninja is an open source app, how can I be sure that my financial information is safe with you?', - 'answer8' => 'There\'s a big difference between “open source" and “open data.†Anyone who wants to use the code that drives Invoice Ninja to create their own products or to make improvements to ours can do so. It’s available for anyone who wants to download and work with. But that’s just the source code - totally separate from what happens with that code on the Invoice Ninja servers. You’re the only one who has full access to what you\'re doing with our product. For more details on the security of our servers and how we handle our users\' information, please read the next question.', - - 'question9' => 'So just how secure is this app?', - 'answer9' => 'Extremely. Data uploaded by our users runs through connections with 256-bit encryption, which is twice as many encryption bits that most bank websites use. We use the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. It’s fancy stuff that we put in place to make sure no one can gain access to your information except you.', - - 'question10' => 'How do I remove the small "Created by Invoice Ninja†image from the bottom of my invoices?', - 'answer10' => 'The amazingly affordable Pro version of Invoice Ninja allows you to do this and oh so much more.', - - 'question11' => 'Can I see what the application looks like with sample data?', - 'answer11' => 'Sure, click here to try out our demo account.', - - 'question12' => 'I hear that there\'s a version of Invoice Ninja that I can install myself on my own servers? Where can I learn more about this?', - 'answer12' => 'The rumors are true! Full instructions are available here.', - - 'question13' => 'I\'m seeing the options to assign various statuses to my invoices, clients, credits and payments. What\'s the difference between "active," "archived" and "deleted"?', - 'answer13' => 'These three handy statuses for invoices, clients, credits and payments allow you to keep your own cash flow management as straightforward and accessible as possible from your Invoice Ninja dashboard. None of these statuses will actually purge any records from your account - even "deleted" can always be recovered at any point in the future. "Active" means the record will appear in the relevant queue of records. To stash a record away so it\'s still fully operational but no longer cluttering up your interface, simply set it to be "archived." To deactivate a record and render it inaccessible to your clients, mark it "deleted."', - - 'question14' => 'My question wasn\'t covered by any of the content on this FAQ page. How can I get in touch with you?', - 'answer14' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - 'miss_something' => 'Did we miss something?', - 'miss_something_text' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - ], - - -]; \ No newline at end of file diff --git a/app/lang/es/reminders.php b/app/lang/es/reminders.php deleted file mode 100755 index 094e8788814b..000000000000 --- a/app/lang/es/reminders.php +++ /dev/null @@ -1,24 +0,0 @@ - "Las contraseñas deben contener al menos 6 caracteres y coincidir.", - - "user" => "No podemos encontrar a un usuario con ese correo electrónico.", - - "token" => "Este token de recuperación de contraseña es inválido.", - - "sent" => "¡Recordatorio de contraseña enviado!", - -); diff --git a/app/lang/es/texts.php b/app/lang/es/texts.php deleted file mode 100644 index 5d5a04863c32..000000000000 --- a/app/lang/es/texts.php +++ /dev/null @@ -1,554 +0,0 @@ - 'Empresa', - 'name' => 'Nombre', //Razon social-Colombia, - 'website' => 'Sitio Web', - 'work_phone' => 'Teléfono', - 'address' => 'Dirección', - 'address1' => 'Calle', - 'address2' => 'Bloq/Pta', - 'city' => 'Ciudad', - 'state' => 'Región/Provincia', //Departamento-Colombia, Comarca-Panama - 'postal_code' => 'Código Postal', - 'country_id' => 'País', - 'contacts' => 'Contactos', - 'first_name' => 'Nombres', - 'last_name' => 'Apellidos', - 'phone' => 'Teléfono', - 'email' => 'Email', - 'additional_info' => 'Información adicional', - 'payment_terms' => 'Plazos de pago', // - 'currency_id' => 'Divisa', - 'size_id' => 'Tamaño', - 'industry_id' => 'Industria', - 'private_notes' => 'Notas Privadas', - - // invoice - 'invoice' => 'Factura de venta', //Factura de Venta-Colombia - 'client' => 'Cliente', - 'invoice_date' => 'Fecha de factura', - 'due_date' => 'Fecha de pago', - 'invoice_number' => 'Número de Factura', - 'invoice_number_short' => 'Factura #', - 'po_number' => 'Apartado de correo', - 'po_number_short' => 'Apdo.', - 'frequency_id' => 'Frecuencia', - 'discount' => 'Descuento', - 'taxes' => 'Impuestos', - 'tax' => 'Impuesto', //IVA for almost all latinamerica, ISV-Honduras, ITBMS-Panama, IV-Costa Rica, ITBIS- Republica Dominicana, IVU-Puerto Rico - 'item' => 'Concepto', - 'description' => 'Descripción', - 'unit_cost' => 'Coste unitario', - 'quantity' => 'Cantidad', - 'line_total' => 'Total', - 'subtotal' => 'Subtotal', - 'paid_to_date' => 'Pagado', - 'balance_due' => 'Pendiente', - 'invoice_design_id' => 'Diseño', - 'terms' => 'Términos', - 'your_invoice' => 'Tu factura', - 'remove_contact' => 'Eliminar contacto', - 'add_contact' => 'Añadir contacto', - 'create_new_client' => 'Crear nuevo cliente', - 'edit_client_details' => 'Editar detalles del cliente', - 'enable' => 'Activar', - 'learn_more' => 'Aprender más', - 'manage_rates' => 'Gestionar tarifas', - 'note_to_client' => 'Nota para el cliente', - 'invoice_terms' => 'Términos de facturación', - 'save_as_default_terms' => 'Guardar como términos por defecto', - 'download_pdf' => 'Descargar PDF', - 'pay_now' => 'Pagar ahora', - 'save_invoice' => 'Guardar factura', - 'clone_invoice' => 'Clonar factura', - 'archive_invoice' => 'Archivar factura', - 'delete_invoice' => 'Eliminar factura', - 'email_invoice' => 'Enviar factura por correo', - 'enter_payment' => 'Agregar pago', - 'tax_rates' => 'Tasas de impuesto', - 'rate' => 'Tasas', - 'settings' => 'Configuración', - 'enable_invoice_tax' => 'Activar impuesto para la factura', - 'enable_line_item_tax' => 'Activar impuesto por concepto', - - // navigation - 'dashboard' => 'Inicio', - 'clients' => 'Clientes', - 'invoices' => 'Facturas', - 'payments' => 'Pagos', - 'credits' => 'Créditos', - 'history' => 'Historial', - 'search' => 'Búsqueda', - 'sign_up' => 'registrate', - 'guest' => 'invitado', - 'company_details' => 'Detalles de la empresa', - 'online_payments' => 'Pagos en linea', - 'notifications' => 'Notificaciones', - 'import_export' => 'Importar/Exportar', - 'done' => 'Hecho', - 'save' => 'Guardar', - 'create' => 'Crear', - 'upload' => 'Subir', - 'import' => 'Importar', - 'download' => 'Descargar', - 'cancel' => 'Cancelar', - 'close' => 'Cerrar', - 'provide_email' => 'Por favor facilita una dirección de correo válida.', - 'powered_by' => 'Plataforma por ', - 'no_items' => 'No hay data', - - // recurring invoices - 'recurring_invoices' => 'Facturas recurrentes', - 'recurring_help' => '

    Enviar facturas automáticamente a clientes semanalmente, bi-mensualmente, mensualmente, trimestral o anualmente.

    -

    Uso :MONTH, :QUARTER or :YEAR para fechas dinámicas. Matemáticas básicas también funcionan bien. Por ejemplo: :MONTH-1.

    -

    Ejemplos de variables dinámicas de factura:

    -
      -
    • "Afiliación de gimnasio para el mes de:MONTH" => Afiliación de gimnasio para el mes de julio"
    • -
    • ":YEAR+1 suscripción anual" => "2015 suscripción anual"
    • -
    • "Retainer payment for :QUARTER+1" => "Pago anticipo de pagos para T2"
    • -
    ', - - // dashboard - 'in_total_revenue' => 'ingreso total', - 'billed_client' => 'cliente facturado', - 'billed_clients' => 'clientes facturados', - 'active_client' => 'cliente activo', - 'active_clients' => 'clientes activos', - 'invoices_past_due' => 'Facturas vencidas', - 'upcoming_invoices' => 'Próximas facturas', - 'average_invoice' => 'Promedio de facturación', - - // list pages - 'archive' => 'Archivar', - 'delete' => 'Eliminar', - 'archive_client' => 'Archivar cliente', - 'delete_client' => 'Eliminar cliente', - 'archive_payment' => 'Archivar pago', - 'delete_payment' => 'Eliminar pago', - 'archive_credit' => 'Archivar crédito', - 'delete_credit' => 'Eliminar crédito', - 'show_archived_deleted' => 'Mostrar archivados/eliminados', - 'filter' => 'Filtrar', - 'new_client' => 'Nuevo cliente', - 'new_invoice' => 'Nueva factura', - 'new_payment' => 'Nuevo pago', - 'new_credit' => 'Nuevo crédito', - 'contact' => 'Contacto', - 'date_created' => 'Fecha de creación', - 'last_login' => 'Último acceso', - 'balance' => 'Balance', - 'action' => 'Acción', - 'status' => 'Estado', - 'invoice_total' => 'Total facturado', - 'frequency' => 'Frequencia', - 'start_date' => 'Fecha de inicio', - 'end_date' => 'Fecha de finalización', - 'transaction_reference' => 'Referencia de transacción', - 'method' => 'Método', - 'payment_amount' => 'Valor del pago', - 'payment_date' => 'Fecha de Pago', - 'credit_amount' => 'Cantidad de Crédito', - 'credit_balance' => 'Balance de Crédito', - 'credit_date' => 'Fecha de Crédito', - 'empty_table' => 'Tabla vacía', - 'select' => 'Seleccionar', - 'edit_client' => 'Editar Cliente', - 'edit_invoice' => 'Editar Factura', - - // client view page - 'create_invoice' => 'Crear Factura', - 'enter_credit' => 'Agregar Crédito', - 'last_logged_in' => 'Último inicio de sesión', - 'details' => 'Detalles', - 'standing' => 'Standing', //What is this for, context of it's use - 'credit' => 'Crédito', - 'activity' => 'Actividad', - 'date' => 'Fecha', - 'message' => 'Mensaje', - 'adjustment' => 'Ajustes', - 'are_you_sure' => '¿Estás seguro?', - - // payment pages - 'payment_type_id' => 'Tipo de pago', - 'amount' => 'Cantidad', - - // account/company pages - 'work_email' => 'Correo electrónico de la empresa', - 'language_id' => 'Idioma', - 'timezone_id' => 'Zona horaria', - 'date_format_id' => 'Formato de fecha', - 'datetime_format_id' => 'Format de fecha/hora', - 'users' => 'Usuarios', - 'localization' => 'Localización', - 'remove_logo' => 'Eliminar logo', - 'logo_help' => 'Formatos aceptados: JPEG, GIF y PNG. Altura recomendada: 120px', - 'payment_gateway' => 'Pasarela de pago', - 'gateway_id' => 'Proveedor', - 'email_notifications' => 'Notificaciones de email', - 'email_sent' => 'Avísame por email cuando una factura se envía', - 'email_viewed' => 'Avísame por email cuando una factura se visualiza', - 'email_paid' => 'Avísame por email cuando una factura se paga', - 'site_updates' => 'Actualizaciones del sitio', - 'custom_messages' => 'Mensajes a medida', - 'default_invoice_terms' => 'Configurar términos de factura por defecto', - 'default_email_footer' => 'Configurar firma de email por defecto', - 'import_clients' => 'Importar datos del cliente', - 'csv_file' => 'Seleccionar archivo CSV', - 'export_clients' => 'Exportar datos del cliente', - 'select_file' => 'Seleccionar archivo', - 'first_row_headers' => 'Usar la primera fila como encabezados', - 'column' => 'Columna', - 'sample' => 'Ejemplo', - 'import_to' => 'Importar a', - 'client_will_create' => 'cliente se creará', //What is this for, context of it's use - 'clients_will_create' => 'clientes se crearan', //What is this for, context of it's use - - // application messages - 'created_client' => 'cliente creado con éxito', - 'created_clients' => ':count clientes creados con éxito', - 'updated_settings' => 'Configuración actualizada con éxito', - 'removed_logo' => 'Logo eliminado con éxito', - 'sent_message' => 'Mensaje enviado con éxito', - 'invoice_error' => 'Seleccionar cliente y corregir errores.', - 'limit_clients' => 'Lo sentimos, se ha pasado del límite de :count clientes', - 'payment_error' => 'Ha habido un error en el proceso de tu pago. Inténtalo de nuevo más tarde.', - 'registration_required' => 'Inscríbete para enviar una factura', - 'confirmation_required' => 'Por favor confirma tu dirección de correo electrónico', - 'updated_client' => 'Cliente actualizado con éxito', - 'created_client' => 'Cliente creado con éxito', - 'archived_client' => 'Cliente archivado con éxito', - 'archived_clients' => ':count clientes archivados con éxito', - 'deleted_client' => 'Cliente eliminado con éxito', - 'deleted_clients' => ':count clientes eliminados con éxito', - 'updated_invoice' => 'Factura actualizada con éxito', - 'created_invoice' => 'Factura creada con éxito', - 'cloned_invoice' => 'Factura clonada con éxito', - 'emailed_invoice' => 'Factura enviada con éxito', - 'and_created_client' => 'y cliente creado ', - 'archived_invoice' => 'Factura archivada con éxito', - 'archived_invoices' => ':count facturas archivados con éxito', - 'deleted_invoice' => 'Factura eliminada con éxito', - 'deleted_invoices' => ':count facturas eliminadas con éxito', - 'created_payment' => 'Pago creado con éxito', - 'archived_payment' => 'Pago archivado con éxito', - 'archived_payments' => ':count pagos archivados con éxito', - 'deleted_payment' => 'Pago eliminado con éxito', - 'deleted_payments' => ':count pagos eliminados con éxito', - 'applied_payment' => 'Pago aplicado con éxito', - 'created_credit' => 'Crédito creado con éxito', - 'archived_credit' => 'Crédito archivado con éxito', - 'archived_credits' => ':count creditos archivados con éxito', - 'deleted_credit' => 'Créditos eliminados con éxito', - 'deleted_credits' => ':count creditos eliminados con éxito', - // Emails - 'confirmation_subject' => 'Corfimación de tu cuenta en Invoice Ninja', - 'confirmation_header' => 'Confirmación de Cuenta', - 'confirmation_message' => 'Por favor, haz clic en el enlace abajo para confirmar tu cuenta.', - 'invoice_subject' => 'Nueva factura de :account', - 'invoice_message' => 'Para visualizar tu factura por el valor de :amount, haz click en el enlace abajo.', - 'payment_subject' => 'Pago recibido', - 'payment_message' => 'Gracias por tu pago por valor de :amount.', - 'email_salutation' => 'Estimado :name,', - 'email_signature' => 'Un saludo cordial,', - 'email_from' => 'El equipo de Invoice Ninja ', - 'user_email_footer' => 'Para ajustar la configuración de las notificaciones de tu email, visita '.SITE_URL.'/company/notifications', - 'invoice_link_message' => 'Para visualizar la factura de cliente, haz clic en el enlace abajo:', - 'notification_invoice_paid_subject' => 'La factura :invoice ha sido pagada por el cliente :client', - 'notification_invoice_sent_subject' => 'La factura :invoice ha sido enviada a el cliente :client', - 'notification_invoice_viewed_subject' => 'La factura :invoice ha sido visualizado por el cliente:client', - 'notification_invoice_paid' => 'Un pago por valor de :amount se ha realizado por el cliente :client a la factura :invoice.', - 'notification_invoice_sent' => 'La factura :invoice por valor de :amount fue enviada al cliente :cliente.', - 'notification_invoice_viewed' => 'La factura :invoice por valor de :amount fue visualizada por el cliente :client.', - 'reset_password' => 'Puedes reconfigurar la contraseña de tu cuenta haciendo clic en el siguiente enlace:', - 'reset_password_footer' => 'Si no has solicitado un cambio de contraseña, por favor contactate con nosostros: ' . CONTACT_EMAIL, - - // Payment page - 'secure_payment' => 'Pago seguro', - 'card_number' => 'Número de tarjeta', - 'expiration_month' => 'Mes de caducidad', - 'expiration_year' => 'Año de caducidad', - 'cvv' => 'CVV', - - // Security alerts - 'confide' => array( - 'too_many_attempts' => 'Demasiados intentos fallidos. Inténtalo de nuevo en un par de minutos.', - 'wrong_credentials' => 'Contraseña o email incorrecto.', - 'confirmation' => '¡Tu cuenta se ha confirmado!', - 'wrong_confirmation' => 'Código de confirmación incorrecto.', - 'password_forgot' => 'La información sobre el cambio de tu contraseña se ha enviado a tu dirección de correo electrónico.', - 'password_reset' => 'Tu contraseña se ha cambiado con éxito.', - 'wrong_password_reset' => 'Contraseña no válida. Inténtalo de nuevo', - ), - - // Pro Plan - 'pro_plan' => [ - 'remove_logo' => ':link haz click para eliminar el logo de Invoice Ninja', //Maybe incorrect for the context - 'remove_logo_link' => 'Haz clic aquí', - ], - 'logout' => 'Cerrar sesión', - 'sign_up_to_save' => 'Registrate para guardar tu trabajo', - 'agree_to_terms' =>'Estoy de acuerdo con los términos de Invoice Ninja :terms', - 'terms_of_service' => 'Términos de servicio', - 'email_taken' => 'Esta dirección de correo electrónico ya se ha registrado', - 'working' => 'Procesando', - 'success' => 'Éxito', - 'success_message' => 'Te has registrado con éxito. Por favor, haz clic en el enlace de el correo de confirmación para verificar tu dirección de correo electrónico.', - 'erase_data' => 'Esta acción eliminará todos tus datos de forma permanente.', - 'password' => 'Contraseña', - - 'pro_plan_product' => 'Plan Pro', - 'pro_plan_description' => 'Un año de inscripción en el Plan Pro de Invoice Ninja.', - 'pro_plan_success' => '¡Gracias por unirte a Invoice Ninja! Al realizar el pago de tu factura, se iniciara tu PLAN PRO.', - 'unsaved_changes' => 'Tienes cambios no guardados', - 'custom_fields' => 'Campos a medida', - 'company_fields' => 'Campos de la empresa', - 'client_fields' => 'Campos del cliente', - 'field_label' => 'Etiqueta del campo', - 'field_value' => 'Valor del campo', - 'edit' => 'Editar', - 'view_as_recipient' => 'Ver como destinitario', - - // product management - 'product_library' => 'Inventario de productos', - 'product' => 'Producto', - 'products' => 'Productos', - 'fill_products' => 'Auto-rellenar productos', - 'fill_products_help' => 'Seleccionar un producto automáticamente configurará la descripción y coste', - 'update_products' => 'Auto-actualizar productos', - 'update_products_help' => 'Actualizar una factura automáticamente actualizará los productos', - 'create_product' => 'Crear Producto', - 'edit_product' => 'Editar Producto', - 'archive_product' => 'Archivar Producto', - 'updated_product' => 'Producto actualizado con éxito', - 'created_product' => 'Producto creado con éxito', - 'archived_product' => 'Producto archivado con éxito', - 'pro_plan_custom_fields' => ':link haz click para para activar campos a medida', - 'advanced_settings' => 'Configuración Avanzada', - 'pro_plan_advanced_settings' => ':link haz click para para activar la configuración avanzada', - 'invoice_design' => 'Diseño de factura', - 'specify_colors' => 'Especificar colores', - 'specify_colors_label' => 'Seleccionar los colores para usar en las facturas', - 'chart_builder' => 'Constructor de graficos', - 'ninja_email_footer' => 'Usa :site para facturar a tus clientes y recibir pagos de forma gratuita!', - 'go_pro' => 'Hazte Pro', - - // Quotes - 'quote' => 'Cotización', - 'quotes' => 'Cotizaciones', - 'quote_number' => 'Numero de cotización', - 'quote_number_short' => 'Cotización #', - 'quote_date' => 'Fecha cotización', - 'quote_total' => 'Total cotizado', - 'your_quote' => 'Tu cotización', - 'total' => 'Total', - 'clone' => 'Clon', //Whats the context for this one - 'new_quote' => 'Nueva cotización', - 'create_quote' => 'Crear Cotización', - 'edit_quote' => 'Editar Cotización', - 'archive_quote' => 'Archivar Cotización', - 'delete_quote' => 'Eliminar Cotización', - 'save_quote' => 'Guardar Cotización', - 'email_quote' => 'Enviar Cotización', - 'clone_quote' => 'Clonar Cotización', - 'convert_to_invoice' => 'Convertir a Factura', - 'view_invoice' => 'Ver Factura', - 'view_quote' => 'Ver Cotización', - 'view_client' => 'Ver Cliente', - 'updated_quote' => 'Cotización actualizada con éxito', - 'created_quote' => 'Cotización creada con éxito', - 'cloned_quote' => 'Cotización clonada con éxito', - 'emailed_quote' => 'Cotización enviada con éxito', - 'archived_quote' => 'Cotización archivada con éxito', - 'archived_quotes' => ':count cotizaciones archivadas con exito', - 'deleted_quote' => 'Cotizaciónes eliminadas con éxito', - 'deleted_quotes' => ':count cotizaciones eliminadas con exito', - 'converted_to_invoice' => 'Cotización convertida a factura con éxito', - 'quote_subject' => 'Nueva cotización de :account', - 'quote_message' => 'Para visualizar la cotización por valor de :amount, haz click en el enlace abajo.', - 'quote_link_message' => 'Para visualizar tu cotización haz click en el enlace abajo:', - 'notification_quote_sent_subject' => 'Cotización :invoice enviada a el cliente :client', - 'notification_quote_viewed_subject' => 'Cotización :invoice visualizada por el cliente :client', - 'notification_quote_sent' => 'La cotización :invoice por un valor de :amount, ha sido enviada al cliente :client.', - 'notification_quote_viewed' => 'La cotizacion :invoice por un valor de :amount ha sido visualizada por el cliente :client.', - 'session_expired' => 'Tu sesión ha caducado.', - 'invoice_fields' => 'Campos de factura', - 'invoice_options' => 'Opciones de factura', - 'hide_quantity' => 'Ocultar cantidad', - 'hide_quantity_help' => 'Si las cantidades de tus partidas siempre son 1, entonces puedes organizar tus facturas mejor al no mostrar este campo.', - 'hide_paid_to_date' => 'Ocultar valor pagado a la fecha', - 'hide_paid_to_date_help' => 'Solo mostrar la opción “Pagado a la fecha†en tus facturas en cuanto se ha recibido un pago.', - 'charge_taxes' => 'Cargar impuestos', - 'user_management' => 'Gestión de usario', - 'add_user' => 'Añadir usario', - 'send_invite' => 'Enviar invitación', //Context for its use - 'sent_invite' => 'Invitación enviada con éxito', - 'updated_user' => 'Usario actualizado con éxito', - 'invitation_message' => ':invitor te ha invitado a unirte a su cuenta en Invoice Ninja.', - 'register_to_add_user' => 'Regístrate para añadir usarios', - 'user_state' => 'Estado', - 'edit_user' => 'Editar Usario', - 'delete_user' => 'Eliminar Usario', - 'active' => 'Activar', - 'pending' => 'Pendiente', - 'deleted_user' => 'Usario eliminado con éxito', - 'limit_users' => 'Lo sentimos, esta acción excederá el límite de ' . MAX_NUM_USERS . ' usarios', - 'confirm_email_invoice' => '¿Estás seguro que quieres enviar esta factura?', - 'confirm_email_quote' => '¿Estás seguro que quieres enviar esta cotización?', - 'confirm_recurring_email_invoice' => 'Se ha marcado esta factura como recurrente, estás seguro que quieres enviar esta factura?', - 'cancel_account' => 'Cancelar Cuenta', - 'cancel_account_message' => 'AVISO: Esta acción eliminará todos tus datos de forma permanente.', - 'go_back' => 'Atrás', - 'data_visualizations' => 'Visualización de datos', - 'sample_data' => 'Datos de ejemplo', - 'hide' => 'Ocultar', - 'new_version_available' => 'Una nueva versión de :releases_link disponible. Estás utilizando versión :user_version, la última versión es :latest_version', - 'invoice_settings' => 'Configuración de facturas', - 'invoice_number_prefix' => 'Prefijo de facturación', - 'invoice_number_counter' => 'Numeración de facturación', - 'quote_number_prefix' => 'Prejijo de cotizaciones', - 'quote_number_counter' => 'Numeración de cotizaciones', - 'share_invoice_counter' => 'Compartir la numeración para cotización y facturación', - 'invoice_issued_to' => 'Factura emitida a', - 'invalid_counter' => 'Para evitar posibles conflictos, por favor crea un prefijo de facturación y de cotización.', - 'mark_sent' => 'Marcar como enviado', - - 'gateway_help_1' => ':link to sign up for Authorize.net.', - 'gateway_help_2' => ':link to sign up for Authorize.net.', - 'gateway_help_17' => ':link to get your PayPal API signature.', - 'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.', - 'gateway_help_27' => ':link to sign up for TwoCheckout.', - - 'more_designs' => 'More designs', - 'more_designs_title' => 'Additional Invoice Designs', - 'more_designs_cloud_header' => 'Go Pro for more invoice designs', - 'more_designs_cloud_text' => '', - 'more_designs_self_host_header' => 'Get 6 more invoice designs for just $'.INVOICE_DESIGNS_PRICE, - 'more_designs_self_host_text' => '', - 'buy' => 'Buy', - 'bought_designs' => 'Successfully added additional invoice designs', - - 'sent' => 'sent', - 'timesheets' => 'Timesheets', - - 'payment_title' => 'Enter Your Billing Address and Credit Card information', - 'payment_cvv' => '*This is the 3-4 digit number onthe back of your card', - 'payment_footer1' => '*Billing address must match address associated with credit card.', - 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - 'vat_number' => 'Vat Number', - - 'id_number' => 'ID Number', - 'white_label_link' => 'White label', - 'white_label_text' => 'Purchase a white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the top of the client pages.', - 'white_label_header' => 'White Label', - 'bought_white_label' => 'Successfully enabled white label license', - 'white_labeled' => 'White labeled', - - 'restore' => 'Restore', - 'restore_invoice' => 'Restore Invoice', - 'restore_quote' => 'Restore Quote', - 'restore_client' => 'Restore Client', - 'restore_credit' => 'Restore Credit', - 'restore_payment' => 'Restore Payment', - - 'restored_invoice' => 'Successfully restored invoice', - 'restored_quote' => 'Successfully restored quote', - 'restored_client' => 'Successfully restored client', - 'restored_payment' => 'Successfully restored payment', - 'restored_credit' => 'Successfully restored credit', - - 'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.', - 'discount_percent' => 'Percent', - 'discount_amount' => 'Amount', - - 'invoice_history' => 'Invoice History', - 'quote_history' => 'Quote History', - 'current_version' => 'Current version', - 'select_versiony' => 'Select version', - 'view_history' => 'View History', - - 'edit_payment' => 'Edit Payment', - 'updated_payment' => 'Successfully updated payment', - 'deleted' => 'Deleted', - 'restore_user' => 'Restore User', - 'restored_user' => 'Successfully restored user', - 'show_deleted_users' => 'Show deleted users', - 'email_templates' => 'Email Templates', - 'invoice_email' => 'Invoice Email', - 'payment_email' => 'Payment Email', - 'quote_email' => 'Quote Email', - 'reset_all' => 'Reset All', - 'approve' => 'Approve', - - 'token_billing_type_id' => 'Token Billing', - 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', - 'token_billing_1' => 'Disabled', - 'token_billing_2' => 'Opt-in - checkbox is shown but not selected', - 'token_billing_3' => 'Opt-out - checkbox is shown and selected', - 'token_billing_4' => 'Always', - 'token_billing_checkbox' => 'Store credit card details', - 'view_in_stripe' => 'View in Stripe', - 'use_card_on_file' => 'Use card on file', - 'edit_payment_details' => 'Edit payment details', - 'token_billing' => 'Save card details', - 'token_billing_secure' => 'The data is stored securely by :stripe_link', - - 'support' => 'Support', - 'contact_information' => 'Contact information', - '256_encryption' => '256-Bit Encryption', - 'amount_due' => 'Amount due', - 'billing_address' => 'Billing address', - 'billing_method' => 'Billing method', - 'order_overview' => 'Order overview', - 'match_address' => '*Address must match address associated with credit card.', - 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - - 'default_invoice_footer' => 'Set default invoice footer', - 'invoice_footer' => 'Invoice footer', - 'save_as_default_footer' => 'Save as default footer', - - 'token_management' => 'Token Management', - 'tokens' => 'Tokens', - 'add_token' => 'Add Token', - 'show_deleted_tokens' => 'Show deleted tokens', - 'deleted_token' => 'Successfully deleted token', - 'created_token' => 'Successfully created token', - 'updated_token' => 'Successfully updated token', - 'edit_token' => 'Edit Token', - 'delete_token' => 'Delete Token', - 'token' => 'Token', - - 'add_gateway' => 'Add Gateway', - 'delete_gateway' => 'Delete Gateway', - 'edit_gateway' => 'Edit Gateway', - 'updated_gateway' => 'Successfully updated gateway', - 'created_gateway' => 'Successfully created gateway', - 'deleted_gateway' => 'Successfully deleted gateway', - 'pay_with_paypal' => 'PayPal', - 'pay_with_card' => 'Credit card', - - 'change_password' => 'Change password', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'confirm_password' => 'Confirm password', - 'password_error_incorrect' => 'The current password is incorrect.', - 'password_error_invalid' => 'The new password is invalid.', - 'updated_password' => 'Successfully updated password', - - 'api_tokens' => 'API Tokens', - 'users_and_tokens' => 'Users & Tokens', - 'account_login' => 'Account Login', - 'recover_password' => 'Recover your password', - 'forgot_password' => 'Forgot your password?', - 'email_address' => 'Email address', - 'lets_go' => 'Let’s go', - 'password_recovery' => 'Password Recovery', - 'send_email' => 'Send email', - 'set_password' => 'Set Password', - 'converted' => 'Converted', - - - -); \ No newline at end of file diff --git a/app/lang/es/validation.php b/app/lang/es/validation.php deleted file mode 100755 index 2baee0ab1da4..000000000000 --- a/app/lang/es/validation.php +++ /dev/null @@ -1,111 +0,0 @@ - ":attribute debe ser aceptado.", - "active_url" => ":attribute no es una URL válida.", - "after" => ":attribute debe ser una fecha posterior a :date.", - "alpha" => ":attribute solo debe contener letras.", - "alpha_dash" => ":attribute solo debe contener letras, números y guiones.", - "alpha_num" => ":attribute solo debe contener letras y números.", - "array" => ":attribute debe ser un conjunto.", - "before" => ":attribute debe ser una fecha anterior a :date.", - "between" => array( - "numeric" => ":attribute tiene que estar entre :min - :max.", - "file" => ":attribute debe pesar entre :min - :max kilobytes.", - "string" => ":attribute tiene que tener entre :min - :max caracteres.", - "array" => ":attribute tiene que tener entre :min - :max ítems.", - ), - "confirmed" => "La confirmación de :attribute no coincide.", - "date" => ":attribute no es una fecha válida.", - "date_format" => ":attribute no corresponde al formato :format.", - "different" => ":attribute y :other deben ser diferentes.", - "digits" => ":attribute debe tener :digits dígitos.", - "digits_between" => ":attribute debe tener entre :min y :max dígitos.", - "email" => ":attribute no es un correo válido", - "exists" => ":attribute es inválido.", - "image" => ":attribute debe ser una imagen.", - "in" => ":attribute es inválido.", - "integer" => ":attribute debe ser un número entero.", - "ip" => ":attribute debe ser una dirección IP válida.", - "max" => array( - "numeric" => ":attribute no debe ser mayor a :max.", - "file" => ":attribute no debe ser mayor que :max kilobytes.", - "string" => ":attribute no debe ser mayor que :max caracteres.", - "array" => ":attribute no debe tener más de :max elementos.", - ), - "mimes" => ":attribute debe ser un archivo con formato: :values.", - "min" => array( - "numeric" => "El tamaño de :attribute debe ser de al menos :min.", - "file" => "El tamaño de :attribute debe ser de al menos :min kilobytes.", - "string" => ":attribute debe contener al menos :min caracteres.", - "array" => ":attribute debe tener al menos :min elementos.", - ), - "not_in" => ":attribute es inválido.", - "numeric" => ":attribute debe ser numérico.", - "regex" => "El formato de :attribute es inválido.", - "required" => "El campo :attribute es obligatorio.", - "required_if" => "El campo :attribute es obligatorio cuando :other es :value.", - "required_with" => "El campo :attribute es obligatorio cuando :values está presente.", - "required_with_all" => "The :attribute field is required when :values is present.", - "required_without" => "El campo :attribute es obligatorio cuando :values no está presente.", - "required_without_all" => "The :attribute field is required when none of :values are present.", - "same" => ":attribute y :other deben coincidir.", - "size" => array( - "numeric" => "El tamaño de :attribute debe ser :size.", - "file" => "El tamaño de :attribute debe ser :size kilobytes.", - "string" => ":attribute debe contener :size caracteres.", - "array" => ":attribute debe contener :size elementos.", - ), - "unique" => ":attribute ya ha sido registrado.", - "url" => "El formato :attribute es inválido.", - "positive" => ":attribute debe ser mayor que cero.", - "has_credit" => "el cliente no tiene crédito suficiente.", - - "positive" => "The :attribute must be greater than zero.", - "has_credit" => "The client does not have enough credit.", - "notmasked" => "The values are masked", - - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => array( - 'attribute-name' => array( - 'rule-name' => 'custom-message', - ), - ), - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => array(), - -); diff --git a/app/lang/fr/pagination.php b/app/lang/fr/pagination.php deleted file mode 100644 index 5f0b1d94f7b0..000000000000 --- a/app/lang/fr/pagination.php +++ /dev/null @@ -1,20 +0,0 @@ - '« Précédent', - - 'next' => 'Suivant »', - -); \ No newline at end of file diff --git a/app/lang/fr/public.php b/app/lang/fr/public.php deleted file mode 100644 index 7f5ecb9008e2..000000000000 --- a/app/lang/fr/public.php +++ /dev/null @@ -1,209 +0,0 @@ - 'Free Open-Source Online Invoicing', - 'description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - 'invoice_now' => 'Invoice Now', - 'no_signup_needed' => 'No signup needed', - - 'link_blog' => 'Blog', - 'link_about_us' => 'About Us', - 'link_contact_us' => 'Contact Us', - 'link_features' => 'Features', - 'link_plans' => 'Plans', - 'link_compare' => 'Compare', - 'link_testimonials' => 'Testimonials', - 'link_faq' => 'FAQ', - - 'my_account' => 'My Account', - 'login' => 'Login', - 'connect_with_us' => 'Connect with Us', - 'safe_and_secure' => 'Safe & Secure', - 'toggle_navigation' => 'Toggle navigation', - - - 'home' => [ - 'header' => 'THE SIMPLE & FREE WAY TO INVOICE CLIENTS', - 'sub_header' => 'It\'s just that easy. Stop spending time on complicated and expensive invoicing.
    No fuss, just get started and get paid.', - 'footer' => 'Simple, Intuitive Invoicing,Anywhere.', - - 'free_always' => 'Free, Always', - 'free_always_text' => 'Send unlimited invoices to 500 clients per month and never pay a dime. You are welcome to unlock still more awesome features with our Pro Plan, but our free app is a top-notch product that will do everything you need it to do, without any subscription or fees.', - - 'open_source' => 'Open-Source', - 'open_source_text' => 'No mysterious corporate silos here! Just full source code transparency and a devotion to working with anyone interested to build a better electronic invoicing platform. We even offer a handy zip download for a self-hosted version of Invoice Ninja.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text' => 'See how your edited invoice will look as a print-friendly pdf while you make the changes. Our pdf generator works in real time as you make your changes. You can even preview four beautiful preset designs. Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text' => 'Invoices sent with our app integrate seamlessly with the gateway credit card processor of your choice, to make it super easy for your clients to send you money with just a few clicks. We play nicely with Authorize.Net, Stripe, PayPal and loads more - 23 in all!', - ], - - 'about' => [ - 'header' => 'About Invoice Ninja', - 'what_is' => 'What is Invoice Ninja?', - - 'team_ninja' => 'Team Ninja', - 'team_ninja_text' => 'Invoice Ninja is managed by a team of seasoned web workers. We launched in early 2014 and have been thrilled by the enthusiastic response we’ve received from our growing community of users.', - - 'co_founder' => 'Co-Founder', - 'ceo' => 'CEO', - 'cto' => '', - 'designer' => 'Designer', - 'marketing' => 'Marketing', - - 'shalom_bio' => 'Shalom has specialized in small business development for nearly 10 years. In addition to InvoiceNinja.com Shalom is CEO of a leading tour agency in Israel.', - 'hillel_bio' => 'Hillel has been developing enterprise applications for 15 years. His open-source AutoComplete component has been used by thousands of developers around the world.', - 'razi_bio' => 'Razi is a pixel nerd with a great deal of experience in design for web sites and applications. When she isn\'t busy with InvoiceNinja she runs a small web agency in Stockholm called kantorp-wegl.in', - 'ben_bio' => 'A veteran digital marketer and content strategist, Ben specializes in building communities around brands that make business easier for freelancers, SMBs and micro-entrepreneurs.', - ], - - 'contact' => [ - 'header' => 'Questions, special requests, or just want to say hi?', - 'sub_header' => 'Fill in the form below and we\'ll get back to you as soon as possible. Hope to hear from you!', - 'other_ways' => 'Other ways to reach us', - - 'name' => 'Name', - 'name_help' => 'Please enter your name.', - - 'email' => 'Email Address', - 'email_help' => 'Please enter a valid e-mail address.', - - 'message' => 'Message', - 'message_help' => 'Please enter a message.', - 'send_message' => 'Send Message', - ], - - 'features' => [ - 'header' => 'The Features', - 'footer' => 'Like what you see?', - 'footer_action' => 'Get started today!', - - 'open_source' => 'Open Source Platform', - 'open_source_text1' => 'Set the code free! Here at Invoice Ninja, we’re all about creating the best possible app, and inviting scrutiny via full code transparency is a central manifestation of this value.', - 'open_source_text2' => 'We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.', - - 'free_forever' => 'FREE. Forever.', - 'free_forever_text1' => 'Yeah, you read that correctly. You don’t have to pay us a cent to use our tools. We know how tough it is to make ends meet as a web-based business, and we’re bent on providing a top-notch product that will do everything you need it to do, without any subscription or opt-in fees.', - 'free_forever_text2' => 'Try Invoice Ninja out. You literally have nothing to lose. We’re confident that you’ll find the experience so positive that you’ll never need to turn elsewhere.', - - 'secure' => 'Secure & Private', - 'secure_text1' => 'Invoice Ninja has been built from the ground up to keep your data safe. Only you have access to your login & accounting details, & we will never share your transaction data to any third party.', - 'secure_text2' => 'Our website operates with 256-bit encryption, which is even more secure than most banking websites. Invoice Ninja uses the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. We feel safe here and have invested heavily in measures to ensure that you do too.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text1' => 'With Invoice Ninja, we’ve done away with the need for cumbersome multi-click invoice previewing after each save.', - 'live_pdf_text2' => 'When you enter the details of your customer and/or invoice in our editor, you can instantly see the results in the pdf preview pane below. Want to see what your invoice would look like in a different layout style? The live pdf can show you four beautiful preset styles in real time too.', - 'live_pdf_text3' => 'Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text1' => 'Invoice Ninja seamlessly integrates with all of the top internet payment processors and gateways so you can get paid for your work quickly and easily.', - 'online_payments_text2' => 'Invoices created with our tools aren’t just for bookkeeping purposes - they bring in the Benjamins. We also make it super easy to choose the right gateway for the specific needs of your business and are happy to help you to get started working with the gateway of your choice. What’s more, we’re constantly working on rolling out additional gateway integrations, so if you don’t see the one you use here, just let us know, and there’s a good chance we’ll add it for you.', - ], - - 'plans' => [ - 'header' => 'The Plans', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - 'pro_plan' => 'Pro Plan', - - 'go_pro' => 'Go Pro to Unlock Premium Invoice Ninja Features', - 'go_pro_text' => 'We believe that the free version of Invoice Ninja is a truly awesome product loaded with the key features you need to bill your clients electronically. But for those who crave still more Ninja awesomeness, we\'ve unmasked the Invoice Ninja Pro plan, which offers more versatility, power and customization options for just $50 per year.', - - 'number_clients' => 'Number of clients per account', - 'unlimited_invoices' => 'Unlimited client invoices', - 'company_logo' => 'Add your company logo', - 'live_pdf' => 'Live .PDF invoice creation', - 'four_templates' => '4 beautiful invoice templates', - 'payments' => 'Accept credit card payments', - 'additional_templates' => 'Additional invoice templates', - 'multi_user' => 'Multi-user support', - 'quotes' => 'Quotes/pro-forma invoices', - 'advanced_settings' => 'Advanced invoice settings', - 'data_vizualizations' => 'Dynamic data vizualizations', - 'email_support' => 'Priority email support', - 'remove_created_by' => 'Remove "Created by Invoice Ninja"', - 'latest_features' => 'Latest and greatest features', - 'pricing' => 'Pricing', - 'free_always' => 'Free /Always!', - 'year_price' => '$50 /Year', - ], - - 'compare' => [ - 'header' => 'How We Compare', - 'free_plan_comparison' => 'Free Plan Comparison', - 'paid_plan_comparison' => 'Paid Plan Comparison', - 'app' => 'App', - 'cost' => 'Cost', - 'clients' => 'Clients', - 'invoices' => 'Invoices', - 'payment_gateways' => 'Payment Gateways', - 'custom_logo' => 'Custom Logo', - 'multiple_templates' => 'Multiple Templates', - 'recurring_payments' => 'Recurring Payments', - 'open_source' => 'Open Source', - 'per_month' => 'per month', - 'per_year' => 'per year', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - ], - - 'testimonials' => [ - 'testimonials' => 'testimonials', - 'header' => 'Since we launched Invoice Ninja in March of 2014, we\'ve been overwhelmed by a deluge of user love. Here\'s a small taste of the glowing things people have to say about the great experiences the\'ve been having with our free e-invoicing app!', - ], - - 'faq' => [ - 'header' => 'The FAQs', - - 'question1' => 'I know it isn’t standard ninja practice to reveal too many identity details, but who are you guys exactly?', - 'answer1' => 'We’re a small team of highly skilled digital journeymen based in Israel. We love open source, we love disrupting the big business status quo, and we love building helpful tools that are easy to use. We believe that everyone else’s web-based cash flow tools are unnecessarily expensive, clunky and complicated - and we’re bent on proving these beliefs with Invoice Ninja.', - - 'question2' => 'How do I get started using Invoice Ninja?', - 'answer2' => 'Just click on the big, yellow "Invoice Now" button on our homepage!', - - 'question3' => 'Do you offer customer support?', - 'answer3' => 'We sure do. Support is super important to us. Feel free to email us at support@invoiceninja.com with any questions you might have. We almost always reply within one business day.', - - 'question4' => 'Is Invoice Ninja really free? For how long?', - 'answer4' => 'Yes, our basic app is 100% free. Forever and ever. For real. We also offer a paid Pro version of Invoice Ninja (you can learn all about its awesome features here), but it\'s important to us that the free version have all of the key features people need to do business.', - - 'question5' => 'How is Invoice Ninja able to offer this all for free? How are you making any money?', - 'answer5' => 'We’re mostly in this line of work because we believe it’s high time that a good electronic invoicing tool be available for free. There isn’t much money in it - yet. We do offer a paid Pro version of the app that we\'ve souped up with premium features. And when our users open up new accounts with payment processor gateways by clicking on links from our site, we make modest commissions as a gateway affiliate. So if zillions of freelancers and small businesses start running credit card charges through Invoice Ninja, or if scores of users go Pro, there’s a decent chance we\'ll recover our investment.', - - 'question6' => 'Really? So does that mean you’re not collecting information about me so you can sell me stuff or so that some other company can spam me according to my interests?', - 'answer6' => 'No way. We’re not mining your data, and we’re not selling you out. That wouldn’t be very ninja of us, would it?', - - 'question7' => 'But don’t you have access to my merchant and banking accounts?', - 'answer7' => 'Actually, we don’t. When you link an account at a third party financial institution with your Invoice Ninja account, you’re essentially giving our app permission to send money to you and nothing more. This is all managed by the tech teams at your financial service providers, who go to great lengths to ensure their integrations can’t be exploited or abused.', - - 'question8' => 'Given that Invoice Ninja is an open source app, how can I be sure that my financial information is safe with you?', - 'answer8' => 'There\'s a big difference between “open source" and “open data.†Anyone who wants to use the code that drives Invoice Ninja to create their own products or to make improvements to ours can do so. It’s available for anyone who wants to download and work with. But that’s just the source code - totally separate from what happens with that code on the Invoice Ninja servers. You’re the only one who has full access to what you\'re doing with our product. For more details on the security of our servers and how we handle our users\' information, please read the next question.', - - 'question9' => 'So just how secure is this app?', - 'answer9' => 'Extremely. Data uploaded by our users runs through connections with 256-bit encryption, which is twice as many encryption bits that most bank websites use. We use the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. It’s fancy stuff that we put in place to make sure no one can gain access to your information except you.', - - 'question10' => 'How do I remove the small "Created by Invoice Ninja†image from the bottom of my invoices?', - 'answer10' => 'The amazingly affordable Pro version of Invoice Ninja allows you to do this and oh so much more.', - - 'question11' => 'Can I see what the application looks like with sample data?', - 'answer11' => 'Sure, click here to try out our demo account.', - - 'question12' => 'I hear that there\'s a version of Invoice Ninja that I can install myself on my own servers? Where can I learn more about this?', - 'answer12' => 'The rumors are true! Full instructions are available here.', - - 'question13' => 'I\'m seeing the options to assign various statuses to my invoices, clients, credits and payments. What\'s the difference between "active," "archived" and "deleted"?', - 'answer13' => 'These three handy statuses for invoices, clients, credits and payments allow you to keep your own cash flow management as straightforward and accessible as possible from your Invoice Ninja dashboard. None of these statuses will actually purge any records from your account - even "deleted" can always be recovered at any point in the future. "Active" means the record will appear in the relevant queue of records. To stash a record away so it\'s still fully operational but no longer cluttering up your interface, simply set it to be "archived." To deactivate a record and render it inaccessible to your clients, mark it "deleted."', - - 'question14' => 'My question wasn\'t covered by any of the content on this FAQ page. How can I get in touch with you?', - 'answer14' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - 'miss_something' => 'Did we miss something?', - 'miss_something_text' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - ], - - -]; \ No newline at end of file diff --git a/app/lang/fr/reminders.php b/app/lang/fr/reminders.php deleted file mode 100644 index e9f1f353e9d8..000000000000 --- a/app/lang/fr/reminders.php +++ /dev/null @@ -1,24 +0,0 @@ - "Les mots de passe doivent avoir au moins six caractères et doivent être identiques.", - - "user" => "Nous ne pouvons trouver cet utilisateur avec cette adresse e-mail.", - - "token" => "Ce jeton de réinitialisation du mot de passe n'est pas valide.", - - "sent" => "Rappel du mot de passe envoyé !", - -); \ No newline at end of file diff --git a/app/lang/fr/texts.php b/app/lang/fr/texts.php deleted file mode 100644 index 9c78aa59e0ff..000000000000 --- a/app/lang/fr/texts.php +++ /dev/null @@ -1,574 +0,0 @@ - 'Entreprise', - 'name' => 'Nom', - 'website' => 'Site web', - 'work_phone' => 'Téléphone', - 'address' => 'Adresse', - 'address1' => 'Rue', - 'address2' => 'Appt/Bâtiment', - 'city' => 'Ville', - 'state' => 'Région/Département', - 'postal_code' => 'Code Postal', - 'country_id' => 'Pays', - 'contacts' => 'Informations de contact', //if you speak about contact details - 'first_name' => 'Prénom', - 'last_name' => 'Nom', - 'phone' => 'Téléphone', - 'email' => 'Courriel', - 'additional_info' => 'Informations complémentaires', - 'payment_terms' => 'Conditions de paiement', - 'currency_id' => 'Devise', - 'size_id' => 'Taille', - 'industry_id' => 'Secteur', // literal translation : Industrie - 'private_notes' => 'Note personnelle', - - // invoice - 'invoice' => 'Facture', - 'client' => 'Client', - 'invoice_date' => 'Date de la facture', - 'due_date' => 'Date d\'échéance', - 'invoice_number' => 'Numéro de facture', - 'invoice_number_short' => 'Facture #', - 'po_number' => 'Numéro du bon de commande', - 'po_number_short' => 'Bon de commande #', - 'frequency_id' => 'Fréquence', - 'discount' => 'Remise', - 'taxes' => 'Taxes', - 'tax' => 'Taxe', - 'item' => 'Article', - 'description' => 'Description', - 'unit_cost' => 'Coût unitaire', - 'quantity' => 'Quantité', - 'line_total' => 'Total', - 'subtotal' => 'Total', - 'paid_to_date' => 'Versé à ce jour',//this one is not very used in France - 'balance_due' => 'Montant total',//can be "Montant à verser" or "Somme totale" - 'invoice_design_id' => 'Design', //if you speak about invoice's design -> "Modèle" - 'terms' => 'Conditions', - 'your_invoice' => 'Votre Facture', - - 'remove_contact' => 'Supprimer un contact', - 'add_contact' => 'Ajouter un contact', - 'create_new_client' => 'Ajouter un nouveau client', - 'edit_client_details' => 'Modifier les informations du client', - 'enable' => 'Autoriser', - 'learn_more' => 'En savoir +', - 'manage_rates' => 'Gérer les taux', - 'note_to_client' => 'Commentaire pour le client', - 'invoice_terms' => 'Conditions de facturation', - 'save_as_default_terms' => 'Sauvegarder comme conditions par défaut', - 'download_pdf' => 'Télécharger le PDF', - 'pay_now' => 'Payer maintenant', - 'save_invoice' => 'Sauvegarder la facture', - 'clone_invoice' => 'Dupliquer la facture', - 'archive_invoice' => 'Archiver la facture', - 'delete_invoice' => 'Supprimer la facture', - 'email_invoice' => 'Envoyer la facture par courriel', - 'enter_payment' => 'Saisissez un paiement', - 'tax_rates' => 'Taux de taxe', - 'rate' => 'Taux', - 'settings' => 'Paramètres', - 'enable_invoice_tax' => 'Spécifier une
    taxe pour la facture', - 'enable_line_item_tax' => 'Spécifier une taxe pour chaque ligne', - - // navigation - 'dashboard' => 'Tableau de bord', - 'clients' => 'Clients', - 'invoices' => 'Factures', - 'payments' => 'Paiements', - 'credits' => 'Crédits', - 'history' => 'Historique', - 'search' => 'Rechercher', - 'sign_up' => 'S\'enregistrer', - 'guest' => 'Invité', - 'company_details' => 'Informations sur l\'entreprise', - 'online_payments' => 'Paiements en ligne', - 'notifications' => 'Notifications', - 'import_export' => 'Importer/Exporter', - 'done' => 'Valider', - 'save' => 'Sauvegarder', - 'create' => 'Créer', - 'upload' => 'Envoyer', - 'import' => 'Importer', - 'download' => 'Télécharger', - 'cancel' => 'Annuler', - 'close' => 'Fermer', - 'provide_email' => 'Veuillez renseigner une adresse courriel valide', - 'powered_by' => 'Propulsé par', - 'no_items' => 'Aucun élément', - - // recurring invoices - 'recurring_invoices' => 'Factures récurrentes', - 'recurring_help' => '

    Envoyer automatiquement la même facture à vos clients de façon hebdomadaire, bimensuelle, mensuelle, trimestrielle ou annuelle.

    -

    Utiliser :MONTH, :QUARTER ou :YEAR pour des dates dynamiques. Les opérations simples fonctionnent également, par exemple :MONTH-1.

    -

    Exemples de variables dynamiques pour les factures:

    -
      -
    • "Adhésion au club de gym pour le mois de :MONTH" => "Adhésion au club de gym pour le mois de Juillet"
    • -
    • ":YEAR+1 - abonnement annuel" => "2015 - abonnement annuel"
    • -
    • "Acompte pour le :QUARTER+1" => "Acompte pour le Q2"
    • -
    ', - - // dashboard - 'in_total_revenue' => 'de bénéfice total', - 'billed_client' => 'client facturé', - 'billed_clients' => 'clients facturés', - 'active_client' => 'client actif', - 'active_clients' => 'clients actifs', - 'invoices_past_due' => 'Date limite de paiement dépassée', - 'upcoming_invoices' => 'Factures à venir', - 'average_invoice' => 'Moyenne de facturation', - - // list pages - 'archive' => 'Archiver', - 'delete' => 'Supprimer', - 'archive_client' => 'Archiver ce client', - 'delete_client' => 'Supprimer ce client', - 'archive_payment' => 'Archiver ce paiement', - 'delete_payment' => 'Supprimer ce paiement', - 'archive_credit' => 'Archiver ce crédit', - 'delete_credit' => 'Supprimer ce crédit', - 'show_archived_deleted' => 'Afficher archivés/supprimés', - 'filter' => 'Filtrer', - 'new_client' => 'Nouveau Client', - 'new_invoice' => 'Nouvelle Facture', - 'new_payment' => 'Nouveau Paiement', - 'new_credit' => 'Nouveau Crédit', - 'contact' => 'Contact', - 'date_created' => 'Date de création', - 'last_login' => 'Dernière connexion', - 'balance' => 'Solde', - 'action' => 'Action', - 'status' => 'Statut', - 'invoice_total' => 'Montant Total', - 'frequency' => 'Fréquence', - 'start_date' => 'Date de début', - 'end_date' => 'Date de fin', - 'transaction_reference' => 'Référence de la transaction', - 'method' => 'Méthode', - 'payment_amount' => 'Montant du paiement', - 'payment_date' => 'Date du paiement', - 'credit_amount' => 'Montant du crédit', - 'credit_balance' => 'Solde du crédit', - 'credit_date' => 'Date de crédit', - 'empty_table' => 'Aucune donnée disponible dans la table', - 'select' => 'Sélectionner', - 'edit_client' => 'Éditer le Client', - 'edit_invoice' => 'Éditer la Facture', - - // client view page - 'create_invoice' => 'Créer une facture', - 'enter_credit' => 'Saisissez un crédit', - 'last_logged_in' => 'Dernière connexion', - 'details' => 'Détails', - 'standing' => 'En attente', - 'credit' => 'Crédit', - 'activity' => 'Activité', - 'date' => 'Date', - 'message' => 'Message', - 'adjustment' => 'Réglements', - 'are_you_sure' => 'Voulez-vous vraiment effectuer cette action ?', - - // payment pages - 'payment_type_id' => 'Type de paiement', - 'amount' => 'Montant', - - // account/company pages - 'work_email' => 'Courriel', - 'language_id' => 'Langage', - 'timezone_id' => 'Fuseau horaire', - 'date_format_id' => 'Format de la date', - 'datetime_format_id' => 'Format Date/Heure', - 'users' => 'Utilisateurs', - 'localization' => 'Localisation', - 'remove_logo' => 'Supprimer le logo', - 'logo_help' => 'Formats supportés: JPEG, GIF et PNG. Hauteur recommandé: 120px', - 'payment_gateway' => 'Passerelle de paiement', - 'gateway_id' => 'Fournisseur', - 'email_notifications' => 'Notifications par courriel', - 'email_sent' => 'm\'envoyer un courriel quand une facture est envoyée', - 'email_viewed' => 'm\'envoyer un courriel quand une facture est vue', - 'email_paid' => 'm\'envoyer un courriel quand une facture est payée', - 'site_updates' => 'Mises à jour du site', - 'custom_messages' => 'Messages personnalisés', - 'default_invoice_terms' => 'Définir comme les conditions par défaut', - 'default_email_footer' => 'Définir comme la signature de courriel par défaut', - 'import_clients' => 'Importer des données clients', - 'csv_file' => 'Sélectionner un fichier CSV', - 'export_clients' => 'Exporter des données clients', - 'select_file' => 'Veuillez sélectionner un fichier', - 'first_row_headers' => 'Utiliser la première ligne comme en-tête', - 'column' => 'Colonne', - 'sample' => 'Exemple', - 'import_to' => 'Importer en tant que', - 'client_will_create' => 'client sera créé', - 'clients_will_create' => 'clients seront créés', - - // application messages - 'created_client' => 'Client créé avec succès', - 'created_clients' => ':count clients créés ave csuccès', - 'updated_settings' => 'paramètres mis à jour avec succès', - 'removed_logo' => 'Logo supprimé avec succès', - 'sent_message' => 'Message envoyé avec succès', - 'invoice_error' => 'Veuillez vous assurer de sélectionner un client et de corriger les erreurs', - 'limit_clients' => 'Désolé, cela dépasse la limite de :count clients', - 'payment_error' => 'Il y a eu une erreur lors du traitement de votre paiement. Veuillez réessayer ultérieurement', - 'registration_required' => 'Veuillez vous enregistrer pour envoyer une facture par courriel', - 'confirmation_required' => 'Veuillez confirmer votre adresse courriel', - - 'updated_client' => 'Client modifié avec succès', - 'created_client' => 'Client créé avec succès', - 'archived_client' => 'Client archivé avec succès', - 'archived_clients' => ':count clients archivés avec succès', - 'deleted_client' => 'Client supprimé avec succès', - 'deleted_clients' => ':count clients supprimés avec succès', - - 'updated_invoice' => 'Facture modifiée avec succès', - 'created_invoice' => 'Facture créée avec succès', - 'cloned_invoice' => 'Facture dupliquée avec succès', - 'emailed_invoice' => 'Facture envoyée par courriel avec succès', - 'and_created_client' => 'et client créé', - 'archived_invoice' => 'Facture archivée avec succès', - 'archived_invoices' => ':count factures archivées avec succès', - 'deleted_invoice' => 'Facture supprimée avec succès', - 'deleted_invoices' => ':count factures supprimées avec succès', - - 'created_payment' => 'Paiement créé avec succès', - 'archived_payment' => 'Paiement archivé avec succès', - 'archived_payments' => ':count paiement archivés avec succès', - 'deleted_payment' => 'Paiement supprimé avec succès', - 'deleted_payments' => ':count paiement supprimés avec succès', - 'applied_payment' => 'Paiement appliqué avec succès', - - 'created_credit' => 'Crédit créé avec succès', - 'archived_credit' => 'Crédit archivé avec succès', - 'archived_credits' => ':count crédits archivés avec succès', - 'deleted_credit' => 'Crédit supprimé avec succès', - 'deleted_credits' => ':count crédits supprimés avec succès', - - // Emails - 'confirmation_subject' => 'Validation du compte invoice ninja', - 'confirmation_header' => 'Validation du compte', - 'confirmation_message' => 'Veuillez cliquer sur le lien ci-après pour valider votre compte.', - 'invoice_subject' => 'Nouvelle facture en provenance de :account', - 'invoice_message' => 'Pour voir votre facture de :amount, Cliquez sur le lien ci-après.', - 'payment_subject' => 'Paiement reçu', - 'payment_message' => 'Merci pour votre paiement d\'un montant de :amount', - 'email_salutation' => 'Cher :name,', - 'email_signature' => 'Cordialement,', - 'email_from' => 'L\'équipe InvoiceNinja', - 'user_email_footer' => 'Pour modifier vos paramètres de notification par courriel, veuillez visiter '.SITE_URL.'/company/notifications', - 'invoice_link_message' => 'Pour voir la facture de votre client cliquez sur le lien ci-après :', - 'notification_invoice_paid_subject' => 'La facture :invoice a été payée par le client :client', - 'notification_invoice_sent_subject' => 'La facture :invoice a été envoyée au client :client', - 'notification_invoice_viewed_subject' => 'La facture :invoice a été vue par le client :client', - 'notification_invoice_paid' => 'Un paiement de :amount a été effectué par le client :client concernant la facture :invoice.', - 'notification_invoice_sent' => 'Le client suivant :client a reçu par courriel la facture :invoice d\'un montant de :amount', - 'notification_invoice_viewed' => 'Le client suivant :client a vu la facture :invoice d\'un montant de :amount', - 'reset_password' => 'Vous pouvez réinitialiser votre mot de passe en cliquant sur le lien suivant :', - 'reset_password_footer' => 'Si vous n\'avez pas effectué de demande de réinitalisation de mot de passe veuillez contacter notre support :' . CONTACT_EMAIL, - - // Payment page - 'secure_payment' => 'Paiement sécurisé', - 'card_number' => 'Numéro de carte', - 'expiration_month' => 'Mois d\'expiration', - 'expiration_year' => 'Année d\'expiration', - 'cvv' => 'CVV', - - // Security alerts - 'confide' => array( - 'too_many_attempts' => 'Trop de tentatives. Essayez à nouveau dans quelques minutes.', - 'wrong_credentials' => 'Courriel ou mot de passe incorrect', - 'confirmation' => 'Votre compte a été validé !', - 'wrong_confirmation' => 'Code de confirmation incorrect.', - 'password_forgot' => 'Les informations de réinitialisation de votre mot de passe vous ont été envoyées par courriel.', - 'password_reset' => 'Votre mot de passe a été modifié avec succès.', - 'wrong_password_reset' => 'Mot de passe incorrect. Veuillez réessayer', - ), - - // Pro Plan - 'pro_plan' => [ - 'remove_logo' => ':link pour supprimer le logo Invoice Ninja en souscrivant au plan pro', - 'remove_logo_link' => 'Cliquez ici', - ], - - 'logout' => 'Se déconnecter', - 'sign_up_to_save' => 'Connectez vous pour sauvegarder votre travail', - 'agree_to_terms' =>'J\'accepte les conditions d\'utilisation d\'Invoice ninja :terms', - 'terms_of_service' => 'Conditions d\'utilisation', - 'email_taken' => 'L\'adresse courriel existe déjà', - 'working' => 'En cours', - 'success' => 'Succès', - 'success_message' => 'Inscription réussie avec succès. Veuillez cliquer sur le lien dans le courriel de confirmation de compte pour vérifier votre adresse courriel.', - 'erase_data' => 'Cela supprimera vos données de façon permanente.', - 'password' => 'Mot de passe', - - 'pro_plan_product' => 'Plan Pro', - 'pro_plan_description' => 'Inscription d\'une durée d\'un an au Plan Pro d\'Invoice ninja', - 'pro_plan_success' => 'Merci pour votre inscription ! Une fois la facture réglée, votre adhésion au Plan Pro commencera.', - - 'unsaved_changes' => 'Vous avez des modifications non enregistrées', - 'custom_fields' => 'Champs personnalisés', - 'company_fields' => 'Champs de société', - 'client_fields' => 'Champs client', - 'field_label' => 'Nom du champ', - 'field_value' => 'Valeur du champ', - 'edit' => 'Éditer', - 'view_as_recipient' => 'Voir en tant que destinataire', - - // product management - 'product_library' => 'Inventaire', - 'product' => 'Produit', - 'products' => 'Produits', - 'fill_products' => 'Remplissage auto des produits', - 'fill_products_help' => 'La sélection d\'un produit entrainera la MAJ de la description et du prix', - 'update_products' => 'Mise à jour auto des produits', - 'update_products_help' => 'La mise à jour d\'une facture entraîne la mise à jour des produits', - 'create_product' => 'Nouveau produit', - 'edit_product' => 'Éditer Produit', - 'archive_product' => 'Archiver Produit', - 'updated_product' => 'Produit mis à jour', - 'created_product' => 'Produit créé', - 'archived_product' => 'Produit archivé', - 'pro_plan_custom_fields' => ':link pour activer les champs personnalisés en rejoingant le Plan Pro', - - 'advanced_settings' => 'Paramètres avancés', - 'pro_plan_advanced_settings' => ':link pour activer les paramètres avancés en rejoingant le Plan Pro', - 'invoice_design' => 'Modèle de facture', - 'specify_colors' => 'Spécifiez les couleurs', - 'specify_colors_label' => 'Sélectionnez les couleurs utilisés dans les factures', - - 'chart_builder' => 'Concepteur de graphiques', - 'ninja_email_footer' => 'Utilisez :site pour facturer vos clients et être payés en ligne gratuitement!', - 'go_pro' => 'Passez au Plan Pro', - - // Quotes - 'quote' => 'Devis', - 'quotes' => 'Devis', - 'quote_number' => 'Devis numéro', - 'quote_number_short' => 'Devis #', - 'quote_date' => 'Date du devis', - 'quote_total' => 'Montant du devis', - 'your_quote' => 'Votre devis', - 'total' => 'Total', - 'clone' => 'Dupliquer', - - 'new_quote' => 'Nouveau devis', - 'create_quote' => 'Créer un devis', - 'edit_quote' => 'Éditer le devis', - 'archive_quote' => 'Archiver le devis', - 'delete_quote' => 'Supprimer le devis', - 'save_quote' => 'Enregistrer le devis', - 'email_quote' => 'Envoyer le devis par courriel', - 'clone_quote' => 'Dupliquer le devis', - 'convert_to_invoice' => 'Convertir en facture', - 'view_invoice' => 'Nouvelle facture', - 'view_quote' => 'Voir le devis', - 'view_client' => 'Voir le client', - - 'updated_quote' => 'Devis mis à jour', - 'created_quote' => 'Devis créé', - 'cloned_quote' => 'Devis dupliqué avec succès', - 'emailed_quote' => 'Devis envoyé par courriel', - 'archived_quote' => 'Devis archivé', - 'archived_quotes' => ':count devis ont bien été archivés', - 'deleted_quote' => 'Devis supprimé', - 'deleted_quotes' => ':count devis ont bien été supprimés', - 'converted_to_invoice' => 'Le devis a bien été converti en facture', - - 'quote_subject' => 'Nouveau devis de :account', - 'quote_message' => 'Pour visionner votre devis de :amount, cliquez sur le lien ci-dessous.', - 'quote_link_message' => 'Pour visionner votre soumission, cliquez sur le lien ci-dessous:', - 'notification_quote_sent_subject' => 'Le devis :invoice a été envoyé à :client', - 'notification_quote_viewed_subject' => 'Le devis :invoice a été visionné par :client', - 'notification_quote_sent' => 'Le devis :invoice de :amount a été envoyé au client :client.', - 'notification_quote_viewed' => 'Le devis :invoice de :amount a été visioné par le client :client.', - - 'session_expired' => 'Votre session a expiré.', - - 'invoice_fields' => 'Champs de facture', - 'invoice_options' => 'Options de facturation', - 'hide_quantity' => 'Masquer la quantité', - 'hide_quantity_help' => 'Si la quantité de vos produits sont toujours 1, vous pouvez alors masquer la colonne "Quantité".', - 'hide_paid_to_date' => 'Masquer "Payé à ce jour"', - 'hide_paid_to_date_help' => 'Afficher seulement la ligne "Payé à ce jour"sur les factures pour lesquelles il y a au moins un paiement.', - - 'charge_taxes' => 'Taxe supplémentaire', - 'user_management' => 'Gestion des utilisateurs', - 'add_user' => 'Ajouter utilisateur', - 'send_invite' => 'Envoyer invitation', - 'sent_invite' => 'Invitation envoyés', - 'updated_user' => 'Utilisateur mis à jour', - 'invitation_message' => 'Vous avez été invité par :invitor. ', - 'register_to_add_user' => 'Veuillez vous enregistrer pour ajouter un utilisateur', - 'user_state' => 'État', - 'edit_user' => 'Éditer l\'utilisateur', - 'delete_user' => 'Supprimer l\'utilisateur', - 'active' => 'Actif', - 'pending' => 'En attente', - 'deleted_user' => 'Utilisateur supprimé', - 'limit_users' => 'Désolé, ceci excédera la limite de ' . MAX_NUM_USERS . ' utilisateurs', - - 'confirm_email_invoice' => 'Voulez-vous vraiment envoyer cette facture par courriel ?', - 'confirm_email_quote' => 'Voulez-vous vraiment envoyer ce devis par courriel ?', - 'confirm_recurring_email_invoice' => 'Les factures récurrentes sont activées, voulez-vous vraiment envoyer cette facture par courriel ?', - - 'cancel_account' => 'Supprimer le compte', - 'cancel_account_message' => 'Attention: Ceci supprimera de façon permanente toutes vos données; cette action est irréversible.', - 'go_back' => 'Retour', - - 'data_visualizations' => 'Visualisation des données', - 'sample_data' => 'Données fictives présentées', - 'hide' => 'Cacher', - 'new_version_available' => 'Une nouvelle version de :releases_link est disponible. Vous utilisez v:user_version, la plus récente est v:latest_version', - - - 'invoice_settings' => 'Paramètres des factures', - 'invoice_number_prefix' => 'Préfixe du numéro de facture', - 'invoice_number_counter' => 'Compteur du numéro de facture', - 'quote_number_prefix' => 'Préfixe du numéro de devis', - 'quote_number_counter' => 'Compteur du numéro de devis', - 'share_invoice_counter' => 'Partager le compteur de facture', - 'invoice_issued_to' => 'Facture destinée à', - 'invalid_counter' => 'Pour éviter un éventuel conflit, merci de définir un préfixe pour le numéro de facture ou pour le numéro de devis', - 'mark_sent' => 'Marquer comme envoyé', - - 'gateway_help_1' => ':link to sign up for Authorize.net.', - 'gateway_help_2' => ':link to sign up for Authorize.net.', - 'gateway_help_17' => ':link to get your PayPal API signature.', - 'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.', - 'gateway_help_27' => ':link to sign up for TwoCheckout.', - - 'more_designs' => 'Plus de modèles', - 'more_designs_title' => 'Modèles de factures additionnels', - 'more_designs_cloud_header' => 'Passez au Plan Pro pour plus de modèles', - 'more_designs_cloud_text' => '', - 'more_designs_self_host_header' => 'Obtenez 6 modèles de factures additionnels pour seulement '.INVOICE_DESIGNS_PRICE.'$', - 'more_designs_self_host_text' => '', - 'buy' => 'Acheter', - 'bought_designs' => 'Les nouveaux modèles ont été ajoutés avec succès', - - 'sent' => 'envoyé', - 'timesheets' => 'Feuilles de temps', - - 'payment_title' => 'Enter Your Billing Address and Credit Card information', - 'payment_cvv' => '*This is the 3-4 digit number onthe back of your card', - 'payment_footer1' => '*Billing address must match address associated with credit card.', - 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - 'vat_number' => 'Numéro de TVA', - - 'id_number' => 'Numéro ID', - 'white_label_link' => 'Marque blanche', - 'white_label_text' => 'Pour retirer la marque Invoice Ninja en haut de la page client, achetez un licence en marque blanche de '.WHITE_LABEL_PRICE.'$.', - 'white_label_header' => 'White Label', - 'bought_white_label' => 'Successfully enabled white label license', - 'white_labeled' => 'White labeled', - - 'restore' => 'Restaurer', - 'restore_invoice' => 'Restaurer la facture', - 'restore_quote' => 'Restaurer le devis', - 'restore_client' => 'Restaurer le client', - 'restore_credit' => 'Restaurer le crédit', - 'restore_payment' => 'Restaurer le paiement', - - 'restored_invoice' => 'Facture restaurée avec succès', - 'restored_quote' => 'Devis restauré avec succès', - 'restored_client' => 'Client restauré avec succès', - 'restored_payment' => 'Paiement restauré avec succès', - 'restored_credit' => 'Crédit restauré avec succès', - - 'reason_for_canceling' => 'Aidez nous à améliorer notre site en nous disant pourquoi vous partez.', - 'discount_percent' => 'Pourcent', - 'discount_amount' => 'Montant', - - 'invoice_history' => 'Historique des factures', - 'quote_history' => 'Historique des devis', - 'current_version' => 'Version courante', - 'select_versiony' => 'Choix de la verison', - 'view_history' => 'Consulter l\'historique', - - 'edit_payment' => 'Edit Payment', - 'updated_payment' => 'Successfully updated payment', - 'deleted' => 'Deleted', - 'restore_user' => 'Restore User', - 'restored_user' => 'Successfully restored user', - 'show_deleted_users' => 'Show deleted users', - 'email_templates' => 'Email Templates', - 'invoice_email' => 'Invoice Email', - 'payment_email' => 'Payment Email', - 'quote_email' => 'Quote Email', - 'reset_all' => 'Reset All', - 'approve' => 'Approve', - - 'token_billing_type_id' => 'Token Billing', - 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', - 'token_billing_1' => 'Disabled', - 'token_billing_2' => 'Opt-in - checkbox is shown but not selected', - 'token_billing_3' => 'Opt-out - checkbox is shown and selected', - 'token_billing_4' => 'Always', - 'token_billing_checkbox' => 'Store credit card details', - 'view_in_stripe' => 'View in Stripe', - 'use_card_on_file' => 'Use card on file', - 'edit_payment_details' => 'Edit payment details', - 'token_billing' => 'Save card details', - 'token_billing_secure' => 'The data is stored securely by :stripe_link', - - 'support' => 'Support', - 'contact_information' => 'Contact information', - '256_encryption' => '256-Bit Encryption', - 'amount_due' => 'Amount due', - 'billing_address' => 'Billing address', - 'billing_method' => 'Billing method', - 'order_overview' => 'Order overview', - 'match_address' => '*Address must match address associated with credit card.', - 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - - 'default_invoice_footer' => 'Set default invoice footer', - 'invoice_footer' => 'Invoice footer', - 'save_as_default_footer' => 'Save as default footer', - - 'token_management' => 'Token Management', - 'tokens' => 'Tokens', - 'add_token' => 'Add Token', - 'show_deleted_tokens' => 'Show deleted tokens', - 'deleted_token' => 'Successfully deleted token', - 'created_token' => 'Successfully created token', - 'updated_token' => 'Successfully updated token', - 'edit_token' => 'Edit Token', - 'delete_token' => 'Delete Token', - 'token' => 'Token', - - 'add_gateway' => 'Add Gateway', - 'delete_gateway' => 'Delete Gateway', - 'edit_gateway' => 'Edit Gateway', - 'updated_gateway' => 'Successfully updated gateway', - 'created_gateway' => 'Successfully created gateway', - 'deleted_gateway' => 'Successfully deleted gateway', - 'pay_with_paypal' => 'PayPal', - 'pay_with_card' => 'Credit card', - - 'change_password' => 'Change password', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'confirm_password' => 'Confirm password', - 'password_error_incorrect' => 'The current password is incorrect.', - 'password_error_invalid' => 'The new password is invalid.', - 'updated_password' => 'Successfully updated password', - - 'api_tokens' => 'API Tokens', - 'users_and_tokens' => 'Users & Tokens', - 'account_login' => 'Account Login', - 'recover_password' => 'Recover your password', - 'forgot_password' => 'Forgot your password?', - 'email_address' => 'Email address', - 'lets_go' => 'Let’s go', - 'password_recovery' => 'Password Recovery', - 'send_email' => 'Send email', - 'set_password' => 'Set Password', - 'converted' => 'Converted', - - -); \ No newline at end of file diff --git a/app/lang/fr/validation.php b/app/lang/fr/validation.php deleted file mode 100644 index bb337904f75c..000000000000 --- a/app/lang/fr/validation.php +++ /dev/null @@ -1,138 +0,0 @@ - "Le champ :attribute doit être accepté.", - "active_url" => "Le champ :attribute n'est pas une URL valide.", - "after" => "Le champ :attribute doit être une date postérieure au :date.", - "alpha" => "Le champ :attribute doit seulement contenir des lettres.", - "alpha_dash" => "Le champ :attribute doit seulement contenir des lettres, des chiffres et des tirets.", - "alpha_num" => "Le champ :attribute doit seulement contenir des chiffres et des lettres.", - "array" => "Le champ :attribute doit être un tableau.", - "before" => "Le champ :attribute doit être une date antérieure au :date.", - "between" => array( - "numeric" => "La valeur de :attribute doit être comprise entre :min et :max.", - "file" => "Le fichier :attribute doit avoir une taille entre :min et :max kilobytes.", - "string" => "Le texte :attribute doit avoir entre :min et :max caractères.", - "array" => "Le champ :attribute doit avoir entre :min et :max éléments." - ), - "confirmed" => "Le champ de confirmation :attribute ne correspond pas.", - "date" => "Le champ :attribute n'est pas une date valide.", - "date_format" => "Le champ :attribute ne correspond pas au format :format.", - "different" => "Les champs :attribute et :other doivent être différents.", - "digits" => "Le champ :attribute doit avoir :digits chiffres.", - "digits_between" => "Le champ :attribute doit avoir entre :min and :max chiffres.", - "email" => "Le champ :attribute doit être une adresse email valide.", - "exists" => "Le champ :attribute sélectionné est invalide.", - "image" => "Le champ :attribute doit être une image.", - "in" => "Le champ :attribute est invalide.", - "integer" => "Le champ :attribute doit être un entier.", - "ip" => "Le champ :attribute doit être une adresse IP valide.", - "max" => array( - "numeric" => "La valeur de :attribute ne peut être supérieure à :max.", - "file" => "Le fichier :attribute ne peut être plus gros que :max kilobytes.", - "string" => "Le texte de :attribute ne peut contenir plus de :max caractères.", - "array" => "Le champ :attribute ne peut avoir plus de :max éléments.", - ), - "mimes" => "Le champ :attribute doit être un fichier de type : :values.", - "min" => array( - "numeric" => "La valeur de :attribute doit être supérieure à :min.", - "file" => "Le fichier :attribute doit être plus que gros que :min kilobytes.", - "string" => "Le texte :attribute doit contenir au moins :min caractères.", - "array" => "Le champ :attribute doit avoir au moins :min éléments." - ), - "not_in" => "Le champ :attribute sélectionné n'est pas valide.", - "numeric" => "Le champ :attribute doit contenir un nombre.", - "regex" => "Le format du champ :attribute est invalide.", - "required" => "Le champ :attribute est obligatoire.", - "required_if" => "Le champ :attribute est obligatoire quand la valeur de :other est :value.", - "required_with" => "Le champ :attribute est obligatoire quand :values est présent.", - "required_with_all" => "Le champ :attribute est obligatoire quand :values est présent.", - "required_without" => "Le champ :attribute est obligatoire quand :values n'est pas présent.", - "required_without_all" => "Le champ :attribute est requis quand aucun de :values n'est présent.", - "same" => "Les champs :attribute et :other doivent être identiques.", - "size" => array( - "numeric" => "La valeur de :attribute doit être :size.", - "file" => "La taille du fichier de :attribute doit être de :size kilobytes.", - "string" => "Le texte de :attribute doit contenir :size caractères.", - "array" => "Le champ :attribute doit contenir :size éléments." - ), - "unique" => "La valeur du champ :attribute est déjà utilisée.", - "url" => "Le format de l'URL de :attribute n'est pas valide.", - - "positive" => "The :attribute must be greater than zero.", - "has_credit" => "The client does not have enough credit.", - "notmasked" => "The values are masked", - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => array( - 'attribute-name' => array( - 'rule-name' => 'custom-message', - ), - ), - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => array( - "name" => "Nom", - "username" => "Pseudo", - "email" => "E-mail", - "first_name" => "Prénom", - "last_name" => "Nom", - "password" => "Mot de passe", - "password_confirmation" => "Confirmation du mot de passe", - "city" => "Ville", - "country" => "Pays", - "address" => "Adresse", - "phone" => "Téléphone", - "mobile" => "Portable", - "age" => "Age", - "sex" => "Sexe", - "gender" => "Genre", - "day" => "Jour", - "month" => "Mois", - "year" => "Année", - "hour" => "Heure", - "minute" => "Minute", - "second" => "Seconde", - "title" => "Titre", - "content" => "Contenu", - "description" => "Description", - "excerpt" => "Extrait", - "date" => "Date", - "time" => "Heure", - "available" => "Disponible", - "size" => "Taille" - ), - -); diff --git a/app/lang/it/pagination.php b/app/lang/it/pagination.php deleted file mode 100644 index f1e10a7b10e1..000000000000 --- a/app/lang/it/pagination.php +++ /dev/null @@ -1,20 +0,0 @@ - '« Precedente', - - 'next' => 'Successivo »', - -); \ No newline at end of file diff --git a/app/lang/it/public.php b/app/lang/it/public.php deleted file mode 100644 index 7f5ecb9008e2..000000000000 --- a/app/lang/it/public.php +++ /dev/null @@ -1,209 +0,0 @@ - 'Free Open-Source Online Invoicing', - 'description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - 'invoice_now' => 'Invoice Now', - 'no_signup_needed' => 'No signup needed', - - 'link_blog' => 'Blog', - 'link_about_us' => 'About Us', - 'link_contact_us' => 'Contact Us', - 'link_features' => 'Features', - 'link_plans' => 'Plans', - 'link_compare' => 'Compare', - 'link_testimonials' => 'Testimonials', - 'link_faq' => 'FAQ', - - 'my_account' => 'My Account', - 'login' => 'Login', - 'connect_with_us' => 'Connect with Us', - 'safe_and_secure' => 'Safe & Secure', - 'toggle_navigation' => 'Toggle navigation', - - - 'home' => [ - 'header' => 'THE SIMPLE & FREE WAY TO INVOICE CLIENTS', - 'sub_header' => 'It\'s just that easy. Stop spending time on complicated and expensive invoicing.
    No fuss, just get started and get paid.', - 'footer' => 'Simple, Intuitive Invoicing,Anywhere.', - - 'free_always' => 'Free, Always', - 'free_always_text' => 'Send unlimited invoices to 500 clients per month and never pay a dime. You are welcome to unlock still more awesome features with our Pro Plan, but our free app is a top-notch product that will do everything you need it to do, without any subscription or fees.', - - 'open_source' => 'Open-Source', - 'open_source_text' => 'No mysterious corporate silos here! Just full source code transparency and a devotion to working with anyone interested to build a better electronic invoicing platform. We even offer a handy zip download for a self-hosted version of Invoice Ninja.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text' => 'See how your edited invoice will look as a print-friendly pdf while you make the changes. Our pdf generator works in real time as you make your changes. You can even preview four beautiful preset designs. Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text' => 'Invoices sent with our app integrate seamlessly with the gateway credit card processor of your choice, to make it super easy for your clients to send you money with just a few clicks. We play nicely with Authorize.Net, Stripe, PayPal and loads more - 23 in all!', - ], - - 'about' => [ - 'header' => 'About Invoice Ninja', - 'what_is' => 'What is Invoice Ninja?', - - 'team_ninja' => 'Team Ninja', - 'team_ninja_text' => 'Invoice Ninja is managed by a team of seasoned web workers. We launched in early 2014 and have been thrilled by the enthusiastic response we’ve received from our growing community of users.', - - 'co_founder' => 'Co-Founder', - 'ceo' => 'CEO', - 'cto' => '', - 'designer' => 'Designer', - 'marketing' => 'Marketing', - - 'shalom_bio' => 'Shalom has specialized in small business development for nearly 10 years. In addition to InvoiceNinja.com Shalom is CEO of a leading tour agency in Israel.', - 'hillel_bio' => 'Hillel has been developing enterprise applications for 15 years. His open-source AutoComplete component has been used by thousands of developers around the world.', - 'razi_bio' => 'Razi is a pixel nerd with a great deal of experience in design for web sites and applications. When she isn\'t busy with InvoiceNinja she runs a small web agency in Stockholm called kantorp-wegl.in', - 'ben_bio' => 'A veteran digital marketer and content strategist, Ben specializes in building communities around brands that make business easier for freelancers, SMBs and micro-entrepreneurs.', - ], - - 'contact' => [ - 'header' => 'Questions, special requests, or just want to say hi?', - 'sub_header' => 'Fill in the form below and we\'ll get back to you as soon as possible. Hope to hear from you!', - 'other_ways' => 'Other ways to reach us', - - 'name' => 'Name', - 'name_help' => 'Please enter your name.', - - 'email' => 'Email Address', - 'email_help' => 'Please enter a valid e-mail address.', - - 'message' => 'Message', - 'message_help' => 'Please enter a message.', - 'send_message' => 'Send Message', - ], - - 'features' => [ - 'header' => 'The Features', - 'footer' => 'Like what you see?', - 'footer_action' => 'Get started today!', - - 'open_source' => 'Open Source Platform', - 'open_source_text1' => 'Set the code free! Here at Invoice Ninja, we’re all about creating the best possible app, and inviting scrutiny via full code transparency is a central manifestation of this value.', - 'open_source_text2' => 'We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.', - - 'free_forever' => 'FREE. Forever.', - 'free_forever_text1' => 'Yeah, you read that correctly. You don’t have to pay us a cent to use our tools. We know how tough it is to make ends meet as a web-based business, and we’re bent on providing a top-notch product that will do everything you need it to do, without any subscription or opt-in fees.', - 'free_forever_text2' => 'Try Invoice Ninja out. You literally have nothing to lose. We’re confident that you’ll find the experience so positive that you’ll never need to turn elsewhere.', - - 'secure' => 'Secure & Private', - 'secure_text1' => 'Invoice Ninja has been built from the ground up to keep your data safe. Only you have access to your login & accounting details, & we will never share your transaction data to any third party.', - 'secure_text2' => 'Our website operates with 256-bit encryption, which is even more secure than most banking websites. Invoice Ninja uses the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. We feel safe here and have invested heavily in measures to ensure that you do too.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text1' => 'With Invoice Ninja, we’ve done away with the need for cumbersome multi-click invoice previewing after each save.', - 'live_pdf_text2' => 'When you enter the details of your customer and/or invoice in our editor, you can instantly see the results in the pdf preview pane below. Want to see what your invoice would look like in a different layout style? The live pdf can show you four beautiful preset styles in real time too.', - 'live_pdf_text3' => 'Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text1' => 'Invoice Ninja seamlessly integrates with all of the top internet payment processors and gateways so you can get paid for your work quickly and easily.', - 'online_payments_text2' => 'Invoices created with our tools aren’t just for bookkeeping purposes - they bring in the Benjamins. We also make it super easy to choose the right gateway for the specific needs of your business and are happy to help you to get started working with the gateway of your choice. What’s more, we’re constantly working on rolling out additional gateway integrations, so if you don’t see the one you use here, just let us know, and there’s a good chance we’ll add it for you.', - ], - - 'plans' => [ - 'header' => 'The Plans', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - 'pro_plan' => 'Pro Plan', - - 'go_pro' => 'Go Pro to Unlock Premium Invoice Ninja Features', - 'go_pro_text' => 'We believe that the free version of Invoice Ninja is a truly awesome product loaded with the key features you need to bill your clients electronically. But for those who crave still more Ninja awesomeness, we\'ve unmasked the Invoice Ninja Pro plan, which offers more versatility, power and customization options for just $50 per year.', - - 'number_clients' => 'Number of clients per account', - 'unlimited_invoices' => 'Unlimited client invoices', - 'company_logo' => 'Add your company logo', - 'live_pdf' => 'Live .PDF invoice creation', - 'four_templates' => '4 beautiful invoice templates', - 'payments' => 'Accept credit card payments', - 'additional_templates' => 'Additional invoice templates', - 'multi_user' => 'Multi-user support', - 'quotes' => 'Quotes/pro-forma invoices', - 'advanced_settings' => 'Advanced invoice settings', - 'data_vizualizations' => 'Dynamic data vizualizations', - 'email_support' => 'Priority email support', - 'remove_created_by' => 'Remove "Created by Invoice Ninja"', - 'latest_features' => 'Latest and greatest features', - 'pricing' => 'Pricing', - 'free_always' => 'Free /Always!', - 'year_price' => '$50 /Year', - ], - - 'compare' => [ - 'header' => 'How We Compare', - 'free_plan_comparison' => 'Free Plan Comparison', - 'paid_plan_comparison' => 'Paid Plan Comparison', - 'app' => 'App', - 'cost' => 'Cost', - 'clients' => 'Clients', - 'invoices' => 'Invoices', - 'payment_gateways' => 'Payment Gateways', - 'custom_logo' => 'Custom Logo', - 'multiple_templates' => 'Multiple Templates', - 'recurring_payments' => 'Recurring Payments', - 'open_source' => 'Open Source', - 'per_month' => 'per month', - 'per_year' => 'per year', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - ], - - 'testimonials' => [ - 'testimonials' => 'testimonials', - 'header' => 'Since we launched Invoice Ninja in March of 2014, we\'ve been overwhelmed by a deluge of user love. Here\'s a small taste of the glowing things people have to say about the great experiences the\'ve been having with our free e-invoicing app!', - ], - - 'faq' => [ - 'header' => 'The FAQs', - - 'question1' => 'I know it isn’t standard ninja practice to reveal too many identity details, but who are you guys exactly?', - 'answer1' => 'We’re a small team of highly skilled digital journeymen based in Israel. We love open source, we love disrupting the big business status quo, and we love building helpful tools that are easy to use. We believe that everyone else’s web-based cash flow tools are unnecessarily expensive, clunky and complicated - and we’re bent on proving these beliefs with Invoice Ninja.', - - 'question2' => 'How do I get started using Invoice Ninja?', - 'answer2' => 'Just click on the big, yellow "Invoice Now" button on our homepage!', - - 'question3' => 'Do you offer customer support?', - 'answer3' => 'We sure do. Support is super important to us. Feel free to email us at support@invoiceninja.com with any questions you might have. We almost always reply within one business day.', - - 'question4' => 'Is Invoice Ninja really free? For how long?', - 'answer4' => 'Yes, our basic app is 100% free. Forever and ever. For real. We also offer a paid Pro version of Invoice Ninja (you can learn all about its awesome features here), but it\'s important to us that the free version have all of the key features people need to do business.', - - 'question5' => 'How is Invoice Ninja able to offer this all for free? How are you making any money?', - 'answer5' => 'We’re mostly in this line of work because we believe it’s high time that a good electronic invoicing tool be available for free. There isn’t much money in it - yet. We do offer a paid Pro version of the app that we\'ve souped up with premium features. And when our users open up new accounts with payment processor gateways by clicking on links from our site, we make modest commissions as a gateway affiliate. So if zillions of freelancers and small businesses start running credit card charges through Invoice Ninja, or if scores of users go Pro, there’s a decent chance we\'ll recover our investment.', - - 'question6' => 'Really? So does that mean you’re not collecting information about me so you can sell me stuff or so that some other company can spam me according to my interests?', - 'answer6' => 'No way. We’re not mining your data, and we’re not selling you out. That wouldn’t be very ninja of us, would it?', - - 'question7' => 'But don’t you have access to my merchant and banking accounts?', - 'answer7' => 'Actually, we don’t. When you link an account at a third party financial institution with your Invoice Ninja account, you’re essentially giving our app permission to send money to you and nothing more. This is all managed by the tech teams at your financial service providers, who go to great lengths to ensure their integrations can’t be exploited or abused.', - - 'question8' => 'Given that Invoice Ninja is an open source app, how can I be sure that my financial information is safe with you?', - 'answer8' => 'There\'s a big difference between “open source" and “open data.†Anyone who wants to use the code that drives Invoice Ninja to create their own products or to make improvements to ours can do so. It’s available for anyone who wants to download and work with. But that’s just the source code - totally separate from what happens with that code on the Invoice Ninja servers. You’re the only one who has full access to what you\'re doing with our product. For more details on the security of our servers and how we handle our users\' information, please read the next question.', - - 'question9' => 'So just how secure is this app?', - 'answer9' => 'Extremely. Data uploaded by our users runs through connections with 256-bit encryption, which is twice as many encryption bits that most bank websites use. We use the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. It’s fancy stuff that we put in place to make sure no one can gain access to your information except you.', - - 'question10' => 'How do I remove the small "Created by Invoice Ninja†image from the bottom of my invoices?', - 'answer10' => 'The amazingly affordable Pro version of Invoice Ninja allows you to do this and oh so much more.', - - 'question11' => 'Can I see what the application looks like with sample data?', - 'answer11' => 'Sure, click here to try out our demo account.', - - 'question12' => 'I hear that there\'s a version of Invoice Ninja that I can install myself on my own servers? Where can I learn more about this?', - 'answer12' => 'The rumors are true! Full instructions are available here.', - - 'question13' => 'I\'m seeing the options to assign various statuses to my invoices, clients, credits and payments. What\'s the difference between "active," "archived" and "deleted"?', - 'answer13' => 'These three handy statuses for invoices, clients, credits and payments allow you to keep your own cash flow management as straightforward and accessible as possible from your Invoice Ninja dashboard. None of these statuses will actually purge any records from your account - even "deleted" can always be recovered at any point in the future. "Active" means the record will appear in the relevant queue of records. To stash a record away so it\'s still fully operational but no longer cluttering up your interface, simply set it to be "archived." To deactivate a record and render it inaccessible to your clients, mark it "deleted."', - - 'question14' => 'My question wasn\'t covered by any of the content on this FAQ page. How can I get in touch with you?', - 'answer14' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - 'miss_something' => 'Did we miss something?', - 'miss_something_text' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - ], - - -]; \ No newline at end of file diff --git a/app/lang/it/reminders.php b/app/lang/it/reminders.php deleted file mode 100644 index a7ea42a5a159..000000000000 --- a/app/lang/it/reminders.php +++ /dev/null @@ -1,24 +0,0 @@ - "Le password devono essere di almeno 6 caratteri e devono coincidere.", - - "user" => "Non esiste un utente associato a questo indirizzo e-mail.", - - "token" => "Questo token per la reimpostazione della password non è valido.", - - "sent" => "Promemoria della password inviato!", - -); diff --git a/app/lang/it/texts.php b/app/lang/it/texts.php deleted file mode 100644 index b3c96be0a247..000000000000 --- a/app/lang/it/texts.php +++ /dev/null @@ -1,576 +0,0 @@ - 'Organizzazione', - 'name' => 'Nome', - 'website' => 'Sito web', - 'work_phone' => 'Telefono', - 'address' => 'Indirizzo', - 'address1' => 'Via', - 'address2' => 'Appartamento/Piano', - 'city' => 'Città', - 'state' => 'Stato/Provincia', - 'postal_code' => 'Codice postale', /* CAP */ - 'country_id' => 'Paese', - 'contacts' => 'Contatti', - 'first_name' => 'Nome', - 'last_name' => 'Cognome', - 'phone' => 'Telefono', - 'email' => 'Email', - 'additional_info' => 'Maggiori informazioni', - 'payment_terms' => 'Condizioni di pagamento', - 'currency_id' => 'Valuta', - 'size_id' => 'Dimensione', - 'industry_id' => 'Industria', - 'private_notes' => 'Note Personali', - - // invoice - 'invoice' => 'Fattura', - 'client' => 'Cliente', - 'invoice_date' => 'Data Fattura', - 'due_date' => 'Scadenza Fattura', - 'invoice_number' => 'Numero Fattura', - 'invoice_number_short' => 'Fattura #', /* Fattura N° */ - 'po_number' => 'Numero d\'ordine d\'acquisto', - 'po_number_short' => 'Ordine d\'acquisto #', /* Ordine d'acquisto N° */ - 'frequency_id' => 'Frequenza', - 'discount' => 'Sconto', - 'taxes' => 'Tasse', - 'tax' => 'Tassa', - 'item' => 'Articolo', - 'description' => 'Descrizione', - 'unit_cost' => 'Costo Unitario', - 'quantity' => 'Quantità', - 'line_total' => 'Totale Riga', - 'subtotal' => 'Subtotale', - 'paid_to_date' => 'Pagato in Data', - 'balance_due' => 'Saldo Dovuto', - 'invoice_design_id' => 'Stile', - 'terms' => 'Condizioni', - 'your_invoice' => 'Tua Fattura', - - 'remove_contact' => 'Rimuovi contatto', - 'add_contact' => 'Aggiungi contatto', - 'create_new_client' => 'Crea nuovo cliente', - 'edit_client_details' => 'Modifica dati cliente', - 'enable' => 'Abilita', - 'learn_more' => 'Scopri di più', - 'manage_rates' => 'Gestisci tassi', - 'note_to_client' => 'Nota al cliente', - 'invoice_terms' => 'Termini della fattura', - 'save_as_default_terms' => 'Salva termini come predefiniti', /* Imposta termini come predefiniti */ - 'download_pdf' => 'Scarica PDF', - 'pay_now' => 'Paga Adesso', /* Paga Ora */ - 'save_invoice' => 'Salva Fattura', - 'clone_invoice' => 'Duplica Fattura', - 'archive_invoice' => 'Archivia Fattura', - 'delete_invoice' => 'Elimina Fattura', - 'email_invoice' => 'Manda Fattura', /* Spedisci Fattura */ - 'enter_payment' => 'Inserisci Pagamento', - 'tax_rates' => 'Aliquote Fiscali', /* ^^Unsure^^ */ - 'rate' => 'Aliquota', /* ^^Unsure^^ */ - 'settings' => 'Impostazioni', - 'enable_invoice_tax' => 'Abilita la specifica di aliquote fiscali', /* ^^Unsure^^ */ - 'enable_line_item_tax' => 'Abilita la specifica di aliquote di voci di bilancio', /* ^^Unsure^^ */ - - // navigation - 'dashboard' => 'Cruscotto', /* Pannello */ - 'clients' => 'Clienti', - 'invoices' => 'Fatture', - 'payments' => 'Pagamenti', - 'credits' => 'Crediti', - 'history' => 'Storia', /* Cronologia */ - 'search' => 'Cerca', /* Cerca */ - 'sign_up' => 'Registrati', - 'guest' => 'Ospite', - 'company_details' => 'Dettagli Azienda', - 'online_payments' => 'Pagamenti Online', - 'notifications' => 'Notifiche', - 'import_export' => 'Importa/Esporta', - 'done' => 'Fatto', - 'save' => 'Salva', - 'create' => 'Crea', - 'upload' => 'Carica', - 'import' => 'Importa', - 'download' => 'Scarica', - 'cancel' => 'Annulla', - 'close' => 'Close', - 'provide_email' => 'Per favore, fornisci un indirizzo Email valido', - 'powered_by' => 'Powered by', /* Realizzato da */ - 'no_items' => 'Nessun articolo', - - // recurring invoices - 'recurring_invoices' => 'Fatture ricorrenti', - 'recurring_help' => '

    Invia automaticamente al cliente le stesse fatture settimanalmente, bimestralmente, mensilmente, trimestralmente o annualmente.

    -

    Usa :MESE, :TRIMESRE o :ANNO per date dinamiche. Funziona anche con la matematica di base, ad esempio :MESE-1.

    -

    Esempi di variabili di fattura dinamiche:

    -
      -
    • "Iscrizione palestra per il mese di :MESE" => "Iscrizione palestra per il mese di Luglio"
    • -
    • ":ANNO+1 iscrizione annuale" => "Anno d\'iscrizione 2015"
    • -
    • "Pagamento fermo a :TRIMESTRE+1" => "Pagamento fermo al 2° trimestre"
    • -
    ', /* ^^Variables translated in case you'll need it for front end^^ */ - - // dashboard - 'in_total_revenue' => 'di fatturato', - 'billed_client' => 'Cliente fatturato', - 'billed_clients' => 'Clienti fatturati', - 'active_client' => 'cliente attivo', - 'active_clients' => 'clienti attivi', - 'invoices_past_due' => 'Fatture Insolute', /* Insoluti */ - 'upcoming_invoices' => 'Prossime fatture', - 'average_invoice' => 'Fattura media', - - // list pages - 'archive' => 'Archivia', - 'delete' => 'Elimina', - 'archive_client' => 'Archivia cliente', - 'delete_client' => 'Elimina cliente', - 'archive_payment' => 'Archivia pagamento', - 'delete_payment' => 'Elimina pagamento', - 'archive_credit' => 'Archivia credito', - 'delete_credit' => 'Elimina credito', - 'show_archived_deleted' => 'Mostra Archiviati/eliminati', - 'filter' => 'Filtra', - 'new_client' => 'Nuovo Cliente', - 'new_invoice' => 'Nuova Fattura', - 'new_payment' => 'Nuovo Pagamento', - 'new_credit' => 'Nuovo Credito', - 'contact' => 'Contatto', - 'date_created' => 'Data di Creazione', - 'last_login' => 'Ultimo Accesso', - 'balance' => 'Saldo', - 'action' => 'Azione', - 'status' => 'Stato', - 'invoice_total' => 'Totale Fattura', - 'frequency' => 'Frequenza', - 'start_date' => 'Data Inizio', - 'end_date' => 'Data Fine', - 'transaction_reference' => 'Riferimento Transazione', - 'method' => 'Metodo', - 'payment_amount' => 'Importo Pagamento', - 'payment_date' => 'Data Pagamento', - 'credit_amount' => 'Importo Credito', - 'credit_balance' => 'Saldo Credito', - 'credit_date' => 'Data Credito', - 'empty_table' => 'Nessun dato disponibile nella tabella', - 'select' => 'Seleziona', - 'edit_client' => 'Modifica Cliente', - 'edit_invoice' => 'Modifica Fattura', - - // client view page - 'create_invoice' => 'Crea Fattura', - 'enter_credit' => 'Inserisci Credito', - 'last_logged_in' => 'Ultimo accesso', - 'details' => 'Dettagli', - 'standing' => 'Fermo', - 'credit' => 'Credito', - 'activity' => 'Attività', - 'date' => 'Data', - 'message' => 'Messaggio', - 'adjustment' => 'Correzione', - 'are_you_sure' => 'Sei sicuro?', - - // payment pages - 'payment_type_id' => 'Tipo di Pagamento', - 'amount' => 'Importo', - - // account/company pages - 'work_email' => 'Email', - 'language_id' => 'Lingua', - 'timezone_id' => 'Fuso Orario', - 'date_format_id' => 'Formato data', - 'datetime_format_id' => 'Formato Data/Ora', - 'users' => 'Utenti', - 'localization' => 'Localizzazione', - 'remove_logo' => 'Rimuovi logo', - 'logo_help' => 'Supportati: JPEG, GIF e PNG. Altezza raccomandata: 120px', - 'payment_gateway' => 'Servizi di Pagamento', - 'gateway_id' => 'Piattaforma', - 'email_notifications' => 'Notifiche Email', - 'email_sent' => 'Mandami un\'email quando una fattura è inviata', - 'email_viewed' => 'Mandami un\'email quando una fattura è visualizzata', - 'email_paid' => 'Mandami un\'email quando una fattura è pagata', - 'site_updates' => 'Aggiornamenti Sito', - 'custom_messages' => 'Messaggi Personalizzati', - 'default_invoice_terms' => 'Salva termini come predefiniti', - 'default_email_footer' => 'Salva firma email come predefinita', - 'import_clients' => 'Importa Dati Clienti', - 'csv_file' => 'Seleziona file CSV', - 'export_clients' => 'Esporta Dati Clienti', - 'select_file' => 'Seleziona un file, per favore', - 'first_row_headers' => 'Usa la prima riga come Intestazione', - 'column' => 'Colonna', - 'sample' => 'Esempio', - 'import_to' => 'Importa in', - 'client_will_create' => 'il cliente sarà creato', - 'clients_will_create' => 'i clienti saranno creati', - - // application messages - 'created_client' => 'Cliente creato con successo', - 'created_clients' => ':count clienti creati con successo', - 'updated_settings' => 'Impostazioni aggiornate con successo', - 'removed_logo' => 'Logo rimosso con successo', - 'sent_message' => 'Messaggio inviato con successo', - 'invoice_error' => 'Per favore, assicurati di aver selezionato un cliente e correggi tutti gli errori', - 'limit_clients' => 'Ci dispiace, questo supererà il limite di :count clienti', - 'payment_error' => 'C\'è stato un errore durante il pagamento. Riprova più tardi, per favore.', - 'registration_required' => 'Per favore, registrati per inviare una fattura', - 'confirmation_required' => 'Per favore, conferma il tuo indirizzo email', - - 'updated_client' => 'Cliente aggiornato con successo', - 'created_client' => 'Cliente creato con successo', - 'archived_client' => 'Cliente archiviato con successo', - 'archived_clients' => ':count clienti archiviati con successo', - 'deleted_client' => 'Cliente eliminato con successo', - 'deleted_clients' => ':count clienti eliminati con successo', - - 'updated_invoice' => 'Fattura aggiornata con successo', - 'created_invoice' => 'Fattura creata con successo', - 'cloned_invoice' => 'Fattura duplicata con successo', - 'emailed_invoice' => 'Fattura inviata con successo', - 'and_created_client' => 'e cliente creato', - 'archived_invoice' => 'Fattura archiviata con successo', - 'archived_invoices' => ':count fatture archiviate con successo', - 'deleted_invoice' => 'Fattura eliminata con successo', - 'deleted_invoices' => ':count fatture eliminate con successo', - - 'created_payment' => 'Pagamento creato con successo', - 'archived_payment' => 'Pagamento archiviato con successo', - 'archived_payments' => ':count pagamenti archiviati con successo', - 'deleted_payment' => 'Pagamenti eliminati con successo', - 'deleted_payments' => ':count pagamenti eliminati con successo', - 'applied_payment' => 'Pagamento applicato con successo', - - 'created_credit' => 'Credito creato con successo', - 'archived_credit' => 'Credito archiviato con successo', - 'archived_credits' => ':count crediti archiviati con successo', - 'deleted_credit' => 'Credito eliminato con successo', - 'deleted_credits' => ':count crediti eliminati con successo', - - // Emails - 'confirmation_subject' => 'Conferma Account Invoice Ninja', - 'confirmation_header' => 'Conferma Account', - 'confirmation_message' => 'Per favore, accedi al link qui sotto per confermare il tuo account.', - 'invoice_subject' => 'Nuova fattura da :account', - 'invoice_message' => 'Per visualizzare la tua fattura di :amount, clicca sul link qui sotto.', - 'payment_subject' => 'Pagamento Ricevuto', - 'payment_message' => 'Grazie per il tuo pagamento di :amount.', - 'email_salutation' => 'Caro :name,', - 'email_signature' => 'Distinti saluti,', - 'email_from' => 'Il Team di InvoiceNinja', - 'user_email_footer' => 'Per modificare le impostazioni di notifiche via email per favore accedi a: '.SITE_URL.'/company/notifications', - 'invoice_link_message' => 'Per visualizzare la tua fattura del cliente clicca sul link qui sotto:', - 'notification_invoice_paid_subject' => 'La fattura :invoice è stata pagata da :client', - 'notification_invoice_sent_subject' => 'La fattura :invoice è stata inviata a :client', - 'notification_invoice_viewed_subject' => 'La fattura :invoice è stata visualizzata da :client', - 'notification_invoice_paid' => 'Un pagamento di :amount è stato effettuato dal cliente :client attraverso la fattura :invoice.', - 'notification_invoice_sent' => 'Al seguente cliente :client è stata inviata via email la fattura :invoice di :amount.', - 'notification_invoice_viewed' => 'Il seguente cliente :client ha visualizzato la fattura :invoice di :amount.', - 'reset_password' => 'Puoi resettare la password del tuo account cliccando sul link qui sotto:', - 'reset_password_footer' => 'Se non sei stato tu a voler resettare la password per favore invia un\'email di assistenza a: ' . CONTACT_EMAIL, - - // Payment page - 'secure_payment' => 'Pagamento Sicuro', - 'card_number' => 'Numero Carta', - 'expiration_month' => 'Mese di Scadenza', - 'expiration_year' => 'Anno di Scadenza', - 'cvv' => 'CVV', - - // Security alerts - 'confide' => [ - 'too_many_attempts' => 'Troppi tentativi fatti. Riprova tra qualche minuto.', - 'wrong_credentials' => 'Email o password non corretti.', - 'confirmation' => 'Il tuo account è stato confermato!', - 'wrong_confirmation' => 'Codice di verifica errato.', - 'password_forgot' => 'I dati per resettare la tua password sono stati inviati alla tua email.', - 'password_reset' => 'La tua password è stata cambiata con successo.', - 'wrong_password_reset' => 'Password errata. Riprova', - ], - - // Pro Plan - 'pro_plan' => [ - 'remove_logo' => ':link per rimuovere il logo di Invoice Ninja aderendo al programma pro', - 'remove_logo_link' => 'Clicca qui', - ], - - 'logout' => 'Log Out', /* Esci */ - 'sign_up_to_save' => 'Registrati per salvare il tuo lavoro', - 'agree_to_terms' =>'Accetto i :terms di Invoice Ninja', - 'terms_of_service' => 'Condizioni di Servizio', - 'email_taken' => 'Questo indirizzo email è già registrato', - 'working' => 'In elaborazione', - 'success' => 'Fatto', - 'success_message' => 'Registrazione avvenuta con successo. Per favore visita il link nell\'email di conferma per verificare il tuo indirizzo email.', - 'erase_data' => 'Questo eliminerà definitivamente i tuoi dati.', - 'password' => 'Password', - - 'pro_plan_product' => 'Piano PRO', - 'pro_plan_description' => 'Un anno di sottoscrizione al piano PRO Invoice Ninja.', - 'pro_plan_success' => 'Grazie per aver aderito! Non appena la fattura risulterà pagata il tuo piano PRO avrà inizio.', - - 'unsaved_changes' => 'Ci sono dei cambiamenti non salvati', - 'custom_fields' => 'Campi Personalizzabili', - 'company_fields' => 'Campi Azienda', - 'client_fields' => 'Campi Cliente', - 'field_label' => 'Etichetta Campo', - 'field_value' => 'Valore Campo', - 'edit' => 'Modifica', - 'view_as_recipient' => 'Visualizza come destinatario', - - // product management - 'product_library' => 'Libreria prodotti', - 'product' => 'Prodotto', - 'products' => 'Prodotti', - 'fill_products' => 'Riempimento automatico prodotti', - 'fill_products_help' => 'Selezionare un prodotto farà automaticamente inserire la descrizione ed il costo', - 'update_products' => 'Aggiorna automaticamente i prodotti', - 'update_products_help' => 'Aggiornare una fatura farà automaticamente aggiornare i prodotti', - 'create_product' => 'Crea Prodotto', - 'edit_product' => 'Modifica Prodotto', - 'archive_product' => 'Archivia Prodotto', - 'updated_product' => 'Prodotto aggiornato con successo', - 'created_product' => 'Prodotto creato con successo', - 'archived_product' => 'Prodotto archiviato con successo', - 'pro_plan_custom_fields' => ':link to enable custom fields by joining the Pro Plan', - - 'advanced_settings' => 'Advanced Settings', - 'pro_plan_advanced_settings' => ':link to enable the advanced settings by joining the Pro Plan', - 'invoice_design' => 'Invoice Design', - 'specify_colors' => 'Specify colors', - 'specify_colors_label' => 'Select the colors used in the invoice', - - 'chart_builder' => 'Creatore grafico', - 'ninja_email_footer' => 'Usa :site per fatturare ai tuoi clienti e venire pagato online gratis!', - 'go_pro' => 'diventa Pro', - - // Quotes - 'quote' => 'Preventivo', - 'quotes' => 'Preventivi', - 'quote_number' => 'Numero Preventivo', - 'quote_number_short' => 'Preventivo #', - 'quote_date' => 'Data Preventivo', - 'quote_total' => 'Totale Preventivo', - 'your_quote' => 'Il vostro Preventivo', - 'total' => 'Totale', - 'clone' => 'Clona', /*Infinite verb?*/ - - 'new_quote' => 'Nuovo Preventivo', - 'create_quote' => 'Crea Preventivo', - 'edit_quote' => 'Modifica Preventivo', - 'archive_quote' => 'Archivia Preventivo', - 'delete_quote' => 'Cancella Preventivo', - 'save_quote' => 'Salva Preventivo', - 'email_quote' => 'Invia Preventivo via Email', - 'clone_quote' => 'Clona Preventivo', - 'convert_to_invoice' => 'Converti a Fattura', - 'view_invoice' => 'Vedi Fattura', - 'view_quote' => 'Vedi Preventivo', - 'view_client' => 'Vedi Cliente', - - 'updated_quote' => 'Preventivo aggiornato con successo', - 'created_quote' => 'Preventivo creato con successo', - 'cloned_quote' => 'Preventivo clonato con successo', - 'emailed_quote' => 'Preventivo inviato con successo', - 'archived_quote' => 'Preventivo archiviato con successo', - 'archived_quotes' => 'Sono stati archiviati :count preventivi con successo', - 'deleted_quote' => 'Preventivo cancellato con successo', - 'deleted_quotes' => 'Sono stati cancellati :count preventivi con successo', - 'converted_to_invoice' => 'Il preventivo è stato convertito a fattura con successo', - - 'quote_subject' => 'Nuovo preventivo da :account', - 'quote_message' => 'Per visualizzare il vostro preventivo per :amount, cliccare il collegamento sotto.', - 'quote_link_message' => 'Per visualizzare il preventivo del vostro cliante cliccate il collegamento sotto:', - 'notification_quote_sent_subject' => 'Il preventivo :invoice è stato inviato a :client', - 'notification_quote_viewed_subject' => 'Il preventivo :invoice è stato visualizzato da :client', - 'notification_quote_sent' => 'Al seguente cliente :client è stata inviata la fattura :invoice per :amount.', - 'notification_quote_viewed' => 'Il seguente cliente :client ha visualizzato il preventivo :invoice di :amount.', - - 'session_expired' => 'La vostra sessione è scaduta.', - - 'invoice_fields' => 'Invoice Fields', - 'invoice_options' => 'Invoice Options', - 'hide_quantity' => 'Hide quantity', - 'hide_quantity_help' => 'If your line items quantities are always 1, then you can declutter invoices by no longer displaying this field.', - 'hide_paid_to_date' => 'Hide paid to date', - 'hide_paid_to_date_help' => 'Only display the "Paid to Date" area on your invoices once a payment has been received.', - - 'charge_taxes' => 'Charge taxes', - 'user_management' => 'User Management', - 'add_user' => 'Add User', - 'send_invite' => 'Send invitation', - 'sent_invite' => 'Successfully sent invitation', - 'updated_user' => 'Successfully updated user', - 'invitation_message' => 'You\'ve been invited by :invitor. ', - 'register_to_add_user' => 'Please sign up to add a user', - 'user_state' => 'State', - 'edit_user' => 'Edit User', - 'delete_user' => 'Delete User', - 'active' => 'Active', - 'pending' => 'Pending', - 'deleted_user' => 'Successfully deleted user', - 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', - - 'confirm_email_invoice' => 'Are you sure you want to email this invoice?', - 'confirm_email_quote' => 'Are you sure you want to email this quote?', - 'confirm_recurring_email_invoice' => 'Recurring is enabled, are you sure you want this invoice emailed?', - - 'cancel_account' => 'Cancel Account', - 'cancel_account_message' => 'Warning: This will permanently erase all of your data, there is no undo.', - 'go_back' => 'Go Back', - - 'data_visualizations' => 'Data Visualizations', - 'sample_data' => 'Sample data shown', - 'hide' => 'Hide', - 'new_version_available' => 'A new version of :releases_link is available. You\'re running v:user_version, the latest is v:latest_version', - - 'invoice_settings' => 'Invoice Settings', - 'invoice_number_prefix' => 'Invoice Number Prefix', - 'invoice_number_counter' => 'Invoice Number Counter', - 'quote_number_prefix' => 'Quote Number Prefix', - 'quote_number_counter' => 'Quote Number Counter', - 'share_invoice_counter' => 'Share invoice counter', - 'invoice_issued_to' => 'Invoice issued to', - 'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix', - 'mark_sent' => 'Mark sent', - - - 'gateway_help_1' => ':link to sign up for Authorize.net.', - 'gateway_help_2' => ':link to sign up for Authorize.net.', - 'gateway_help_17' => ':link to get your PayPal API signature.', - 'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.', - 'gateway_help_27' => ':link to sign up for TwoCheckout.', - - 'more_designs' => 'More designs', - 'more_designs_title' => 'Additional Invoice Designs', - 'more_designs_cloud_header' => 'Go Pro for more invoice designs', - 'more_designs_cloud_text' => '', - 'more_designs_self_host_header' => 'Get 6 more invoice designs for just $'.INVOICE_DESIGNS_PRICE, - 'more_designs_self_host_text' => '', - 'buy' => 'Buy', - 'bought_designs' => 'Successfully added additional invoice designs', - - - 'sent' => 'sent', - 'timesheets' => 'Timesheets', - - 'payment_title' => 'Enter Your Billing Address and Credit Card information', - 'payment_cvv' => '*This is the 3-4 digit number onthe back of your card', - 'payment_footer1' => '*Billing address must match address associated with credit card.', - 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - 'vat_number' => 'Vat Number', - 'id_number' => 'ID Number', - - 'white_label_link' => 'White label', - 'white_label_text' => 'Purchase a white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the top of the client pages.', - 'white_label_header' => 'White Label', - 'bought_white_label' => 'Successfully enabled white label license', - 'white_labeled' => 'White labeled', - - - 'restore' => 'Restore', - 'restore_invoice' => 'Restore Invoice', - 'restore_quote' => 'Restore Quote', - 'restore_client' => 'Restore Client', - 'restore_credit' => 'Restore Credit', - 'restore_payment' => 'Restore Payment', - - 'restored_invoice' => 'Successfully restored invoice', - 'restored_quote' => 'Successfully restored quote', - 'restored_client' => 'Successfully restored client', - 'restored_payment' => 'Successfully restored payment', - 'restored_credit' => 'Successfully restored credit', - - 'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.', - 'discount_percent' => 'Percent', - 'discount_amount' => 'Amount', - - 'invoice_history' => 'Invoice History', - 'quote_history' => 'Quote History', - 'current_version' => 'Current version', - 'select_versiony' => 'Select version', - 'view_history' => 'View History', - - 'edit_payment' => 'Edit Payment', - 'updated_payment' => 'Successfully updated payment', - 'deleted' => 'Deleted', - 'restore_user' => 'Restore User', - 'restored_user' => 'Successfully restored user', - 'show_deleted_users' => 'Show deleted users', - 'email_templates' => 'Email Templates', - 'invoice_email' => 'Invoice Email', - 'payment_email' => 'Payment Email', - 'quote_email' => 'Quote Email', - 'reset_all' => 'Reset All', - 'approve' => 'Approve', - - 'token_billing_type_id' => 'Token Billing', - 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', - 'token_billing_1' => 'Disabled', - 'token_billing_2' => 'Opt-in - checkbox is shown but not selected', - 'token_billing_3' => 'Opt-out - checkbox is shown and selected', - 'token_billing_4' => 'Always', - 'token_billing_checkbox' => 'Store credit card details', - 'view_in_stripe' => 'View in Stripe', - 'use_card_on_file' => 'Use card on file', - 'edit_payment_details' => 'Edit payment details', - 'token_billing' => 'Save card details', - 'token_billing_secure' => 'The data is stored securely by :stripe_link', - - 'support' => 'Support', - 'contact_information' => 'Contact information', - '256_encryption' => '256-Bit Encryption', - 'amount_due' => 'Amount due', - 'billing_address' => 'Billing address', - 'billing_method' => 'Billing method', - 'order_overview' => 'Order overview', - 'match_address' => '*Address must match address associated with credit card.', - 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - - 'default_invoice_footer' => 'Set default invoice footer', - 'invoice_footer' => 'Invoice footer', - 'save_as_default_footer' => 'Save as default footer', - - 'token_management' => 'Token Management', - 'tokens' => 'Tokens', - 'add_token' => 'Add Token', - 'show_deleted_tokens' => 'Show deleted tokens', - 'deleted_token' => 'Successfully deleted token', - 'created_token' => 'Successfully created token', - 'updated_token' => 'Successfully updated token', - 'edit_token' => 'Edit Token', - 'delete_token' => 'Delete Token', - 'token' => 'Token', - - 'add_gateway' => 'Add Gateway', - 'delete_gateway' => 'Delete Gateway', - 'edit_gateway' => 'Edit Gateway', - 'updated_gateway' => 'Successfully updated gateway', - 'created_gateway' => 'Successfully created gateway', - 'deleted_gateway' => 'Successfully deleted gateway', - 'pay_with_paypal' => 'PayPal', - 'pay_with_card' => 'Credit card', - - 'change_password' => 'Change password', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'confirm_password' => 'Confirm password', - 'password_error_incorrect' => 'The current password is incorrect.', - 'password_error_invalid' => 'The new password is invalid.', - 'updated_password' => 'Successfully updated password', - - 'api_tokens' => 'API Tokens', - 'users_and_tokens' => 'Users & Tokens', - 'account_login' => 'Account Login', - 'recover_password' => 'Recover your password', - 'forgot_password' => 'Forgot your password?', - 'email_address' => 'Email address', - 'lets_go' => 'Let’s go', - 'password_recovery' => 'Password Recovery', - 'send_email' => 'Send email', - 'set_password' => 'Set Password', - 'converted' => 'Converted', - - -); diff --git a/app/lang/it/validation.php b/app/lang/it/validation.php deleted file mode 100644 index 9d1d547d8beb..000000000000 --- a/app/lang/it/validation.php +++ /dev/null @@ -1,107 +0,0 @@ - ":attribute deve essere accettato.", - "active_url" => ":attribute non è un URL valido.", - "after" => ":attribute deve essere una data successiva al :date.", - "alpha" => ":attribute può contenere solo lettere.", - "alpha_dash" => ":attribute può contenere solo lettere, numeri e trattini.", - "alpha_num" => ":attribute può contenere solo lettere e numeri.", - "array" => ":attribute deve essere un array.", - "before" => ":attribute deve essere una data precedente al :date.", - "between" => array( - "numeric" => ":attribute deve trovarsi tra :min - :max.", - "file" => ":attribute deve trovarsi tra :min - :max kilobytes.", - "string" => ":attribute deve trovarsi tra :min - :max caratteri.", - "array" => ":attribute deve avere tra :min - :max elementi." - ), - "confirmed" => "Il campo di conferma per :attribute non coincide.", - "date" => ":attribute non è una data valida.", - "date_format" => ":attribute non coincide con il formato :format.", - "different" => ":attribute e :other devono essere differenti.", - "digits" => ":attribute deve essere di :digits cifre.", - "digits_between" => ":attribute deve essere tra :min e :max cifre.", - "email" => ":attribute non è valido.", - "exists" => ":attribute selezionato/a non è valido.", - "image" => ":attribute deve essere un'immagine.", - "in" => ":attribute selezionato non è valido.", - "integer" => ":attribute deve essere intero.", - "ip" => ":attribute deve essere un indirizzo IP valido.", - "max" => array( - "numeric" => ":attribute deve essere minore di :max.", - "file" => ":attribute non deve essere più grande di :max kilobytes.", - "string" => ":attribute non può contenere più di :max caratteri.", - "array" => ":attribute non può avere più di :max elementi." - ), - "mimes" => ":attribute deve essere del tipo: :values.", - "min" => array( - "numeric" => ":attribute deve valere almeno :min.", - "file" => ":attribute deve essere più grande di :min kilobytes.", - "string" => ":attribute deve contenere almeno :min caratteri.", - "array" => ":attribute deve avere almeno :min elementi." - ), - "not_in" => "Il valore selezionato per :attribute non è valido.", - "numeric" => ":attribute deve essere un numero.", - "regex" => "Il formato del campo :attribute non è valido.", - "required" => ":attribute è richiesto.", - "required_if" => "Il campo :attribute è richiesto quando :other è :value.", - "required_with" => "Il campo :attribute è richiesto quando :values è presente.", - "required_with_all" => "The :attribute field is required when :values is present.", - "required_without" => "Il campo :attribute è richiesto quando :values non è presente.", - "required_without_all" => "The :attribute field is required when none of :values are present.", - "same" => ":attribute e :other devono coincidere.", - "size" => array( - "numeric" => ":attribute deve valere :size.", - "file" => ":attribute deve essere grande :size kilobytes.", - "string" => ":attribute deve contenere :size caratteri.", - "array" => ":attribute deve contenere :size elementi." - ), - "unique" => ":attribute è stato già utilizzato.", - "url" => ":attribute deve essere un URL.", - - "positive" => "The :attribute must be greater than zero.", - "has_credit" => "The client does not have enough credit.", - "notmasked" => "The values are masked", - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => array( - 'attribute-name' => array( - 'rule-name' => 'custom-message', - ), - ), - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => array(), - -); diff --git a/app/lang/lt/pagination.php b/app/lang/lt/pagination.php deleted file mode 100755 index eb9be3baaed5..000000000000 --- a/app/lang/lt/pagination.php +++ /dev/null @@ -1,20 +0,0 @@ - '« Previous', - - 'next' => 'Next »', - -); \ No newline at end of file diff --git a/app/lang/lt/public.php b/app/lang/lt/public.php deleted file mode 100644 index 7f5ecb9008e2..000000000000 --- a/app/lang/lt/public.php +++ /dev/null @@ -1,209 +0,0 @@ - 'Free Open-Source Online Invoicing', - 'description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - 'invoice_now' => 'Invoice Now', - 'no_signup_needed' => 'No signup needed', - - 'link_blog' => 'Blog', - 'link_about_us' => 'About Us', - 'link_contact_us' => 'Contact Us', - 'link_features' => 'Features', - 'link_plans' => 'Plans', - 'link_compare' => 'Compare', - 'link_testimonials' => 'Testimonials', - 'link_faq' => 'FAQ', - - 'my_account' => 'My Account', - 'login' => 'Login', - 'connect_with_us' => 'Connect with Us', - 'safe_and_secure' => 'Safe & Secure', - 'toggle_navigation' => 'Toggle navigation', - - - 'home' => [ - 'header' => 'THE SIMPLE & FREE WAY TO INVOICE CLIENTS', - 'sub_header' => 'It\'s just that easy. Stop spending time on complicated and expensive invoicing.
    No fuss, just get started and get paid.', - 'footer' => 'Simple, Intuitive Invoicing,Anywhere.', - - 'free_always' => 'Free, Always', - 'free_always_text' => 'Send unlimited invoices to 500 clients per month and never pay a dime. You are welcome to unlock still more awesome features with our Pro Plan, but our free app is a top-notch product that will do everything you need it to do, without any subscription or fees.', - - 'open_source' => 'Open-Source', - 'open_source_text' => 'No mysterious corporate silos here! Just full source code transparency and a devotion to working with anyone interested to build a better electronic invoicing platform. We even offer a handy zip download for a self-hosted version of Invoice Ninja.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text' => 'See how your edited invoice will look as a print-friendly pdf while you make the changes. Our pdf generator works in real time as you make your changes. You can even preview four beautiful preset designs. Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text' => 'Invoices sent with our app integrate seamlessly with the gateway credit card processor of your choice, to make it super easy for your clients to send you money with just a few clicks. We play nicely with Authorize.Net, Stripe, PayPal and loads more - 23 in all!', - ], - - 'about' => [ - 'header' => 'About Invoice Ninja', - 'what_is' => 'What is Invoice Ninja?', - - 'team_ninja' => 'Team Ninja', - 'team_ninja_text' => 'Invoice Ninja is managed by a team of seasoned web workers. We launched in early 2014 and have been thrilled by the enthusiastic response we’ve received from our growing community of users.', - - 'co_founder' => 'Co-Founder', - 'ceo' => 'CEO', - 'cto' => '', - 'designer' => 'Designer', - 'marketing' => 'Marketing', - - 'shalom_bio' => 'Shalom has specialized in small business development for nearly 10 years. In addition to InvoiceNinja.com Shalom is CEO of a leading tour agency in Israel.', - 'hillel_bio' => 'Hillel has been developing enterprise applications for 15 years. His open-source AutoComplete component has been used by thousands of developers around the world.', - 'razi_bio' => 'Razi is a pixel nerd with a great deal of experience in design for web sites and applications. When she isn\'t busy with InvoiceNinja she runs a small web agency in Stockholm called kantorp-wegl.in', - 'ben_bio' => 'A veteran digital marketer and content strategist, Ben specializes in building communities around brands that make business easier for freelancers, SMBs and micro-entrepreneurs.', - ], - - 'contact' => [ - 'header' => 'Questions, special requests, or just want to say hi?', - 'sub_header' => 'Fill in the form below and we\'ll get back to you as soon as possible. Hope to hear from you!', - 'other_ways' => 'Other ways to reach us', - - 'name' => 'Name', - 'name_help' => 'Please enter your name.', - - 'email' => 'Email Address', - 'email_help' => 'Please enter a valid e-mail address.', - - 'message' => 'Message', - 'message_help' => 'Please enter a message.', - 'send_message' => 'Send Message', - ], - - 'features' => [ - 'header' => 'The Features', - 'footer' => 'Like what you see?', - 'footer_action' => 'Get started today!', - - 'open_source' => 'Open Source Platform', - 'open_source_text1' => 'Set the code free! Here at Invoice Ninja, we’re all about creating the best possible app, and inviting scrutiny via full code transparency is a central manifestation of this value.', - 'open_source_text2' => 'We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.', - - 'free_forever' => 'FREE. Forever.', - 'free_forever_text1' => 'Yeah, you read that correctly. You don’t have to pay us a cent to use our tools. We know how tough it is to make ends meet as a web-based business, and we’re bent on providing a top-notch product that will do everything you need it to do, without any subscription or opt-in fees.', - 'free_forever_text2' => 'Try Invoice Ninja out. You literally have nothing to lose. We’re confident that you’ll find the experience so positive that you’ll never need to turn elsewhere.', - - 'secure' => 'Secure & Private', - 'secure_text1' => 'Invoice Ninja has been built from the ground up to keep your data safe. Only you have access to your login & accounting details, & we will never share your transaction data to any third party.', - 'secure_text2' => 'Our website operates with 256-bit encryption, which is even more secure than most banking websites. Invoice Ninja uses the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. We feel safe here and have invested heavily in measures to ensure that you do too.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text1' => 'With Invoice Ninja, we’ve done away with the need for cumbersome multi-click invoice previewing after each save.', - 'live_pdf_text2' => 'When you enter the details of your customer and/or invoice in our editor, you can instantly see the results in the pdf preview pane below. Want to see what your invoice would look like in a different layout style? The live pdf can show you four beautiful preset styles in real time too.', - 'live_pdf_text3' => 'Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text1' => 'Invoice Ninja seamlessly integrates with all of the top internet payment processors and gateways so you can get paid for your work quickly and easily.', - 'online_payments_text2' => 'Invoices created with our tools aren’t just for bookkeeping purposes - they bring in the Benjamins. We also make it super easy to choose the right gateway for the specific needs of your business and are happy to help you to get started working with the gateway of your choice. What’s more, we’re constantly working on rolling out additional gateway integrations, so if you don’t see the one you use here, just let us know, and there’s a good chance we’ll add it for you.', - ], - - 'plans' => [ - 'header' => 'The Plans', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - 'pro_plan' => 'Pro Plan', - - 'go_pro' => 'Go Pro to Unlock Premium Invoice Ninja Features', - 'go_pro_text' => 'We believe that the free version of Invoice Ninja is a truly awesome product loaded with the key features you need to bill your clients electronically. But for those who crave still more Ninja awesomeness, we\'ve unmasked the Invoice Ninja Pro plan, which offers more versatility, power and customization options for just $50 per year.', - - 'number_clients' => 'Number of clients per account', - 'unlimited_invoices' => 'Unlimited client invoices', - 'company_logo' => 'Add your company logo', - 'live_pdf' => 'Live .PDF invoice creation', - 'four_templates' => '4 beautiful invoice templates', - 'payments' => 'Accept credit card payments', - 'additional_templates' => 'Additional invoice templates', - 'multi_user' => 'Multi-user support', - 'quotes' => 'Quotes/pro-forma invoices', - 'advanced_settings' => 'Advanced invoice settings', - 'data_vizualizations' => 'Dynamic data vizualizations', - 'email_support' => 'Priority email support', - 'remove_created_by' => 'Remove "Created by Invoice Ninja"', - 'latest_features' => 'Latest and greatest features', - 'pricing' => 'Pricing', - 'free_always' => 'Free /Always!', - 'year_price' => '$50 /Year', - ], - - 'compare' => [ - 'header' => 'How We Compare', - 'free_plan_comparison' => 'Free Plan Comparison', - 'paid_plan_comparison' => 'Paid Plan Comparison', - 'app' => 'App', - 'cost' => 'Cost', - 'clients' => 'Clients', - 'invoices' => 'Invoices', - 'payment_gateways' => 'Payment Gateways', - 'custom_logo' => 'Custom Logo', - 'multiple_templates' => 'Multiple Templates', - 'recurring_payments' => 'Recurring Payments', - 'open_source' => 'Open Source', - 'per_month' => 'per month', - 'per_year' => 'per year', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - ], - - 'testimonials' => [ - 'testimonials' => 'testimonials', - 'header' => 'Since we launched Invoice Ninja in March of 2014, we\'ve been overwhelmed by a deluge of user love. Here\'s a small taste of the glowing things people have to say about the great experiences the\'ve been having with our free e-invoicing app!', - ], - - 'faq' => [ - 'header' => 'The FAQs', - - 'question1' => 'I know it isn’t standard ninja practice to reveal too many identity details, but who are you guys exactly?', - 'answer1' => 'We’re a small team of highly skilled digital journeymen based in Israel. We love open source, we love disrupting the big business status quo, and we love building helpful tools that are easy to use. We believe that everyone else’s web-based cash flow tools are unnecessarily expensive, clunky and complicated - and we’re bent on proving these beliefs with Invoice Ninja.', - - 'question2' => 'How do I get started using Invoice Ninja?', - 'answer2' => 'Just click on the big, yellow "Invoice Now" button on our homepage!', - - 'question3' => 'Do you offer customer support?', - 'answer3' => 'We sure do. Support is super important to us. Feel free to email us at support@invoiceninja.com with any questions you might have. We almost always reply within one business day.', - - 'question4' => 'Is Invoice Ninja really free? For how long?', - 'answer4' => 'Yes, our basic app is 100% free. Forever and ever. For real. We also offer a paid Pro version of Invoice Ninja (you can learn all about its awesome features here), but it\'s important to us that the free version have all of the key features people need to do business.', - - 'question5' => 'How is Invoice Ninja able to offer this all for free? How are you making any money?', - 'answer5' => 'We’re mostly in this line of work because we believe it’s high time that a good electronic invoicing tool be available for free. There isn’t much money in it - yet. We do offer a paid Pro version of the app that we\'ve souped up with premium features. And when our users open up new accounts with payment processor gateways by clicking on links from our site, we make modest commissions as a gateway affiliate. So if zillions of freelancers and small businesses start running credit card charges through Invoice Ninja, or if scores of users go Pro, there’s a decent chance we\'ll recover our investment.', - - 'question6' => 'Really? So does that mean you’re not collecting information about me so you can sell me stuff or so that some other company can spam me according to my interests?', - 'answer6' => 'No way. We’re not mining your data, and we’re not selling you out. That wouldn’t be very ninja of us, would it?', - - 'question7' => 'But don’t you have access to my merchant and banking accounts?', - 'answer7' => 'Actually, we don’t. When you link an account at a third party financial institution with your Invoice Ninja account, you’re essentially giving our app permission to send money to you and nothing more. This is all managed by the tech teams at your financial service providers, who go to great lengths to ensure their integrations can’t be exploited or abused.', - - 'question8' => 'Given that Invoice Ninja is an open source app, how can I be sure that my financial information is safe with you?', - 'answer8' => 'There\'s a big difference between “open source" and “open data.†Anyone who wants to use the code that drives Invoice Ninja to create their own products or to make improvements to ours can do so. It’s available for anyone who wants to download and work with. But that’s just the source code - totally separate from what happens with that code on the Invoice Ninja servers. You’re the only one who has full access to what you\'re doing with our product. For more details on the security of our servers and how we handle our users\' information, please read the next question.', - - 'question9' => 'So just how secure is this app?', - 'answer9' => 'Extremely. Data uploaded by our users runs through connections with 256-bit encryption, which is twice as many encryption bits that most bank websites use. We use the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. It’s fancy stuff that we put in place to make sure no one can gain access to your information except you.', - - 'question10' => 'How do I remove the small "Created by Invoice Ninja†image from the bottom of my invoices?', - 'answer10' => 'The amazingly affordable Pro version of Invoice Ninja allows you to do this and oh so much more.', - - 'question11' => 'Can I see what the application looks like with sample data?', - 'answer11' => 'Sure, click here to try out our demo account.', - - 'question12' => 'I hear that there\'s a version of Invoice Ninja that I can install myself on my own servers? Where can I learn more about this?', - 'answer12' => 'The rumors are true! Full instructions are available here.', - - 'question13' => 'I\'m seeing the options to assign various statuses to my invoices, clients, credits and payments. What\'s the difference between "active," "archived" and "deleted"?', - 'answer13' => 'These three handy statuses for invoices, clients, credits and payments allow you to keep your own cash flow management as straightforward and accessible as possible from your Invoice Ninja dashboard. None of these statuses will actually purge any records from your account - even "deleted" can always be recovered at any point in the future. "Active" means the record will appear in the relevant queue of records. To stash a record away so it\'s still fully operational but no longer cluttering up your interface, simply set it to be "archived." To deactivate a record and render it inaccessible to your clients, mark it "deleted."', - - 'question14' => 'My question wasn\'t covered by any of the content on this FAQ page. How can I get in touch with you?', - 'answer14' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - 'miss_something' => 'Did we miss something?', - 'miss_something_text' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - ], - - -]; \ No newline at end of file diff --git a/app/lang/lt/reminders.php b/app/lang/lt/reminders.php deleted file mode 100755 index ad2262124d4d..000000000000 --- a/app/lang/lt/reminders.php +++ /dev/null @@ -1,24 +0,0 @@ - "Passwords must be at least six characters and match the confirmation.", - - "user" => "We can't find a user with that e-mail address.", - - "token" => "This password reset token is invalid.", - - "sent" => "Password reminder sent!", - -); \ No newline at end of file diff --git a/app/lang/lt/texts.php b/app/lang/lt/texts.php deleted file mode 100644 index 81cfdee8f893..000000000000 --- a/app/lang/lt/texts.php +++ /dev/null @@ -1,586 +0,0 @@ - 'Ä®monÄ—', - 'name' => 'Vardas', - 'website' => 'Internetinis puslapis', - 'work_phone' => 'Telefonas', - 'address' => 'Adresas', - 'address1' => 'GatvÄ—', - 'address2' => 'Kabinetas', - 'city' => 'Miestas', - 'state' => 'Valstija', - 'postal_code' => 'PaÅ¡to kodas', - 'country_id' => 'Å alis', - 'contacts' => 'KontaktinÄ— infromacija', - 'first_name' => 'Vardas', - 'last_name' => 'PavardÄ—', - 'phone' => 'Telefonas', - 'email' => 'El. paÅ¡tas', - 'additional_info' => 'Papidoma Info', - 'payment_terms' => 'ApmokÄ—jimo sÄ…lygos', - 'currency_id' => 'Valiuta', - 'size_id' => 'Dydis', - 'industry_id' => 'Veiklos sritis', - 'private_notes' => 'PrivatÅ«s užraÅ¡ai', - - // invoice - 'invoice' => 'SÄ…kaita faktÅ«ra', - 'client' => 'Klientas', - 'invoice_date' => 'IÅ¡raÅ¡ymo data', - 'due_date' => 'ApmokÄ—jimo Data', - 'invoice_number' => 'Serija ir Nr.', - 'invoice_number_short' => 'Nr.', - 'po_number' => 'PO Numeris', - 'po_number_short' => 'PO Nr.', - 'frequency_id' => 'Kaip dažnai', - 'discount' => 'Nuolaida', - 'taxes' => 'MokesÄiai', - 'tax' => 'PVM', - 'item' => 'PrekÄ—', - 'description' => 'ApraÅ¡ymas', - 'unit_cost' => 'Vnt. kaina', - 'quantity' => 'Kiekis', - 'line_total' => 'Suma', - 'subtotal' => 'Suma viso', - 'paid_to_date' => 'ApmokÄ—ta', - 'balance_due' => 'ApmokÄ—ti', - 'invoice_design_id' => 'Dizainas', - 'terms' => 'SÄ…lygos', - 'your_invoice' => 'Tavo sÄ…skaitos', - - 'remove_contact' => 'PaÅ¡alinti kontaktÄ…', - 'add_contact' => 'PridÄ—ti kontaktÄ…', - 'create_new_client' => 'Sukurti naujÄ… klientÄ…', - 'edit_client_details' => 'Redaguoti kliento informacijÄ…', - 'enable' => 'Ä®galinti', - 'learn_more' => 'PlaÄiau', - 'manage_rates' => 'Redaguoti įkainius', - 'note_to_client' => 'Pastaba klientui', - 'invoice_terms' => 'SÄ…skaitos sÄ…lygos', - 'save_as_default_terms' => 'IÅ¡saugoti sÄ…lygas kaip standratrines', - 'download_pdf' => 'Atsisiųsti PDF', - 'pay_now' => 'ApmokÄ—ti dabar', - 'save_invoice' => 'IÅ¡saugoti sÄ…skaitÄ…', - 'clone_invoice' => 'Kopijuoti sÄ…skaitÄ…', - 'archive_invoice' => 'Archyvuoti sÄ…skaitÄ…', - 'delete_invoice' => 'IÅ¡trinti sÄ…skaitÄ…', - 'email_invoice' => 'IÅ¡siųsti el. paÅ¡tu sÄ…skaitÄ…', - 'enter_payment' => 'Ä®vesti apmokÄ—jimÄ…', - 'tax_rates' => 'MokesÄių įkainiai', - 'rate' => 'Ä®kainis', - 'settings' => 'Nustatymai', - 'enable_invoice_tax' => 'Ä®jungti PVM mokesÄius', - 'enable_line_item_tax' => 'Ä®jungti PVM mokesÄius sumai', - - // navigation - 'dashboard' => 'Darbastalis', - 'clients' => 'Klientai', - 'invoices' => 'SÄ…skaitos', - 'payments' => 'MokÄ—jimai', - 'credits' => 'Kreditai', - 'history' => 'Istorija', - 'search' => 'PaieÅ¡ka', - 'sign_up' => 'Prisijunk', - 'guest' => 'SveÄias', - 'company_details' => 'ImonÄ—s informacija', - 'online_payments' => 'Online mokÄ—jimai', - 'notifications' => 'Priminimai', - 'import_export' => 'Importas/Eksportas', - 'done' => 'Baigta', - 'save' => 'Saugoti', - 'create' => 'Kurti', - 'upload' => 'Ä®kelti', - 'import' => 'Importuoti', - 'download' => 'Atsiųsti', - 'cancel' => 'AtÅ¡aukti', - 'close' => 'Uždaryti', - 'provide_email' => 'PraÅ¡ome pateikti galiojantį el. paÅ¡to adresÄ…', - 'powered_by' => 'Energija teikia', - 'no_items' => 'Ä®rašų nÄ—ra', - - // recurring invoices - 'recurring_invoices' => 'Recurring Invoices', - 'recurring_help' => '

    Automatically send clients the same invoices weekly, bi-monthly, monthly, quarterly or annually.

    -

    Use :MONTH, :QUARTER or :YEAR for dynamic dates. Basic math works as well, for example :MONTH-1.

    -

    Examples of dynamic invoice variables:

    -
      -
    • "Gym membership for the month of :MONTH" => "Gym membership for the month of July"
    • -
    • ":YEAR+1 yearly subscription" => "2015 Yearly Subscription"
    • -
    • "Retainer payment for :QUARTER+1" => "Retainer payment for Q2"
    • -
    ', - - // dashboard - 'in_total_revenue' => 'in total revenue', - 'billed_client' => 'billed client', - 'billed_clients' => 'billed clients', - 'active_client' => 'active client', - 'active_clients' => 'active clients', - 'invoices_past_due' => 'Invoices Past Due', - 'upcoming_invoices' => 'Upcoming invoices', - 'average_invoice' => 'Average invoice', - - // list pages - 'archive' => 'Archive', - 'delete' => 'Delete', - 'archive_client' => 'Archive client', - 'delete_client' => 'Delete client', - 'archive_payment' => 'Archive payment', - 'delete_payment' => 'Delete payment', - 'archive_credit' => 'Archive credit', - 'delete_credit' => 'Delete credit', - 'show_archived_deleted' => 'Show archived/deleted', - 'filter' => 'Filter', - 'new_client' => 'New Client', - 'new_invoice' => 'New Invoice', - 'new_payment' => 'New Payment', - 'new_credit' => 'New Credit', - 'contact' => 'Contact', - 'date_created' => 'Date Created', - 'last_login' => 'Last Login', - 'balance' => 'Balance', - 'action' => 'Action', - 'status' => 'Status', - 'invoice_total' => 'Invoice Total', - 'frequency' => 'Frequency', - 'start_date' => 'Start Date', - 'end_date' => 'End Date', - 'transaction_reference' => 'Transaction Reference', - 'method' => 'Method', - 'payment_amount' => 'Payment Amount', - 'payment_date' => 'Payment Date', - 'credit_amount' => 'Credit Amount', - 'credit_balance' => 'Credit Balance', - 'credit_date' => 'Credit Date', - 'empty_table' => 'No data available in table', - 'select' => 'Select', - 'edit_client' => 'Edit Client', - 'edit_invoice' => 'Edit Invoice', - - // client view page - 'create_invoice' => 'Create Invoice', - 'enter_credit' => 'Enter Credit', - 'last_logged_in' => 'Last logged in', - 'details' => 'Details', - 'standing' => 'Standing', - 'credit' => 'Credit', - 'activity' => 'Activity', - 'date' => 'Date', - 'message' => 'Message', - 'adjustment' => 'Adjustment', - 'are_you_sure' => 'Are you sure?', - - // payment pages - 'payment_type_id' => 'Payment type', - 'amount' => 'Amount', - - // account/company pages - 'work_email' => 'Email', - 'language_id' => 'Language', - 'timezone_id' => 'Timezone', - 'date_format_id' => 'Date format', - 'datetime_format_id' => 'Date/Time Format', - 'users' => 'Users', - 'localization' => 'Localization', - 'remove_logo' => 'Remove logo', - 'logo_help' => 'Supported: JPEG, GIF and PNG. Recommended size: 200px width by 120px height', - 'payment_gateway' => 'Payment Gateway', - 'gateway_id' => 'Provider', - 'email_notifications' => 'Email Notifications', - 'email_sent' => 'Email me when an invoice is sent', - 'email_viewed' => 'Email me when an invoice is viewed', - 'email_paid' => 'Email me when an invoice is paid', - 'site_updates' => 'Site Updates', - 'custom_messages' => 'Custom Messages', - 'default_invoice_terms' => 'Set default invoice terms', - 'default_email_footer' => 'Set default email signature', - 'import_clients' => 'Import Client Data', - 'csv_file' => 'Select CSV file', - 'export_clients' => 'Export Client Data', - 'select_file' => 'Please select a file', - 'first_row_headers' => 'Use first row as headers', - 'column' => 'Column', - 'sample' => 'Sample', - 'import_to' => 'Import to', - 'client_will_create' => 'client will be created', - 'clients_will_create' => 'clients will be created', - - // application messages - 'created_client' => 'Successfully created client', - 'created_clients' => 'Successfully created :count clients', - 'updated_settings' => 'Successfully updated settings', - 'removed_logo' => 'Successfully removed logo', - 'sent_message' => 'Successfully sent message', - 'invoice_error' => 'Please make sure to select a client and correct any errors', - 'limit_clients' => 'Sorry, this will exceed the limit of :count clients', - 'payment_error' => 'There was an error processing your payment. Please try again later.', - 'registration_required' => 'Please sign up to email an invoice', - 'confirmation_required' => 'Please confirm your email address', - - 'updated_client' => 'Successfully updated client', - 'created_client' => 'Successfully created client', - 'archived_client' => 'Successfully archived client', - 'archived_clients' => 'Successfully archived :count clients', - 'deleted_client' => 'Successfully deleted client', - 'deleted_clients' => 'Successfully deleted :count clients', - - 'updated_invoice' => 'Successfully updated invoice', - 'created_invoice' => 'Successfully created invoice', - 'cloned_invoice' => 'Successfully cloned invoice', - 'emailed_invoice' => 'Successfully emailed invoice', - 'and_created_client' => 'and created client', - 'archived_invoice' => 'Successfully archived invoice', - 'archived_invoices' => 'Successfully archived :count invoices', - 'deleted_invoice' => 'Successfully deleted invoice', - 'deleted_invoices' => 'Successfully deleted :count invoices', - - 'created_payment' => 'Successfully created payment', - 'archived_payment' => 'Successfully archived payment', - 'archived_payments' => 'Successfully archived :count payments', - 'deleted_payment' => 'Successfully deleted payment', - 'deleted_payments' => 'Successfully deleted :count payments', - 'applied_payment' => 'Successfully applied payment', - - 'created_credit' => 'Successfully created credit', - 'archived_credit' => 'Successfully archived credit', - 'archived_credits' => 'Successfully archived :count credits', - 'deleted_credit' => 'Successfully deleted credit', - 'deleted_credits' => 'Successfully deleted :count credits', - - // Emails - 'confirmation_subject' => 'Invoice Ninja Account Confirmation', - 'confirmation_header' => 'Account Confirmation', - 'confirmation_message' => 'Please access the link below to confirm your account.', - 'invoice_subject' => 'New invoice from :account', - 'invoice_message' => 'To view your invoice for :amount, click the link below.', - 'payment_subject' => 'Payment Received', - 'payment_message' => 'Thank you for your payment of :amount.', - 'email_salutation' => 'Dear :name,', - 'email_signature' => 'Regards,', - 'email_from' => 'The InvoiceNinja Team', - 'user_email_footer' => 'To adjust your email notification settings please visit '.SITE_URL.'/company/notifications', - 'invoice_link_message' => 'To view your client invoice click the link below:', - 'notification_invoice_paid_subject' => 'Invoice :invoice was paid by :client', - 'notification_invoice_sent_subject' => 'Invoice :invoice was sent to :client', - 'notification_invoice_viewed_subject' => 'Invoice :invoice was viewed by :client', - 'notification_invoice_paid' => 'A payment of :amount was made by client :client towards Invoice :invoice.', - 'notification_invoice_sent' => 'The following client :client was emailed Invoice :invoice for :amount.', - 'notification_invoice_viewed' => 'The following client :client viewed Invoice :invoice for :amount.', - 'reset_password' => 'You can reset your account password by clicking the following link:', - 'reset_password_footer' => 'If you did not request this password reset please email our support: ' . CONTACT_EMAIL, - - - // Payment page - 'secure_payment' => 'Secure Payment', - 'card_number' => 'Card number', - 'expiration_month' => 'Expiration month', - 'expiration_year' => 'Expiration year', - 'cvv' => 'CVV', - - // Security alerts - 'confide' => [ - 'too_many_attempts' => 'Too many attempts. Try again in few minutes.', - 'wrong_credentials' => 'Incorrect email or password.', - 'confirmation' => 'Your account has been confirmed!', - 'wrong_confirmation' => 'Wrong confirmation code.', - 'password_forgot' => 'The information regarding password reset was sent to your email.', - 'password_reset' => 'Your password has been changed successfully.', - 'wrong_password_reset' => 'Invalid password. Try again', - ], - - // Pro Plan - 'pro_plan' => [ - 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the Pro Plan', - 'remove_logo_link' => 'Click here', - ], - - 'logout' => 'Log Out', - 'sign_up_to_save' => 'Sign up to save your work', - 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', - 'terms_of_service' => 'Terms of Service', - 'email_taken' => 'The email address is already registered', - 'working' => 'Working', - 'success' => 'Success', - 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', - 'erase_data' => 'This will permanently erase your data.', - 'password' => 'Password', - - 'pro_plan_product' => 'Pro Plan', - 'pro_plan_description' => 'One year enrollment in the Invoice Ninja Pro Plan.', - 'pro_plan_success' => 'Thanks for choosing Invoice Ninja\'s Pro plan!

     
    - Next Steps

    A payable invoice has been sent to the email - address associated with your account. To unlock all of the awesome - Pro features, please follow the instructions on the invoice to pay - for a year of Pro-level invoicing.

    - Can\'t find the invoice? Need further assistance? We\'re happy to help - -- email us at contact@invoiceninja.com', - - 'unsaved_changes' => 'You have unsaved changes', - 'custom_fields' => 'Custom fields', - 'company_fields' => 'Company Fields', - 'client_fields' => 'Client Fields', - 'field_label' => 'Field Label', - 'field_value' => 'Field Value', - 'edit' => 'Edit', - 'set_name' => 'Set your company name', - 'view_as_recipient' => 'View as recipient', - - // product management - 'product_library' => 'Product Library', - 'product' => 'Product', - 'products' => 'Products', - 'fill_products' => 'Auto-fill products', - 'fill_products_help' => 'Selecting a product will automatically fill in the description and cost', - 'update_products' => 'Auto-update products', - 'update_products_help' => 'Updating an invoice will automatically update the product library', - 'create_product' => 'Create Product', - 'edit_product' => 'Edit Product', - 'archive_product' => 'Archive Product', - 'updated_product' => 'Successfully updated product', - 'created_product' => 'Successfully created product', - 'archived_product' => 'Successfully archived product', - 'pro_plan_custom_fields' => ':link to enable custom fields by joining the Pro Plan', - - 'advanced_settings' => 'Advanced Settings', - 'pro_plan_advanced_settings' => ':link to enable the advanced settings by joining the Pro Plan', - 'invoice_design' => 'Invoice Design', - 'specify_colors' => 'Specify colors', - 'specify_colors_label' => 'Select the colors used in the invoice', - - 'chart_builder' => 'Chart Builder', - 'ninja_email_footer' => 'Use :site to invoice your clients and get paid online for free!', - 'go_pro' => 'Go Pro', - - // Quotes - 'quote' => 'Quote', - 'quotes' => 'Quotes', - 'quote_number' => 'Quote Number', - 'quote_number_short' => 'Quote #', - 'quote_date' => 'Quote Date', - 'quote_total' => 'Quote Total', - 'your_quote' => 'Your Quote', - 'total' => 'Total', - 'clone' => 'Clone', - - 'new_quote' => 'New Quote', - 'create_quote' => 'Create Quote', - 'edit_quote' => 'Edit Quote', - 'archive_quote' => 'Archive Quote', - 'delete_quote' => 'Delete Quote', - 'save_quote' => 'Save Quote', - 'email_quote' => 'Email Quote', - 'clone_quote' => 'Clone Quote', - 'convert_to_invoice' => 'Convert to Invoice', - 'view_invoice' => 'View Invoice', - 'view_client' => 'View Client', - 'view_quote' => 'View Quote', - - 'updated_quote' => 'Successfully updated quote', - 'created_quote' => 'Successfully created quote', - 'cloned_quote' => 'Successfully cloned quote', - 'emailed_quote' => 'Successfully emailed quote', - 'archived_quote' => 'Successfully archived quote', - 'archived_quotes' => 'Successfully archived :count quotes', - 'deleted_quote' => 'Successfully deleted quote', - 'deleted_quotes' => 'Successfully deleted :count quotes', - 'converted_to_invoice' => 'Successfully converted quote to invoice', - - 'quote_subject' => 'New quote from :account', - 'quote_message' => 'To view your quote for :amount, click the link below.', - 'quote_link_message' => 'To view your client quote click the link below:', - 'notification_quote_sent_subject' => 'Quote :invoice was sent to :client', - 'notification_quote_viewed_subject' => 'Quote :invoice was viewed by :client', - 'notification_quote_sent' => 'The following client :client was emailed Quote :invoice for :amount.', - 'notification_quote_viewed' => 'The following client :client viewed Quote :invoice for :amount.', - - 'session_expired' => 'Your session has expired.', - - 'invoice_fields' => 'Invoice Fields', - 'invoice_options' => 'Invoice Options', - 'hide_quantity' => 'Hide quantity', - 'hide_quantity_help' => 'If your line items quantities are always 1, then you can declutter invoices by no longer displaying this field.', - 'hide_paid_to_date' => 'Hide paid to date', - 'hide_paid_to_date_help' => 'Only display the "Paid to Date" area on your invoices once a payment has been received.', - - 'charge_taxes' => 'Charge taxes', - 'user_management' => 'User Management', - 'add_user' => 'Add User', - 'send_invite' => 'Send invitation', - 'sent_invite' => 'Successfully sent invitation', - 'updated_user' => 'Successfully updated user', - 'invitation_message' => 'You\'ve been invited by :invitor. ', - 'register_to_add_user' => 'Please sign up to add a user', - 'user_state' => 'State', - 'edit_user' => 'Edit User', - 'delete_user' => 'Delete User', - 'active' => 'Active', - 'pending' => 'Pending', - 'deleted_user' => 'Successfully deleted user', - 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', - - 'confirm_email_invoice' => 'Are you sure you want to email this invoice?', - 'confirm_email_quote' => 'Are you sure you want to email this quote?', - 'confirm_recurring_email_invoice' => 'Recurring is enabled, are you sure you want this invoice emailed?', - - 'cancel_account' => 'Cancel Account', - 'cancel_account_message' => 'Warning: This will permanently erase all of your data, there is no undo.', - 'go_back' => 'Go Back', - - 'data_visualizations' => 'Data Visualizations', - 'sample_data' => 'Sample data shown', - 'hide' => 'Hide', - 'new_version_available' => 'A new version of :releases_link is available. You\'re running v:user_version, the latest is v:latest_version', - - 'invoice_settings' => 'Invoice Settings', - 'invoice_number_prefix' => 'Invoice Number Prefix', - 'invoice_number_counter' => 'Invoice Number Counter', - 'quote_number_prefix' => 'Quote Number Prefix', - 'quote_number_counter' => 'Quote Number Counter', - 'share_invoice_counter' => 'Share invoice counter', - 'invoice_issued_to' => 'Invoice issued to', - 'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix', - 'mark_sent' => 'Mark sent', - - - 'gateway_help_1' => ':link to sign up for Authorize.net.', - 'gateway_help_2' => ':link to sign up for Authorize.net.', - 'gateway_help_17' => ':link to get your PayPal API signature.', - 'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.', - 'gateway_help_27' => ':link to sign up for TwoCheckout.', - - 'more_designs' => 'More designs', - 'more_designs_title' => 'Additional Invoice Designs', - 'more_designs_cloud_header' => 'Go Pro for more invoice designs', - 'more_designs_cloud_text' => '', - 'more_designs_self_host_header' => 'Get 6 more invoice designs for just $'.INVOICE_DESIGNS_PRICE, - 'more_designs_self_host_text' => '', - 'buy' => 'Buy', - 'bought_designs' => 'Successfully added additional invoice designs', - - - - 'sent' => 'sent', - 'timesheets' => 'Timesheets', - - 'payment_title' => 'Enter Your Billing Address and Credit Card information', - 'payment_cvv' => '*This is the 3-4 digit number onthe back of your card', - 'payment_footer1' => '*Billing address must match address associated with credit card.', - 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - 'vat_number' => 'Vat Number', - 'id_number' => 'ID Number', - - 'white_label_link' => 'White label', - 'white_label_text' => 'Purchase a white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the top of the client pages.', - 'white_label_header' => 'White Label', - 'bought_white_label' => 'Successfully enabled white label license', - 'white_labeled' => 'White labeled', - - 'restore' => 'Restore', - 'restore_invoice' => 'Restore Invoice', - 'restore_quote' => 'Restore Quote', - 'restore_client' => 'Restore Client', - 'restore_credit' => 'Restore Credit', - 'restore_payment' => 'Restore Payment', - - 'restored_invoice' => 'Successfully restored invoice', - 'restored_quote' => 'Successfully restored quote', - 'restored_client' => 'Successfully restored client', - 'restored_payment' => 'Successfully restored payment', - 'restored_credit' => 'Successfully restored credit', - - 'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.', - 'discount_percent' => 'Percent', - 'discount_amount' => 'Amount', - - 'invoice_history' => 'Invoice History', - 'quote_history' => 'Quote History', - 'current_version' => 'Current version', - 'select_versiony' => 'Select version', - 'view_history' => 'View History', - - 'edit_payment' => 'Edit Payment', - 'updated_payment' => 'Successfully updated payment', - 'deleted' => 'Deleted', - 'restore_user' => 'Restore User', - 'restored_user' => 'Successfully restored user', - 'show_deleted_users' => 'Show deleted users', - 'email_templates' => 'Email Templates', - 'invoice_email' => 'Invoice Email', - 'payment_email' => 'Payment Email', - 'quote_email' => 'Quote Email', - 'reset_all' => 'Reset All', - 'approve' => 'Approve', - - 'token_billing_type_id' => 'Token Billing', - 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', - 'token_billing_1' => 'Disabled', - 'token_billing_2' => 'Opt-in - checkbox is shown but not selected', - 'token_billing_3' => 'Opt-out - checkbox is shown and selected', - 'token_billing_4' => 'Always', - 'token_billing_checkbox' => 'Store credit card details', - 'view_in_stripe' => 'View in Stripe', - 'use_card_on_file' => 'Use card on file', - 'edit_payment_details' => 'Edit payment details', - 'token_billing' => 'Save card details', - 'token_billing_secure' => 'The data is stored securely by :stripe_link', - - 'support' => 'Support', - 'contact_information' => 'Contact information', - '256_encryption' => '256-Bit Encryption', - 'amount_due' => 'Amount due', - 'billing_address' => 'Billing address', - 'billing_method' => 'Billing method', - 'order_overview' => 'Order overview', - 'match_address' => '*Address must match address associated with credit card.', - 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - - 'default_invoice_footer' => 'Set default invoice footer', - 'invoice_footer' => 'Invoice footer', - 'save_as_default_footer' => 'Save as default footer', - - 'token_management' => 'Token Management', - 'tokens' => 'Tokens', - 'add_token' => 'Add Token', - 'show_deleted_tokens' => 'Show deleted tokens', - 'deleted_token' => 'Successfully deleted token', - 'created_token' => 'Successfully created token', - 'updated_token' => 'Successfully updated token', - 'edit_token' => 'Edit Token', - 'delete_token' => 'Delete Token', - 'token' => 'Token', - - 'add_gateway' => 'Add Gateway', - 'delete_gateway' => 'Delete Gateway', - 'edit_gateway' => 'Edit Gateway', - 'updated_gateway' => 'Successfully updated gateway', - 'created_gateway' => 'Successfully created gateway', - 'deleted_gateway' => 'Successfully deleted gateway', - 'pay_with_paypal' => 'PayPal', - 'pay_with_card' => 'Credit card', - - 'change_password' => 'Change password', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'confirm_password' => 'Confirm password', - 'password_error_incorrect' => 'The current password is incorrect.', - 'password_error_invalid' => 'The new password is invalid.', - 'updated_password' => 'Successfully updated password', - - 'api_tokens' => 'API Tokens', - 'users_and_tokens' => 'Users & Tokens', - 'account_login' => 'Account Login', - 'recover_password' => 'Recover your password', - 'forgot_password' => 'Forgot your password?', - 'email_address' => 'Email address', - 'lets_go' => 'Let’s go', - 'password_recovery' => 'Password Recovery', - 'send_email' => 'Send email', - 'set_password' => 'Set Password', - 'converted' => 'Converted', - - - -); - diff --git a/app/lang/lt/validation.php b/app/lang/lt/validation.php deleted file mode 100755 index 68b39c68af2f..000000000000 --- a/app/lang/lt/validation.php +++ /dev/null @@ -1,102 +0,0 @@ - "The :attribute must be accepted.", - "active_url" => "The :attribute is not a valid URL.", - "after" => "The :attribute must be a date after :date.", - "alpha" => "The :attribute may only contain letters.", - "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.", - "alpha_num" => "The :attribute may only contain letters and numbers.", - "array" => "The :attribute must be an array.", - "before" => "The :attribute must be a date before :date.", - "between" => array( - "numeric" => "The :attribute must be between :min - :max.", - "file" => "The :attribute must be between :min - :max kilobytes.", - "string" => "The :attribute must be between :min - :max characters.", - "array" => "The :attribute must have between :min - :max items.", - ), - "confirmed" => "The :attribute confirmation does not match.", - "date" => "The :attribute is not a valid date.", - "date_format" => "The :attribute does not match the format :format.", - "different" => "The :attribute and :other must be different.", - "digits" => "The :attribute must be :digits digits.", - "digits_between" => "The :attribute must be between :min and :max digits.", - "email" => "The :attribute format is invalid.", - "exists" => "The selected :attribute is invalid.", - "image" => "The :attribute must be an image.", - "in" => "The selected :attribute is invalid.", - "integer" => "The :attribute must be an integer.", - "ip" => "The :attribute must be a valid IP address.", - "max" => array( - "numeric" => "The :attribute may not be greater than :max.", - "file" => "The :attribute may not be greater than :max kilobytes.", - "string" => "The :attribute may not be greater than :max characters.", - "array" => "The :attribute may not have more than :max items.", - ), - "mimes" => "The :attribute must be a file of type: :values.", - "min" => array( - "numeric" => "The :attribute must be at least :min.", - "file" => "The :attribute must be at least :min kilobytes.", - "string" => "The :attribute must be at least :min characters.", - "array" => "The :attribute must have at least :min items.", - ), - "not_in" => "The selected :attribute is invalid.", - "numeric" => "The :attribute must be a number.", - "regex" => "The :attribute format is invalid.", - "required" => "The :attribute field is required.", - "required_if" => "The :attribute field is required when :other is :value.", - "required_with" => "The :attribute field is required when :values is present.", - "required_without" => "The :attribute field is required when :values is not present.", - "same" => "The :attribute and :other must match.", - "size" => array( - "numeric" => "The :attribute must be :size.", - "file" => "The :attribute must be :size kilobytes.", - "string" => "The :attribute must be :size characters.", - "array" => "The :attribute must contain :size items.", - ), - "unique" => "The :attribute has already been taken.", - "url" => "The :attribute format is invalid.", - - "positive" => "The :attribute must be greater than zero.", - "has_credit" => "The client does not have enough credit.", - "notmasked" => "The values are masked", - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => array(), - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => array(), - -); diff --git a/app/lang/nb_NO/pagination.php b/app/lang/nb_NO/pagination.php deleted file mode 100644 index c57908251668..000000000000 --- a/app/lang/nb_NO/pagination.php +++ /dev/null @@ -1,20 +0,0 @@ - '« Tilbake', - - 'next' => 'Neste »', - -); \ No newline at end of file diff --git a/app/lang/nb_NO/public.php b/app/lang/nb_NO/public.php deleted file mode 100644 index 7f5ecb9008e2..000000000000 --- a/app/lang/nb_NO/public.php +++ /dev/null @@ -1,209 +0,0 @@ - 'Free Open-Source Online Invoicing', - 'description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - 'invoice_now' => 'Invoice Now', - 'no_signup_needed' => 'No signup needed', - - 'link_blog' => 'Blog', - 'link_about_us' => 'About Us', - 'link_contact_us' => 'Contact Us', - 'link_features' => 'Features', - 'link_plans' => 'Plans', - 'link_compare' => 'Compare', - 'link_testimonials' => 'Testimonials', - 'link_faq' => 'FAQ', - - 'my_account' => 'My Account', - 'login' => 'Login', - 'connect_with_us' => 'Connect with Us', - 'safe_and_secure' => 'Safe & Secure', - 'toggle_navigation' => 'Toggle navigation', - - - 'home' => [ - 'header' => 'THE SIMPLE & FREE WAY TO INVOICE CLIENTS', - 'sub_header' => 'It\'s just that easy. Stop spending time on complicated and expensive invoicing.
    No fuss, just get started and get paid.', - 'footer' => 'Simple, Intuitive Invoicing,Anywhere.', - - 'free_always' => 'Free, Always', - 'free_always_text' => 'Send unlimited invoices to 500 clients per month and never pay a dime. You are welcome to unlock still more awesome features with our Pro Plan, but our free app is a top-notch product that will do everything you need it to do, without any subscription or fees.', - - 'open_source' => 'Open-Source', - 'open_source_text' => 'No mysterious corporate silos here! Just full source code transparency and a devotion to working with anyone interested to build a better electronic invoicing platform. We even offer a handy zip download for a self-hosted version of Invoice Ninja.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text' => 'See how your edited invoice will look as a print-friendly pdf while you make the changes. Our pdf generator works in real time as you make your changes. You can even preview four beautiful preset designs. Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text' => 'Invoices sent with our app integrate seamlessly with the gateway credit card processor of your choice, to make it super easy for your clients to send you money with just a few clicks. We play nicely with Authorize.Net, Stripe, PayPal and loads more - 23 in all!', - ], - - 'about' => [ - 'header' => 'About Invoice Ninja', - 'what_is' => 'What is Invoice Ninja?', - - 'team_ninja' => 'Team Ninja', - 'team_ninja_text' => 'Invoice Ninja is managed by a team of seasoned web workers. We launched in early 2014 and have been thrilled by the enthusiastic response we’ve received from our growing community of users.', - - 'co_founder' => 'Co-Founder', - 'ceo' => 'CEO', - 'cto' => '', - 'designer' => 'Designer', - 'marketing' => 'Marketing', - - 'shalom_bio' => 'Shalom has specialized in small business development for nearly 10 years. In addition to InvoiceNinja.com Shalom is CEO of a leading tour agency in Israel.', - 'hillel_bio' => 'Hillel has been developing enterprise applications for 15 years. His open-source AutoComplete component has been used by thousands of developers around the world.', - 'razi_bio' => 'Razi is a pixel nerd with a great deal of experience in design for web sites and applications. When she isn\'t busy with InvoiceNinja she runs a small web agency in Stockholm called kantorp-wegl.in', - 'ben_bio' => 'A veteran digital marketer and content strategist, Ben specializes in building communities around brands that make business easier for freelancers, SMBs and micro-entrepreneurs.', - ], - - 'contact' => [ - 'header' => 'Questions, special requests, or just want to say hi?', - 'sub_header' => 'Fill in the form below and we\'ll get back to you as soon as possible. Hope to hear from you!', - 'other_ways' => 'Other ways to reach us', - - 'name' => 'Name', - 'name_help' => 'Please enter your name.', - - 'email' => 'Email Address', - 'email_help' => 'Please enter a valid e-mail address.', - - 'message' => 'Message', - 'message_help' => 'Please enter a message.', - 'send_message' => 'Send Message', - ], - - 'features' => [ - 'header' => 'The Features', - 'footer' => 'Like what you see?', - 'footer_action' => 'Get started today!', - - 'open_source' => 'Open Source Platform', - 'open_source_text1' => 'Set the code free! Here at Invoice Ninja, we’re all about creating the best possible app, and inviting scrutiny via full code transparency is a central manifestation of this value.', - 'open_source_text2' => 'We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.', - - 'free_forever' => 'FREE. Forever.', - 'free_forever_text1' => 'Yeah, you read that correctly. You don’t have to pay us a cent to use our tools. We know how tough it is to make ends meet as a web-based business, and we’re bent on providing a top-notch product that will do everything you need it to do, without any subscription or opt-in fees.', - 'free_forever_text2' => 'Try Invoice Ninja out. You literally have nothing to lose. We’re confident that you’ll find the experience so positive that you’ll never need to turn elsewhere.', - - 'secure' => 'Secure & Private', - 'secure_text1' => 'Invoice Ninja has been built from the ground up to keep your data safe. Only you have access to your login & accounting details, & we will never share your transaction data to any third party.', - 'secure_text2' => 'Our website operates with 256-bit encryption, which is even more secure than most banking websites. Invoice Ninja uses the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. We feel safe here and have invested heavily in measures to ensure that you do too.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text1' => 'With Invoice Ninja, we’ve done away with the need for cumbersome multi-click invoice previewing after each save.', - 'live_pdf_text2' => 'When you enter the details of your customer and/or invoice in our editor, you can instantly see the results in the pdf preview pane below. Want to see what your invoice would look like in a different layout style? The live pdf can show you four beautiful preset styles in real time too.', - 'live_pdf_text3' => 'Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text1' => 'Invoice Ninja seamlessly integrates with all of the top internet payment processors and gateways so you can get paid for your work quickly and easily.', - 'online_payments_text2' => 'Invoices created with our tools aren’t just for bookkeeping purposes - they bring in the Benjamins. We also make it super easy to choose the right gateway for the specific needs of your business and are happy to help you to get started working with the gateway of your choice. What’s more, we’re constantly working on rolling out additional gateway integrations, so if you don’t see the one you use here, just let us know, and there’s a good chance we’ll add it for you.', - ], - - 'plans' => [ - 'header' => 'The Plans', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - 'pro_plan' => 'Pro Plan', - - 'go_pro' => 'Go Pro to Unlock Premium Invoice Ninja Features', - 'go_pro_text' => 'We believe that the free version of Invoice Ninja is a truly awesome product loaded with the key features you need to bill your clients electronically. But for those who crave still more Ninja awesomeness, we\'ve unmasked the Invoice Ninja Pro plan, which offers more versatility, power and customization options for just $50 per year.', - - 'number_clients' => 'Number of clients per account', - 'unlimited_invoices' => 'Unlimited client invoices', - 'company_logo' => 'Add your company logo', - 'live_pdf' => 'Live .PDF invoice creation', - 'four_templates' => '4 beautiful invoice templates', - 'payments' => 'Accept credit card payments', - 'additional_templates' => 'Additional invoice templates', - 'multi_user' => 'Multi-user support', - 'quotes' => 'Quotes/pro-forma invoices', - 'advanced_settings' => 'Advanced invoice settings', - 'data_vizualizations' => 'Dynamic data vizualizations', - 'email_support' => 'Priority email support', - 'remove_created_by' => 'Remove "Created by Invoice Ninja"', - 'latest_features' => 'Latest and greatest features', - 'pricing' => 'Pricing', - 'free_always' => 'Free /Always!', - 'year_price' => '$50 /Year', - ], - - 'compare' => [ - 'header' => 'How We Compare', - 'free_plan_comparison' => 'Free Plan Comparison', - 'paid_plan_comparison' => 'Paid Plan Comparison', - 'app' => 'App', - 'cost' => 'Cost', - 'clients' => 'Clients', - 'invoices' => 'Invoices', - 'payment_gateways' => 'Payment Gateways', - 'custom_logo' => 'Custom Logo', - 'multiple_templates' => 'Multiple Templates', - 'recurring_payments' => 'Recurring Payments', - 'open_source' => 'Open Source', - 'per_month' => 'per month', - 'per_year' => 'per year', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - ], - - 'testimonials' => [ - 'testimonials' => 'testimonials', - 'header' => 'Since we launched Invoice Ninja in March of 2014, we\'ve been overwhelmed by a deluge of user love. Here\'s a small taste of the glowing things people have to say about the great experiences the\'ve been having with our free e-invoicing app!', - ], - - 'faq' => [ - 'header' => 'The FAQs', - - 'question1' => 'I know it isn’t standard ninja practice to reveal too many identity details, but who are you guys exactly?', - 'answer1' => 'We’re a small team of highly skilled digital journeymen based in Israel. We love open source, we love disrupting the big business status quo, and we love building helpful tools that are easy to use. We believe that everyone else’s web-based cash flow tools are unnecessarily expensive, clunky and complicated - and we’re bent on proving these beliefs with Invoice Ninja.', - - 'question2' => 'How do I get started using Invoice Ninja?', - 'answer2' => 'Just click on the big, yellow "Invoice Now" button on our homepage!', - - 'question3' => 'Do you offer customer support?', - 'answer3' => 'We sure do. Support is super important to us. Feel free to email us at support@invoiceninja.com with any questions you might have. We almost always reply within one business day.', - - 'question4' => 'Is Invoice Ninja really free? For how long?', - 'answer4' => 'Yes, our basic app is 100% free. Forever and ever. For real. We also offer a paid Pro version of Invoice Ninja (you can learn all about its awesome features here), but it\'s important to us that the free version have all of the key features people need to do business.', - - 'question5' => 'How is Invoice Ninja able to offer this all for free? How are you making any money?', - 'answer5' => 'We’re mostly in this line of work because we believe it’s high time that a good electronic invoicing tool be available for free. There isn’t much money in it - yet. We do offer a paid Pro version of the app that we\'ve souped up with premium features. And when our users open up new accounts with payment processor gateways by clicking on links from our site, we make modest commissions as a gateway affiliate. So if zillions of freelancers and small businesses start running credit card charges through Invoice Ninja, or if scores of users go Pro, there’s a decent chance we\'ll recover our investment.', - - 'question6' => 'Really? So does that mean you’re not collecting information about me so you can sell me stuff or so that some other company can spam me according to my interests?', - 'answer6' => 'No way. We’re not mining your data, and we’re not selling you out. That wouldn’t be very ninja of us, would it?', - - 'question7' => 'But don’t you have access to my merchant and banking accounts?', - 'answer7' => 'Actually, we don’t. When you link an account at a third party financial institution with your Invoice Ninja account, you’re essentially giving our app permission to send money to you and nothing more. This is all managed by the tech teams at your financial service providers, who go to great lengths to ensure their integrations can’t be exploited or abused.', - - 'question8' => 'Given that Invoice Ninja is an open source app, how can I be sure that my financial information is safe with you?', - 'answer8' => 'There\'s a big difference between “open source" and “open data.†Anyone who wants to use the code that drives Invoice Ninja to create their own products or to make improvements to ours can do so. It’s available for anyone who wants to download and work with. But that’s just the source code - totally separate from what happens with that code on the Invoice Ninja servers. You’re the only one who has full access to what you\'re doing with our product. For more details on the security of our servers and how we handle our users\' information, please read the next question.', - - 'question9' => 'So just how secure is this app?', - 'answer9' => 'Extremely. Data uploaded by our users runs through connections with 256-bit encryption, which is twice as many encryption bits that most bank websites use. We use the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. It’s fancy stuff that we put in place to make sure no one can gain access to your information except you.', - - 'question10' => 'How do I remove the small "Created by Invoice Ninja†image from the bottom of my invoices?', - 'answer10' => 'The amazingly affordable Pro version of Invoice Ninja allows you to do this and oh so much more.', - - 'question11' => 'Can I see what the application looks like with sample data?', - 'answer11' => 'Sure, click here to try out our demo account.', - - 'question12' => 'I hear that there\'s a version of Invoice Ninja that I can install myself on my own servers? Where can I learn more about this?', - 'answer12' => 'The rumors are true! Full instructions are available here.', - - 'question13' => 'I\'m seeing the options to assign various statuses to my invoices, clients, credits and payments. What\'s the difference between "active," "archived" and "deleted"?', - 'answer13' => 'These three handy statuses for invoices, clients, credits and payments allow you to keep your own cash flow management as straightforward and accessible as possible from your Invoice Ninja dashboard. None of these statuses will actually purge any records from your account - even "deleted" can always be recovered at any point in the future. "Active" means the record will appear in the relevant queue of records. To stash a record away so it\'s still fully operational but no longer cluttering up your interface, simply set it to be "archived." To deactivate a record and render it inaccessible to your clients, mark it "deleted."', - - 'question14' => 'My question wasn\'t covered by any of the content on this FAQ page. How can I get in touch with you?', - 'answer14' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - 'miss_something' => 'Did we miss something?', - 'miss_something_text' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - ], - - -]; \ No newline at end of file diff --git a/app/lang/nb_NO/reminders.php b/app/lang/nb_NO/reminders.php deleted file mode 100644 index 88c8a1c920c4..000000000000 --- a/app/lang/nb_NO/reminders.php +++ /dev/null @@ -1,24 +0,0 @@ - "Passord må være minst seks tegn og samsvare med bekreftelsen.", - - "user" => "Vi kan ikke finne en bruker med den e-postadressen.", - - "token" => "Denne tilbakestillingsnøkkelen er ugyldig.", - - "sent" => "Passord påminnelse sendt!", - -); \ No newline at end of file diff --git a/app/lang/nb_NO/texts.php b/app/lang/nb_NO/texts.php deleted file mode 100644 index 2d066fc016d7..000000000000 --- a/app/lang/nb_NO/texts.php +++ /dev/null @@ -1,582 +0,0 @@ - 'Organisasjon', - 'name' => 'Navn', - 'website' => 'Webside', - 'work_phone' => 'Telefon', - 'address' => 'Adresse', - 'address1' => 'Gate', - 'address2' => 'Nummer', - 'city' => 'By', - 'state' => 'Fylke', - 'postal_code' => 'Postnummer', - 'country_id' => 'Land', - 'contacts' => 'Kontakter', - 'first_name' => 'Fornavn', - 'last_name' => 'Etternavn', - 'phone' => 'Telefon', - 'email' => 'Email', - 'additional_info' => 'Tilleggsinfo', - 'payment_terms' => 'Betalingsvilkår', - 'currency_id' => 'Valuta', - 'size_id' => 'Størrelse', - 'industry_id' => 'Sektor', - 'private_notes' => 'Private notater', - - // invoice - 'invoice' => 'Faktura', - 'client' => 'Klient', - 'invoice_date' => 'Faktureringsdato', - 'due_date' => 'Betalingsfrist', - 'invoice_number' => 'Fakturanummer', - 'invoice_number_short' => 'Faktura #', - 'po_number' => 'Ordrenummer', - 'po_number_short' => 'Ordre #', - 'frequency_id' => 'Frekvens', - 'discount' => 'Rabatt', - 'taxes' => 'Skatter', - 'tax' => 'Skatt', - 'item' => 'Beløpstype', - 'description' => 'Beskrivese', - 'unit_cost' => 'á pris', - 'quantity' => 'STK', - 'line_total' => 'Sum', - 'subtotal' => 'Totalbeløp', - 'paid_to_date' => 'Betalt', - 'balance_due' => 'Gjenstående', - 'invoice_design_id' => 'Design', - 'terms' => 'Vilkår', - 'your_invoice' => 'Din faktura', - - 'remove_contact' => 'Fjern kontakt', - 'add_contact' => 'Legg til kontakt', - 'create_new_client' => 'Opprett ny klient', - 'edit_client_details' => 'Endre klientdetaljer', - 'enable' => 'Aktiver', - 'learn_more' => 'Lær mer', - 'manage_rates' => 'Administrer priser', - 'note_to_client' => 'Merknad til klient', - 'invoice_terms' => 'Vilkår for fakturaen', - 'save_as_default_terms' => 'Lagre som standard vilkår', - 'download_pdf' => 'Last ned PDF', - 'pay_now' => 'Betal nå', - 'save_invoice' => 'Lagre faktura', - 'clone_invoice' => 'Kopier faktura', - 'archive_invoice' => 'Arkiver faktura', - 'delete_invoice' => 'Slett faktura', - 'email_invoice' => 'Send faktura på epost', - 'enter_payment' => 'Oppgi betaling', - 'tax_rates' => 'Skattesatser', - 'rate' => 'Sats', - 'settings' => 'Innstillinger', - 'enable_invoice_tax' => 'Aktiver for å spesifisere en faktura skatt', - 'enable_line_item_tax' => 'Aktiver for å spesifisere artikkel skatt', - - // navigation - 'dashboard' => 'Dashboard', - 'clients' => 'Klienter', - 'invoices' => 'Fakturaer', - 'payments' => 'Betalinger', - 'credits' => 'Kreditter', - 'history' => 'Historie', - 'search' => 'Søk', - 'sign_up' => 'Registrer deg', - 'guest' => 'Gjest', - 'company_details' => 'Firmainformasjon', - 'online_payments' => 'Online betaling', - 'notifications' => 'Varsler', - 'import_export' => 'Import/Export', - 'done' => 'Ferdig', - 'save' => 'Lagre', - 'create' => 'Lag', - 'upload' => 'Last opp', - 'import' => 'Importer', - 'download' => 'Last ned', - 'cancel' => 'Avbryt', - 'close' => 'Lukk', - 'provide_email' => 'Vennligst oppgi en gyldig e-postadresse', - 'powered_by' => 'Drevet av', - 'no_items' => 'Ingen elementer', - - // recurring invoices - 'recurring_invoices' => 'Gjentakende fakturaer', - 'recurring_help' => '

    Automatisk send klienter de samme fakturaene ukentlig, bi-månedlig, månedlig, kvartalsvis eller årlig.

    -

    Bruk :MONTH, :QUARTER eller :YEAR for dynamiske datoer. Grunnleggende matematikk fungerer også, for eksempel :MONTH-1.

    -

    Eksempler på dynamiske faktura variabler:

    -
      -
    • "Treningsmedlemskap for måneden :MONTH" => "Treningsmedlemskap for måneden Juli"
    • -
    • ":YEAR+1 årlig abonnement" => "2015 årlig abonnement"
    • -
    • "Forhåndsbetaling for :QUARTER+1" => "Forhåndsbetaling for Q2"
    • -
    ', - - // dashboard - 'in_total_revenue' => 'totale inntekter', - 'billed_client' => 'fakturert klient', - 'billed_clients' => 'fakturerte klienter', - 'active_client' => 'aktiv klient', - 'active_clients' => 'aktive klienter', - 'invoices_past_due' => 'Fakturaer forfalt', - 'upcoming_invoices' => 'Forestående fakturaer', - 'average_invoice' => 'Gjennomsnittlige fakturaer', - - // list pages - 'archive' => 'Arkiv', - 'delete' => 'Slett', - 'archive_client' => 'Arkiver klient', - 'delete_client' => 'Slett klient', - 'archive_payment' => 'Arkiver betaling', - 'delete_payment' => 'Slett betaling', - 'archive_credit' => 'Arkiver kreditt', - 'delete_credit' => 'Slett kreditt', - 'show_archived_deleted' => 'Vis slettet/arkivert', - 'filter' => 'Filter', - 'new_client' => 'Ny klient', - 'new_invoice' => 'Ny faktura', - 'new_payment' => 'Ny betaling', - 'new_credit' => 'Ny kreditt', - 'contact' => 'Kontakt', - 'date_created' => 'Dato opprettet', - 'last_login' => 'Siste pålogging', - 'balance' => 'Balanse', - 'action' => 'Handling', - 'status' => 'Status', - 'invoice_total' => 'Faktura total', - 'frequency' => 'Frekvens', - 'start_date' => 'Startdato', - 'end_date' => 'Sluttdato', - 'transaction_reference' => 'Transaksjonsreferanse', - 'method' => 'Betalingsmåte', - 'payment_amount' => 'Beløp', - 'payment_date' => 'Betalingsdato', - 'credit_amount' => 'Kredittbeløp', - 'credit_balance' => 'Kreditsaldo', - 'credit_date' => 'Kredittdato', - 'empty_table' => 'Ingen data er tilgjengelige i tabellen', - 'select' => 'Velg', - 'edit_client' => 'Rediger klient', - 'edit_invoice' => 'Rediger faktura', - - // client view page - 'create_invoice' => 'Lag faktura', - 'enter_credit' => 'Oppgi kreditt', - 'last_logged_in' => 'Sist pålogget', - 'details' => 'Detaljer', - 'standing' => 'Stående', - 'credit' => 'Kreditt', - 'activity' => 'Aktivitet', - 'date' => 'Dato', - 'message' => 'Beskjed', - 'adjustment' => 'Justering', - 'are_you_sure' => 'Er du sikker?', - - // payment pages - 'payment_type_id' => 'Betalingsmetode', - 'amount' => 'Beløp', - - // account/company pages - 'work_email' => 'Email', - 'language_id' => 'Språk', - 'timezone_id' => 'Tidssone', - 'date_format_id' => 'Dato format', - 'datetime_format_id' => 'Dato/Tidsformat', - 'users' => 'Brukere', - 'localization' => 'Lokaliseing', - 'remove_logo' => 'Fjern logo', - 'logo_help' => 'Støttedefiltyper: JPEG, GIF og PNG. Anbefalt størrelse: 200px bredde by 120px høyde', - 'payment_gateway' => 'Betalingsløsning', - 'gateway_id' => 'Tilbyder', - 'email_notifications' => 'Varsel via email', - 'email_sent' => 'Varsle når en faktura er sendt', - 'email_viewed' => 'Varsle når en faktura er sett', - 'email_paid' => 'Varsle når en faktura er betalt', - 'site_updates' => 'Nettsted oppdateringer', - 'custom_messages' => 'Tilpassede meldinger', - 'default_invoice_terms' => 'Sett standard fakturavilkår', - 'default_email_footer' => 'Sett standard emailsignatur', - 'import_clients' => 'Importer klientdata', - 'csv_file' => 'Velg CSV-fil', - 'export_clients' => 'Exporter klientdata', - 'select_file' => 'Vennligst velg en fil', - 'first_row_headers' => 'Bruk første rad som overskrifter', - 'column' => 'Kolonne', - 'sample' => 'Eksempel', - 'import_to' => 'Importer til', - 'client_will_create' => 'Klient vil bli opprettet', - 'clients_will_create' => 'Klienter vil bli opprettet', - - // application messages - 'created_client' => 'Klient opprettet suksessfullt', - 'created_clients' => 'Klienter opprettet suksessfullt', - 'updated_settings' => 'Innstillger oppdatert', - 'removed_logo' => 'Logo fjernet', - 'sent_message' => 'Melding sendt', - 'invoice_error' => 'Vennligst sørg for å velge en klient og rette eventuelle feil', - 'limit_clients' => 'Dessverre, dette vil overstige grensen på :count klienter', - 'payment_error' => 'Det oppstod en feil under din betaling. Vennligst prøv igjen senere.', - 'registration_required' => 'Vennligst registrer deg for å sende e-postfaktura', - 'confirmation_required' => 'Vennligst bekreft din e-postadresse', - - 'updated_client' => 'Klient oppdatert', - 'created_client' => 'Klient lagret', - 'archived_client' => 'Klient arkivert', - 'archived_clients' => 'Arkiverte :count klienter', - 'deleted_client' => 'Klient slettet', - 'deleted_clients' => 'Slettet :count kliener', - - 'updated_invoice' => 'Faktura oppdatert', - 'created_invoice' => 'Faktura opprettet', - 'cloned_invoice' => 'Faktura kopiert', - 'emailed_invoice' => 'Emailfaktura sendt', - 'and_created_client' => 'og klient opprettet', - 'archived_invoice' => 'Faktura arkivert', - 'archived_invoices' => 'Fakturaer arkivert', - 'deleted_invoice' => 'Faktura slettet', - 'deleted_invoices' => 'Slettet :count fakturaer', - - 'created_payment' => 'Betaling opprettet', - 'archived_payment' => 'Betaling arkivert', - 'archived_payments' => 'Arkiverte :count betalinger', - 'deleted_payment' => 'Betaling slettet', - 'deleted_payments' => 'Slettet :count betalinger', - 'applied_payment' => 'Betaling lagret', - - 'created_credit' => 'Kreditt opprettet', - 'archived_credit' => 'Kreditt arkivert', - 'archived_credits' => 'Arkiverte :count kreditter', - 'deleted_credit' => 'Kreditt slettet', - 'deleted_credits' => 'Slettet :count kreditter', - - // Emails - 'confirmation_subject' => 'Invoice Ninja kontobekreftelse', - 'confirmation_header' => 'Kontobekreftelse', - 'confirmation_message' => 'Vennligst åpne koblingen nedenfor for å bekrefte kontoen din.', - 'invoice_subject' => 'Ny faktura fra :account', - 'invoice_message' => 'Sor å se din faktura på :amount, klikk linken nedenfor.', - 'payment_subject' => 'Betaling mottatt', - 'payment_message' => 'Fakk for din betaling pålydende :amount.', - 'email_salutation' => 'Kjære :name,', - 'email_signature' => 'Med vennlig hilsen,', - 'email_from' => 'The InvoiceNinja Team', - 'user_email_footer' => 'For å justere varslingsinnstillingene vennligst besøk '.SITE_URL.'/company/notifications', - 'invoice_link_message' => 'Hvis du vil se din klientfaktura klikk på linken under:', - 'notification_invoice_paid_subject' => 'Faktura :invoice betalt av :client', - 'notification_invoice_sent_subject' => 'Faktura :invoice sendt til :client', - 'notification_invoice_viewed_subject' => 'Faktura :invoice sett av :client', - 'notification_invoice_paid' => 'En betaling pålydende :amount ble gjort av :client for faktura :invoice.', - 'notification_invoice_sent' => 'Email har blitt sendt til :client - Faktura :invoice pålydende :amount.', - 'notification_invoice_viewed' => ':client har nå sett faktura :invoice pålydende :amount.', - 'reset_password' => 'Du kan nullstille ditt passord ved å besøke følgende link:', - 'reset_password_footer' => 'Hvis du ikke ba om å få nullstillt ditt passord, vennligst kontakt kundeservice: ' . CONTACT_EMAIL, - - - // Payment page - 'secure_payment' => 'Sikker betaling', - 'card_number' => 'Kortnummer', - 'expiration_month' => 'Utløpsdato', - 'expiration_year' => 'Utløpsår', - 'cvv' => 'CVV', - - // Security alerts - 'confide' => [ - 'too_many_attempts' => 'For mange forsøk. Prøv igjen om noen få minutter.', - 'wrong_credentials' => 'Feil e-post eller passord.', - 'confirmation' => 'Din konto har blitt bekreftet!', - 'wrong_confirmation' => 'Feil bekreftelseskode.', - 'password_forgot' => 'Informasjonen om tilbakestilling av passord ble sendt til e-postadressen.', - 'password_reset' => 'Passordet ditt er endret.', - 'wrong_password_reset' => 'Ugyldig passord. Prøv på nytt', - ], - - // Pro Plan - 'pro_plan' => [ - 'remove_logo' => ':link for å fjerne Invoice Ninja-logoen, oppgrader til en Pro Plan', - 'remove_logo_link' => 'Klikk her', - ], - - 'logout' => 'Logg ut', - 'sign_up_to_save' => 'Registrer deg for å lagre arbeidet ditt', - 'agree_to_terms' =>'Jeg godtar Invoice Ninja :terms', - 'terms_of_service' => 'vilkår for bruk', - 'email_taken' => 'Epost-adressen er allerede registrert', - 'working' => 'Jobber', - 'success' => 'Suksess', - 'success_message' => 'Du har nå blitt registrert. Vennligst gå inn på linken som du har mottatt i e-postbekreftelsen for å bekrefte e-postadressen.', - 'erase_data' => 'Dette vil permanent slette dine data.', - 'password' => 'Passord', - - 'pro_plan_product' => 'Pro Plan', - 'pro_plan_description' => 'Ett års innmelding i Invoice Ninja Pro Plan.', - 'pro_plan_success' => 'Takk for at du valgte Invoice Ninja\'s Pro plan!

     
    - Neste steg

    en betalbar faktura er send til e-postadressen - som er tilknyttet knotoen din. For å låse opp alle de utrolige - Pro-funksjonene, kan du følge instruksjonene på fakturaen til å - betale for et år med Pro-nivå funksjonerer.

    - Finner du ikke fakturaen? Trenger du mer hjelp? Vi hjelper deg gjerne om det skulle være noe - -- kontakt oss på contact@invoiceninja.com', - - 'unsaved_changes' => 'Du har ulagrede endringer', - 'custom_fields' => 'Egendefinerte felt', - 'company_fields' => 'Selskapets felt', - 'client_fields' => 'Klientens felt', - 'field_label' => 'Felt etikett', - 'field_value' => 'Feltets verdi', - 'edit' => 'Endre', - 'set_name' => 'Sett ditt firmanavn', - 'view_as_recipient' => 'Vis som mottaker', - - // product management - 'product_library' => 'Produktbibliotek', - 'product' => 'Produkt', - 'products' => 'Produkter', - 'fill_products' => 'Automatisk-fyll produkter', - 'fill_products_help' => 'Valg av produkt vil automatisk fylle ut beskrivelse og kostnaden', - 'update_products' => 'Automatisk oppdater produkter', - 'update_products_help' => 'Å endre en faktura vil automatisk oppdatere produktbilioteket', - 'create_product' => 'Lag nytt produkt', - 'edit_product' => 'Endre produkt', - 'archive_product' => 'Arkiver produkt', - 'updated_product' => 'Produkt oppdatert', - 'created_product' => 'Produkt lagret', - 'archived_product' => 'Produkt arkivert', - 'pro_plan_custom_fields' => ':link for å aktivere egendefinerte felt ved å delta i Pro Plan', - - 'advanced_settings' => 'Avanserte innstillinger', - 'pro_plan_advanced_settings' => ':link for å aktivere avanserte innstillinger ved å delta i en Pro Plan', - 'invoice_design' => 'Fakturadesign', - 'specify_colors' => 'Egendefinerte farger', - 'specify_colors_label' => 'Velg farger som brukes i fakturaen', - - 'chart_builder' => 'Diagram bygger', - 'ninja_email_footer' => 'Bruk :site til å fakturere kundene dine og få betalt på nettet - gratis!', - 'go_pro' => 'Velg Pro', - - // Quotes - 'quote' => 'Pristilbud', - 'quotes' => 'Pristilbud', - 'quote_number' => 'Tilbuds nummer', - 'quote_number_short' => 'Tilbuds #', - 'quote_date' => 'Tilbudsdato', - 'quote_total' => 'Tilbud total', - 'your_quote' => 'Ditt tilbud', - 'total' => 'Total', - 'clone' => 'Kopier', - - 'new_quote' => 'Nytt tilbud', - 'create_quote' => 'Lag tilbud', - 'edit_quote' => 'Endre tilbud', - 'archive_quote' => 'Arkiver tilbud', - 'delete_quote' => 'Slett tilbud', - 'save_quote' => 'Lagre tilbud', - 'email_quote' => 'Email tilbudet', - 'clone_quote' => 'Kopier tilbud', - 'convert_to_invoice' => 'Konverter til en faktura', - 'view_invoice' => 'Se faktura', - 'view_client' => 'Vis klient', - 'view_quote' => 'Se tilbud', - - 'updated_quote' => 'Tilbud oppdatert', - 'created_quote' => 'Tilbud opprettet', - 'cloned_quote' => 'Tilbud kopiert', - 'emailed_quote' => 'Tilbud sendt som email', - 'archived_quote' => 'Tilbud arkivert', - 'archived_quotes' => 'Arkiverte :count tilbud', - 'deleted_quote' => 'Tilbud slettet', - 'deleted_quotes' => 'Slettet :count tilbud', - 'converted_to_invoice' => 'Tilbud konvertert til faktura', - - 'quote_subject' => 'Nytt tilbud fra :account', - 'quote_message' => 'For å se ditt tilbud pålydende :amount, klikk linken nedenfor.', - 'quote_link_message' => 'Hvis du vil se din klients tilbud, klikk på linken under:', - 'notification_quote_sent_subject' => 'Tilbud :invoice sendt til :client', - 'notification_quote_viewed_subject' => 'Tilbudet :invoice er nå sett av :client', - 'notification_quote_sent' => 'Følgende klient :client ble sendt tilbudsfaktura :invoice pålydende :amount.', - 'notification_quote_viewed' => 'Følgende klient :client har nå sett tilbudsfakturaen :invoice pålydende :amount.', - - 'session_expired' => 'Økten er utløpt.', - - 'invoice_fields' => 'Faktura felt', - 'invoice_options' => 'Faktura alternativer', - 'hide_quantity' => 'Skjul antall', - 'hide_quantity_help' => 'Hvis du alltid har 1 (en) av hvert element på fakturaen, kan du velge dette alternativet for å ikke vise antall på fakturaen.', - 'hide_paid_to_date' => 'Skjul delbetalinger', - 'hide_paid_to_date_help' => 'Bare vis delbetalinger om det har forekommet en delbetaling.', - - 'charge_taxes' => 'Inkluder skatt', - 'user_management' => 'Brukerhåndtering', - 'add_user' => 'Legg til bruker', - 'send_invite' => 'Send invitasjon', - 'sent_invite' => 'Invitasjon sendt', - 'updated_user' => 'Bruker oppdatert', - 'invitation_message' => 'Du har blitt invitert av :invitor. ', - 'register_to_add_user' => 'Vennligst registrer deg for å legge til en bruker', - 'user_state' => 'Status', - 'edit_user' => 'Endre bruker', - 'delete_user' => 'Slett bruker', - 'active' => 'Aktiv', - 'pending' => 'Avventer', - 'deleted_user' => 'Bruker slettet', - 'limit_users' => 'Dessverre, vil dette overstiger grensen på ' . MAX_NUM_USERS . ' brukere', - - 'confirm_email_invoice' => 'Are you sure you want to email this invoice?', - 'confirm_email_quote' => 'Are you sure you want to email this quote?', - 'confirm_recurring_email_invoice' => 'Recurring is enabled, are you sure you want this invoice emailed?', - - 'cancel_account' => 'Cancel Account', - 'cancel_account_message' => 'Warning: This will permanently erase all of your data, there is no undo.', - 'go_back' => 'Go Back', - - 'data_visualizations' => 'Data Visualizations', - 'sample_data' => 'Sample data shown', - 'hide' => 'Hide', - 'new_version_available' => 'A new version of :releases_link is available. You\'re running v:user_version, the latest is v:latest_version', - - 'invoice_settings' => 'Invoice Settings', - 'invoice_number_prefix' => 'Invoice Number Prefix', - 'invoice_number_counter' => 'Invoice Number Counter', - 'quote_number_prefix' => 'Quote Number Prefix', - 'quote_number_counter' => 'Quote Number Counter', - 'share_invoice_counter' => 'Share invoice counter', - 'invoice_issued_to' => 'Invoice issued to', - 'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix', - 'mark_sent' => 'Mark sent', - - 'gateway_help_1' => ':link to sign up for Authorize.net.', - 'gateway_help_2' => ':link to sign up for Authorize.net.', - 'gateway_help_17' => ':link to get your PayPal API signature.', - 'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.', - 'gateway_help_27' => ':link to sign up for TwoCheckout.', - - 'more_designs' => 'More designs', - 'more_designs_title' => 'Additional Invoice Designs', - 'more_designs_cloud_header' => 'Go Pro for more invoice designs', - 'more_designs_cloud_text' => '', - 'more_designs_self_host_header' => 'Get 6 more invoice designs for just $20', - 'more_designs_self_host_text' => '', - 'buy' => 'Buy', - 'bought_designs' => 'Successfully added additional invoice designs', - - - 'sent' => 'sent', - 'timesheets' => 'Timesheets', - - 'payment_title' => 'Enter Your Billing Address and Credit Card information', - 'payment_cvv' => '*This is the 3-4 digit number onthe back of your card', - 'payment_footer1' => '*Billing address must match address associated with credit card.', - 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - 'vat_number' => 'Vat Number', - 'id_number' => 'ID Number', - - 'white_label_link' => 'White label', - 'white_label_text' => 'Purchase a white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the top of the client pages.', - 'white_label_header' => 'White Label', - 'bought_white_label' => 'Successfully enabled white label license', - 'white_labeled' => 'White labeled', - - 'restore' => 'Restore', - 'restore_invoice' => 'Restore Invoice', - 'restore_quote' => 'Restore Quote', - 'restore_client' => 'Restore Client', - 'restore_credit' => 'Restore Credit', - 'restore_payment' => 'Restore Payment', - - 'restored_invoice' => 'Successfully restored invoice', - 'restored_quote' => 'Successfully restored quote', - 'restored_client' => 'Successfully restored client', - 'restored_payment' => 'Successfully restored payment', - 'restored_credit' => 'Successfully restored credit', - - 'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.', - 'discount_percent' => 'Percent', - 'discount_amount' => 'Amount', - - 'invoice_history' => 'Invoice History', - 'quote_history' => 'Quote History', - 'current_version' => 'Current version', - 'select_versiony' => 'Select version', - 'view_history' => 'View History', - - 'edit_payment' => 'Edit Payment', - 'updated_payment' => 'Successfully updated payment', - 'deleted' => 'Deleted', - 'restore_user' => 'Restore User', - 'restored_user' => 'Successfully restored user', - 'show_deleted_users' => 'Show deleted users', - 'email_templates' => 'Email Templates', - 'invoice_email' => 'Invoice Email', - 'payment_email' => 'Payment Email', - 'quote_email' => 'Quote Email', - 'reset_all' => 'Reset All', - 'approve' => 'Approve', - - 'token_billing_type_id' => 'Token Billing', - 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', - 'token_billing_1' => 'Disabled', - 'token_billing_2' => 'Opt-in - checkbox is shown but not selected', - 'token_billing_3' => 'Opt-out - checkbox is shown and selected', - 'token_billing_4' => 'Always', - 'token_billing_checkbox' => 'Store credit card details', - 'view_in_stripe' => 'View in Stripe', - 'use_card_on_file' => 'Use card on file', - 'edit_payment_details' => 'Edit payment details', - 'token_billing' => 'Save card details', - 'token_billing_secure' => 'The data is stored securely by :stripe_link', - - 'support' => 'Support', - 'contact_information' => 'Contact information', - '256_encryption' => '256-Bit Encryption', - 'amount_due' => 'Amount due', - 'billing_address' => 'Billing address', - 'billing_method' => 'Billing method', - 'order_overview' => 'Order overview', - 'match_address' => '*Address must match address associated with credit card.', - 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - - 'default_invoice_footer' => 'Set default invoice footer', - 'invoice_footer' => 'Invoice footer', - 'save_as_default_footer' => 'Save as default footer', - - 'token_management' => 'Token Management', - 'tokens' => 'Tokens', - 'add_token' => 'Add Token', - 'show_deleted_tokens' => 'Show deleted tokens', - 'deleted_token' => 'Successfully deleted token', - 'created_token' => 'Successfully created token', - 'updated_token' => 'Successfully updated token', - 'edit_token' => 'Edit Token', - 'delete_token' => 'Delete Token', - 'token' => 'Token', - - 'add_gateway' => 'Add Gateway', - 'delete_gateway' => 'Delete Gateway', - 'edit_gateway' => 'Edit Gateway', - 'updated_gateway' => 'Successfully updated gateway', - 'created_gateway' => 'Successfully created gateway', - 'deleted_gateway' => 'Successfully deleted gateway', - 'pay_with_paypal' => 'PayPal', - 'pay_with_card' => 'Credit card', - - 'change_password' => 'Change password', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'confirm_password' => 'Confirm password', - 'password_error_incorrect' => 'The current password is incorrect.', - 'password_error_invalid' => 'The new password is invalid.', - 'updated_password' => 'Successfully updated password', - - 'api_tokens' => 'API Tokens', - 'users_and_tokens' => 'Users & Tokens', - 'account_login' => 'Account Login', - 'recover_password' => 'Recover your password', - 'forgot_password' => 'Forgot your password?', - 'email_address' => 'Email address', - 'lets_go' => 'Let’s go', - 'password_recovery' => 'Password Recovery', - 'send_email' => 'Send email', - 'set_password' => 'Set Password', - 'converted' => 'Converted', - - -); \ No newline at end of file diff --git a/app/lang/nb_NO/validation.php b/app/lang/nb_NO/validation.php deleted file mode 100644 index 6f23dd44a852..000000000000 --- a/app/lang/nb_NO/validation.php +++ /dev/null @@ -1,102 +0,0 @@ - ":attribute må være akseptert.", - "active_url" => ":attribute er ikke en gyldig URL.", - "after" => ":attribute må være en dato etter :date.", - "alpha" => ":attribute kan kun inneholde bokstaver.", - "alpha_dash" => ":attribute kan kun inneholde bokstaver, sifre, og bindestreker.", - "alpha_num" => ":attribute kan kun inneholde bokstaver og sifre.", - "array" => ":attribute må være en matrise.", - "before" => ":attribute må være en dato før :date.", - "between" => array( - "numeric" => ":attribute må være mellom :min - :max.", - "file" => ":attribute må være mellom :min - :max kilobytes.", - "string" => ":attribute må være mellom :min - :max tegn.", - "array" => ":attribute må ha mellom :min - :max elementer.", - ), - "confirmed" => ":attribute bekreftelsen stemmer ikke", - "date" => ":attribute er ikke en gyldig dato.", - "date_format" => ":attribute samsvarer ikke med formatet :format.", - "different" => ":attribute og :other må være forskjellig.", - "digits" => ":attribute må være :digits sifre.", - "digits_between" => ":attribute må være mellom :min og :max sifre.", - "email" => ":attribute formatet er ugyldig.", - "exists" => "Valgt :attribute er ugyldig.", - "image" => ":attribute må være et bilde.", - "in" => "Valgt :attribute er ugyldig.", - "integer" => ":attribute må være heltall.", - "ip" => ":attribute må være en gyldig IP-adresse.", - "max" => array( - "numeric" => ":attribute kan ikke være høyere enn :max.", - "file" => ":attribute kan ikke være større enn :max kilobytes.", - "string" => ":attribute kan ikke være mer enn :max tegn.", - "array" => ":attribute kan ikke inneholde mer enn :max elementer.", - ), - "mimes" => ":attribute må være av filtypen: :values.", - "min" => array( - "numeric" => ":attribute må minimum være :min.", - "file" => ":attribute må minimum være :min kilobytes.", - "string" => ":attribute må minimum være :min tegn.", - "array" => ":attribute må inneholde minimum :min elementer.", - ), - "not_in" => "Valgt :attribute er ugyldig.", - "numeric" => ":attribute må være et siffer.", - "regex" => ":attribute formatet er ugyldig.", - "required" => ":attribute er påkrevd.", - "required_if" => ":attribute er påkrevd når :other er :value.", - "required_with" => ":attribute er påkrevd når :values er valgt.", - "required_without" => ":attribute er påkrevd når :values ikke er valgt.", - "same" => ":attribute og :other må sammsvare.", - "size" => array( - "numeric" => ":attribute må være :size.", - "file" => ":attribute må være :size kilobytes.", - "string" => ":attribute må være :size tegn.", - "array" => ":attribute må inneholde :size elementer.", - ), - "unique" => ":attribute er allerede blitt tatt.", - "url" => ":attribute formatet er ugyldig.", - - "positive" => ":attribute må være mer enn null.", - "has_credit" => "Klienten har ikke høy nok kreditt.", - "notmasked" => "Verdiene er skjult", - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => array(), - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => array(), - -); diff --git a/app/lang/nl/pagination.php b/app/lang/nl/pagination.php deleted file mode 100644 index 583b463a6375..000000000000 --- a/app/lang/nl/pagination.php +++ /dev/null @@ -1,20 +0,0 @@ - '« Vorige', - - 'next' => 'Volgende »', - -); \ No newline at end of file diff --git a/app/lang/nl/public.php b/app/lang/nl/public.php deleted file mode 100644 index 7f5ecb9008e2..000000000000 --- a/app/lang/nl/public.php +++ /dev/null @@ -1,209 +0,0 @@ - 'Free Open-Source Online Invoicing', - 'description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - 'invoice_now' => 'Invoice Now', - 'no_signup_needed' => 'No signup needed', - - 'link_blog' => 'Blog', - 'link_about_us' => 'About Us', - 'link_contact_us' => 'Contact Us', - 'link_features' => 'Features', - 'link_plans' => 'Plans', - 'link_compare' => 'Compare', - 'link_testimonials' => 'Testimonials', - 'link_faq' => 'FAQ', - - 'my_account' => 'My Account', - 'login' => 'Login', - 'connect_with_us' => 'Connect with Us', - 'safe_and_secure' => 'Safe & Secure', - 'toggle_navigation' => 'Toggle navigation', - - - 'home' => [ - 'header' => 'THE SIMPLE & FREE WAY TO INVOICE CLIENTS', - 'sub_header' => 'It\'s just that easy. Stop spending time on complicated and expensive invoicing.
    No fuss, just get started and get paid.', - 'footer' => 'Simple, Intuitive Invoicing,Anywhere.', - - 'free_always' => 'Free, Always', - 'free_always_text' => 'Send unlimited invoices to 500 clients per month and never pay a dime. You are welcome to unlock still more awesome features with our Pro Plan, but our free app is a top-notch product that will do everything you need it to do, without any subscription or fees.', - - 'open_source' => 'Open-Source', - 'open_source_text' => 'No mysterious corporate silos here! Just full source code transparency and a devotion to working with anyone interested to build a better electronic invoicing platform. We even offer a handy zip download for a self-hosted version of Invoice Ninja.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text' => 'See how your edited invoice will look as a print-friendly pdf while you make the changes. Our pdf generator works in real time as you make your changes. You can even preview four beautiful preset designs. Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text' => 'Invoices sent with our app integrate seamlessly with the gateway credit card processor of your choice, to make it super easy for your clients to send you money with just a few clicks. We play nicely with Authorize.Net, Stripe, PayPal and loads more - 23 in all!', - ], - - 'about' => [ - 'header' => 'About Invoice Ninja', - 'what_is' => 'What is Invoice Ninja?', - - 'team_ninja' => 'Team Ninja', - 'team_ninja_text' => 'Invoice Ninja is managed by a team of seasoned web workers. We launched in early 2014 and have been thrilled by the enthusiastic response we’ve received from our growing community of users.', - - 'co_founder' => 'Co-Founder', - 'ceo' => 'CEO', - 'cto' => '', - 'designer' => 'Designer', - 'marketing' => 'Marketing', - - 'shalom_bio' => 'Shalom has specialized in small business development for nearly 10 years. In addition to InvoiceNinja.com Shalom is CEO of a leading tour agency in Israel.', - 'hillel_bio' => 'Hillel has been developing enterprise applications for 15 years. His open-source AutoComplete component has been used by thousands of developers around the world.', - 'razi_bio' => 'Razi is a pixel nerd with a great deal of experience in design for web sites and applications. When she isn\'t busy with InvoiceNinja she runs a small web agency in Stockholm called kantorp-wegl.in', - 'ben_bio' => 'A veteran digital marketer and content strategist, Ben specializes in building communities around brands that make business easier for freelancers, SMBs and micro-entrepreneurs.', - ], - - 'contact' => [ - 'header' => 'Questions, special requests, or just want to say hi?', - 'sub_header' => 'Fill in the form below and we\'ll get back to you as soon as possible. Hope to hear from you!', - 'other_ways' => 'Other ways to reach us', - - 'name' => 'Name', - 'name_help' => 'Please enter your name.', - - 'email' => 'Email Address', - 'email_help' => 'Please enter a valid e-mail address.', - - 'message' => 'Message', - 'message_help' => 'Please enter a message.', - 'send_message' => 'Send Message', - ], - - 'features' => [ - 'header' => 'The Features', - 'footer' => 'Like what you see?', - 'footer_action' => 'Get started today!', - - 'open_source' => 'Open Source Platform', - 'open_source_text1' => 'Set the code free! Here at Invoice Ninja, we’re all about creating the best possible app, and inviting scrutiny via full code transparency is a central manifestation of this value.', - 'open_source_text2' => 'We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.', - - 'free_forever' => 'FREE. Forever.', - 'free_forever_text1' => 'Yeah, you read that correctly. You don’t have to pay us a cent to use our tools. We know how tough it is to make ends meet as a web-based business, and we’re bent on providing a top-notch product that will do everything you need it to do, without any subscription or opt-in fees.', - 'free_forever_text2' => 'Try Invoice Ninja out. You literally have nothing to lose. We’re confident that you’ll find the experience so positive that you’ll never need to turn elsewhere.', - - 'secure' => 'Secure & Private', - 'secure_text1' => 'Invoice Ninja has been built from the ground up to keep your data safe. Only you have access to your login & accounting details, & we will never share your transaction data to any third party.', - 'secure_text2' => 'Our website operates with 256-bit encryption, which is even more secure than most banking websites. Invoice Ninja uses the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. We feel safe here and have invested heavily in measures to ensure that you do too.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text1' => 'With Invoice Ninja, we’ve done away with the need for cumbersome multi-click invoice previewing after each save.', - 'live_pdf_text2' => 'When you enter the details of your customer and/or invoice in our editor, you can instantly see the results in the pdf preview pane below. Want to see what your invoice would look like in a different layout style? The live pdf can show you four beautiful preset styles in real time too.', - 'live_pdf_text3' => 'Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text1' => 'Invoice Ninja seamlessly integrates with all of the top internet payment processors and gateways so you can get paid for your work quickly and easily.', - 'online_payments_text2' => 'Invoices created with our tools aren’t just for bookkeeping purposes - they bring in the Benjamins. We also make it super easy to choose the right gateway for the specific needs of your business and are happy to help you to get started working with the gateway of your choice. What’s more, we’re constantly working on rolling out additional gateway integrations, so if you don’t see the one you use here, just let us know, and there’s a good chance we’ll add it for you.', - ], - - 'plans' => [ - 'header' => 'The Plans', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - 'pro_plan' => 'Pro Plan', - - 'go_pro' => 'Go Pro to Unlock Premium Invoice Ninja Features', - 'go_pro_text' => 'We believe that the free version of Invoice Ninja is a truly awesome product loaded with the key features you need to bill your clients electronically. But for those who crave still more Ninja awesomeness, we\'ve unmasked the Invoice Ninja Pro plan, which offers more versatility, power and customization options for just $50 per year.', - - 'number_clients' => 'Number of clients per account', - 'unlimited_invoices' => 'Unlimited client invoices', - 'company_logo' => 'Add your company logo', - 'live_pdf' => 'Live .PDF invoice creation', - 'four_templates' => '4 beautiful invoice templates', - 'payments' => 'Accept credit card payments', - 'additional_templates' => 'Additional invoice templates', - 'multi_user' => 'Multi-user support', - 'quotes' => 'Quotes/pro-forma invoices', - 'advanced_settings' => 'Advanced invoice settings', - 'data_vizualizations' => 'Dynamic data vizualizations', - 'email_support' => 'Priority email support', - 'remove_created_by' => 'Remove "Created by Invoice Ninja"', - 'latest_features' => 'Latest and greatest features', - 'pricing' => 'Pricing', - 'free_always' => 'Free /Always!', - 'year_price' => '$50 /Year', - ], - - 'compare' => [ - 'header' => 'How We Compare', - 'free_plan_comparison' => 'Free Plan Comparison', - 'paid_plan_comparison' => 'Paid Plan Comparison', - 'app' => 'App', - 'cost' => 'Cost', - 'clients' => 'Clients', - 'invoices' => 'Invoices', - 'payment_gateways' => 'Payment Gateways', - 'custom_logo' => 'Custom Logo', - 'multiple_templates' => 'Multiple Templates', - 'recurring_payments' => 'Recurring Payments', - 'open_source' => 'Open Source', - 'per_month' => 'per month', - 'per_year' => 'per year', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - ], - - 'testimonials' => [ - 'testimonials' => 'testimonials', - 'header' => 'Since we launched Invoice Ninja in March of 2014, we\'ve been overwhelmed by a deluge of user love. Here\'s a small taste of the glowing things people have to say about the great experiences the\'ve been having with our free e-invoicing app!', - ], - - 'faq' => [ - 'header' => 'The FAQs', - - 'question1' => 'I know it isn’t standard ninja practice to reveal too many identity details, but who are you guys exactly?', - 'answer1' => 'We’re a small team of highly skilled digital journeymen based in Israel. We love open source, we love disrupting the big business status quo, and we love building helpful tools that are easy to use. We believe that everyone else’s web-based cash flow tools are unnecessarily expensive, clunky and complicated - and we’re bent on proving these beliefs with Invoice Ninja.', - - 'question2' => 'How do I get started using Invoice Ninja?', - 'answer2' => 'Just click on the big, yellow "Invoice Now" button on our homepage!', - - 'question3' => 'Do you offer customer support?', - 'answer3' => 'We sure do. Support is super important to us. Feel free to email us at support@invoiceninja.com with any questions you might have. We almost always reply within one business day.', - - 'question4' => 'Is Invoice Ninja really free? For how long?', - 'answer4' => 'Yes, our basic app is 100% free. Forever and ever. For real. We also offer a paid Pro version of Invoice Ninja (you can learn all about its awesome features here), but it\'s important to us that the free version have all of the key features people need to do business.', - - 'question5' => 'How is Invoice Ninja able to offer this all for free? How are you making any money?', - 'answer5' => 'We’re mostly in this line of work because we believe it’s high time that a good electronic invoicing tool be available for free. There isn’t much money in it - yet. We do offer a paid Pro version of the app that we\'ve souped up with premium features. And when our users open up new accounts with payment processor gateways by clicking on links from our site, we make modest commissions as a gateway affiliate. So if zillions of freelancers and small businesses start running credit card charges through Invoice Ninja, or if scores of users go Pro, there’s a decent chance we\'ll recover our investment.', - - 'question6' => 'Really? So does that mean you’re not collecting information about me so you can sell me stuff or so that some other company can spam me according to my interests?', - 'answer6' => 'No way. We’re not mining your data, and we’re not selling you out. That wouldn’t be very ninja of us, would it?', - - 'question7' => 'But don’t you have access to my merchant and banking accounts?', - 'answer7' => 'Actually, we don’t. When you link an account at a third party financial institution with your Invoice Ninja account, you’re essentially giving our app permission to send money to you and nothing more. This is all managed by the tech teams at your financial service providers, who go to great lengths to ensure their integrations can’t be exploited or abused.', - - 'question8' => 'Given that Invoice Ninja is an open source app, how can I be sure that my financial information is safe with you?', - 'answer8' => 'There\'s a big difference between “open source" and “open data.†Anyone who wants to use the code that drives Invoice Ninja to create their own products or to make improvements to ours can do so. It’s available for anyone who wants to download and work with. But that’s just the source code - totally separate from what happens with that code on the Invoice Ninja servers. You’re the only one who has full access to what you\'re doing with our product. For more details on the security of our servers and how we handle our users\' information, please read the next question.', - - 'question9' => 'So just how secure is this app?', - 'answer9' => 'Extremely. Data uploaded by our users runs through connections with 256-bit encryption, which is twice as many encryption bits that most bank websites use. We use the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. It’s fancy stuff that we put in place to make sure no one can gain access to your information except you.', - - 'question10' => 'How do I remove the small "Created by Invoice Ninja†image from the bottom of my invoices?', - 'answer10' => 'The amazingly affordable Pro version of Invoice Ninja allows you to do this and oh so much more.', - - 'question11' => 'Can I see what the application looks like with sample data?', - 'answer11' => 'Sure, click here to try out our demo account.', - - 'question12' => 'I hear that there\'s a version of Invoice Ninja that I can install myself on my own servers? Where can I learn more about this?', - 'answer12' => 'The rumors are true! Full instructions are available here.', - - 'question13' => 'I\'m seeing the options to assign various statuses to my invoices, clients, credits and payments. What\'s the difference between "active," "archived" and "deleted"?', - 'answer13' => 'These three handy statuses for invoices, clients, credits and payments allow you to keep your own cash flow management as straightforward and accessible as possible from your Invoice Ninja dashboard. None of these statuses will actually purge any records from your account - even "deleted" can always be recovered at any point in the future. "Active" means the record will appear in the relevant queue of records. To stash a record away so it\'s still fully operational but no longer cluttering up your interface, simply set it to be "archived." To deactivate a record and render it inaccessible to your clients, mark it "deleted."', - - 'question14' => 'My question wasn\'t covered by any of the content on this FAQ page. How can I get in touch with you?', - 'answer14' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - 'miss_something' => 'Did we miss something?', - 'miss_something_text' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - ], - - -]; \ No newline at end of file diff --git a/app/lang/nl/reminders.php b/app/lang/nl/reminders.php deleted file mode 100644 index 1a517a658edd..000000000000 --- a/app/lang/nl/reminders.php +++ /dev/null @@ -1,24 +0,0 @@ - "Wachtwoord moet minimaal zes tekens lang zijn en de wachtwoorden moeten overeenkomen.", - - "user" => "Geen gebruiker bekend met dat e-mailadres.", - - "token" => "Dit wachtwoord reset token is niet geldig.", - - "sent" => "Wachtwoord herinnering verzonden!", - -); diff --git a/app/lang/nl/texts.php b/app/lang/nl/texts.php deleted file mode 100644 index 45304e64b143..000000000000 --- a/app/lang/nl/texts.php +++ /dev/null @@ -1,578 +0,0 @@ - 'Organisatie', - 'name' => 'Naam', - 'website' => 'Website', - 'work_phone' => 'Telefoon', - 'address' => 'Adres', - 'address1' => 'Straat', - 'address2' => 'Bus/Suite', - 'city' => 'Gemeente', - 'state' => 'Staat/Provincie', - 'postal_code' => 'Postcode', - 'country_id' => 'Land', - 'contacts' => 'Contacten', - 'first_name' => 'Voornaam', - 'last_name' => 'Achternaam', - 'phone' => 'Telefoon', - 'email' => 'E-mail', - 'additional_info' => 'Extra Informatie', - 'payment_terms' => 'Betalingsvoorwaarden', - 'currency_id' => 'Munteenheid', - 'size_id' => 'Grootte', - 'industry_id' => 'Industrie', - 'private_notes' => 'Privé Bericht', - - // invoice - 'invoice' => 'Factuur', - 'client' => 'Klant', - 'invoice_date' => 'Factuurdatum', - 'due_date' => 'Vervaldatum', - 'invoice_number' => 'Factuur nummer', - 'invoice_number_short' => 'Factuur #', - 'po_number' => 'Bestelnummer', - 'po_number_short' => 'Bestel #', - 'frequency_id' => 'Hoe vaak', - 'discount' => 'Korting', - 'taxes' => 'Belastingen', - 'tax' => 'Belasting', - 'item' => 'Naam', - 'description' => 'Beschrijving', - 'unit_cost' => 'Eenheidsprijs', - 'quantity' => 'Aantal', - 'line_total' => 'Totaal lijn', - 'subtotal' => 'Subtotaal', - 'paid_to_date' => 'Betaal Datum', - 'balance_due' => 'Openstaand saldo', - 'invoice_design_id' => 'Ontwerp', - 'terms' => 'Voorwaarden', - 'your_invoice' => 'Jouw factuur', - - 'remove_contact' => 'Verwijder contact', - 'add_contact' => 'Voeg contact toe', - 'create_new_client' => 'Maak nieuwe klant', - 'edit_client_details' => 'Pas klantdetails aan', - 'enable' => 'Activeer', - 'learn_more' => 'Meer te weten komen', - 'manage_rates' => 'Beheer prijzen', - 'note_to_client' => 'Bericht aan klant', - 'invoice_terms' => 'Factuur voorwaarden', - 'save_as_default_terms' => 'Opslaan als standaard voorwaarden', - 'download_pdf' => 'Download PDF', - 'pay_now' => 'Betaal nu', - 'save_invoice' => 'Sla Factuur op', - 'clone_invoice' => 'Kopieer Factuur', - 'archive_invoice' => 'Archiveer Factuur', - 'delete_invoice' => 'Verwijder Factuur', - 'email_invoice' => 'E-mail Factuur', - 'enter_payment' => 'Betaling ingeven', - 'tax_rates' => 'BTW tarief', - 'rate' => 'Tarief', - 'settings' => 'Instellingen', - 'enable_invoice_tax' => 'Activeer instelling van BTW op volledige factuur', - 'enable_line_item_tax' => 'Activeer instelling van BTW per lijn', - - // navigation - 'dashboard' => 'Dashboard', - 'clients' => 'Klanten', - 'invoices' => 'Facturen', - 'payments' => 'Betalingen', - 'credits' => 'Kredietnota\'s', - 'history' => 'Geschiedenis', - 'search' => 'Zoeken', - 'sign_up' => 'Aanmelden', - 'guest' => 'Gast', - 'company_details' => 'Bedrijfsdetails', - 'online_payments' => 'Online betalingen', - 'notifications' => 'Meldingen', - 'import_export' => 'Importeer/Exporteer', - 'done' => 'Klaar', - 'save' => 'Opslaan', - 'create' => 'Aanmaken', - 'upload' => 'Uploaden', - 'import' => 'Importeer', - 'download' => 'Downloaden', - 'cancel' => 'Annuleren', - 'provide_email' => 'Geef een geldig e-mailadres aub.', - 'powered_by' => 'Factuur gemaakt via', - 'no_items' => 'Geen artikelen', - - // recurring invoices - 'recurring_invoices' => 'Terugkerende facturen', - 'recurring_help' => '

    Zend klanten automatisch wekelijks, twee keer per maand, maandelijks, per kwartaal of jaarlijks dezelfde facturen.

    -

    Gebruik :MONTH, :QUARTER of :YEAR voor dynamische datums. Eenvoudige wiskunde werkt ook, bijvoorbeeld :MONTH-1.

    -

    Voorbeelden van dynamische factuur variabelen:

    -
      -
    • "Fitness lidmaatschap voor de maand :MONTH" => "Fitness lidmaatschap voor de maand juli"
    • -
    • "Jaarlijks abonnement :YEAR+1" => "Jaarlijks abonnement 2015"
    • -
    • "Betaling voor :QUARTER+1" => "Betaling voor Q2"
    • -
    ', - - // dashboard - 'in_total_revenue' => 'in totale opbrengst', - 'billed_client' => 'Gefactureerde klant', - 'billed_clients' => 'Gefactureerde klanten', - 'active_client' => 'Actieve klant', - 'active_clients' => 'Actieve klanten', - 'invoices_past_due' => 'Vervallen facturen', - 'upcoming_invoices' => 'Aankomende facturen', - 'average_invoice' => 'Gemiddelde factuur', - - // list pages - 'archive' => 'Archiveer', - 'delete' => 'Verwijder', - 'archive_client' => 'Archiveer klant', - 'delete_client' => 'Verwijder klant', - 'archive_payment' => 'Archiveer betaling', - 'delete_payment' => 'Verwijder betaling', - 'archive_credit' => 'Archiveer kredietnota', - 'delete_credit' => 'Verwijder kredietnota', - 'show_archived_deleted' => 'Toon gearchiveerde/verwijderde', - 'filter' => 'Filter', - 'new_client' => 'Nieuwe Klant', - 'new_invoice' => 'Nieuwe Factuur', - 'new_payment' => 'Nieuwe Betaling', - 'new_credit' => 'Nieuwe Kredietnota', - 'contact' => 'Contact', - 'date_created' => 'Aanmaakdatum', - 'last_login' => 'Laatste login', - 'balance' => 'Saldo', - 'action' => 'Actie', - 'status' => 'Status', - 'invoice_total' => 'Factuur totaal', - 'frequency' => 'Frequentie', - 'start_date' => 'Startdatum', - 'end_date' => 'Einddatum', - 'transaction_reference' => 'Transactie Referentie', - 'method' => 'Methode', - 'payment_amount' => 'Betalingsbedrag', - 'payment_date' => 'Betalingsdatum', - 'credit_amount' => 'Kredietbedrag', - 'credit_balance' => 'Kredietsaldo', - 'credit_date' => 'Kredietdatum', - 'empty_table' => 'Geen gegevens beschikbaar in de tabel', - 'select' => 'Selecteer', - 'edit_client' => 'Klant aanpassen', - 'edit_invoice' => 'Factuur aanpassen', - - // client view page - 'create_invoice' => 'Factuur aanmaken', - 'enter_credit' => 'Kredietnota ingeven', - 'last_logged_in' => 'Laatste login', - 'details' => 'Details', - 'standing' => 'Openstaand', - 'credit' => 'Krediet', - 'activity' => 'Activiteit', - 'date' => 'Datum', - 'message' => 'Bericht', - 'adjustment' => 'Aanpassing', - 'are_you_sure' => 'Ben je zeker?', - - // payment pages - 'payment_type_id' => 'Betalingstype', - 'amount' => 'Bedrag', - - // account/company pages - 'work_email' => 'E-mail', - 'language_id' => 'Taal', - 'timezone_id' => 'Tijdszone', - 'date_format_id' => 'Formaat datum', - 'datetime_format_id' => 'Datum/Tijd Formaat', - 'users' => 'Gebruikers', - 'localization' => 'Localisatie', - 'remove_logo' => 'Verwijder logo', - 'logo_help' => 'Ondersteund: JPEG, GIF en PNG. Aangeraden hoogte: 120px', - 'payment_gateway' => 'Betalingsmiddel', - 'gateway_id' => 'Leverancier', - 'email_notifications' => 'E-mail meldingen', - 'email_sent' => 'E-mail me wanneer een factuur is verzonden', - 'email_viewed' => 'E-mail me wanneer een factuur is bekeken', - 'email_paid' => 'E-mail me wanneer een factuur is betaald', - 'site_updates' => 'Site Aanpassingen', - 'custom_messages' => 'Aangepaste berichten', - 'default_invoice_terms' => 'Stel standaard factuursvoorwaarden in', - 'default_email_footer' => 'Stel standaard e-mail signatuur in', - 'import_clients' => 'Importeer Klant Gegevens', - 'csv_file' => 'Selecteer CSV bestand', - 'export_clients' => 'Exporteer Klant Gegevens', - 'select_file' => 'Selecteer alstublieft een bestand', - 'first_row_headers' => 'Gebruik eerste rij als hoofdding', - 'column' => 'Kolom', - 'sample' => 'Voorbeeld', - 'import_to' => 'Importeer naar', - 'client_will_create' => 'klant zal aangemaakt worden', - 'clients_will_create' => 'klanten zullen aangemaakt worden', - - // application messages - 'created_client' => 'Klant succesvol aangemaakt', - 'created_clients' => ':count klanten succesvol aangemaakt', - 'updated_settings' => 'Instellingen succesvol aangepast', - 'removed_logo' => 'Logo succesvol verwijderd', - 'sent_message' => 'Bericht succesvol verzonden', - 'invoice_error' => 'Selecteer een klant alstublieft en corrigeer mogelijke fouten', - 'limit_clients' => 'Sorry, dit zal de klantenlimiet van :count klanten overschrijden', - 'payment_error' => 'Er was een fout bij het verwerken van uw betaling. Probeer later alstublieft opnieuw.', - 'registration_required' => 'Meld je aan om een factuur te mailen', - 'confirmation_required' => 'Bevestig je e-mail adres alstublieft', - - 'updated_client' => 'Klant succesvol aangepast', - 'created_client' => 'Klant succesvol aangemaakt', - 'archived_client' => 'Klant succesvol gearchiveerd', - 'archived_clients' => ':count klanten succesvol gearchiveerd', - 'deleted_client' => 'Klant succesvol verwijderd', - 'deleted_clients' => ':count klanten succesvol verwijderd', - - 'updated_invoice' => 'Factuur succesvol aangepast', - 'created_invoice' => 'Factuur succesvol aangemaakt', - 'cloned_invoice' => 'Factuur succesvol gekopieerd', - 'emailed_invoice' => 'Factuur succesvol gemaild', - 'and_created_client' => 'en klant aangemaakt', - 'archived_invoice' => 'Factuur succesvol gearchiveerd', - 'archived_invoices' => ':count facturen succesvol gearchiveerd', - 'deleted_invoice' => 'Factuur succesvol verwijderd', - 'deleted_invoices' => ':count facturen succesvol verwijderd', - - 'created_payment' => 'Betaling succesvol aangemaakt', - 'archived_payment' => 'Betaling succesvol gearchiveerd', - 'archived_payments' => ':count betalingen succesvol gearchiveerd', - 'deleted_payment' => 'Betaling succesvol verwijderd', - 'deleted_payments' => ':count betalingen succesvol verwijderd', - 'applied_payment' => 'Betaling succesvol toegepast', - - 'created_credit' => 'Kredietnota succesvol aangemaakt', - 'archived_credit' => 'Kredietnota succesvol gearchiveerd', - 'archived_credits' => ':count kredietnota\'s succesvol gearchiveerd', - 'deleted_credit' => 'Kredietnota succesvol verwijderd', - 'deleted_credits' => ':count kredietnota\'s succesvol verwijderd', - - // E-mails - 'confirmation_subject' => 'Invoice Ninja Bevestiging Account', - 'confirmation_header' => 'Bevestiging Account', - 'confirmation_message' => 'Ga alstublieft naar onderstaande link om je account te bevestiging.', - 'invoice_message' => 'Om je factuur voor :amount te bekijken, klik op onderstaande link.', - 'payment_subject' => 'Betaling ontvangen', - 'payment_message' => 'Bedankt voor je betaling van :amount.', - 'email_salutation' => 'Beste :name,', - 'email_signature' => 'Met vriendelijke groeten,', - 'email_from' => 'Het InvoiceNinja Team', - 'user_email_footer' => 'Ga alstublieft naar '.SITE_URL.'/company/notifications om je e-mail notificatie instellingen aan te passen ', - 'invoice_link_message' => 'Klik op volgende link om de Factuur van je klant te bekijken:', - 'notification_invoice_paid_subject' => 'Factuur :invoice is betaald door :client', - 'notification_invoice_sent_subject' => 'Factuur :invoice is gezonden door :client', - 'notification_invoice_viewed_subject' => 'Factuur :invoice is bekeken door :client', - 'notification_invoice_paid' => 'Een betaling voor :amount is gemaakt door klant :client voor Factuur :invoice.', - 'notification_invoice_sent' => 'De volgende klant :client heeft Factuur :invoice voor :amount gemaild gekregen.', - 'notification_invoice_viewed' => 'De volgende klant :client heeft Factuur :invoice voor :amount bekeken.', - 'reset_password' => 'Je kan het paswoord van je account resetten door op volgende link te klikken:', - 'reset_password_footer' => 'Als je deze paswoord reset niet aangevraagd hebt contacteer dan onze helpdesk alstublieft: ' . CONTACT_EMAIL, - - // Payment page - 'secure_payment' => 'Veilige betaling', - 'card_number' => 'Kaart nummer', - 'expiration_month' => 'Verval maand', - 'expiration_year' => 'Verval jaar', - 'cvv' => 'CVV', - - // Security alerts - 'confide' => [ - 'too_many_attempts' => 'Te veel pogingen. Probeer opnieuw binnen enkele minuten.', - 'wrong_credentials' => 'Verkeerd e-mailadres of paswoord.', - 'confirmation' => 'Je account is bevestigd!', - 'wrong_confirmation' => 'Verkeerde bevestigingscode.', - 'password_forgot' => 'De informatie over je paswoord reset is verzonden naar je e-mailadres.', - 'password_reset' => 'Je paswoord is succesvol aangepast.', - 'wrong_password_reset' => 'Ongeldig paswoord. Probeer opnieuw', - ], - - // Pro Plan - 'pro_plan' => [ - 'remove_logo' => ':link om het Invoice Ninja logo te verwijderen door het pro plan te nemen', - 'remove_logo_link' => 'Klik hier', - ], - - 'logout' => 'Afmelden', - 'sign_up_to_save' => 'Registreer je om je werk op te slaan', - 'agree_to_terms' =>'Ik accepteer de Invoice Ninja :terms', - 'terms_of_service' => 'Gebruiksvoorwaarden', - 'email_taken' => 'Het e-mailadres is al geregistreerd', - 'working' => 'Actief', - 'success' => 'Succes', - 'success_message' => 'Je bent succesvol geregistreerd. Ga alstublieft naar de link in de bevestigingsmail om je e-mailadres te verifiëren.', - 'erase_data' => 'Dit zal uw data permanent verwijderen.', - 'password' => 'Wachtwoord', - 'invoice_subject' => 'Nieuwe factuur van :account', - 'close' => 'Sluiten', - - 'pro_plan_product' => 'Pro Plan', - 'pro_plan_description' => 'One year enrollment in the Invoice Ninja Pro Plan.', - 'pro_plan_success' => 'Thanks for joining! Once the invoice is paid your Pro Plan membership will begin.', - - 'unsaved_changes' => 'You have unsaved changes', - 'custom_fields' => 'Custom fields', - 'company_fields' => 'Company Fields', - 'client_fields' => 'Client Fields', - 'field_label' => 'Field Label', - 'field_value' => 'Field Value', - 'edit' => 'Edit', - 'view_invoice' => 'View invoice', - 'view_as_recipient' => 'View as recipient', - - // product management - 'product_library' => 'Product Library', - 'product' => 'Product', - 'products' => 'Products', - 'fill_products' => 'Auto-fill products', - 'fill_products_help' => 'Selecting a product will automatically set the description and cost', - 'update_products' => 'Auto-update products', - 'update_products_help' => 'Updating an invoice will automatically update the products', - 'create_product' => 'Create Product', - 'edit_product' => 'Edit Product', - 'archive_product' => 'Archive Product', - 'updated_product' => 'Successfully updated product', - 'created_product' => 'Successfully created product', - 'archived_product' => 'Successfully archived product', - 'pro_plan_custom_fields' => ':link to enable custom fields by joining the Pro Plan', - - 'advanced_settings' => 'Advanced Settings', - 'pro_plan_advanced_settings' => ':link to enable the advanced settings by joining the Pro Plan', - 'invoice_design' => 'Invoice Design', - 'specify_colors' => 'Specify colors', - 'specify_colors_label' => 'Select the colors used in the invoice', - - 'chart_builder' => 'Chart Builder', - 'ninja_email_footer' => 'Use :site to invoice your clients and get paid online for free!', - 'go_pro' => 'Go Pro', - - // Quotes - 'quote' => 'Quote', - 'quotes' => 'Quotes', - 'quote_number' => 'Quote Number', - 'quote_number_short' => 'Quote #', - 'quote_date' => 'Quote Date', - 'quote_total' => 'Quote Total', - 'your_quote' => 'Your Quote', - 'total' => 'Total', - 'clone' => 'Clone', - - 'new_quote' => 'New Quote', - 'create_quote' => 'Create Quote', - 'edit_quote' => 'Edit Quote', - 'archive_quote' => 'Archive Quote', - 'delete_quote' => 'Delete Quote', - 'save_quote' => 'Save Quote', - 'email_quote' => 'Email Quote', - 'clone_quote' => 'Clone Quote', - 'convert_to_invoice' => 'Convert to Invoice', - 'view_invoice' => 'View Invoice', - 'view_quote' => 'View Quote', - 'view_client' => 'View Client', - - 'updated_quote' => 'Successfully updated quote', - 'created_quote' => 'Successfully created quote', - 'cloned_quote' => 'Successfully cloned quote', - 'emailed_quote' => 'Successfully emailed quote', - 'archived_quote' => 'Successfully archived quote', - 'archived_quotes' => 'Successfully archived :count quotes', - 'deleted_quote' => 'Successfully deleted quote', - 'deleted_quotes' => 'Successfully deleted :count quotes', - 'converted_to_invoice' => 'Successfully converted quote to invoice', - - 'quote_subject' => 'New quote from :account', - 'quote_message' => 'To view your quote for :amount, click the link below.', - 'quote_link_message' => 'To view your client quote click the link below:', - 'notification_quote_sent_subject' => 'Quote :invoice was sent to :client', - 'notification_quote_viewed_subject' => 'Quote :invoice was viewed by :client', - 'notification_quote_sent' => 'The following client :client was emailed Quote :invoice for :amount.', - 'notification_quote_viewed' => 'The following client :client viewed Quote :invoice for :amount.', - - 'session_expired' => 'Your session has expired.', - - 'invoice_fields' => 'Invoice Fields', - 'invoice_options' => 'Invoice Options', - 'hide_quantity' => 'Hide quantity', - 'hide_quantity_help' => 'If your line items quantities are always 1, then you can declutter invoices by no longer displaying this field.', - 'hide_paid_to_date' => 'Hide paid to date', - 'hide_paid_to_date_help' => 'Only display the "Paid to Date" area on your invoices once a payment has been received.', - - 'charge_taxes' => 'Charge taxes', - 'user_management' => 'User Management', - 'add_user' => 'Add User', - 'send_invite' => 'Send invitation', - 'sent_invite' => 'Successfully sent invitation', - 'updated_user' => 'Successfully updated user', - 'invitation_message' => 'You\'ve been invited by :invitor. ', - 'register_to_add_user' => 'Please sign up to add a user', - 'user_state' => 'State', - 'edit_user' => 'Edit User', - 'delete_user' => 'Delete User', - 'active' => 'Active', - 'pending' => 'Pending', - 'deleted_user' => 'Successfully deleted user', - 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', - - 'confirm_email_invoice' => 'Are you sure you want to email this invoice?', - 'confirm_email_quote' => 'Are you sure you want to email this quote?', - 'confirm_recurring_email_invoice' => 'Recurring is enabled, are you sure you want this invoice emailed?', - - 'cancel_account' => 'Cancel Account', - 'cancel_account_message' => 'Warning: This will permanently erase all of your data, there is no undo.', - 'go_back' => 'Go Back', - - 'data_visualizations' => 'Data Visualizations', - 'sample_data' => 'Sample data shown', - 'hide' => 'Hide', - 'new_version_available' => 'A new version of :releases_link is available. You\'re running v:user_version, the latest is v:latest_version', - - 'invoice_settings' => 'Invoice Settings', - 'invoice_number_prefix' => 'Invoice Number Prefix', - 'invoice_number_counter' => 'Invoice Number Counter', - 'quote_number_prefix' => 'Quote Number Prefix', - 'quote_number_counter' => 'Quote Number Counter', - 'share_invoice_counter' => 'Share invoice counter', - 'invoice_issued_to' => 'Invoice issued to', - 'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix', - 'mark_sent' => 'Mark sent', - - - 'gateway_help_1' => ':link to sign up for Authorize.net.', - 'gateway_help_2' => ':link to sign up for Authorize.net.', - 'gateway_help_17' => ':link to get your PayPal API signature.', - 'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.', - 'gateway_help_27' => ':link to sign up for TwoCheckout.', - - 'more_designs' => 'More designs', - 'more_designs_title' => 'Additional Invoice Designs', - 'more_designs_cloud_header' => 'Go Pro for more invoice designs', - 'more_designs_cloud_text' => '', - 'more_designs_self_host_header' => 'Get 6 more invoice designs for just $'.INVOICE_DESIGNS_PRICE, - 'more_designs_self_host_text' => '', - 'buy' => 'Buy', - 'bought_designs' => 'Successfully added additional invoice designs', - - - 'sent' => 'sent', - 'timesheets' => 'Timesheets', - - 'payment_title' => 'Enter Your Billing Address and Credit Card information', - 'payment_cvv' => '*This is the 3-4 digit number onthe back of your card', - 'payment_footer1' => '*Billing address must match address associated with credit card.', - 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - 'vat_number' => 'Vat Number', - 'id_number' => 'ID Number', - - 'white_label_link' => 'White label', - 'white_label_text' => 'Purchase a white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the top of the client pages.', - 'white_label_header' => 'White Label', - 'bought_white_label' => 'Successfully enabled white label license', - 'white_labeled' => 'White labeled', - - - 'restore' => 'Restore', - 'restore_invoice' => 'Restore Invoice', - 'restore_quote' => 'Restore Quote', - 'restore_client' => 'Restore Client', - 'restore_credit' => 'Restore Credit', - 'restore_payment' => 'Restore Payment', - - 'restored_invoice' => 'Successfully restored invoice', - 'restored_quote' => 'Successfully restored quote', - 'restored_client' => 'Successfully restored client', - 'restored_payment' => 'Successfully restored payment', - 'restored_credit' => 'Successfully restored credit', - - 'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.', - 'discount_percent' => 'Percent', - 'discount_amount' => 'Amount', - - 'invoice_history' => 'Invoice History', - 'quote_history' => 'Quote History', - 'current_version' => 'Current version', - 'select_versiony' => 'Select version', - 'view_history' => 'View History', - - 'edit_payment' => 'Edit Payment', - 'updated_payment' => 'Successfully updated payment', - 'deleted' => 'Deleted', - 'restore_user' => 'Restore User', - 'restored_user' => 'Successfully restored user', - 'show_deleted_users' => 'Show deleted users', - 'email_templates' => 'Email Templates', - 'invoice_email' => 'Invoice Email', - 'payment_email' => 'Payment Email', - 'quote_email' => 'Quote Email', - 'reset_all' => 'Reset All', - 'approve' => 'Approve', - - 'token_billing_type_id' => 'Token Billing', - 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', - 'token_billing_1' => 'Disabled', - 'token_billing_2' => 'Opt-in - checkbox is shown but not selected', - 'token_billing_3' => 'Opt-out - checkbox is shown and selected', - 'token_billing_4' => 'Always', - 'token_billing_checkbox' => 'Store credit card details', - 'view_in_stripe' => 'View in Stripe', - 'use_card_on_file' => 'Use card on file', - 'edit_payment_details' => 'Edit payment details', - 'token_billing' => 'Save card details', - 'token_billing_secure' => 'The data is stored securely by :stripe_link', - - 'support' => 'Support', - 'contact_information' => 'Contact information', - '256_encryption' => '256-Bit Encryption', - 'amount_due' => 'Amount due', - 'billing_address' => 'Billing address', - 'billing_method' => 'Billing method', - 'order_overview' => 'Order overview', - 'match_address' => '*Address must match address associated with credit card.', - 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - - 'default_invoice_footer' => 'Set default invoice footer', - 'invoice_footer' => 'Invoice footer', - 'save_as_default_footer' => 'Save as default footer', - - 'token_management' => 'Token Management', - 'tokens' => 'Tokens', - 'add_token' => 'Add Token', - 'show_deleted_tokens' => 'Show deleted tokens', - 'deleted_token' => 'Successfully deleted token', - 'created_token' => 'Successfully created token', - 'updated_token' => 'Successfully updated token', - 'edit_token' => 'Edit Token', - 'delete_token' => 'Delete Token', - 'token' => 'Token', - - 'add_gateway' => 'Add Gateway', - 'delete_gateway' => 'Delete Gateway', - 'edit_gateway' => 'Edit Gateway', - 'updated_gateway' => 'Successfully updated gateway', - 'created_gateway' => 'Successfully created gateway', - 'deleted_gateway' => 'Successfully deleted gateway', - 'pay_with_paypal' => 'PayPal', - 'pay_with_card' => 'Credit card', - - 'change_password' => 'Change password', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'confirm_password' => 'Confirm password', - 'password_error_incorrect' => 'The current password is incorrect.', - 'password_error_invalid' => 'The new password is invalid.', - 'updated_password' => 'Successfully updated password', - - 'api_tokens' => 'API Tokens', - 'users_and_tokens' => 'Users & Tokens', - 'account_login' => 'Account Login', - 'recover_password' => 'Recover your password', - 'forgot_password' => 'Forgot your password?', - 'email_address' => 'Email address', - 'lets_go' => 'Let’s go', - 'password_recovery' => 'Password Recovery', - 'send_email' => 'Send email', - 'set_password' => 'Set Password', - 'converted' => 'Converted', - - - -); \ No newline at end of file diff --git a/app/lang/nl/validation.php b/app/lang/nl/validation.php deleted file mode 100644 index 81ab739e520f..000000000000 --- a/app/lang/nl/validation.php +++ /dev/null @@ -1,111 +0,0 @@ - ":attribute moet geaccepteerd zijn.", - "active_url" => ":attribute is geen geldige URL.", - "after" => ":attribute moet een datum na :date zijn.", - "alpha" => ":attribute mag alleen letters bevatten.", - "alpha_dash" => ":attribute mag alleen letters, nummers, onderstreep(_) en strepen(-) bevatten.", - "alpha_num" => ":attribute mag alleen letters en nummers bevatten.", - "array" => ":attribute moet geselecteerde elementen bevatten.", - "before" => ":attribute moet een datum voor :date zijn.", - "between" => array( - "numeric" => ":attribute moet tussen :min en :max zijn.", - "file" => ":attribute moet tussen :min en :max kilobytes zijn.", - "string" => ":attribute moet tussen :min en :max karakters zijn.", - "array" => ":attribute moet tussen :min en :max items bevatten." - ), - "confirmed" => ":attribute bevestiging komt niet overeen.", - "count" => ":attribute moet precies :count geselecteerde elementen bevatten.", - "countbetween" => ":attribute moet tussen :min en :max geselecteerde elementen bevatten.", - "countmax" => ":attribute moet minder dan :max geselecteerde elementen bevatten.", - "countmin" => ":attribute moet minimaal :min geselecteerde elementen bevatten.", - "date_format" => ":attribute moet een geldig datum formaat bevatten.", - "different" => ":attribute en :other moeten verschillend zijn.", - "email" => ":attribute is geen geldig e-mailadres.", - "exists" => ":attribute bestaat niet.", - "image" => ":attribute moet een afbeelding zijn.", - "in" => ":attribute is ongeldig.", - "integer" => ":attribute moet een getal zijn.", - "ip" => ":attribute moet een geldig IP-adres zijn.", - "match" => "Het formaat van :attribute is ongeldig.", - "max" => array( - "numeric" => ":attribute moet minder dan :max zijn.", - "file" => ":attribute moet minder dan :max kilobytes zijn.", - "string" => ":attribute moet minder dan :max karakters zijn.", - "array" => ":attribute mag maximaal :max items bevatten." - ), - "mimes" => ":attribute moet een bestand zijn van het bestandstype :values.", - "min" => array( - "numeric" => ":attribute moet minimaal :min zijn.", - "file" => ":attribute moet minimaal :min kilobytes zijn.", - "string" => ":attribute moet minimaal :min karakters zijn.", - "array" => ":attribute moet minimaal :min items bevatten." - ), - "not_in" => "Het formaat van :attribute is ongeldig.", - "numeric" => ":attribute moet een nummer zijn.", - "required" => ":attribute is verplicht.", - "required_with" => ":attribute is verplicht i.c.m. :values", - "required_with_all" => ":attribute is verplicht i.c.m. :values", - "required_without" => ":attribute is verplicht als :values niet ingevuld is.", - "required_without_all" => ":attribute is verplicht als :values niet ingevuld zijn.", - "same" => ":attribute en :other moeten overeenkomen.", - "size" => array( - "numeric" => ":attribute moet :size zijn.", - "file" => ":attribute moet :size kilobyte zijn.", - "string" => ":attribute moet :size characters zijn.", - "array" => ":attribute moet :size items bevatten." - ), - "unique" => ":attribute is al in gebruik.", - "url" => ":attribute is geen geldige URL.", - - "positive" => ":attribute moet groter zijn dan nul.", - "has_credit" => "De klant heeft niet voldoende krediet.", - - "positive" => "The :attribute must be greater than zero.", - "has_credit" => "The client does not have enough credit.", - "notmasked" => "The values are masked", - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => array( - 'attribute-name' => array( - 'rule-name' => 'custom-message', - ), - ), - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => array(), - -); diff --git a/app/lang/pt_BR/pagination.php b/app/lang/pt_BR/pagination.php deleted file mode 100644 index 39b1c02096a4..000000000000 --- a/app/lang/pt_BR/pagination.php +++ /dev/null @@ -1,20 +0,0 @@ - '« Anterior', - -'next' => 'Próximo »', - -); diff --git a/app/lang/pt_BR/public.php b/app/lang/pt_BR/public.php deleted file mode 100644 index 7f5ecb9008e2..000000000000 --- a/app/lang/pt_BR/public.php +++ /dev/null @@ -1,209 +0,0 @@ - 'Free Open-Source Online Invoicing', - 'description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - 'invoice_now' => 'Invoice Now', - 'no_signup_needed' => 'No signup needed', - - 'link_blog' => 'Blog', - 'link_about_us' => 'About Us', - 'link_contact_us' => 'Contact Us', - 'link_features' => 'Features', - 'link_plans' => 'Plans', - 'link_compare' => 'Compare', - 'link_testimonials' => 'Testimonials', - 'link_faq' => 'FAQ', - - 'my_account' => 'My Account', - 'login' => 'Login', - 'connect_with_us' => 'Connect with Us', - 'safe_and_secure' => 'Safe & Secure', - 'toggle_navigation' => 'Toggle navigation', - - - 'home' => [ - 'header' => 'THE SIMPLE & FREE WAY TO INVOICE CLIENTS', - 'sub_header' => 'It\'s just that easy. Stop spending time on complicated and expensive invoicing.
    No fuss, just get started and get paid.', - 'footer' => 'Simple, Intuitive Invoicing,Anywhere.', - - 'free_always' => 'Free, Always', - 'free_always_text' => 'Send unlimited invoices to 500 clients per month and never pay a dime. You are welcome to unlock still more awesome features with our Pro Plan, but our free app is a top-notch product that will do everything you need it to do, without any subscription or fees.', - - 'open_source' => 'Open-Source', - 'open_source_text' => 'No mysterious corporate silos here! Just full source code transparency and a devotion to working with anyone interested to build a better electronic invoicing platform. We even offer a handy zip download for a self-hosted version of Invoice Ninja.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text' => 'See how your edited invoice will look as a print-friendly pdf while you make the changes. Our pdf generator works in real time as you make your changes. You can even preview four beautiful preset designs. Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text' => 'Invoices sent with our app integrate seamlessly with the gateway credit card processor of your choice, to make it super easy for your clients to send you money with just a few clicks. We play nicely with Authorize.Net, Stripe, PayPal and loads more - 23 in all!', - ], - - 'about' => [ - 'header' => 'About Invoice Ninja', - 'what_is' => 'What is Invoice Ninja?', - - 'team_ninja' => 'Team Ninja', - 'team_ninja_text' => 'Invoice Ninja is managed by a team of seasoned web workers. We launched in early 2014 and have been thrilled by the enthusiastic response we’ve received from our growing community of users.', - - 'co_founder' => 'Co-Founder', - 'ceo' => 'CEO', - 'cto' => '', - 'designer' => 'Designer', - 'marketing' => 'Marketing', - - 'shalom_bio' => 'Shalom has specialized in small business development for nearly 10 years. In addition to InvoiceNinja.com Shalom is CEO of a leading tour agency in Israel.', - 'hillel_bio' => 'Hillel has been developing enterprise applications for 15 years. His open-source AutoComplete component has been used by thousands of developers around the world.', - 'razi_bio' => 'Razi is a pixel nerd with a great deal of experience in design for web sites and applications. When she isn\'t busy with InvoiceNinja she runs a small web agency in Stockholm called kantorp-wegl.in', - 'ben_bio' => 'A veteran digital marketer and content strategist, Ben specializes in building communities around brands that make business easier for freelancers, SMBs and micro-entrepreneurs.', - ], - - 'contact' => [ - 'header' => 'Questions, special requests, or just want to say hi?', - 'sub_header' => 'Fill in the form below and we\'ll get back to you as soon as possible. Hope to hear from you!', - 'other_ways' => 'Other ways to reach us', - - 'name' => 'Name', - 'name_help' => 'Please enter your name.', - - 'email' => 'Email Address', - 'email_help' => 'Please enter a valid e-mail address.', - - 'message' => 'Message', - 'message_help' => 'Please enter a message.', - 'send_message' => 'Send Message', - ], - - 'features' => [ - 'header' => 'The Features', - 'footer' => 'Like what you see?', - 'footer_action' => 'Get started today!', - - 'open_source' => 'Open Source Platform', - 'open_source_text1' => 'Set the code free! Here at Invoice Ninja, we’re all about creating the best possible app, and inviting scrutiny via full code transparency is a central manifestation of this value.', - 'open_source_text2' => 'We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.', - - 'free_forever' => 'FREE. Forever.', - 'free_forever_text1' => 'Yeah, you read that correctly. You don’t have to pay us a cent to use our tools. We know how tough it is to make ends meet as a web-based business, and we’re bent on providing a top-notch product that will do everything you need it to do, without any subscription or opt-in fees.', - 'free_forever_text2' => 'Try Invoice Ninja out. You literally have nothing to lose. We’re confident that you’ll find the experience so positive that you’ll never need to turn elsewhere.', - - 'secure' => 'Secure & Private', - 'secure_text1' => 'Invoice Ninja has been built from the ground up to keep your data safe. Only you have access to your login & accounting details, & we will never share your transaction data to any third party.', - 'secure_text2' => 'Our website operates with 256-bit encryption, which is even more secure than most banking websites. Invoice Ninja uses the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. We feel safe here and have invested heavily in measures to ensure that you do too.', - - 'live_pdf' => 'Live .PDF View', - 'live_pdf_text1' => 'With Invoice Ninja, we’ve done away with the need for cumbersome multi-click invoice previewing after each save.', - 'live_pdf_text2' => 'When you enter the details of your customer and/or invoice in our editor, you can instantly see the results in the pdf preview pane below. Want to see what your invoice would look like in a different layout style? The live pdf can show you four beautiful preset styles in real time too.', - 'live_pdf_text3' => 'Just create, save, send, and you’re done!', - - 'online_payments' => 'Online Payments', - 'online_payments_text1' => 'Invoice Ninja seamlessly integrates with all of the top internet payment processors and gateways so you can get paid for your work quickly and easily.', - 'online_payments_text2' => 'Invoices created with our tools aren’t just for bookkeeping purposes - they bring in the Benjamins. We also make it super easy to choose the right gateway for the specific needs of your business and are happy to help you to get started working with the gateway of your choice. What’s more, we’re constantly working on rolling out additional gateway integrations, so if you don’t see the one you use here, just let us know, and there’s a good chance we’ll add it for you.', - ], - - 'plans' => [ - 'header' => 'The Plans', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - 'pro_plan' => 'Pro Plan', - - 'go_pro' => 'Go Pro to Unlock Premium Invoice Ninja Features', - 'go_pro_text' => 'We believe that the free version of Invoice Ninja is a truly awesome product loaded with the key features you need to bill your clients electronically. But for those who crave still more Ninja awesomeness, we\'ve unmasked the Invoice Ninja Pro plan, which offers more versatility, power and customization options for just $50 per year.', - - 'number_clients' => 'Number of clients per account', - 'unlimited_invoices' => 'Unlimited client invoices', - 'company_logo' => 'Add your company logo', - 'live_pdf' => 'Live .PDF invoice creation', - 'four_templates' => '4 beautiful invoice templates', - 'payments' => 'Accept credit card payments', - 'additional_templates' => 'Additional invoice templates', - 'multi_user' => 'Multi-user support', - 'quotes' => 'Quotes/pro-forma invoices', - 'advanced_settings' => 'Advanced invoice settings', - 'data_vizualizations' => 'Dynamic data vizualizations', - 'email_support' => 'Priority email support', - 'remove_created_by' => 'Remove "Created by Invoice Ninja"', - 'latest_features' => 'Latest and greatest features', - 'pricing' => 'Pricing', - 'free_always' => 'Free /Always!', - 'year_price' => '$50 /Year', - ], - - 'compare' => [ - 'header' => 'How We Compare', - 'free_plan_comparison' => 'Free Plan Comparison', - 'paid_plan_comparison' => 'Paid Plan Comparison', - 'app' => 'App', - 'cost' => 'Cost', - 'clients' => 'Clients', - 'invoices' => 'Invoices', - 'payment_gateways' => 'Payment Gateways', - 'custom_logo' => 'Custom Logo', - 'multiple_templates' => 'Multiple Templates', - 'recurring_payments' => 'Recurring Payments', - 'open_source' => 'Open Source', - 'per_month' => 'per month', - 'per_year' => 'per year', - 'free' => 'Free', - 'unlimited' => 'Unlimited', - ], - - 'testimonials' => [ - 'testimonials' => 'testimonials', - 'header' => 'Since we launched Invoice Ninja in March of 2014, we\'ve been overwhelmed by a deluge of user love. Here\'s a small taste of the glowing things people have to say about the great experiences the\'ve been having with our free e-invoicing app!', - ], - - 'faq' => [ - 'header' => 'The FAQs', - - 'question1' => 'I know it isn’t standard ninja practice to reveal too many identity details, but who are you guys exactly?', - 'answer1' => 'We’re a small team of highly skilled digital journeymen based in Israel. We love open source, we love disrupting the big business status quo, and we love building helpful tools that are easy to use. We believe that everyone else’s web-based cash flow tools are unnecessarily expensive, clunky and complicated - and we’re bent on proving these beliefs with Invoice Ninja.', - - 'question2' => 'How do I get started using Invoice Ninja?', - 'answer2' => 'Just click on the big, yellow "Invoice Now" button on our homepage!', - - 'question3' => 'Do you offer customer support?', - 'answer3' => 'We sure do. Support is super important to us. Feel free to email us at support@invoiceninja.com with any questions you might have. We almost always reply within one business day.', - - 'question4' => 'Is Invoice Ninja really free? For how long?', - 'answer4' => 'Yes, our basic app is 100% free. Forever and ever. For real. We also offer a paid Pro version of Invoice Ninja (you can learn all about its awesome features here), but it\'s important to us that the free version have all of the key features people need to do business.', - - 'question5' => 'How is Invoice Ninja able to offer this all for free? How are you making any money?', - 'answer5' => 'We’re mostly in this line of work because we believe it’s high time that a good electronic invoicing tool be available for free. There isn’t much money in it - yet. We do offer a paid Pro version of the app that we\'ve souped up with premium features. And when our users open up new accounts with payment processor gateways by clicking on links from our site, we make modest commissions as a gateway affiliate. So if zillions of freelancers and small businesses start running credit card charges through Invoice Ninja, or if scores of users go Pro, there’s a decent chance we\'ll recover our investment.', - - 'question6' => 'Really? So does that mean you’re not collecting information about me so you can sell me stuff or so that some other company can spam me according to my interests?', - 'answer6' => 'No way. We’re not mining your data, and we’re not selling you out. That wouldn’t be very ninja of us, would it?', - - 'question7' => 'But don’t you have access to my merchant and banking accounts?', - 'answer7' => 'Actually, we don’t. When you link an account at a third party financial institution with your Invoice Ninja account, you’re essentially giving our app permission to send money to you and nothing more. This is all managed by the tech teams at your financial service providers, who go to great lengths to ensure their integrations can’t be exploited or abused.', - - 'question8' => 'Given that Invoice Ninja is an open source app, how can I be sure that my financial information is safe with you?', - 'answer8' => 'There\'s a big difference between “open source" and “open data.†Anyone who wants to use the code that drives Invoice Ninja to create their own products or to make improvements to ours can do so. It’s available for anyone who wants to download and work with. But that’s just the source code - totally separate from what happens with that code on the Invoice Ninja servers. You’re the only one who has full access to what you\'re doing with our product. For more details on the security of our servers and how we handle our users\' information, please read the next question.', - - 'question9' => 'So just how secure is this app?', - 'answer9' => 'Extremely. Data uploaded by our users runs through connections with 256-bit encryption, which is twice as many encryption bits that most bank websites use. We use the TLS 1.0 cryptographic protocol, AES_256_CBC string encryption, SHA1 message authentication and DHE_RSA key exchanges. It’s fancy stuff that we put in place to make sure no one can gain access to your information except you.', - - 'question10' => 'How do I remove the small "Created by Invoice Ninja†image from the bottom of my invoices?', - 'answer10' => 'The amazingly affordable Pro version of Invoice Ninja allows you to do this and oh so much more.', - - 'question11' => 'Can I see what the application looks like with sample data?', - 'answer11' => 'Sure, click here to try out our demo account.', - - 'question12' => 'I hear that there\'s a version of Invoice Ninja that I can install myself on my own servers? Where can I learn more about this?', - 'answer12' => 'The rumors are true! Full instructions are available here.', - - 'question13' => 'I\'m seeing the options to assign various statuses to my invoices, clients, credits and payments. What\'s the difference between "active," "archived" and "deleted"?', - 'answer13' => 'These three handy statuses for invoices, clients, credits and payments allow you to keep your own cash flow management as straightforward and accessible as possible from your Invoice Ninja dashboard. None of these statuses will actually purge any records from your account - even "deleted" can always be recovered at any point in the future. "Active" means the record will appear in the relevant queue of records. To stash a record away so it\'s still fully operational but no longer cluttering up your interface, simply set it to be "archived." To deactivate a record and render it inaccessible to your clients, mark it "deleted."', - - 'question14' => 'My question wasn\'t covered by any of the content on this FAQ page. How can I get in touch with you?', - 'answer14' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - 'miss_something' => 'Did we miss something?', - 'miss_something_text' => 'Please email us at contact@invoiceninja.com with any questions or comments you have. We love hearing from the people who use our app! We’ll do our best to reply to your email within the business day.', - - ], - - -]; \ No newline at end of file diff --git a/app/lang/pt_BR/reminders.php b/app/lang/pt_BR/reminders.php deleted file mode 100644 index b1af622faf82..000000000000 --- a/app/lang/pt_BR/reminders.php +++ /dev/null @@ -1,24 +0,0 @@ - "Senhas devem possuir no mínimo seis caracteres e devem ser iguais.", - -"user" => "Não achamos um usuário com o endereço de e-mail informado.", - -"token" => "Este token de redefinição de senha é inválido.", - -"sent" => "Lmebrete de senha enviado!", - -); diff --git a/app/lang/pt_BR/texts.php b/app/lang/pt_BR/texts.php deleted file mode 100644 index 47ff16ff5dd6..000000000000 --- a/app/lang/pt_BR/texts.php +++ /dev/null @@ -1,565 +0,0 @@ - 'Organização', - 'name' => 'Nome', - 'website' => 'Website', - 'work_phone' => 'Telefone', - 'address' => 'Endereço', - 'address1' => 'Rua', - 'address2' => 'Bloco/apto', - 'city' => 'Cidade', - 'state' => 'Estado', - 'postal_code' => 'CEP', - 'country_id' => 'País', - 'contacts' => 'Contatos', - 'first_name' => 'Primeiro Nome', - 'last_name' => 'Último Nome', - 'phone' => 'Telefone', - 'email' => 'Email', - 'additional_info' => 'Informações Adicionais', - 'payment_terms' => 'Termos de Pagamento', - 'currency_id' => 'Moeda', - 'size_id' => 'Tamanho', - 'industry_id' => 'Empresa', - 'private_notes' => 'Notas Privadas', - - // invoice - 'invoice' => 'Fatura', - 'client' => 'Cliente', - 'invoice_date' => 'Data da Fatura', - 'due_date' => 'Data de Vencimento', - 'invoice_number' => 'Número da Fatura', - 'invoice_number_short' => 'Fatura #', - 'po_number' => 'Núm. Ordem de Compra', - 'po_number_short' => 'OC #', - 'frequency_id' => 'Quantas vezes', - 'discount' => 'Desconto', - 'taxes' => 'Taxas', - 'tax' => 'Taxa', - 'item' => 'Item', - 'description' => 'Descrição', - 'unit_cost' => 'Custo Unitário', - 'quantity' => 'Quantidade', - 'line_total' => 'Linha Total', - 'subtotal' => 'Subtotal', - 'paid_to_date' => 'Pagamento até', - 'balance_due' => 'Saldo Devedor', - 'invoice_design_id' => 'Design', - 'terms' => 'Termos', - 'your_invoice' => 'Sua Fatura', - - 'remove_contact' => 'Remover contato', - 'add_contact' => 'Adicionar contato', - 'create_new_client' => 'Criar novo cliente', - 'edit_client_details' => 'Editar detalhes do cliente', - 'enable' => 'Habilitar', - 'learn_more' => 'Aprender mais', - 'manage_rates' => 'Gerenciar impostos', - 'note_to_client' => 'Nota para o cliente', - 'invoice_terms' => 'Termos da Fatura', - 'save_as_default_terms' => 'Salvar como termo padrão', - 'download_pdf' => 'Baixar PDF', - 'pay_now' => 'Pagar agora', - 'save_invoice' => 'Salvar Fatura', - 'clone_invoice' => 'Clonar Fatura', - 'archive_invoice' => 'Arquivar Fatura', - 'delete_invoice' => 'Apagar Fatura', - 'email_invoice' => 'Enviar Fatura', - 'enter_payment' => 'Entre com o Pagamento', - 'tax_rates' => 'Taxas de Impostos', - 'rate' => 'Imposto', - 'settings' => 'Configurações', - 'enable_invoice_tax' => 'Permitir especificar a taxa da fatura', - 'enable_line_item_tax' => 'Permitir especificar o item da linha de taxas', - - // navigation - 'dashboard' => 'Painel de Controle', - 'clients' => 'Clientes', - 'invoices' => 'Faturas', - 'payments' => 'Pagamentos', - 'credits' => 'Créditos', - 'history' => 'Histórico', - 'search' => 'Pesquisa', - 'sign_up' => 'Cadastrar', - 'guest' => 'Convidado', - 'company_details' => 'Detalhes da Empresa', - 'online_payments' => 'Pagamentos Online', - 'notifications' => 'Notificações', - 'import_export' => 'Importar/Exportar', - 'done' => 'Feito', - 'save' => 'Salvar', - 'create' => 'Criar', - 'upload' => 'Upload', - 'import' => 'Importar', - 'download' => 'Download', - 'cancel' => 'Cancelar', - 'provide_email' => 'Favor fornecer um endereço de e-mail válido', - 'powered_by' => 'Powered by', - 'no_items' => 'Sem itens', - - // recurring invoices - 'recurring_invoices' => 'Faturas Recorrentes', - 'recurring_help' => '

    Enviar automaticamente aos clientes as mesmas faturas semanalmente, mensalmente, bimenstralmente, trimestralmente ou anualmente.

    -

    Use :MONTH, :QUARTER ou :YEAR para datas dinâmicas. Matemática básica também funciona, por exemplo :MONTH-1.

    -

    Exemplo de variáveis de uma fatura dinâmica:

    -
      -
    • "Mensalidade da academia para o mês de :MONTH" => "Mensalidade da academia para o mês de Julho"
    • -
    • "Plano anual de :YEAR+1" => "Plano anual de 2015"
    • -
    • "Pagamento retido para :QUARTER+1" => "Pagamento retido para Q2"
    • -
    ', - - // dashboard - 'in_total_revenue' => 'no total de rendimento', - 'billed_client' => 'cliente faturado', - 'billed_clients' => 'clientes faturados', - 'active_client' => 'cliente ativo', - 'active_clients' => 'clientes ativos', - 'invoices_past_due' => 'Faturas Vencidas', - 'upcoming_invoices' => 'Próximas Faturas', - 'average_invoice' => 'Média da fatura', - - // list pages - 'archive' => 'Arquivos', - 'delete' => 'Apagar', - 'archive_client' => 'Arquivar cliente', - 'delete_client' => 'Apagar cliente', - 'archive_payment' => 'Arquivar pagamento', - 'delete_payment' => 'Apagar pagamento', - 'archive_credit' => 'Arquivar crédito', - 'delete_credit' => 'Apagar crédito', - 'show_archived_deleted' => 'Mostrar arquivados/apagados', - 'filter' => 'Filtrar', - 'new_client' => 'Novo Cliente', - 'new_invoice' => 'Nova Fatura', - 'new_payment' => 'Novo Pagamento', - 'new_credit' => 'Novo Crédito', - 'contact' => 'Contato', - 'date_created' => 'Data de Criação', - 'last_login' => 'Último Login', - 'balance' => 'Balanço', - 'action' => 'Ação', - 'status' => 'Status', - 'invoice_total' => 'Total da Fatura', - 'frequency' => 'Frequência', - 'start_date' => 'Data Inicial', - 'end_date' => 'Data Final', - 'transaction_reference' => 'Referência da Transação', - 'method' => 'Método', - 'payment_amount' => 'Qtde do Pagamento', - 'payment_date' => 'Data do Pagamento', - 'credit_amount' => 'Qtde do Crédito', - 'credit_balance' => 'Balanço do Crédito', - 'credit_date' => 'Data do Crédito', - 'empty_table' => 'Sem data disponível na tabela', - 'select' => 'Selecionar', - 'edit_client' => 'Editar Cliente', - 'edit_invoice' => 'Editar Fatura', - - // client view page - 'create_invoice' => 'Criar Fatura', - 'enter_credit' => 'Digitar Crédito', - 'last_logged_in' => 'Último login em', - 'details' => 'Detalhes', - 'standing' => 'Constante', - 'credit' => 'Crédito', - 'activity' => 'Atividade', - 'date' => 'Data', - 'message' => 'Mensagem', - 'adjustment' => 'Ajustes', - 'are_you_sure' => 'Você tem certeza?', - - // payment pages - 'payment_type_id' => 'Tipo de pagamento', - 'amount' => 'Quantidade', - - // account/company pages - 'work_email' => 'Email', - 'language_id' => 'Idioma', - 'timezone_id' => 'Fuso Horário', - 'date_format_id' => 'Formato da Data', - 'datetime_format_id' => 'Formato da Data/Hora', - 'users' => 'Usuários', - 'localization' => 'Localização', - 'remove_logo' => 'Remover logo', - 'logo_help' => 'Suportados: JPEG, GIF and PNG. Altura recomendada: 120px', - 'payment_gateway' => 'Provedor de Pagamento', - 'gateway_id' => 'Provedor', - 'email_notifications' => 'Notificações por Email', - 'email_sent' => 'Me avise por email quando a fatura for enviada', - 'email_viewed' => 'Me avise por email quando a fatura for visualizada', - 'email_paid' => 'Me avise por email quando a fatura for paga', - 'site_updates' => 'Atualizações do Site', - 'custom_messages' => 'Mensagens Customizadas', - 'default_invoice_terms' => 'Definir termos padrões da fatura', - 'default_email_footer' => 'Definir assinatura de email padrão', - 'import_clients' => 'Importar Dados do Cliente', - 'csv_file' => 'Selecionar arquivo CSV', - 'export_clients' => 'Exportar Dados do Cliente', - 'select_file' => 'Favor selecionar um arquivo', - 'first_row_headers' => 'Usar as primeiras linhas como cabeçalho', - 'column' => 'Coluna', - 'sample' => 'Exemplo', - 'import_to' => 'Importar para', - 'client_will_create' => 'cliente será criado', - 'clients_will_create' => 'clientes serão criados', - - // application messages - 'created_client' => 'Cliente criado com sucesso', - 'created_clients' => ':count clientes criados com sucesso', - 'updated_settings' => 'Configurações atualizadas com sucesso', - 'removed_logo' => 'Logo removida com sucesso', - 'sent_message' => 'Mensagem enviada com sucesso', - 'invoice_error' => 'Verifique se você selecionou algum cliente e que não há nenhum outro erro', - 'limit_clients' => 'Desculpe, isto irá exceder o limite de :count clientes', - 'payment_error' => 'Ocorreu um erro ao processar o pagamento. Por favor tente novamente mais tarde.', - 'registration_required' => 'Favor logar-se para enviar uma fatura por email', - 'confirmation_required' => 'Favor confirmar o seu endereço de email', - - 'updated_client' => 'Cliente atualizado com sucesso', - 'created_client' => 'Cliente criado com sucesso', - 'archived_client' => 'Cliente arquivado com sucesso', - 'archived_clients' => ':count clientes arquivados com sucesso', - 'deleted_client' => 'Clientes removidos com sucesso', - 'deleted_clients' => ':count clientes removidos com sucesso', - - 'updated_invoice' => 'Fatura atualizado com sucesso', - 'created_invoice' => 'Fatura criada com sucesso', - 'cloned_invoice' => 'Fatura clonada com sucesso', - 'emailed_invoice' => 'Fatura enviada por email com sucesso', - 'and_created_client' => 'e o cliente foi criado', - 'archived_invoice' => 'Fatura arquivado com sucesso', - 'archived_invoices' => ':count faturas arquivados com sucesso', - 'deleted_invoice' => 'Fatura apagados com sucesso', - 'deleted_invoices' => ':count faturas apagados com sucesso', - - 'created_payment' => 'Pagamento criado com sucesso', - 'archived_payment' => 'Pagamento arquivado com sucesso', - 'archived_payments' => ':count pagamentos arquivados com sucesso', - 'deleted_payment' => 'Pagamento apagado com sucesso', - 'deleted_payments' => ':count pagamentos apagados com sucesso', - 'applied_payment' => 'Pagamentos aplicados com sucesso', - - 'created_credit' => 'Crédito criado com sucesso', - 'archived_credit' => 'Crédito arquivado com sucesso', - 'archived_credits' => ':count créditos arquivados com sucesso', - 'deleted_credit' => 'Crédito apagado com sucesso', - 'deleted_credits' => ':count créditos apagados com sucesso', - - // Emails - 'confirmation_subject' => 'Confirmação de Conta do Invoice Ninja', - 'confirmation_header' => 'Confirmação de Conta', - 'confirmation_message' => 'Favor acessar o link abaixo para confirmar a sua conta.', - 'invoice_message' => 'Para visualizar a sua fatura de :amount, clique no link abaixo.', - 'payment_message' => 'Obrigado pelo seu pagamento de :amount.', - 'email_salutation' => 'Caro :name,', - 'email_signature' => 'Até mais,', - 'email_from' => 'Equipe InvoiceNinja', - 'user_email_footer' => 'Para ajustar suas configurações de notificações de email acesse '.SITE_URL.'/company/notifications', - 'invoice_link_message' => 'Para visualizar a fatura do seu cliente clique no link abaixo:', - 'notification_invoice_paid_subject' => 'Fatura :invoice foi pago por :client', - 'notification_invoice_sent_subject' => 'Fatura :invoice foi enviado por :client', - 'notification_invoice_viewed_subject' => 'Fatura :invoice foi visualizada por :client', - 'notification_invoice_paid' => 'Um pagamento de :amount foi realizado pelo cliente :client através da fatura :invoice.', - 'notification_invoice_sent' => 'O cliente :client foi notificado por email referente à fatura :invoice de :amount.', - 'notification_invoice_viewed' => 'O cliente :client visualizou a fatura :invoice de :amount.', - 'reset_password' => 'Você pode redefinir a sua senha clicando no seguinte link:', - 'reset_password_footer' => 'Se você não solicitou a redefinição de sua senha por favor envie um email para o nosso suporte: ' . CONTACT_EMAIL, - - // Payment page - 'secure_payment' => 'Pagamento Seguro', - 'card_number' => 'Número do cartão', - 'expiration_month' => 'Mês de expiração', - 'expiration_year' => 'Ano de expiração', - 'cvv' => 'CVV', - - // Pro Plan - 'pro_plan' => [ - 'remove_logo' => ':link para remover a logo do Invoice Ninja contratando o plano profissional', - 'remove_logo_link' => 'Clique aqui', - ], - - 'logout' => 'Sair', - 'sign_up_to_save' => 'Faça login para salvar o seu trabalho', - 'agree_to_terms' =>'Eu concordo com os :terms do Invoice Ninja', - 'terms_of_service' => 'Termos do Serviço', - 'email_taken' => 'O endereço de e-mail já está registrado', - 'working' => 'Processando', - 'success' => 'Successo', - 'success_message' => 'Você se registrou com sucesso. Por favor acesse o link de confirmação recebido para confirmar o seu endereço de e-mail.', - 'erase_data' => 'Isto irá apagar completamente todos os seus dados.', - 'password' => 'Senha', - 'close' => 'Fechar', - 'invoice_subject' => 'Nova fatura de :account', - 'payment_subject' => 'Recebido Pagamento de', - - 'pro_plan_product' => 'Pro Plan', - 'pro_plan_description' => 'One year enrollment in the Invoice Ninja Pro Plan.', - 'pro_plan_success' => 'Thanks for joining! Once the invoice is paid your Pro Plan membership will begin.', - - 'unsaved_changes' => 'You have unsaved changes', - 'custom_fields' => 'Custom fields', - 'company_fields' => 'Company Fields', - 'client_fields' => 'Client Fields', - 'field_label' => 'Field Label', - 'field_value' => 'Field Value', - 'edit' => 'Edit', - 'view_invoice' => 'View invoice', - 'view_as_recipient' => 'View as recipient', - - // product management - 'product_library' => 'Product Library', - 'product' => 'Product', - 'products' => 'Products', - 'fill_products' => 'Auto-fill products', - 'fill_products_help' => 'Selecting a product will automatically set the description and cost', - 'update_products' => 'Auto-update products', - 'update_products_help' => 'Updating an invoice will automatically update the products', - 'create_product' => 'Create Product', - 'edit_product' => 'Edit Product', - 'archive_product' => 'Archive Product', - 'updated_product' => 'Successfully updated product', - 'created_product' => 'Successfully created product', - 'archived_product' => 'Successfully archived product', - 'pro_plan_custom_fields' => ':link to enable custom fields by joining the Pro Plan', - - 'advanced_settings' => 'Advanced Settings', - 'pro_plan_advanced_settings' => ':link to enable the advanced settings by joining the Pro Plan', - 'invoice_design' => 'Invoice Design', - 'specify_colors' => 'Specify colors', - 'specify_colors_label' => 'Select the colors used in the invoice', - - 'chart_builder' => 'Chart Builder', - 'ninja_email_footer' => 'Use :site to invoice your clients and get paid online for free!', - 'go_pro' => 'Go Pro', - - // Quotes - 'quote' => 'Quote', - 'quotes' => 'Quotes', - 'quote_number' => 'Quote Number', - 'quote_number_short' => 'Quote #', - 'quote_date' => 'Quote Date', - 'quote_total' => 'Quote Total', - 'your_quote' => 'Your Quote', - 'total' => 'Total', - 'clone' => 'Clone', - - 'new_quote' => 'New Quote', - 'create_quote' => 'Create Quote', - 'edit_quote' => 'Edit Quote', - 'archive_quote' => 'Archive Quote', - 'delete_quote' => 'Delete Quote', - 'save_quote' => 'Save Quote', - 'email_quote' => 'Email Quote', - 'clone_quote' => 'Clone Quote', - 'convert_to_invoice' => 'Convert to Invoice', - 'view_invoice' => 'View Invoice', - 'view_quote' => 'View Quote', - 'view_client' => 'View Client', - - 'updated_quote' => 'Successfully updated quote', - 'created_quote' => 'Successfully created quote', - 'cloned_quote' => 'Successfully cloned quote', - 'emailed_quote' => 'Successfully emailed quote', - 'archived_quote' => 'Successfully archived quote', - 'archived_quotes' => 'Successfully archived :count quotes', - 'deleted_quote' => 'Successfully deleted quote', - 'deleted_quotes' => 'Successfully deleted :count quotes', - 'converted_to_invoice' => 'Successfully converted quote to invoice', - - 'quote_subject' => 'New quote from :account', - 'quote_message' => 'To view your quote for :amount, click the link below.', - 'quote_link_message' => 'To view your client quote click the link below:', - 'notification_quote_sent_subject' => 'Quote :invoice was sent to :client', - 'notification_quote_viewed_subject' => 'Quote :invoice was viewed by :client', - 'notification_quote_sent' => 'The following client :client was emailed Quote :invoice for :amount.', - 'notification_quote_viewed' => 'The following client :client viewed Quote :invoice for :amount.', - - 'session_expired' => 'Your session has expired.', - - 'invoice_fields' => 'Invoice Fields', - 'invoice_options' => 'Invoice Options', - 'hide_quantity' => 'Hide quantity', - 'hide_quantity_help' => 'If your line items quantities are always 1, then you can declutter invoices by no longer displaying this field.', - 'hide_paid_to_date' => 'Hide paid to date', - 'hide_paid_to_date_help' => 'Only display the "Paid to Date" area on your invoices once a payment has been received.', - - 'charge_taxes' => 'Charge taxes', - 'user_management' => 'User Management', - 'add_user' => 'Add User', - 'send_invite' => 'Send invitation', - 'sent_invite' => 'Successfully sent invitation', - 'updated_user' => 'Successfully updated user', - 'invitation_message' => 'You\'ve been invited by :invitor. ', - 'register_to_add_user' => 'Please sign up to add a user', - 'user_state' => 'State', - 'edit_user' => 'Edit User', - 'delete_user' => 'Delete User', - 'active' => 'Active', - 'pending' => 'Pending', - 'deleted_user' => 'Successfully deleted user', - 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', - - 'confirm_email_invoice' => 'Are you sure you want to email this invoice?', - 'confirm_email_quote' => 'Are you sure you want to email this quote?', - 'confirm_recurring_email_invoice' => 'Recurring is enabled, are you sure you want this invoice emailed?', - - 'cancel_account' => 'Cancel Account', - 'cancel_account_message' => 'Warning: This will permanently erase all of your data, there is no undo.', - 'go_back' => 'Go Back', - - 'data_visualizations' => 'Data Visualizations', - 'sample_data' => 'Sample data shown', - 'hide' => 'Hide', - 'new_version_available' => 'A new version of :releases_link is available. You\'re running v:user_version, the latest is v:latest_version', - - 'invoice_settings' => 'Invoice Settings', - 'invoice_number_prefix' => 'Invoice Number Prefix', - 'invoice_number_counter' => 'Invoice Number Counter', - 'quote_number_prefix' => 'Quote Number Prefix', - 'quote_number_counter' => 'Quote Number Counter', - 'share_invoice_counter' => 'Share invoice counter', - 'invoice_issued_to' => 'Invoice issued to', - 'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix', - 'mark_sent' => 'Mark sent', - - 'gateway_help_1' => ':link to sign up for Authorize.net.', - 'gateway_help_2' => ':link to sign up for Authorize.net.', - 'gateway_help_17' => ':link to get your PayPal API signature.', - 'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.', - 'gateway_help_27' => ':link to sign up for TwoCheckout.', - - 'more_designs' => 'More designs', - 'more_designs_title' => 'Additional Invoice Designs', - 'more_designs_cloud_header' => 'Go Pro for more invoice designs', - 'more_designs_cloud_text' => '', - 'more_designs_self_host_header' => 'Get 6 more invoice designs for just $'.INVOICE_DESIGNS_PRICE, - 'more_designs_self_host_text' => '', - 'buy' => 'Buy', - 'bought_designs' => 'Successfully added additional invoice designs', - - - - 'sent' => 'sent', - 'timesheets' => 'Timesheets', - - 'payment_title' => 'Enter Your Billing Address and Credit Card information', - 'payment_cvv' => '*This is the 3-4 digit number onthe back of your card', - 'payment_footer1' => '*Billing address must match address associated with credit card.', - 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - 'vat_number' => 'Vat Number', - 'id_number' => 'ID Number', - - 'white_label_link' => 'White label', - 'white_label_text' => 'Purchase a white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the top of the client pages.', - 'white_label_header' => 'White Label', - 'bought_white_label' => 'Successfully enabled white label license', - 'white_labeled' => 'White labeled', - - 'restore' => 'Restore', - 'restore_invoice' => 'Restore Invoice', - 'restore_quote' => 'Restore Quote', - 'restore_client' => 'Restore Client', - 'restore_credit' => 'Restore Credit', - 'restore_payment' => 'Restore Payment', - - 'restored_invoice' => 'Successfully restored invoice', - 'restored_quote' => 'Successfully restored quote', - 'restored_client' => 'Successfully restored client', - 'restored_payment' => 'Successfully restored payment', - 'restored_credit' => 'Successfully restored credit', - - 'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.', - 'discount_percent' => 'Percent', - 'discount_amount' => 'Amount', - - 'invoice_history' => 'Invoice History', - 'quote_history' => 'Quote History', - 'current_version' => 'Current version', - 'select_versiony' => 'Select version', - 'view_history' => 'View History', - - 'edit_payment' => 'Edit Payment', - 'updated_payment' => 'Successfully updated payment', - 'deleted' => 'Deleted', - 'restore_user' => 'Restore User', - 'restored_user' => 'Successfully restored user', - 'show_deleted_users' => 'Show deleted users', - 'email_templates' => 'Email Templates', - 'invoice_email' => 'Invoice Email', - 'payment_email' => 'Payment Email', - 'quote_email' => 'Quote Email', - 'reset_all' => 'Reset All', - 'approve' => 'Approve', - - 'token_billing_type_id' => 'Token Billing', - 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', - 'token_billing_1' => 'Disabled', - 'token_billing_2' => 'Opt-in - checkbox is shown but not selected', - 'token_billing_3' => 'Opt-out - checkbox is shown and selected', - 'token_billing_4' => 'Always', - 'token_billing_checkbox' => 'Store credit card details', - 'view_in_stripe' => 'View in Stripe', - 'use_card_on_file' => 'Use card on file', - 'edit_payment_details' => 'Edit payment details', - 'token_billing' => 'Save card details', - 'token_billing_secure' => 'The data is stored securely by :stripe_link', - - 'support' => 'Support', - 'contact_information' => 'Contact information', - '256_encryption' => '256-Bit Encryption', - 'amount_due' => 'Amount due', - 'billing_address' => 'Billing address', - 'billing_method' => 'Billing method', - 'order_overview' => 'Order overview', - 'match_address' => '*Address must match address associated with credit card.', - 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - - 'default_invoice_footer' => 'Set default invoice footer', - 'invoice_footer' => 'Invoice footer', - 'save_as_default_footer' => 'Save as default footer', - - 'token_management' => 'Token Management', - 'tokens' => 'Tokens', - 'add_token' => 'Add Token', - 'show_deleted_tokens' => 'Show deleted tokens', - 'deleted_token' => 'Successfully deleted token', - 'created_token' => 'Successfully created token', - 'updated_token' => 'Successfully updated token', - 'edit_token' => 'Edit Token', - 'delete_token' => 'Delete Token', - 'token' => 'Token', - - 'add_gateway' => 'Add Gateway', - 'delete_gateway' => 'Delete Gateway', - 'edit_gateway' => 'Edit Gateway', - 'updated_gateway' => 'Successfully updated gateway', - 'created_gateway' => 'Successfully created gateway', - 'deleted_gateway' => 'Successfully deleted gateway', - 'pay_with_paypal' => 'PayPal', - 'pay_with_card' => 'Credit card', - - - 'change_password' => 'Change password', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'confirm_password' => 'Confirm password', - 'password_error_incorrect' => 'The current password is incorrect.', - 'password_error_invalid' => 'The new password is invalid.', - 'updated_password' => 'Successfully updated password', - - 'api_tokens' => 'API Tokens', - 'users_and_tokens' => 'Users & Tokens', - 'account_login' => 'Account Login', - 'recover_password' => 'Recover your password', - 'forgot_password' => 'Forgot your password?', - 'email_address' => 'Email address', - 'lets_go' => 'Let’s go', - 'password_recovery' => 'Password Recovery', - 'send_email' => 'Send email', - 'set_password' => 'Set Password', - 'converted' => 'Converted', - - -); diff --git a/app/lang/pt_BR/validation.php b/app/lang/pt_BR/validation.php deleted file mode 100644 index 27d5c008900c..000000000000 --- a/app/lang/pt_BR/validation.php +++ /dev/null @@ -1,106 +0,0 @@ - ":attribute deve ser aceito.", -"active_url" => ":attribute não é uma URL válida.", -"after" => ":attribute deve ser uma data maior que :date.", -"alpha" => ":attribute deve conter apenas letras.", -"alpha_dash" => ":attribute pode conter apenas letras, número e traços", -"alpha_num" => ":attribute pode conter apenas letras e números.", -"array" => ":attribute deve ser um array.", -"before" => ":attribute deve ser uma data anterior a :date.", -"between" => array( -"numeric" => ":attribute deve ser entre :min - :max.", -"file" => ":attribute deve ser entre :min - :max kilobytes.", -"string" => ":attribute deve ser entre :min - :max caracteres.", -"array" => ":attribute deve conter entre :min - :max itens.", -), -"confirmed" => ":attribute confirmação não correponde.", -"date" => ":attribute não é uma data válida.", -"date_format" => ":attribute não satisfaz o formato :format.", -"different" => ":attribute e :other devem ser diferentes.", -"digits" => ":attribute deve conter :digits dígitos.", -"digits_between" => ":attribute deve conter entre :min e :max dígitos.", -"email" => ":attribute está em um formato inválido.", -"exists" => "A opção selecionada :attribute é inválida.", -"image" => ":attribute deve ser uma imagem.", -"in" => "A opção selecionada :attribute é inválida.", -"integer" => ":attribute deve ser um número inteiro.", -"ip" => ":attribute deve ser um endereço IP válido.", -"max" => array( -"numeric" => ":attribute não pode ser maior que :max.", -"file" => ":attribute não pode ser maior que :max kilobytes.", -"string" => ":attribute não pode ser maior que :max caracteres.", -"array" => ":attribute não pode conter mais que :max itens.", -), -"mimes" => ":attribute deve ser um arquivo do tipo: :values.", -"min" => array( -"numeric" => ":attribute não deve ser menor que :min.", -"file" => ":attribute deve ter no mínimo :min kilobytes.", -"string" => ":attribute deve conter no mínimo :min caracteres.", -"array" => ":attribute deve conter ao menos :min itens.", -), -"not_in" => "A opção selecionada :attribute é inválida.", -"numeric" => ":attribute deve ser um número.", -"regex" => ":attribute está em um formato inválido.", -"required" => ":attribute é um campo obrigatório.", -"required_if" => ":attribute é necessário quando :other é :value.", -"required_with" => ":attribute é obrigatório quando :values está presente.", -"required_without" => ":attribute é obrigatório quando :values não está presente.", -"same" => ":attribute e :other devem corresponder.", -"size" => array( -"numeric" => ":attribute deve ter :size.", -"file" => ":attribute deve ter :size kilobytes.", -"string" => ":attribute deve conter :size caracteres.", -"array" => ":attribute deve conter :size itens.", -), -"unique" => ":attribute já está sendo utilizado.", -"url" => ":attribute está num formato inválido.", - -"positive" => ":attribute deve ser maior que zero.", -"has_credit" => "O cliente não possui crédito suficiente.", - -"positive" => "The :attribute must be greater than zero.", -"has_credit" => "The client does not have enough credit.", -"notmasked" => "The values are masked", - - -/* -|-------------------------------------------------------------------------- -| Custom Validation Language Lines -|-------------------------------------------------------------------------- -| -| Here you may specify custom validation messages for attributes using the -| convention "attribute.rule" to name the lines. This makes it quick to -| specify a specific custom language line for a given attribute rule. -| -*/ - -'custom' => array(), - -/* -|-------------------------------------------------------------------------- -| Custom Validation Attributes -|-------------------------------------------------------------------------- -| -| The following language lines are used to swap attribute place-holders -| with something more reader friendly such as E-Mail Address instead -| of "email". This simply helps us make messages a little cleaner. -| -*/ - -'attributes' => array(), - -); diff --git a/app/libraries/Utils.php b/app/libraries/Utils.php deleted file mode 100755 index 99d5a7052e7c..000000000000 --- a/app/libraries/Utils.php +++ /dev/null @@ -1,604 +0,0 @@ -registered; - } - - public static function isConfirmed() - { - return Auth::check() && Auth::user()->confirmed; - } - - public static function isDatabaseSetup() - { - try { - if (Schema::hasTable('accounts')) { - return true; - } - } catch (Exception $e) { - return false; - } - } - - public static function isProd() - { - return App::environment() == ENV_PRODUCTION; - } - - public static function isNinja() - { - return self::isNinjaProd() || self::isNinjaDev(); - } - - public static function isNinjaProd() - { - return isset($_ENV['NINJA_PROD']) && $_ENV['NINJA_PROD']; - } - - public static function isNinjaDev() - { - return isset($_ENV['NINJA_DEV']) && $_ENV['NINJA_DEV']; - } - - public static function isPro() - { - return Auth::check() && Auth::user()->isPro(); - } - - public static function getUserType() - { - if (Utils::isNinja()) { - return USER_TYPE_CLOUD_HOST; - } else { - return USER_TYPE_SELF_HOST; - } - } - - public static function getDemoAccountId() - { - return isset($_ENV[DEMO_ACCOUNT_ID]) ? $_ENV[DEMO_ACCOUNT_ID] : false; - } - - public static function isDemo() - { - return Auth::check() && Auth::user()->isDemo(); - } - - public static function getNewsFeedResponse($userType = false) - { - if (!$userType) { - $userType = Utils::getUserType(); - } - - $response = new stdClass(); - $response->message = isset($_ENV["{$userType}_MESSAGE"]) ? $_ENV["{$userType}_MESSAGE"] : ''; - $response->id = isset($_ENV["{$userType}_ID"]) ? $_ENV["{$userType}_ID"] : ''; - $response->version = NINJA_VERSION; - - return $response; - } - - public static function getProLabel($feature) - { - if (Auth::check() - && !Auth::user()->isPro() - && $feature == ACCOUNT_ADVANCED_SETTINGS) { - return ' PRO'; - } else { - return ''; - } - } - - public static function basePath() - { - return substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/') + 1); - } - - public static function trans($input) - { - $data = []; - - foreach ($input as $field) { - if ($field == "checkbox") { - $data[] = $field; - } else { - $data[] = trans("texts.$field"); - } - } - - return $data; - } - - public static function fatalError($message = false, $exception = false) - { - if (!$message) { - $message = "An error occurred, please try again later."; - } - - static::logError($message.' '.$exception); - - $data = [ - 'showBreadcrumbs' => false, - 'hideHeader' => true, - ]; - - return View::make('error', $data)->with('error', $message); - } - - public static function getErrorString($exception) - { - return "{$exception->getFile()} [Line {$exception->getLine()}] => {$exception->getMessage()}"; - } - - public static function logError($error, $context = 'PHP') - { - $count = Session::get('error_count', 0); - Session::put('error_count', ++$count); - if ($count > 100) { - return 'logged'; - } - - $data = [ - 'context' => $context, - 'user_id' => Auth::check() ? Auth::user()->id : 0, - 'user_name' => Auth::check() ? Auth::user()->getDisplayName() : '', - 'url' => Input::get('url', Request::url()), - 'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '', - 'ip' => Request::getClientIp(), - 'count' => Session::get('error_count', 0), - ]; - - Log::error($error."\n", $data); - - /* - Mail::queue('emails.error', ['message'=>$error.' '.json_encode($data)], function($message) - { - $message->to($email)->subject($subject); - }); - */ - } - - public static function parseFloat($value) - { - $value = preg_replace('/[^0-9\.\-]/', '', $value); - - return floatval($value); - } - - public static function formatPhoneNumber($phoneNumber) - { - $phoneNumber = preg_replace('/[^0-9a-zA-Z]/', '', $phoneNumber); - - if (!$phoneNumber) { - return ''; - } - - if (strlen($phoneNumber) > 10) { - $countryCode = substr($phoneNumber, 0, strlen($phoneNumber)-10); - $areaCode = substr($phoneNumber, -10, 3); - $nextThree = substr($phoneNumber, -7, 3); - $lastFour = substr($phoneNumber, -4, 4); - - $phoneNumber = '+'.$countryCode.' ('.$areaCode.') '.$nextThree.'-'.$lastFour; - } elseif (strlen($phoneNumber) == 10 && in_array(substr($phoneNumber, 0, 3), array(653, 656, 658, 659))) { - /** - * SG country code are 653, 656, 658, 659 - * US area code consist of 650, 651 and 657 - * @see http://en.wikipedia.org/wiki/Telephone_numbers_in_Singapore#Numbering_plan - * @see http://www.bennetyee.org/ucsd-pages/area.html - */ - $countryCode = substr($phoneNumber, 0, 2); - $nextFour = substr($phoneNumber, 2, 4); - $lastFour = substr($phoneNumber, 6, 4); - - $phoneNumber = '+'.$countryCode.' '.$nextFour.' '.$lastFour; - } elseif (strlen($phoneNumber) == 10) { - $areaCode = substr($phoneNumber, 0, 3); - $nextThree = substr($phoneNumber, 3, 3); - $lastFour = substr($phoneNumber, 6, 4); - - $phoneNumber = '('.$areaCode.') '.$nextThree.'-'.$lastFour; - } elseif (strlen($phoneNumber) == 7) { - $nextThree = substr($phoneNumber, 0, 3); - $lastFour = substr($phoneNumber, 3, 4); - - $phoneNumber = $nextThree.'-'.$lastFour; - } - - return $phoneNumber; - } - - public static function formatMoney($value, $currencyId = false) - { - if (!$currencyId) { - $currencyId = Session::get(SESSION_CURRENCY); - } - - $currency = Currency::remember(DEFAULT_QUERY_CACHE)->find($currencyId); - - if (!$currency) { - $currency = Currency::remember(DEFAULT_QUERY_CACHE)->find(1); - } - - return $currency->symbol.number_format($value, $currency->precision, $currency->decimal_separator, $currency->thousand_separator); - } - - public static function pluralize($string, $count) - { - $field = $count == 1 ? $string : $string.'s'; - $string = trans("texts.$field", ['count' => $count]); - - return $string; - } - - public static function toArray($data) - { - return json_decode(json_encode((array) $data), true); - } - - public static function toSpaceCase($camelStr) - { - return preg_replace('/([a-z])([A-Z])/s', '$1 $2', $camelStr); - } - - public static function timestampToDateTimeString($timestamp) - { - $timezone = Session::get(SESSION_TIMEZONE, DEFAULT_TIMEZONE); - $format = Session::get(SESSION_DATETIME_FORMAT, DEFAULT_DATETIME_FORMAT); - - return Utils::timestampToString($timestamp, $timezone, $format); - } - - public static function timestampToDateString($timestamp) - { - $timezone = Session::get(SESSION_TIMEZONE, DEFAULT_TIMEZONE); - $format = Session::get(SESSION_DATE_FORMAT, DEFAULT_DATE_FORMAT); - - return Utils::timestampToString($timestamp, $timezone, $format); - } - - public static function dateToString($date) - { - $dateTime = new DateTime($date); - $timestamp = $dateTime->getTimestamp(); - $format = Session::get(SESSION_DATE_FORMAT, DEFAULT_DATE_FORMAT); - - return Utils::timestampToString($timestamp, false, $format); - } - - public static function timestampToString($timestamp, $timezone = false, $format) - { - if (!$timestamp) { - return ''; - } - $date = Carbon::createFromTimeStamp($timestamp); - if ($timezone) { - $date->tz = $timezone; - } - if ($date->year < 1900) { - return ''; - } - - return $date->format($format); - } - - public static function toSqlDate($date, $formatResult = true) - { - if (!$date) { - return; - } - - $timezone = Session::get(SESSION_TIMEZONE); - $format = Session::get(SESSION_DATE_FORMAT); - - $dateTime = DateTime::createFromFormat($format, $date, new DateTimeZone($timezone)); - - return $formatResult ? $dateTime->format('Y-m-d') : $dateTime; - } - - public static function fromSqlDate($date, $formatResult = true) - { - if (!$date || $date == '0000-00-00') { - return ''; - } - - $timezone = Session::get(SESSION_TIMEZONE); - $format = Session::get(SESSION_DATE_FORMAT); - - $dateTime = DateTime::createFromFormat('Y-m-d', $date, new DateTimeZone($timezone)); - - return $formatResult ? $dateTime->format($format) : $dateTime; - } - - public static function today($formatResult = true) - { - $timezone = Session::get(SESSION_TIMEZONE); - $format = Session::get(SESSION_DATE_FORMAT); - $date = date_create(null, new DateTimeZone($timezone)); - - if ($formatResult) { - return $date->format($format); - } else { - return $date; - } - } - - public static function trackViewed($name, $type, $url = false) - { - if (!$url) { - $url = Request::url(); - } - - $viewed = Session::get(RECENTLY_VIEWED); - - if (!$viewed) { - $viewed = []; - } - - $object = new stdClass(); - $object->url = $url; - $object->name = ucwords($type).': '.$name; - - $data = []; - - for ($i = 0; $iurl == $item->url || $object->name == $item->name) { - continue; - } - - array_unshift($data, $item); - } - - array_unshift($data, $object); - - if (count($data) > RECENTLY_VIEWED_LIMIT) { - array_pop($data); - } - - Session::put(RECENTLY_VIEWED, $data); - } - - public static function processVariables($str) - { - if (!$str) { - return ''; - } - - $variables = ['MONTH', 'QUARTER', 'YEAR']; - for ($i = 0; $i 1) { - $offset = intval($addArray[1]); - } elseif (count($minArray) > 1) { - $offset = intval($minArray[1]) * -1; - } - - $val = Utils::getDatePart($variable, $offset); - $str = str_replace($match, $val, $str); - } - } - - return $str; - } - - private static function getDatePart($part, $offset) - { - $offset = intval($offset); - if ($part == 'MONTH') { - return Utils::getMonth($offset); - } elseif ($part == 'QUARTER') { - return Utils::getQuarter($offset); - } elseif ($part == 'YEAR') { - return Utils::getYear($offset); - } - } - - private static function getMonth($offset) - { - $months = [ "January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December", ]; - - $month = intval(date('n')) - 1; - - $month += $offset; - $month = $month % 12; - - if ($month < 0) { - $month += 12; - } - - return $months[$month]; - } - - private static function getQuarter($offset) - { - $month = intval(date('n')) - 1; - $quarter = floor(($month + 3) / 3); - $quarter += $offset; - $quarter = $quarter % 4; - if ($quarter == 0) { - $quarter = 4; - } - - return 'Q'.$quarter; - } - - private static function getYear($offset) - { - $year = intval(date('Y')); - - return $year + $offset; - } - - public static function getEntityName($entityType) - { - return ucwords(str_replace('_', ' ', $entityType)); - } - - public static function getClientDisplayName($model) - { - if ($model->client_name) { - return $model->client_name; - } elseif ($model->first_name || $model->last_name) { - return $model->first_name.' '.$model->last_name; - } else { - return $model->email; - } - } - - public static function encodeActivity($person = null, $action, $entity = null, $otherPerson = null) - { - $person = $person ? $person->getDisplayName() : 'System'; - $entity = $entity ? '['.$entity->getActivityKey().']' : ''; - $otherPerson = $otherPerson ? 'to '.$otherPerson->getDisplayName() : ''; - $token = Session::get('token_id') ? ' ('.trans('texts.token').')' : ''; - - return trim("$person $token $action $entity $otherPerson"); - } - - public static function decodeActivity($message) - { - $pattern = '/\[([\w]*):([\d]*):(.*)\]/i'; - preg_match($pattern, $message, $matches); - - if (count($matches) > 0) { - $match = $matches[0]; - $type = $matches[1]; - $publicId = $matches[2]; - $name = $matches[3]; - - $link = link_to($type.'s/'.$publicId, $name); - $message = str_replace($match, "$type $link", $message); - } - - return $message; - } - - public static function generateLicense() - { - $parts = []; - for ($i = 0; $i<5; $i++) { - $parts[] = strtoupper(str_random(4)); - } - - return implode('-', $parts); - } - - public static function lookupEventId($eventName) - { - if ($eventName == 'create_client') { - return EVENT_CREATE_CLIENT; - } elseif ($eventName == 'create_invoice') { - return EVENT_CREATE_INVOICE; - } elseif ($eventName == 'create_quote') { - return EVENT_CREATE_QUOTE; - } elseif ($eventName == 'create_payment') { - return EVENT_CREATE_PAYMENT; - } else { - return false; - } - } - - public static function notifyZapier($subscription, $data) - { - $curl = curl_init(); - - $jsonEncodedData = json_encode($data->toJson()); - $opts = [ - CURLOPT_URL => $subscription->target_url, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_CUSTOMREQUEST => 'POST', - CURLOPT_POST => 1, - CURLOPT_POSTFIELDS => $jsonEncodedData, - CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Content-Length: '.strlen($jsonEncodedData)], - ]; - - curl_setopt_array($curl, $opts); - - $result = curl_exec($curl); - $status = curl_getinfo($curl, CURLINFO_HTTP_CODE); - - curl_close($curl); - - if ($status == 410) { - $subscription->delete(); - } - } - - - public static function remapPublicIds(array $data) - { - $return = []; - - foreach ($data as $key => $val) { - if ($key === 'public_id') { - $key = 'id'; - } elseif (strpos($key, '_id')) { - continue; - } - - if (is_array($val)) { - $val = Utils::remapPublicIds($val); - } - - $return[$key] = $val; - } - - return $return; - } - - public static function getApiHeaders($count = 0) - { - return [ - 'Content-Type' => 'application/json', - //'Access-Control-Allow-Origin' => '*', - //'Access-Control-Allow-Methods' => 'GET', - //'Access-Control-Allow-Headers' => 'Origin, Content-Type, Accept, Authorization, X-Requested-With', - //'Access-Control-Allow-Credentials' => 'true', - 'X-Total-Count' => $count, - //'X-Rate-Limit-Limit' - The number of allowed requests in the current period - //'X-Rate-Limit-Remaining' - The number of remaining requests in the current period - //'X-Rate-Limit-Reset' - The number of seconds left in the current period, - ]; - } - - public static function startsWith($haystack, $needle) - { - return $needle === "" || strpos($haystack, $needle) === 0; - } - - public static function endsWith($haystack, $needle) - { - return $needle === "" || substr($haystack, -strlen($needle)) === $needle; - } - - public static function getEntityRowClass($model) - { - $str = $model->is_deleted || ($model->deleted_at && $model->deleted_at != '0000-00-00') ? 'DISABLED ' : ''; - - if ($model->is_deleted) { - $str .= 'ENTITY_DELETED '; - } - - if ($model->deleted_at && $model->deleted_at != '0000-00-00') { - $str .= 'ENTITY_ARCHIVED '; - } - - return $str; - } -} diff --git a/app/libraries/entity.php b/app/libraries/entity.php deleted file mode 100755 index 57e447e2e271..000000000000 --- a/app/libraries/entity.php +++ /dev/null @@ -1,8 +0,0 @@ - '']; - foreach ($matches[1] as $i => $key) { - # Convert escaped linebreakes to linebreak - $value = preg_replace("/\r?\n\s/", "", $matches[2][$i]); - # Unescape , and ; - $value = preg_replace('/\\\\([,;])/s', '$1', $value); - $data[strtolower($key)] = $value; - } - return $data; - } else { - return false; - } - } - - - public static function parseICALDate($datestr) { - $dt = null; - $timezone = null; - if (preg_match('/^TZID=(.+?):([12]\d\d\d)(\d\d)(\d\d)T(\d\d)(\d\d)(\d\d)$/', $datestr, $m)) { - $timezone = $m[1]; - $dt = new DateTime("{$m[2]}-{$m[3]}-{$m[4]}T{$m[5]}:{$m[6]}:{$m[7]}", new DateTimeZone($m[1])); - - } else if (preg_match('/^VALUE=DATE:([12]\d\d\d)(\d\d)(\d\d)$/', $datestr, $m)) { - $dt = new DateTime("{$m[1]}-{$m[2]}-{$m[3]}T00:00:00", new DateTimeZone("UTC")); - - } else if (preg_match('/^([12]\d\d\d)(\d\d)(\d\d)T(\d\d)(\d\d)(\d\d)Z$/', $datestr, $m)) { - $dt = new DateTime("{$m[1]}-{$m[2]}-{$m[3]}T{$m[4]}:{$m[5]}:{$m[6]}", new DateTimeZone("UTC")); - - } else { - return false; - } - - // Convert all to UTC - if($dt->getTimezone()->getName() != 'UTC') { - $dt->setTimezone(new DateTimeZone('UTC')); - } - - return [$dt, $timezone]; - } - - public static function curlGetUrls($urls = [], $timeout = 30) { - // Create muxer - $results = []; - $multi = curl_multi_init(); - $handles = []; - $ch2idx = []; - try { - foreach ($urls as $i => $url) { - // Create new handle and add to muxer - $ch = curl_init($url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_ENCODING, "gzip"); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); - curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); //timeout in seconds - - curl_multi_add_handle($multi, $ch); - $handles[(int) $ch] = $ch; - $ch2idx[(int) $ch] = $i; - } - - // Do initial connect - $still_running = true; - while ($still_running) { - // Do curl stuff - while (($mrc = curl_multi_exec($multi, $still_running)) === CURLM_CALL_MULTI_PERFORM); - if ($mrc !== CURLM_OK) { - break; - } - - // Try to read from handles that are ready - while ($info = curl_multi_info_read($multi)) { - if ($info["result"] == CURLE_OK) { - $results[$ch2idx[(int) $info["handle"]]] = curl_multi_getcontent($info["handle"]); - } else { - if (CURLE_UNSUPPORTED_PROTOCOL == $info["result"]) { - $results[$ch2idx[(int) $info["handle"]]] = [$info["result"], "Unsupported protocol"]; - } else if (CURLE_URL_MALFORMAT == $info["result"]) { - $results[$ch2idx[(int) $info["handle"]]] = [$info["result"], "Malform url"]; - } else if (CURLE_COULDNT_RESOLVE_HOST == $info["result"]) { - $results[$ch2idx[(int) $info["handle"]]] = [$info["result"], "Could not resolve host"]; - } else if (CURLE_OPERATION_TIMEDOUT == $info["result"]) { - $results[$ch2idx[(int) $info["handle"]]] = [$info["result"], "Timed out waiting for operations to finish"]; - } else { - $results[$ch2idx[(int) $info["handle"]]] = [$info["result"], "Unknown curl error code"]; - } - } - } - - // Sleep until - if (($rs = curl_multi_select($multi)) === -1) { - usleep(20); // select failed for some reason, so we sleep for 20ms and run some more curl stuff - } - } - } finally { - foreach ($handles as $chi => $ch) { - curl_multi_remove_handle($multi, $ch); - } - - curl_multi_close($multi); - } - - return $results; - } -} diff --git a/app/models/Account.php b/app/models/Account.php deleted file mode 100755 index bbe026266a64..000000000000 --- a/app/models/Account.php +++ /dev/null @@ -1,363 +0,0 @@ -hasMany('User'); - } - - public function clients() - { - return $this->hasMany('Client'); - } - - public function invoices() - { - return $this->hasMany('Invoice'); - } - - public function account_gateways() - { - return $this->hasMany('AccountGateway'); - } - - public function tax_rates() - { - return $this->hasMany('TaxRate'); - } - - public function country() - { - return $this->belongsTo('Country'); - } - - public function timezone() - { - return $this->belongsTo('Timezone'); - } - - public function language() - { - return $this->belongsTo('Language'); - } - - public function date_format() - { - return $this->belongsTo('DateFormat'); - } - - public function datetime_format() - { - return $this->belongsTo('DatetimeFormat'); - } - - public function size() - { - return $this->belongsTo('Size'); - } - - public function industry() - { - return $this->belongsTo('Industry'); - } - - public function isGatewayConfigured($gatewayId = 0) - { - $this->load('account_gateways'); - - if ($gatewayId) { - return $this->getGatewayConfig($gatewayId) != false; - } else { - return count($this->account_gateways) > 0; - } - } - - public function getDisplayName() - { - if ($this->name) { - return $this->name; - } - - $this->load('users'); - $user = $this->users()->first(); - - return $user->getDisplayName(); - } - - public function getTimezone() - { - if ($this->timezone) { - return $this->timezone->name; - } else { - return 'US/Eastern'; - } - } - - public function getGatewayByType($type = PAYMENT_TYPE_ANY) - { - foreach ($this->account_gateways as $gateway) { - if ($type == PAYMENT_TYPE_ANY) { - return $gateway; - } elseif ($gateway->isPayPal() && $type == PAYMENT_TYPE_PAYPAL) { - return $gateway; - } elseif (!$gateway->isPayPal() && $type == PAYMENT_TYPE_CREDIT_CARD) { - return $gateway; - } - } - - return false; - } - - public function getGatewayConfig($gatewayId) - { - foreach ($this->account_gateways as $gateway) { - if ($gateway->gateway_id == $gatewayId) { - return $gateway; - } - } - - return false; - } - - public function getLogoPath() - { - return 'logo/'.$this->account_key.'.jpg'; - } - - public function getLogoWidth() - { - $path = $this->getLogoPath(); - if (!file_exists($path)) { - return 0; - } - list($width, $height) = getimagesize($path); - - return $width; - } - - public function getLogoHeight() - { - $path = $this->getLogoPath(); - if (!file_exists($path)) { - return 0; - } - list($width, $height) = getimagesize($path); - - return $height; - } - - public function getNextInvoiceNumber($isQuote = false) - { - $counter = $isQuote && !$this->share_counter ? $this->quote_number_counter : $this->invoice_number_counter; - $prefix = $isQuote ? $this->quote_number_prefix : $this->invoice_number_prefix; - - return $prefix.str_pad($counter, 4, "0", STR_PAD_LEFT); - } - - public function incrementCounter($invoiceNumber, $isQuote = false, $isRecurring) - { - // check if the user modified the invoice number - if (!$isRecurring && $invoiceNumber != $this->getNextInvoiceNumber($isQuote)) { - $number = intval(preg_replace('/[^0-9]/', '', $invoiceNumber)); - if ($isQuote && !$this->share_counter) { - $this->quote_number_counter = $number + 1; - } else { - $this->invoice_number_counter = $number + 1; - } - // otherwise, just increment the counter - } else { - if ($isQuote && !$this->share_counter) { - $this->quote_number_counter += 1; - } else { - $this->invoice_number_counter += 1; - } - } - - $this->save(); - } - - public function getLocale() - { - $language = Language::remember(DEFAULT_QUERY_CACHE)->where('id', '=', $this->account->language_id)->first(); - - return $language->locale; - } - - public function loadLocalizationSettings() - { - $this->load('timezone', 'date_format', 'datetime_format', 'language'); - - Session::put(SESSION_TIMEZONE, $this->timezone ? $this->timezone->name : DEFAULT_TIMEZONE); - Session::put(SESSION_DATE_FORMAT, $this->date_format ? $this->date_format->format : DEFAULT_DATE_FORMAT); - Session::put(SESSION_DATE_PICKER_FORMAT, $this->date_format ? $this->date_format->picker_format : DEFAULT_DATE_PICKER_FORMAT); - Session::put(SESSION_DATETIME_FORMAT, $this->datetime_format ? $this->datetime_format->format : DEFAULT_DATETIME_FORMAT); - Session::put(SESSION_CURRENCY, $this->currency_id ? $this->currency_id : DEFAULT_CURRENCY); - Session::put(SESSION_LOCALE, $this->language_id ? $this->language->locale : DEFAULT_LOCALE); - } - - public function getInvoiceLabels() - { - $data = []; - $fields = [ - 'invoice', - 'invoice_date', - 'due_date', - 'invoice_number', - 'po_number', - 'discount', - 'taxes', - 'tax', - 'item', - 'description', - 'unit_cost', - 'quantity', - 'line_total', - 'subtotal', - 'paid_to_date', - 'balance_due', - 'terms', - 'your_invoice', - 'quote', - 'your_quote', - 'quote_date', - 'quote_number', - 'total', - 'invoice_issued_to', - ]; - - foreach ($fields as $field) { - $data[$field] = trans("texts.$field"); - } - - return $data; - } - - public function isPro() - { - if (!Utils::isNinjaProd()) { - return true; - } - - if ($this->account_key == NINJA_ACCOUNT_KEY) { - return true; - } - - $datePaid = $this->pro_plan_paid; - - if (!$datePaid || $datePaid == '0000-00-00') { - return false; - } elseif ($datePaid == NINJA_DATE) { - return true; - } - - $today = new DateTime('now'); - $datePaid = DateTime::createFromFormat('Y-m-d', $datePaid); - $interval = $today->diff($datePaid); - - return $interval->y == 0; - } - - public function isWhiteLabel() - { - if (Utils::isNinjaProd()) { - return false; - } - - return $this->pro_plan_paid == NINJA_DATE; - } - - public function getSubscription($eventId) - { - return Subscription::where('account_id', '=', $this->id)->where('event_id', '=', $eventId)->first(); - } - - public function hideFieldsForViz() - { - foreach ($this->clients as $client) { - $client->setVisible([ - 'public_id', - 'name', - 'balance', - 'paid_to_date', - 'invoices', - 'contacts', - ]); - - foreach ($client->invoices as $invoice) { - $invoice->setVisible([ - 'public_id', - 'invoice_number', - 'amount', - 'balance', - 'invoice_status_id', - 'invoice_items', - 'created_at', - ]); - - foreach ($invoice->invoice_items as $invoiceItem) { - $invoiceItem->setVisible([ - 'product_key', - 'cost', - 'qty', - ]); - } - } - - foreach ($client->contacts as $contact) { - $contact->setVisible([ - 'public_id', - 'first_name', - 'last_name', - 'email', ]); - } - } - - return $this; - } - - public function getEmailTemplate($entityType, $message = false) - { - $field = "email_template_$entityType"; - $template = $this->$field; - - if ($template) { - return $template; - } - - $template = "\$client,

    \r\n\r\n" . - trans("texts.{$entityType}_message", ['amount' => '$amount']) . "

    \r\n\r\n"; - - if ($entityType != ENTITY_PAYMENT) { - $template .= "\$link

    \r\n\r\n"; - } - - if ($message) { - $template .= "$message

    \r\n\r\n"; - } - - return $template . "\$footer"; - } - - public function getEmailFooter() - { - if ($this->email_footer) { - return $this->email_footer; - } else { - return "

    " . trans('texts.email_signature') . "
    \$account

    "; - } - } - - public function showTokenCheckbox() - { - return $this->token_billing_type_id == TOKEN_BILLING_OPT_IN - || $this->token_billing_type_id == TOKEN_BILLING_OPT_OUT; - } - - public function selectTokenCheckbox() - { - return $this->token_billing_type_id == TOKEN_BILLING_OPT_OUT; - } -} diff --git a/app/models/AccountGateway.php b/app/models/AccountGateway.php deleted file mode 100755 index 002bc830795e..000000000000 --- a/app/models/AccountGateway.php +++ /dev/null @@ -1,28 +0,0 @@ -belongsTo('Gateway'); - } - - public function getCreditcardTypes() - { - $flags = unserialize(CREDIT_CARDS); - $arrayOfImages = []; - - foreach ($flags as $card => $name) { - if (($this->accepted_credit_cards & $card) == $card) { - $arrayOfImages[] = ['source' => asset($name['card']), 'alt' => $name['text']]; - } - } - - return $arrayOfImages; - } - - public function isPayPal() { - return $this->gateway_id == GATEWAY_PAYPAL_EXPRESS; - } -} - diff --git a/app/models/AccountGatewayToken.php b/app/models/AccountGatewayToken.php deleted file mode 100644 index ae63d6c2d2cd..000000000000 --- a/app/models/AccountGatewayToken.php +++ /dev/null @@ -1,7 +0,0 @@ -belongsTo('Account'); - } -} diff --git a/app/models/Activity.php b/app/models/Activity.php deleted file mode 100755 index 9fe82178c612..000000000000 --- a/app/models/Activity.php +++ /dev/null @@ -1,470 +0,0 @@ -whereAccountId(Auth::user()->account_id); - } - - public function account() - { - return $this->belongsTo('Account'); - } - - public function user() - { - return $this->belongsTo('User'); - } - - private static function getBlank($entity = false) - { - $activity = new Activity(); - - if ($entity) { - $activity->user_id = $entity instanceof User ? $entity->id : $entity->user_id; - $activity->account_id = $entity->account_id; - } elseif (Auth::check()) { - $activity->user_id = Auth::user()->id; - $activity->account_id = Auth::user()->account_id; - } else { - Utils::fatalError(); - } - - $activity->token_id = Session::get('token_id', null); - $activity->ip = Request::getClientIp(); - - return $activity; - } - - public static function createClient($client, $notify = true) - { - $activity = Activity::getBlank(); - $activity->client_id = $client->id; - $activity->activity_type_id = ACTIVITY_TYPE_CREATE_CLIENT; - $activity->message = Utils::encodeActivity(Auth::user(), 'created', $client); - $activity->save(); - - if ($notify) { - Activity::checkSubscriptions(EVENT_CREATE_CLIENT, $client); - } - } - - public static function updateClient($client) - { - if ($client->is_deleted && !$client->getOriginal('is_deleted')) { - $activity = Activity::getBlank(); - $activity->client_id = $client->id; - $activity->activity_type_id = ACTIVITY_TYPE_DELETE_CLIENT; - $activity->message = Utils::encodeActivity(Auth::user(), 'deleted', $client); - $activity->balance = $client->balance; - $activity->save(); - } - } - - public static function archiveClient($client) - { - if (!$client->is_deleted) { - $activity = Activity::getBlank(); - $activity->client_id = $client->id; - $activity->activity_type_id = ACTIVITY_TYPE_ARCHIVE_CLIENT; - $activity->message = Utils::encodeActivity(Auth::user(), 'archived', $client); - $activity->balance = $client->balance; - $activity->save(); - } - } - - public static function restoreClient($client) - { - $activity = Activity::getBlank(); - $activity->client_id = $client->id; - $activity->activity_type_id = ACTIVITY_TYPE_RESTORE_CLIENT; - $activity->message = Utils::encodeActivity(Auth::user(), 'restored', $client); - $activity->balance = $client->balance; - $activity->save(); - } - - public static function createInvoice($invoice) - { - if (Auth::check()) { - $message = Utils::encodeActivity(Auth::user(), 'created', $invoice); - } else { - $message = Utils::encodeActivity(null, 'created', $invoice); - } - - $adjustment = 0; - $client = $invoice->client; - if (!$invoice->is_quote && !$invoice->is_recurring) { - $adjustment = $invoice->amount; - $client->balance = $client->balance + $adjustment; - $client->save(); - } - - $activity = Activity::getBlank($invoice); - $activity->invoice_id = $invoice->id; - $activity->client_id = $invoice->client_id; - $activity->activity_type_id = $invoice->is_quote ? ACTIVITY_TYPE_CREATE_QUOTE : ACTIVITY_TYPE_CREATE_INVOICE; - $activity->message = $message; - $activity->balance = $client->balance; - $activity->adjustment = $adjustment; - $activity->save(); - - Activity::checkSubscriptions($invoice->is_quote ? EVENT_CREATE_QUOTE : EVENT_CREATE_INVOICE, $invoice); - } - - public static function archiveInvoice($invoice) - { - if (!$invoice->is_deleted) { - $activity = Activity::getBlank(); - $activity->invoice_id = $invoice->id; - $activity->client_id = $invoice->client_id; - $activity->activity_type_id = $invoice->is_quote ? ACTIVITY_TYPE_ARCHIVE_QUOTE : ACTIVITY_TYPE_ARCHIVE_INVOICE; - $activity->message = Utils::encodeActivity(Auth::user(), 'archived', $invoice); - $activity->balance = $invoice->client->balance; - - $activity->save(); - } - } - - public static function restoreInvoice($invoice) - { - $activity = Activity::getBlank(); - $activity->invoice_id = $invoice->id; - $activity->client_id = $invoice->client_id; - $activity->activity_type_id = $invoice->is_quote ? ACTIVITY_TYPE_RESTORE_QUOTE : ACTIVITY_TYPE_RESTORE_INVOICE; - $activity->message = Utils::encodeActivity(Auth::user(), 'restored', $invoice); - $activity->balance = $invoice->client->balance; - - $activity->save(); - } - - public static function emailInvoice($invitation) - { - $adjustment = 0; - $client = $invitation->invoice->client; - - $activity = Activity::getBlank($invitation); - $activity->client_id = $invitation->invoice->client_id; - $activity->invoice_id = $invitation->invoice_id; - $activity->contact_id = $invitation->contact_id; - $activity->activity_type_id = $invitation->invoice ? ACTIVITY_TYPE_EMAIL_QUOTE : ACTIVITY_TYPE_EMAIL_INVOICE; - $activity->message = Utils::encodeActivity(Auth::check() ? Auth::user() : null, 'emailed', $invitation->invoice, $invitation->contact); - $activity->balance = $client->balance; - $activity->save(); - } - - public static function updateInvoice($invoice) - { - $client = $invoice->client; - - if ($invoice->is_deleted && !$invoice->getOriginal('is_deleted')) { - $adjustment = 0; - if (!$invoice->is_quote && !$invoice->is_recurring) { - $adjustment = $invoice->balance * -1; - $client->balance = $client->balance - $invoice->balance; - $client->paid_to_date = $client->paid_to_date - ($invoice->amount - $invoice->balance); - $client->save(); - } - - $activity = Activity::getBlank(); - $activity->client_id = $invoice->client_id; - $activity->invoice_id = $invoice->id; - $activity->activity_type_id = $invoice->is_quote ? ACTIVITY_TYPE_DELETE_QUOTE : ACTIVITY_TYPE_DELETE_INVOICE; - $activity->message = Utils::encodeActivity(Auth::user(), 'deleted', $invoice); - $activity->balance = $invoice->client->balance; - $activity->adjustment = $adjustment; - $activity->save(); - } else { - $diff = floatval($invoice->amount) - floatval($invoice->getOriginal('amount')); - - $fieldChanged = false; - foreach (['invoice_number', 'po_number', 'invoice_date', 'due_date', 'terms', 'public_notes', 'invoice_footer'] as $field) { - if ($invoice->$field != $invoice->getOriginal($field)) { - $fieldChanged = true; - break; - } - } - - if ($diff > 0 || $fieldChanged) { - $backupInvoice = Invoice::with('invoice_items', 'client.account', 'client.contacts')->find($invoice->id); - - if ($diff > 0 && !$invoice->is_quote && !$invoice->is_recurring) { - $client->balance = $client->balance + $diff; - $client->save(); - } - - $activity = Activity::getBlank($invoice); - $activity->client_id = $invoice->client_id; - $activity->invoice_id = $invoice->id; - $activity->activity_type_id = $invoice->is_quote ? ACTIVITY_TYPE_UPDATE_QUOTE : ACTIVITY_TYPE_UPDATE_INVOICE; - $activity->message = Utils::encodeActivity(Auth::user(), 'updated', $invoice); - $activity->balance = $client->balance; - $activity->adjustment = $invoice->is_quote || $invoice->is_recurring ? 0 : $diff; - $activity->json_backup = $backupInvoice->hidePrivateFields()->toJSON(); - $activity->save(); - - if ($invoice->isPaid() && $invoice->balance > 0) { - $invoice->invoice_status_id = INVOICE_STATUS_PARTIAL; - $invoice->save(); - } - } - } - } - - public static function viewInvoice($invitation) - { - if (Session::get($invitation->invitation_key)) { - return; - } - - Session::put($invitation->invitation_key, true); - $invoice = $invitation->invoice; - - if (!$invoice->isViewed()) { - $invoice->invoice_status_id = INVOICE_STATUS_VIEWED; - $invoice->save(); - } - - $now = Carbon::now()->toDateTimeString(); - - $invitation->viewed_date = $now; - $invitation->save(); - - $client = $invoice->client; - $client->last_login = $now; - $client->save(); - - $activity = Activity::getBlank($invitation); - $activity->client_id = $invitation->invoice->client_id; - $activity->invitation_id = $invitation->id; - $activity->contact_id = $invitation->contact_id; - $activity->invoice_id = $invitation->invoice_id; - $activity->activity_type_id = $invitation->invoice->is_quote ? ACTIVITY_TYPE_VIEW_QUOTE : ACTIVITY_TYPE_VIEW_INVOICE; - $activity->message = Utils::encodeActivity($invitation->contact, 'viewed', $invitation->invoice); - $activity->balance = $invitation->invoice->client->balance; - $activity->save(); - } - - public static function approveQuote($invitation) { - - $activity = Activity::getBlank($invitation); - $activity->client_id = $invitation->invoice->client_id; - $activity->invitation_id = $invitation->id; - $activity->contact_id = $invitation->contact_id; - $activity->invoice_id = $invitation->invoice_id; - $activity->activity_type_id = ACTIVITY_TYPE_APPROVE_QUOTE; - $activity->message = Utils::encodeActivity($invitation->contact, 'approved', $invitation->invoice); - $activity->balance = $invitation->invoice->client->balance; - $activity->save(); - } - - public static function createPayment($payment) - { - $client = $payment->client; - $client->balance = $client->balance - $payment->amount; - $client->paid_to_date = $client->paid_to_date + $payment->amount; - $client->save(); - - if ($payment->contact_id) { - $activity = Activity::getBlank($client); - $activity->contact_id = $payment->contact_id; - $activity->message = Utils::encodeActivity($payment->invitation->contact, 'entered '.$payment->getName().' for ', $payment->invoice); - } else { - $activity = Activity::getBlank($client); - $message = $payment->payment_type_id == PAYMENT_TYPE_CREDIT ? 'applied credit for ' : 'entered '.$payment->getName().' for '; - $activity->message = Utils::encodeActivity(Auth::user(), $message, $payment->invoice); - } - - $activity->payment_id = $payment->id; - - if ($payment->invoice_id) { - $activity->invoice_id = $payment->invoice_id; - - $invoice = $payment->invoice; - $invoice->balance = $invoice->balance - $payment->amount; - $invoice->invoice_status_id = ($invoice->balance > 0) ? INVOICE_STATUS_PARTIAL : INVOICE_STATUS_PAID; - $invoice->save(); - } - - $activity->payment_id = $payment->id; - $activity->client_id = $payment->client_id; - $activity->activity_type_id = ACTIVITY_TYPE_CREATE_PAYMENT; - $activity->balance = $client->balance; - $activity->adjustment = $payment->amount * -1; - $activity->save(); - - Activity::checkSubscriptions(EVENT_CREATE_PAYMENT, $payment); - } - - public static function updatePayment($payment) - { - if ($payment->is_deleted && !$payment->getOriginal('is_deleted')) { - $client = $payment->client; - $client->balance = $client->balance + $payment->amount; - $client->paid_to_date = $client->paid_to_date - $payment->amount; - $client->save(); - - $invoice = $payment->invoice; - $invoice->balance = $invoice->balance + $payment->amount; - $invoice->save(); - - $activity = Activity::getBlank(); - $activity->payment_id = $payment->id; - $activity->client_id = $invoice->client_id; - $activity->invoice_id = $invoice->id; - $activity->activity_type_id = ACTIVITY_TYPE_DELETE_PAYMENT; - $activity->message = Utils::encodeActivity(Auth::user(), 'deleted '.$payment->getName()); - $activity->balance = $client->balance; - $activity->adjustment = $payment->amount; - $activity->save(); - } else { - /* - $diff = floatval($invoice->amount) - floatval($invoice->getOriginal('amount')); - - if ($diff == 0) - { - return; - } - - $client = $invoice->client; - $client->balance = $client->balance + $diff; - $client->save(); - - $activity = Activity::getBlank($invoice); - $activity->client_id = $invoice->client_id; - $activity->invoice_id = $invoice->id; - $activity->activity_type_id = ACTIVITY_TYPE_UPDATE_INVOICE; - $activity->message = Utils::encodeActivity(Auth::user(), 'updated', $invoice); - $activity->balance = $client->balance; - $activity->adjustment = $diff; - $activity->json_backup = $backupInvoice->hidePrivateFields()->toJSON(); - $activity->save(); - */ - } - } - - public static function archivePayment($payment) - { - if ($payment->is_deleted) { - return; - } - - $client = $payment->client; - $invoice = $payment->invoice; - - $activity = Activity::getBlank(); - $activity->payment_id = $payment->id; - $activity->invoice_id = $invoice->id; - $activity->client_id = $client->id; - $activity->activity_type_id = ACTIVITY_TYPE_ARCHIVE_PAYMENT; - $activity->message = Utils::encodeActivity(Auth::user(), 'archived '.$payment->getName()); - $activity->balance = $client->balance; - $activity->adjustment = 0; - $activity->save(); - } - - public static function restorePayment($payment) - { - $client = $payment->client; - $invoice = $payment->invoice; - - $activity = Activity::getBlank(); - $activity->payment_id = $payment->id; - $activity->invoice_id = $invoice->id; - $activity->client_id = $client->id; - $activity->activity_type_id = ACTIVITY_TYPE_RESTORE_PAYMENT; - $activity->message = Utils::encodeActivity(Auth::user(), 'restored '.$payment->getName()); - $activity->balance = $client->balance; - $activity->adjustment = 0; - $activity->save(); - } - - public static function createCredit($credit) - { - $activity = Activity::getBlank(); - $activity->message = Utils::encodeActivity(Auth::user(), 'entered '.Utils::formatMoney($credit->amount, $credit->client->currency_id).' credit'); - $activity->credit_id = $credit->id; - $activity->client_id = $credit->client_id; - $activity->activity_type_id = ACTIVITY_TYPE_CREATE_CREDIT; - $activity->balance = $credit->client->balance; - $activity->save(); - } - - public static function updateCredit($credit) - { - if ($credit->is_deleted && !$credit->getOriginal('is_deleted')) { - $activity = Activity::getBlank(); - $activity->credit_id = $credit->id; - $activity->client_id = $credit->client_id; - $activity->activity_type_id = ACTIVITY_TYPE_DELETE_CREDIT; - $activity->message = Utils::encodeActivity(Auth::user(), 'deleted '.Utils::formatMoney($credit->balance, $credit->client->currency_id).' credit'); - $activity->balance = $credit->client->balance; - $activity->save(); - } else { - /* - $diff = floatval($invoice->amount) - floatval($invoice->getOriginal('amount')); - - if ($diff == 0) - { - return; - } - - $client = $invoice->client; - $client->balance = $client->balance + $diff; - $client->save(); - - $activity = Activity::getBlank($invoice); - $activity->client_id = $invoice->client_id; - $activity->invoice_id = $invoice->id; - $activity->activity_type_id = ACTIVITY_TYPE_UPDATE_INVOICE; - $activity->message = Utils::encodeActivity(Auth::user(), 'updated', $invoice); - $activity->balance = $client->balance; - $activity->adjustment = $diff; - $activity->json_backup = $backupInvoice->hidePrivateFields()->toJSON(); - $activity->save(); - */ - } - } - - public static function archiveCredit($credit) - { - if ($credit->is_deleted) { - return; - } - - $activity = Activity::getBlank(); - $activity->client_id = $credit->client_id; - $activity->credit_id = $credit->id; - $activity->activity_type_id = ACTIVITY_TYPE_ARCHIVE_CREDIT; - $activity->message = Utils::encodeActivity(Auth::user(), 'archived '.Utils::formatMoney($credit->balance, $credit->client->currency_id).' credit'); - $activity->balance = $credit->client->balance; - $activity->save(); - } - - public static function restoreCredit($credit) - { - $activity = Activity::getBlank(); - $activity->client_id = $credit->client_id; - $activity->credit_id = $credit->id; - $activity->activity_type_id = ACTIVITY_TYPE_RESTORE_CREDIT; - $activity->message = Utils::encodeActivity(Auth::user(), 'restored '.Utils::formatMoney($credit->balance, $credit->client->currency_id).' credit'); - $activity->balance = $credit->client->balance; - $activity->save(); - } - - private static function checkSubscriptions($event, $data) - { - if (!Auth::check()) { - return; - } - - $subscription = Auth::user()->account->getSubscription($event); - - if ($subscription) { - Utils::notifyZapier($subscription, $data); - } - } -} diff --git a/app/models/Affiliate.php b/app/models/Affiliate.php deleted file mode 100644 index 3efccbd1ada0..000000000000 --- a/app/models/Affiliate.php +++ /dev/null @@ -1,7 +0,0 @@ -belongsTo('Account'); - } - - public function invoices() - { - return $this->hasMany('Invoice'); - } - - public function payments() - { - return $this->hasMany('Payment'); - } - - public function contacts() - { - return $this->hasMany('Contact'); - } - - public function projects() - { - return $this->hasMany('Project'); - } - - public function country() - { - return $this->belongsTo('Country'); - } - - public function currency() - { - return $this->belongsTo('Currency'); - } - - public function size() - { - return $this->belongsTo('Size'); - } - - public function industry() - { - return $this->belongsTo('Industry'); - } - - public function getTotalCredit() - { - return DB::table('credits') - ->where('client_id', '=', $this->id) - ->whereNull('deleted_at') - ->sum('balance'); - } - - public function getName() - { - return $this->getDisplayName(); - } - - public function getDisplayName() - { - if ($this->name) { - return $this->name; - } - - $this->load('contacts'); - $contact = $this->contacts()->first(); - - return $contact->getDisplayName(); - } - - public function getEntityType() - { - return ENTITY_CLIENT; - } - - public function getAddress() - { - $str = ''; - - if ($this->address1) { - $str .= $this->address1.'
    '; - } - if ($this->address2) { - $str .= $this->address2.'
    '; - } - if ($this->city) { - $str .= $this->city.', '; - } - if ($this->state) { - $str .= $this->state.' '; - } - if ($this->postal_code) { - $str .= $this->postal_code; - } - if ($this->country) { - $str .= '
    '.$this->country->name; - } - - if ($str) { - $str = '

    '.$str.'

    '; - } - - return $str; - } - - public function getPhone() - { - $str = ''; - - if ($this->work_phone) { - $str .= ''.Utils::formatPhoneNumber($this->work_phone); - } - - return $str; - } - - public function getIdNumber() - { - $str = ''; - - if ($this->id_number) { - $str .= ''.trans('texts.id_number').': '.$this->id_number; - } - - return $str; - } - - public function getVatNumber() - { - $str = ''; - - if ($this->vat_number) { - $str .= ''.trans('texts.vat_number').': '.$this->vat_number; - } - - return $str; - } - - public function getNotes() - { - $str = ''; - - if ($this->private_notes) { - $str .= ''.$this->private_notes.''; - } - - return $str; - } - - public function getIndustry() - { - $str = ''; - - if ($this->client_industry) { - $str .= $this->client_industry->name.' '; - } - - if ($this->client_size) { - $str .= $this->client_size->name; - } - - return $str; - } - - public function getCustomFields() - { - $str = ''; - $account = $this->account; - - if ($account->custom_client_label1 && $this->custom_value1) { - $str .= "{$account->custom_client_label1}: {$this->custom_value1}
    "; - } - - if ($account->custom_client_label2 && $this->custom_value2) { - $str .= "{$account->custom_client_label2}: {$this->custom_value2}
    "; - } - - return $str; - } - - public function getWebsite() - { - if (!$this->website) { - return ''; - } - - $link = $this->website; - $title = $this->website; - $prefix = 'http://'; - - if (strlen($link) > 7 && substr($link, 0, 7) === $prefix) { - $title = substr($title, 7); - } else { - $link = $prefix.$link; - } - - return link_to($link, $title, array('target' => '_blank')); - } - - public function getDateCreated() - { - if ($this->created_at == '0000-00-00 00:00:00') { - return '---'; - } else { - return $this->created_at->format('m/d/y h:i a'); - } - } - - - public function getGatewayToken() - { - $this->account->load('account_gateways'); - - if (!count($this->account->account_gateways)) { - return false; - } - - $accountGateway = $this->account->getGatewayConfig(GATEWAY_STRIPE); - - if (!$accountGateway) { - return false; - } - - $token = AccountGatewayToken::where('client_id', '=', $this->id) - ->where('account_gateway_id', '=', $accountGateway->id)->first(); - - return $token ? $token->token : false; - } - - public function getGatewayLink() - { - $token = $this->getGatewayToken(); - return $token ? "https://dashboard.stripe.com/customers/{$token}" : false; - } -} - -/* -Client::created(function($client) -{ - Activity::createClient($client); -}); -*/ - -Client::updating(function ($client) { - Activity::updateClient($client); -}); - -Client::deleting(function ($client) { - Activity::archiveClient($client); -}); - -Client::restoring(function ($client) { - Activity::restoreClient($client); -}); diff --git a/app/models/Contact.php b/app/models/Contact.php deleted file mode 100755 index ca29ce31b9f5..000000000000 --- a/app/models/Contact.php +++ /dev/null @@ -1,74 +0,0 @@ -belongsTo('Client'); - } - - public function getPersonType() - { - return PERSON_CONTACT; - } - - /* - public function getLastLogin() - { - if ($this->last_login == '0000-00-00 00:00:00') - { - return '---'; - } - else - { - return $this->last_login->format('m/d/y h:i a'); - } - } - */ - - public function getDisplayName() - { - if ($this->getFullName()) { - return $this->getFullName(); - } else { - return $this->email; - } - } - - public function getFullName() - { - if ($this->first_name || $this->last_name) { - return $this->first_name.' '.$this->last_name; - } else { - return ''; - } - } - - public function getDetails() - { - $str = ''; - - if ($this->first_name || $this->last_name) { - $str .= ''.$this->first_name.' '.$this->last_name.'
    '; - } - - if ($this->email) { - $str .= ''.HTML::mailto($this->email, $this->email).'
    '; - } - - if ($this->phone) { - $str .= ''.Utils::formatPhoneNumber($this->phone); - } - - if ($str) { - $str = '

    '.$str.'

    '; - } - - return $str; - } -} diff --git a/app/models/Country.php b/app/models/Country.php deleted file mode 100755 index 05364b4e3529..000000000000 --- a/app/models/Country.php +++ /dev/null @@ -1,9 +0,0 @@ -belongsTo('Invoice')->withTrashed(); - } - - public function client() - { - return $this->belongsTo('Client')->withTrashed(); - } - - public function getName() - { - return ''; - } - - public function getEntityType() - { - return ENTITY_CREDIT; - } - - public function apply($amount) - { - if ($amount > $this->balance) { - $applied = $this->balance; - $this->balance = 0; - } else { - $applied = $amount; - $this->balance = $this->balance - $amount; - } - - $this->save(); - - return $applied; - } -} - -Credit::created(function ($credit) { - Activity::createCredit($credit); -}); - -Credit::updating(function ($credit) { - Activity::updateCredit($credit); -}); - -Credit::deleting(function ($credit) { - Activity::archiveCredit($credit); -}); - -Credit::restoring(function ($credit) { - Activity::restoreCredit($credit); -}); diff --git a/app/models/Currency.php b/app/models/Currency.php deleted file mode 100755 index 943816064607..000000000000 --- a/app/models/Currency.php +++ /dev/null @@ -1,7 +0,0 @@ -user_id = $parent instanceof User ? $parent->id : $parent->user_id; - $entity->account_id = $parent->account_id; - } elseif (Auth::check()) { - $entity->user_id = Auth::user()->id; - $entity->account_id = Auth::user()->account_id; - } else { - Utils::fatalError(); - } - - $lastEntity = $className::withTrashed()->scope(false, $entity->account_id)->orderBy('public_id', 'DESC')->first(); - - if ($lastEntity) { - $entity->public_id = $lastEntity->public_id + 1; - } else { - $entity->public_id = 1; - } - - return $entity; - } - - public static function getPrivateId($publicId) - { - $className = get_called_class(); - - return $className::scope($publicId)->pluck('id'); - } - - public function getActivityKey() - { - return $this->getEntityType().':'.$this->public_id.':'.$this->getName(); - } - - /* - public function getEntityType() - { - return ''; - } - - public function getNmae() - { - return ''; - } - */ - - public function scopeScope($query, $publicId = false, $accountId = false) - { - if (!$accountId) { - $accountId = Auth::user()->account_id; - } - - $query->whereAccountId($accountId); - - if ($publicId) { - if (is_array($publicId)) { - $query->whereIn('public_id', $publicId); - } else { - $query->wherePublicId($publicId); - } - } - - return $query; - } -} diff --git a/app/models/Frequency.php b/app/models/Frequency.php deleted file mode 100755 index 84373222ae62..000000000000 --- a/app/models/Frequency.php +++ /dev/null @@ -1,7 +0,0 @@ -belongsTo('PaymentLibrary', 'payment_library_id'); - } - - public function getLogoUrl() - { - return '/images/gateways/logo_'.$this->provider.'.png'; - } - - public function getHelp() - { - $link = ''; - - if ($this->id == GATEWAY_AUTHORIZE_NET || $this->id == GATEWAY_AUTHORIZE_NET_SIM) { - $link = 'http://reseller.authorize.net/application/?id=5560364'; - } elseif ($this->id == GATEWAY_PAYPAL_EXPRESS) { - $link = 'https://www.paypal.com/us/cgi-bin/webscr?cmd=_login-api-run'; - } elseif ($this->id == GATEWAY_TWO_CHECKOUT) { - $link = 'https://www.2checkout.com/referral?r=2c37ac2298'; - } - - $key = 'texts.gateway_help_'.$this->id; - $str = trans($key, ['link' => "Click here"]); - - return $key != $str ? $str : ''; - } - - public function getFields() - { - $paymentLibrary = $this->paymentlibrary; - - if ($paymentLibrary->id == PAYMENT_LIBRARY_OMNIPAY) { - $fields = Omnipay::create($this->provider)->getDefaultParameters(); - } else { - $fields = Payment_Utility::load('config', 'drivers/'.strtolower($this->provider)); - } - - if ($fields == null) { - $fields = array(); - } - - return $fields; - } -} diff --git a/app/models/Industry.php b/app/models/Industry.php deleted file mode 100755 index 4c931a520d8f..000000000000 --- a/app/models/Industry.php +++ /dev/null @@ -1,7 +0,0 @@ -belongsTo('Invoice'); - } - - public function contact() - { - return $this->belongsTo('Contact')->withTrashed(); - } - - public function user() - { - return $this->belongsTo('User')->withTrashed(); - } - - public function account() - { - return $this->belongsTo('Account'); - } - - public function getLink() - { - return SITE_URL.'/view/'.$this->invitation_key; - } -} diff --git a/app/models/Invoice.php b/app/models/Invoice.php deleted file mode 100755 index 09e1f887d34d..000000000000 --- a/app/models/Invoice.php +++ /dev/null @@ -1,230 +0,0 @@ -belongsTo('Account'); - } - - public function user() - { - return $this->belongsTo('User'); - } - - public function client() - { - return $this->belongsTo('Client')->withTrashed(); - } - - public function invoice_items() - { - return $this->hasMany('InvoiceItem')->orderBy('id'); - } - - public function invoice_status() - { - return $this->belongsTo('InvoiceStatus'); - } - - public function invoice_design() - { - return $this->belongsTo('InvoiceDesign'); - } - - public function invitations() - { - return $this->hasMany('Invitation')->orderBy('invitations.contact_id'); - } - - public function getName() - { - return $this->invoice_number; - } - - public function getLink() - { - return link_to('invoices/'.$this->public_id, $this->invoice_number); - } - - public function getEntityType() - { - return $this->is_quote ? ENTITY_QUOTE : ENTITY_INVOICE; - } - - public function isSent() - { - return $this->invoice_status_id >= INVOICE_STATUS_SENT; - } - - public function isViewed() - { - return $this->invoice_status_id >= INVOICE_STATUS_VIEWED; - } - - public function isPaid() - { - return $this->invoice_status_id >= INVOICE_STATUS_PAID; - } - - public function hidePrivateFields() - { - $this->setVisible([ - 'invoice_number', - 'discount', - 'is_amount_discount', - 'po_number', - 'invoice_date', - 'due_date', - 'terms', - 'invoice_footer', - 'public_notes', - 'amount', - 'balance', - 'invoice_items', - 'client', - 'tax_name', - 'tax_rate', - 'account', - 'invoice_design', - 'invoice_design_id', - 'is_pro', - 'is_quote', - 'custom_value1', - 'custom_value2', - 'custom_taxes1', - 'custom_taxes2', ]); - - $this->client->setVisible([ - 'name', - 'id_number', - 'vat_number', - 'address1', - 'address2', - 'city', - 'state', - 'postal_code', - 'work_phone', - 'payment_terms', - 'contacts', - 'country', - 'currency_id', - 'custom_value1', - 'custom_value2', ]); - - $this->account->setVisible([ - 'name', - 'id_number', - 'vat_number', - 'address1', - 'address2', - 'city', - 'state', - 'postal_code', - 'work_phone', - 'work_email', - 'country', - 'currency_id', - 'custom_label1', - 'custom_value1', - 'custom_label2', - 'custom_value2', - 'custom_client_label1', - 'custom_client_label2', - 'primary_color', - 'secondary_color', - 'hide_quantity', - 'hide_paid_to_date', - 'custom_invoice_label1', - 'custom_invoice_label2', ]); - - foreach ($this->invoice_items as $invoiceItem) { - $invoiceItem->setVisible([ - 'product_key', - 'notes', - 'cost', - 'qty', - 'tax_name', - 'tax_rate', ]); - } - - foreach ($this->client->contacts as $contact) { - $contact->setVisible([ - 'first_name', - 'last_name', - 'email', - 'phone', ]); - } - - return $this; - } - - public function shouldSendToday() - { - if (!$this->start_date || strtotime($this->start_date) > strtotime('now')) { - return false; - } - - if ($this->end_date && strtotime($this->end_date) < strtotime('now')) { - return false; - } - - $dayOfWeekToday = date('w'); - $dayOfWeekStart = date('w', strtotime($this->start_date)); - - $dayOfMonthToday = date('j'); - $dayOfMonthStart = date('j', strtotime($this->start_date)); - - if (!$this->last_sent_date) { - return true; - } else { - $date1 = new DateTime($this->last_sent_date); - $date2 = new DateTime(); - $diff = $date2->diff($date1); - $daysSinceLastSent = $diff->format("%a"); - $monthsSinceLastSent = ($diff->format('%y') * 12) + $diff->format('%m'); - - if ($daysSinceLastSent == 0) { - return false; - } - } - - switch ($this->frequency_id) { - case FREQUENCY_WEEKLY: - return $daysSinceLastSent >= 7; - case FREQUENCY_TWO_WEEKS: - return $daysSinceLastSent >= 14; - case FREQUENCY_FOUR_WEEKS: - return $daysSinceLastSent >= 28; - case FREQUENCY_MONTHLY: - return $monthsSinceLastSent >= 1; - case FREQUENCY_THREE_MONTHS: - return $monthsSinceLastSent >= 3; - case FREQUENCY_SIX_MONTHS: - return $monthsSinceLastSent >= 6; - case FREQUENCY_ANNUALLY: - return $monthsSinceLastSent >= 12; - default: - return false; - } - - return false; - } -} - -Invoice::created(function ($invoice) { - $invoice->account->incrementCounter($invoice->invoice_number, $invoice->is_quote, $invoice->recurring_invoice_id); - Activity::createInvoice($invoice); -}); - -Invoice::updating(function ($invoice) { - Activity::updateInvoice($invoice); -}); - -Invoice::deleting(function ($invoice) { - Activity::archiveInvoice($invoice); -}); - -Invoice::restoring(function ($invoice) { - Activity::restoreInvoice($invoice); -}); diff --git a/app/models/InvoiceDesign.php b/app/models/InvoiceDesign.php deleted file mode 100644 index 6dfd823dae02..000000000000 --- a/app/models/InvoiceDesign.php +++ /dev/null @@ -1,7 +0,0 @@ -belongsTo('Invoice'); - } - - public function product() - { - return $this->belongsTo('Product'); - } -} diff --git a/app/models/InvoiceStatus.php b/app/models/InvoiceStatus.php deleted file mode 100755 index faca90e50bcf..000000000000 --- a/app/models/InvoiceStatus.php +++ /dev/null @@ -1,7 +0,0 @@ -belongsTo('Invoice')->withTrashed(); - } - - public function invitation() - { - return $this->belongsTo('Invitation'); - } - - public function client() - { - return $this->belongsTo('Client')->withTrashed(); - } - - public function account() - { - return $this->belongsTo('Account'); - } - - public function contact() - { - return $this->belongsTo('Contact'); - } - - public function getAmount() - { - return Utils::formatMoney($this->amount, $this->client->currency_id); - } - - public function getName() - { - return trim("payment {$this->transaction_reference}"); - } - - public function getEntityType() - { - return ENTITY_PAYMENT; - } -} - -Payment::created(function ($payment) { - Activity::createPayment($payment); -}); - -Payment::updating(function ($payment) { - Activity::updatePayment($payment); -}); - -Payment::deleting(function ($payment) { - Activity::archivePayment($payment); -}); - -Payment::restoring(function ($payment) { - Activity::restorePayment($payment); -}); diff --git a/app/models/PaymentLibrary.php b/app/models/PaymentLibrary.php deleted file mode 100644 index c6eff7009159..000000000000 --- a/app/models/PaymentLibrary.php +++ /dev/null @@ -1,12 +0,0 @@ -hasMany('Gateway', 'payment_library_id'); - } -} diff --git a/app/models/PaymentTerm.php b/app/models/PaymentTerm.php deleted file mode 100755 index 15669d6535d3..000000000000 --- a/app/models/PaymentTerm.php +++ /dev/null @@ -1,7 +0,0 @@ -where('product_key', '=', $key)->first(); - } -} diff --git a/app/models/Project.php b/app/models/Project.php deleted file mode 100644 index 6a2042e87ab9..000000000000 --- a/app/models/Project.php +++ /dev/null @@ -1,45 +0,0 @@ -belongsTo('Account'); - } - - public function user() - { - return $this->belongsTo('User'); - } - - public function client() - { - return $this->belongsTo('Client'); - } - - public function codes() - { - return $this->hasMany('ProjectCode'); - } - - public static function createNew($parent = false) - { - $className = get_called_class(); - $entity = new $className(); - - if ($parent) { - $entity->user_id = $parent instanceof User ? $parent->id : $parent->user_id; - $entity->account_id = $parent->account_id; - } elseif (Auth::check()) { - $entity->user_id = Auth::user()->id; - $entity->account_id = Auth::user()->account_id; - } else { - Utils::fatalError(); - } - - return $entity; - } -} diff --git a/app/models/ProjectCode.php b/app/models/ProjectCode.php deleted file mode 100644 index 3f3f344a5e0b..000000000000 --- a/app/models/ProjectCode.php +++ /dev/null @@ -1,45 +0,0 @@ -belongsTo('Account'); - } - - public function user() - { - return $this->belongsTo('User'); - } - - public function project() - { - return $this->belongsTo('Project'); - } - - public function events() - { - return $this->hasMany('TimesheetEvent'); - } - - public static function createNew($parent = false) - { - $className = get_called_class(); - $entity = new $className(); - - if ($parent) { - $entity->user_id = $parent instanceof User ? $parent->id : $parent->user_id; - $entity->account_id = $parent->account_id; - } elseif (Auth::check()) { - $entity->user_id = Auth::user()->id; - $entity->account_id = Auth::user()->account_id; - } else { - Utils::fatalError(); - } - - return $entity; - } -} diff --git a/app/models/Size.php b/app/models/Size.php deleted file mode 100755 index a598c7732d01..000000000000 --- a/app/models/Size.php +++ /dev/null @@ -1,7 +0,0 @@ -belongsTo('Account'); - } - - public function user() - { - return $this->belongsTo('User'); - } - - public function timesheet_events() - { - return $this->hasMany('TimeSheetEvent'); - } -} diff --git a/app/models/TimesheetEvent.php b/app/models/TimesheetEvent.php deleted file mode 100644 index 448ac40c9b5a..000000000000 --- a/app/models/TimesheetEvent.php +++ /dev/null @@ -1,122 +0,0 @@ -attributes['org_updated_at'] = $value->getTimestamp(); - }*/ - - public function account() - { - return $this->belongsTo('Account'); - } - - public function user() - { - return $this->belongsTo('User'); - } - - public function source() - { - return $this->belongsTo('TimesheetEventSource'); - } - - public function timesheet() - { - return $this->belongsTo('Timesheet'); - } - - public function project() - { - return $this->belongsTo('Project'); - } - - public function project_code() - { - return $this->belongsTo('ProjectCode'); - } - - /** - * @return TimesheetEvent - */ - public static function createNew($parent = false) - { - $className = get_called_class(); - $entity = new $className(); - - if ($parent) { - $entity->user_id = $parent instanceof User ? $parent->id : $parent->user_id; - $entity->account_id = $parent->account_id; - } elseif (Auth::check()) { - $entity->user_id = Auth::user()->id; - $entity->account_id = Auth::user()->account_id; - } else { - Utils::fatalError(); - } - - return $entity; - } - - public function toChangesArray(TimesheetEvent $other) - { - $attributes_old = parent::toArray(); - $attributes_new = $other->toArray(); - - $skip_keys = ['id' => 1, 'created_at' => 1, 'updated_at' => 1, 'deleted_at' => 1, 'org_data' => 1, 'update_data' => 1]; - $zeroisempty_keys = ['discount' => 1]; - - $result = []; - // Find all the values that where changed or deleted - foreach ($attributes_old as $key => $value) { - // Skip null values, keys we don't care about and 0 value keys that means they are not used - if (empty($value) || isset($skip_keys[$key]) || (isset($zeroisempty_keys[$key]) && $value)) { - continue; - } - - // Compare values if it exists in the new array - if (isset($attributes_new[$key]) || array_key_exists($key, $attributes_new)) { - if ($value instanceof \DateTime && $attributes_new[$key] instanceof \DateTime) { - if ($value != $attributes_new[$key]) { - $result[$key] = $attributes_new[$key]->format("Y-m-d H:i:s"); - } - } elseif ($value instanceof \DateTime && is_string($attributes_new[$key])) { - if ($value->format("Y-m-d H:i:s") != $attributes_new[$key]) { - $result[$key] = $attributes_new[$key]; - } - } elseif (is_string($value) && $attributes_new[$key] instanceof \DateTime) { - if ($attributes_new[$key]->format("Y-m-d H:i:s") != $value) { - $result[$key] = $attributes_new[$key]->format("Y-m-d H:i:s"); - } - } elseif ($value != $attributes_new[$key]) { - $result[$key] = $attributes_new[$key]; - } - } else { - $result[$key] = null; - } - } - - // Find all the values that where deleted - foreach ($attributes_new as $key => $value) { - if (isset($skip_keys[$key])) { - continue; - } - - if (!isset($attributes_old[$key])) { - $result[$key] = $value; - } - } - - return $result; - } -} diff --git a/app/models/TimesheetEventSource.php b/app/models/TimesheetEventSource.php deleted file mode 100644 index fcca52c61f79..000000000000 --- a/app/models/TimesheetEventSource.php +++ /dev/null @@ -1,40 +0,0 @@ -belongsTo('Account'); - } - - public function user() - { - return $this->belongsTo('User'); - } - - public function events() - { - return $this->hasMany('TimesheetEvent'); - } - - public static function createNew($parent = false) - { - $className = get_called_class(); - $entity = new $className(); - - if ($parent) { - $entity->user_id = $parent instanceof User ? $parent->id : $parent->user_id; - $entity->account_id = $parent->account_id; - } elseif (Auth::check()) { - $entity->user_id = Auth::user()->id; - $entity->account_id = Auth::user()->account_id; - } else { - Utils::fatalError(); - } - - return $entity; - } -} diff --git a/app/models/Timezone.php b/app/models/Timezone.php deleted file mode 100755 index 09b91108a4b4..000000000000 --- a/app/models/Timezone.php +++ /dev/null @@ -1,7 +0,0 @@ - 'required|unique:users', - 'password' => 'required|between:6,32|confirmed', - 'password_confirmation' => 'between:6,32', - */ - ); - - protected $updateRules = array( - /* - 'email' => 'required|unique:users', - 'username' => 'required|unique:users', - */ - ); - - /** - * The database table used by the model. - * - * @var string - */ - protected $table = 'users'; - - public function account() - { - return $this->belongsTo('Account'); - } - - public function theme() - { - return $this->belongsTo('Theme'); - } - - public function getPersonType() - { - return PERSON_USER; - } - - /** - * Get the unique identifier for the user. - * - * @return mixed - */ - public function getAuthIdentifier() - { - return $this->getKey(); - } - - /** - * Get the password for the user. - * - * @return string - */ - public function getAuthPassword() - { - return $this->password; - } - - /** - * Get the e-mail address where password reminders are sent. - * - * @return string - */ - public function getReminderEmail() - { - return $this->email; - } - - public function isPro() - { - return $this->account->isPro(); - } - - public function isDemo() - { - return $this->account->id == Utils::getDemoAccountId(); - } - - public function maxInvoiceDesignId() - { - return $this->isPro() ? 10 : COUNT_FREE_DESIGNS; - } - - public function getDisplayName() - { - if ($this->getFullName()) { - return $this->getFullName(); - } elseif ($this->email) { - return $this->email; - } else { - return 'Guest'; - } - } - - public function getFullName() - { - if ($this->first_name || $this->last_name) { - return $this->first_name.' '.$this->last_name; - } else { - return ''; - } - } - - public function showGreyBackground() - { - return !$this->theme_id || in_array($this->theme_id, [2, 3, 5, 6, 7, 8, 10, 11, 12]); - } - - public function getRequestsCount() - { - return Session::get(SESSION_COUNTER, 0); - } - - public function getPopOverText() - { - if (!Utils::isNinja() || !Auth::check() || Session::has('error')) { - return false; - } - - $count = self::getRequestsCount(); - - if ($count == 1 || $count % 5 == 0) { - if (!Utils::isRegistered()) { - return trans('texts.sign_up_to_save'); - } elseif (!Auth::user()->account->name) { - return trans('texts.set_name'); - } - } - - return false; - } - - public function afterSave($success = true, $forced = false) - { - if ($this->email) { - return parent::afterSave($success = true, $forced = false); - } else { - return true; - } - } - - public function getMaxNumClients() - { - return $this->isPro() ? MAX_NUM_CLIENTS_PRO : MAX_NUM_CLIENTS; - } - - public function getRememberToken() - { - return $this->remember_token; - } - - public function setRememberToken($value) - { - $this->remember_token = $value; - } - - public function getRememberTokenName() - { - return 'remember_token'; - } -} diff --git a/app/ninja/mailers/ContactMailer.php b/app/ninja/mailers/ContactMailer.php deleted file mode 100755 index 0a262aecba08..000000000000 --- a/app/ninja/mailers/ContactMailer.php +++ /dev/null @@ -1,104 +0,0 @@ -load('invitations', 'client', 'account'); - $entityType = $invoice->getEntityType(); - - $view = 'invoice'; - $subject = trans("texts.{$entityType}_subject", ['invoice' => $invoice->invoice_number, 'account' => $invoice->account->getDisplayName()]); - $accountName = $invoice->account->getDisplayName(); - $emailTemplate = $invoice->account->getEmailTemplate($entityType); - $invoiceAmount = Utils::formatMoney($invoice->amount, $invoice->client->currency_id); - - foreach ($invoice->invitations as $invitation) { - if (!$invitation->user || !$invitation->user->email) { - return false; - } - if (!$invitation->contact || !$invitation->contact->email) { - return false; - } - - $invitation->sent_date = \Carbon::now()->toDateTimeString(); - $invitation->save(); - - $variables = [ - '$footer' => $invoice->account->getEmailFooter(), - '$link' => $invitation->getLink(), - '$client' => $invoice->client->getDisplayName(), - '$account' => $accountName, - '$contact' => $invitation->contact->getDisplayName(), - '$amount' => $invoiceAmount - ]; - - $data['body'] = str_replace(array_keys($variables), array_values($variables), $emailTemplate); - $data['link'] = $invitation->getLink(); - $data['entityType'] = $entityType; - - $fromEmail = $invitation->user->email; - $this->sendTo($invitation->contact->email, $fromEmail, $accountName, $subject, $view, $data); - - Activity::emailInvoice($invitation); - } - - if (!$invoice->isSent()) { - $invoice->invoice_status_id = INVOICE_STATUS_SENT; - $invoice->save(); - } - - \Event::fire('invoice.sent', $invoice); - } - - public function sendPaymentConfirmation(Payment $payment) - { - $invoice = $payment->invoice; - $view = 'payment_confirmation'; - $subject = trans('texts.payment_subject', ['invoice' => $invoice->invoice_number]); - $accountName = $payment->account->getDisplayName(); - $emailTemplate = $invoice->account->getEmailTemplate(ENTITY_PAYMENT); - - $variables = [ - '$footer' => $payment->account->getEmailFooter(), - '$client' => $payment->client->getDisplayName(), - '$account' => $accountName, - '$amount' => Utils::formatMoney($payment->amount, $payment->client->currency_id) - ]; - - $data = ['body' => str_replace(array_keys($variables), array_values($variables), $emailTemplate)]; - - $user = $payment->invitation->user; - $this->sendTo($payment->contact->email, $user->email, $accountName, $subject, $view, $data); - } - - public function sendLicensePaymentConfirmation($name, $email, $amount, $license, $productId) - { - $view = 'license_confirmation'; - $subject = trans('texts.payment_subject'); - - if ($productId == PRODUCT_ONE_CLICK_INSTALL) { - $license = "Softaculous install license: $license"; - } elseif ($productId == PRODUCT_INVOICE_DESIGNS) { - $license = "Invoice designs license: $license"; - } elseif ($productId == PRODUCT_WHITE_LABEL) { - $license = "White label license: $license"; - } - - $data = [ - 'account' => trans('texts.email_from'), - 'client' => $name, - 'amount' => Utils::formatMoney($amount, 1), - 'license' => $license - ]; - - $this->sendTo($email, CONTACT_EMAIL, CONTACT_NAME, $subject, $view, $data); - } -} diff --git a/app/ninja/mailers/Mailer.php b/app/ninja/mailers/Mailer.php deleted file mode 100755 index 16264d91cc55..000000000000 --- a/app/ninja/mailers/Mailer.php +++ /dev/null @@ -1,27 +0,0 @@ -setEncoder(\Swift_Encoding::get8BitEncoding()); - $message->to($toEmail)->from($fromEmail, $fromName)->replyTo($replyEmail, $fromName)->subject($subject); - }); - } -} diff --git a/app/ninja/mailers/UserMailer.php b/app/ninja/mailers/UserMailer.php deleted file mode 100755 index 12e7bedd60eb..000000000000 --- a/app/ninja/mailers/UserMailer.php +++ /dev/null @@ -1,62 +0,0 @@ -email) { - return; - } - - $view = 'confirm'; - $subject = trans('texts.confirmation_subject'); - - $data = [ - 'user' => $user, - 'invitationMessage' => $invitor ? trans('texts.invitation_message', ['invitor' => $invitor->getDisplayName()]) : '', - ]; - - if ($invitor) { - $fromEmail = $invitor->email; - $fromName = $invitor->getDisplayName(); - } else { - $fromEmail = CONTACT_EMAIL; - $fromName = CONTACT_NAME; - } - - $this->sendTo($user->email, $fromEmail, $fromName, $subject, $view, $data); - } - - public function sendNotification(User $user, Invoice $invoice, $notificationType, Payment $payment = null) - { - if (!$user->email) { - return; - } - - $view = 'invoice_'.$notificationType; - $entityType = $invoice->getEntityType(); - - $data = [ - 'entityType' => $entityType, - 'clientName' => $invoice->client->getDisplayName(), - 'accountName' => $invoice->account->getDisplayName(), - 'userName' => $user->getDisplayName(), - 'invoiceAmount' => Utils::formatMoney($invoice->amount, $invoice->client->currency_id), - 'invoiceNumber' => $invoice->invoice_number, - 'invoiceLink' => SITE_URL."/{$entityType}s/{$invoice->public_id}", - ]; - - if ($payment) { - $data['paymentAmount'] = Utils::formatMoney($payment->amount, $invoice->client->currency_id); - } - - $subject = trans("texts.notification_{$entityType}_{$notificationType}_subject", ['invoice' => $invoice->invoice_number, 'client' => $invoice->client->getDisplayName()]); - - $this->sendTo($user->email, CONTACT_EMAIL, CONTACT_NAME, $subject, $view, $data); - } -} diff --git a/app/ninja/repositories/AccountRepository.php b/app/ninja/repositories/AccountRepository.php deleted file mode 100755 index fa1b3e41410b..000000000000 --- a/app/ninja/repositories/AccountRepository.php +++ /dev/null @@ -1,234 +0,0 @@ -ip = Request::getClientIp(); - $account->account_key = str_random(RANDOM_KEY_LENGTH); - - if (Session::has(SESSION_LOCALE)) { - $locale = Session::get(SESSION_LOCALE); - if ($language = Language::whereLocale($locale)->first()) { - $account->language_id = $language->id; - } - } - - $account->save(); - - $random = str_random(RANDOM_KEY_LENGTH); - - $user = new User(); - $user->password = $random; - $user->password_confirmation = $random; - $user->username = $random; - $user->confirmed = !Utils::isNinja(); - $account->users()->save($user, []); - - return $account; - } - - public function getSearchData() - { - $clients = \DB::table('clients') - ->where('clients.deleted_at', '=', null) - ->where('clients.account_id', '=', \Auth::user()->account_id) - ->whereRaw("clients.name <> ''") - ->select(\DB::raw("'Clients' as type, clients.public_id, clients.name, '' as token")); - - $contacts = \DB::table('clients') - ->join('contacts', 'contacts.client_id', '=', 'clients.id') - ->where('clients.deleted_at', '=', null) - ->where('clients.account_id', '=', \Auth::user()->account_id) - ->whereRaw("CONCAT(contacts.first_name, contacts.last_name, contacts.email) <> ''") - ->select(\DB::raw("'Contacts' as type, clients.public_id, CONCAT(contacts.first_name, ' ', contacts.last_name, ' ', contacts.email) as name, '' as token")); - - $invoices = \DB::table('clients') - ->join('invoices', 'invoices.client_id', '=', 'clients.id') - ->where('clients.account_id', '=', \Auth::user()->account_id) - ->where('clients.deleted_at', '=', null) - ->where('invoices.deleted_at', '=', null) - ->select(\DB::raw("'Invoices' as type, invoices.public_id, CONCAT(invoices.invoice_number, ': ', clients.name) as name, invoices.invoice_number as token")); - - $data = []; - - foreach ($clients->union($contacts)->union($invoices)->get() as $row) { - $type = $row->type; - - if (!isset($data[$type])) { - $data[$type] = []; - } - - $tokens = explode(' ', $row->name); - $tokens[] = $type; - - if ($type == 'Invoices') { - $tokens[] = intVal($row->token).''; - } - - $data[$type][] = [ - 'value' => $row->name, - 'public_id' => $row->public_id, - 'tokens' => $tokens, - ]; - } - - return $data; - } - - public function enableProPlan() - { - if (Auth::user()->isPro()) { - return false; - } - - $ninjaAccount = $this->getNinjaAccount(); - $lastInvoice = Invoice::withTrashed()->whereAccountId($ninjaAccount->id)->orderBy('public_id', 'DESC')->first(); - $publicId = $lastInvoice ? ($lastInvoice->public_id + 1) : 1; - - $ninjaClient = $this->getNinjaClient($ninjaAccount); - $invitation = $this->createNinjaInvoice($publicId, $ninjaAccount, $ninjaClient); - - return $invitation; - } - - private function createNinjaInvoice($publicId, $account, $client) - { - $invoice = new Invoice(); - $invoice->account_id = $account->id; - $invoice->user_id = $account->users()->first()->id; - $invoice->public_id = $publicId; - $invoice->client_id = $client->id; - $invoice->invoice_number = $account->getNextInvoiceNumber(); - $invoice->invoice_date = date_create()->format('Y-m-d'); - $invoice->amount = PRO_PLAN_PRICE; - $invoice->balance = PRO_PLAN_PRICE; - $invoice->save(); - - $item = new InvoiceItem(); - $item->account_id = $account->id; - $item->user_id = $account->users()->first()->id; - $item->public_id = $publicId; - $item->qty = 1; - $item->cost = PRO_PLAN_PRICE; - $item->notes = trans('texts.pro_plan_description'); - $item->product_key = trans('texts.pro_plan_product'); - $invoice->invoice_items()->save($item); - - $invitation = new Invitation(); - $invitation->account_id = $account->id; - $invitation->user_id = $account->users()->first()->id; - $invitation->public_id = $publicId; - $invitation->invoice_id = $invoice->id; - $invitation->contact_id = $client->contacts()->first()->id; - $invitation->invitation_key = str_random(RANDOM_KEY_LENGTH); - $invitation->save(); - - return $invitation; - } - - public function getNinjaAccount() - { - $account = Account::whereAccountKey(NINJA_ACCOUNT_KEY)->first(); - - if ($account) { - return $account; - } else { - $account = new Account(); - $account->name = 'Invoice Ninja'; - $account->work_email = 'contact@invoiceninja.com'; - $account->work_phone = '(800) 763-1948'; - $account->account_key = NINJA_ACCOUNT_KEY; - $account->save(); - - $random = str_random(RANDOM_KEY_LENGTH); - $user = new User(); - $user->registered = true; - $user->confirmed = true; - $user->email = 'contact@invoiceninja.com'; - $user->password = $random; - $user->password_confirmation = $random; - $user->username = $random; - $user->first_name = 'Invoice'; - $user->last_name = 'Ninja'; - $user->notify_sent = true; - $user->notify_paid = true; - $account->users()->save($user); - - $accountGateway = new AccountGateway(); - $accountGateway->user_id = $user->id; - $accountGateway->gateway_id = NINJA_GATEWAY_ID; - $accountGateway->public_id = 1; - $accountGateway->config = NINJA_GATEWAY_CONFIG; - $account->account_gateways()->save($accountGateway); - } - - return $account; - } - - private function getNinjaClient($ninjaAccount) - { - $client = Client::whereAccountId($ninjaAccount->id)->wherePublicId(Auth::user()->account_id)->first(); - - if (!$client) { - $client = new Client(); - $client->public_id = Auth::user()->account_id; - $client->user_id = $ninjaAccount->users()->first()->id; - $client->currency_id = 1; - foreach (['name', 'address1', 'address2', 'city', 'state', 'postal_code', 'country_id', 'work_phone'] as $field) { - $client->$field = Auth::user()->account->$field; - } - $ninjaAccount->clients()->save($client); - - $contact = new Contact(); - $contact->user_id = $ninjaAccount->users()->first()->id; - $contact->account_id = $ninjaAccount->id; - $contact->public_id = Auth::user()->account_id; - $contact->is_primary = true; - foreach (['first_name', 'last_name', 'email', 'phone'] as $field) { - $contact->$field = Auth::user()->$field; - } - $client->contacts()->save($contact); - } - - return $client; - } - - public function registerUser($user) - { - $url = NINJA_APP_URL.'/signup/register'; - $data = ''; - $fields = [ - 'first_name' => urlencode($user->first_name), - 'last_name' => urlencode($user->last_name), - 'email' => urlencode($user->email), - ]; - - foreach ($fields as $key => $value) { - $data .= $key.'='.$value.'&'; - } - rtrim($data, '&'); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_POST, count($fields)); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - curl_exec($ch); - curl_close($ch); - } -} diff --git a/app/ninja/repositories/ClientRepository.php b/app/ninja/repositories/ClientRepository.php deleted file mode 100755 index f1308b84c609..000000000000 --- a/app/ninja/repositories/ClientRepository.php +++ /dev/null @@ -1,202 +0,0 @@ -join('contacts', 'contacts.client_id', '=', 'clients.id') - ->where('clients.account_id', '=', \Auth::user()->account_id) - ->where('contacts.is_primary', '=', true) - ->where('contacts.deleted_at', '=', null) - ->select('clients.public_id', 'clients.name', 'contacts.first_name', 'contacts.last_name', 'clients.balance', 'clients.last_login', 'clients.created_at', 'clients.work_phone', 'contacts.email', 'clients.currency_id', 'clients.deleted_at', 'clients.is_deleted'); - - if (!\Session::get('show_trash:client')) { - $query->where('clients.deleted_at', '=', null); - } - - if ($filter) { - $query->where(function ($query) use ($filter) { - $query->where('clients.name', 'like', '%'.$filter.'%') - ->orWhere('contacts.first_name', 'like', '%'.$filter.'%') - ->orWhere('contacts.last_name', 'like', '%'.$filter.'%') - ->orWhere('contacts.email', 'like', '%'.$filter.'%'); - }); - } - - return $query; - } - - public function getErrors($data) - { - $contact = isset($data['contacts']) ? (array) $data['contacts'][0] : (isset($data['contact']) ? $data['contact'] : []); - $validator = \Validator::make($contact, ['email' => 'required|email']); - if ($validator->fails()) { - return $validator->messages(); - } - - return false; - } - - public function save($publicId, $data, $notify = true) - { - if (!$publicId || $publicId == "-1") { - $client = Client::createNew(); - $client->currency_id = 1; - $contact = Contact::createNew(); - $contact->is_primary = true; - $contact->send_invoice = true; - } else { - $client = Client::scope($publicId)->with('contacts')->firstOrFail(); - $contact = $client->contacts()->where('is_primary', '=', true)->firstOrFail(); - } - - if (isset($data['name'])) { - $client->name = trim($data['name']); - } - if (isset($data['id_number'])) { - $client->id_number = trim($data['id_number']); - } - if (isset($data['vat_number'])) { - $client->vat_number = trim($data['vat_number']); - } - if (isset($data['work_phone'])) { - $client->work_phone = trim($data['work_phone']); - } - if (isset($data['custom_value1'])) { - $client->custom_value1 = trim($data['custom_value1']); - } - if (isset($data['custom_value2'])) { - $client->custom_value2 = trim($data['custom_value2']); - } - if (isset($data['address1'])) { - $client->address1 = trim($data['address1']); - } - if (isset($data['address2'])) { - $client->address2 = trim($data['address2']); - } - if (isset($data['city'])) { - $client->city = trim($data['city']); - } - if (isset($data['state'])) { - $client->state = trim($data['state']); - } - if (isset($data['postal_code'])) { - $client->postal_code = trim($data['postal_code']); - } - if (isset($data['country_id'])) { - $client->country_id = $data['country_id'] ? $data['country_id'] : null; - } - if (isset($data['private_notes'])) { - $client->private_notes = trim($data['private_notes']); - } - if (isset($data['size_id'])) { - $client->size_id = $data['size_id'] ? $data['size_id'] : null; - } - if (isset($data['industry_id'])) { - $client->industry_id = $data['industry_id'] ? $data['industry_id'] : null; - } - if (isset($data['currency_id'])) { - $client->currency_id = $data['currency_id'] ? $data['currency_id'] : null; - } - if (isset($data['payment_terms'])) { - $client->payment_terms = $data['payment_terms']; - } - if (isset($data['website'])) { - $client->website = trim($data['website']); - } - - $client->save(); - - $isPrimary = true; - $contactIds = []; - - if (isset($data['contact'])) { - $info = $data['contact']; - if (isset($info['email'])) { - $contact->email = trim(strtolower($info['email'])); - } - if (isset($info['first_name'])) { - $contact->first_name = trim($info['first_name']); - } - if (isset($info['last_name'])) { - $contact->last_name = trim($info['last_name']); - } - if (isset($info['phone'])) { - $contact->phone = trim($info['phone']); - } - $contact->is_primary = true; - $contact->send_invoice = true; - $client->contacts()->save($contact); - } else { - foreach ($data['contacts'] as $record) { - $record = (array) $record; - - if ($publicId != "-1" && isset($record['public_id']) && $record['public_id']) { - $contact = Contact::scope($record['public_id'])->firstOrFail(); - } else { - $contact = Contact::createNew(); - } - - if (isset($record['email'])) { - $contact->email = trim(strtolower($record['email'])); - } - if (isset($record['first_name'])) { - $contact->first_name = trim($record['first_name']); - } - if (isset($record['last_name'])) { - $contact->last_name = trim($record['last_name']); - } - if (isset($record['phone'])) { - $contact->phone = trim($record['phone']); - } - $contact->is_primary = $isPrimary; - $contact->send_invoice = isset($record['send_invoice']) ? $record['send_invoice'] : true; - $isPrimary = false; - - $client->contacts()->save($contact); - $contactIds[] = $contact->public_id; - } - - foreach ($client->contacts as $contact) { - if (!in_array($contact->public_id, $contactIds)) { - $contact->delete(); - } - } - } - - $client->save(); - - if (!$publicId || $publicId == "-1") { - \Activity::createClient($client, $notify); - } - - return $client; - } - - public function bulk($ids, $action) - { - $clients = Client::withTrashed()->scope($ids)->get(); - - foreach ($clients as $client) { - if ($action == 'restore') { - $client->restore(); - - $client->is_deleted = false; - $client->save(); - } else { - if ($action == 'delete') { - $client->is_deleted = true; - $client->save(); - } - - $client->delete(); - } - } - - return count($clients); - } -} diff --git a/app/ninja/repositories/CreditRepository.php b/app/ninja/repositories/CreditRepository.php deleted file mode 100755 index 3bbdae5c8e10..000000000000 --- a/app/ninja/repositories/CreditRepository.php +++ /dev/null @@ -1,77 +0,0 @@ -join('clients', 'clients.id', '=', 'credits.client_id') - ->join('contacts', 'contacts.client_id', '=', 'clients.id') - ->where('clients.account_id', '=', \Auth::user()->account_id) - ->where('clients.deleted_at', '=', null) - ->where('contacts.is_primary', '=', true) - ->select('credits.public_id', 'clients.name as client_name', 'clients.public_id as client_public_id', 'credits.amount', 'credits.balance', 'credits.credit_date', 'clients.currency_id', 'contacts.first_name', 'contacts.last_name', 'contacts.email', 'credits.private_notes', 'credits.deleted_at', 'credits.is_deleted'); - - if ($clientPublicId) { - $query->where('clients.public_id', '=', $clientPublicId); - } - - if (!\Session::get('show_trash:credit')) { - $query->where('credits.deleted_at', '=', null); - } - - if ($filter) { - $query->where(function ($query) use ($filter) { - $query->where('clients.name', 'like', '%'.$filter.'%'); - }); - } - - return $query; - } - - public function save($publicId = null, $input) - { - if ($publicId) { - $credit = Credit::scope($publicId)->firstOrFail(); - } else { - $credit = Credit::createNew(); - } - - $credit->client_id = Client::getPrivateId($input['client']); - $credit->credit_date = Utils::toSqlDate($input['credit_date']); - $credit->amount = Utils::parseFloat($input['amount']); - $credit->balance = Utils::parseFloat($input['amount']); - $credit->private_notes = trim($input['private_notes']); - $credit->save(); - - return $credit; - } - - public function bulk($ids, $action) - { - if (!$ids) { - return 0; - } - - $credits = Credit::withTrashed()->scope($ids)->get(); - - foreach ($credits as $credit) { - if ($action == 'restore') { - $credit->restore(); - } else { - if ($action == 'delete') { - $credit->is_deleted = true; - $credit->save(); - } - - $credit->delete(); - } - } - - return count($credits); - } -} diff --git a/app/ninja/repositories/InvoiceRepository.php b/app/ninja/repositories/InvoiceRepository.php deleted file mode 100755 index c364cb569b9c..000000000000 --- a/app/ninja/repositories/InvoiceRepository.php +++ /dev/null @@ -1,490 +0,0 @@ -join('clients', 'clients.id', '=', 'invoices.client_id') - ->join('invoice_statuses', 'invoice_statuses.id', '=', 'invoices.invoice_status_id') - ->join('contacts', 'contacts.client_id', '=', 'clients.id') - ->where('invoices.account_id', '=', $accountId) - ->where('clients.deleted_at', '=', null) - ->where('contacts.deleted_at', '=', null) - ->where('invoices.is_recurring', '=', false) - ->where('contacts.is_primary', '=', true) - ->select('clients.public_id as client_public_id', 'invoice_number', 'invoice_status_id', 'clients.name as client_name', 'invoices.public_id', 'amount', 'invoices.balance', 'invoice_date', 'due_date', 'invoice_statuses.name as invoice_status_name', 'clients.currency_id', 'contacts.first_name', 'contacts.last_name', 'contacts.email', 'quote_id', 'quote_invoice_id', 'invoices.deleted_at', 'invoices.is_deleted'); - - if (!\Session::get('show_trash:'.$entityType)) { - $query->where('invoices.deleted_at', '=', null); - } - - if ($clientPublicId) { - $query->where('clients.public_id', '=', $clientPublicId); - } - - if ($filter) { - $query->where(function ($query) use ($filter) { - $query->where('clients.name', 'like', '%'.$filter.'%') - ->orWhere('invoices.invoice_number', 'like', '%'.$filter.'%') - ->orWhere('invoice_statuses.name', 'like', '%'.$filter.'%') - ->orWhere('contacts.first_name', 'like', '%'.$filter.'%') - ->orWhere('contacts.last_name', 'like', '%'.$filter.'%') - ->orWhere('contacts.email', 'like', '%'.$filter.'%'); - }); - } - - return $query; - } - - public function getRecurringInvoices($accountId, $clientPublicId = false, $filter = false) - { - $query = \DB::table('invoices') - ->join('clients', 'clients.id', '=', 'invoices.client_id') - ->join('frequencies', 'frequencies.id', '=', 'invoices.frequency_id') - ->join('contacts', 'contacts.client_id', '=', 'clients.id') - ->where('invoices.account_id', '=', $accountId) - ->where('invoices.is_quote', '=', false) - ->where('clients.deleted_at', '=', null) - ->where('contacts.deleted_at', '=', null) - ->where('invoices.is_recurring', '=', true) - ->where('contacts.is_primary', '=', true) - ->select('clients.public_id as client_public_id', 'clients.name as client_name', 'invoices.public_id', 'amount', 'frequencies.name as frequency', 'start_date', 'end_date', 'clients.currency_id', 'contacts.first_name', 'contacts.last_name', 'contacts.email', 'invoices.deleted_at', 'invoices.is_deleted'); - - if ($clientPublicId) { - $query->where('clients.public_id', '=', $clientPublicId); - } - - if (!\Session::get('show_trash:invoice')) { - $query->where('invoices.deleted_at', '=', null); - } - - if ($filter) { - $query->where(function ($query) use ($filter) { - $query->where('clients.name', 'like', '%'.$filter.'%') - ->orWhere('invoices.invoice_number', 'like', '%'.$filter.'%'); - }); - } - - return $query; - } - - public function getClientDatatable($contactId, $entityType, $search) - { - $query = \DB::table('invitations') - ->join('invoices', 'invoices.id', '=', 'invitations.invoice_id') - ->join('clients', 'clients.id', '=', 'invoices.client_id') - ->where('invitations.contact_id', '=', $contactId) - ->where('invitations.deleted_at', '=', null) - ->where('invoices.is_quote', '=', $entityType == ENTITY_QUOTE) - ->where('invoices.is_deleted', '=', false) - ->where('clients.deleted_at', '=', null) - ->where('invoices.is_recurring', '=', false) - ->select('invitation_key', 'invoice_number', 'invoice_date', 'invoices.balance as balance', 'due_date', 'clients.public_id as client_public_id', 'clients.name as client_name', 'invoices.public_id', 'amount', 'start_date', 'end_date', 'clients.currency_id'); - - $table = \Datatable::query($query) - ->addColumn('invoice_number', function ($model) use ($entityType) { return link_to('/view/'.$model->invitation_key, $model->invoice_number); }) - ->addColumn('invoice_date', function ($model) { return Utils::fromSqlDate($model->invoice_date); }) - ->addColumn('amount', function ($model) { return Utils::formatMoney($model->amount, $model->currency_id); }); - - if ($entityType == ENTITY_INVOICE) { - $table->addColumn('balance', function ($model) { return Utils::formatMoney($model->balance, $model->currency_id); }); - } - - return $table->addColumn('due_date', function ($model) { return Utils::fromSqlDate($model->due_date); }) - ->make(); - } - - public function getDatatable($accountId, $clientPublicId = null, $entityType, $search) - { - $query = $this->getInvoices($accountId, $clientPublicId, $entityType, $search) - ->where('invoices.is_quote', '=', $entityType == ENTITY_QUOTE ? true : false); - - $table = \Datatable::query($query); - - if (!$clientPublicId) { - $table->addColumn('checkbox', function ($model) { return ''; }); - } - - $table->addColumn("invoice_number", function ($model) use ($entityType) { return link_to("{$entityType}s/".$model->public_id.'/edit', $model->invoice_number, ['class' => Utils::getEntityRowClass($model)]); }); - - if (!$clientPublicId) { - $table->addColumn('client_name', function ($model) { return link_to('clients/'.$model->client_public_id, Utils::getClientDisplayName($model)); }); - } - - $table->addColumn("invoice_date", function ($model) { return Utils::fromSqlDate($model->invoice_date); }) - ->addColumn('amount', function ($model) { return Utils::formatMoney($model->amount, $model->currency_id); }); - - if ($entityType == ENTITY_INVOICE) { - $table->addColumn('balance', function ($model) { return Utils::formatMoney($model->balance, $model->currency_id); }); - } - - return $table->addColumn('due_date', function ($model) { return Utils::fromSqlDate($model->due_date); }) - ->addColumn('invoice_status_name', function ($model) { return $model->quote_invoice_id ? link_to("invoices/{$model->quote_invoice_id}/edit", trans('texts.converted')) : $model->invoice_status_name; }) - ->addColumn('dropdown', function ($model) use ($entityType) { - - if ($model->is_deleted) { - return '
    '; - } - - $str = ''; - }) - ->make(); - } - - public function getErrors($input) - { - $contact = (array) $input->client->contacts[0]; - $rules = ['email' => 'required|email']; - $validator = \Validator::make($contact, $rules); - - if ($validator->fails()) { - return $validator; - } - - $invoice = (array) $input; - $invoiceId = isset($invoice['public_id']) && $invoice['public_id'] ? Invoice::getPrivateId($invoice['public_id']) : null; - $rules = [ - 'invoice_number' => 'required|unique:invoices,invoice_number,'.$invoiceId.',id,account_id,'.\Auth::user()->account_id, - 'discount' => 'positive', - ]; - - if ($invoice['is_recurring'] && $invoice['start_date'] && $invoice['end_date']) { - $rules['end_date'] = 'after:'.$invoice['start_date']; - } - - $validator = \Validator::make($invoice, $rules); - - if ($validator->fails()) { - return $validator; - } - - return false; - } - - public function save($publicId, $data, $entityType) - { - if ($publicId) { - $invoice = Invoice::scope($publicId)->firstOrFail(); - } else { - $invoice = Invoice::createNew(); - - if ($entityType == ENTITY_QUOTE) { - $invoice->is_quote = true; - } - } - - $account = \Auth::user()->account; - - $invoice->client_id = $data['client_id']; - $invoice->discount = round(Utils::parseFloat($data['discount']), 2); - $invoice->is_amount_discount = $data['is_amount_discount'] ? true : false; - $invoice->invoice_number = trim($data['invoice_number']); - $invoice->is_recurring = $data['is_recurring'] && !Utils::isDemo() ? true : false; - $invoice->invoice_date = isset($data['invoice_date_sql']) ? $data['invoice_date_sql'] : Utils::toSqlDate($data['invoice_date']); - - if ($invoice->is_recurring) { - $invoice->frequency_id = $data['frequency_id'] ? $data['frequency_id'] : 0; - $invoice->start_date = Utils::toSqlDate($data['start_date']); - $invoice->end_date = Utils::toSqlDate($data['end_date']); - $invoice->due_date = null; - } else { - $invoice->due_date = isset($data['due_date_sql']) ? $data['due_date_sql'] : Utils::toSqlDate($data['due_date']); - $invoice->frequency_id = 0; - $invoice->start_date = null; - $invoice->end_date = null; - } - - $invoice->terms = trim($data['terms']) ? trim($data['terms']) : ($account->invoice_terms ? $account->invoice_terms : ''); - $invoice->invoice_footer = trim($data['invoice_footer']) ? trim($data['invoice_footer']) : $account->invoice_footer; - $invoice->public_notes = trim($data['public_notes']); - $invoice->po_number = trim($data['po_number']); - $invoice->invoice_design_id = $data['invoice_design_id']; - - if (isset($data['tax_name']) && isset($data['tax_rate']) && $data['tax_name']) { - $invoice->tax_rate = Utils::parseFloat($data['tax_rate']); - $invoice->tax_name = trim($data['tax_name']); - } else { - $invoice->tax_rate = 0; - $invoice->tax_name = ''; - } - - $total = 0; - - foreach ($data['invoice_items'] as $item) { - $item = (array) $item; - if (!$item['cost'] && !$item['product_key'] && !$item['notes']) { - continue; - } - - $invoiceItemCost = round(Utils::parseFloat($item['cost']), 2); - $invoiceItemQty = round(Utils::parseFloat($item['qty']), 2); - $invoiceItemTaxRate = 0; - - if (isset($item['tax_rate']) && Utils::parseFloat($item['tax_rate']) > 0) { - $invoiceItemTaxRate = Utils::parseFloat($item['tax_rate']); - } - - $lineTotal = $invoiceItemCost * $invoiceItemQty; - - $total += round($lineTotal + ($lineTotal * $invoiceItemTaxRate / 100), 2); - } - - if ($invoice->discount > 0) { - if ($invoice->is_amount_discount) { - $total -= $invoice->discount; - } else { - $total *= (100 - $invoice->discount) / 100; - } - } - - $invoice->custom_value1 = round($data['custom_value1'], 2); - $invoice->custom_value2 = round($data['custom_value2'], 2); - $invoice->custom_taxes1 = $data['custom_taxes1'] ? true : false; - $invoice->custom_taxes2 = $data['custom_taxes2'] ? true : false; - - // custom fields charged taxes - if ($invoice->custom_value1 && $invoice->custom_taxes1) { - $total += $invoice->custom_value1; - } - if ($invoice->custom_value2 && $invoice->custom_taxes2) { - $total += $invoice->custom_value2; - } - - $total += $total * $invoice->tax_rate / 100; - $total = round($total, 2); - - // custom fields not charged taxes - if ($invoice->custom_value1 && !$invoice->custom_taxes1) { - $total += $invoice->custom_value1; - } - if ($invoice->custom_value2 && !$invoice->custom_taxes2) { - $total += $invoice->custom_value2; - } - - if ($publicId) { - $invoice->balance = $total - ($invoice->amount - $invoice->balance); - } else { - $invoice->balance = $total; - } - - $invoice->amount = $total; - $invoice->save(); - - if ($publicId) { - $invoice->invoice_items()->forceDelete(); - } - - foreach ($data['invoice_items'] as $item) { - $item = (array) $item; - if (!$item['cost'] && !$item['product_key'] && !$item['notes']) { - continue; - } - - if ($item['product_key']) { - $product = Product::findProductByKey(trim($item['product_key'])); - - if (!$product) { - $product = Product::createNew(); - $product->product_key = trim($item['product_key']); - } - - if (\Auth::user()->account->update_products) { - $product->notes = $item['notes']; - $product->cost = $item['cost']; - } - - $product->save(); - } - - $invoiceItem = InvoiceItem::createNew(); - $invoiceItem->product_id = isset($product) ? $product->id : null; - $invoiceItem->product_key = trim($invoice->is_recurring ? $item->product_key : Utils::processVariables($item['product_key'])); - $invoiceItem->notes = trim($invoice->is_recurring ? $item['notes'] : Utils::processVariables($item['notes'])); - $invoiceItem->cost = Utils::parseFloat($item['cost']); - $invoiceItem->qty = Utils::parseFloat($item['qty']); - $invoiceItem->tax_rate = 0; - - if (isset($item['tax_rate']) && isset($item['tax_name']) && $item['tax_name']) { - $invoiceItem['tax_rate'] = Utils::parseFloat($item['tax_rate']); - $invoiceItem['tax_name'] = trim($item['tax_name']); - } - - $invoice->invoice_items()->save($invoiceItem); - } - - if ((isset($data['set_default_terms']) && $data['set_default_terms']) - || (isset($data['set_default_footer']) && $data['set_default_footer'])) { - if (isset($data['set_default_terms']) && $data['set_default_terms']) { - $account->invoice_terms = trim($data['terms']); - } - if (isset($data['set_default_footer']) && $data['set_default_footer']) { - $account->invoice_footer = trim($data['invoice_footer']); - } - $account->save(); - } - - return $invoice; - } - - public function cloneInvoice($invoice, $quotePublicId = null) - { - $invoice->load('invitations', 'invoice_items'); - $account = $invoice->account; - - $clone = Invoice::createNew($invoice); - $clone->balance = $invoice->amount; - - // if the invoice prefix is diff than quote prefix, use the same number for the invoice - if (($account->invoice_number_prefix || $account->quote_number_prefix) - && $account->invoice_number_prefix != $account->quote_number_prefix - && $account->share_counter) { - - $invoiceNumber = $invoice->invoice_number; - if (strpos($invoiceNumber, $account->quote_number_prefix) === 0) { - $invoiceNumber = substr($invoiceNumber, strlen($account->quote_number_prefix)); - } - $clone->invoice_number = $account->invoice_number_prefix.$invoiceNumber; - } else { - $clone->invoice_number = $account->getNextInvoiceNumber(); - } - - foreach ([ - 'client_id', - 'discount', - 'is_amount_discount', - 'invoice_date', - 'po_number', - 'due_date', - 'is_recurring', - 'frequency_id', - 'start_date', - 'end_date', - 'terms', - 'invoice_footer', - 'public_notes', - 'invoice_design_id', - 'tax_name', - 'tax_rate', - 'amount', - 'is_quote', - 'custom_value1', - 'custom_value2', - 'custom_taxes1', - 'custom_taxes2', ] as $field) { - $clone->$field = $invoice->$field; - } - - if ($quotePublicId) { - $clone->is_quote = false; - $clone->quote_id = $quotePublicId; - } - - $clone->save(); - - if ($quotePublicId) { - $invoice->quote_invoice_id = $clone->public_id; - $invoice->save(); - } - - foreach ($invoice->invoice_items as $item) { - $cloneItem = InvoiceItem::createNew($invoice); - - foreach ([ - 'product_id', - 'product_key', - 'notes', - 'cost', - 'qty', - 'tax_name', - 'tax_rate', ] as $field) { - $cloneItem->$field = $item->$field; - } - - $clone->invoice_items()->save($cloneItem); - } - - foreach ($invoice->invitations as $invitation) { - $cloneInvitation = Invitation::createNew($invoice); - $cloneInvitation->contact_id = $invitation->contact_id; - $cloneInvitation->invitation_key = str_random(RANDOM_KEY_LENGTH); - $clone->invitations()->save($cloneInvitation); - } - - return $clone; - } - - public function bulk($ids, $action, $statusId = false) - { - if (!$ids) { - return 0; - } - - $invoices = Invoice::withTrashed()->scope($ids)->get(); - - foreach ($invoices as $invoice) { - if ($action == 'mark') { - $invoice->invoice_status_id = $statusId; - $invoice->save(); - } elseif ($action == 'restore') { - $invoice->restore(); - } else { - if ($action == 'delete') { - $invoice->is_deleted = true; - $invoice->save(); - } - - $invoice->delete(); - } - } - - return count($invoices); - } -} diff --git a/app/ninja/repositories/PaymentRepository.php b/app/ninja/repositories/PaymentRepository.php deleted file mode 100755 index e7e986db374b..000000000000 --- a/app/ninja/repositories/PaymentRepository.php +++ /dev/null @@ -1,154 +0,0 @@ -join('clients', 'clients.id', '=', 'payments.client_id') - ->join('invoices', 'invoices.id', '=', 'payments.invoice_id') - ->join('contacts', 'contacts.client_id', '=', 'clients.id') - ->leftJoin('payment_types', 'payment_types.id', '=', 'payments.payment_type_id') - ->where('payments.account_id', '=', \Auth::user()->account_id) - ->where('clients.deleted_at', '=', null) - ->where('contacts.is_primary', '=', true) - ->where('contacts.deleted_at', '=', null) - ->select('payments.public_id', 'payments.transaction_reference', 'clients.name as client_name', 'clients.public_id as client_public_id', 'payments.amount', 'payments.payment_date', 'invoices.public_id as invoice_public_id', 'invoices.invoice_number', 'clients.currency_id', 'contacts.first_name', 'contacts.last_name', 'contacts.email', 'payment_types.name as payment_type', 'payments.account_gateway_id', 'payments.deleted_at', 'payments.is_deleted', 'invoices.is_deleted as invoice_is_deleted'); - - if (!\Session::get('show_trash:payment')) { - $query->where('payments.deleted_at', '=', null) - ->where('invoices.deleted_at', '=', null); - } - - if ($clientPublicId) { - $query->where('clients.public_id', '=', $clientPublicId); - } - - if ($filter) { - $query->where(function ($query) use ($filter) { - $query->where('clients.name', 'like', '%'.$filter.'%'); - }); - } - - return $query; - } - - public function findForContact($contactId = null, $filter = null) - { - $query = \DB::table('payments') - ->join('clients', 'clients.id', '=', 'payments.client_id') - ->join('invoices', 'invoices.id', '=', 'payments.invoice_id') - ->join('contacts', 'contacts.client_id', '=', 'clients.id') - ->leftJoin('invitations', function ($join) { - $join->on('invitations.invoice_id', '=', 'invoices.id') - ->on('invitations.contact_id', '=', 'contacts.id'); - }) - ->leftJoin('payment_types', 'payment_types.id', '=', 'payments.payment_type_id') - ->where('clients.is_deleted', '=', false) - ->where('payments.is_deleted', '=', false) - ->where('invitations.deleted_at', '=', null) - ->where('invoices.deleted_at', '=', null) - ->where('invitations.contact_id', '=', $contactId) - ->select('invitations.invitation_key', 'payments.public_id', 'payments.transaction_reference', 'clients.name as client_name', 'clients.public_id as client_public_id', 'payments.amount', 'payments.payment_date', 'invoices.public_id as invoice_public_id', 'invoices.invoice_number', 'clients.currency_id', 'contacts.first_name', 'contacts.last_name', 'contacts.email', 'payment_types.name as payment_type', 'payments.account_gateway_id'); - - if ($filter) { - $query->where(function ($query) use ($filter) { - $query->where('clients.name', 'like', '%'.$filter.'%'); - }); - } - - return $query; - } - - public function getErrors($input) - { - $rules = array( - 'client' => 'required', - 'invoice' => 'required', - 'amount' => 'required', - ); - - if ($input['payment_type_id'] == PAYMENT_TYPE_CREDIT) { - $rules['payment_type_id'] = 'has_credit:'.$input['client'].','.$input['amount']; - } - - $validator = \Validator::make($input, $rules); - - if ($validator->fails()) { - return $validator; - } - - return false; - } - - public function save($publicId = null, $input) - { - if ($publicId) { - $payment = Payment::scope($publicId)->firstOrFail(); - } else { - $payment = Payment::createNew(); - } - - $paymentTypeId = $input['payment_type_id'] ? $input['payment_type_id'] : null; - $payment->payment_type_id = $paymentTypeId; - $payment->payment_date = Utils::toSqlDate($input['payment_date']); - $payment->transaction_reference = trim($input['transaction_reference']); - - if (!$publicId) { - $clientId = Client::getPrivateId($input['client']); - $amount = Utils::parseFloat($input['amount']); - - if ($paymentTypeId == PAYMENT_TYPE_CREDIT) { - $credits = Credit::scope()->where('client_id', '=', $clientId) - ->where('balance', '>', 0)->orderBy('created_at')->get(); - $applied = 0; - - foreach ($credits as $credit) { - $applied += $credit->apply($amount); - - if ($applied >= $amount) { - break; - } - } - } - - $payment->client_id = $clientId; - $payment->invoice_id = isset($input['invoice']) && $input['invoice'] != "-1" ? Invoice::getPrivateId($input['invoice']) : null; - $payment->amount = $amount; - } - - $payment->save(); - - return $payment; - } - - public function bulk($ids, $action) - { - if (!$ids) { - return 0; - } - - $payments = Payment::withTrashed()->scope($ids)->get(); - - foreach ($payments as $payment) { - if ($action == 'restore') { - $payment->restore(); - } else { - if ($action == 'delete') { - $payment->is_deleted = true; - $payment->save(); - } - - $payment->delete(); - } - } - - return count($payments); - } -} diff --git a/app/ninja/repositories/TaxRateRepository.php b/app/ninja/repositories/TaxRateRepository.php deleted file mode 100755 index 9fe1c854411e..000000000000 --- a/app/ninja/repositories/TaxRateRepository.php +++ /dev/null @@ -1,42 +0,0 @@ -rate) || (isset($record->is_deleted) && $record->is_deleted)) { - continue; - } - - if (!isset($record->name) || !trim($record->name)) { - continue; - } - - if ($record->public_id) { - $taxRate = TaxRate::scope($record->public_id)->firstOrFail(); - } else { - $taxRate = TaxRate::createNew(); - } - - $taxRate->rate = Utils::parseFloat($record->rate); - $taxRate->name = trim($record->name); - $taxRate->save(); - - $taxRateIds[] = $taxRate->public_id; - } - - $taxRates = TaxRate::scope()->get(); - - foreach ($taxRates as $taxRate) { - if (!in_array($taxRate->public_id, $taxRateIds)) { - $taxRate->delete(); - } - } - } -} diff --git a/app/routes.php b/app/routes.php deleted file mode 100755 index fc436e177b86..000000000000 --- a/app/routes.php +++ /dev/null @@ -1,493 +0,0 @@ -'api.client.quotes', 'uses'=>'QuoteController@getClientDatatable')); -Route::get('api/client.invoices', array('as'=>'api.client.invoices', 'uses'=>'InvoiceController@getClientDatatable')); -Route::get('api/client.payments', array('as'=>'api.client.payments', 'uses'=>'PaymentController@getClientDatatable')); - -Route::get('license', 'PaymentController@show_license_payment'); -Route::post('license', 'PaymentController@do_license_payment'); -Route::get('claim_license', 'PaymentController@claim_license'); - -Route::post('signup/validate', 'AccountController@checkEmail'); -Route::post('signup/submit', 'AccountController@submitSignup'); - -// Confide routes -Route::get('login', 'UserController@login'); -Route::post('login', 'UserController@do_login'); -Route::get('user/confirm/{code}', 'UserController@confirm'); -Route::get('forgot_password', 'UserController@forgot_password'); -Route::post('forgot_password', 'UserController@do_forgot_password'); -Route::get('user/reset/{token?}', 'UserController@reset_password'); -Route::post('user/reset', 'UserController@do_reset_password'); -Route::get('logout', 'UserController@logout'); - -if (Utils::isNinja()) { - Route::post('/signup/register', 'AccountController@doRegister'); - Route::get('/news_feed/{user_type}/{version}/', 'HomeController@newsFeed'); - Route::get('/demo', 'AccountController@demo'); -} - -Route::group(array('before' => 'auth'), function() { - Route::get('dashboard', 'DashboardController@index'); - Route::get('view_archive/{entity_type}/{visible}', 'AccountController@setTrashVisible'); - Route::get('hide_message', 'HomeController@hideMessage'); - Route::get('force_inline_pdf', 'UserController@forcePDFJS'); - - Route::get('api/users', array('as'=>'api.users', 'uses'=>'UserController@getDatatable')); - Route::resource('users', 'UserController'); - Route::post('users/delete', 'UserController@delete'); - Route::get('send_confirmation/{user_id}', 'UserController@sendConfirmation'); - Route::get('restore_user/{user_id}', 'UserController@restoreUser'); - Route::post('users/change_password', 'UserController@changePassword'); - - Route::get('api/tokens', array('as'=>'api.tokens', 'uses'=>'TokenController@getDatatable')); - Route::resource('tokens', 'TokenController'); - Route::post('tokens/delete', 'TokenController@delete'); - - Route::get('api/products', array('as'=>'api.products', 'uses'=>'ProductController@getDatatable')); - Route::resource('products', 'ProductController'); - Route::get('products/{product_id}/archive', 'ProductController@archive'); - - Route::get('company/advanced_settings/data_visualizations', 'ReportController@d3'); - Route::get('company/advanced_settings/chart_builder', 'ReportController@report'); - Route::post('company/advanced_settings/chart_builder', 'ReportController@report'); - - Route::post('company/cancel_account', 'AccountController@cancelAccount'); - Route::get('account/getSearchData', array('as' => 'getSearchData', 'uses' => 'AccountController@getSearchData')); - Route::get('company/{section?}/{sub_section?}', 'AccountController@showSection'); - Route::post('company/{section?}/{sub_section?}', 'AccountController@doSection'); - Route::post('user/setTheme', 'UserController@setTheme'); - Route::post('remove_logo', 'AccountController@removeLogo'); - Route::post('account/go_pro', 'AccountController@enableProPlan'); - - Route::resource('gateways', 'AccountGatewayController'); - Route::get('api/gateways', array('as'=>'api.gateways', 'uses'=>'AccountGatewayController@getDatatable')); - Route::post('gateways/delete', 'AccountGatewayController@delete'); - - Route::resource('clients', 'ClientController'); - Route::get('api/clients', array('as'=>'api.clients', 'uses'=>'ClientController@getDatatable')); - Route::get('api/activities/{client_id?}', array('as'=>'api.activities', 'uses'=>'ActivityController@getDatatable')); - Route::post('clients/bulk', 'ClientController@bulk'); - - Route::get('recurring_invoices', 'InvoiceController@recurringIndex'); - Route::get('api/recurring_invoices/{client_id?}', array('as'=>'api.recurring_invoices', 'uses'=>'InvoiceController@getRecurringDatatable')); - - Route::get('invoices/invoice_history/{invoice_id}', 'InvoiceController@invoiceHistory'); - Route::get('quotes/quote_history/{invoice_id}', 'InvoiceController@invoiceHistory'); - - Route::resource('invoices', 'InvoiceController'); - Route::get('api/invoices/{client_id?}', array('as'=>'api.invoices', 'uses'=>'InvoiceController@getDatatable')); - Route::get('invoices/create/{client_id?}', 'InvoiceController@create'); - Route::get('invoices/{public_id}/clone', 'InvoiceController@cloneInvoice'); - Route::post('invoices/bulk', 'InvoiceController@bulk'); - - Route::get('quotes/create/{client_id?}', 'QuoteController@create'); - Route::get('quotes/{public_id}/clone', 'InvoiceController@cloneInvoice'); - Route::get('quotes/{public_id}/edit', 'InvoiceController@edit'); - Route::put('quotes/{public_id}', 'InvoiceController@update'); - Route::get('quotes/{public_id}', 'InvoiceController@edit'); - Route::post('quotes', 'InvoiceController@store'); - Route::get('quotes', 'QuoteController@index'); - Route::get('api/quotes/{client_id?}', array('as'=>'api.quotes', 'uses'=>'QuoteController@getDatatable')); - Route::post('quotes/bulk', 'QuoteController@bulk'); - - Route::resource('payments', 'PaymentController'); - Route::get('payments/create/{client_id?}/{invoice_id?}', 'PaymentController@create'); - Route::get('api/payments/{client_id?}', array('as'=>'api.payments', 'uses'=>'PaymentController@getDatatable')); - Route::post('payments/bulk', 'PaymentController@bulk'); - - Route::get('credits/{id}/edit', function() { - return View::make('header'); - }); - Route::resource('credits', 'CreditController'); - Route::get('credits/create/{client_id?}/{invoice_id?}', 'CreditController@create'); - Route::get('api/credits/{client_id?}', array('as'=>'api.credits', 'uses'=>'CreditController@getDatatable')); - Route::post('credits/bulk', 'CreditController@bulk'); - - //Route::resource('timesheets', 'TimesheetController'); -}); - -// Route group for API -Route::group(array('prefix' => 'api/v1', 'before' => ['api.access']), function() -{ - Route::resource('ping', 'ClientApiController@ping'); - Route::resource('clients', 'ClientApiController'); - Route::resource('invoices', 'InvoiceApiController'); - Route::resource('quotes', 'QuoteApiController'); - Route::resource('payments', 'PaymentApiController'); - Route::post('api/hooks', 'IntegrationController@subscribe'); - Route::post('email_invoice', 'InvoiceApiController@emailInvoice'); -}); - -define('CONTACT_EMAIL', Config::get('mail.from.address')); -define('CONTACT_NAME', Config::get('mail.from.name')); -define('SITE_URL', Config::get('app.url')); - -define('ENV_DEVELOPMENT', 'local'); -define('ENV_STAGING', 'staging'); -define('ENV_PRODUCTION', 'fortrabbit'); - -define('RECENTLY_VIEWED', 'RECENTLY_VIEWED'); -define('ENTITY_CLIENT', 'client'); -define('ENTITY_INVOICE', 'invoice'); -define('ENTITY_RECURRING_INVOICE', 'recurring_invoice'); -define('ENTITY_PAYMENT', 'payment'); -define('ENTITY_CREDIT', 'credit'); -define('ENTITY_QUOTE', 'quote'); - -define('PERSON_CONTACT', 'contact'); -define('PERSON_USER', 'user'); - -define('ACCOUNT_DETAILS', 'details'); -define('ACCOUNT_NOTIFICATIONS', 'notifications'); -define('ACCOUNT_IMPORT_EXPORT', 'import_export'); -define('ACCOUNT_PAYMENTS', 'payments'); -define('ACCOUNT_MAP', 'import_map'); -define('ACCOUNT_EXPORT', 'export'); -define('ACCOUNT_PRODUCTS', 'products'); -define('ACCOUNT_ADVANCED_SETTINGS', 'advanced_settings'); -define('ACCOUNT_INVOICE_SETTINGS', 'invoice_settings'); -define('ACCOUNT_INVOICE_DESIGN', 'invoice_design'); -define('ACCOUNT_CHART_BUILDER', 'chart_builder'); -define('ACCOUNT_USER_MANAGEMENT', 'user_management'); -define('ACCOUNT_DATA_VISUALIZATIONS', 'data_visualizations'); -define('ACCOUNT_EMAIL_TEMPLATES', 'email_templates'); -define('ACCOUNT_TOKEN_MANAGEMENT', 'token_management'); - -define('ACTIVITY_TYPE_CREATE_CLIENT', 1); -define('ACTIVITY_TYPE_ARCHIVE_CLIENT', 2); -define('ACTIVITY_TYPE_DELETE_CLIENT', 3); - -define('ACTIVITY_TYPE_CREATE_INVOICE', 4); -define('ACTIVITY_TYPE_UPDATE_INVOICE', 5); -define('ACTIVITY_TYPE_EMAIL_INVOICE', 6); -define('ACTIVITY_TYPE_VIEW_INVOICE', 7); -define('ACTIVITY_TYPE_ARCHIVE_INVOICE', 8); -define('ACTIVITY_TYPE_DELETE_INVOICE', 9); - -define('ACTIVITY_TYPE_CREATE_PAYMENT', 10); -define('ACTIVITY_TYPE_UPDATE_PAYMENT', 11); -define('ACTIVITY_TYPE_ARCHIVE_PAYMENT', 12); -define('ACTIVITY_TYPE_DELETE_PAYMENT', 13); - -define('ACTIVITY_TYPE_CREATE_CREDIT', 14); -define('ACTIVITY_TYPE_UPDATE_CREDIT', 15); -define('ACTIVITY_TYPE_ARCHIVE_CREDIT', 16); -define('ACTIVITY_TYPE_DELETE_CREDIT', 17); - -define('ACTIVITY_TYPE_CREATE_QUOTE', 18); -define('ACTIVITY_TYPE_UPDATE_QUOTE', 19); -define('ACTIVITY_TYPE_EMAIL_QUOTE', 20); -define('ACTIVITY_TYPE_VIEW_QUOTE', 21); -define('ACTIVITY_TYPE_ARCHIVE_QUOTE', 22); -define('ACTIVITY_TYPE_DELETE_QUOTE', 23); - -define('ACTIVITY_TYPE_RESTORE_QUOTE', 24); -define('ACTIVITY_TYPE_RESTORE_INVOICE', 25); -define('ACTIVITY_TYPE_RESTORE_CLIENT', 26); -define('ACTIVITY_TYPE_RESTORE_PAYMENT', 27); -define('ACTIVITY_TYPE_RESTORE_CREDIT', 28); -define('ACTIVITY_TYPE_APPROVE_QUOTE', 29); - -define('DEFAULT_INVOICE_NUMBER', '0001'); -define('RECENTLY_VIEWED_LIMIT', 8); -define('LOGGED_ERROR_LIMIT', 100); -define('RANDOM_KEY_LENGTH', 32); -define('MAX_NUM_CLIENTS', 500); -define('MAX_NUM_CLIENTS_PRO', 20000); -define('MAX_NUM_USERS', 20); - -define('INVOICE_STATUS_DRAFT', 1); -define('INVOICE_STATUS_SENT', 2); -define('INVOICE_STATUS_VIEWED', 3); -define('INVOICE_STATUS_PARTIAL', 4); -define('INVOICE_STATUS_PAID', 5); - -define('PAYMENT_TYPE_CREDIT', 1); - -define('FREQUENCY_WEEKLY', 1); -define('FREQUENCY_TWO_WEEKS', 2); -define('FREQUENCY_FOUR_WEEKS', 3); -define('FREQUENCY_MONTHLY', 4); -define('FREQUENCY_THREE_MONTHS', 5); -define('FREQUENCY_SIX_MONTHS', 6); -define('FREQUENCY_ANNUALLY', 7); - -define('SESSION_TIMEZONE', 'timezone'); -define('SESSION_CURRENCY', 'currency'); -define('SESSION_DATE_FORMAT', 'dateFormat'); -define('SESSION_DATE_PICKER_FORMAT', 'datePickerFormat'); -define('SESSION_DATETIME_FORMAT', 'datetimeFormat'); -define('SESSION_COUNTER', 'sessionCounter'); -define('SESSION_LOCALE', 'sessionLocale'); - -define('DEFAULT_TIMEZONE', 'US/Eastern'); -define('DEFAULT_CURRENCY', 1); // US Dollar -define('DEFAULT_DATE_FORMAT', 'M j, Y'); -define('DEFAULT_DATE_PICKER_FORMAT', 'M d, yyyy'); -define('DEFAULT_DATETIME_FORMAT', 'F j, Y, g:i a'); -define('DEFAULT_QUERY_CACHE', 120); // minutes -define('DEFAULT_LOCALE', 'en'); - -define('RESULT_SUCCESS', 'success'); -define('RESULT_FAILURE', 'failure'); - - -define('PAYMENT_LIBRARY_OMNIPAY', 1); -define('PAYMENT_LIBRARY_PHP_PAYMENTS', 2); - -define('GATEWAY_AUTHORIZE_NET', 1); -define('GATEWAY_AUTHORIZE_NET_SIM', 2); -define('GATEWAY_PAYPAL_EXPRESS', 17); -define('GATEWAY_PAYPAL_PRO', 18); -define('GATEWAY_STRIPE', 23); -define('GATEWAY_TWO_CHECKOUT', 27); -define('GATEWAY_BEANSTREAM', 29); -define('GATEWAY_PSIGATE', 30); -define('GATEWAY_MOOLAH', 31); - -define('EVENT_CREATE_CLIENT', 1); -define('EVENT_CREATE_INVOICE', 2); -define('EVENT_CREATE_QUOTE', 3); -define('EVENT_CREATE_PAYMENT', 4); - -define('REQUESTED_PRO_PLAN', 'REQUESTED_PRO_PLAN'); -define('DEMO_ACCOUNT_ID', 'DEMO_ACCOUNT_ID'); -define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h'); -define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET); -define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}'); -define('NINJA_WEB_URL', 'https://www.invoiceninja.com'); -define('NINJA_APP_URL', 'https://app.invoiceninja.com'); -define('NINJA_VERSION', '1.6.1'); -define('NINJA_DATE', '2000-01-01'); -define('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com'); -define('RELEASES_URL', 'https://github.com/hillelcoren/invoice-ninja/releases/'); - -define('COUNT_FREE_DESIGNS', 4); -define('PRODUCT_ONE_CLICK_INSTALL', 1); -define('PRODUCT_INVOICE_DESIGNS', 2); -define('PRODUCT_WHITE_LABEL', 3); -define('PRODUCT_SELF_HOST', 4); -define('WHITE_LABEL_AFFILIATE_KEY', '92D2J5'); -define('INVOICE_DESIGNS_AFFILIATE_KEY', 'T3RS74'); -define('SELF_HOST_AFFILIATE_KEY', '8S69AD'); - -define('PRO_PLAN_PRICE', 50); -define('WHITE_LABEL_PRICE', 20); -define('INVOICE_DESIGNS_PRICE', 10); - -define('USER_TYPE_SELF_HOST', 'SELF_HOST'); -define('USER_TYPE_CLOUD_HOST', 'CLOUD_HOST'); -define('NEW_VERSION_AVAILABLE', 'NEW_VERSION_AVAILABLE'); - -define('TOKEN_BILLING_DISABLED', 1); -define('TOKEN_BILLING_OPT_IN', 2); -define('TOKEN_BILLING_OPT_OUT', 3); -define('TOKEN_BILLING_ALWAYS', 4); - -define('PAYMENT_TYPE_PAYPAL', 'PAYMENT_TYPE_PAYPAL'); -define('PAYMENT_TYPE_CREDIT_CARD', 'PAYMENT_TYPE_CREDIT_CARD'); -define('PAYMENT_TYPE_ANY', 'PAYMENT_TYPE_ANY'); - -/* -define('GATEWAY_AMAZON', 30); -define('GATEWAY_BLUEPAY', 31); -define('GATEWAY_BRAINTREE', 32); -define('GATEWAY_GOOGLE', 33); -define('GATEWAY_QUICKBOOKS', 35); -*/ - -/** - * TEST VALUES FOR THE CREDIT CARDS - * NUMBER IS FOR THE BINARY COUNT FOR WHICH IMAGES TO DISPLAY - * card IS FOR CARD IMAGE AND text IS FOR CARD NAME (TO ADD TO alt FOR IMAGE) -**/ -$creditCards = [ - 1 => ['card' => 'images/credit_cards/Test-Visa-Icon.png', 'text' => 'Visa'], - 2 => ['card' => 'images/credit_cards/Test-MasterCard-Icon.png', 'text' => 'Master Card'], - 4 => ['card' => 'images/credit_cards/Test-AmericanExpress-Icon.png', 'text' => 'American Express'], - 8 => ['card' => 'images/credit_cards/Test-Diners-Icon.png', 'text' => 'Diners'], - 16 => ['card' => 'images/credit_cards/Test-Discover-Icon.png', 'text' => 'Discover'] - ]; - -define('CREDIT_CARDS', serialize($creditCards)); - - -HTML::macro('nav_link', function($url, $text, $url2 = '', $extra = '') { - $class = ( Request::is($url) || Request::is($url.'/*') || Request::is($url2.'/*') ) ? ' class="active"' : ''; - $title = ucwords(trans("texts.$text")) . Utils::getProLabel($text); - return ''.$title.''; -}); - -HTML::macro('tab_link', function($url, $text, $active = false) { - $class = $active ? ' class="active"' : ''; - return ''.$text.''; -}); - -HTML::macro('menu_link', function($type) { - $types = $type.'s'; - $Type = ucfirst($type); - $Types = ucfirst($types); - $class = ( Request::is($types) || Request::is('*'.$type.'*')) && !Request::is('*advanced_settings*') ? ' active' : ''; - - return ''; -}); - -HTML::macro('image_data', function($imagePath) { - return 'data:image/jpeg;base64,' . base64_encode(file_get_contents(public_path().'/'.$imagePath)); -}); - - -HTML::macro('breadcrumbs', function() { - $str = ''; -}); - -function uctrans($text) -{ - return ucwords(trans($text)); -} - -// optional trans: only return the string if it's translated -function otrans($text) -{ - $locale = Session::get(SESSION_LOCALE); - - if ($locale == 'en') { - return trans($text); - } else { - $string = trans($text); - $english = trans($text, [], 'en'); - return $string != $english ? $string : ''; - } -} - -Validator::extend('positive', function($attribute, $value, $parameters) { - return Utils::parseFloat($value) >= 0; -}); - -Validator::extend('has_credit', function($attribute, $value, $parameters) { - $publicClientId = $parameters[0]; - $amount = $parameters[1]; - - $client = Client::scope($publicClientId)->firstOrFail(); - $credit = $client->getTotalCredit(); - - return $credit >= $amount; -}); - - -/* -// Log all SQL queries to laravel.log -Event::listen('illuminate.query', function($query, $bindings, $time, $name) -{ - $data = compact('bindings', 'time', 'name'); - - // Format binding data for sql insertion - foreach ($bindings as $i => $binding) - { - if ($binding instanceof \DateTime) - { - $bindings[$i] = $binding->format('\'Y-m-d H:i:s\''); - } - else if (is_string($binding)) - { - $bindings[$i] = "'$binding'"; - } - } - - // Insert bindings into query - $query = str_replace(array('%', '?'), array('%%', '%s'), $query); - $query = vsprintf($query, $bindings); - - Log::info($query, $data); -}); -*/ - -/* -if (Auth::check() && Auth::user()->id === 1) -{ - Auth::loginUsingId(1); -} -*/ \ No newline at end of file diff --git a/app/start/artisan.php b/app/start/artisan.php deleted file mode 100755 index 57ae92253c76..000000000000 --- a/app/start/artisan.php +++ /dev/null @@ -1,18 +0,0 @@ -pushHandler(new Monolog\Handler\SyslogHandler('intranet', 'user', Logger::DEBUG, false, LOG_PID)); -*/ - - -/* -|-------------------------------------------------------------------------- -| Application Error Handler -|-------------------------------------------------------------------------- -| -| Here you may handle any errors that occur in your application, including -| logging them or displaying custom views for specific errors. You may -| even register several error handlers to handle different types of -| exceptions. If nothing is returned, the default error view is -| shown, which includes a detailed stack trace during debug. -| -*/ - -App::error(function(Exception $exception, $code) -{ - Utils::logError($code . ' ' . Utils::getErrorString($exception)); - - if (Utils::isNinjaProd()) { - return Response::view('error', ['hideHeader' => true, 'error' => "A {$code} error occurred."], $code); - } else { - return null; - } -}); - -/* -|-------------------------------------------------------------------------- -| Maintenance Mode Handler -|-------------------------------------------------------------------------- -| -| The "down" Artisan command gives you the ability to put an application -| into maintenance mode. Here, you will define what is displayed back -| to the user if maintenace mode is in effect for this application. -| -*/ - -App::down(function() -{ - return Response::make("We are currently undergoing some brief maintenance, be right back!", 503); -}); - - - -Event::subscribe('UserEventHandler'); -Event::subscribe('InvoiceEventHandler'); - - -/* -|-------------------------------------------------------------------------- -| Require The Filters File -|-------------------------------------------------------------------------- -| -| Next we will load the filters file for the application. This gives us -| a nice separate location to store our route and application filter -| definitions instead of putting them all in the main routes file. -| -*/ - -require app_path().'/filters.php'; \ No newline at end of file diff --git a/app/start/local.php b/app/start/local.php deleted file mode 100755 index adab104c9f13..000000000000 --- a/app/start/local.php +++ /dev/null @@ -1,3 +0,0 @@ -client->request('GET', '/'); - $this->assertTrue($this->client->getResponse()->isRedirect()); - } - -} \ No newline at end of file diff --git a/app/tests/TestCase.php b/app/tests/TestCase.php deleted file mode 100755 index 49b80fc274bc..000000000000 --- a/app/tests/TestCase.php +++ /dev/null @@ -1,19 +0,0 @@ -assertSame(null, $code); - - list($code, $tags, $title) = TimesheetUtils::parseEventSummary('Test:'); - $this->assertSame("TEST", $code); - - list($code, $tags, $title) = TimesheetUtils::parseEventSummary('Test: '); - $this->assertSame("TEST", $code); - - list($code, $tags, $title) = TimesheetUtils::parseEventSummary('Test::'); - $this->assertSame("TEST", $code); - - list($code, $tags, $title) = TimesheetUtils::parseEventSummary('TEST: Hello :)'); - $this->assertSame("TEST", $code); - - list($code, $tags, $title) = TimesheetUtils::parseEventSummary('Test/tags: '); - $this->assertSame('TEST', $code); - $this->assertSame('tags', $tags); - } - -} diff --git a/app/tests/data/Demo/demo.response.json b/app/tests/data/Demo/demo.response.json deleted file mode 100644 index 21ff1e1c096b..000000000000 --- a/app/tests/data/Demo/demo.response.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "clients":[{"name":"IBM","balance":"0.00","paid_to_date":"13.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-18 00:00:00","invoice_number":"0001","amount":"13.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"13.00","qty":"1.00"}],"displayName":"0001","displayTotal":13,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"1"}],"displayName":"IBM","displayTotal":13,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Nestle","balance":null,"paid_to_date":null,"invoices":[],"contacts":[{"public_id":"2"}],"displayName":"Nestle","displayTotal":0,"displayBalance":0,"displayPercent":"NaN","displayAge":null},{"name":"Mitsubishi UFJ Financial","balance":"0.00","paid_to_date":"1701.00","invoices":[{"invoice_status_id":"5","created_at":"2014-06-29 00:00:00","invoice_number":"0002","amount":"85.00","balance":"0.00","invoice_items":[{"product_key":"Kansas","cost":"85.00","qty":"1.00"}],"displayName":"0002","displayTotal":85,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-11 00:00:00","invoice_number":"0003","amount":"142.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"142.00","qty":"1.00"}],"displayName":"0003","displayTotal":142,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-19 00:00:00","invoice_number":"0004","amount":"936.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"936.00","qty":"1.00"}],"displayName":"0004","displayTotal":936,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-19 00:00:00","invoice_number":"0005","amount":"74.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"74.00","qty":"1.00"}],"displayName":"0005","displayTotal":74,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-25 00:00:00","invoice_number":"0006","amount":"101.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"101.00","qty":"1.00"}],"displayName":"0006","displayTotal":101,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-21 00:00:00","invoice_number":"0007","amount":"116.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"116.00","qty":"1.00"}],"displayName":"0007","displayTotal":116,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-17 00:00:00","invoice_number":"0008","amount":"42.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"42.00","qty":"1.00"}],"displayName":"0008","displayTotal":42,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-24 00:00:00","invoice_number":"0009","amount":"66.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"66.00","qty":"1.00"}],"displayName":"0009","displayTotal":66,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-21 00:00:00","invoice_number":"0010","amount":"40.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"40.00","qty":"1.00"}],"displayName":"0010","displayTotal":40,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-25 00:00:00","invoice_number":"0011","amount":"99.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"99.00","qty":"1.00"}],"displayName":"0011","displayTotal":99,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"3"}],"displayName":"Mitsubishi UFJ Financial","displayTotal":1701,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Vodafone","balance":"0.00","paid_to_date":"106.00","invoices":[{"invoice_status_id":"5","created_at":"2014-08-26 00:00:00","invoice_number":"0012","amount":"106.00","balance":"0.00","invoice_items":[{"product_key":"Louisiana","cost":"106.00","qty":"1.00"}],"displayName":"0012","displayTotal":106,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"4"}],"displayName":"Vodafone","displayTotal":106,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Eni","balance":"0.00","paid_to_date":"402.00","invoices":[{"invoice_status_id":"5","created_at":"2014-06-29 00:00:00","invoice_number":"0013","amount":"18.00","balance":"0.00","invoice_items":[{"product_key":"Kansas","cost":"18.00","qty":"1.00"}],"displayName":"0013","displayTotal":18,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-04 00:00:00","invoice_number":"0014","amount":"70.00","balance":"0.00","invoice_items":[{"product_key":"Connecticut","cost":"70.00","qty":"1.00"}],"displayName":"0014","displayTotal":70,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-08 00:00:00","invoice_number":"0015","amount":"59.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"59.00","qty":"1.00"}],"displayName":"0015","displayTotal":59,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-25 00:00:00","invoice_number":"0016","amount":"18.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"18.00","qty":"1.00"}],"displayName":"0016","displayTotal":18,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-04 00:00:00","invoice_number":"0017","amount":"61.00","balance":"0.00","invoice_items":[{"product_key":"Maine","cost":"61.00","qty":"1.00"}],"displayName":"0017","displayTotal":61,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-16 00:00:00","invoice_number":"0018","amount":"65.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"65.00","qty":"1.00"}],"displayName":"0018","displayTotal":65,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-24 00:00:00","invoice_number":"0019","amount":"39.00","balance":"0.00","invoice_items":[{"product_key":"Kansas","cost":"39.00","qty":"1.00"}],"displayName":"0019","displayTotal":39,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-31 00:00:00","invoice_number":"0020","amount":"72.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"72.00","qty":"1.00"}],"displayName":"0020","displayTotal":72,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"5"}],"displayName":"Eni","displayTotal":402,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Procter & Gamble","balance":"0.00","paid_to_date":"251.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-12 00:00:00","invoice_number":"0021","amount":"48.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"48.00","qty":"1.00"}],"displayName":"0021","displayTotal":48,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-24 00:00:00","invoice_number":"0022","amount":"90.00","balance":"0.00","invoice_items":[{"product_key":"Alabama","cost":"90.00","qty":"1.00"}],"displayName":"0022","displayTotal":90,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-31 00:00:00","invoice_number":"0023","amount":"70.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"70.00","qty":"1.00"}],"displayName":"0023","displayTotal":70,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-07 00:00:00","invoice_number":"0024","amount":"43.00","balance":"0.00","invoice_items":[{"product_key":"Illinois","cost":"43.00","qty":"1.00"}],"displayName":"0024","displayTotal":43,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"6"}],"displayName":"Procter & Gamble","displayTotal":251,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Johnson & Johnson","balance":"485.00","paid_to_date":"2188.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-06 00:00:00","invoice_number":"0025","amount":"137.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"137.00","qty":"1.00"}],"displayName":"0025","displayTotal":137,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-30 00:00:00","invoice_number":"0026","amount":"92.00","balance":"92.00","invoice_items":[{"product_key":"Iowa","cost":"92.00","qty":"1.00"}],"displayName":"0026","displayTotal":92,"displayBalance":92,"displayPercent":0,"displayAge":3},{"invoice_status_id":"1","created_at":"2014-08-11 00:00:00","invoice_number":"0027","amount":"95.00","balance":"95.00","invoice_items":[{"product_key":"Arizona","cost":"95.00","qty":"1.00"}],"displayName":"0027","displayTotal":95,"displayBalance":95,"displayPercent":0,"displayAge":53},{"invoice_status_id":"1","created_at":"2014-07-28 00:00:00","invoice_number":"0028","amount":"25.00","balance":"25.00","invoice_items":[{"product_key":"Massachusetts","cost":"25.00","qty":"1.00"}],"displayName":"0028","displayTotal":25,"displayBalance":25,"displayPercent":0,"displayAge":67},{"invoice_status_id":"5","created_at":"2014-09-04 00:00:00","invoice_number":"0029","amount":"966.00","balance":"0.00","invoice_items":[{"product_key":"Iowa","cost":"966.00","qty":"1.00"}],"displayName":"0029","displayTotal":966,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-16 00:00:00","invoice_number":"0030","amount":"91.00","balance":"91.00","invoice_items":[{"product_key":"Arizona","cost":"91.00","qty":"1.00"}],"displayName":"0030","displayTotal":91,"displayBalance":91,"displayPercent":0,"displayAge":17},{"invoice_status_id":"5","created_at":"2014-09-03 00:00:00","invoice_number":"0031","amount":"134.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"134.00","qty":"1.00"}],"displayName":"0031","displayTotal":134,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-08 00:00:00","invoice_number":"0032","amount":"102.00","balance":"102.00","invoice_items":[{"product_key":"Colorado","cost":"102.00","qty":"1.00"}],"displayName":"0032","displayTotal":102,"displayBalance":102,"displayPercent":0,"displayAge":87},{"invoice_status_id":"1","created_at":"2014-09-17 00:00:00","invoice_number":"0033","amount":"80.00","balance":"80.00","invoice_items":[{"product_key":"New York","cost":"80.00","qty":"1.00"}],"displayName":"0033","displayTotal":80,"displayBalance":80,"displayPercent":0,"displayAge":16},{"invoice_status_id":"5","created_at":"2014-07-23 00:00:00","invoice_number":"0034","amount":"951.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"951.00","qty":"1.00"}],"displayName":"0034","displayTotal":951,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"7"}],"displayName":"Johnson & Johnson","displayTotal":2673,"displayBalance":485,"displayPercent":"0.82","displayAge":87},{"name":"American International Group","balance":"0.00","paid_to_date":"94.00","invoices":[{"invoice_status_id":"5","created_at":"2014-08-23 00:00:00","invoice_number":"0035","amount":"94.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"94.00","qty":"1.00"}],"displayName":"0035","displayTotal":94,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"8"}],"displayName":"American International Group","displayTotal":94,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Banco Santander","balance":"0.00","paid_to_date":"137.00","invoices":[{"invoice_status_id":"5","created_at":"2014-08-13 00:00:00","invoice_number":"0036","amount":"137.00","balance":"0.00","invoice_items":[{"product_key":"Kansas","cost":"137.00","qty":"1.00"}],"displayName":"0036","displayTotal":137,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"9"}],"displayName":"Banco Santander","displayTotal":137,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"BHP Billiton","balance":"2584.00","paid_to_date":"284.00","invoices":[{"invoice_status_id":"1","created_at":"2014-06-24 00:00:00","invoice_number":"0037","amount":"122.00","balance":"122.00","invoice_items":[{"product_key":"Alabama","cost":"122.00","qty":"1.00"}],"displayName":"0037","displayTotal":122,"displayBalance":122,"displayPercent":0,"displayAge":101},{"invoice_status_id":"1","created_at":"2014-09-25 00:00:00","invoice_number":"0038","amount":"44.00","balance":"44.00","invoice_items":[{"product_key":"Arizona","cost":"44.00","qty":"1.00"}],"displayName":"0038","displayTotal":44,"displayBalance":44,"displayPercent":0,"displayAge":8},{"invoice_status_id":"1","created_at":"2014-08-13 00:00:00","invoice_number":"0039","amount":"68.00","balance":"68.00","invoice_items":[{"product_key":"Arizona","cost":"68.00","qty":"1.00"}],"displayName":"0039","displayTotal":68,"displayBalance":68,"displayPercent":0,"displayAge":51},{"invoice_status_id":"1","created_at":"2014-07-23 00:00:00","invoice_number":"0040","amount":"23.00","balance":"23.00","invoice_items":[{"product_key":"Delaware","cost":"23.00","qty":"1.00"}],"displayName":"0040","displayTotal":23,"displayBalance":23,"displayPercent":0,"displayAge":72},{"invoice_status_id":"1","created_at":"2014-07-06 00:00:00","invoice_number":"0041","amount":"61.00","balance":"61.00","invoice_items":[{"product_key":"Colorado","cost":"61.00","qty":"1.00"}],"displayName":"0041","displayTotal":61,"displayBalance":61,"displayPercent":0,"displayAge":89},{"invoice_status_id":"1","created_at":"2014-09-05 00:00:00","invoice_number":"0042","amount":"128.00","balance":"128.00","invoice_items":[{"product_key":"Arizona","cost":"128.00","qty":"1.00"}],"displayName":"0042","displayTotal":128,"displayBalance":128,"displayPercent":0,"displayAge":28},{"invoice_status_id":"5","created_at":"2014-07-17 00:00:00","invoice_number":"0043","amount":"130.00","balance":"0.00","invoice_items":[{"product_key":"Iowa","cost":"130.00","qty":"1.00"}],"displayName":"0043","displayTotal":130,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-01 00:00:00","invoice_number":"0044","amount":"139.00","balance":"139.00","invoice_items":[{"product_key":"Arizona","cost":"139.00","qty":"1.00"}],"displayName":"0044","displayTotal":139,"displayBalance":139,"displayPercent":0,"displayAge":94},{"invoice_status_id":"1","created_at":"2014-07-20 00:00:00","invoice_number":"0045","amount":"127.00","balance":"127.00","invoice_items":[{"product_key":"California","cost":"127.00","qty":"1.00"}],"displayName":"0045","displayTotal":127,"displayBalance":127,"displayPercent":0,"displayAge":75},{"invoice_status_id":"1","created_at":"2014-09-15 00:00:00","invoice_number":"0046","amount":"83.00","balance":"83.00","invoice_items":[{"product_key":"Michigan","cost":"83.00","qty":"1.00"}],"displayName":"0046","displayTotal":83,"displayBalance":83,"displayPercent":0,"displayAge":18},{"invoice_status_id":"1","created_at":"2014-07-30 00:00:00","invoice_number":"0047","amount":"62.00","balance":"62.00","invoice_items":[{"product_key":"Florida","cost":"62.00","qty":"1.00"}],"displayName":"0047","displayTotal":62,"displayBalance":62,"displayPercent":0,"displayAge":65},{"invoice_status_id":"1","created_at":"2014-09-16 00:00:00","invoice_number":"0048","amount":"902.00","balance":"902.00","invoice_items":[{"product_key":"New York","cost":"902.00","qty":"1.00"}],"displayName":"0048","displayTotal":902,"displayBalance":902,"displayPercent":0,"displayAge":17},{"invoice_status_id":"1","created_at":"2014-08-07 00:00:00","invoice_number":"0049","amount":"139.00","balance":"139.00","invoice_items":[{"product_key":"Arizona","cost":"139.00","qty":"1.00"}],"displayName":"0049","displayTotal":139,"displayBalance":139,"displayPercent":0,"displayAge":57},{"invoice_status_id":"1","created_at":"2014-07-12 00:00:00","invoice_number":"0050","amount":"124.00","balance":"124.00","invoice_items":[{"product_key":"Arizona","cost":"124.00","qty":"1.00"}],"displayName":"0050","displayTotal":124,"displayBalance":124,"displayPercent":0,"displayAge":83},{"invoice_status_id":"1","created_at":"2014-08-05 00:00:00","invoice_number":"0051","amount":"53.00","balance":"53.00","invoice_items":[{"product_key":"Connecticut","cost":"53.00","qty":"1.00"}],"displayName":"0051","displayTotal":53,"displayBalance":53,"displayPercent":0,"displayAge":59},{"invoice_status_id":"1","created_at":"2014-06-27 00:00:00","invoice_number":"0052","amount":"52.00","balance":"52.00","invoice_items":[{"product_key":"Michigan","cost":"52.00","qty":"1.00"}],"displayName":"0052","displayTotal":52,"displayBalance":52,"displayPercent":0,"displayAge":98},{"invoice_status_id":"1","created_at":"2014-09-04 00:00:00","invoice_number":"0053","amount":"28.00","balance":"28.00","invoice_items":[{"product_key":"New York","cost":"28.00","qty":"1.00"}],"displayName":"0053","displayTotal":28,"displayBalance":28,"displayPercent":0,"displayAge":29},{"invoice_status_id":"1","created_at":"2014-07-28 00:00:00","invoice_number":"0054","amount":"36.00","balance":"36.00","invoice_items":[{"product_key":"Alabama","cost":"36.00","qty":"1.00"}],"displayName":"0054","displayTotal":36,"displayBalance":36,"displayPercent":0,"displayAge":67},{"invoice_status_id":"1","created_at":"2014-08-28 00:00:00","invoice_number":"0055","amount":"111.00","balance":"111.00","invoice_items":[{"product_key":"New York","cost":"111.00","qty":"1.00"}],"displayName":"0055","displayTotal":111,"displayBalance":111,"displayPercent":0,"displayAge":36},{"invoice_status_id":"5","created_at":"2014-08-14 00:00:00","invoice_number":"0056","amount":"43.00","balance":"0.00","invoice_items":[{"product_key":"Delaware","cost":"43.00","qty":"1.00"}],"displayName":"0056","displayTotal":43,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-23 00:00:00","invoice_number":"0057","amount":"111.00","balance":"0.00","invoice_items":[{"product_key":"Idaho","cost":"111.00","qty":"1.00"}],"displayName":"0057","displayTotal":111,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-01 00:00:00","invoice_number":"0058","amount":"40.00","balance":"40.00","invoice_items":[{"product_key":"Massachusetts","cost":"40.00","qty":"1.00"}],"displayName":"0058","displayTotal":40,"displayBalance":40,"displayPercent":0,"displayAge":32},{"invoice_status_id":"1","created_at":"2014-09-21 00:00:00","invoice_number":"0059","amount":"116.00","balance":"116.00","invoice_items":[{"product_key":"Maryland","cost":"116.00","qty":"1.00"}],"displayName":"0059","displayTotal":116,"displayBalance":116,"displayPercent":0,"displayAge":12},{"invoice_status_id":"1","created_at":"2014-07-10 00:00:00","invoice_number":"0060","amount":"101.00","balance":"101.00","invoice_items":[{"product_key":"California","cost":"101.00","qty":"1.00"}],"displayName":"0060","displayTotal":101,"displayBalance":101,"displayPercent":0,"displayAge":85},{"invoice_status_id":"1","created_at":"2014-07-19 00:00:00","invoice_number":"0061","amount":"25.00","balance":"25.00","invoice_items":[{"product_key":"New York","cost":"25.00","qty":"1.00"}],"displayName":"0061","displayTotal":25,"displayBalance":25,"displayPercent":0,"displayAge":76}],"contacts":[{"public_id":"10"}],"displayName":"BHP Billiton","displayTotal":2868,"displayBalance":2584,"displayPercent":"0.10","displayAge":101},{"name":"Pfizer","balance":"0.00","paid_to_date":"119.00","invoices":[{"invoice_status_id":"5","created_at":"2014-08-08 00:00:00","invoice_number":"0062","amount":"119.00","balance":"0.00","invoice_items":[{"product_key":"Alabama","cost":"119.00","qty":"1.00"}],"displayName":"0062","displayTotal":119,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"11"}],"displayName":"Pfizer","displayTotal":119,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Itaú Unibanco Holding","balance":null,"paid_to_date":null,"invoices":[],"contacts":[{"public_id":"12"}],"displayName":"Itaú Unibanco Holding","displayTotal":0,"displayBalance":0,"displayPercent":"NaN","displayAge":null},{"name":"Ford Motor","balance":"42.00","paid_to_date":null,"invoices":[{"invoice_status_id":"1","created_at":"2014-07-21 00:00:00","invoice_number":"0063","amount":"42.00","balance":"42.00","invoice_items":[{"product_key":"California","cost":"42.00","qty":"1.00"}],"displayName":"0063","displayTotal":42,"displayBalance":42,"displayPercent":0,"displayAge":74}],"contacts":[{"public_id":"13"}],"displayName":"Ford Motor","displayTotal":42,"displayBalance":42,"displayPercent":"0.00","displayAge":74},{"name":"BMW Group","balance":"0.00","paid_to_date":"34.00","invoices":[{"invoice_status_id":"5","created_at":"2014-07-17 00:00:00","invoice_number":"0064","amount":"34.00","balance":"0.00","invoice_items":[{"product_key":"Michigan","cost":"34.00","qty":"1.00"}],"displayName":"0064","displayTotal":34,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"14"}],"displayName":"BMW Group","displayTotal":34,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Commonwealth Bank","balance":null,"paid_to_date":null,"invoices":[],"contacts":[{"public_id":"15"}],"displayName":"Commonwealth Bank","displayTotal":0,"displayBalance":0,"displayPercent":"NaN","displayAge":null},{"name":"EDF","balance":"0.00","paid_to_date":"108.00","invoices":[{"invoice_status_id":"5","created_at":"2014-07-03 00:00:00","invoice_number":"0065","amount":"108.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"108.00","qty":"1.00"}],"displayName":"0065","displayTotal":108,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"16"}],"displayName":"EDF","displayTotal":108,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Statoil","balance":"0.00","paid_to_date":"38.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-29 00:00:00","invoice_number":"0066","amount":"38.00","balance":"0.00","invoice_items":[{"product_key":"Delaware","cost":"38.00","qty":"1.00"}],"displayName":"0066","displayTotal":38,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"17"}],"displayName":"Statoil","displayTotal":38,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Google","balance":"0.00","paid_to_date":"5537.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-13 00:00:00","invoice_number":"0067","amount":"11.00","balance":"0.00","invoice_items":[{"product_key":"Connecticut","cost":"11.00","qty":"1.00"}],"displayName":"0067","displayTotal":11,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-02 00:00:00","invoice_number":"0068","amount":"128.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"128.00","qty":"1.00"}],"displayName":"0068","displayTotal":128,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-05 00:00:00","invoice_number":"0069","amount":"959.00","balance":"0.00","invoice_items":[{"product_key":"Louisiana","cost":"959.00","qty":"1.00"}],"displayName":"0069","displayTotal":959,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-13 00:00:00","invoice_number":"0070","amount":"116.00","balance":"0.00","invoice_items":[{"product_key":"Idaho","cost":"116.00","qty":"1.00"}],"displayName":"0070","displayTotal":116,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-04 00:00:00","invoice_number":"0071","amount":"50.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"50.00","qty":"1.00"}],"displayName":"0071","displayTotal":50,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-11 00:00:00","invoice_number":"0072","amount":"23.00","balance":"0.00","invoice_items":[{"product_key":"Maryland","cost":"23.00","qty":"1.00"}],"displayName":"0072","displayTotal":23,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-28 00:00:00","invoice_number":"0073","amount":"125.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"125.00","qty":"1.00"}],"displayName":"0073","displayTotal":125,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-28 00:00:00","invoice_number":"0074","amount":"981.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"981.00","qty":"1.00"}],"displayName":"0074","displayTotal":981,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-12 00:00:00","invoice_number":"0075","amount":"34.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"34.00","qty":"1.00"}],"displayName":"0075","displayTotal":34,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-15 00:00:00","invoice_number":"0076","amount":"24.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"24.00","qty":"1.00"}],"displayName":"0076","displayTotal":24,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-19 00:00:00","invoice_number":"0077","amount":"107.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"107.00","qty":"1.00"}],"displayName":"0077","displayTotal":107,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-21 00:00:00","invoice_number":"0078","amount":"950.00","balance":"0.00","invoice_items":[{"product_key":"Kentucky","cost":"950.00","qty":"1.00"}],"displayName":"0078","displayTotal":950,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-27 00:00:00","invoice_number":"0079","amount":"148.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"148.00","qty":"1.00"}],"displayName":"0079","displayTotal":148,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-22 00:00:00","invoice_number":"0080","amount":"22.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"22.00","qty":"1.00"}],"displayName":"0080","displayTotal":22,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-22 00:00:00","invoice_number":"0081","amount":"105.00","balance":"0.00","invoice_items":[{"product_key":"Alabama","cost":"105.00","qty":"1.00"}],"displayName":"0081","displayTotal":105,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-02 00:00:00","invoice_number":"0082","amount":"19.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"19.00","qty":"1.00"}],"displayName":"0082","displayTotal":19,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-15 00:00:00","invoice_number":"0083","amount":"102.00","balance":"0.00","invoice_items":[{"product_key":"Illinois","cost":"102.00","qty":"1.00"}],"displayName":"0083","displayTotal":102,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-06-27 00:00:00","invoice_number":"0084","amount":"105.00","balance":"0.00","invoice_items":[{"product_key":"Connecticut","cost":"105.00","qty":"1.00"}],"displayName":"0084","displayTotal":105,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-07 00:00:00","invoice_number":"0085","amount":"138.00","balance":"0.00","invoice_items":[{"product_key":"Connecticut","cost":"138.00","qty":"1.00"}],"displayName":"0085","displayTotal":138,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-15 00:00:00","invoice_number":"0086","amount":"86.00","balance":"0.00","invoice_items":[{"product_key":"Louisiana","cost":"86.00","qty":"1.00"}],"displayName":"0086","displayTotal":86,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-14 00:00:00","invoice_number":"0087","amount":"59.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"59.00","qty":"1.00"}],"displayName":"0087","displayTotal":59,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-22 00:00:00","invoice_number":"0088","amount":"129.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"129.00","qty":"1.00"}],"displayName":"0088","displayTotal":129,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-06 00:00:00","invoice_number":"0089","amount":"107.00","balance":"0.00","invoice_items":[{"product_key":"Iowa","cost":"107.00","qty":"1.00"}],"displayName":"0089","displayTotal":107,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-07 00:00:00","invoice_number":"0090","amount":"998.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"998.00","qty":"1.00"}],"displayName":"0090","displayTotal":998,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-17 00:00:00","invoice_number":"0091","amount":"11.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"11.00","qty":"1.00"}],"displayName":"0091","displayTotal":11,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"18"}],"displayName":"Google","displayTotal":5537,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Siemens","balance":"0.00","paid_to_date":"57.00","invoices":[{"invoice_status_id":"5","created_at":"2014-08-16 00:00:00","invoice_number":"0092","amount":"57.00","balance":"0.00","invoice_items":[{"product_key":"Idaho","cost":"57.00","qty":"1.00"}],"displayName":"0092","displayTotal":57,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"19"}],"displayName":"Siemens","displayTotal":57,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Novartis","balance":"0.00","paid_to_date":"32.00","invoices":[{"invoice_status_id":"5","created_at":"2014-08-29 00:00:00","invoice_number":"0093","amount":"32.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"32.00","qty":"1.00"}],"displayName":"0093","displayTotal":32,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"20"}],"displayName":"Novartis","displayTotal":32,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Royal Bank of Canada","balance":null,"paid_to_date":null,"invoices":[],"contacts":[{"public_id":"21"}],"displayName":"Royal Bank of Canada","displayTotal":0,"displayBalance":0,"displayPercent":"NaN","displayAge":null},{"name":"Sumitomo Mitsui Financial","balance":"0.00","paid_to_date":"108.00","invoices":[{"invoice_status_id":"5","created_at":"2014-07-06 00:00:00","invoice_number":"0094","amount":"108.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"108.00","qty":"1.00"}],"displayName":"0094","displayTotal":108,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"22"}],"displayName":"Sumitomo Mitsui Financial","displayTotal":108,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Comcast","balance":"0.00","paid_to_date":"18.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-30 00:00:00","invoice_number":"0095","amount":"18.00","balance":"0.00","invoice_items":[{"product_key":"Alabama","cost":"18.00","qty":"1.00"}],"displayName":"0095","displayTotal":18,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"23"}],"displayName":"Comcast","displayTotal":18,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Sberbank","balance":"466.00","paid_to_date":"127.00","invoices":[{"invoice_status_id":"1","created_at":"2014-07-27 00:00:00","invoice_number":"0096","amount":"135.00","balance":"135.00","invoice_items":[{"product_key":"New York","cost":"135.00","qty":"1.00"}],"displayName":"0096","displayTotal":135,"displayBalance":135,"displayPercent":0,"displayAge":68},{"invoice_status_id":"1","created_at":"2014-09-29 00:00:00","invoice_number":"0097","amount":"133.00","balance":"133.00","invoice_items":[{"product_key":"New York","cost":"133.00","qty":"1.00"}],"displayName":"0097","displayTotal":133,"displayBalance":133,"displayPercent":0,"displayAge":4},{"invoice_status_id":"1","created_at":"2014-09-24 00:00:00","invoice_number":"0098","amount":"118.00","balance":"118.00","invoice_items":[{"product_key":"Colorado","cost":"118.00","qty":"1.00"}],"displayName":"0098","displayTotal":118,"displayBalance":118,"displayPercent":0,"displayAge":9},{"invoice_status_id":"5","created_at":"2014-09-15 00:00:00","invoice_number":"0099","amount":"127.00","balance":"0.00","invoice_items":[{"product_key":"Michigan","cost":"127.00","qty":"1.00"}],"displayName":"0099","displayTotal":127,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-08-26 00:00:00","invoice_number":"0100","amount":"80.00","balance":"80.00","invoice_items":[{"product_key":"Maryland","cost":"80.00","qty":"1.00"}],"displayName":"0100","displayTotal":80,"displayBalance":80,"displayPercent":0,"displayAge":38}],"contacts":[{"public_id":"24"}],"displayName":"Sberbank","displayTotal":593,"displayBalance":466,"displayPercent":"0.21","displayAge":68},{"name":"Goldman Sachs Group","balance":"0.00","paid_to_date":"123.00","invoices":[{"invoice_status_id":"5","created_at":"2014-07-07 00:00:00","invoice_number":"0101","amount":"123.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"123.00","qty":"1.00"}],"displayName":"0101","displayTotal":123,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"25"}],"displayName":"Goldman Sachs Group","displayTotal":123,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Westpac Banking Group","balance":"0.00","paid_to_date":"116.00","invoices":[{"invoice_status_id":"5","created_at":"2014-08-05 00:00:00","invoice_number":"0102","amount":"116.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"116.00","qty":"1.00"}],"displayName":"0102","displayTotal":116,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"26"}],"displayName":"Westpac Banking Group","displayTotal":116,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Nippon Telegraph & Tel","balance":"0.00","paid_to_date":"36.00","invoices":[{"invoice_status_id":"5","created_at":"2014-07-24 00:00:00","invoice_number":"0103","amount":"36.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"36.00","qty":"1.00"}],"displayName":"0103","displayTotal":36,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"27"}],"displayName":"Nippon Telegraph & Tel","displayTotal":36,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Ping An Insurance Group","balance":null,"paid_to_date":null,"invoices":[],"contacts":[{"public_id":"28"}],"displayName":"Ping An Insurance Group","displayTotal":0,"displayBalance":0,"displayPercent":"NaN","displayAge":null},{"name":"Banco Bradesco","balance":"1175.00","paid_to_date":"13.00","invoices":[{"invoice_status_id":"1","created_at":"2014-08-03 00:00:00","invoice_number":"0104","amount":"101.00","balance":"101.00","invoice_items":[{"product_key":"Arizona","cost":"101.00","qty":"1.00"}],"displayName":"0104","displayTotal":101,"displayBalance":101,"displayPercent":0,"displayAge":61},{"invoice_status_id":"1","created_at":"2014-07-06 00:00:00","invoice_number":"0105","amount":"132.00","balance":"132.00","invoice_items":[{"product_key":"Connecticut","cost":"132.00","qty":"1.00"}],"displayName":"0105","displayTotal":132,"displayBalance":132,"displayPercent":0,"displayAge":89},{"invoice_status_id":"5","created_at":"2014-09-13 00:00:00","invoice_number":"0106","amount":"13.00","balance":"0.00","invoice_items":[{"product_key":"Illinois","cost":"13.00","qty":"1.00"}],"displayName":"0106","displayTotal":13,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-08 00:00:00","invoice_number":"0107","amount":"942.00","balance":"942.00","invoice_items":[{"product_key":"Arizona","cost":"942.00","qty":"1.00"}],"displayName":"0107","displayTotal":942,"displayBalance":942,"displayPercent":0,"displayAge":87}],"contacts":[{"public_id":"29"}],"displayName":"Banco Bradesco","displayTotal":1188,"displayBalance":1175,"displayPercent":"0.01","displayAge":89},{"name":"Anheuser-Busch InBev","balance":"0.00","paid_to_date":"38.00","invoices":[{"invoice_status_id":"5","created_at":"2014-07-20 00:00:00","invoice_number":"0108","amount":"38.00","balance":"0.00","invoice_items":[{"product_key":"Alabama","cost":"38.00","qty":"1.00"}],"displayName":"0108","displayTotal":38,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"30"}],"displayName":"Anheuser-Busch InBev","displayTotal":38,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Bank of Communications","balance":"0.00","paid_to_date":"145.00","invoices":[{"invoice_status_id":"5","created_at":"2014-08-27 00:00:00","invoice_number":"0109","amount":"145.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"145.00","qty":"1.00"}],"displayName":"0109","displayTotal":145,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"31"}],"displayName":"Bank of Communications","displayTotal":145,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"China Life Insurance","balance":"0.00","paid_to_date":"93.00","invoices":[{"invoice_status_id":"5","created_at":"2014-06-27 00:00:00","invoice_number":"0110","amount":"93.00","balance":"0.00","invoice_items":[{"product_key":"Michigan","cost":"93.00","qty":"1.00"}],"displayName":"0110","displayTotal":93,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"32"}],"displayName":"China Life Insurance","displayTotal":93,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"General Motors","balance":"0.00","paid_to_date":"94.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-21 00:00:00","invoice_number":"0111","amount":"94.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"94.00","qty":"1.00"}],"displayName":"0111","displayTotal":94,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"33"}],"displayName":"General Motors","displayTotal":94,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Telefónica","balance":"41.00","paid_to_date":null,"invoices":[{"invoice_status_id":"1","created_at":"2014-07-10 00:00:00","invoice_number":"0112","amount":"41.00","balance":"41.00","invoice_items":[{"product_key":"California","cost":"41.00","qty":"1.00"}],"displayName":"0112","displayTotal":41,"displayBalance":41,"displayPercent":0,"displayAge":85}],"contacts":[{"public_id":"34"}],"displayName":"Telefónica","displayTotal":41,"displayBalance":41,"displayPercent":"0.00","displayAge":85},{"name":"MetLife","balance":"0.00","paid_to_date":"3253.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-25 00:00:00","invoice_number":"0113","amount":"43.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"43.00","qty":"1.00"}],"displayName":"0113","displayTotal":43,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-03 00:00:00","invoice_number":"0114","amount":"980.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"980.00","qty":"1.00"}],"displayName":"0114","displayTotal":980,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-11 00:00:00","invoice_number":"0115","amount":"903.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"903.00","qty":"1.00"}],"displayName":"0115","displayTotal":903,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-18 00:00:00","invoice_number":"0116","amount":"44.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"44.00","qty":"1.00"}],"displayName":"0116","displayTotal":44,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-30 00:00:00","invoice_number":"0117","amount":"17.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"17.00","qty":"1.00"}],"displayName":"0117","displayTotal":17,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-17 00:00:00","invoice_number":"0118","amount":"133.00","balance":"0.00","invoice_items":[{"product_key":"Michigan","cost":"133.00","qty":"1.00"}],"displayName":"0118","displayTotal":133,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-13 00:00:00","invoice_number":"0119","amount":"25.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"25.00","qty":"1.00"}],"displayName":"0119","displayTotal":25,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-12 00:00:00","invoice_number":"0120","amount":"982.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"982.00","qty":"1.00"}],"displayName":"0120","displayTotal":982,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-29 00:00:00","invoice_number":"0121","amount":"57.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"57.00","qty":"1.00"}],"displayName":"0121","displayTotal":57,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-16 00:00:00","invoice_number":"0122","amount":"69.00","balance":"0.00","invoice_items":[{"product_key":"Connecticut","cost":"69.00","qty":"1.00"}],"displayName":"0122","displayTotal":69,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"35"}],"displayName":"MetLife","displayTotal":3253,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Honda Motor","balance":"14.00","paid_to_date":null,"invoices":[{"invoice_status_id":"1","created_at":"2014-09-30 00:00:00","invoice_number":"0123","amount":"14.00","balance":"14.00","invoice_items":[{"product_key":"California","cost":"14.00","qty":"1.00"}],"displayName":"0123","displayTotal":14,"displayBalance":14,"displayPercent":0,"displayAge":3}],"contacts":[{"public_id":"36"}],"displayName":"Honda Motor","displayTotal":14,"displayBalance":14,"displayPercent":"0.00","displayAge":3},{"name":"Enel","balance":"0.00","paid_to_date":"105.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-19 00:00:00","invoice_number":"0124","amount":"105.00","balance":"0.00","invoice_items":[{"product_key":"Delaware","cost":"105.00","qty":"1.00"}],"displayName":"0124","displayTotal":105,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"37"}],"displayName":"Enel","displayTotal":105,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"BASF","balance":null,"paid_to_date":null,"invoices":[],"contacts":[{"public_id":"38"}],"displayName":"BASF","displayTotal":0,"displayBalance":0,"displayPercent":"NaN","displayAge":null},{"name":"Softbank","balance":"68.00","paid_to_date":null,"invoices":[{"invoice_status_id":"1","created_at":"2014-09-28 00:00:00","invoice_number":"0125","amount":"68.00","balance":"68.00","invoice_items":[{"product_key":"Iowa","cost":"68.00","qty":"1.00"}],"displayName":"0125","displayTotal":68,"displayBalance":68,"displayPercent":0,"displayAge":5}],"contacts":[{"public_id":"39"}],"displayName":"Softbank","displayTotal":68,"displayBalance":68,"displayPercent":"0.00","displayAge":5},{"name":"National Australia Bank","balance":"573.00","paid_to_date":"201.00","invoices":[{"invoice_status_id":"1","created_at":"2014-08-17 00:00:00","invoice_number":"0126","amount":"98.00","balance":"98.00","invoice_items":[{"product_key":"Arizona","cost":"98.00","qty":"1.00"}],"displayName":"0126","displayTotal":98,"displayBalance":98,"displayPercent":0,"displayAge":47},{"invoice_status_id":"1","created_at":"2014-09-16 00:00:00","invoice_number":"0127","amount":"68.00","balance":"68.00","invoice_items":[{"product_key":"Maine","cost":"68.00","qty":"1.00"}],"displayName":"0127","displayTotal":68,"displayBalance":68,"displayPercent":0,"displayAge":17},{"invoice_status_id":"1","created_at":"2014-09-30 00:00:00","invoice_number":"0128","amount":"120.00","balance":"120.00","invoice_items":[{"product_key":"New York","cost":"120.00","qty":"1.00"}],"displayName":"0128","displayTotal":120,"displayBalance":120,"displayPercent":0,"displayAge":3},{"invoice_status_id":"5","created_at":"2014-08-08 00:00:00","invoice_number":"0129","amount":"105.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"105.00","qty":"1.00"}],"displayName":"0129","displayTotal":105,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-16 00:00:00","invoice_number":"0130","amount":"117.00","balance":"117.00","invoice_items":[{"product_key":"California","cost":"117.00","qty":"1.00"}],"displayName":"0130","displayTotal":117,"displayBalance":117,"displayPercent":0,"displayAge":17},{"invoice_status_id":"1","created_at":"2014-07-08 00:00:00","invoice_number":"0131","amount":"32.00","balance":"32.00","invoice_items":[{"product_key":"Colorado","cost":"32.00","qty":"1.00"}],"displayName":"0131","displayTotal":32,"displayBalance":32,"displayPercent":0,"displayAge":87},{"invoice_status_id":"1","created_at":"2014-07-05 00:00:00","invoice_number":"0132","amount":"35.00","balance":"35.00","invoice_items":[{"product_key":"Arizona","cost":"35.00","qty":"1.00"}],"displayName":"0132","displayTotal":35,"displayBalance":35,"displayPercent":0,"displayAge":90},{"invoice_status_id":"5","created_at":"2014-07-10 00:00:00","invoice_number":"0133","amount":"14.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"14.00","qty":"1.00"}],"displayName":"0133","displayTotal":14,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-12 00:00:00","invoice_number":"0134","amount":"82.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"82.00","qty":"1.00"}],"displayName":"0134","displayTotal":82,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-20 00:00:00","invoice_number":"0135","amount":"103.00","balance":"103.00","invoice_items":[{"product_key":"Arizona","cost":"103.00","qty":"1.00"}],"displayName":"0135","displayTotal":103,"displayBalance":103,"displayPercent":0,"displayAge":75}],"contacts":[{"public_id":"40"}],"displayName":"National Australia Bank","displayTotal":774,"displayBalance":573,"displayPercent":"0.26","displayAge":90},{"name":"ANZ","balance":"49.00","paid_to_date":null,"invoices":[{"invoice_status_id":"1","created_at":"2014-06-26 00:00:00","invoice_number":"0136","amount":"49.00","balance":"49.00","invoice_items":[{"product_key":"Massachusetts","cost":"49.00","qty":"1.00"}],"displayName":"0136","displayTotal":49,"displayBalance":49,"displayPercent":0,"displayAge":99}],"contacts":[{"public_id":"41"}],"displayName":"ANZ","displayTotal":49,"displayBalance":49,"displayPercent":"0.00","displayAge":99},{"name":"ConocoPhillips","balance":"0.00","paid_to_date":"20.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-07 00:00:00","invoice_number":"0137","amount":"20.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"20.00","qty":"1.00"}],"displayName":"0137","displayTotal":20,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"42"}],"displayName":"ConocoPhillips","displayTotal":20,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"TD Bank Group","balance":"756.00","paid_to_date":"56.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-13 00:00:00","invoice_number":"0138","amount":"56.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"56.00","qty":"1.00"}],"displayName":"0138","displayTotal":56,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-26 00:00:00","invoice_number":"0139","amount":"147.00","balance":"147.00","invoice_items":[{"product_key":"Iowa","cost":"147.00","qty":"1.00"}],"displayName":"0139","displayTotal":147,"displayBalance":147,"displayPercent":0,"displayAge":69},{"invoice_status_id":"1","created_at":"2014-09-06 00:00:00","invoice_number":"0140","amount":"47.00","balance":"47.00","invoice_items":[{"product_key":"California","cost":"47.00","qty":"1.00"}],"displayName":"0140","displayTotal":47,"displayBalance":47,"displayPercent":0,"displayAge":27},{"invoice_status_id":"1","created_at":"2014-08-19 00:00:00","invoice_number":"0141","amount":"147.00","balance":"147.00","invoice_items":[{"product_key":"Colorado","cost":"147.00","qty":"1.00"}],"displayName":"0141","displayTotal":147,"displayBalance":147,"displayPercent":0,"displayAge":45},{"invoice_status_id":"1","created_at":"2014-09-27 00:00:00","invoice_number":"0142","amount":"113.00","balance":"113.00","invoice_items":[{"product_key":"Colorado","cost":"113.00","qty":"1.00"}],"displayName":"0142","displayTotal":113,"displayBalance":113,"displayPercent":0,"displayAge":6},{"invoice_status_id":"1","created_at":"2014-07-01 00:00:00","invoice_number":"0143","amount":"48.00","balance":"48.00","invoice_items":[{"product_key":"Indiana","cost":"48.00","qty":"1.00"}],"displayName":"0143","displayTotal":48,"displayBalance":48,"displayPercent":0,"displayAge":94},{"invoice_status_id":"1","created_at":"2014-08-18 00:00:00","invoice_number":"0144","amount":"137.00","balance":"137.00","invoice_items":[{"product_key":"Arizona","cost":"137.00","qty":"1.00"}],"displayName":"0144","displayTotal":137,"displayBalance":137,"displayPercent":0,"displayAge":46},{"invoice_status_id":"1","created_at":"2014-09-25 00:00:00","invoice_number":"0145","amount":"117.00","balance":"117.00","invoice_items":[{"product_key":"New York","cost":"117.00","qty":"1.00"}],"displayName":"0145","displayTotal":117,"displayBalance":117,"displayPercent":0,"displayAge":8}],"contacts":[{"public_id":"43"}],"displayName":"TD Bank Group","displayTotal":812,"displayBalance":756,"displayPercent":"0.07","displayAge":94},{"name":"Intel","balance":"0.00","paid_to_date":"71.00","invoices":[{"invoice_status_id":"5","created_at":"2014-07-24 00:00:00","invoice_number":"0146","amount":"71.00","balance":"0.00","invoice_items":[{"product_key":"Georgia","cost":"71.00","qty":"1.00"}],"displayName":"0146","displayTotal":71,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"44"}],"displayName":"Intel","displayTotal":71,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"UBS","balance":"0.00","paid_to_date":"976.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-06 00:00:00","invoice_number":"0147","amount":"976.00","balance":"0.00","invoice_items":[{"product_key":"Illinois","cost":"976.00","qty":"1.00"}],"displayName":"0147","displayTotal":976,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"45"}],"displayName":"UBS","displayTotal":976,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Hewlett-Packard","balance":"0.00","paid_to_date":"501.00","invoices":[{"invoice_status_id":"5","created_at":"2014-07-16 00:00:00","invoice_number":"0148","amount":"82.00","balance":"0.00","invoice_items":[{"product_key":"Florida","cost":"82.00","qty":"1.00"}],"displayName":"0148","displayTotal":82,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-22 00:00:00","invoice_number":"0149","amount":"134.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"134.00","qty":"1.00"}],"displayName":"0149","displayTotal":134,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-15 00:00:00","invoice_number":"0150","amount":"147.00","balance":"0.00","invoice_items":[{"product_key":"Illinois","cost":"147.00","qty":"1.00"}],"displayName":"0150","displayTotal":147,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-31 00:00:00","invoice_number":"0151","amount":"16.00","balance":"0.00","invoice_items":[{"product_key":"Kansas","cost":"16.00","qty":"1.00"}],"displayName":"0151","displayTotal":16,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-17 00:00:00","invoice_number":"0152","amount":"14.00","balance":"0.00","invoice_items":[{"product_key":"Indiana","cost":"14.00","qty":"1.00"}],"displayName":"0152","displayTotal":14,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-12 00:00:00","invoice_number":"0153","amount":"61.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"61.00","qty":"1.00"}],"displayName":"0153","displayTotal":61,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-17 00:00:00","invoice_number":"0154","amount":"47.00","balance":"0.00","invoice_items":[{"product_key":"Indiana","cost":"47.00","qty":"1.00"}],"displayName":"0154","displayTotal":47,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"46"}],"displayName":"Hewlett-Packard","displayTotal":501,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Coca-Cola","balance":"289.00","paid_to_date":"82.00","invoices":[{"invoice_status_id":"1","created_at":"2014-09-10 00:00:00","invoice_number":"0155","amount":"137.00","balance":"137.00","invoice_items":[{"product_key":"California","cost":"137.00","qty":"1.00"}],"displayName":"0155","displayTotal":137,"displayBalance":137,"displayPercent":0,"displayAge":23},{"invoice_status_id":"1","created_at":"2014-07-10 00:00:00","invoice_number":"0156","amount":"76.00","balance":"76.00","invoice_items":[{"product_key":"Massachusetts","cost":"76.00","qty":"1.00"}],"displayName":"0156","displayTotal":76,"displayBalance":76,"displayPercent":0,"displayAge":85},{"invoice_status_id":"5","created_at":"2014-07-26 00:00:00","invoice_number":"0157","amount":"82.00","balance":"0.00","invoice_items":[{"product_key":"Maine","cost":"82.00","qty":"1.00"}],"displayName":"0157","displayTotal":82,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-29 00:00:00","invoice_number":"0158","amount":"76.00","balance":"76.00","invoice_items":[{"product_key":"New York","cost":"76.00","qty":"1.00"}],"displayName":"0158","displayTotal":76,"displayBalance":76,"displayPercent":0,"displayAge":4}],"contacts":[{"public_id":"47"}],"displayName":"Coca-Cola","displayTotal":371,"displayBalance":289,"displayPercent":"0.22","displayAge":85},{"name":"Cisco Systems","balance":"111.00","paid_to_date":null,"invoices":[{"invoice_status_id":"1","created_at":"2014-08-20 00:00:00","invoice_number":"0159","amount":"111.00","balance":"111.00","invoice_items":[{"product_key":"Arizona","cost":"111.00","qty":"1.00"}],"displayName":"0159","displayTotal":111,"displayBalance":111,"displayPercent":0,"displayAge":44}],"contacts":[{"public_id":"48"}],"displayName":"Cisco Systems","displayTotal":111,"displayBalance":111,"displayPercent":"0.00","displayAge":44},{"name":"UnitedHealth Group","balance":"0.00","paid_to_date":"27.00","invoices":[{"invoice_status_id":"5","created_at":"2014-07-14 00:00:00","invoice_number":"0160","amount":"27.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"27.00","qty":"1.00"}],"displayName":"0160","displayTotal":27,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"49"}],"displayName":"UnitedHealth Group","displayTotal":27,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Boeing","balance":"47.00","paid_to_date":null,"invoices":[{"invoice_status_id":"1","created_at":"2014-07-17 00:00:00","invoice_number":"0161","amount":"47.00","balance":"47.00","invoice_items":[{"product_key":"Kansas","cost":"47.00","qty":"1.00"}],"displayName":"0161","displayTotal":47,"displayBalance":47,"displayPercent":0,"displayAge":78}],"contacts":[{"public_id":"50"}],"displayName":"Boeing","displayTotal":47,"displayBalance":47,"displayPercent":"0.00","displayAge":78},{"name":"Zurich Insurance Group","balance":"1134.00","paid_to_date":"172.00","invoices":[{"invoice_status_id":"1","created_at":"2014-08-06 00:00:00","invoice_number":"0162","amount":"31.00","balance":"31.00","invoice_items":[{"product_key":"Indiana","cost":"31.00","qty":"1.00"}],"displayName":"0162","displayTotal":31,"displayBalance":31,"displayPercent":0,"displayAge":58},{"invoice_status_id":"1","created_at":"2014-08-06 00:00:00","invoice_number":"0163","amount":"78.00","balance":"78.00","invoice_items":[{"product_key":"California","cost":"78.00","qty":"1.00"}],"displayName":"0163","displayTotal":78,"displayBalance":78,"displayPercent":0,"displayAge":58},{"invoice_status_id":"5","created_at":"2014-09-24 00:00:00","invoice_number":"0164","amount":"118.00","balance":"0.00","invoice_items":[{"product_key":"Florida","cost":"118.00","qty":"1.00"}],"displayName":"0164","displayTotal":118,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-27 00:00:00","invoice_number":"0165","amount":"21.00","balance":"21.00","invoice_items":[{"product_key":"Colorado","cost":"21.00","qty":"1.00"}],"displayName":"0165","displayTotal":21,"displayBalance":21,"displayPercent":0,"displayAge":68},{"invoice_status_id":"5","created_at":"2014-07-30 00:00:00","invoice_number":"0166","amount":"54.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"54.00","qty":"1.00"}],"displayName":"0166","displayTotal":54,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-03 00:00:00","invoice_number":"0167","amount":"63.00","balance":"63.00","invoice_items":[{"product_key":"Arizona","cost":"63.00","qty":"1.00"}],"displayName":"0167","displayTotal":63,"displayBalance":63,"displayPercent":0,"displayAge":30},{"invoice_status_id":"1","created_at":"2014-06-26 00:00:00","invoice_number":"0168","amount":"941.00","balance":"941.00","invoice_items":[{"product_key":"Louisiana","cost":"941.00","qty":"1.00"}],"displayName":"0168","displayTotal":941,"displayBalance":941,"displayPercent":0,"displayAge":99}],"contacts":[{"public_id":"51"}],"displayName":"Zurich Insurance Group","displayTotal":1306,"displayBalance":1134,"displayPercent":"0.13","displayAge":99},{"name":"Hyundai Motor","balance":"0.00","paid_to_date":"1643.00","invoices":[{"invoice_status_id":"5","created_at":"2014-08-08 00:00:00","invoice_number":"0169","amount":"69.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"69.00","qty":"1.00"}],"displayName":"0169","displayTotal":69,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-06-24 00:00:00","invoice_number":"0170","amount":"31.00","balance":"0.00","invoice_items":[{"product_key":"Idaho","cost":"31.00","qty":"1.00"}],"displayName":"0170","displayTotal":31,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-30 00:00:00","invoice_number":"0171","amount":"102.00","balance":"0.00","invoice_items":[{"product_key":"Maryland","cost":"102.00","qty":"1.00"}],"displayName":"0171","displayTotal":102,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-24 00:00:00","invoice_number":"0172","amount":"101.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"101.00","qty":"1.00"}],"displayName":"0172","displayTotal":101,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-24 00:00:00","invoice_number":"0173","amount":"971.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"971.00","qty":"1.00"}],"displayName":"0173","displayTotal":971,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-16 00:00:00","invoice_number":"0174","amount":"34.00","balance":"0.00","invoice_items":[{"product_key":"Kentucky","cost":"34.00","qty":"1.00"}],"displayName":"0174","displayTotal":34,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-15 00:00:00","invoice_number":"0175","amount":"71.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"71.00","qty":"1.00"}],"displayName":"0175","displayTotal":71,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-03 00:00:00","invoice_number":"0176","amount":"106.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"106.00","qty":"1.00"}],"displayName":"0176","displayTotal":106,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-21 00:00:00","invoice_number":"0177","amount":"134.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"134.00","qty":"1.00"}],"displayName":"0177","displayTotal":134,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-04 00:00:00","invoice_number":"0178","amount":"24.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"24.00","qty":"1.00"}],"displayName":"0178","displayTotal":24,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"52"}],"displayName":"Hyundai Motor","displayTotal":1643,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Sanofi","balance":"0.00","paid_to_date":"20.00","invoices":[{"invoice_status_id":"5","created_at":"2014-07-15 00:00:00","invoice_number":"0179","amount":"20.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"20.00","qty":"1.00"}],"displayName":"0179","displayTotal":20,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"53"}],"displayName":"Sanofi","displayTotal":20,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Credit Agricole","balance":"0.00","paid_to_date":"124.00","invoices":[{"invoice_status_id":"5","created_at":"2014-09-30 00:00:00","invoice_number":"0180","amount":"124.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"124.00","qty":"1.00"}],"displayName":"0180","displayTotal":124,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"54"}],"displayName":"Credit Agricole","displayTotal":124,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"United Technologies","balance":"0.00","paid_to_date":"2598.00","invoices":[{"invoice_status_id":"5","created_at":"2014-06-28 00:00:00","invoice_number":"0181","amount":"33.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"33.00","qty":"1.00"}],"displayName":"0181","displayTotal":33,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-23 00:00:00","invoice_number":"0182","amount":"114.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"114.00","qty":"1.00"}],"displayName":"0182","displayTotal":114,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-16 00:00:00","invoice_number":"0183","amount":"938.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"938.00","qty":"1.00"}],"displayName":"0183","displayTotal":938,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-15 00:00:00","invoice_number":"0184","amount":"101.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"101.00","qty":"1.00"}],"displayName":"0184","displayTotal":101,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-03 00:00:00","invoice_number":"0185","amount":"87.00","balance":"0.00","invoice_items":[{"product_key":"Indiana","cost":"87.00","qty":"1.00"}],"displayName":"0185","displayTotal":87,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-20 00:00:00","invoice_number":"0186","amount":"58.00","balance":"0.00","invoice_items":[{"product_key":"Iowa","cost":"58.00","qty":"1.00"}],"displayName":"0186","displayTotal":58,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-24 00:00:00","invoice_number":"0187","amount":"961.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"961.00","qty":"1.00"}],"displayName":"0187","displayTotal":961,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-30 00:00:00","invoice_number":"0188","amount":"132.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"132.00","qty":"1.00"}],"displayName":"0188","displayTotal":132,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-13 00:00:00","invoice_number":"0189","amount":"60.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"60.00","qty":"1.00"}],"displayName":"0189","displayTotal":60,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-30 00:00:00","invoice_number":"0190","amount":"114.00","balance":"0.00","invoice_items":[{"product_key":"Alabama","cost":"114.00","qty":"1.00"}],"displayName":"0190","displayTotal":114,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"55"}],"displayName":"United Technologies","displayTotal":2598,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Roche Holding","balance":null,"paid_to_date":null,"invoices":[],"contacts":[{"public_id":"56"}],"displayName":"Roche Holding","displayTotal":0,"displayBalance":0,"displayPercent":"NaN","displayAge":null},{"name":"Munich Re","balance":"93.00","paid_to_date":null,"invoices":[{"invoice_status_id":"1","created_at":"2014-07-13 00:00:00","invoice_number":"0191","amount":"93.00","balance":"93.00","invoice_items":[{"product_key":"Kentucky","cost":"93.00","qty":"1.00"}],"displayName":"0191","displayTotal":93,"displayBalance":93,"displayPercent":0,"displayAge":82}],"contacts":[{"public_id":"57"}],"displayName":"Munich Re","displayTotal":93,"displayBalance":93,"displayPercent":"0.00","displayAge":82},{"name":"PepsiCo","balance":"0.00","paid_to_date":"41.00","invoices":[{"invoice_status_id":"5","created_at":"2014-10-01 00:00:00","invoice_number":"0192","amount":"41.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"41.00","qty":"1.00"}],"displayName":"0192","displayTotal":41,"displayBalance":0,"displayPercent":1,"displayAge":0}],"contacts":[{"public_id":"58"}],"displayName":"PepsiCo","displayTotal":41,"displayBalance":0,"displayPercent":"1.00","displayAge":0},{"name":"Oracle","balance":"91.00","paid_to_date":null,"invoices":[{"invoice_status_id":"1","created_at":"2014-09-19 00:00:00","invoice_number":"0193","amount":"91.00","balance":"91.00","invoice_items":[{"product_key":"Iowa","cost":"91.00","qty":"1.00"}],"displayName":"0193","displayTotal":91,"displayBalance":91,"displayPercent":0,"displayAge":14}],"contacts":[{"public_id":"59"}],"displayName":"Oracle","displayTotal":91,"displayBalance":91,"displayPercent":"0.00","displayAge":14},{"name":"Bank of Nova Scotia","balance":null,"paid_to_date":null,"invoices":[],"contacts":[{"public_id":"60"}],"displayName":"Bank of Nova Scotia","displayTotal":0,"displayBalance":0,"displayPercent":"NaN","displayAge":null}], - "invoices":[{"invoice_status_id":"5","created_at":"2014-09-18 00:00:00","invoice_number":"0001","amount":"13.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"13.00","qty":"1.00"}],"displayName":"0001","displayTotal":13,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-06-29 00:00:00","invoice_number":"0002","amount":"85.00","balance":"0.00","invoice_items":[{"product_key":"Kansas","cost":"85.00","qty":"1.00"}],"displayName":"0002","displayTotal":85,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-11 00:00:00","invoice_number":"0003","amount":"142.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"142.00","qty":"1.00"}],"displayName":"0003","displayTotal":142,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-19 00:00:00","invoice_number":"0004","amount":"936.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"936.00","qty":"1.00"}],"displayName":"0004","displayTotal":936,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-19 00:00:00","invoice_number":"0005","amount":"74.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"74.00","qty":"1.00"}],"displayName":"0005","displayTotal":74,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-25 00:00:00","invoice_number":"0006","amount":"101.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"101.00","qty":"1.00"}],"displayName":"0006","displayTotal":101,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-21 00:00:00","invoice_number":"0007","amount":"116.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"116.00","qty":"1.00"}],"displayName":"0007","displayTotal":116,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-17 00:00:00","invoice_number":"0008","amount":"42.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"42.00","qty":"1.00"}],"displayName":"0008","displayTotal":42,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-24 00:00:00","invoice_number":"0009","amount":"66.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"66.00","qty":"1.00"}],"displayName":"0009","displayTotal":66,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-21 00:00:00","invoice_number":"0010","amount":"40.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"40.00","qty":"1.00"}],"displayName":"0010","displayTotal":40,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-25 00:00:00","invoice_number":"0011","amount":"99.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"99.00","qty":"1.00"}],"displayName":"0011","displayTotal":99,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-26 00:00:00","invoice_number":"0012","amount":"106.00","balance":"0.00","invoice_items":[{"product_key":"Louisiana","cost":"106.00","qty":"1.00"}],"displayName":"0012","displayTotal":106,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-06-29 00:00:00","invoice_number":"0013","amount":"18.00","balance":"0.00","invoice_items":[{"product_key":"Kansas","cost":"18.00","qty":"1.00"}],"displayName":"0013","displayTotal":18,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-04 00:00:00","invoice_number":"0014","amount":"70.00","balance":"0.00","invoice_items":[{"product_key":"Connecticut","cost":"70.00","qty":"1.00"}],"displayName":"0014","displayTotal":70,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-08 00:00:00","invoice_number":"0015","amount":"59.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"59.00","qty":"1.00"}],"displayName":"0015","displayTotal":59,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-25 00:00:00","invoice_number":"0016","amount":"18.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"18.00","qty":"1.00"}],"displayName":"0016","displayTotal":18,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-04 00:00:00","invoice_number":"0017","amount":"61.00","balance":"0.00","invoice_items":[{"product_key":"Maine","cost":"61.00","qty":"1.00"}],"displayName":"0017","displayTotal":61,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-16 00:00:00","invoice_number":"0018","amount":"65.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"65.00","qty":"1.00"}],"displayName":"0018","displayTotal":65,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-24 00:00:00","invoice_number":"0019","amount":"39.00","balance":"0.00","invoice_items":[{"product_key":"Kansas","cost":"39.00","qty":"1.00"}],"displayName":"0019","displayTotal":39,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-31 00:00:00","invoice_number":"0020","amount":"72.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"72.00","qty":"1.00"}],"displayName":"0020","displayTotal":72,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-12 00:00:00","invoice_number":"0021","amount":"48.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"48.00","qty":"1.00"}],"displayName":"0021","displayTotal":48,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-24 00:00:00","invoice_number":"0022","amount":"90.00","balance":"0.00","invoice_items":[{"product_key":"Alabama","cost":"90.00","qty":"1.00"}],"displayName":"0022","displayTotal":90,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-31 00:00:00","invoice_number":"0023","amount":"70.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"70.00","qty":"1.00"}],"displayName":"0023","displayTotal":70,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-07 00:00:00","invoice_number":"0024","amount":"43.00","balance":"0.00","invoice_items":[{"product_key":"Illinois","cost":"43.00","qty":"1.00"}],"displayName":"0024","displayTotal":43,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-06 00:00:00","invoice_number":"0025","amount":"137.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"137.00","qty":"1.00"}],"displayName":"0025","displayTotal":137,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-30 00:00:00","invoice_number":"0026","amount":"92.00","balance":"92.00","invoice_items":[{"product_key":"Iowa","cost":"92.00","qty":"1.00"}],"displayName":"0026","displayTotal":92,"displayBalance":92,"displayPercent":0,"displayAge":3},{"invoice_status_id":"1","created_at":"2014-08-11 00:00:00","invoice_number":"0027","amount":"95.00","balance":"95.00","invoice_items":[{"product_key":"Arizona","cost":"95.00","qty":"1.00"}],"displayName":"0027","displayTotal":95,"displayBalance":95,"displayPercent":0,"displayAge":53},{"invoice_status_id":"1","created_at":"2014-07-28 00:00:00","invoice_number":"0028","amount":"25.00","balance":"25.00","invoice_items":[{"product_key":"Massachusetts","cost":"25.00","qty":"1.00"}],"displayName":"0028","displayTotal":25,"displayBalance":25,"displayPercent":0,"displayAge":67},{"invoice_status_id":"5","created_at":"2014-09-04 00:00:00","invoice_number":"0029","amount":"966.00","balance":"0.00","invoice_items":[{"product_key":"Iowa","cost":"966.00","qty":"1.00"}],"displayName":"0029","displayTotal":966,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-16 00:00:00","invoice_number":"0030","amount":"91.00","balance":"91.00","invoice_items":[{"product_key":"Arizona","cost":"91.00","qty":"1.00"}],"displayName":"0030","displayTotal":91,"displayBalance":91,"displayPercent":0,"displayAge":17},{"invoice_status_id":"5","created_at":"2014-09-03 00:00:00","invoice_number":"0031","amount":"134.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"134.00","qty":"1.00"}],"displayName":"0031","displayTotal":134,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-08 00:00:00","invoice_number":"0032","amount":"102.00","balance":"102.00","invoice_items":[{"product_key":"Colorado","cost":"102.00","qty":"1.00"}],"displayName":"0032","displayTotal":102,"displayBalance":102,"displayPercent":0,"displayAge":87},{"invoice_status_id":"1","created_at":"2014-09-17 00:00:00","invoice_number":"0033","amount":"80.00","balance":"80.00","invoice_items":[{"product_key":"New York","cost":"80.00","qty":"1.00"}],"displayName":"0033","displayTotal":80,"displayBalance":80,"displayPercent":0,"displayAge":16},{"invoice_status_id":"5","created_at":"2014-07-23 00:00:00","invoice_number":"0034","amount":"951.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"951.00","qty":"1.00"}],"displayName":"0034","displayTotal":951,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-23 00:00:00","invoice_number":"0035","amount":"94.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"94.00","qty":"1.00"}],"displayName":"0035","displayTotal":94,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-13 00:00:00","invoice_number":"0036","amount":"137.00","balance":"0.00","invoice_items":[{"product_key":"Kansas","cost":"137.00","qty":"1.00"}],"displayName":"0036","displayTotal":137,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-06-24 00:00:00","invoice_number":"0037","amount":"122.00","balance":"122.00","invoice_items":[{"product_key":"Alabama","cost":"122.00","qty":"1.00"}],"displayName":"0037","displayTotal":122,"displayBalance":122,"displayPercent":0,"displayAge":101},{"invoice_status_id":"1","created_at":"2014-09-25 00:00:00","invoice_number":"0038","amount":"44.00","balance":"44.00","invoice_items":[{"product_key":"Arizona","cost":"44.00","qty":"1.00"}],"displayName":"0038","displayTotal":44,"displayBalance":44,"displayPercent":0,"displayAge":8},{"invoice_status_id":"1","created_at":"2014-08-13 00:00:00","invoice_number":"0039","amount":"68.00","balance":"68.00","invoice_items":[{"product_key":"Arizona","cost":"68.00","qty":"1.00"}],"displayName":"0039","displayTotal":68,"displayBalance":68,"displayPercent":0,"displayAge":51},{"invoice_status_id":"1","created_at":"2014-07-23 00:00:00","invoice_number":"0040","amount":"23.00","balance":"23.00","invoice_items":[{"product_key":"Delaware","cost":"23.00","qty":"1.00"}],"displayName":"0040","displayTotal":23,"displayBalance":23,"displayPercent":0,"displayAge":72},{"invoice_status_id":"1","created_at":"2014-07-06 00:00:00","invoice_number":"0041","amount":"61.00","balance":"61.00","invoice_items":[{"product_key":"Colorado","cost":"61.00","qty":"1.00"}],"displayName":"0041","displayTotal":61,"displayBalance":61,"displayPercent":0,"displayAge":89},{"invoice_status_id":"1","created_at":"2014-09-05 00:00:00","invoice_number":"0042","amount":"128.00","balance":"128.00","invoice_items":[{"product_key":"Arizona","cost":"128.00","qty":"1.00"}],"displayName":"0042","displayTotal":128,"displayBalance":128,"displayPercent":0,"displayAge":28},{"invoice_status_id":"5","created_at":"2014-07-17 00:00:00","invoice_number":"0043","amount":"130.00","balance":"0.00","invoice_items":[{"product_key":"Iowa","cost":"130.00","qty":"1.00"}],"displayName":"0043","displayTotal":130,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-01 00:00:00","invoice_number":"0044","amount":"139.00","balance":"139.00","invoice_items":[{"product_key":"Arizona","cost":"139.00","qty":"1.00"}],"displayName":"0044","displayTotal":139,"displayBalance":139,"displayPercent":0,"displayAge":94},{"invoice_status_id":"1","created_at":"2014-07-20 00:00:00","invoice_number":"0045","amount":"127.00","balance":"127.00","invoice_items":[{"product_key":"California","cost":"127.00","qty":"1.00"}],"displayName":"0045","displayTotal":127,"displayBalance":127,"displayPercent":0,"displayAge":75},{"invoice_status_id":"1","created_at":"2014-09-15 00:00:00","invoice_number":"0046","amount":"83.00","balance":"83.00","invoice_items":[{"product_key":"Michigan","cost":"83.00","qty":"1.00"}],"displayName":"0046","displayTotal":83,"displayBalance":83,"displayPercent":0,"displayAge":18},{"invoice_status_id":"1","created_at":"2014-07-30 00:00:00","invoice_number":"0047","amount":"62.00","balance":"62.00","invoice_items":[{"product_key":"Florida","cost":"62.00","qty":"1.00"}],"displayName":"0047","displayTotal":62,"displayBalance":62,"displayPercent":0,"displayAge":65},{"invoice_status_id":"1","created_at":"2014-09-16 00:00:00","invoice_number":"0048","amount":"902.00","balance":"902.00","invoice_items":[{"product_key":"New York","cost":"902.00","qty":"1.00"}],"displayName":"0048","displayTotal":902,"displayBalance":902,"displayPercent":0,"displayAge":17},{"invoice_status_id":"1","created_at":"2014-08-07 00:00:00","invoice_number":"0049","amount":"139.00","balance":"139.00","invoice_items":[{"product_key":"Arizona","cost":"139.00","qty":"1.00"}],"displayName":"0049","displayTotal":139,"displayBalance":139,"displayPercent":0,"displayAge":57},{"invoice_status_id":"1","created_at":"2014-07-12 00:00:00","invoice_number":"0050","amount":"124.00","balance":"124.00","invoice_items":[{"product_key":"Arizona","cost":"124.00","qty":"1.00"}],"displayName":"0050","displayTotal":124,"displayBalance":124,"displayPercent":0,"displayAge":83},{"invoice_status_id":"1","created_at":"2014-08-05 00:00:00","invoice_number":"0051","amount":"53.00","balance":"53.00","invoice_items":[{"product_key":"Connecticut","cost":"53.00","qty":"1.00"}],"displayName":"0051","displayTotal":53,"displayBalance":53,"displayPercent":0,"displayAge":59},{"invoice_status_id":"1","created_at":"2014-06-27 00:00:00","invoice_number":"0052","amount":"52.00","balance":"52.00","invoice_items":[{"product_key":"Michigan","cost":"52.00","qty":"1.00"}],"displayName":"0052","displayTotal":52,"displayBalance":52,"displayPercent":0,"displayAge":98},{"invoice_status_id":"1","created_at":"2014-09-04 00:00:00","invoice_number":"0053","amount":"28.00","balance":"28.00","invoice_items":[{"product_key":"New York","cost":"28.00","qty":"1.00"}],"displayName":"0053","displayTotal":28,"displayBalance":28,"displayPercent":0,"displayAge":29},{"invoice_status_id":"1","created_at":"2014-07-28 00:00:00","invoice_number":"0054","amount":"36.00","balance":"36.00","invoice_items":[{"product_key":"Alabama","cost":"36.00","qty":"1.00"}],"displayName":"0054","displayTotal":36,"displayBalance":36,"displayPercent":0,"displayAge":67},{"invoice_status_id":"1","created_at":"2014-08-28 00:00:00","invoice_number":"0055","amount":"111.00","balance":"111.00","invoice_items":[{"product_key":"New York","cost":"111.00","qty":"1.00"}],"displayName":"0055","displayTotal":111,"displayBalance":111,"displayPercent":0,"displayAge":36},{"invoice_status_id":"5","created_at":"2014-08-14 00:00:00","invoice_number":"0056","amount":"43.00","balance":"0.00","invoice_items":[{"product_key":"Delaware","cost":"43.00","qty":"1.00"}],"displayName":"0056","displayTotal":43,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-23 00:00:00","invoice_number":"0057","amount":"111.00","balance":"0.00","invoice_items":[{"product_key":"Idaho","cost":"111.00","qty":"1.00"}],"displayName":"0057","displayTotal":111,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-01 00:00:00","invoice_number":"0058","amount":"40.00","balance":"40.00","invoice_items":[{"product_key":"Massachusetts","cost":"40.00","qty":"1.00"}],"displayName":"0058","displayTotal":40,"displayBalance":40,"displayPercent":0,"displayAge":32},{"invoice_status_id":"1","created_at":"2014-09-21 00:00:00","invoice_number":"0059","amount":"116.00","balance":"116.00","invoice_items":[{"product_key":"Maryland","cost":"116.00","qty":"1.00"}],"displayName":"0059","displayTotal":116,"displayBalance":116,"displayPercent":0,"displayAge":12},{"invoice_status_id":"1","created_at":"2014-07-10 00:00:00","invoice_number":"0060","amount":"101.00","balance":"101.00","invoice_items":[{"product_key":"California","cost":"101.00","qty":"1.00"}],"displayName":"0060","displayTotal":101,"displayBalance":101,"displayPercent":0,"displayAge":85},{"invoice_status_id":"1","created_at":"2014-07-19 00:00:00","invoice_number":"0061","amount":"25.00","balance":"25.00","invoice_items":[{"product_key":"New York","cost":"25.00","qty":"1.00"}],"displayName":"0061","displayTotal":25,"displayBalance":25,"displayPercent":0,"displayAge":76},{"invoice_status_id":"5","created_at":"2014-08-08 00:00:00","invoice_number":"0062","amount":"119.00","balance":"0.00","invoice_items":[{"product_key":"Alabama","cost":"119.00","qty":"1.00"}],"displayName":"0062","displayTotal":119,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-21 00:00:00","invoice_number":"0063","amount":"42.00","balance":"42.00","invoice_items":[{"product_key":"California","cost":"42.00","qty":"1.00"}],"displayName":"0063","displayTotal":42,"displayBalance":42,"displayPercent":0,"displayAge":74},{"invoice_status_id":"5","created_at":"2014-07-17 00:00:00","invoice_number":"0064","amount":"34.00","balance":"0.00","invoice_items":[{"product_key":"Michigan","cost":"34.00","qty":"1.00"}],"displayName":"0064","displayTotal":34,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-03 00:00:00","invoice_number":"0065","amount":"108.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"108.00","qty":"1.00"}],"displayName":"0065","displayTotal":108,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-29 00:00:00","invoice_number":"0066","amount":"38.00","balance":"0.00","invoice_items":[{"product_key":"Delaware","cost":"38.00","qty":"1.00"}],"displayName":"0066","displayTotal":38,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-13 00:00:00","invoice_number":"0067","amount":"11.00","balance":"0.00","invoice_items":[{"product_key":"Connecticut","cost":"11.00","qty":"1.00"}],"displayName":"0067","displayTotal":11,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-02 00:00:00","invoice_number":"0068","amount":"128.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"128.00","qty":"1.00"}],"displayName":"0068","displayTotal":128,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-05 00:00:00","invoice_number":"0069","amount":"959.00","balance":"0.00","invoice_items":[{"product_key":"Louisiana","cost":"959.00","qty":"1.00"}],"displayName":"0069","displayTotal":959,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-13 00:00:00","invoice_number":"0070","amount":"116.00","balance":"0.00","invoice_items":[{"product_key":"Idaho","cost":"116.00","qty":"1.00"}],"displayName":"0070","displayTotal":116,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-04 00:00:00","invoice_number":"0071","amount":"50.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"50.00","qty":"1.00"}],"displayName":"0071","displayTotal":50,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-11 00:00:00","invoice_number":"0072","amount":"23.00","balance":"0.00","invoice_items":[{"product_key":"Maryland","cost":"23.00","qty":"1.00"}],"displayName":"0072","displayTotal":23,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-28 00:00:00","invoice_number":"0073","amount":"125.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"125.00","qty":"1.00"}],"displayName":"0073","displayTotal":125,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-28 00:00:00","invoice_number":"0074","amount":"981.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"981.00","qty":"1.00"}],"displayName":"0074","displayTotal":981,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-12 00:00:00","invoice_number":"0075","amount":"34.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"34.00","qty":"1.00"}],"displayName":"0075","displayTotal":34,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-15 00:00:00","invoice_number":"0076","amount":"24.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"24.00","qty":"1.00"}],"displayName":"0076","displayTotal":24,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-19 00:00:00","invoice_number":"0077","amount":"107.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"107.00","qty":"1.00"}],"displayName":"0077","displayTotal":107,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-21 00:00:00","invoice_number":"0078","amount":"950.00","balance":"0.00","invoice_items":[{"product_key":"Kentucky","cost":"950.00","qty":"1.00"}],"displayName":"0078","displayTotal":950,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-27 00:00:00","invoice_number":"0079","amount":"148.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"148.00","qty":"1.00"}],"displayName":"0079","displayTotal":148,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-22 00:00:00","invoice_number":"0080","amount":"22.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"22.00","qty":"1.00"}],"displayName":"0080","displayTotal":22,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-22 00:00:00","invoice_number":"0081","amount":"105.00","balance":"0.00","invoice_items":[{"product_key":"Alabama","cost":"105.00","qty":"1.00"}],"displayName":"0081","displayTotal":105,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-02 00:00:00","invoice_number":"0082","amount":"19.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"19.00","qty":"1.00"}],"displayName":"0082","displayTotal":19,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-15 00:00:00","invoice_number":"0083","amount":"102.00","balance":"0.00","invoice_items":[{"product_key":"Illinois","cost":"102.00","qty":"1.00"}],"displayName":"0083","displayTotal":102,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-06-27 00:00:00","invoice_number":"0084","amount":"105.00","balance":"0.00","invoice_items":[{"product_key":"Connecticut","cost":"105.00","qty":"1.00"}],"displayName":"0084","displayTotal":105,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-07 00:00:00","invoice_number":"0085","amount":"138.00","balance":"0.00","invoice_items":[{"product_key":"Connecticut","cost":"138.00","qty":"1.00"}],"displayName":"0085","displayTotal":138,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-15 00:00:00","invoice_number":"0086","amount":"86.00","balance":"0.00","invoice_items":[{"product_key":"Louisiana","cost":"86.00","qty":"1.00"}],"displayName":"0086","displayTotal":86,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-14 00:00:00","invoice_number":"0087","amount":"59.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"59.00","qty":"1.00"}],"displayName":"0087","displayTotal":59,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-22 00:00:00","invoice_number":"0088","amount":"129.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"129.00","qty":"1.00"}],"displayName":"0088","displayTotal":129,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-06 00:00:00","invoice_number":"0089","amount":"107.00","balance":"0.00","invoice_items":[{"product_key":"Iowa","cost":"107.00","qty":"1.00"}],"displayName":"0089","displayTotal":107,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-07 00:00:00","invoice_number":"0090","amount":"998.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"998.00","qty":"1.00"}],"displayName":"0090","displayTotal":998,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-17 00:00:00","invoice_number":"0091","amount":"11.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"11.00","qty":"1.00"}],"displayName":"0091","displayTotal":11,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-16 00:00:00","invoice_number":"0092","amount":"57.00","balance":"0.00","invoice_items":[{"product_key":"Idaho","cost":"57.00","qty":"1.00"}],"displayName":"0092","displayTotal":57,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-29 00:00:00","invoice_number":"0093","amount":"32.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"32.00","qty":"1.00"}],"displayName":"0093","displayTotal":32,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-06 00:00:00","invoice_number":"0094","amount":"108.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"108.00","qty":"1.00"}],"displayName":"0094","displayTotal":108,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-30 00:00:00","invoice_number":"0095","amount":"18.00","balance":"0.00","invoice_items":[{"product_key":"Alabama","cost":"18.00","qty":"1.00"}],"displayName":"0095","displayTotal":18,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-27 00:00:00","invoice_number":"0096","amount":"135.00","balance":"135.00","invoice_items":[{"product_key":"New York","cost":"135.00","qty":"1.00"}],"displayName":"0096","displayTotal":135,"displayBalance":135,"displayPercent":0,"displayAge":68},{"invoice_status_id":"1","created_at":"2014-09-29 00:00:00","invoice_number":"0097","amount":"133.00","balance":"133.00","invoice_items":[{"product_key":"New York","cost":"133.00","qty":"1.00"}],"displayName":"0097","displayTotal":133,"displayBalance":133,"displayPercent":0,"displayAge":4},{"invoice_status_id":"1","created_at":"2014-09-24 00:00:00","invoice_number":"0098","amount":"118.00","balance":"118.00","invoice_items":[{"product_key":"Colorado","cost":"118.00","qty":"1.00"}],"displayName":"0098","displayTotal":118,"displayBalance":118,"displayPercent":0,"displayAge":9},{"invoice_status_id":"5","created_at":"2014-09-15 00:00:00","invoice_number":"0099","amount":"127.00","balance":"0.00","invoice_items":[{"product_key":"Michigan","cost":"127.00","qty":"1.00"}],"displayName":"0099","displayTotal":127,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-08-26 00:00:00","invoice_number":"0100","amount":"80.00","balance":"80.00","invoice_items":[{"product_key":"Maryland","cost":"80.00","qty":"1.00"}],"displayName":"0100","displayTotal":80,"displayBalance":80,"displayPercent":0,"displayAge":38},{"invoice_status_id":"5","created_at":"2014-07-07 00:00:00","invoice_number":"0101","amount":"123.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"123.00","qty":"1.00"}],"displayName":"0101","displayTotal":123,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-05 00:00:00","invoice_number":"0102","amount":"116.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"116.00","qty":"1.00"}],"displayName":"0102","displayTotal":116,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-24 00:00:00","invoice_number":"0103","amount":"36.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"36.00","qty":"1.00"}],"displayName":"0103","displayTotal":36,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-08-03 00:00:00","invoice_number":"0104","amount":"101.00","balance":"101.00","invoice_items":[{"product_key":"Arizona","cost":"101.00","qty":"1.00"}],"displayName":"0104","displayTotal":101,"displayBalance":101,"displayPercent":0,"displayAge":61},{"invoice_status_id":"1","created_at":"2014-07-06 00:00:00","invoice_number":"0105","amount":"132.00","balance":"132.00","invoice_items":[{"product_key":"Connecticut","cost":"132.00","qty":"1.00"}],"displayName":"0105","displayTotal":132,"displayBalance":132,"displayPercent":0,"displayAge":89},{"invoice_status_id":"5","created_at":"2014-09-13 00:00:00","invoice_number":"0106","amount":"13.00","balance":"0.00","invoice_items":[{"product_key":"Illinois","cost":"13.00","qty":"1.00"}],"displayName":"0106","displayTotal":13,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-08 00:00:00","invoice_number":"0107","amount":"942.00","balance":"942.00","invoice_items":[{"product_key":"Arizona","cost":"942.00","qty":"1.00"}],"displayName":"0107","displayTotal":942,"displayBalance":942,"displayPercent":0,"displayAge":87},{"invoice_status_id":"5","created_at":"2014-07-20 00:00:00","invoice_number":"0108","amount":"38.00","balance":"0.00","invoice_items":[{"product_key":"Alabama","cost":"38.00","qty":"1.00"}],"displayName":"0108","displayTotal":38,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-27 00:00:00","invoice_number":"0109","amount":"145.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"145.00","qty":"1.00"}],"displayName":"0109","displayTotal":145,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-06-27 00:00:00","invoice_number":"0110","amount":"93.00","balance":"0.00","invoice_items":[{"product_key":"Michigan","cost":"93.00","qty":"1.00"}],"displayName":"0110","displayTotal":93,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-21 00:00:00","invoice_number":"0111","amount":"94.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"94.00","qty":"1.00"}],"displayName":"0111","displayTotal":94,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-10 00:00:00","invoice_number":"0112","amount":"41.00","balance":"41.00","invoice_items":[{"product_key":"California","cost":"41.00","qty":"1.00"}],"displayName":"0112","displayTotal":41,"displayBalance":41,"displayPercent":0,"displayAge":85},{"invoice_status_id":"5","created_at":"2014-09-25 00:00:00","invoice_number":"0113","amount":"43.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"43.00","qty":"1.00"}],"displayName":"0113","displayTotal":43,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-03 00:00:00","invoice_number":"0114","amount":"980.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"980.00","qty":"1.00"}],"displayName":"0114","displayTotal":980,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-11 00:00:00","invoice_number":"0115","amount":"903.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"903.00","qty":"1.00"}],"displayName":"0115","displayTotal":903,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-18 00:00:00","invoice_number":"0116","amount":"44.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"44.00","qty":"1.00"}],"displayName":"0116","displayTotal":44,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-30 00:00:00","invoice_number":"0117","amount":"17.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"17.00","qty":"1.00"}],"displayName":"0117","displayTotal":17,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-17 00:00:00","invoice_number":"0118","amount":"133.00","balance":"0.00","invoice_items":[{"product_key":"Michigan","cost":"133.00","qty":"1.00"}],"displayName":"0118","displayTotal":133,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-13 00:00:00","invoice_number":"0119","amount":"25.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"25.00","qty":"1.00"}],"displayName":"0119","displayTotal":25,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-12 00:00:00","invoice_number":"0120","amount":"982.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"982.00","qty":"1.00"}],"displayName":"0120","displayTotal":982,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-29 00:00:00","invoice_number":"0121","amount":"57.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"57.00","qty":"1.00"}],"displayName":"0121","displayTotal":57,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-16 00:00:00","invoice_number":"0122","amount":"69.00","balance":"0.00","invoice_items":[{"product_key":"Connecticut","cost":"69.00","qty":"1.00"}],"displayName":"0122","displayTotal":69,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-30 00:00:00","invoice_number":"0123","amount":"14.00","balance":"14.00","invoice_items":[{"product_key":"California","cost":"14.00","qty":"1.00"}],"displayName":"0123","displayTotal":14,"displayBalance":14,"displayPercent":0,"displayAge":3},{"invoice_status_id":"5","created_at":"2014-09-19 00:00:00","invoice_number":"0124","amount":"105.00","balance":"0.00","invoice_items":[{"product_key":"Delaware","cost":"105.00","qty":"1.00"}],"displayName":"0124","displayTotal":105,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-28 00:00:00","invoice_number":"0125","amount":"68.00","balance":"68.00","invoice_items":[{"product_key":"Iowa","cost":"68.00","qty":"1.00"}],"displayName":"0125","displayTotal":68,"displayBalance":68,"displayPercent":0,"displayAge":5},{"invoice_status_id":"1","created_at":"2014-08-17 00:00:00","invoice_number":"0126","amount":"98.00","balance":"98.00","invoice_items":[{"product_key":"Arizona","cost":"98.00","qty":"1.00"}],"displayName":"0126","displayTotal":98,"displayBalance":98,"displayPercent":0,"displayAge":47},{"invoice_status_id":"1","created_at":"2014-09-16 00:00:00","invoice_number":"0127","amount":"68.00","balance":"68.00","invoice_items":[{"product_key":"Maine","cost":"68.00","qty":"1.00"}],"displayName":"0127","displayTotal":68,"displayBalance":68,"displayPercent":0,"displayAge":17},{"invoice_status_id":"1","created_at":"2014-09-30 00:00:00","invoice_number":"0128","amount":"120.00","balance":"120.00","invoice_items":[{"product_key":"New York","cost":"120.00","qty":"1.00"}],"displayName":"0128","displayTotal":120,"displayBalance":120,"displayPercent":0,"displayAge":3},{"invoice_status_id":"5","created_at":"2014-08-08 00:00:00","invoice_number":"0129","amount":"105.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"105.00","qty":"1.00"}],"displayName":"0129","displayTotal":105,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-16 00:00:00","invoice_number":"0130","amount":"117.00","balance":"117.00","invoice_items":[{"product_key":"California","cost":"117.00","qty":"1.00"}],"displayName":"0130","displayTotal":117,"displayBalance":117,"displayPercent":0,"displayAge":17},{"invoice_status_id":"1","created_at":"2014-07-08 00:00:00","invoice_number":"0131","amount":"32.00","balance":"32.00","invoice_items":[{"product_key":"Colorado","cost":"32.00","qty":"1.00"}],"displayName":"0131","displayTotal":32,"displayBalance":32,"displayPercent":0,"displayAge":87},{"invoice_status_id":"1","created_at":"2014-07-05 00:00:00","invoice_number":"0132","amount":"35.00","balance":"35.00","invoice_items":[{"product_key":"Arizona","cost":"35.00","qty":"1.00"}],"displayName":"0132","displayTotal":35,"displayBalance":35,"displayPercent":0,"displayAge":90},{"invoice_status_id":"5","created_at":"2014-07-10 00:00:00","invoice_number":"0133","amount":"14.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"14.00","qty":"1.00"}],"displayName":"0133","displayTotal":14,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-12 00:00:00","invoice_number":"0134","amount":"82.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"82.00","qty":"1.00"}],"displayName":"0134","displayTotal":82,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-20 00:00:00","invoice_number":"0135","amount":"103.00","balance":"103.00","invoice_items":[{"product_key":"Arizona","cost":"103.00","qty":"1.00"}],"displayName":"0135","displayTotal":103,"displayBalance":103,"displayPercent":0,"displayAge":75},{"invoice_status_id":"1","created_at":"2014-06-26 00:00:00","invoice_number":"0136","amount":"49.00","balance":"49.00","invoice_items":[{"product_key":"Massachusetts","cost":"49.00","qty":"1.00"}],"displayName":"0136","displayTotal":49,"displayBalance":49,"displayPercent":0,"displayAge":99},{"invoice_status_id":"5","created_at":"2014-09-07 00:00:00","invoice_number":"0137","amount":"20.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"20.00","qty":"1.00"}],"displayName":"0137","displayTotal":20,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-13 00:00:00","invoice_number":"0138","amount":"56.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"56.00","qty":"1.00"}],"displayName":"0138","displayTotal":56,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-26 00:00:00","invoice_number":"0139","amount":"147.00","balance":"147.00","invoice_items":[{"product_key":"Iowa","cost":"147.00","qty":"1.00"}],"displayName":"0139","displayTotal":147,"displayBalance":147,"displayPercent":0,"displayAge":69},{"invoice_status_id":"1","created_at":"2014-09-06 00:00:00","invoice_number":"0140","amount":"47.00","balance":"47.00","invoice_items":[{"product_key":"California","cost":"47.00","qty":"1.00"}],"displayName":"0140","displayTotal":47,"displayBalance":47,"displayPercent":0,"displayAge":27},{"invoice_status_id":"1","created_at":"2014-08-19 00:00:00","invoice_number":"0141","amount":"147.00","balance":"147.00","invoice_items":[{"product_key":"Colorado","cost":"147.00","qty":"1.00"}],"displayName":"0141","displayTotal":147,"displayBalance":147,"displayPercent":0,"displayAge":45},{"invoice_status_id":"1","created_at":"2014-09-27 00:00:00","invoice_number":"0142","amount":"113.00","balance":"113.00","invoice_items":[{"product_key":"Colorado","cost":"113.00","qty":"1.00"}],"displayName":"0142","displayTotal":113,"displayBalance":113,"displayPercent":0,"displayAge":6},{"invoice_status_id":"1","created_at":"2014-07-01 00:00:00","invoice_number":"0143","amount":"48.00","balance":"48.00","invoice_items":[{"product_key":"Indiana","cost":"48.00","qty":"1.00"}],"displayName":"0143","displayTotal":48,"displayBalance":48,"displayPercent":0,"displayAge":94},{"invoice_status_id":"1","created_at":"2014-08-18 00:00:00","invoice_number":"0144","amount":"137.00","balance":"137.00","invoice_items":[{"product_key":"Arizona","cost":"137.00","qty":"1.00"}],"displayName":"0144","displayTotal":137,"displayBalance":137,"displayPercent":0,"displayAge":46},{"invoice_status_id":"1","created_at":"2014-09-25 00:00:00","invoice_number":"0145","amount":"117.00","balance":"117.00","invoice_items":[{"product_key":"New York","cost":"117.00","qty":"1.00"}],"displayName":"0145","displayTotal":117,"displayBalance":117,"displayPercent":0,"displayAge":8},{"invoice_status_id":"5","created_at":"2014-07-24 00:00:00","invoice_number":"0146","amount":"71.00","balance":"0.00","invoice_items":[{"product_key":"Georgia","cost":"71.00","qty":"1.00"}],"displayName":"0146","displayTotal":71,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-06 00:00:00","invoice_number":"0147","amount":"976.00","balance":"0.00","invoice_items":[{"product_key":"Illinois","cost":"976.00","qty":"1.00"}],"displayName":"0147","displayTotal":976,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-16 00:00:00","invoice_number":"0148","amount":"82.00","balance":"0.00","invoice_items":[{"product_key":"Florida","cost":"82.00","qty":"1.00"}],"displayName":"0148","displayTotal":82,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-22 00:00:00","invoice_number":"0149","amount":"134.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"134.00","qty":"1.00"}],"displayName":"0149","displayTotal":134,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-15 00:00:00","invoice_number":"0150","amount":"147.00","balance":"0.00","invoice_items":[{"product_key":"Illinois","cost":"147.00","qty":"1.00"}],"displayName":"0150","displayTotal":147,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-31 00:00:00","invoice_number":"0151","amount":"16.00","balance":"0.00","invoice_items":[{"product_key":"Kansas","cost":"16.00","qty":"1.00"}],"displayName":"0151","displayTotal":16,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-17 00:00:00","invoice_number":"0152","amount":"14.00","balance":"0.00","invoice_items":[{"product_key":"Indiana","cost":"14.00","qty":"1.00"}],"displayName":"0152","displayTotal":14,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-12 00:00:00","invoice_number":"0153","amount":"61.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"61.00","qty":"1.00"}],"displayName":"0153","displayTotal":61,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-17 00:00:00","invoice_number":"0154","amount":"47.00","balance":"0.00","invoice_items":[{"product_key":"Indiana","cost":"47.00","qty":"1.00"}],"displayName":"0154","displayTotal":47,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-10 00:00:00","invoice_number":"0155","amount":"137.00","balance":"137.00","invoice_items":[{"product_key":"California","cost":"137.00","qty":"1.00"}],"displayName":"0155","displayTotal":137,"displayBalance":137,"displayPercent":0,"displayAge":23},{"invoice_status_id":"1","created_at":"2014-07-10 00:00:00","invoice_number":"0156","amount":"76.00","balance":"76.00","invoice_items":[{"product_key":"Massachusetts","cost":"76.00","qty":"1.00"}],"displayName":"0156","displayTotal":76,"displayBalance":76,"displayPercent":0,"displayAge":85},{"invoice_status_id":"5","created_at":"2014-07-26 00:00:00","invoice_number":"0157","amount":"82.00","balance":"0.00","invoice_items":[{"product_key":"Maine","cost":"82.00","qty":"1.00"}],"displayName":"0157","displayTotal":82,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-29 00:00:00","invoice_number":"0158","amount":"76.00","balance":"76.00","invoice_items":[{"product_key":"New York","cost":"76.00","qty":"1.00"}],"displayName":"0158","displayTotal":76,"displayBalance":76,"displayPercent":0,"displayAge":4},{"invoice_status_id":"1","created_at":"2014-08-20 00:00:00","invoice_number":"0159","amount":"111.00","balance":"111.00","invoice_items":[{"product_key":"Arizona","cost":"111.00","qty":"1.00"}],"displayName":"0159","displayTotal":111,"displayBalance":111,"displayPercent":0,"displayAge":44},{"invoice_status_id":"5","created_at":"2014-07-14 00:00:00","invoice_number":"0160","amount":"27.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"27.00","qty":"1.00"}],"displayName":"0160","displayTotal":27,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-17 00:00:00","invoice_number":"0161","amount":"47.00","balance":"47.00","invoice_items":[{"product_key":"Kansas","cost":"47.00","qty":"1.00"}],"displayName":"0161","displayTotal":47,"displayBalance":47,"displayPercent":0,"displayAge":78},{"invoice_status_id":"1","created_at":"2014-08-06 00:00:00","invoice_number":"0162","amount":"31.00","balance":"31.00","invoice_items":[{"product_key":"Indiana","cost":"31.00","qty":"1.00"}],"displayName":"0162","displayTotal":31,"displayBalance":31,"displayPercent":0,"displayAge":58},{"invoice_status_id":"1","created_at":"2014-08-06 00:00:00","invoice_number":"0163","amount":"78.00","balance":"78.00","invoice_items":[{"product_key":"California","cost":"78.00","qty":"1.00"}],"displayName":"0163","displayTotal":78,"displayBalance":78,"displayPercent":0,"displayAge":58},{"invoice_status_id":"5","created_at":"2014-09-24 00:00:00","invoice_number":"0164","amount":"118.00","balance":"0.00","invoice_items":[{"product_key":"Florida","cost":"118.00","qty":"1.00"}],"displayName":"0164","displayTotal":118,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-27 00:00:00","invoice_number":"0165","amount":"21.00","balance":"21.00","invoice_items":[{"product_key":"Colorado","cost":"21.00","qty":"1.00"}],"displayName":"0165","displayTotal":21,"displayBalance":21,"displayPercent":0,"displayAge":68},{"invoice_status_id":"5","created_at":"2014-07-30 00:00:00","invoice_number":"0166","amount":"54.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"54.00","qty":"1.00"}],"displayName":"0166","displayTotal":54,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-03 00:00:00","invoice_number":"0167","amount":"63.00","balance":"63.00","invoice_items":[{"product_key":"Arizona","cost":"63.00","qty":"1.00"}],"displayName":"0167","displayTotal":63,"displayBalance":63,"displayPercent":0,"displayAge":30},{"invoice_status_id":"1","created_at":"2014-06-26 00:00:00","invoice_number":"0168","amount":"941.00","balance":"941.00","invoice_items":[{"product_key":"Louisiana","cost":"941.00","qty":"1.00"}],"displayName":"0168","displayTotal":941,"displayBalance":941,"displayPercent":0,"displayAge":99},{"invoice_status_id":"5","created_at":"2014-08-08 00:00:00","invoice_number":"0169","amount":"69.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"69.00","qty":"1.00"}],"displayName":"0169","displayTotal":69,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-06-24 00:00:00","invoice_number":"0170","amount":"31.00","balance":"0.00","invoice_items":[{"product_key":"Idaho","cost":"31.00","qty":"1.00"}],"displayName":"0170","displayTotal":31,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-30 00:00:00","invoice_number":"0171","amount":"102.00","balance":"0.00","invoice_items":[{"product_key":"Maryland","cost":"102.00","qty":"1.00"}],"displayName":"0171","displayTotal":102,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-24 00:00:00","invoice_number":"0172","amount":"101.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"101.00","qty":"1.00"}],"displayName":"0172","displayTotal":101,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-24 00:00:00","invoice_number":"0173","amount":"971.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"971.00","qty":"1.00"}],"displayName":"0173","displayTotal":971,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-16 00:00:00","invoice_number":"0174","amount":"34.00","balance":"0.00","invoice_items":[{"product_key":"Kentucky","cost":"34.00","qty":"1.00"}],"displayName":"0174","displayTotal":34,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-15 00:00:00","invoice_number":"0175","amount":"71.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"71.00","qty":"1.00"}],"displayName":"0175","displayTotal":71,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-03 00:00:00","invoice_number":"0176","amount":"106.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"106.00","qty":"1.00"}],"displayName":"0176","displayTotal":106,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-21 00:00:00","invoice_number":"0177","amount":"134.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"134.00","qty":"1.00"}],"displayName":"0177","displayTotal":134,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-04 00:00:00","invoice_number":"0178","amount":"24.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"24.00","qty":"1.00"}],"displayName":"0178","displayTotal":24,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-15 00:00:00","invoice_number":"0179","amount":"20.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"20.00","qty":"1.00"}],"displayName":"0179","displayTotal":20,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-30 00:00:00","invoice_number":"0180","amount":"124.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"124.00","qty":"1.00"}],"displayName":"0180","displayTotal":124,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-06-28 00:00:00","invoice_number":"0181","amount":"33.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"33.00","qty":"1.00"}],"displayName":"0181","displayTotal":33,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-23 00:00:00","invoice_number":"0182","amount":"114.00","balance":"0.00","invoice_items":[{"product_key":"New York","cost":"114.00","qty":"1.00"}],"displayName":"0182","displayTotal":114,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-16 00:00:00","invoice_number":"0183","amount":"938.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"938.00","qty":"1.00"}],"displayName":"0183","displayTotal":938,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-15 00:00:00","invoice_number":"0184","amount":"101.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"101.00","qty":"1.00"}],"displayName":"0184","displayTotal":101,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-03 00:00:00","invoice_number":"0185","amount":"87.00","balance":"0.00","invoice_items":[{"product_key":"Indiana","cost":"87.00","qty":"1.00"}],"displayName":"0185","displayTotal":87,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-20 00:00:00","invoice_number":"0186","amount":"58.00","balance":"0.00","invoice_items":[{"product_key":"Iowa","cost":"58.00","qty":"1.00"}],"displayName":"0186","displayTotal":58,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-08-24 00:00:00","invoice_number":"0187","amount":"961.00","balance":"0.00","invoice_items":[{"product_key":"California","cost":"961.00","qty":"1.00"}],"displayName":"0187","displayTotal":961,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-30 00:00:00","invoice_number":"0188","amount":"132.00","balance":"0.00","invoice_items":[{"product_key":"Colorado","cost":"132.00","qty":"1.00"}],"displayName":"0188","displayTotal":132,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-07-13 00:00:00","invoice_number":"0189","amount":"60.00","balance":"0.00","invoice_items":[{"product_key":"Hawaii","cost":"60.00","qty":"1.00"}],"displayName":"0189","displayTotal":60,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"5","created_at":"2014-09-30 00:00:00","invoice_number":"0190","amount":"114.00","balance":"0.00","invoice_items":[{"product_key":"Alabama","cost":"114.00","qty":"1.00"}],"displayName":"0190","displayTotal":114,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-07-13 00:00:00","invoice_number":"0191","amount":"93.00","balance":"93.00","invoice_items":[{"product_key":"Kentucky","cost":"93.00","qty":"1.00"}],"displayName":"0191","displayTotal":93,"displayBalance":93,"displayPercent":0,"displayAge":82},{"invoice_status_id":"5","created_at":"2014-10-01 00:00:00","invoice_number":"0192","amount":"41.00","balance":"0.00","invoice_items":[{"product_key":"Arizona","cost":"41.00","qty":"1.00"}],"displayName":"0192","displayTotal":41,"displayBalance":0,"displayPercent":1,"displayAge":0},{"invoice_status_id":"1","created_at":"2014-09-19 00:00:00","invoice_number":"0193","amount":"91.00","balance":"91.00","invoice_items":[{"product_key":"Iowa","cost":"91.00","qty":"1.00"}],"displayName":"0193","displayTotal":91,"displayBalance":91,"displayPercent":0,"displayAge":14}], - "products":[{"key":"Alabama","values":{"amount":642,"paid":484,"age":84},"displayName":"Alabama","displayTotal":642,"displayBalance":158,"displayPercent":"0.75","displayAge":84},{"key":"Arizona","values":{"amount":7480,"paid":5062,"age":52},"displayName":"Arizona","displayTotal":7480,"displayBalance":2418,"displayPercent":"0.68","displayAge":52},{"key":"California","values":{"amount":6249,"paid":5545,"age":58},"displayName":"California","displayTotal":6249,"displayBalance":704,"displayPercent":"0.89","displayAge":58},{"key":"Colorado","values":{"amount":1260,"paid":666,"age":68},"displayName":"Colorado","displayTotal":1260,"displayBalance":594,"displayPercent":"0.53","displayAge":68},{"key":"Connecticut","values":{"amount":578,"paid":393,"age":74},"displayName":"Connecticut","displayTotal":578,"displayBalance":185,"displayPercent":"0.68","displayAge":74},{"key":"Delaware","values":{"amount":209,"paid":186,"age":72},"displayName":"Delaware","displayTotal":209,"displayBalance":23,"displayPercent":"0.89","displayAge":72},{"key":"Florida","values":{"amount":262,"paid":200,"age":65},"displayName":"Florida","displayTotal":262,"displayBalance":62,"displayPercent":"0.76","displayAge":65},{"key":"Georgia","values":{"amount":71,"paid":71},"displayName":"Georgia","displayTotal":71,"displayBalance":0,"displayPercent":"1.00"},{"key":"Hawaii","values":{"amount":536,"paid":536},"displayName":"Hawaii","displayTotal":536,"displayBalance":0,"displayPercent":"1.00"},{"key":"Idaho","values":{"amount":315,"paid":315},"displayName":"Idaho","displayTotal":315,"displayBalance":0,"displayPercent":"1.00"},{"key":"Illinois","values":{"amount":1281,"paid":1281},"displayName":"Illinois","displayTotal":1281,"displayBalance":0,"displayPercent":"1.00"},{"key":"Indiana","values":{"amount":227,"paid":148,"age":76},"displayName":"Indiana","displayTotal":227,"displayBalance":79,"displayPercent":"0.65","displayAge":76},{"key":"Iowa","values":{"amount":1659,"paid":1261,"age":9.5},"displayName":"Iowa","displayTotal":1659,"displayBalance":398,"displayPercent":"0.76","displayAge":9.5},{"key":"Kansas","values":{"amount":342,"paid":295,"age":78},"displayName":"Kansas","displayTotal":342,"displayBalance":47,"displayPercent":"0.86","displayAge":78},{"key":"Kentucky","values":{"amount":1077,"paid":984,"age":82},"displayName":"Kentucky","displayTotal":1077,"displayBalance":93,"displayPercent":"0.91","displayAge":82},{"key":"Louisiana","values":{"amount":2092,"paid":1151,"age":99},"displayName":"Louisiana","displayTotal":2092,"displayBalance":941,"displayPercent":"0.55","displayAge":99},{"key":"Maine","values":{"amount":211,"paid":143,"age":17},"displayName":"Maine","displayTotal":211,"displayBalance":68,"displayPercent":"0.68","displayAge":17},{"key":"Maryland","values":{"amount":321,"paid":125,"age":25},"displayName":"Maryland","displayTotal":321,"displayBalance":196,"displayPercent":"0.39","displayAge":25},{"key":"Massachusetts","values":{"amount":190,"paid":0,"age":76},"displayName":"Massachusetts","displayTotal":190,"displayBalance":190,"displayPercent":"0.00","displayAge":76},{"key":"Michigan","values":{"amount":522,"paid":387,"age":58},"displayName":"Michigan","displayTotal":522,"displayBalance":135,"displayPercent":"0.74","displayAge":58},{"key":"New York","values":{"amount":4396,"paid":2669,"age":16.5},"displayName":"New York","displayTotal":4396,"displayBalance":1727,"displayPercent":"0.61","displayAge":16.5}] -} \ No newline at end of file diff --git a/app/views/accounts/account_gateway.blade.php b/app/views/accounts/account_gateway.blade.php deleted file mode 100644 index 9aa605664798..000000000000 --- a/app/views/accounts/account_gateway.blade.php +++ /dev/null @@ -1,153 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - - {{ Former::open($url)->method($method)->rule()->addClass('col-md-8 col-md-offset-2 warn-on-exit') }} - {{ Former::populate($account) }} - - {{ Former::legend($title) }} - - @if ($accountGateway) - {{ Former::populateField('gateway_id', $accountGateway->gateway_id) }} - {{ Former::populateField('recommendedGateway_id', $accountGateway->gateway_id) }} - @if ($config) - @foreach ($accountGateway->fields as $field => $junk) - @if (in_array($field, ['solutionType', 'landingPage', 'headerImageUrl', 'brandName'])) - {{-- do nothing --}} - @elseif (isset($config->$field)) - {{ Former::populateField($accountGateway->gateway_id.'_'.$field, $config->$field) }} - @endif - @endforeach - @endif - @endif - -
    - {{ Former::checkboxes('creditCardTypes[]')->label('Accepted Credit Cards') - ->checkboxes($creditCardTypes)->class('creditcard-types') - }} -
    - -

     

    - -

    -
    - {{ Former::radios('recommendedGateway_id')->label('Recommended Gateway') - ->radios($recommendedGateways)->class('recommended-gateway') - }} -
    - - {{ Former::select('gateway_id')->label('Select Gateway')->addOption('', '') - ->dataClass('gateway-dropdown') - ->fromQuery($gateways, 'name', 'id') - ->onchange('setFieldsShown()'); }} -
    - - @foreach ($gateways as $gateway) - - - - @endforeach - -

     

    - - {{ Former::actions( - Button::lg_success_submit('Save')->append_with_icon('floppy-disk'), - $countGateways > 0 ? Button::lg_default_link('company/payments', 'Cancel')->append_with_icon('remove-circle') : false - )}} - {{ Former::close() }} - - - - -@stop \ No newline at end of file diff --git a/app/views/accounts/details.blade.php b/app/views/accounts/details.blade.php deleted file mode 100755 index 7dd89ec9d428..000000000000 --- a/app/views/accounts/details.blade.php +++ /dev/null @@ -1,252 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - - - - {{ Former::open_for_files()->addClass('col-md-10 col-md-offset-1 warn-on-exit')->rules(array( - 'name' => 'required', - 'email' => 'email|required' - )) }} - - {{ Former::populate($account) }} - @if ($showUser) - {{ Former::populateField('first_name', $account->users()->first()->first_name) }} - {{ Former::populateField('last_name', $account->users()->first()->last_name) }} - {{ Former::populateField('email', $account->users()->first()->email) }} - {{ Former::populateField('phone', $account->users()->first()->phone) }} - @endif - -

    -
    - - {{ Former::legend('details') }} - {{ Former::text('name') }} - {{ Former::text('id_number') }} - {{ Former::text('vat_number') }} - {{ Former::text('work_email') }} - {{ Former::text('work_phone') }} - {{ Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp(trans('texts.logo_help')) }} - - @if (file_exists($account->getLogoPath())) -
    - {{ HTML::image($account->getLogoPath(), "Logo") }}   - {{ trans('texts.remove_logo') }} -

    - @endif - - {{ Former::select('size_id')->addOption('','') - ->fromQuery($sizes, 'name', 'id') }} - {{ Former::select('industry_id')->addOption('','') - ->fromQuery($industries, 'name', 'id') }} - - {{ Former::legend('address') }} - {{ Former::text('address1') }} - {{ Former::text('address2') }} - {{ Former::text('city') }} - {{ Former::text('state') }} - {{ Former::text('postal_code') }} - {{ Former::select('country_id')->addOption('','') - ->fromQuery($countries, 'name', 'id') }} - -
    - -
    - - @if ($showUser) - {{ Former::legend('users') }} - {{ Former::text('first_name') }} - {{ Former::text('last_name') }} - {{ Former::text('email') }} - {{ Former::text('phone') }} - {{ Former::actions(Button::primary_sm(trans('texts.change_password'), ['onclick'=>'showChangePassword()'])); }} - @endif - - {{ Former::legend('localization') }} - {{ Former::select('language_id')->addOption('','') - ->fromQuery($languages, 'name', 'id') }} - {{ Former::select('currency_id')->addOption('','') - ->fromQuery($currencies, 'name', 'id') }} - {{ Former::select('timezone_id')->addOption('','') - ->fromQuery($timezones, 'location', 'id') }} - {{ Former::select('date_format_id')->addOption('','') - ->fromQuery($dateFormats, 'label', 'id') }} - {{ Former::select('datetime_format_id')->addOption('','') - ->fromQuery($datetimeFormats, 'label', 'id') }} - - -
    -
    - -
    - {{ Button::lg_success_submit(trans('texts.save'))->append_with_icon('floppy-disk') }} -
    - - - - - - {{ Former::close() }} - - {{ Form::open(['url' => 'remove_logo', 'class' => 'removeLogoForm']) }} - {{ Form::close() }} - - - - - - - -@stop \ No newline at end of file diff --git a/app/views/accounts/email_templates.blade.php b/app/views/accounts/email_templates.blade.php deleted file mode 100644 index f22abef5039e..000000000000 --- a/app/views/accounts/email_templates.blade.php +++ /dev/null @@ -1,109 +0,0 @@ -@extends('accounts.nav') - -@section('head') - @parent - - - -@stop - -@section('content') - @parent - @include('accounts.nav_advanced') - - {{ Former::open()->addClass('col-md-8 col-md-offset-2 warn-on-exit') }} - {{ Former::populateField('email_template_invoice', $invoiceEmail) }} - {{ Former::populateField('email_template_quote', $quoteEmail) }} - {{ Former::populateField('email_template_payment', $paymentEmail) }} - - {{ Former::legend('invoice_email') }} -
    -
    - {{ Former::textarea('email_template_invoice')->raw() }} -
    -
    -
    - -

     

    - - {{ Former::legend('quote_email') }} -
    -
    - {{ Former::textarea('email_template_quote')->raw() }} -
    -
    -
    - -

     

    - - {{ Former::legend('payment_email') }} -
    -
    - {{ Former::textarea('email_template_payment')->raw() }} -
    -
    -
    - -

     

    - - @if (Auth::user()->isPro()) - {{ Former::actions( - Button::lg_success_submit(trans('texts.save'))->append_with_icon('floppy-disk') - ) }} - @else - - @endif - - {{ Former::close() }} - - - -@stop diff --git a/app/views/accounts/export.blade.php b/app/views/accounts/export.blade.php deleted file mode 100755 index 71b2aa1cc470..000000000000 --- a/app/views/accounts/export.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - - {{ Former::open()->addClass('col-md-9 col-md-offset-1') }} - {{ Former::legend('Export Client Data') }} - {{ Button::lg_primary_submit('Download') }} - {{ Former::close() }} - -@stop \ No newline at end of file diff --git a/app/views/accounts/import_export.blade.php b/app/views/accounts/import_export.blade.php deleted file mode 100755 index 6a3baaddc5e0..000000000000 --- a/app/views/accounts/import_export.blade.php +++ /dev/null @@ -1,61 +0,0 @@ -@extends('accounts.nav') - -@section('content') -@parent - -{{ Former::open_for_files('company/import_map')->addClass('col-md-9 col-md-offset-1') }} -{{ Former::legend('import_clients') }} -{{ Former::file('file')->label(trans('texts.csv_file')) }} -{{ Former::actions( Button::lg_info_submit(trans('texts.upload'))->append_with_icon('open') ) }} -{{ Former::close() }} - -{{ Former::open('company/export')->addClass('col-md-9 col-md-offset-1') }} -{{ Former::legend('export_clients') }} -{{ Former::actions( Button::lg_primary_submit(trans('texts.download'))->append_with_icon('download-alt') ) }} -{{ Former::close() }} - -

     

    -

     

    - -{{ Former::open('company/cancel_account')->addClass('col-md-9 col-md-offset-1 cancel-account') }} -{{ Former::legend('cancel_account') }} -{{ Former::actions( Button::lg_danger_button(trans('texts.cancel_account'), ['onclick' => 'showConfirm()'])->append_with_icon('trash') ) }} - - - -{{ Former::close() }} - - - - -@stop \ No newline at end of file diff --git a/app/views/accounts/import_map.blade.php b/app/views/accounts/import_map.blade.php deleted file mode 100755 index b1e4de004cbe..000000000000 --- a/app/views/accounts/import_map.blade.php +++ /dev/null @@ -1,73 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - - {{ Former::open('company/import_export')->addClass('warn-on-exit') }} - {{ Former::legend('import_clients') }} - - @if ($headers) - - - - - - - - - - - - @for ($i=0; $i - - - - - @endfor -
    {{ trans('texts.column') }}{{ trans('texts.sample') }}{{ trans('texts.import_to') }}
    {{ $headers[$i] }}{{ $data[1][$i] }}{{ Former::select('map[' . $i . ']')->options($columns, $mapped[$i], true)->raw() }}
    - - - @endif - - - {{ Former::actions( Button::lg_primary_submit(trans('texts.import')), ' | ', link_to('company/import', trans('texts.cancel')) ) }} - {{ Former::close() }} - - - -@stop \ No newline at end of file diff --git a/app/views/accounts/invoice_design.blade.php b/app/views/accounts/invoice_design.blade.php deleted file mode 100644 index 8124fb13bd53..000000000000 --- a/app/views/accounts/invoice_design.blade.php +++ /dev/null @@ -1,116 +0,0 @@ -@extends('accounts.nav') - -@section('head') - @parent - - - -@stop - -@section('content') - @parent - @include('accounts.nav_advanced') - - - - -
    -
    - - {{ Former::open()->addClass('warn-on-exit')->onchange('refreshPDF()') }} - {{ Former::populate($account) }} - {{ Former::populateField('hide_quantity', intval($account->hide_quantity)) }} - {{ Former::populateField('hide_paid_to_date', intval($account->hide_paid_to_date)) }} - - {{ Former::legend('invoice_design') }} - - - @if (!Utils::isPro() || InvoiceDesign::count() == COUNT_FREE_DESIGNS) - {{ Former::select('invoice_design_id')->style('display:inline;width:120px')->fromQuery($invoiceDesigns, 'name', 'id')->addOption(trans('texts.more_designs') . '...', '-1') }} - @else - {{ Former::select('invoice_design_id')->style('display:inline;width:120px')->fromQuery($invoiceDesigns, 'name', 'id') }} - @endif - - - - {{ Former::text('primary_color') }} - {{ Former::text('secondary_color') }} - -

     

    -

     

    - - {{ Former::legend('invoice_options') }} - {{ Former::checkbox('hide_quantity')->text(trans('texts.hide_quantity_help')) }} - {{ Former::checkbox('hide_paid_to_date')->text(trans('texts.hide_paid_to_date_help')) }} - -

     

    -

     

    - - @if (Auth::user()->isPro()) - {{ Former::actions( Button::lg_success_submit(trans('texts.save'))->append_with_icon('floppy-disk') ) }} - @else - - @endif - - {{ Former::close() }} - -
    -
    - - @include('invoices.pdf', ['account' => Auth::user()->account, 'pdfHeight' => 800]) - -
    -
    - -@stop \ No newline at end of file diff --git a/app/views/accounts/invoice_settings.blade.php b/app/views/accounts/invoice_settings.blade.php deleted file mode 100644 index bf789be9be32..000000000000 --- a/app/views/accounts/invoice_settings.blade.php +++ /dev/null @@ -1,73 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - @include('accounts.nav_advanced') - - {{ Former::open()->addClass('col-md-8 col-md-offset-2 warn-on-exit') }} - {{ Former::populate($account) }} - {{ Former::populateField('custom_invoice_taxes1', intval($account->custom_invoice_taxes1)) }} - {{ Former::populateField('custom_invoice_taxes2', intval($account->custom_invoice_taxes2)) }} - {{ Former::populateField('share_counter', intval($account->share_counter)) }} - - - {{ Former::legend('invoice_fields') }} - {{ Former::text('custom_invoice_label1')->label(trans('texts.field_label')) - ->append(Former::checkbox('custom_invoice_taxes1')->raw() . ' ' . trans('texts.charge_taxes')) }} - {{ Former::text('custom_invoice_label2')->label(trans('texts.field_label')) - ->append(Former::checkbox('custom_invoice_taxes2')->raw() . ' ' . trans('texts.charge_taxes')) }} -

     

    - - {{ Former::legend('client_fields') }} - {{ Former::text('custom_client_label1')->label(trans('texts.field_label')) }} - {{ Former::text('custom_client_label2')->label(trans('texts.field_label')) }} -

     

    - - {{ Former::legend('company_fields') }} - {{ Former::text('custom_label1')->label(trans('texts.field_label')) }} - {{ Former::text('custom_value1')->label(trans('texts.field_value')) }} -

     

    - {{ Former::text('custom_label2')->label(trans('texts.field_label')) }} - {{ Former::text('custom_value2')->label(trans('texts.field_value')) }} -

     

    - - {{ Former::legend('invoice_number') }} - {{ Former::text('invoice_number_prefix')->label(trans('texts.invoice_number_prefix')) }} - {{ Former::text('invoice_number_counter')->label(trans('texts.invoice_number_counter')) }} -

     

    - - {{ Former::legend('quote_number') }} - {{ Former::text('quote_number_prefix')->label(trans('texts.quote_number_prefix')) }} - {{ Former::text('quote_number_counter')->label(trans('texts.quote_number_counter')) - ->append(Former::checkbox('share_counter')->raw()->onclick('setQuoteNumberEnabled()') . ' ' . trans('texts.share_invoice_counter')) }} -

     

    - - @if (Auth::user()->isPro()) - {{ Former::actions( Button::lg_success_submit(trans('texts.save'))->append_with_icon('floppy-disk') ) }} - @else - - @endif - - {{ Former::close() }} - - - - - -@stop \ No newline at end of file diff --git a/app/views/accounts/nav.blade.php b/app/views/accounts/nav.blade.php deleted file mode 100755 index 5967295ffa9e..000000000000 --- a/app/views/accounts/nav.blade.php +++ /dev/null @@ -1,16 +0,0 @@ -@extends('header') - -@section('content') - - - -
    - -@stop \ No newline at end of file diff --git a/app/views/accounts/nav_advanced.blade.php b/app/views/accounts/nav_advanced.blade.php deleted file mode 100644 index 3f0d62789ca5..000000000000 --- a/app/views/accounts/nav_advanced.blade.php +++ /dev/null @@ -1,17 +0,0 @@ - -

     

    - -@if (!Auth::user()->account->isPro()) -
    -
    {{ trans('texts.pro_plan_advanced_settings', ['link'=>''.trans('texts.pro_plan.remove_logo_link').'']) }}
    -  

      -

    -@endif - -
    \ No newline at end of file diff --git a/app/views/accounts/notifications.blade.php b/app/views/accounts/notifications.blade.php deleted file mode 100755 index 08e0c97b4d82..000000000000 --- a/app/views/accounts/notifications.blade.php +++ /dev/null @@ -1,47 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - - {{ Former::open()->addClass('col-md-8 col-md-offset-2 warn-on-exit') }} - {{ Former::populate($account) }} - {{ Former::populateField('notify_sent', intval(Auth::user()->notify_sent)) }} - {{ Former::populateField('notify_viewed', intval(Auth::user()->notify_viewed)) }} - {{ Former::populateField('notify_paid', intval(Auth::user()->notify_paid)) }} - - {{ Former::legend('email_notifications') }} - {{ Former::checkbox('notify_sent')->label(' ')->text(trans('texts.email_sent')) }} - {{ Former::checkbox('notify_viewed')->label(' ')->text(trans('texts.email_viewed')) }} - {{ Former::checkbox('notify_paid')->label(' ')->text(trans('texts.email_paid')) }} - - {{ Former::legend('site_updates') }} - -
    - -
    - -
    - - -
       - - - - -
    - - {{ Former::legend('custom_messages') }} - {{ Former::textarea('invoice_terms')->label(trans('texts.default_invoice_terms')) }} - {{ Former::textarea('invoice_footer')->label(trans('texts.default_invoice_footer')) }} - {{ Former::textarea('email_footer')->label(trans('texts.default_email_footer')) }} - - {{ Former::actions( Button::lg_success_submit(trans('texts.save'))->append_with_icon('floppy-disk') ) }} - {{ Former::close() }} - -@stop \ No newline at end of file diff --git a/app/views/accounts/payments.blade.php b/app/views/accounts/payments.blade.php deleted file mode 100755 index abb07a11c787..000000000000 --- a/app/views/accounts/payments.blade.php +++ /dev/null @@ -1,60 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - - {{ Former::open('gateways/delete')->addClass('user-form') }} - {{ Former::legend('online_payments') }} - -
    - {{ Former::text('accountGatewayPublicId') }} -
    - {{ Former::close() }} - - - @if ($showAdd) - {{ Button::success_link(URL::to('gateways/create'), trans("texts.add_gateway"), array('class' => 'pull-right'))->append_with_icon('plus-sign') }} - @endif - - {{ Datatable::table() - ->addColumn( - trans('texts.name'), - trans('texts.action')) - ->setUrl(url('api/gateways/')) - ->setOptions('sPaginationType', 'bootstrap') - ->setOptions('bFilter', false) - ->setOptions('bAutoWidth', false) - ->setOptions('aoColumns', [[ "sWidth"=> "80%" ], ["sWidth"=> "20%"]]) - ->setOptions('aoColumnDefs', [['bSortable'=>false, 'aTargets'=>[1]]]) - ->render('datatable') }} - - - -@stop \ No newline at end of file diff --git a/app/views/accounts/product.blade.php b/app/views/accounts/product.blade.php deleted file mode 100644 index 9fe08652c237..000000000000 --- a/app/views/accounts/product.blade.php +++ /dev/null @@ -1,56 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - - {{ Former::open($url)->method($method) - ->rules(['product_key' => 'required|max:20']) - ->addClass('col-md-8 col-md-offset-2 warn-on-exit') }} - - - {{ Former::legend($title) }} - - @if ($product) - {{ Former::populate($product) }} - {{ Former::populateField('cost', number_format($product->cost, 2, '.', '')) }} - @endif - - {{ Former::text('product_key')->label('texts.product') }} - {{ Former::textarea('notes')->data_bind("value: wrapped_notes, valueUpdate: 'afterkeydown'") }} - {{ Former::text('cost') }} - - {{ Former::actions( - Button::lg_success_submit(trans('texts.save'))->append_with_icon('floppy-disk'), - Button::lg_default_link('company/products', trans('texts.cancel'))->append_with_icon('remove-circle') - ) }} - - {{ Former::close() }} - - - -@stop \ No newline at end of file diff --git a/app/views/accounts/products.blade.php b/app/views/accounts/products.blade.php deleted file mode 100644 index 26cd3b66ee90..000000000000 --- a/app/views/accounts/products.blade.php +++ /dev/null @@ -1,48 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - - {{ Former::open()->addClass('col-md-10 col-md-offset-1 warn-on-exit') }} - {{ Former::populateField('fill_products', intval($account->fill_products)) }} - {{ Former::populateField('update_products', intval($account->update_products)) }} - - - {{ Former::legend('product_library') }} - {{ Former::checkbox('fill_products')->text(trans('texts.fill_products_help')) }} - {{ Former::checkbox('update_products')->text(trans('texts.update_products_help')) }} -   - {{ Former::actions( Button::lg_success_submit(trans('texts.save'))->append_with_icon('floppy-disk') ) }} - {{ Former::close() }} - - {{ Button::success_link(URL::to('products/create'), trans("texts.create_product"), array('class' => 'pull-right'))->append_with_icon('plus-sign') }} - - {{ Datatable::table() - ->addColumn( - trans('texts.product'), - trans('texts.description'), - trans('texts.unit_cost'), - trans('texts.action')) - ->setUrl(url('api/products/')) - ->setOptions('sPaginationType', 'bootstrap') - ->setOptions('bFilter', false) - ->setOptions('bAutoWidth', false) - ->setOptions('aoColumns', [[ "sWidth"=> "20%" ], [ "sWidth"=> "45%" ], ["sWidth"=> "20%"], ["sWidth"=> "15%" ]]) - ->setOptions('aoColumnDefs', [['bSortable'=>false, 'aTargets'=>[3]]]) - ->render('datatable') }} - - - - -@stop \ No newline at end of file diff --git a/app/views/accounts/token.blade.php b/app/views/accounts/token.blade.php deleted file mode 100644 index ace566e9dbf3..000000000000 --- a/app/views/accounts/token.blade.php +++ /dev/null @@ -1,30 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - @include('accounts.nav_advanced') - - {{ Former::open($url)->method($method)->addClass('col-md-8 col-md-offset-2 warn-on-exit')->rules(array( - 'name' => 'required', - )); }} - - {{ Former::legend($title) }} - -

     

    - - @if ($token) - {{ Former::populate($token) }} - @endif - - {{ Former::text('name') }} - -

     

    - - {{ Former::actions( - Button::lg_success_submit(trans('texts.save'))->append_with_icon('floppy-disk'), - Button::lg_default_link('company/advanced_settings/token_management', trans('texts.cancel'))->append_with_icon('remove-circle') - ) }} - - {{ Former::close() }} - -@stop \ No newline at end of file diff --git a/app/views/accounts/token_management.blade.php b/app/views/accounts/token_management.blade.php deleted file mode 100644 index 9f1c0ed1c729..000000000000 --- a/app/views/accounts/token_management.blade.php +++ /dev/null @@ -1,67 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - @include('accounts.nav_advanced') - - {{ Former::open('tokens/delete')->addClass('user-form') }} - {{ Former::legend('token_management') }} - -
    - {{ Former::text('tokenPublicId') }} -
    - {{ Former::close() }} - - - @if (Utils::isPro()) - {{ Button::success_link(URL::to('tokens/create'), trans("texts.add_token"), array('class' => 'pull-right'))->append_with_icon('plus-sign') }} - @endif - - - - {{ Datatable::table() - ->addColumn( - trans('texts.name'), - trans('texts.token'), - trans('texts.action')) - ->setUrl(url('api/tokens/')) - ->setOptions('sPaginationType', 'bootstrap') - ->setOptions('bFilter', false) - ->setOptions('bAutoWidth', false) - ->setOptions('aoColumns', [[ "sWidth"=> "40%" ], [ "sWidth"=> "40%" ], ["sWidth"=> "20%"]]) - ->setOptions('aoColumnDefs', [['bSortable'=>false, 'aTargets'=>[2]]]) - ->render('datatable') }} - - - -@stop diff --git a/app/views/accounts/user_management.blade.php b/app/views/accounts/user_management.blade.php deleted file mode 100644 index c0e8e2819e8e..000000000000 --- a/app/views/accounts/user_management.blade.php +++ /dev/null @@ -1,71 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - @include('accounts.nav_advanced') - - {{ Former::open('users/delete')->addClass('user-form') }} - {{ Former::legend('user_management') }} - -
    - {{ Former::text('userPublicId') }} -
    - {{ Former::close() }} - - -
    - @if (Utils::isPro()) - {{ Button::success_link(URL::to('users/create'), trans("texts.add_user"))->append_with_icon('plus-sign') }} - @endif - {{ Button::default_link(URL::to('company/advanced_settings/token_management'), trans("texts.api_tokens"))->append_with_icon('cloud') }} -
    - - - - - - {{ Datatable::table() - ->addColumn( - trans('texts.name'), - trans('texts.email'), - trans('texts.user_state'), - trans('texts.action')) - ->setUrl(url('api/users/')) - ->setOptions('sPaginationType', 'bootstrap') - ->setOptions('bFilter', false) - ->setOptions('bAutoWidth', false) - ->setOptions('aoColumns', [[ "sWidth"=> "20%" ], [ "sWidth"=> "45%" ], ["sWidth"=> "20%"], ["sWidth"=> "15%" ]]) - ->setOptions('aoColumnDefs', [['bSortable'=>false, 'aTargets'=>[3]]]) - ->render('datatable') }} - - - -@stop diff --git a/app/views/client.blade.php b/app/views/client.blade.php deleted file mode 100755 index ef22259a0654..000000000000 --- a/app/views/client.blade.php +++ /dev/null @@ -1,99 +0,0 @@ - -
    -
    - - {{ Former::legend('Organization') }} - {{ Former::text('name') }} - {{ Former::text('id_number') }} - {{ Former::text('vat_number') }} - {{ Former::text('work_phone')->label('Phone') }} - {{ Former::textarea('notes') }} - - - {{ Former::legend('Address') }} - {{ Former::text('address1')->label('Street') }} - {{ Former::text('address2')->label('Apt/Floor') }} - {{ Former::text('city') }} - {{ Former::text('state') }} - {{ Former::text('postal_code') }} - {{ Former::select('country_id')->addOption('','')->label('Country') - ->fromQuery($countries, 'name', 'id') }} - - -
    -
    - - {{ Former::legend('Contacts') }} -
    - {{ Former::hidden('public_id')->data_bind("value: public_id, valueUpdate: 'afterkeydown'") }} - {{ Former::text('first_name')->data_bind("value: first_name, valueUpdate: 'afterkeydown'") }} - {{ Former::text('last_name')->data_bind("value: last_name, valueUpdate: 'afterkeydown'") }} - {{ Former::text('email')->data_bind("value: email, valueUpdate: 'afterkeydown'") }} - {{ Former::text('phone')->data_bind("value: phone, valueUpdate: 'afterkeydown'") }} - -
    -
    - - {{ link_to('#', 'Remove contact', array('data-bind'=>'click: $parent.removeContact')) }} - - - {{ link_to('#', 'Add contact', array('onclick'=>'return addContact()')) }} - -
    -
    - -
    - -
    -
    - - -{{ Former::hidden('data')->data_bind("value: ko.toJSON(model)") }} - - - diff --git a/app/views/clients/edit.blade.php b/app/views/clients/edit.blade.php deleted file mode 100755 index 6d9eac7c7625..000000000000 --- a/app/views/clients/edit.blade.php +++ /dev/null @@ -1,168 +0,0 @@ -@extends('header') - - -@section('onReady') - $('input#name').focus(); -@stop - -@section('content') -
    - - - {{ Former::open($url)->addClass('col-md-12 warn-on-exit')->method($method)->rules(array( - 'email' => 'email|required' - )); }} - - @if ($client) - {{ Former::populate($client) }} - @endif - -
    -
    - - - {{ Former::legend('organization') }} - {{ Former::text('name')->data_bind("attr { placeholder: placeholderName }") }} - {{ Former::text('id_number') }} - {{ Former::text('vat_number') }} - {{ Former::text('website') }} - {{ Former::text('work_phone') }} - - @if (Auth::user()->isPro()) - @if ($customLabel1) - {{ Former::text('custom_value1')->label($customLabel1) }} - @endif - @if ($customLabel2) - {{ Former::text('custom_value2')->label($customLabel2) }} - @endif - @endif - - {{ Former::legend('address') }} - {{ Former::text('address1') }} - {{ Former::text('address2') }} - {{ Former::text('city') }} - {{ Former::text('state') }} - {{ Former::text('postal_code') }} - {{ Former::select('country_id')->addOption('','') - ->fromQuery($countries, 'name', 'id') }} - - -
    -
    - - {{ Former::legend('contacts') }} -
    - {{ Former::hidden('public_id')->data_bind("value: public_id, valueUpdate: 'afterkeydown'") }} - {{ Former::text('first_name')->data_bind("value: first_name, valueUpdate: 'afterkeydown'") }} - {{ Former::text('last_name')->data_bind("value: last_name, valueUpdate: 'afterkeydown'") }} - {{ Former::text('email')->data_bind('value: email, valueUpdate: \'afterkeydown\', attr: {id:\'email\'+$index()}') }} - {{ Former::text('phone')->data_bind("value: phone, valueUpdate: 'afterkeydown'") }} - -
    -
    - - {{ link_to('#', trans('texts.remove_contact').' -', array('data-bind'=>'click: $parent.removeContact')) }} - - - {{ link_to('#', trans('texts.add_contact').' +', array('onclick'=>'return addContact()')) }} - -
    -
    -
    - - {{ Former::legend('additional_info') }} - {{ Former::select('payment_terms')->addOption('','') - ->fromQuery($paymentTerms, 'name', 'num_days') }} - {{ Former::select('currency_id')->addOption('','') - ->fromQuery($currencies, 'name', 'id') }} - {{ Former::select('size_id')->addOption('','') - ->fromQuery($sizes, 'name', 'id') }} - {{ Former::select('industry_id')->addOption('','') - ->fromQuery($industries, 'name', 'id') }} - {{ Former::textarea('private_notes') }} - - -
    -
    - - - {{ Former::hidden('data')->data_bind("value: ko.toJSON(model)") }} - - - -
    - {{ Button::lg_primary_submit_success(trans('texts.save'))->append_with_icon('floppy-disk') }} - {{ Button::lg_default_link('clients/' . ($client ? $client->public_id : ''), trans('texts.cancel'))->append_with_icon('remove-circle'); }} -
    - - {{ Former::close() }} -
    -@stop diff --git a/app/views/clients/show.blade.php b/app/views/clients/show.blade.php deleted file mode 100755 index c162d2939052..000000000000 --- a/app/views/clients/show.blade.php +++ /dev/null @@ -1,233 +0,0 @@ -@extends('header') - -@section('content') - - -
    - {{ Former::open('clients/bulk')->addClass('mainForm') }} -
    - {{ Former::text('action') }} - {{ Former::text('id')->value($client->public_id) }} -
    - - @if ($gatewayLink) - {{ Button::link($gatewayLink, trans('texts.view_in_stripe'), ['target' => '_blank']) }} - @endif - - @if ($client->trashed()) - {{ Button::primary(trans('texts.restore_client'), ['onclick' => 'onRestoreClick()']) }} - @else - {{ DropdownButton::normal(trans('texts.edit_client'), - Navigation::links( - [ - [trans('texts.edit_client'), URL::to('clients/' . $client->public_id . '/edit')], - [Navigation::DIVIDER], - [trans('texts.archive_client'), "javascript:onArchiveClick()"], - [trans('texts.delete_client'), "javascript:onDeleteClick()"], - ] - ) - , ['id'=>'normalDropDown'])->split(); }} - - {{ DropdownButton::primary(trans('texts.create_invoice'), Navigation::links($actionLinks), ['id'=>'primaryDropDown'])->split(); }} - @endif - {{ Former::close() }} - -
    - - -

    {{ $client->getDisplayName() }}

    - @if ($client->last_login > 0) -

    - {{ trans('texts.last_logged_in') }} {{ Utils::timestampToDateTimeString(strtotime($client->last_login)); }} -

    - @endif - -
    - -
    -

    {{ trans('texts.details') }}

    -

    {{ $client->getIdNumber() }}

    -

    {{ $client->getVatNumber() }}

    -

    {{ $client->getAddress() }}

    -

    {{ $client->getCustomFields() }}

    -

    {{ $client->getPhone() }}

    -

    {{ $client->getNotes() }}

    -

    {{ $client->getIndustry() }}

    -

    {{ $client->getWebsite() }}

    -

    {{ $client->payment_terms ? trans('texts.payment_terms') . ": Net " . $client->payment_terms : '' }}

    -
    - -
    -

    {{ trans('texts.contacts') }}

    - @foreach ($client->contacts as $contact) - {{ $contact->getDetails() }} - @endforeach -
    - -
    -

    {{ trans('texts.standing') }} - - - - - - - - - - @if ($credit > 0) - - - - - @endif -
    {{ trans('texts.paid_to_date') }}{{ Utils::formatMoney($client->paid_to_date, $client->currency_id); }}
    {{ trans('texts.balance') }}{{ Utils::formatMoney($client->balance, $client->currency_id); }}
    {{ trans('texts.credit') }}{{ Utils::formatMoney($credit, $client->currency_id); }}
    -

    - -
    -
    - -

     

    - - - -
    - -
    - - {{ Datatable::table() - ->addColumn( - trans('texts.date'), - trans('texts.message'), - trans('texts.balance'), - trans('texts.adjustment')) - ->setUrl(url('api/activities/'. $client->public_id)) - ->setOptions('sPaginationType', 'bootstrap') - ->setOptions('bFilter', false) - ->setOptions('aaSorting', [['0', 'desc']]) - ->render('datatable') }} - -
    - - @if (Utils::isPro()) -
    - - {{ Datatable::table() - ->addColumn( - trans('texts.quote_number'), - trans('texts.quote_date'), - trans('texts.total'), - trans('texts.due_date'), - trans('texts.status')) - ->setUrl(url('api/quotes/'. $client->public_id)) - ->setOptions('sPaginationType', 'bootstrap') - ->setOptions('bFilter', false) - ->setOptions('aaSorting', [['0', 'desc']]) - ->render('datatable') }} - -
    - @endif - -
    - - @if ($hasRecurringInvoices) - {{ Datatable::table() - ->addColumn( - trans('texts.frequency_id'), - trans('texts.start_date'), - trans('texts.end_date'), - trans('texts.invoice_total')) - ->setUrl(url('api/recurring_invoices/' . $client->public_id)) - ->setOptions('sPaginationType', 'bootstrap') - ->setOptions('bFilter', false) - ->setOptions('aaSorting', [['0', 'asc']]) - ->render('datatable') }} - @endif - - {{ Datatable::table() - ->addColumn( - trans('texts.invoice_number'), - trans('texts.invoice_date'), - trans('texts.invoice_total'), - trans('texts.balance_due'), - trans('texts.due_date'), - trans('texts.status')) - ->setUrl(url('api/invoices/' . $client->public_id)) - ->setOptions('sPaginationType', 'bootstrap') - ->setOptions('bFilter', false) - ->setOptions('aaSorting', [['0', 'asc']]) - ->render('datatable') }} - -
    -
    - - {{ Datatable::table() - ->addColumn( - trans('texts.invoice'), - trans('texts.transaction_reference'), - trans('texts.method'), - trans('texts.payment_amount'), - trans('texts.payment_date')) - ->setUrl(url('api/payments/' . $client->public_id)) - ->setOptions('sPaginationType', 'bootstrap') - ->setOptions('bFilter', false) - ->setOptions('aaSorting', [['0', 'asc']]) - ->render('datatable') }} - -
    -
    - - {{ Datatable::table() - ->addColumn( - trans('texts.credit_amount'), - trans('texts.credit_balance'), - trans('texts.credit_date'), - trans('texts.private_notes')) - ->setUrl(url('api/credits/' . $client->public_id)) - ->setOptions('sPaginationType', 'bootstrap') - ->setOptions('bFilter', false) - ->setOptions('aaSorting', [['0', 'asc']]) - ->render('datatable') }} - -
    -
    - - - -@stop \ No newline at end of file diff --git a/app/views/coming_soon.blade.php b/app/views/coming_soon.blade.php deleted file mode 100755 index 3f9decc68696..000000000000 --- a/app/views/coming_soon.blade.php +++ /dev/null @@ -1,35 +0,0 @@ -@extends('master') - -@section('body') - - - -
    - coming soon -
    - -@stop \ No newline at end of file diff --git a/app/views/credits/edit.blade.php b/app/views/credits/edit.blade.php deleted file mode 100755 index 1b02490817a9..000000000000 --- a/app/views/credits/edit.blade.php +++ /dev/null @@ -1,64 +0,0 @@ -@extends('header') - - -@section('onReady') - $('input#name').focus(); -@stop - -@section('content') - - - {{ Former::open($url)->addClass('col-md-10 col-md-offset-1 warn-on-exit')->method($method)->rules(array( - 'client' => 'required', - 'amount' => 'required', - )); }} - -
    -
    - - {{ Former::select('client')->addOption('', '')->addGroupClass('client-select') }} - {{ Former::text('amount') }} - {{ Former::text('credit_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('') }} - {{-- Former::select('currency_id')->addOption('','') - ->fromQuery($currencies, 'name', 'id')->select(Session::get(SESSION_CURRENCY, DEFAULT_CURRENCY)) --}} - {{ Former::textarea('private_notes') }} - -
    -
    - -
    -
    -
    - {{ Button::lg_primary_submit_success(trans('texts.save'))->append_with_icon('floppy-disk') }} - {{ Button::lg_default_link('credits/' . ($credit ? $credit->public_id : ''), trans('texts.cancel'))->append_with_icon('remove-circle'); }} -
    - - {{ Former::close() }} - - - -@stop diff --git a/app/views/dashboard.blade.php b/app/views/dashboard.blade.php deleted file mode 100644 index 8383e06c3a96..000000000000 --- a/app/views/dashboard.blade.php +++ /dev/null @@ -1,159 +0,0 @@ -@extends('header') - -@section('content') - -
    -
    -
    -
    - -
    - @if (count($paidToDate)) - @foreach ($paidToDate as $item) - {{ Utils::formatMoney($item->value, $item->currency_id); }}
    - @endforeach - @else - {{ Utils::formatMoney(0) }} - @endif -
    -
    - {{ trans('texts.in_total_revenue') }} -
    -
    -
    -
    -
    -
    -
    - -
    - {{ $billedClients }} -
    -
    - {{ Utils::pluralize('billed_client', $billedClients) }} -
    -
    -
    -
    -
    -
    -
    - -
    - {{ $invoicesSent }} -
    -
    - {{ Utils::pluralize('invoice', $invoicesSent) }} {{ trans('texts.sent') }} -
    -
    -
    -
    -
    - - -

     

    - -
    -
    -
    -
    -

    - {{ trans('texts.notifications') }} -

    -
    -
      - @foreach ($activities as $activity) -
    • - {{ Utils::timestampToDateString(strtotime($activity->created_at)) }}: - {{ Utils::decodeActivity($activity->message) }} -
    • - @endforeach -
    -
    -
    -
    -
    -
    -

    - {{ trans('texts.invoices_past_due') }} -

    -
    -
    - - - - - - - - - @foreach ($pastDue as $invoice) - @if (!$invoice->client->trashed()) - - - - - - - @endif - @endforeach - -
    {{ trans('texts.invoice_number_short') }}{{ trans('texts.client') }}{{ trans('texts.due_date') }}{{ trans('texts.balance_due') }}
    {{ $invoice->getLink() }}{{ $invoice->client->getDisplayName() }}{{ Utils::fromSqlDate($invoice->due_date) }}{{ Utils::formatMoney($invoice->balance, $invoice->client->currency_id) }}
    -
    -
    -
    -
    - -
    -
    -
    -
    -

    - {{ trans('texts.upcoming_invoices') }} -

    -
    -
    - - - - - - - - - @foreach ($upcoming as $invoice) - @if (!$invoice->client->trashed()) - - - - - - - @endif - @endforeach - -
    {{ trans('texts.invoice_number_short') }}{{ trans('texts.client') }}{{ trans('texts.due_date') }}{{ trans('texts.balance_due') }}
    {{ $invoice->getLink() }}{{ $invoice->client->getDisplayName() }}{{ Utils::fromSqlDate($invoice->due_date) }}{{ Utils::formatMoney($invoice->balance, $invoice->client->currency_id) }}
    -
    -
    -
    -
    -
    -
    {{ $activeClients }}
    -
    {{ Utils::pluralize('active_client', $activeClients) }}
    -
    -
    -
    -
    -
    {{ trans('texts.average_invoice') }}
    -
    - @foreach ($averageInvoice as $item) - {{ Utils::formatMoney($item->invoice_avg, $item->currency_id); }}
    - @endforeach -
    -
    - -
    -
    - -@stop - diff --git a/app/views/datatable.blade.php b/app/views/datatable.blade.php deleted file mode 100755 index af3b3e5df5a3..000000000000 --- a/app/views/datatable.blade.php +++ /dev/null @@ -1,68 +0,0 @@ - - - @for ($i = 0; $i < count($columns); $i++) - - @endfor - - - - @foreach($columns as $i => $c) - - @endforeach - - - - @foreach($data as $d) - - @foreach($d as $dd) - - @endforeach - - @endforeach - -
    - @if ($c == 'checkbox' && $hasCheckboxes = true) - - @else - {{ $c }} - @endif -
    {{ $dd }}
    - \ No newline at end of file diff --git a/app/views/emails/auth/reminder.blade.php b/app/views/emails/auth/reminder.blade.php deleted file mode 100755 index 2976327b5df2..000000000000 --- a/app/views/emails/auth/reminder.blade.php +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - -

    Password Reset

    - -
    - To reset your password, complete this form: {{ URL::to('password/reset', array($token)) }}. -
    - - \ No newline at end of file diff --git a/app/views/emails/confirm_html.blade.php b/app/views/emails/confirm_html.blade.php deleted file mode 100755 index bcd4ca4b1ed5..000000000000 --- a/app/views/emails/confirm_html.blade.php +++ /dev/null @@ -1,41 +0,0 @@ - - -@if (!$invitationMessage) - -@endif - -

    {{ trans('texts.confirmation_header') }}

    - -

    - {{ $invitationMessage . trans('texts.confirmation_message') }}
    - - {{{ URL::to("user/confirm/{$user->confirmation_code}") }}} - -

    - - {{ trans('texts.email_signature') }}
    - {{ trans('texts.email_from') }} -

    - - - \ No newline at end of file diff --git a/app/views/emails/confirm_text.blade.php b/app/views/emails/confirm_text.blade.php deleted file mode 100644 index ff5c8107c40e..000000000000 --- a/app/views/emails/confirm_text.blade.php +++ /dev/null @@ -1,7 +0,0 @@ -{{ trans('texts.confirmation_header') }} - -{{ $invitationMessage . trans('texts.confirmation_message') }} -{{{ URL::to("user/confirm/{$user->confirmation_code}") }}} - -{{ trans('texts.email_signature') }} -{{ trans('texts.email_from') }} \ No newline at end of file diff --git a/app/views/emails/contact_html.blade.php b/app/views/emails/contact_html.blade.php deleted file mode 100644 index 120f94c0f1bf..000000000000 --- a/app/views/emails/contact_html.blade.php +++ /dev/null @@ -1 +0,0 @@ -{{ nl2br($text) }} diff --git a/app/views/emails/contact_text.blade.php b/app/views/emails/contact_text.blade.php deleted file mode 100644 index 8c1a40ba956a..000000000000 --- a/app/views/emails/contact_text.blade.php +++ /dev/null @@ -1 +0,0 @@ -{{ $text }} \ No newline at end of file diff --git a/app/views/emails/error.blade.php b/app/views/emails/error.blade.php deleted file mode 100755 index e69de29bb2d1..000000000000 diff --git a/app/views/emails/invoice_html.blade.php b/app/views/emails/invoice_html.blade.php deleted file mode 100755 index 362047cf6f25..000000000000 --- a/app/views/emails/invoice_html.blade.php +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - @include('emails.view_action', ['link' => $link, 'entityType' => $entityType]) - {{ $body }} - - \ No newline at end of file diff --git a/app/views/emails/invoice_paid_html.blade.php b/app/views/emails/invoice_paid_html.blade.php deleted file mode 100755 index 7cdd6932b73a..000000000000 --- a/app/views/emails/invoice_paid_html.blade.php +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - @include('emails.view_action', ['link' => $invoiceLink, 'entityType' => $entityType]) - {{ trans('texts.email_salutation', ['name' => $userName]) }}

    - - {{ trans("texts.notification_{$entityType}_paid", ['amount' => $paymentAmount, 'client' => $clientName, 'invoice' => $invoiceNumber]) }}

    - - {{ trans("texts.{$entityType}_link_message") }}
    - {{ $invoiceLink }}

    - - {{ trans('texts.email_signature') }}
    - {{ trans('texts.email_from') }}

    - {{ trans('texts.user_email_footer') }}

    - - - - \ No newline at end of file diff --git a/app/views/emails/invoice_paid_text.blade.php b/app/views/emails/invoice_paid_text.blade.php deleted file mode 100755 index 77f29aed49c4..000000000000 --- a/app/views/emails/invoice_paid_text.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -{{ trans('texts.email_salutation', ['name' => $userName]) }} - -{{ trans("texts.notification_{$entityType}_paid", ['amount' => $paymentAmount, 'client' => $clientName, 'invoice' => $invoiceNumber]) }} - -{{ trans("texts.{$entityType}_link_message") }} -{{ $invoiceLink }} - -{{ trans('texts.email_signature') }} -{{ trans('texts.email_from') }} - -{{ trans('texts.user_email_footer') }} \ No newline at end of file diff --git a/app/views/emails/invoice_sent_html.blade.php b/app/views/emails/invoice_sent_html.blade.php deleted file mode 100755 index 8663def2fd1d..000000000000 --- a/app/views/emails/invoice_sent_html.blade.php +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - @include('emails.view_action', ['link' => $invoiceLink, 'entityType' => $entityType]) - {{ trans('texts.email_salutation', ['name' => $userName]) }}

    - - {{ trans("texts.notification_{$entityType}_sent", ['amount' => $invoiceAmount, 'client' => $clientName, 'invoice' => $invoiceNumber]) }}

    - - {{ trans('texts.email_signature') }}
    - {{ trans('texts.email_from') }}

    - - {{ trans('texts.user_email_footer') }}

    - - - \ No newline at end of file diff --git a/app/views/emails/invoice_sent_text.blade.php b/app/views/emails/invoice_sent_text.blade.php deleted file mode 100755 index 72a595078029..000000000000 --- a/app/views/emails/invoice_sent_text.blade.php +++ /dev/null @@ -1,8 +0,0 @@ -{{ trans('texts.email_salutation', ['name' => $userName]) }} - -{{ trans("texts.notification_{$entityType}_sent", ['amount' => $invoiceAmount, 'client' => $clientName, 'invoice' => $invoiceNumber]) }} - -{{ trans('texts.email_signature') }} -{{ trans('texts.email_from') }} - -{{ trans('texts.user_email_footer') }} \ No newline at end of file diff --git a/app/views/emails/invoice_text.blade.php b/app/views/emails/invoice_text.blade.php deleted file mode 100755 index 022b18abd1a5..000000000000 --- a/app/views/emails/invoice_text.blade.php +++ /dev/null @@ -1 +0,0 @@ -{{ strip_tags($body) }} \ No newline at end of file diff --git a/app/views/emails/invoice_viewed_html.blade.php b/app/views/emails/invoice_viewed_html.blade.php deleted file mode 100755 index 78e0423e4b55..000000000000 --- a/app/views/emails/invoice_viewed_html.blade.php +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - @include('emails.view_action', ['link' => $invoiceLink, 'entityType' => $entityType]) - {{ trans('texts.email_salutation', ['name' => $userName]) }}

    - - {{ trans("texts.notification_{$entityType}_viewed", ['amount' => $invoiceAmount, 'client' => $clientName, 'invoice' => $invoiceNumber]) }}

    - - {{ trans('texts.email_signature') }}
    - {{ trans('texts.email_from') }}

    - - {{ trans('texts.user_email_footer') }}

    - - - \ No newline at end of file diff --git a/app/views/emails/invoice_viewed_text.blade.php b/app/views/emails/invoice_viewed_text.blade.php deleted file mode 100755 index 7b9dadd21cdf..000000000000 --- a/app/views/emails/invoice_viewed_text.blade.php +++ /dev/null @@ -1,8 +0,0 @@ -{{ trans('texts.email_salutation', ['name' => $userName]) }} - -{{ trans("texts.notification_{$entityType}_viewed", ['amount' => $invoiceAmount, 'client' => $clientName, 'invoice' => $invoiceNumber]) }} - -{{ trans('texts.email_signature') }} -{{ trans('texts.email_from') }} - -{{ trans('texts.user_email_footer') }} \ No newline at end of file diff --git a/app/views/emails/license_confirmation_html.blade.php b/app/views/emails/license_confirmation_html.blade.php deleted file mode 100644 index 172e299e3f77..000000000000 --- a/app/views/emails/license_confirmation_html.blade.php +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - {{ $client }},

    - - {{ trans('texts.payment_message', ['amount' => $amount]) }}

    - - {{ $license }}

    - - {{ trans('texts.email_signature') }}
    - {{ $account }} - - - \ No newline at end of file diff --git a/app/views/emails/license_confirmation_text.blade.php b/app/views/emails/license_confirmation_text.blade.php deleted file mode 100644 index d8ee711c9aa8..000000000000 --- a/app/views/emails/license_confirmation_text.blade.php +++ /dev/null @@ -1,8 +0,0 @@ -{{ $client }}, - -{{ trans('texts.payment_message', ['amount' => $amount]) }} - -{{ $license }} - -{{ trans('texts.email_signature') }} -{{ $account }} \ No newline at end of file diff --git a/app/views/emails/passwordreset_html.blade.php b/app/views/emails/passwordreset_html.blade.php deleted file mode 100644 index 52ad2763ed5f..000000000000 --- a/app/views/emails/passwordreset_html.blade.php +++ /dev/null @@ -1,9 +0,0 @@ -{{ trans('texts.email_salutation', ['name' => $user->username]) }}

    - -{{ trans('texts.reset_password') }}
    -{{{ (Confide::checkAction('UserController@reset_password', array($token))) ? : URL::to('user/reset/'.$token) }}}

    - -{{ trans('texts.email_signature') }}
    -{{ trans('texts.email_from') }}

    - -{{ trans('texts.reset_password_footer') }}

    \ No newline at end of file diff --git a/app/views/emails/payment_confirmation_html.blade.php b/app/views/emails/payment_confirmation_html.blade.php deleted file mode 100644 index f96d52c7f918..000000000000 --- a/app/views/emails/payment_confirmation_html.blade.php +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - {{ $body }} - diff --git a/app/views/emails/payment_confirmation_text.blade.php b/app/views/emails/payment_confirmation_text.blade.php deleted file mode 100644 index 022b18abd1a5..000000000000 --- a/app/views/emails/payment_confirmation_text.blade.php +++ /dev/null @@ -1 +0,0 @@ -{{ strip_tags($body) }} \ No newline at end of file diff --git a/app/views/emails/view_action.blade.php b/app/views/emails/view_action.blade.php deleted file mode 100644 index 718af5a5968d..000000000000 --- a/app/views/emails/view_action.blade.php +++ /dev/null @@ -1,17 +0,0 @@ - \ No newline at end of file diff --git a/app/views/error.blade.php b/app/views/error.blade.php deleted file mode 100755 index a1397db1820e..000000000000 --- a/app/views/error.blade.php +++ /dev/null @@ -1,20 +0,0 @@ -@extends('public.header') - -@section('content') - -

     

    -

     

    - -

    -
    -

    {{ $error }}

    - Looks like something went wrong.
    - If you'd like help please email us at contact@invoiceninja.com. -
    -
    - -

     

    -

     

    - - -@stop \ No newline at end of file diff --git a/app/views/header.blade.php b/app/views/header.blade.php deleted file mode 100755 index c34a53c62667..000000000000 --- a/app/views/header.blade.php +++ /dev/null @@ -1,605 +0,0 @@ -@extends('master') - - -@section('head') - - - - - - @include('script') - -@stop - -@section('body') - -

    - - - -
    -
    - - @if (!isset($showBreadcrumbs) || $showBreadcrumbs) - {{ HTML::breadcrumbs() }} - @endif - - @if (Session::has('warning')) -
    {{ Session::get('warning') }}
    - @endif - - @if (Session::has('message')) -
    - {{ Session::get('message') }} -
    - @elseif (Session::has('news_feed_message')) -
    - {{ Session::get('news_feed_message') }} - {{ trans('texts.hide') }} -
    - @endif - - @if (Session::has('error')) -
    {{ Session::get('error') }}
    - @endif - - @yield('content') - -
    -
    - -
    -
    - - -@if (!Auth::check() || !Auth::user()->registered) - - - - -@endif - -@if (Auth::check() && !Auth::user()->isPro()) - - - -@endif - -{{-- Per our license, please do not remove or modify this link. --}} -@if (!Utils::isNinja()) -
    - {{ trans('texts.powered_by') }} InvoiceNinja.com | - @if (Auth::user()->account->isWhiteLabel()) - {{ trans('texts.white_labeled') }} - @else - {{ trans('texts.white_label_link') }} - - - @endif -
    -@endif - -

     

    - - - - - - - -@stop \ No newline at end of file diff --git a/app/views/invoices/deleted.blade.php b/app/views/invoices/deleted.blade.php deleted file mode 100755 index 89a7659ea1a1..000000000000 --- a/app/views/invoices/deleted.blade.php +++ /dev/null @@ -1 +0,0 @@ -The requested invoice is no longer available. \ No newline at end of file diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php deleted file mode 100755 index 93a6e3da8f7a..000000000000 --- a/app/views/invoices/edit.blade.php +++ /dev/null @@ -1,1671 +0,0 @@ -@extends('header') - -@section('head') - @parent - - - -@stop - -@section('content') - - @if ($invoice && $invoice->id) - - @endif - - {{ Former::open($url)->method($method)->addClass('warn-on-exit')->rules(array( - 'client' => 'required', - 'email' => 'required', - 'product_key' => 'max:20' - )) }} - - - -
    -
    -
    - - @if ($invoice && $invoice->id) -
    - -
    - -
    -
    -
    - @endif - - {{ Former::select('client')->addOption('', '')->data_bind("dropdown: client")->addGroupClass('client_select closer-row') }} - -
    -
    - -
    -
    - - @if ($invoice && $invoice->id) -
    - @endif - -
    - -
    - -
    -
    -
    - {{ Former::text('invoice_date')->data_bind("datePicker: invoice_date, valueUpdate: 'afterkeydown'")->label(trans("texts.{$entityType}_date")) - ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('') }} - {{ Former::text('due_date')->data_bind("datePicker: due_date, valueUpdate: 'afterkeydown'") - ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('') }} -
    - @if ($entityType == ENTITY_INVOICE) -
    - {{ Former::select('frequency_id')->options($frequencies)->data_bind("value: frequency_id") }} - {{ Former::text('start_date')->data_bind("datePicker: start_date, valueUpdate: 'afterkeydown'") - ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('') }} - {{ Former::text('end_date')->data_bind("datePicker: end_date, valueUpdate: 'afterkeydown'") - ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('') }} -
    - @if ($invoice && $invoice->recurring_invoice_id) -
    - Created by a {{ link_to('/invoices/'.$invoice->recurring_invoice_id, 'recurring invoice') }} -
    - @else -
    - {{ Former::checkbox('recurring')->onclick('setEmailEnabled()')->text(trans('texts.enable').'    '.trans('texts.learn_more').'')->data_bind("checked: is_recurring") - ->inlineHelp($invoice && $invoice->last_sent_date ? 'Last invoice sent ' . Utils::dateToString($invoice->last_sent_date) : '') }} -
    - @endif - @endif - -
    - -
    - {{ Former::text('invoice_number')->label(trans("texts.{$entityType}_number_short"))->data_bind("value: invoice_number, valueUpdate: 'afterkeydown'") }} - {{ Former::text('po_number')->label(trans('texts.po_number_short'))->data_bind("value: po_number, valueUpdate: 'afterkeydown'") }} - {{ Former::text('discount')->data_bind("value: discount, valueUpdate: 'afterkeydown'") - ->addGroupClass('discount-group')->type('number')->min('0')->step('any')->append( - Former::select('is_amount_discount')->addOption(trans('texts.discount_percent'), '0') - ->addOption(trans('texts.discount_amount'), '1')->data_bind("value: is_amount_discount")->raw() - ) }} - {{-- Former::select('currency_id')->addOption('', '')->fromQuery($currencies, 'name', 'id')->data_bind("value: currency_id") --}} - -
    - - -
    - -
    -
    - -

     

    - - {{ Former::hidden('data')->data_bind("value: ko.mapping.toJSON(model)") }} - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @if (($account->custom_invoice_label1 || ($invoice && floatval($invoice->custom_value1)) != 0) && $account->custom_invoice_taxes1) - - - - - @endif - - @if (($account->custom_invoice_label2 || ($invoice && floatval($invoice->custom_value2)) != 0) && $account->custom_invoice_taxes2) - - - - - @endif - - - - @endif - - - - - @if (($account->custom_invoice_label1 || ($invoice && floatval($invoice->custom_value1)) != 0) && !$account->custom_invoice_taxes1) - - - - - @endif - - @if (($account->custom_invoice_label2 || ($invoice && floatval($invoice->custom_value2)) != 0) && !$account->custom_invoice_taxes2) - - - - - @endif - - @if (!$account->hide_paid_to_date) - - - - - @endif - - - - - - - - - -
    {{ trans('texts.item') }}{{ trans('texts.description') }}{{ trans('texts.unit_cost') }}{{ trans('texts.quantity') }}{{ trans('texts.tax') }}{{ trans('texts.line_total') }}
    - - - {{ Former::text('product_key')->useDatalist($products->toArray(), 'product_key')->onkeyup('onItemChange()') - ->raw()->data_bind("value: product_key, valueUpdate: 'afterkeydown'")->addClass('datalist') }} - - - - - - - - - -
    -
    -  
    - -
    -
    - - - -
    -
    - {{ Former::textarea('public_notes')->data_bind("value: wrapped_notes, valueUpdate: 'afterkeydown'") - ->label(null)->style('resize: none; min-width: 450px;')->rows(3) }} -
    -
    - {{ Former::textarea('terms')->data_bind("value:wrapped_terms, placeholder: default_terms, valueUpdate: 'afterkeydown'") - ->label(false)->style('resize: none; min-width: 450px')->rows(3) - ->help('') }} -
    - -
    -
    - -
    {{ trans('texts.subtotal') }}
    - {{ trans('texts.discount') }}
    - {{ $account->custom_invoice_label1 }}
    - {{ $account->custom_invoice_label2 }}
    - {{ trans('texts.tax') }}
    - {{ $account->custom_invoice_label1 }}
    - {{ $account->custom_invoice_label2 }}
    - {{ trans('texts.paid_to_date') }}
    - - {{ trans($entityType == ENTITY_INVOICE ? 'texts.balance_due' : 'texts.total') }}
    -
    - -

     

    -
    - -
    - {{ Former::populateField('entityType', $entityType) }} - {{ Former::text('entityType') }} - {{ Former::text('action') }} - - @if ($invoice && $invoice->id) - {{ Former::populateField('id', $invoice->public_id) }} - {{ Former::text('id') }} - @endif -
    - - - @if (!Utils::isPro() || InvoiceDesign::count() == COUNT_FREE_DESIGNS) - {{ Former::select('invoice_design_id')->style('display:inline;width:150px')->raw()->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id")->addOption(trans('texts.more_designs') . '...', '-1') }} - @else - {{ Former::select('invoice_design_id')->style('display:inline;width:150px')->raw()->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id") }} - @endif - - {{ Button::primary(trans('texts.download_pdf'), array('onclick' => 'onDownloadClick()'))->append_with_icon('download-alt'); }} - - @if (!$invoice || (!$invoice->trashed() && !$invoice->client->trashed())) - @if ($invoice && $invoice->id) - -
    - - - -
    - - @else - {{ Button::success(trans("texts.save_{$entityType}"), array('id' => 'saveButton', 'onclick' => 'onSaveClick()')) }} - @endif - - @if (!$invoice || ($invoice && !$invoice->is_recurring)) - {{ Button::normal(trans("texts.email_{$entityType}"), array('id' => 'email_button', 'onclick' => 'onEmailClick()'))->append_with_icon('send'); }} - @endif - - @if ($invoice && $invoice->id && $entityType == ENTITY_INVOICE && !$invoice->is_recurring) - {{ Button::primary(trans('texts.enter_payment'), array('onclick' => 'onPaymentClick()'))->append_with_icon('usd'); }} - @endif - @elseif ($invoice && $invoice->trashed() && !$invoice->is_deleted == '1') - {{ Button::success(trans('texts.restore'), ['onclick' => 'submitAction("restore")'])->append_with_icon('cloud-download') }} - @endif - -
    -

     

    - - @include('invoices.pdf', ['account' => Auth::user()->account]) - - @if (!Auth::user()->account->isPro()) -
    - {{ trans('texts.pro_plan.remove_logo', ['link'=>''.trans('texts.pro_plan.remove_logo_link').'']) }} -
    - @endif - - - - - - - - {{ Former::close() }} - - -
    - - - -@stop diff --git a/app/views/invoices/history.blade.php b/app/views/invoices/history.blade.php deleted file mode 100644 index 8c490072b24c..000000000000 --- a/app/views/invoices/history.blade.php +++ /dev/null @@ -1,61 +0,0 @@ -@extends('header') - -@section('head') - @parent - - - - - - - -@stop - -@section('content') - - {{ Former::open()->addClass('form-inline')->onchange('refreshPDF()') }} - {{ Former::select('version')->options($versionsSelect)->label(trans('select_version')) }} - {{ Button::success_link(URL::to($invoice->getEntityType() . 's/' . $invoice->public_id . '/edit'), trans('texts.edit_' . $invoice->getEntityType()), array('class' => 'pull-right')) }} - {{ Former::close() }} - -
     
    - - @include('invoices.pdf', ['account' => Auth::user()->account, 'pdfHeight' => 800]) - -@stop \ No newline at end of file diff --git a/app/views/invoices/pdf.blade.php b/app/views/invoices/pdf.blade.php deleted file mode 100644 index feb2e8234b93..000000000000 --- a/app/views/invoices/pdf.blade.php +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/views/invoices/view.blade.php b/app/views/invoices/view.blade.php deleted file mode 100755 index 6f53dba4a4c8..000000000000 --- a/app/views/invoices/view.blade.php +++ /dev/null @@ -1,84 +0,0 @@ -@extends('public.header') - -@section('head') - @parent - - @include('script') - - - - - -@stop - -@section('content') - -
    - -

     

    -
    - @if ($invoice->is_quote) - {{ Button::normal(trans('texts.download_pdf'), array('onclick' => 'onDownloadClick()', 'class' => 'btn-lg')) }}   - @if (!$isConverted) - {{ Button::success_link(URL::to('approve/' . $invitation->invitation_key), trans('texts.approve'), array('class' => 'btn-lg')) }} - @endif - @elseif ($invoice->client->account->isGatewayConfigured() && !$invoice->isPaid() && !$invoice->is_recurring) - {{ Button::normal(trans('texts.download_pdf'), array('onclick' => 'onDownloadClick()', 'class' => 'btn-lg')) }}   - @if ($hasToken) - {{ DropdownButton::success_lg(trans('texts.pay_now'), [ - ['url' => URL::to("payment/{$invitation->invitation_key}?use_token=true&use_paypal=false"), 'label' => trans('texts.use_card_on_file')], - ['url' => URL::to("payment/{$invitation->invitation_key}?use_paypal=false"), 'label' => trans('texts.edit_payment_details')] - ])->addClass('btn-lg') }} - @elseif ($countGateways == 2) - {{ DropdownButton::success_lg(trans('texts.pay_now'), [ - ['url' => URL::to("payment/{$invitation->invitation_key}?use_paypal=true"), 'label' => trans('texts.pay_with_paypal')], - ['url' => URL::to("payment/{$invitation->invitation_key}?use_paypal=false"), 'label' => trans('texts.pay_with_card')] - ])->addClass('btn-lg') }} - @else - {{ Button::success_link(URL::to('payment/' . $invitation->invitation_key), trans('texts.pay_now'), array('class' => 'btn-lg')) }} - @endif - @else - {{ Button::success('Download PDF', array('onclick' => 'onDownloadClick()', 'class' => 'btn-lg')) }} - @endif -
    - -

     

    - - - - @include('invoices.pdf', ['account' => $invoice->client->account]) - -

     

    -

     

    - -
    - -@stop \ No newline at end of file diff --git a/app/views/list.blade.php b/app/views/list.blade.php deleted file mode 100755 index 4cc501c55d16..000000000000 --- a/app/views/list.blade.php +++ /dev/null @@ -1,164 +0,0 @@ -@extends('header') - -@section('content') - - {{ Former::open($entityType . 's/bulk')->addClass('listForm') }} -
    - {{ Former::text('action') }} - {{ Former::text('statusId') }} - {{ Former::text('id') }} -
    - - {{ DropdownButton::normal(trans('texts.archive'), - Navigation::links( - array( - array(trans('texts.archive_'.$entityType), "javascript:submitForm('archive')"), - array(trans('texts.delete_'.$entityType), "javascript:submitForm('delete')"), - ) - ) - , array('id'=>'archive'))->split(); }} - -   - -
    - - {{ Button::success_link(URL::to($entityType . 's/create'), trans("texts.new_$entityType"), array('class' => 'pull-right'))->append_with_icon('plus-sign'); }} - -
    - - @if (isset($secEntityType)) - {{ Datatable::table() - ->addColumn($secColumns) - ->setUrl(route('api.' . $secEntityType . 's')) - ->setOptions('sPaginationType', 'bootstrap') - ->render('datatable') }} - @endif - - {{ Datatable::table() - ->addColumn($columns) - ->setUrl(route('api.' . $entityType . 's')) - ->setOptions('sPaginationType', 'bootstrap') - ->render('datatable') }} - - {{ Former::close() }} - - - -@stop - -@section('onReady') - - var tableFilter = ''; - var searchTimeout = false; - - var oTable0 = $('#DataTables_Table_0').dataTable(); - var oTable1 = $('#DataTables_Table_1').dataTable(); - function filterTable(val) { - if (val == tableFilter) { - return; - } - tableFilter = val; - oTable0.fnFilter(val); - @if (isset($secEntityType)) - oTable1.fnFilter(val); - @endif - } - - $('#tableFilter').on('keyup', function(){ - if (searchTimeout) { - window.clearTimeout(searchTimeout); - } - - searchTimeout = setTimeout(function() { - filterTable($('#tableFilter').val()); - }, 1000); - }) - - window.onDatatableReady = function() { - $(':checkbox').click(function() { - setArchiveEnabled(); - }); - - $('tbody tr').click(function(event) { - if (event.target.type !== 'checkbox' && event.target.type !== 'button' && event.target.tagName.toLowerCase() !== 'a') { - $checkbox = $(this).closest('tr').find(':checkbox:not(:disabled)'); - var checked = $checkbox.prop('checked'); - $checkbox.prop('checked', !checked); - setArchiveEnabled(); - } - }); - - $('tbody tr').mouseover(function() { - $(this).closest('tr').find('.tr-action').css('visibility','visible'); - }).mouseout(function() { - $dropdown = $(this).closest('tr').find('.tr-action'); - if (!$dropdown.hasClass('open')) { - $dropdown.css('visibility','hidden'); - } - }); - - } - - $('#archive > button').prop('disabled', true); - $('#archive > button:first').click(function() { - submitForm('archive'); - }); - - $('.selectAll').click(function() { - $(this).closest('table').find(':checkbox:not(:disabled)').prop('checked', this.checked); - }); - - function setArchiveEnabled() { - var checked = $('tbody :checkbox:checked').length > 0; - $('#archive > button').prop('disabled', !checked); - } - - - -@stop \ No newline at end of file diff --git a/app/views/master.blade.php b/app/views/master.blade.php deleted file mode 100755 index d174c873917f..000000000000 --- a/app/views/master.blade.php +++ /dev/null @@ -1,139 +0,0 @@ - - - - Invoice Ninja | {{ isset($title) ? $title : ' ' . trans('public.title') }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@yield('head') - - - - - - @if (isset($_ENV['TAG_MANAGER_KEY']) && $_ENV['TAG_MANAGER_KEY']) - - - - - - - @elseif (isset($_ENV['ANALYTICS_KEY']) && $_ENV['ANALYTICS_KEY']) - - @else - - @endif - -@yield('body') - - - - - - \ No newline at end of file diff --git a/app/views/payments/edit.blade.php b/app/views/payments/edit.blade.php deleted file mode 100755 index 024676fdd9bb..000000000000 --- a/app/views/payments/edit.blade.php +++ /dev/null @@ -1,70 +0,0 @@ -@extends('header') - - -@section('onReady') - $('input#name').focus(); -@stop - -@section('content') - - - {{ Former::open($url)->addClass('col-md-10 col-md-offset-1 warn-on-exit')->method($method)->rules(array( - 'client' => 'required', - 'invoice' => 'required', - 'amount' => 'required', - )); }} - - @if ($payment) - {{ Former::populate($payment) }} - @endif - -
    -
    - - @if (!$payment) - {{ Former::select('client')->addOption('', '')->addGroupClass('client-select') }} - {{ Former::select('invoice')->addOption('', '')->addGroupClass('invoice-select') }} - {{ Former::text('amount') }} - @endif - - {{ Former::select('payment_type_id')->addOption('','') - ->fromQuery($paymentTypes, 'name', 'id') }} - {{ Former::text('payment_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('') }} - {{ Former::text('transaction_reference') }} - {{-- Former::select('currency_id')->addOption('','') - ->fromQuery($currencies, 'name', 'id')->select(Session::get(SESSION_CURRENCY, DEFAULT_CURRENCY)) --}} - -
    -
    - -
    -
    - -
    - {{ Button::lg_primary_submit_success(trans('texts.save'))->append_with_icon('floppy-disk') }} - {{ Button::lg_default_link('payments/', trans('texts.cancel'))->append_with_icon('remove-circle'); }} -
    - - {{ Former::close() }} - - - -@stop diff --git a/app/views/payments/payment.blade.php b/app/views/payments/payment.blade.php deleted file mode 100755 index e1019c19d358..000000000000 --- a/app/views/payments/payment.blade.php +++ /dev/null @@ -1,323 +0,0 @@ -@extends('public.header') - -@section('content') - - - -{{ Former::vertical_open($url)->rules(array( -'first_name' => 'required', -'last_name' => 'required', -'card_number' => 'required', -'expiration_month' => 'required', -'expiration_year' => 'required', -'cvv' => 'required', -'address1' => 'required', -'city' => 'required', -'state' => 'required', -'postal_code' => 'required', -'country' => 'required', -'phone' => 'required', -'email' => 'required|email' -)) }} - -@if ($client) - {{ Former::populate($client) }} - {{ Former::populateField('first_name', $contact->first_name) }} - {{ Former::populateField('last_name', $contact->last_name) }} -@endif - -
    -

     

    - -
    -
    - -
    -
    -
    - @if ($client) -

    {{{ $client->getDisplayName() }}}

    -

    {{{ trans('texts.invoice') . ' ' . $invoiceNumber }}}|  {{ trans('texts.amount_due') }}: {{ Utils::formatMoney($amount, $currencyId) }}

    - @elseif ($paymentTitle) -

    {{ $paymentTitle }}
    {{ $paymentSubtitle }}

    - @endif -
    -
    -
    - @if (Request::secure() || Utils::isNinjaDev()) -
    -

    {{ trans('texts.secure_payment') }}

    -
    {{ trans('texts.256_encryption') }}
    -
    - @endif -
    -
    - -

     
     

    - -
    -

    {{ trans('texts.contact_information') }}

    -
    -
    - {{ Former::text('first_name')->placeholder(trans('texts.first_name'))->raw() }} -
    -
    - {{ Former::text('last_name')->placeholder(trans('texts.last_name'))->raw() }} -
    -
    - @if (isset($paymentTitle)) -
    -
    - {{ Former::text('email')->placeholder(trans('texts.email'))->raw() }} -
    -
    - @endif - -

     
     

    - -

    {{ trans('texts.billing_address') }}  {{ trans('texts.payment_footer1') }}

    -
    -
    - {{ Former::text('address1')->placeholder(trans('texts.address1'))->raw() }} -
    -
    -
    -
    - {{ Former::text('address2')->placeholder(trans('texts.address2'))->raw() }} -
    -
    - {{ Former::text('city')->placeholder(trans('texts.city'))->raw() }} -
    -
    -
    -
    - {{ Former::text('state')->placeholder(trans('texts.state'))->raw() }} -
    -
    - {{ Former::text('postal_code')->placeholder(trans('texts.postal_code'))->raw() }} -
    -
    - -

     
     

    - -

    {{ trans('texts.billing_method') }}

    -
    -
    - {{ Former::text('card_number')->placeholder(trans('texts.card_number'))->raw() }} -
    -
    - {{ Former::text('cvv')->placeholder(trans('texts.cvv'))->raw() }} -
    -
    -
    -
    - {{ Former::select('expiration_month')->placeholder(trans('texts.expiration_month')) - ->addOption('01 - January', '1') - ->addOption('02 - February', '2') - ->addOption('03 - March', '3') - ->addOption('04 - April', '4') - ->addOption('05 - May', '5') - ->addOption('06 - June', '6') - ->addOption('07 - July', '7') - ->addOption('08 - August', '8') - ->addOption('09 - September', '9') - ->addOption('10 - October', '10') - ->addOption('11 - November', '11') - ->addOption('12 - December', '12')->raw(); - }} -
    -
    - {{ Former::select('expiration_year')->placeholder(trans('texts.expiration_year')) - ->addOption('2015', '2015') - ->addOption('2016', '2016') - ->addOption('2017', '2017') - ->addOption('2018', '2018') - ->addOption('2019', '2019') - ->addOption('2020', '2020') - ->addOption('2021', '2021') - ->addOption('2022', '2022') - ->addOption('2023', '2023') - ->addOption('2024', '2024') - ->addOption('2025', '2025')->raw(); - }} -
    -
    - - -
    -
    - @if ($client && $account->showTokenCheckbox()) - selectTokenCheckbox() ? 'CHECKED' : '' }} value="1" style="margin-left:0px; vertical-align:top"> - - {{ trans('texts.token_billing_secure', ['stripe_link' => link_to('https://stripe.com/', 'Stripe.com', ['target' => '_blank'])]) }} - @endif -
    - -
    - @if (isset($acceptedCreditCardTypes)) -
    - @foreach ($acceptedCreditCardTypes as $card) - {{ $card['alt'] }} - @endforeach -
    - @endif -
    -
    - - -

     
     

    - -
    -
    - {{ Button::block_success_submit_lg(strtoupper(trans('texts.pay_now') . ' - ' . Utils::formatMoney($amount, $currencyId) )) }} -
    -
    - - -
    - -
    -
    - - -

     

    -

     

    - -
    - - - -{{ Former::close() }} - - - -@stop \ No newline at end of file diff --git a/app/views/plans.blade.php b/app/views/plans.blade.php deleted file mode 100644 index ef9da93391eb..000000000000 --- a/app/views/plans.blade.php +++ /dev/null @@ -1,62 +0,0 @@ -
    -
    -
    -
    -
    {{ trans('public.plans.number_clients') }}
    -
    {{ trans('public.plans.unlimited_invoices') }}
    -
    {{ trans('public.plans.company_logo') }}
    -
    {{ trans('public.plans.live_pdf') }}
    -
    {{ trans('public.plans.four_templates') }}
    -
    {{ trans('public.plans.payments') }}
    -
    {{ trans('public.plans.additional_templates') }}
    -
    {{ trans('public.plans.multi_user') }}
    -
    {{ trans('public.plans.quotes') }}
    -
    {{ trans('public.plans.advanced_settings') }}
    -
    {{ trans('public.plans.data_vizualizations') }}
    -
    {{ trans('public.plans.email_support') }}
    -
    {{ trans('public.plans.remove_created_by') }}
    -
    {{ trans('public.plans.latest_features') }}
    -
    {{ trans('public.plans.pricing') }}
    - -
    -
    -
    {{ trans('public.plans.free') }}
    -
    {{ trans('public.plans.number_clients') }}
    500
    -
    {{ trans('public.plans.unlimited_invoices') }}
    -
    {{ trans('public.plans.company_logo') }}
    -
    {{ trans('public.plans.live_pdf') }}
    -
    {{ trans('public.plans.four_templates') }}
    -
    {{ trans('public.plans.payments') }}
    -
    {{ trans('public.plans.additional_templates') }}
    -
    {{ trans('public.plans.multi_user') }}
    -
    {{ trans('public.plans.quotes') }}
    -
    {{ trans('public.plans.advanced_settings') }}
    -
    {{ trans('public.plans.data_vizualizations') }}
    -
    {{ trans('public.plans.email_support') }}
    -
    {{ trans('public.plans.remove_created_by') }}
    -
    {{ trans('public.plans.latest_features') }}
    -
    {{ trans('public.plans.pricing') }}

    {{ trans('public.plans.free_always') }}

    -
    -
    - -
    {{ trans('public.plans.pro_plan') }}
    -
    {{ trans('public.plans.number_clients') }}
    {{ trans('public.plans.unlimited') }}
    -
    {{ trans('public.plans.unlimited_invoices') }}
    -
    {{ trans('public.plans.company_logo') }}
    -
    {{ trans('public.plans.live_pdf') }}
    -
    {{ trans('public.plans.four_templates') }}
    -
    {{ trans('public.plans.payments') }}
    -
    {{ trans('public.plans.additional_templates') }}
    -
    {{ trans('public.plans.multi_user') }}
    -
    {{ trans('public.plans.quotes') }}
    -
    {{ trans('public.plans.advanced_settings') }}
    -
    {{ trans('public.plans.data_vizualizations') }}
    -
    {{ trans('public.plans.email_support') }}
    -
    {{ trans('public.plans.remove_created_by') }}
    -
    {{ trans('public.plans.latest_features') }}
    -
    {{ trans('public.plans.pricing') }}

    {{ trans('public.plans.year_price') }}

    - - -
    -
    -
    \ No newline at end of file diff --git a/app/views/public/header.blade.php b/app/views/public/header.blade.php deleted file mode 100644 index 32d0dffbfc5a..000000000000 --- a/app/views/public/header.blade.php +++ /dev/null @@ -1,276 +0,0 @@ -@extends('master') - -@section('head') - - - - -@stop - -@section('body') - - - -{{ Form::open(array('url' => 'get_started', 'id' => 'startForm')) }} -{{ Form::hidden('guest_key') }} -{{ Form::hidden('sign_up', Input::get('sign_up')) }} -{{ Form::close() }} - - - - - - - -
    - @if (Session::has('warning')) -
    {{ Session::get('warning') }}
    - @endif - - @if (Session::has('message')) -
    {{ Session::get('message') }}
    - @endif - - @if (Session::has('error')) -
    {{ Session::get('error') }}
    - @endif -
    - -@yield('content') - -
    -
    -
    - @if (!isset($hideLogo) || !$hideLogo) - - @endif -
    -
    - -
    -
    -
    Copyright ©2015 InvoiceNinja. All rights reserved.
    -
    -
    -
    - - - - - - - - - - - - - - - @stop diff --git a/app/views/public/license.blade.php b/app/views/public/license.blade.php deleted file mode 100644 index 92844a2a3123..000000000000 --- a/app/views/public/license.blade.php +++ /dev/null @@ -1,101 +0,0 @@ -@extends('public.header') - -@section('content') - - - - -
    -

     

    - -
    -
    - -
    -
    -
    -

    License Key
    {{ $message }}

    -
    -
    -
    - -

     

    -

     

    - -
    -
    -

    {{ $license }}

    -
    -
    -
    -
    - -
    - -
    - - -@stop \ No newline at end of file diff --git a/app/views/public/terms.blade.php b/app/views/public/terms.blade.php deleted file mode 100644 index c509ddde5716..000000000000 --- a/app/views/public/terms.blade.php +++ /dev/null @@ -1,177 +0,0 @@ -@extends('public.header') - -@section('content') - - - - -
    -

     

    - -
    -
    - - -
    -
    -
    -
    -

    Terms of Service & Conditions of Use

    -
    -
    -
    -
    - -
    -
    -
    -
    -

    Invoice Ninja LLC provides this website and services under the following terms of service and conditions of use. By utilizing the invoiceNinja.com website you are agreeing to the following terms of service & conditions of use. You must be of legal age of majority to enter into a binding agreement to use invoiceninja.com. If you do not agree to the below terms & conditions, do not use invoiceninja.com.

    -
    -
    -
    -
    - - - - -
    -
    -
    -
    -

    Definitions

    -

    Invoiceninja.com users who access invoiceninja.com services are defined as “User Accountsâ€. User Account clients who use invoiceninja.com services to view and/or pay invoices are defined as “Clients.†The wording “data†and “content†are used interchangeably.

    -
    -
    -
    - -
    -
    -
    -
    -

    Responsibility

    -

    User Accounts must ensure the confidentiality of usernames and passwords used to access their account. User Accounts are responsible for all activity occurring under their account including all laws relating to data, privacy, personal information, international copyright and trademark laws.

    -
    -
    -
    -
    - -
    -
    -
    -
    -

    Data Ownership

    -

    The User Accounts owns all data generated in their invoiceninja.com account. Invoiceninja.com will not modify or distribute User Account data. Invoiceninja.com will store and access data solely for the purpose of providing services to User Accounts.

    -

    User Accounts are responsible for their data. Invoiceninja.com has no responsibility or liability for User Account data or Client experience. User Accounts are responsible for any loss or damage a User Account may cause to their Clients or other people. Although we have no obligation to do so, if deemed legally necessary invoiceninja.com has absolute discretion to remove or edit User Account data without notice or penalty.

    -

    Invoiceninja.com does not own User Account data, but we do reserve the right to use User Account data as necessary to operate invoiceninja.com and improve User Account services.

    -
    -
    -
    -
    - - -
    -
    -
    -
    -

    Copyright & Trademarks

    -

    User Accounts are responsible that company logos, graphics, and content uploaded to invoiceninja.com do not infringe on international copyright & trademark law.

    -
    -
    -
    -
    - - -
    -
    -
    -
    -

    Open Source License

    -

    Invoiceninja.com is an open source application and invoiceninja.com source code is governed by international attribution assurances licensing: https://github.com/hillelcoren/invoice-ninja/blob/master/LICENSE.

    -
    -
    -
    -
    - - -
    -
    -
    -
    -

    User Account Limited License

    -

    Invoiceninja.com grants User Accounts & Clients a limited license to access the invoiceninja.com services such as User Account creation and all invoiceninja.om services, and Client services such as viewing invoices, downloading invoices, and printing invoices. This limited license may be revoked if deemed legally necessary without notice or penalty.

    -
    -
    -
    -
    - - -
    -
    -
    -
    -

    Use of Emailing Services

    -

    Keep it legal and clean. Any User Account emailing invoices data, hyper-links, or other material that is unlawful, libelous, defamatory, pornographic, harassing, invasive, fraudulent or otherwise objectionable will be deactivated.

    -

    Content that would constitute criminal offence or create legal liability, violate copyright, trademark, or intellectual property will be deleted or provided to legal authorities.

    -
    -
    -
    -
    - - -
    -
    -
    -
    -

    Security

    -

    Invoiceninja.com does not store or obtain credit card or sensitive financial data in any form. Responsibility for Third-Party Material User Account may utilize hyper-linking to third-party web sites. Invoiceninja.com takes no responsibility for third party content.

    -
    -
    -
    -
    - - -
    -
    -
    -
    -

    Limited Liability

    -

    User Accounts and Clients agree to indemnify, defend, and hold invoiceninja.com, its directors or employees harmless against any and all liability and cost as a result of using invoiceninja.com. User Accounts and Clients shall not assert any claim or allegation of any nature whatsoever against invoiceninja.com, its directors or employees.

    -

    Invoiceninja.com shall not be liable for damages of any kind, including but not limited to loss of site use, loss of profits or loss of data, tort or otherwise, arising out of or in any way connected with the use of or inability to use invoiceninja.com.

    -

    You shall defend, indemnify and hold harmless invoiceninja.com from any loss, damages, liabilities, expenses, claims and proceedings arising out of your use of invoiceninja.com.

    -
    -
    -
    -
    - -
    -
    -
    -
    -

    Availability

    -

    Invoiceninja.com uses third party hosting that strives to ensure maximum uptime. However, invoiceninja.com cannot guarantee uninterrupted access invoiceninja.com. Invoiceninja.com reserves the right to interrupt access to invoiceninja.com for the sake of forming maintenance, updates, and security requirements.

    -
    -
    -
    -
    - -

     

    -

     

    - -
    -
    -
    - -@stop \ No newline at end of file diff --git a/app/views/public_list.blade.php b/app/views/public_list.blade.php deleted file mode 100755 index a517539ab74b..000000000000 --- a/app/views/public_list.blade.php +++ /dev/null @@ -1,110 +0,0 @@ -@extends('public.header') - -@section('content') - - - -
    - -

     

    - - - -

    {{ $title }}

    - - {{ Datatable::table() - ->addColumn($columns) - ->setUrl(route('api.client.' . $entityType . 's')) - ->setOptions('sPaginationType', 'bootstrap') - ->render('datatable') }} - -
    - - - -@stop - diff --git a/app/views/reports/d3.blade.php b/app/views/reports/d3.blade.php deleted file mode 100644 index 003cc95972f8..000000000000 --- a/app/views/reports/d3.blade.php +++ /dev/null @@ -1,309 +0,0 @@ -@extends('accounts.nav') - -@section('head') - @parent - - - - -@stop - -@section('content') - @parent - @include('accounts.nav_advanced') - - {{ Former::open() }} - {{ Former::legend('data_visualizations') }} - {{ Former::close() }} - - - -
    - Group By    - -    {{ $message }} -
    - -

     

    - -
    - - - -@stop \ No newline at end of file diff --git a/app/views/reports/report_builder.blade.php b/app/views/reports/report_builder.blade.php deleted file mode 100755 index e45e96063b03..000000000000 --- a/app/views/reports/report_builder.blade.php +++ /dev/null @@ -1,106 +0,0 @@ -@extends('accounts.nav') - -@section('head') - @parent - - -@stop - -@section('content') - @parent - @include('accounts.nav_advanced') - - - - {{ trans('texts.chart_builder') }} -
    - {{ Button::default_link(URL::to('company/advanced_settings/data_visualizations'), trans("texts.data_visualizations"))->append_with_icon('globe') }} -
    -
    - -
    -
    - - {{ Former::open()->addClass('warn-on-exit') }} - {{ Former::populateField('start_date', $startDate) }} - {{ Former::populateField('end_date', $endDate) }} - {{ Former::select('chart_type')->options($chartTypes, $chartType) }} - {{ Former::select('group_by')->options($dateTypes, $groupBy) }} - {{ Former::text('start_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT)) - ->append('') }} - {{ Former::text('end_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT)) - ->append('') }} - - @if (Auth::user()->isPro()) - {{ Former::actions( Button::primary_submit('Generate') ) }} - @else - - @endif - - {{ Former::close() }} - -

     

    -
    -
    -
     Invoices
    -
    -
    -
    -
     Payments
    -
    -
    -
    -
     Credits
    -
    - -
    -
    - -
    - -
    - - - -@stop - - -@section('onReady') - - $('#start_date, #end_date').datepicker({ - autoclose: true, - todayHighlight: true, - keyboardNavigation: false - }); - -@stop \ No newline at end of file diff --git a/app/views/script.blade.php b/app/views/script.blade.php deleted file mode 100644 index f1a5c1a29f05..000000000000 --- a/app/views/script.blade.php +++ /dev/null @@ -1,26 +0,0 @@ - \ No newline at end of file diff --git a/app/views/secure_payment.blade.php b/app/views/secure_payment.blade.php deleted file mode 100644 index 30f10c5fc50d..000000000000 --- a/app/views/secure_payment.blade.php +++ /dev/null @@ -1,130 +0,0 @@ -@extends('public.header') - -@section('content') - -
    -
    -
    -

    Secure Payment

    -

    256-BiT Encryption

    - -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    - - - - -
    -
    - - - -
    -
    - -
    -
    - - - - -
    -
    - -
    -
    - - - -
    - -
    - - - -
    - -
    - - - -
    - -
    - - - -
    -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - - - - -
    -
    - - - - -
    -
    - - -
    -
    - - - -
    - - -
    -
    - - -
    -
    -
    -
    - -
    - -
    -
    -
    - - - - - -@stop \ No newline at end of file diff --git a/app/views/setup.blade.php b/app/views/setup.blade.php deleted file mode 100644 index 4a0ffa52ea6e..000000000000 --- a/app/views/setup.blade.php +++ /dev/null @@ -1,139 +0,0 @@ - - - - Invoice Ninja | Setup - - - - - - - -
    - -   -
    -
    - -
    -

    Invoice Ninja Setup

    - @if (version_compare(phpversion(), '5.4.0', '<')) -
    Warning: The application requires PHP >= 5.4.0
    - @endif - @if (!extension_loaded('fileinfo')) -
    Warning: The fileinfo extension needs to be installed and enabled.
    - @endif - If you need help you can either post to our Google Group - or email us at contact@invoiceninja.com. -

    -

    -- Commands to create a MySQL database and user
    -CREATE SCHEMA `ninja` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
    -CREATE USER 'ninja'@'localhost' IDENTIFIED BY 'ninja';
    -GRANT ALL PRIVILEGES ON `ninja`.* TO 'ninja'@'localhost';
    -FLUSH PRIVILEGES;
    -

    -
    - - {{ Former::open()->rules([ - 'app[url]' => 'required', - 'database[type][host]' => 'required', - 'database[type][database]' => 'required', - 'database[type][username]' => 'required', - 'database[type][password]' => 'required', - 'first_name' => 'required', - 'last_name' => 'required', - 'email' => 'required|email', - 'password' => 'required', - 'terms_checkbox' => 'required' - ]) }} - -
    -
    -

    Application Settings

    -
    -
    - {{ Former::text('app[url]')->label('URL')->value(Request::root()) }} -
    -
    - -
    -
    -

    Database Connection

    -
    -
    - {{ Former::select('database[default]')->label('Driver')->options(['mysql' => 'MySQL', 'pgsql' => 'PostgreSQL', 'sqlite' => 'SQLite']) }} - {{ Former::text('database[type][host]')->label('Host')->value('localhost') }} - {{ Former::text('database[type][database]')->label('Database')->value('ninja') }} - {{ Former::text('database[type][username]')->label('Username')->value('ninja') }} - {{ Former::password('database[type][password]')->label('Password')->value('ninja') }} - {{ Former::actions( Button::normal('Test connection', ['onclick' => 'testDatabase()']), '  ' ) }} -
    -
    - - -
    -
    -

    Email Settings

    -
    -
    - {{ Former::select('mail[driver]')->label('Driver')->options(['smtp' => 'SMTP', 'mail' => 'Mail', 'sendmail' => 'Sendmail']) }} - {{ Former::text('mail[host]')->label('Host')->value('localhost') }} - {{ Former::text('mail[port]')->label('Port')->value('587') }} - {{ Former::select('mail[encryption]')->label('Encryption')->options(['tls' => 'TLS', 'ssl' => 'SSL']) }} - {{ Former::text('mail[from][name]')->label('From Name') }} - {{ Former::text('mail[username]')->label('Email') }} - {{ Former::password('mail[password]')->label('Password') }} - {{ Former::actions( Button::normal('Send test email', ['onclick' => 'testMail()']), '  ' ) }} -
    -
    - - -
    -
    -

    User Details

    -
    -
    - {{ Former::text('first_name') }} - {{ Former::text('last_name') }} - {{ Former::text('email') }} - {{ Former::password('password') }} -
    -
    - - {{ Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => ''.trans('texts.terms_of_service').''])) }} - {{ Former::actions( Button::submit_lg('Submit') ) }} - {{ Former::close() }} - -
    - - - - - \ No newline at end of file diff --git a/app/views/timesheets/edit.blade.php b/app/views/timesheets/edit.blade.php deleted file mode 100644 index 34755559fee0..000000000000 --- a/app/views/timesheets/edit.blade.php +++ /dev/null @@ -1,76 +0,0 @@ -@extends('header') - -@section('head') - @parent -@stop - -@section('content') - - -
    -
    - -@stop diff --git a/app/views/users/edit.blade.php b/app/views/users/edit.blade.php deleted file mode 100644 index c88f4b43370f..000000000000 --- a/app/views/users/edit.blade.php +++ /dev/null @@ -1,30 +0,0 @@ -@extends('accounts.nav') - -@section('content') - @parent - @include('accounts.nav_advanced') - - {{ Former::open($url)->method($method)->addClass('col-md-8 col-md-offset-2 warn-on-exit')->rules(array( - 'first_name' => 'required', - 'last_name' => 'required', - 'email' => 'required|email', - )); }} - - {{ Former::legend($title) }} - - @if ($user) - {{ Former::populate($user) }} - @endif - - {{ Former::text('first_name') }} - {{ Former::text('last_name') }} - {{ Former::text('email') }} - - {{ Former::actions( - Button::lg_success_submit(trans($user && $user->confirmed ? 'texts.save' : 'texts.send_invite'))->append_with_icon($user && $user->confirmed ? 'floppy-disk' : 'send'), - Button::lg_default_link('company/advanced_settings/user_management', trans('texts.cancel'))->append_with_icon('remove-circle') - )}} - - {{ Former::close() }} - -@stop \ No newline at end of file diff --git a/app/views/users/forgot_password.blade.php b/app/views/users/forgot_password.blade.php deleted file mode 100755 index c40dae6a9cd0..000000000000 --- a/app/views/users/forgot_password.blade.php +++ /dev/null @@ -1,86 +0,0 @@ -@extends('master') - -@section('head') - - - - - - -@stop - -@section('body') -
    - -{{ Former::open('forgot_password')->rules(['email' => 'required|email'])->addClass('form-signin') }} - -
    - -

    - {{ Former::text('email')->placeholder(trans('texts.email_address'))->raw() }} -

    - -

    {{ Button::success_submit(trans('texts.send_email'), array('class' => 'btn-lg'))->block() }}

    - - - @if (Session::has('warning')) -
    {{ Session::get('warning') }}
    - @endif - - @if (Session::has('message')) -
    {{ Session::get('message') }}
    - @endif - - @if (Session::has('error')) -
    {{ Session::get('error') }}
    - @endif - - {{ Former::close() }} - -
    -
    - -@stop \ No newline at end of file diff --git a/app/views/users/login.blade.php b/app/views/users/login.blade.php deleted file mode 100755 index 085575fd4350..000000000000 --- a/app/views/users/login.blade.php +++ /dev/null @@ -1,119 +0,0 @@ -@extends('master') - -@section('head') - - - - - - -@stop - -@section('body') -
    - - - {{ Former::open('login')->rules(['login_email' => 'required|email', 'login_password' => 'required'])->addClass('form-signin') }} - -
    -

    - {{ $errors->first('login_email') }} - {{ $errors->first('login_password') }} -

    - -

    - {{ Former::text('login_email')->placeholder(trans('texts.email_address'))->raw() }} - {{ Former::password('login_password')->placeholder(trans('texts.password'))->raw() }} -

    - -

    {{ Button::success_submit(trans('texts.lets_go'), array('class' => 'btn-lg'))->block() }}

    - - - - - @if (Session::has('warning')) -
    {{ Session::get('warning') }}
    - @endif - - @if (Session::has('message')) -
    {{ Session::get('message') }}
    - @endif - - @if (Session::has('error')) -
    {{ Session::get('error') }}
    - @endif - -
    - - {{ Former::close() }} - - @if (!Utils::isNinja()) -

    -

    -
    - - -
       - - - - - -
    - @endif - -
    - - @stop \ No newline at end of file diff --git a/app/views/users/reset_password.blade.php b/app/views/users/reset_password.blade.php deleted file mode 100755 index 1c4e7750b503..000000000000 --- a/app/views/users/reset_password.blade.php +++ /dev/null @@ -1,95 +0,0 @@ -@extends('master') - -@section('head') - - - - - - -@stop - -@section('body') -
    - - {{ Former::open('user/reset')->addClass('form-signin')->rules(array( - 'password' => 'required', - 'password_confirmation' => 'required', - )); }} - - -
    - - - -

    - {{ Former::password('password')->placeholder(trans('texts.password'))->raw() }} - {{ Former::password('password_confirmation')->placeholder(trans('texts.confirm_password'))->raw() }} - -

    - -

    {{ Button::success_submit(trans('texts.save'), array('class' => 'btn-lg'))->block() }}

    - - - @if (Session::has('warning')) -
    {{ Session::get('warning') }}
    - @endif - - @if (Session::has('message')) -
    {{ Session::get('message') }}
    - @endif - - @if (Session::has('error')) -
    {{ Session::get('error') }}
    - @endif - - - {{ Former::close() }} -
    - -
    - -@stop \ No newline at end of file diff --git a/artisan b/artisan deleted file mode 100755 index 36bb2d983d22..000000000000 --- a/artisan +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env php -setRequestForConsoleEnvironment(); - -$artisan = Illuminate\Console\Application::start($app); - -/* -|-------------------------------------------------------------------------- -| Run The Artisan Application -|-------------------------------------------------------------------------- -| -| When we run the console application, the current CLI command will be -| executed in this console and the response sent back to a terminal -| or another output device for the developers. Here goes nothing! -| -*/ - -$status = $artisan->run(); - -/* -|-------------------------------------------------------------------------- -| Shutdown The Application -|-------------------------------------------------------------------------- -| -| Once Artisan has finished running. We will fire off the shutdown events -| so that any final work may be done by the application before we shut -| down the process. This is the last thing to happen to the request. -| -*/ - -$app->shutdown(); - -exit($status); \ No newline at end of file diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php deleted file mode 100755 index 6b329312a6ed..000000000000 --- a/bootstrap/autoload.php +++ /dev/null @@ -1,75 +0,0 @@ - __DIR__.'/../app', - - /* - |-------------------------------------------------------------------------- - | Public Path - |-------------------------------------------------------------------------- - | - | The public path contains the assets for your web application, such as - | your JavaScript and CSS files, and also contains the primary entry - | point for web requests into these applications from the outside. - | - */ - - 'public' => __DIR__.'/../public', - - /* - |-------------------------------------------------------------------------- - | Base Path - |-------------------------------------------------------------------------- - | - | The base path is the root of the Laravel installation. Most likely you - | will not need to change this value. But, if for some wild reason it - | is necessary you will do so here, just proceed with some caution. - | - */ - - 'base' => __DIR__.'/..', - - /* - |-------------------------------------------------------------------------- - | Storage Path - |-------------------------------------------------------------------------- - | - | The storage path is used by Laravel to store cached Blade views, logs - | and other pieces of information. You may modify the path here when - | you want to change the location of this directory for your apps. - | - */ - - 'storage' => (isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Google App Engine') !== false) ? "gs://invoice-ninja/storage" : __DIR__.'/../app/storage', - -); diff --git a/bootstrap/start.php b/bootstrap/start.php deleted file mode 100755 index 1ec68eee0675..000000000000 --- a/bootstrap/start.php +++ /dev/null @@ -1,140 +0,0 @@ -instance('path.storage','gs://invoice-ninja'); -$app->instance('path.manifest', 'gs://invoice-ninja/meta'); - -if(strlen(ini_get('google_app_engine.allow_include_gs_buckets'))) { - $primary_bucket_name = explode(', ', ini_get('google_app_engine.allow_include_gs_buckets'))[0]; - dd($primary_bucket_name); - $app->instance('path.storage','gs://'.$primary_bucket_name); - $app->instance('path.manifest', storage_path().'/meta'); -} -*/ - - - -if (!function_exists('gethostname')) { - function gethostname() { - return php_uname('n'); - } -} - -// Fortrabbit HTTP AUTH CODE -if (!empty($_SERVER['REMOTE_USER'])) { - list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode( - ':', - base64_decode(substr($_SERVER['REMOTE_USER'], 6)) - ); -} - - -/* -|-------------------------------------------------------------------------- -| Create The Application -|-------------------------------------------------------------------------- -| -| The first thing we will do is create a new Laravel application instance -| which serves as the "glue" for all the components of Laravel, and is -| the IoC container for the system binding all of the various parts. -| -*/ - -$app = new Illuminate\Foundation\Application; - -//$app->redirectIfTrailingSlash(); - -/* -|-------------------------------------------------------------------------- -| Detect The Application Environment -|-------------------------------------------------------------------------- -| -| Laravel takes a dead simple approach to your application environments -| so you can just specify a machine name or HTTP host that matches a -| given environment, then we will automatically detect it for you. -| -*/ - - -$env = $app->detectEnvironment(function () -{ - if (file_exists(__DIR__.'/environment.php')) - { - return require __DIR__.'/environment.php'; - } - else if (isset($_SERVER['LARAVEL_ENV'])) - { - return $_SERVER['LARAVEL_ENV']; - } - else - { - return 'development'; - } -}); - - -/* -$env = $app->detectEnvironment(array( - 'development' => ['precise64', 'ubuntu-server-12042-x64-vbox4210'], - 'gae-development' => ['HILLEL-PC','hillel-PC'], - 'gae-production' => ['GNU/Linux'], - 'fortrabbit' => ['instance-zudx3h.nodes.eu1.frbit.com'] -)); -*/ - -/* -|-------------------------------------------------------------------------- -| Bind Paths -|-------------------------------------------------------------------------- -| -| Here we are binding the paths configured in paths.php to the app. You -| should not be changing these here. If you need to change these you -| may do so within the paths.php file and they will be bound here. -| -*/ - -$app->bindInstallPaths(require __DIR__.'/paths.php'); - -/* -|-------------------------------------------------------------------------- -| Load The Application -|-------------------------------------------------------------------------- -| -| Here we will load the Illuminate application. We'll keep this is in a -| separate location so we can isolate the creation of an application -| from the actual running of the application with a given request. -| -*/ - -$framework = $app['path.base'].'/vendor/laravel/framework/src'; - -require $framework.'/Illuminate/Foundation/start.php'; - -/* -|-------------------------------------------------------------------------- -| Return The Application -|-------------------------------------------------------------------------- -| -| This script returns the application instance. The instance is given to -| the calling script so we can separate the building of the instances -| from the actual running of the application and sending responses. -| -*/ - -// http://stackoverflow.com/questions/20293116/override-http-headers-default-settings-x-frame-options -App::forgetMiddleware('Illuminate\Http\FrameGuard'); - - -return $app; \ No newline at end of file diff --git a/bower.json b/bower.json deleted file mode 100644 index 4b8ad2c3948b..000000000000 --- a/bower.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "hillelcoren/invoice-ninja", - "version": "0.9.0", - "dependencies": { - "jquery": "~1.11", - "bootstrap": "~3.*", - "jquery-ui": "~1.*", - "datatables": "~1.*", - "datatables-bootstrap3": "*", - "knockout.js": "~3.*", - "knockout-mapping": "*", - "knockout-sortable": "*", - "font-awesome": "~4.*", - "underscore": "~1.*", - "jspdf": "*", - "bootstrap-datepicker": "~1.*", - "typeahead.js": "~0.9.3", - "accounting": "~0.*", - "spectrum": "~1.3.4", - "d3": "~3.4.11", - "handsontable": "*" - }, - "resolutions": { - "jquery": "~1.11" - } -} diff --git a/codeception.yml b/codeception.yml deleted file mode 100644 index f4d0ff9e9be1..000000000000 --- a/codeception.yml +++ /dev/null @@ -1,18 +0,0 @@ -paths: - tests: tests - log: tests/_log - data: tests/_data - helpers: tests/_helpers -settings: - bootstrap: _bootstrap.php - suite_class: \PHPUnit_Framework_TestSuite - colors: true - memory_limit: 1024M - log: true -modules: - config: - Db: - dsn: 'mysql:host=localhost;dbname=ninja' - user: 'ninja' - password: 'ninja' - dump: tests/_data/dump.sql diff --git a/composer.json b/composer.json deleted file mode 100644 index 6213a2a0df13..000000000000 --- a/composer.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "hillelcoren/invoice-ninja", - "description": "An open-source invoicing site built with Laravel", - "keywords": ["invoice", "laravel"], - "license": "Attribution Assurance License", - "authors": [ - { - "name": "Hillel Coren", - "email": "hillelcoren@gmail.com" - } - ], - "require": { - "laravel/framework": "4.1.25", - "patricktalmadge/bootstrapper": "4.1.x", - "zizaco/confide": "3.1.x", - "anahkiasen/former": "3.4.x", - "barryvdh/laravel-debugbar": "~1.8", - "chumper/datatable": "2.x", - "omnipay/omnipay": "~2.0", - "intervention/image": "1.x", - "webpatser/laravel-countries": "dev-master", - "barryvdh/laravel-ide-helper": "~1.0", - "doctrine/dbal": "~2.3", - "jsanc623/phpbenchtime": "2.x", - "lokielse/omnipay-alipay": "dev-master", - "coatesap/omnipay-datacash": "~2.0", - "alfaproject/omnipay-neteller": "~1.0", - "mfauveau/omnipay-pacnet": "~2.0", - "coatesap/omnipay-paymentsense": "~2.0", - "coatesap/omnipay-realex": "~2.0", - "fruitcakestudio/omnipay-sisow": "~2.0", - "alfaproject/omnipay-skrill": "dev-master" - }, - "require-dev": { - "codeception/codeception": "dev-master" - }, - "autoload": { - "classmap": [ - "app/commands", - "app/controllers", - "app/models", - "app/database/migrations", - "app/database/seeds", - "app/tests/TestCase.php", - "app/libraries", - "vendor/php-payments/lib" - ], - "psr-0" : { - "ninja" : "app/" - } - }, - "scripts": { - "post-install-cmd": [ - "php artisan optimize", - "php artisan debugbar:publish" - ], - "post-update-cmd": [ - "php artisan clear-compiled", - "php artisan ide-helper:generate", - "php artisan debugbar:publish", - "php artisan optimize" - ], - "post-create-project-cmd": [ - "php artisan key:generate" - ] - }, - "config": { - "preferred-install": "dist" - }, - "minimum-stability": "dev" -} diff --git a/composer.lock b/composer.lock deleted file mode 100644 index cc08005ddf7e..000000000000 --- a/composer.lock +++ /dev/null @@ -1,6225 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "151cdcbe05eecb3f5b0fb1f8c0cb4a5d", - "packages": [ - { - "name": "alfaproject/omnipay-neteller", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/alfaproject/omnipay-neteller.git", - "reference": "e2b9129936cf45bf10e0dd406f897d2852e3d567" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/alfaproject/omnipay-neteller/zipball/e2b9129936cf45bf10e0dd406f897d2852e3d567", - "reference": "e2b9129936cf45bf10e0dd406f897d2852e3d567", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0", - "satooshi/php-coveralls": "dev-master" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Omnipay\\Neteller\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Joao Dias", - "email": "joao.dias@cherrygroup.com" - } - ], - "description": "Neteller driver for the Omnipay payment processing library", - "homepage": "https://github.com/alfaproject/omnipay-neteller", - "keywords": [ - "gateway", - "merchant", - "neteller", - "omnipay", - "pay", - "payment" - ], - "time": "2014-02-25 10:03:25" - }, - { - "name": "alfaproject/omnipay-skrill", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/alfaproject/omnipay-skrill.git", - "reference": "2fa2ba8083fd5289366660f8de1b46b5f49ac052" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/alfaproject/omnipay-skrill/zipball/2fa2ba8083fd5289366660f8de1b46b5f49ac052", - "reference": "2fa2ba8083fd5289366660f8de1b46b5f49ac052", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0", - "satooshi/php-coveralls": "dev-master" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Omnipay\\Skrill\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Joao Dias", - "email": "joao.dias@cherrygroup.com" - } - ], - "description": "Skrill driver for the Omnipay payment processing library", - "homepage": "https://github.com/alfaproject/omnipay-skrill", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "skrill" - ], - "time": "2014-02-25 13:40:07" - }, - { - "name": "anahkiasen/former", - "version": "3.4.3", - "source": { - "type": "git", - "url": "https://github.com/Anahkiasen/former.git", - "reference": "d5bbb276073ef155a316c510a3ed81feff74304b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Anahkiasen/former/zipball/d5bbb276073ef155a316c510a3ed81feff74304b", - "reference": "d5bbb276073ef155a316c510a3ed81feff74304b", - "shasum": "" - }, - "require": { - "anahkiasen/html-object": "~1.4", - "illuminate/config": "4.1.*", - "illuminate/container": "4.1.*", - "illuminate/http": "4.1.*", - "illuminate/routing": "4.1.*", - "illuminate/session": "4.1.*", - "illuminate/translation": "4.1.*", - "php": ">=5.3.0" - }, - "require-dev": { - "illuminate/database": "4.1.*", - "mockery/mockery": "~0.9.1", - "phpunit/phpunit": "~4.1.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Former\\": [ - "src/Former", - "tests" - ], - "Laravel\\": "src/Laravel" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Fabre", - "email": "ehtnam6@gmail.com" - } - ], - "description": "A powerful form builder", - "homepage": "http://anahkiasen.github.com/former/", - "keywords": [ - "bootstrap", - "form", - "foundation", - "laravel" - ], - "time": "2014-08-03 11:21:34" - }, - { - "name": "anahkiasen/html-object", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/Anahkiasen/html-object.git", - "reference": "776aff25a4db27964d95b2332e2f379b0aac9ff0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Anahkiasen/html-object/zipball/776aff25a4db27964d95b2332e2f379b0aac9ff0", - "reference": "776aff25a4db27964d95b2332e2f379b0aac9ff0", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "HtmlObject": "src" - }, - "classmap": [ - "tests" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Fabre", - "email": "ehtnam6@gmail.com" - } - ], - "description": "A set of classes to create and manipulate HTML objects abstractions", - "time": "2014-01-27 22:41:20" - }, - { - "name": "anahkiasen/underscore-php", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/Anahkiasen/underscore-php.git", - "reference": "b5cb869b1b0e0a27deb4156884411d7e14b9bc24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Anahkiasen/underscore-php/zipball/b5cb869b1b0e0a27deb4156884411d7e14b9bc24", - "reference": "b5cb869b1b0e0a27deb4156884411d7e14b9bc24", - "shasum": "" - }, - "require": { - "illuminate/support": "~4", - "patchwork/utf8": "1.1.*", - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Underscore\\": [ - "src", - "tests" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Fabre", - "email": "ehtnam6@gmail.com" - } - ], - "description": "A redacted port of Underscore.js for PHP", - "keywords": [ - "internals", - "laravel", - "toolkit" - ], - "time": "2014-09-25 10:00:05" - }, - { - "name": "barryvdh/laravel-debugbar", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "64a7a5e68c7ea21d8586c5d2777eae37d4da1008" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/64a7a5e68c7ea21d8586c5d2777eae37d4da1008", - "reference": "64a7a5e68c7ea21d8586c5d2777eae37d4da1008", - "shasum": "" - }, - "require": { - "laravel/framework": "4.*|5.0.*", - "maximebf/debugbar": "~1.10.1", - "php": ">=5.3.0", - "symfony/finder": "~2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Barryvdh\\Debugbar\\": "src/" - }, - "files": [ - "src/helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "PHP Debugbar integration for Laravel", - "keywords": [ - "debug", - "debugbar", - "laravel", - "profiler", - "webprofiler" - ], - "time": "2014-11-24 21:34:36" - }, - { - "name": "barryvdh/laravel-ide-helper", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/barryvdh/laravel-ide-helper.git", - "reference": "486d9d9c4d209720d490ac186f8493b3c0f6897c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/486d9d9c4d209720d490ac186f8493b3c0f6897c", - "reference": "486d9d9c4d209720d490ac186f8493b3c0f6897c", - "shasum": "" - }, - "require": { - "illuminate/console": "4.x|5.0.x", - "illuminate/filesystem": "4.x|5.0.x", - "illuminate/support": "4.x|5.0.x", - "php": ">=5.3.0", - "phpdocumentor/reflection-docblock": "2.0.x", - "symfony/class-loader": "~2.3" - }, - "require-dev": { - "doctrine/dbal": "~2.3" - }, - "suggest": { - "doctrine/dbal": "Load information from the database about models for phpdocs (~2.3)" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11-dev" - } - }, - "autoload": { - "psr-4": { - "Barryvdh\\LaravelIdeHelper\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.", - "keywords": [ - "autocomplete", - "codeintel", - "helper", - "ide", - "laravel", - "netbeans", - "phpdoc", - "phpstorm", - "sublime" - ], - "time": "2014-10-14 08:39:02" - }, - { - "name": "chumper/datatable", - "version": "2.3", - "source": { - "type": "git", - "url": "https://github.com/Chumper/Datatable.git", - "reference": "cff842783f3f4af60c2be295435b2bd812510ef5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Chumper/Datatable/zipball/cff842783f3f4af60c2be295435b2bd812510ef5", - "reference": "cff842783f3f4af60c2be295435b2bd812510ef5", - "shasum": "" - }, - "require": { - "illuminate/config": "4.*", - "illuminate/support": "4.*", - "illuminate/view": "4.*", - "php": ">=5.3.0" - }, - "require-dev": { - "mockery/mockery": "dev-master", - "orchestra/testbench": "2.1.*", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "autoload": { - "psr-0": { - "Chumper\\Datatable": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Plaschke", - "email": "github@nilsplaschke.de", - "homepage": "http://nilsplaschke.de", - "role": "Developer" - } - ], - "description": "This is a laravel 4 package for the server and client side of datatablaes at http://datatables.net/", - "homepage": "http://github.com/Chumper/datatable", - "keywords": [ - "ajax", - "datatables", - "jquery", - "laravel" - ], - "time": "2014-05-11 14:53:49" - }, - { - "name": "classpreloader/classpreloader", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/mtdowling/ClassPreloader.git", - "reference": "2c9f3bcbab329570c57339895bd11b5dd3b00877" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mtdowling/ClassPreloader/zipball/2c9f3bcbab329570c57339895bd11b5dd3b00877", - "reference": "2c9f3bcbab329570c57339895bd11b5dd3b00877", - "shasum": "" - }, - "require": { - "nikic/php-parser": "~0.9", - "php": ">=5.3.3", - "symfony/console": "~2.1", - "symfony/filesystem": "~2.1", - "symfony/finder": "~2.1" - }, - "bin": [ - "classpreloader.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "ClassPreloader": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case", - "keywords": [ - "autoload", - "class", - "preload" - ], - "time": "2014-03-12 00:05:31" - }, - { - "name": "coatesap/omnipay-datacash", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/coatesap/omnipay-datacash.git", - "reference": "3754720937b747edcfc77e2df09cae58079c0cd0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/coatesap/omnipay-datacash/zipball/3754720937b747edcfc77e2df09cae58079c0cd0", - "reference": "3754720937b747edcfc77e2df09cae58079c0cd0", - "shasum": "" - }, - "require": { - "omnipay/common": "2.*" - }, - "require-dev": { - "guzzle/plugin-mock": "~3.1", - "mockery/mockery": "~0.8", - "omnipay/tests": "2.*", - "phpunit/phpunit": "~3.7.16", - "squizlabs/php_codesniffer": "~1.4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Omnipay\\DataCash\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andrew Coates", - "email": "andycoatz@gmail.com" - } - ], - "description": "DataCash driver for the Omnipay payment processing library", - "homepage": "https://github.com/coatesap/omnipay-datacash", - "keywords": [ - "datacash", - "gateway", - "merchant", - "omnipay", - "pay", - "payment" - ], - "time": "2014-10-02 15:33:32" - }, - { - "name": "coatesap/omnipay-paymentsense", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/coatesap/omnipay-paymentsense.git", - "reference": "91e5ace4c4a111ed33ecd33c1d3235f9e7aecd69" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/coatesap/omnipay-paymentsense/zipball/91e5ace4c4a111ed33ecd33c1d3235f9e7aecd69", - "reference": "91e5ace4c4a111ed33ecd33c1d3235f9e7aecd69", - "shasum": "" - }, - "require": { - "omnipay/common": "2.*" - }, - "require-dev": { - "guzzle/plugin-mock": "~3.1", - "mockery/mockery": "~0.8", - "omnipay/tests": "2.*", - "phpunit/phpunit": "~3.7.16", - "squizlabs/php_codesniffer": "~1.4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Omnipay\\PaymentSense\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andrew Coates", - "email": "andycoatz@gmail.com" - } - ], - "description": "PaymentSense driver for the Omnipay payment processing library", - "homepage": "https://github.com/coatesap/omnipay-paymentsense", - "keywords": [ - "driver", - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "payment sense", - "paymentsense" - ], - "time": "2014-07-25 04:46:19" - }, - { - "name": "coatesap/omnipay-realex", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/coatesap/omnipay-realex.git", - "reference": "13949b27629b1461e4985470a05f23779c18de4e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/coatesap/omnipay-realex/zipball/13949b27629b1461e4985470a05f23779c18de4e", - "reference": "13949b27629b1461e4985470a05f23779c18de4e", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "squizlabs/php_codesniffer": "~1.4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Omnipay\\Realex\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andrew Coates", - "email": "andycoatz@gmail.com" - } - ], - "description": "Realex driver for the Omnipay PHP payment processing library", - "homepage": "https://github.com/coatesap/omnipay-realex", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "purchase", - "realex" - ], - "time": "2014-08-21 15:44:54" - }, - { - "name": "d11wtq/boris", - "version": "v1.0.8", - "source": { - "type": "git", - "url": "https://github.com/d11wtq/boris.git", - "reference": "125dd4e5752639af7678a22ea597115646d89c6e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/d11wtq/boris/zipball/125dd4e5752639af7678a22ea597115646d89c6e", - "reference": "125dd4e5752639af7678a22ea597115646d89c6e", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "suggest": { - "ext-pcntl": "*", - "ext-posix": "*", - "ext-readline": "*" - }, - "bin": [ - "bin/boris" - ], - "type": "library", - "autoload": { - "psr-0": { - "Boris": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "time": "2014-01-17 12:21:18" - }, - { - "name": "doctrine/annotations", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "3b6668f54ad3f95d68b64a742f6b0de55d6caeb1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/3b6668f54ad3f95d68b64a742f6b0de55d6caeb1", - "reference": "3b6668f54ad3f95d68b64a742f6b0de55d6caeb1", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2014-11-04 15:34:10" - }, - { - "name": "doctrine/cache", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "7b625bf42f08ceb3e7dc7852095ef5e1a5756884" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/7b625bf42f08ceb3e7dc7852095ef5e1a5756884", - "reference": "7b625bf42f08ceb3e7dc7852095ef5e1a5756884", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "phpunit/phpunit": ">=3.7", - "predis/predis": "~0.8", - "satooshi/php-coveralls": "~0.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Cache\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ], - "time": "2014-11-24 16:07:53" - }, - { - "name": "doctrine/collections", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "38ed66e6606309bec203a9df506ffa26d956d21d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/38ed66e6606309bec203a9df506ffa26d956d21d", - "reference": "38ed66e6606309bec203a9df506ffa26d956d21d", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Collections\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Collections Abstraction library", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "array", - "collections", - "iterator" - ], - "time": "2014-11-05 15:56:21" - }, - { - "name": "doctrine/common", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "559a805125524b0bb6742638784c2979a5c5e607" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/559a805125524b0bb6742638784c2979a5c5e607", - "reference": "559a805125524b0bb6742638784c2979a5c5e607", - "shasum": "" - }, - "require": { - "doctrine/annotations": "1.*", - "doctrine/cache": "1.*", - "doctrine/collections": "1.*", - "doctrine/inflector": "1.*", - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~3.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Common Library for Doctrine projects", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "collections", - "eventmanager", - "persistence", - "spl" - ], - "time": "2014-07-27 17:39:50" - }, - { - "name": "doctrine/dbal", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/dbal.git", - "reference": "40fd004725b4aa902aea170cd15152b06a6faba0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/40fd004725b4aa902aea170cd15152b06a6faba0", - "reference": "40fd004725b4aa902aea170cd15152b06a6faba0", - "shasum": "" - }, - "require": { - "doctrine/common": ">=2.4,<2.6-dev", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "4.*", - "symfony/console": "2.*" - }, - "suggest": { - "symfony/console": "For helpful console commands such as SQL execution and import of files." - }, - "bin": [ - "bin/doctrine-dbal" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\DBAL\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - } - ], - "description": "Database Abstraction Layer", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "database", - "dbal", - "persistence", - "queryobject" - ], - "time": "2014-11-24 15:49:52" - }, - { - "name": "doctrine/inflector", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "8a0b96e65d2399d6f95b75de11134843a2c61feb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/8a0b96e65d2399d6f95b75de11134843a2c61feb", - "reference": "8a0b96e65d2399d6f95b75de11134843a2c61feb", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "4.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Inflector\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "inflection", - "pluralize", - "singularize", - "string" - ], - "time": "2014-10-05 18:49:49" - }, - { - "name": "doctrine/lexer", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2014-09-09 13:34:57" - }, - { - "name": "filp/whoops", - "version": "1.0.10", - "source": { - "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "91e3fd4b0812017ffbeb24add55330664e1ea32a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/91e3fd4b0812017ffbeb24add55330664e1ea32a", - "reference": "91e3fd4b0812017ffbeb24add55330664e1ea32a", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "mockery/mockery": "dev-master", - "silex/silex": "1.0.*@dev" - }, - "type": "library", - "autoload": { - "psr-0": { - "Whoops": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" - } - ], - "description": "php error handling for cool kids", - "homepage": "https://github.com/filp/whoops", - "keywords": [ - "error", - "exception", - "handling", - "library", - "silex-provider", - "whoops", - "zf2" - ], - "time": "2013-12-04 14:19:30" - }, - { - "name": "fruitcakestudio/omnipay-sisow", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/fruitcakestudio/omnipay-sisow.git", - "reference": "4c4413279397e780ea4a6ad328082c913409403f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fruitcakestudio/omnipay-sisow/zipball/4c4413279397e780ea4a6ad328082c913409403f", - "reference": "4c4413279397e780ea4a6ad328082c913409403f", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.2" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Sisow\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - }, - { - "name": "Fruitcake Studio", - "homepage": "http://fruitcakestudio.nl" - } - ], - "description": "Sisow gateway for the Omnipay payment processing library", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "sisow" - ], - "time": "2014-08-15 08:15:33" - }, - { - "name": "guzzle/common", - "version": "v3.9.2", - "target-dir": "Guzzle/Common", - "source": { - "type": "git", - "url": "https://github.com/guzzle/common.git", - "reference": "2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/common/zipball/2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc", - "reference": "2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc", - "shasum": "" - }, - "require": { - "php": ">=5.3.2", - "symfony/event-dispatcher": ">=2.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle\\Common": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Common libraries used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "collection", - "common", - "event", - "exception" - ], - "time": "2014-08-11 04:32:36" - }, - { - "name": "guzzle/http", - "version": "v3.9.2", - "target-dir": "Guzzle/Http", - "source": { - "type": "git", - "url": "https://github.com/guzzle/http.git", - "reference": "1e8dd1e2ba9dc42332396f39fbfab950b2301dc5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/http/zipball/1e8dd1e2ba9dc42332396f39fbfab950b2301dc5", - "reference": "1e8dd1e2ba9dc42332396f39fbfab950b2301dc5", - "shasum": "" - }, - "require": { - "guzzle/common": "self.version", - "guzzle/parser": "self.version", - "guzzle/stream": "self.version", - "php": ">=5.3.2" - }, - "suggest": { - "ext-curl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle\\Http": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "HTTP libraries used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "client", - "curl", - "http", - "http client" - ], - "time": "2014-08-11 04:32:36" - }, - { - "name": "guzzle/parser", - "version": "v3.9.2", - "target-dir": "Guzzle/Parser", - "source": { - "type": "git", - "url": "https://github.com/guzzle/parser.git", - "reference": "6874d171318a8e93eb6d224cf85e4678490b625c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/parser/zipball/6874d171318a8e93eb6d224cf85e4678490b625c", - "reference": "6874d171318a8e93eb6d224cf85e4678490b625c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle\\Parser": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Interchangeable parsers used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "URI Template", - "cookie", - "http", - "message", - "url" - ], - "time": "2014-02-05 18:29:46" - }, - { - "name": "guzzle/stream", - "version": "v3.9.2", - "target-dir": "Guzzle/Stream", - "source": { - "type": "git", - "url": "https://github.com/guzzle/stream.git", - "reference": "60c7fed02e98d2c518dae8f97874c8f4622100f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/stream/zipball/60c7fed02e98d2c518dae8f97874c8f4622100f0", - "reference": "60c7fed02e98d2c518dae8f97874c8f4622100f0", - "shasum": "" - }, - "require": { - "guzzle/common": "self.version", - "php": ">=5.3.2" - }, - "suggest": { - "guzzle/http": "To convert Guzzle request objects to PHP streams" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle\\Stream": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle stream wrapper component", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "component", - "stream" - ], - "time": "2014-05-01 21:36:02" - }, - { - "name": "intervention/image", - "version": "1.6.x-dev", - "source": { - "type": "git", - "url": "https://github.com/Intervention/image.git", - "reference": "432f3b28ea08455146b157c6bfdebf4ef5bc661e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Intervention/image/zipball/432f3b28ea08455146b157c6bfdebf4ef5bc661e", - "reference": "432f3b28ea08455146b157c6bfdebf4ef5bc661e", - "shasum": "" - }, - "require": { - "ext-gd": "*", - "illuminate/support": "4.*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.1.*" - }, - "suggest": { - "intervention/imagecache": "Caching extension for the Intervention Image library" - }, - "type": "library", - "autoload": { - "psr-0": { - "Intervention\\Image": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Oliver Vogel", - "email": "oliver@olivervogel.net", - "homepage": "http://olivervogel.net/" - } - ], - "description": "Image handling and manipulation library with support for Laravel 4 integration", - "homepage": "http://image.intervention.io/", - "keywords": [ - "gd", - "image", - "laravel", - "thumbnail", - "watermark" - ], - "time": "2014-06-07 16:25:27" - }, - { - "name": "ircmaxell/password-compat", - "version": "1.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/ircmaxell/password_compat.git", - "reference": "9b99377557a33a4129c9194e60a97a685fab21e0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/9b99377557a33a4129c9194e60a97a685fab21e0", - "reference": "9b99377557a33a4129c9194e60a97a685fab21e0", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "4.*" - }, - "type": "library", - "autoload": { - "files": [ - "lib/password.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anthony Ferrara", - "email": "ircmaxell@php.net", - "homepage": "http://blog.ircmaxell.com" - } - ], - "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", - "homepage": "https://github.com/ircmaxell/password_compat", - "keywords": [ - "hashing", - "password" - ], - "time": "2014-11-20 19:18:42" - }, - { - "name": "jeremeamia/SuperClosure", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/jeremeamia/super_closure.git", - "reference": "d05400085f7d4ae6f20ba30d36550836c0d061e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/d05400085f7d4ae6f20ba30d36550836c0d061e8", - "reference": "d05400085f7d4ae6f20ba30d36550836c0d061e8", - "shasum": "" - }, - "require": { - "nikic/php-parser": "~0.9", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~3.7" - }, - "type": "library", - "autoload": { - "psr-0": { - "Jeremeamia\\SuperClosure": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jeremy Lindblom" - } - ], - "description": "Doing interesting things with closures like serialization.", - "homepage": "https://github.com/jeremeamia/super_closure", - "keywords": [ - "closure", - "function", - "parser", - "serializable", - "serialize", - "tokenizer" - ], - "time": "2013-10-09 04:20:00" - }, - { - "name": "jsanc623/phpbenchtime", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/jsanc623/PHPBenchTime.git", - "reference": "e8cba5217fe5998ae1926c2cb2202d8d973db1f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jsanc623/PHPBenchTime/zipball/e8cba5217fe5998ae1926c2cb2202d8d973db1f1", - "reference": "e8cba5217fe5998ae1926c2cb2202d8d973db1f1", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Juan Sanchez", - "email": "juan.sanchez@juanleonardosanchez.com" - } - ], - "description": "A light benchmark timer class for PHP.", - "keywords": [ - "benchmark", - "benchtime", - "profiler", - "stopwatch", - "timer" - ], - "time": "2014-07-23 20:52:24" - }, - { - "name": "laravel/framework", - "version": "v4.1.25", - "source": { - "type": "git", - "url": "https://github.com/laravel/framework.git", - "reference": "d6721488f1a166fd2a7e112540fef81975c393a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/d6721488f1a166fd2a7e112540fef81975c393a7", - "reference": "d6721488f1a166fd2a7e112540fef81975c393a7", - "shasum": "" - }, - "require": { - "classpreloader/classpreloader": "1.0.*", - "d11wtq/boris": "1.0.*", - "filp/whoops": "1.0.10", - "ircmaxell/password-compat": "1.0.*", - "jeremeamia/superclosure": "1.0.*", - "monolog/monolog": "1.*", - "nesbot/carbon": "1.*", - "patchwork/utf8": "1.1.*", - "php": ">=5.3.0", - "phpseclib/phpseclib": "0.3.*", - "predis/predis": "0.8.*", - "stack/builder": "1.0.*", - "swiftmailer/swiftmailer": "5.0.*", - "symfony/browser-kit": "2.4.*", - "symfony/console": "2.4.*", - "symfony/css-selector": "2.4.*", - "symfony/debug": "2.4.*", - "symfony/dom-crawler": "2.4.*", - "symfony/finder": "2.4.*", - "symfony/http-foundation": "2.4.*", - "symfony/http-kernel": "2.4.*", - "symfony/process": "2.4.*", - "symfony/routing": "2.4.*", - "symfony/translation": "2.4.*" - }, - "replace": { - "illuminate/auth": "self.version", - "illuminate/cache": "self.version", - "illuminate/config": "self.version", - "illuminate/console": "self.version", - "illuminate/container": "self.version", - "illuminate/cookie": "self.version", - "illuminate/database": "self.version", - "illuminate/encryption": "self.version", - "illuminate/events": "self.version", - "illuminate/exception": "self.version", - "illuminate/filesystem": "self.version", - "illuminate/foundation": "self.version", - "illuminate/hashing": "self.version", - "illuminate/html": "self.version", - "illuminate/http": "self.version", - "illuminate/log": "self.version", - "illuminate/mail": "self.version", - "illuminate/pagination": "self.version", - "illuminate/queue": "self.version", - "illuminate/redis": "self.version", - "illuminate/routing": "self.version", - "illuminate/session": "self.version", - "illuminate/support": "self.version", - "illuminate/translation": "self.version", - "illuminate/validation": "self.version", - "illuminate/view": "self.version", - "illuminate/workbench": "self.version" - }, - "require-dev": { - "aws/aws-sdk-php": "2.6.*", - "iron-io/iron_mq": "1.5.*", - "mockery/mockery": "0.9.*", - "pda/pheanstalk": "2.1.*", - "phpunit/phpunit": "4.0.*" - }, - "suggest": { - "doctrine/dbal": "Allow renaming columns and dropping SQLite columns." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - }, - "autoload": { - "classmap": [ - [ - "src/Illuminate/Queue/IlluminateQueueClosure.php" - ] - ], - "files": [ - "src/Illuminate/Support/helpers.php" - ], - "psr-0": { - "Illuminate": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com", - "homepage": "https://github.com/taylorotwell", - "role": "Creator of Laravel" - } - ], - "description": "The Laravel Framework.", - "keywords": [ - "framework", - "laravel" - ], - "time": "2014-04-10 13:22:14" - }, - { - "name": "laravelbook/ardent", - "version": "v2.4.2", - "source": { - "type": "git", - "url": "https://github.com/laravelbook/ardent.git", - "reference": "0a0238b8040abc1c71401ce27a8edf2619fa5bed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravelbook/ardent/zipball/0a0238b8040abc1c71401ce27a8edf2619fa5bed", - "reference": "0a0238b8040abc1c71401ce27a8edf2619fa5bed", - "shasum": "" - }, - "require": { - "illuminate/database": "~4.1", - "illuminate/support": "~4.1", - "illuminate/validation": "~4.1", - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "LaravelBook\\Ardent": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Max Ehsan", - "email": "contact@laravelbook.com", - "homepage": "http://laravelbook.com/", - "role": "Developer" - }, - { - "name": "Igor Santos", - "email": "igorsantos07@gmail.com", - "homepage": "http://www.igorsantos.com.br", - "role": "Developer" - } - ], - "description": "Self-validating smart models for Laravel 4's Eloquent O/RM", - "homepage": "http://laravelbook.com/", - "keywords": [ - "Active Record", - "activerecord", - "database", - "eloquent", - "framework", - "laravel", - "orm", - "sql", - "validation" - ], - "time": "2014-02-25 20:39:04" - }, - { - "name": "lokielse/omnipay-alipay", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/lokielse/omnipay-alipay.git", - "reference": "50b35d2e82c47bf3508e287d3f39954aea6c2b83" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lokielse/omnipay-alipay/zipball/50b35d2e82c47bf3508e287d3f39954aea6c2b83", - "reference": "50b35d2e82c47bf3508e287d3f39954aea6c2b83", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Omnipay\\Alipay\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Loki Else", - "email": "lokielse@gmail.com" - } - ], - "description": "Alipay gateway for Omnipay payment processing library", - "homepage": "https://github.com/lokielse/omnipay-alipay", - "keywords": [ - "alipay", - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "purchase" - ], - "time": "2014-07-30 07:24:29" - }, - { - "name": "maximebf/debugbar", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "5aa805cd4b369cc71f75b933e5b38f28ca7fc04b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/5aa805cd4b369cc71f75b933e5b38f28ca7fc04b", - "reference": "5aa805cd4b369cc71f75b933e5b38f28ca7fc04b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "kriswallsmith/assetic": "The best way to manage assets", - "monolog/monolog": "Log using Monolog", - "predis/predis": "Redis storage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-0": { - "DebugBar": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Bouroumeau-Fuseau", - "email": "maxime.bouroumeau@gmail.com", - "homepage": "http://maximebf.com" - } - ], - "description": "Debug bar in the browser for php application", - "homepage": "https://github.com/maximebf/php-debugbar", - "keywords": [ - "debug" - ], - "time": "2014-11-23 12:29:32" - }, - { - "name": "mfauveau/omnipay-pacnet", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/mfauveau/omnipay-pacnet.git", - "reference": "84201b2d216c8327f1cba379e123abb5e09b0f74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mfauveau/omnipay-pacnet/zipball/84201b2d216c8327f1cba379e123abb5e09b0f74", - "reference": "84201b2d216c8327f1cba379e123abb5e09b0f74", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Omnipay\\Pacnet\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthieu Fauveau", - "email": "mfauveau@gmail.com" - } - ], - "description": "Pacnet (Raven) driver for the Omnipay PHP payment processing library", - "homepage": "https://github.com/mfauveau/omnipay-pacnet", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pacnet", - "pay", - "payment", - "purchase", - "raven" - ], - "time": "2014-08-19 18:50:39" - }, - { - "name": "monolog/monolog", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "ab41ed9a94196ce2793f400b88313918b4fc64dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/ab41ed9a94196ce2793f400b88313918b4fc64dc", - "reference": "ab41ed9a94196ce2793f400b88313918b4fc64dc", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "~2.4, >2.4.8", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "phpunit/phpunit": "~3.7.0", - "raven/raven": "~0.5", - "ruflin/elastica": "0.90.*", - "videlalvaro/php-amqplib": "~2.4" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "raven/raven": "Allow sending log messages to a Sentry server", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "time": "2014-11-11 12:05:51" - }, - { - "name": "nesbot/carbon", - "version": "1.13.0", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "5cb6e71055f7b0b57956b73d324cc4de31278f42" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/5cb6e71055f7b0b57956b73d324cc4de31278f42", - "reference": "5cb6e71055f7b0b57956b73d324cc4de31278f42", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Carbon": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - } - ], - "description": "A simple API extension for DateTime.", - "homepage": "https://github.com/briannesbitt/Carbon", - "keywords": [ - "date", - "datetime", - "time" - ], - "time": "2014-09-26 02:52:02" - }, - { - "name": "nikic/php-parser", - "version": "0.9.x-dev", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ef70767475434bdb3615b43c327e2cae17ef12eb", - "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.9-dev" - } - }, - "autoload": { - "psr-0": { - "PHPParser": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "time": "2014-07-23 18:24:17" - }, - { - "name": "omnipay/2checkout", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-2checkout.git", - "reference": "31394ce58d5999b6f49b321cb3547747837c1297" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-2checkout/zipball/31394ce58d5999b6f49b321cb3547747837c1297", - "reference": "31394ce58d5999b6f49b321cb3547747837c1297", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\TwoCheckout\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-2checkout/contributors" - } - ], - "description": "2Checkout driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-2checkout", - "keywords": [ - "2checkout", - "2co", - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "twocheckout" - ], - "time": "2014-09-17 00:35:37" - }, - { - "name": "omnipay/authorizenet", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-authorizenet.git", - "reference": "344dc83cccfe772c6c6d02183bc1d62323bd605c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-authorizenet/zipball/344dc83cccfe772c6c6d02183bc1d62323bd605c", - "reference": "344dc83cccfe772c6c6d02183bc1d62323bd605c", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\AuthorizeNet\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-authorizenet/contributors" - } - ], - "description": "Authorize.Net gateway for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-authorizenet", - "keywords": [ - "authorize", - "authorize net", - "authorize.net", - "gateway", - "merchant", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:38:19" - }, - { - "name": "omnipay/buckaroo", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-buckaroo.git", - "reference": "76a4fdc4af46a2eeff58036bcb16af7d077363b9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-buckaroo/zipball/76a4fdc4af46a2eeff58036bcb16af7d077363b9", - "reference": "76a4fdc4af46a2eeff58036bcb16af7d077363b9", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Buckaroo\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-buckaroo/contributors" - } - ], - "description": "Buckaroo driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-buckaroo", - "keywords": [ - "buckaroo", - "gateway", - "merchant", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:35:28" - }, - { - "name": "omnipay/cardsave", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-cardsave.git", - "reference": "74f4656bb1b4424de011f2560cbb0d7c9a830f18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-cardsave/zipball/74f4656bb1b4424de011f2560cbb0d7c9a830f18", - "reference": "74f4656bb1b4424de011f2560cbb0d7c9a830f18", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\CardSave\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-cardsave/contributors" - } - ], - "description": "CardSave driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-cardsave", - "keywords": [ - "card save", - "cardsave", - "gateway", - "merchant", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:37:27" - }, - { - "name": "omnipay/coinbase", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-coinbase.git", - "reference": "4cdea1a16104505e54960adbf70470ed2495e071" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-coinbase/zipball/4cdea1a16104505e54960adbf70470ed2495e071", - "reference": "4cdea1a16104505e54960adbf70470ed2495e071", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Coinbase\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-coinbase/contributors" - } - ], - "description": "Coinbase driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-coinbase", - "keywords": [ - "coinbase", - "gateway", - "merchant", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:41:54" - }, - { - "name": "omnipay/common", - "version": "v2.3.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-common.git", - "reference": "2c83349327ed3534237043a7a882cbaff55a7866" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-common/zipball/2c83349327ed3534237043a7a882cbaff55a7866", - "reference": "2c83349327ed3534237043a7a882cbaff55a7866", - "shasum": "" - }, - "require": { - "guzzle/http": "~3.1", - "php": ">=5.3.2", - "symfony/http-foundation": "~2.1" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - }, - "gateways": [ - "AuthorizeNet_AIM", - "AuthorizeNet_SIM", - "Buckaroo", - "Buckaroo_Ideal", - "Buckaroo_PayPal", - "CardSave", - "Coinbase", - "Dummy", - "Eway_Rapid", - "FirstData_Connect", - "GoCardless", - "Manual", - "Migs_ThreeParty", - "Migs_TwoParty", - "Mollie", - "MultiSafepay", - "Netaxept", - "NetBanx", - "PayFast", - "Payflow_Pro", - "PaymentExpress_PxPay", - "PaymentExpress_PxPost", - "PayPal_Express", - "PayPal_Pro", - "Pin", - "SagePay_Direct", - "SagePay_Server", - "SecurePay_DirectPost", - "Stripe", - "TargetPay_Directebanking", - "TargetPay_Ideal", - "TargetPay_Mrcash", - "TwoCheckout", - "WorldPay" - ] - }, - "autoload": { - "psr-0": { - "Omnipay\\Common\\": "src/" - }, - "classmap": [ - "src/Omnipay/Omnipay.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-common/contributors" - } - ], - "description": "Common components for Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-common", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "purchase" - ], - "time": "2014-09-17 00:38:32" - }, - { - "name": "omnipay/dummy", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-dummy.git", - "reference": "2e4d4b37114917b7b843bed3cd19bafdf22ad420" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-dummy/zipball/2e4d4b37114917b7b843bed3cd19bafdf22ad420", - "reference": "2e4d4b37114917b7b843bed3cd19bafdf22ad420", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Dummy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-dummy/contributors" - } - ], - "description": "Dummy driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-dummy", - "keywords": [ - "Dummy", - "gateway", - "merchant", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:39:36" - }, - { - "name": "omnipay/eway", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-eway.git", - "reference": "031236cf5653b5a021a5eb5565aceb923f64d964" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-eway/zipball/031236cf5653b5a021a5eb5565aceb923f64d964", - "reference": "031236cf5653b5a021a5eb5565aceb923f64d964", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Eway\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-eway/contributors" - } - ], - "description": "eWay driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-eway", - "keywords": [ - "eway", - "gateway", - "merchant", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:39:29" - }, - { - "name": "omnipay/firstdata", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-firstdata.git", - "reference": "3c198a29ab36c0d2fa17495444e5ab6e1d79e212" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-firstdata/zipball/3c198a29ab36c0d2fa17495444e5ab6e1d79e212", - "reference": "3c198a29ab36c0d2fa17495444e5ab6e1d79e212", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\FirstData\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-firstdata/contributors" - } - ], - "description": "First Data driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-firstdata", - "keywords": [ - "first data", - "firstdata", - "gateway", - "merchant", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:39:22" - }, - { - "name": "omnipay/gocardless", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-gocardless.git", - "reference": "106c2cc2f992813319c86f45863347c238771548" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-gocardless/zipball/106c2cc2f992813319c86f45863347c238771548", - "reference": "106c2cc2f992813319c86f45863347c238771548", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\GoCardless\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-gocardless/contributors" - } - ], - "description": "GoCardless driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-gocardless", - "keywords": [ - "gateway", - "go cardless", - "gocardless", - "merchant", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:39:16" - }, - { - "name": "omnipay/manual", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-manual.git", - "reference": "ddbe7e8cfdb03b102219185aeb7dd91823275c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-manual/zipball/ddbe7e8cfdb03b102219185aeb7dd91823275c71", - "reference": "ddbe7e8cfdb03b102219185aeb7dd91823275c71", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Manual\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-manual/contributors" - } - ], - "description": "Manual driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-manual", - "keywords": [ - "gateway", - "manual", - "merchant", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:37:01" - }, - { - "name": "omnipay/migs", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-migs.git", - "reference": "b49e9f2816a5cdd3c1ba2bcb46a0c73dc43c0b3b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-migs/zipball/b49e9f2816a5cdd3c1ba2bcb46a0c73dc43c0b3b", - "reference": "b49e9f2816a5cdd3c1ba2bcb46a0c73dc43c0b3b", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Migs\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-migs/contributors" - } - ], - "description": "MIGS driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-migs", - "keywords": [ - "gateway", - "mastercard internet gateway service", - "merchant", - "migs", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:38:25" - }, - { - "name": "omnipay/mollie", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-mollie.git", - "reference": "b60a582174b7a31660f8de3b287d09d6492e2c5a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-mollie/zipball/b60a582174b7a31660f8de3b287d09d6492e2c5a", - "reference": "b60a582174b7a31660f8de3b287d09d6492e2c5a", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.2" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Mollie\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-mollie/contributors" - } - ], - "description": "Mollie driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-mollie", - "keywords": [ - "gateway", - "merchant", - "mollie", - "omnipay", - "pay", - "payment" - ], - "time": "2014-10-24 20:04:37" - }, - { - "name": "omnipay/multisafepay", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-multisafepay.git", - "reference": "29f1b794af3abc7705365009255932fbcddca305" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-multisafepay/zipball/29f1b794af3abc7705365009255932fbcddca305", - "reference": "29f1b794af3abc7705365009255932fbcddca305", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\MultiSafepay\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-multisafepay/contributors" - } - ], - "description": "MultiSafepay driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-multisafepay", - "keywords": [ - "gateway", - "merchant", - "multi safepay", - "multisafepay", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:38:11" - }, - { - "name": "omnipay/netaxept", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-netaxept.git", - "reference": "1b99babf51d240b23db95464c5daa3e169a3c502" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-netaxept/zipball/1b99babf51d240b23db95464c5daa3e169a3c502", - "reference": "1b99babf51d240b23db95464c5daa3e169a3c502", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Netaxept\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-netaxept/contributors" - } - ], - "description": "Netaxept driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-netaxept", - "keywords": [ - "gateway", - "merchant", - "netaxept", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:39:10" - }, - { - "name": "omnipay/netbanx", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-netbanx.git", - "reference": "a56900120e676385cc42d67c82985fcaaa752140" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-netbanx/zipball/a56900120e676385cc42d67c82985fcaaa752140", - "reference": "a56900120e676385cc42d67c82985fcaaa752140", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\NetBanx\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-netbanx/contributors" - } - ], - "description": "NetBanx driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-netbanx", - "keywords": [ - "gateway", - "merchant", - "netbanx", - "omnipay", - "pay", - "payment" - ], - "time": "2014-09-17 00:38:46" - }, - { - "name": "omnipay/omnipay", - "version": "v2.3.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay.git", - "reference": "ae75717ec00b93069768102af11b9dd909c78bd3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay/zipball/ae75717ec00b93069768102af11b9dd909c78bd3", - "reference": "ae75717ec00b93069768102af11b9dd909c78bd3", - "shasum": "" - }, - "require": { - "omnipay/2checkout": "~2.0", - "omnipay/authorizenet": "~2.0", - "omnipay/buckaroo": "~2.0", - "omnipay/cardsave": "~2.0", - "omnipay/coinbase": "~2.0", - "omnipay/common": "~2.3.0", - "omnipay/dummy": "~2.0", - "omnipay/eway": "~2.0", - "omnipay/firstdata": "~2.0", - "omnipay/gocardless": "~2.0", - "omnipay/manual": "~2.0", - "omnipay/migs": "~2.0", - "omnipay/mollie": "~2.0", - "omnipay/multisafepay": "~2.0", - "omnipay/netaxept": "~2.0", - "omnipay/netbanx": "~2.0", - "omnipay/payfast": "~2.0", - "omnipay/payflow": "~2.0", - "omnipay/paymentexpress": "~2.0", - "omnipay/paypal": "~2.0", - "omnipay/pin": "~2.0", - "omnipay/sagepay": "~2.0", - "omnipay/securepay": "~2.0", - "omnipay/stripe": "~2.0", - "omnipay/targetpay": "~2.0", - "omnipay/worldpay": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "metapackage", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Community", - "homepage": "https://github.com/thephpleague/omnipay/graphs/contributors" - } - ], - "description": "Includes Omnipay payment processing library and all officially supported gateways", - "homepage": "https://github.com/thephpleague/omnipay", - "keywords": [ - "2checkout", - "2co", - "auth.net", - "authorize", - "authorize.net", - "buckaroo", - "cardsave", - "coinbase", - "commweb", - "dps", - "egate", - "eway", - "express", - "first data", - "firstdata", - "gateway", - "gocardless", - "ideal", - "merchant", - "migs", - "mollie", - "multisafepay", - "netaxept", - "netbanx", - "pay", - "payfast", - "payflow", - "payment", - "paymentexpress", - "paypal", - "pin", - "purchase", - "rapid", - "sagepay", - "securepay", - "stripe", - "tala", - "tala-payments", - "targetpay", - "twocheckout", - "worldpay" - ], - "time": "2014-09-17 00:29:37" - }, - { - "name": "omnipay/payfast", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-payfast.git", - "reference": "b5b0a0ce86a6471871e2b149643fc8cb836c465f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-payfast/zipball/b5b0a0ce86a6471871e2b149643fc8cb836c465f", - "reference": "b5b0a0ce86a6471871e2b149643fc8cb836c465f", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\PayFast\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-payfast/contributors" - } - ], - "description": "PayFast driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-payfast", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payfast", - "payment" - ], - "time": "2014-09-17 00:39:04" - }, - { - "name": "omnipay/payflow", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-payflow.git", - "reference": "9d86e3478dd42cbe40ab9466a7505c4f99c70ee7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-payflow/zipball/9d86e3478dd42cbe40ab9466a7505c4f99c70ee7", - "reference": "9d86e3478dd42cbe40ab9466a7505c4f99c70ee7", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Payflow\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-payflow/contributors" - } - ], - "description": "Payflow driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-payflow", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payflow", - "payment" - ], - "time": "2014-09-17 00:38:58" - }, - { - "name": "omnipay/paymentexpress", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-paymentexpress.git", - "reference": "a6309569a4a4372fe1c9cb464ff2ef57101df46d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-paymentexpress/zipball/a6309569a4a4372fe1c9cb464ff2ef57101df46d", - "reference": "a6309569a4a4372fe1c9cb464ff2ef57101df46d", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\PaymentExpress\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-paymentexpress/contributors" - } - ], - "description": "Payment Express (DPS) driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-paymentexpress", - "keywords": [ - "direct payment solutions", - "dps", - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "payment express", - "paymentexpress", - "pxaccess", - "pxpay", - "pxpost" - ], - "time": "2014-09-17 00:37:09" - }, - { - "name": "omnipay/paypal", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-paypal.git", - "reference": "10c4cde14064bb214ca71fddb541dfac841c40c3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-paypal/zipball/10c4cde14064bb214ca71fddb541dfac841c40c3", - "reference": "10c4cde14064bb214ca71fddb541dfac841c40c3", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\PayPal\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-paypal/contributors" - } - ], - "description": "PayPal gateway for Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-paypal", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "paypal", - "purchase" - ], - "time": "2014-11-21 15:23:24" - }, - { - "name": "omnipay/pin", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/omnipay/pin.git", - "reference": "04e778e9689882d4c40419263014068b69b93168" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/omnipay/pin/zipball/04e778e9689882d4c40419263014068b69b93168", - "reference": "04e778e9689882d4c40419263014068b69b93168", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Pin\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/omnipay/pin/contributors" - } - ], - "description": "Pin Payments driver for the Omnipay payment processing library", - "homepage": "https://github.com/omnipay/pin", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "pin" - ], - "time": "2014-04-14 11:26:15" - }, - { - "name": "omnipay/sagepay", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-sagepay.git", - "reference": "2d24d15c7a78e2fe1ffb7af705948a60a6492dc6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-sagepay/zipball/2d24d15c7a78e2fe1ffb7af705948a60a6492dc6", - "reference": "2d24d15c7a78e2fe1ffb7af705948a60a6492dc6", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\SagePay\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-sagepay/contributors" - } - ], - "description": "Sage Pay driver for the Omnipay PHP payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-sagepay", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "purchase", - "sage pay", - "sagepay" - ], - "time": "2014-09-17 00:40:02" - }, - { - "name": "omnipay/securepay", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/omnipay/securepay.git", - "reference": "09503288fdb1efcd81bd0ac3c1800ce0ce13cc6e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/omnipay/securepay/zipball/09503288fdb1efcd81bd0ac3c1800ce0ce13cc6e", - "reference": "09503288fdb1efcd81bd0ac3c1800ce0ce13cc6e", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\SecurePay\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/omnipay/securepay/contributors" - } - ], - "description": "SecurePay driver for the Omnipay payment processing library", - "homepage": "https://github.com/omnipay/securepay", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "securepay" - ], - "time": "2014-04-14 11:26:20" - }, - { - "name": "omnipay/stripe", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/omnipay/stripe.git", - "reference": "99c82dc42c7c0b9ec58d8c4fb917f3dc5d1c23e2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/omnipay/stripe/zipball/99c82dc42c7c0b9ec58d8c4fb917f3dc5d1c23e2", - "reference": "99c82dc42c7c0b9ec58d8c4fb917f3dc5d1c23e2", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Stripe\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/omnipay/stripe/contributors" - } - ], - "description": "Stripe driver for the Omnipay payment processing library", - "homepage": "https://github.com/omnipay/stripe", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "stripe" - ], - "time": "2014-04-08 07:07:41" - }, - { - "name": "omnipay/targetpay", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/omnipay/targetpay.git", - "reference": "7274721c97f6f8ad3d2a8b4dea474ac548c45bac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/omnipay/targetpay/zipball/7274721c97f6f8ad3d2a8b4dea474ac548c45bac", - "reference": "7274721c97f6f8ad3d2a8b4dea474ac548c45bac", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\TargetPay\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/omnipay/targetpay/contributors" - } - ], - "description": "TargetPay driver for the Omnipay payment processing library", - "homepage": "https://github.com/omnipay/targetpay", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "targetpay" - ], - "time": "2014-04-14 12:23:56" - }, - { - "name": "omnipay/worldpay", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-worldpay.git", - "reference": "5353f02b7f800b93d8aeae606d6df09afa538457" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-worldpay/zipball/5353f02b7f800b93d8aeae606d6df09afa538457", - "reference": "5353f02b7f800b93d8aeae606d6df09afa538457", - "shasum": "" - }, - "require": { - "omnipay/common": "~2.0" - }, - "require-dev": { - "omnipay/tests": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\WorldPay\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-worldpay/contributors" - } - ], - "description": "WorldPay driver for the Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-worldpay", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "worldpay" - ], - "time": "2014-09-17 00:37:18" - }, - { - "name": "patchwork/utf8", - "version": "1.1.x-dev", - "source": { - "type": "git", - "url": "https://github.com/tchwork/utf8.git", - "reference": "099381bb06bb09161107964f7587fa254e69013d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tchwork/utf8/zipball/099381bb06bb09161107964f7587fa254e69013d", - "reference": "099381bb06bb09161107964f7587fa254e69013d", - "shasum": "" - }, - "require": { - "lib-pcre": ">=7.3", - "php": ">=5.3.0" - }, - "suggest": { - "ext-iconv": "Use iconv for best performance", - "ext-intl": "Use Intl for best performance", - "ext-mbstring": "Use Mbstring for best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-0": { - "Patchwork": "class/", - "Normalizer": "class/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "(Apache-2.0 or GPL-2.0)" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - } - ], - "description": "Portable and performant UTF-8, Unicode and Grapheme Clusters for PHP", - "homepage": "https://github.com/tchwork/utf8", - "keywords": [ - "grapheme", - "i18n", - "unicode", - "utf-8", - "utf8" - ], - "time": "2014-11-10 16:15:34" - }, - { - "name": "patricktalmadge/bootstrapper", - "version": "4.1.19", - "source": { - "type": "git", - "url": "https://github.com/patricktalmadge/bootstrapper.git", - "reference": "aff9d17f31812a2b2f4ca355d7796e6890eedc3f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/patricktalmadge/bootstrapper/zipball/aff9d17f31812a2b2f4ca355d7796e6890eedc3f", - "reference": "aff9d17f31812a2b2f4ca355d7796e6890eedc3f", - "shasum": "" - }, - "require": { - "anahkiasen/html-object": "~1", - "anahkiasen/underscore-php": "~1", - "illuminate/html": "~4.1", - "illuminate/support": "~4.1", - "php": ">=5.3.0" - }, - "require-dev": { - "mockery/mockery": "*", - "phpunit/phpunit": "*" - }, - "type": "library", - "autoload": { - "psr-0": { - "Bootstrapper": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Fabre", - "email": "ehtnam6@gmail.com" - }, - { - "name": "Patrick Talmadge", - "email": "ptalmadge@gmail.com" - }, - { - "name": "Patrick Rose", - "email": "pjr0911025@gmail.com" - } - ], - "description": "Twitter Bootstrap markup generator", - "keywords": [ - "bootstrap", - "laravel" - ], - "time": "2014-06-23 09:37:18" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "fd0ac2007401505fb596fdfb859ec4e103d69e55" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/fd0ac2007401505fb596fdfb859ec4e103d69e55", - "reference": "fd0ac2007401505fb596fdfb859ec4e103d69e55", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2014-09-02 14:26:20" - }, - { - "name": "phpseclib/phpseclib", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "c0511f2df456014da07a2e607ada5510904c6db3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c0511f2df456014da07a2e607ada5510904c6db3", - "reference": "c0511f2df456014da07a2e607ada5510904c6db3", - "shasum": "" - }, - "require": { - "php": ">=5.0.0" - }, - "require-dev": { - "phing/phing": "2.7.*", - "phpunit/phpunit": "4.0.*", - "sami/sami": "1.*", - "squizlabs/php_codesniffer": "1.*" - }, - "suggest": { - "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", - "ext-mcrypt": "Install the Mcrypt extension in order to speed up a wide variety of cryptographic operations.", - "pear-pear/PHP_Compat": "Install PHP_Compat to get phpseclib working on PHP < 4.3.3." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "autoload": { - "psr-0": { - "Crypt": "phpseclib/", - "File": "phpseclib/", - "Math": "phpseclib/", - "Net": "phpseclib/", - "System": "phpseclib/" - }, - "files": [ - "phpseclib/Crypt/Random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "phpseclib/" - ], - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jim Wigginton", - "email": "terrafrost@php.net", - "role": "Lead Developer" - }, - { - "name": "Patrick Monnerat", - "email": "pm@datasphere.ch", - "role": "Developer" - }, - { - "name": "Andreas Fischer", - "email": "bantu@phpbb.com", - "role": "Developer" - }, - { - "name": "Hans-Jürgen Petrich", - "email": "petrich@tronic-media.com", - "role": "Developer" - } - ], - "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", - "homepage": "http://phpseclib.sourceforge.net", - "keywords": [ - "BigInteger", - "aes", - "asn.1", - "asn1", - "blowfish", - "crypto", - "cryptography", - "encryption", - "rsa", - "security", - "sftp", - "signature", - "signing", - "ssh", - "twofish", - "x.509", - "x509" - ], - "time": "2014-11-20 09:58:23" - }, - { - "name": "predis/predis", - "version": "0.8.x-dev", - "source": { - "type": "git", - "url": "https://github.com/nrk/predis.git", - "reference": "4123fcd85d61354c6c9900db76c9597dbd129bf6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nrk/predis/zipball/4123fcd85d61354c6c9900db76c9597dbd129bf6", - "reference": "4123fcd85d61354c6c9900db76c9597dbd129bf6", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "ext-curl": "Allows access to Webdis when paired with phpiredis", - "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" - }, - "type": "library", - "autoload": { - "psr-0": { - "Predis": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniele Alessandri", - "email": "suppakilla@gmail.com", - "homepage": "http://clorophilla.net" - } - ], - "description": "Flexible and feature-complete PHP client library for Redis", - "homepage": "http://github.com/nrk/predis", - "keywords": [ - "nosql", - "predis", - "redis" - ], - "time": "2014-08-01 09:43:10" - }, - { - "name": "psr/log", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "a78d6504ff5d4367497785ab2ade91db3a9fbe11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/a78d6504ff5d4367497785ab2ade91db3a9fbe11", - "reference": "a78d6504ff5d4367497785ab2ade91db3a9fbe11", - "shasum": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2014-01-18 15:33:09" - }, - { - "name": "stack/builder", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/stackphp/builder.git", - "reference": "c1f8a4693b55c563405024f708a76ef576c3b276" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/stackphp/builder/zipball/c1f8a4693b55c563405024f708a76ef576c3b276", - "reference": "c1f8a4693b55c563405024f708a76ef576c3b276", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "symfony/http-foundation": "~2.1", - "symfony/http-kernel": "~2.1" - }, - "require-dev": { - "silex/silex": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Stack": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - } - ], - "description": "Builder for stack middlewares based on HttpKernelInterface.", - "keywords": [ - "stack" - ], - "time": "2014-11-23 20:37:11" - }, - { - "name": "swiftmailer/swiftmailer", - "version": "v5.0.3", - "source": { - "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "32edc3b0de0fdc1b10f5c4912e8677b3f411a230" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/32edc3b0de0fdc1b10f5c4912e8677b3f411a230", - "reference": "32edc3b0de0fdc1b10f5c4912e8677b3f411a230", - "shasum": "" - }, - "require": { - "php": ">=5.2.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "files": [ - "lib/swift_required.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Chris Corbyn" - } - ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "http://swiftmailer.org", - "keywords": [ - "mail", - "mailer" - ], - "time": "2013-12-03 13:33:24" - }, - { - "name": "symfony/browser-kit", - "version": "2.4.x-dev", - "target-dir": "Symfony/Component/BrowserKit", - "source": { - "type": "git", - "url": "https://github.com/symfony/BrowserKit.git", - "reference": "027accb7a418046887680764bfbeeebc84ecf5a6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/027accb7a418046887680764bfbeeebc84ecf5a6", - "reference": "027accb7a418046887680764bfbeeebc84ecf5a6", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/dom-crawler": "~2.0" - }, - "require-dev": { - "symfony/css-selector": "~2.0", - "symfony/process": "~2.0" - }, - "suggest": { - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\BrowserKit\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony BrowserKit Component", - "homepage": "http://symfony.com", - "time": "2014-09-22 08:51:05" - }, - { - "name": "symfony/class-loader", - "version": "2.6.x-dev", - "target-dir": "Symfony/Component/ClassLoader", - "source": { - "type": "git", - "url": "https://github.com/symfony/ClassLoader.git", - "reference": "b403af3d4fa3a2c3c926121c05042107e3a5b916" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/ClassLoader/zipball/b403af3d4fa3a2c3c926121c05042107e3a5b916", - "reference": "b403af3d4fa3a2c3c926121c05042107e3a5b916", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/finder": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\ClassLoader\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony ClassLoader Component", - "homepage": "http://symfony.com", - "time": "2014-11-20 13:24:23" - }, - { - "name": "symfony/console", - "version": "2.4.x-dev", - "target-dir": "Symfony/Component/Console", - "source": { - "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "39dd1c85ffdfc3c5fb008019dd027af05f64ec36" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/39dd1c85ffdfc3c5fb008019dd027af05f64ec36", - "reference": "39dd1c85ffdfc3c5fb008019dd027af05f64ec36", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/event-dispatcher": "~2.1" - }, - "suggest": { - "symfony/event-dispatcher": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Console Component", - "homepage": "http://symfony.com", - "time": "2014-09-22 08:51:05" - }, - { - "name": "symfony/css-selector", - "version": "2.4.x-dev", - "target-dir": "Symfony/Component/CssSelector", - "source": { - "type": "git", - "url": "https://github.com/symfony/CssSelector.git", - "reference": "4e9ddc09c13475fb1a52fb578a8899c8303966c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/4e9ddc09c13475fb1a52fb578a8899c8303966c5", - "reference": "4e9ddc09c13475fb1a52fb578a8899c8303966c5", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\CssSelector\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony CssSelector Component", - "homepage": "http://symfony.com", - "time": "2014-09-22 08:51:05" - }, - { - "name": "symfony/debug", - "version": "2.4.x-dev", - "target-dir": "Symfony/Component/Debug", - "source": { - "type": "git", - "url": "https://github.com/symfony/Debug.git", - "reference": "17f9a22782f51ca18724b6713671cf0148b86043" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/17f9a22782f51ca18724b6713671cf0148b86043", - "reference": "17f9a22782f51ca18724b6713671cf0148b86043", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/http-foundation": "~2.1", - "symfony/http-kernel": "~2.1" - }, - "suggest": { - "symfony/http-foundation": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Debug\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Debug Component", - "homepage": "http://symfony.com", - "time": "2014-09-28 15:03:21" - }, - { - "name": "symfony/dom-crawler", - "version": "2.4.x-dev", - "target-dir": "Symfony/Component/DomCrawler", - "source": { - "type": "git", - "url": "https://github.com/symfony/DomCrawler.git", - "reference": "eea2c3d5c16f6319d0122153594fdb66dfba1ca1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/eea2c3d5c16f6319d0122153594fdb66dfba1ca1", - "reference": "eea2c3d5c16f6319d0122153594fdb66dfba1ca1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/css-selector": "~2.0" - }, - "suggest": { - "symfony/css-selector": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\DomCrawler\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony DomCrawler Component", - "homepage": "http://symfony.com", - "time": "2014-09-22 08:51:05" - }, - { - "name": "symfony/event-dispatcher", - "version": "2.7.x-dev", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "30e571ce1bba949b44f49b977966898a41c77a01" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/30e571ce1bba949b44f49b977966898a41c77a01", - "reference": "30e571ce1bba949b44f49b977966898a41c77a01", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/stopwatch": "~2.2" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com", - "time": "2014-11-20 13:24:30" - }, - { - "name": "symfony/filesystem", - "version": "2.7.x-dev", - "target-dir": "Symfony/Component/Filesystem", - "source": { - "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "5bbd9f52cd5ebf7ea85f447b779fcfa8a25a95e7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/5bbd9f52cd5ebf7ea85f447b779fcfa8a25a95e7", - "reference": "5bbd9f52cd5ebf7ea85f447b779fcfa8a25a95e7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "http://symfony.com", - "time": "2014-11-16 17:28:20" - }, - { - "name": "symfony/finder", - "version": "2.4.x-dev", - "target-dir": "Symfony/Component/Finder", - "source": { - "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "cd03920154bc6669f64fbabb803d24cc8629964c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/cd03920154bc6669f64fbabb803d24cc8629964c", - "reference": "cd03920154bc6669f64fbabb803d24cc8629964c", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Finder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Finder Component", - "homepage": "http://symfony.com", - "time": "2014-09-27 08:35:25" - }, - { - "name": "symfony/http-foundation", - "version": "2.4.x-dev", - "target-dir": "Symfony/Component/HttpFoundation", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "8e42d9536b5df05f37a9aae5761d3ee69ab95ddf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/8e42d9536b5df05f37a9aae5761d3ee69ab95ddf", - "reference": "8e42d9536b5df05f37a9aae5761d3ee69ab95ddf", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/expression-language": "~2.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "http://symfony.com", - "time": "2014-09-25 08:51:47" - }, - { - "name": "symfony/http-kernel", - "version": "2.4.x-dev", - "target-dir": "Symfony/Component/HttpKernel", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpKernel.git", - "reference": "84b1bd5433bc78cf78c19808abdd155edb4f1937" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/84b1bd5433bc78cf78c19808abdd155edb4f1937", - "reference": "84b1bd5433bc78cf78c19808abdd155edb4f1937", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "psr/log": "~1.0", - "symfony/debug": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/http-foundation": "~2.4" - }, - "require-dev": { - "symfony/browser-kit": "~2.2", - "symfony/class-loader": "~2.1", - "symfony/config": "~2.0", - "symfony/console": "~2.2", - "symfony/dependency-injection": "~2.0", - "symfony/expression-language": "~2.4", - "symfony/finder": "~2.0", - "symfony/process": "~2.0", - "symfony/routing": "~2.2", - "symfony/stopwatch": "~2.2", - "symfony/templating": "~2.2" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpKernel\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "http://symfony.com", - "time": "2014-09-28 17:03:37" - }, - { - "name": "symfony/process", - "version": "2.4.x-dev", - "target-dir": "Symfony/Component/Process", - "source": { - "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "2756ff2bc8e05527f4d5285cc4406e269b12e516" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/2756ff2bc8e05527f4d5285cc4406e269b12e516", - "reference": "2756ff2bc8e05527f4d5285cc4406e269b12e516", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Process\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Process Component", - "homepage": "http://symfony.com", - "time": "2014-09-23 05:24:59" - }, - { - "name": "symfony/routing", - "version": "2.4.x-dev", - "target-dir": "Symfony/Component/Routing", - "source": { - "type": "git", - "url": "https://github.com/symfony/Routing.git", - "reference": "0bd97a27cfd1ad2699ad045de2a744888318a228" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/0bd97a27cfd1ad2699ad045de2a744888318a228", - "reference": "0bd97a27cfd1ad2699ad045de2a744888318a228", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "psr/log": "~1.0", - "symfony/config": "~2.2", - "symfony/expression-language": "~2.4", - "symfony/http-foundation": "~2.3", - "symfony/yaml": "~2.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation loader", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/expression-language": "For using expression matching", - "symfony/yaml": "For using the YAML loader" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Routing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Routing Component", - "homepage": "http://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ], - "time": "2014-09-22 15:28:09" - }, - { - "name": "symfony/translation", - "version": "2.4.x-dev", - "target-dir": "Symfony/Component/Translation", - "source": { - "type": "git", - "url": "https://github.com/symfony/Translation.git", - "reference": "c61327aab6ec192b55e4868c52fdd0ca476100d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/c61327aab6ec192b55e4868c52fdd0ca476100d3", - "reference": "c61327aab6ec192b55e4868c52fdd0ca476100d3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/config": "~2.0", - "symfony/intl": "~2.3", - "symfony/yaml": "~2.2" - }, - "suggest": { - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Translation Component", - "homepage": "http://symfony.com", - "time": "2014-09-23 05:24:59" - }, - { - "name": "webpatser/laravel-countries", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/webpatser/laravel-countries.git", - "reference": "d5041d63127a3b7022360a032164523ab49e11b3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webpatser/laravel-countries/zipball/d5041d63127a3b7022360a032164523ab49e11b3", - "reference": "d5041d63127a3b7022360a032164523ab49e11b3", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "laravel-library", - "autoload": { - "psr-0": { - "Webpatser\\Countries": "src/" - }, - "classmap": [ - "src/commands" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christoph Kempen", - "email": "christoph@downsized.nl", - "homepage": "http://downsized.nl/", - "role": "developer" - }, - { - "name": "Paul Kievits", - "role": "developer" - } - ], - "description": "Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries.", - "homepage": "https://github.com/webpatser/laravel-countries", - "keywords": [ - "countries", - "iso_3166_2", - "iso_3166_3", - "laravel" - ], - "time": "2014-10-21 11:00:52" - }, - { - "name": "zizaco/confide", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/Zizaco/confide.git", - "reference": "e2c0f67e8e7bb3d53210d78d8cf806f520c0ad31" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Zizaco/confide/zipball/e2c0f67e8e7bb3d53210d78d8cf806f520c0ad31", - "reference": "e2c0f67e8e7bb3d53210d78d8cf806f520c0ad31", - "shasum": "" - }, - "require": { - "illuminate/support": "4.1.x", - "laravelbook/ardent": "2.4.x", - "php": ">=5.3.0" - }, - "require-dev": { - "illuminate/auth": "4.1.x", - "illuminate/database": "4.1.x", - "mockery/mockery": "0.7.2" - }, - "suggest": { - "zizaco/entrust": "add Role-based Permissions to Laravel 4" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/migrations", - "src/commands" - ], - "psr-0": { - "Zizaco\\Confide": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Zizaco Zizuini", - "email": "zizaco@gmail.com", - "homepage": "http://www.zizaco.net" - }, - { - "name": "Andrew Elkins", - "homepage": "http://www.andrewelkins.com" - } - ], - "description": "Confide is an authentication solution for Laravel 4", - "keywords": [ - "auth", - "illuminate", - "laravel" - ], - "time": "2013-12-28 04:22:18" - } - ], - "packages-dev": [ - { - "name": "codeception/codeception", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/Codeception/Codeception.git", - "reference": "48b2809b6401e56d67c74a35bd2e7a60030ce3e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/48b2809b6401e56d67c74a35bd2e7a60030ce3e4", - "reference": "48b2809b6401e56d67c74a35bd2e7a60030ce3e4", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "facebook/webdriver": "~0.4", - "guzzlehttp/guzzle": "~4.0", - "php": ">=5.4.0", - "phpunit/phpunit": "~4.0", - "symfony/browser-kit": "~2.4", - "symfony/console": "~2.4", - "symfony/css-selector": "~2.4", - "symfony/dom-crawler": "~2.4,!=2.4.5", - "symfony/event-dispatcher": "~2.4", - "symfony/finder": "~2.4", - "symfony/yaml": "~2.4" - }, - "require-dev": { - "codeception/specify": "~0.3", - "codegyre/robo-ci": "@dev", - "facebook/php-sdk": "~3.2", - "monolog/monolog": "~1.8", - "pda/pheanstalk": "~2.0", - "phpseclib/phpseclib": "~0.3.6", - "videlalvaro/php-amqplib": "~2.4" - }, - "suggest": { - "codeception/phpbuiltinserver": "Extension to start and stop PHP built-in web server for your tests", - "codeception/specify": "BDD-style code blocks", - "codeception/verify": "BDD-style assertions", - "monolog/monolog": "Log test steps", - "phpseclib/phpseclib": "Extension required to use the SFTP option in the FTP Module." - }, - "bin": [ - "codecept" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "psr-0": { - "Codeception": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Bodnarchuk", - "email": "davert@mail.ua", - "homepage": "http://codegyre.com" - } - ], - "description": "BDD-style testing framework", - "homepage": "http://codeception.com/", - "keywords": [ - "BDD", - "TDD", - "acceptance testing", - "functional testing", - "unit testing" - ], - "time": "2014-11-20 22:56:33" - }, - { - "name": "doctrine/instantiator", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119", - "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "2.0.*@ALPHA" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Instantiator\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2014-10-13 12:58:55" - }, - { - "name": "facebook/webdriver", - "version": "v0.5.1", - "source": { - "type": "git", - "url": "https://github.com/facebook/php-webdriver.git", - "reference": "bbcb697efb394d17bd9ec3d467e7da847cde4509" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/bbcb697efb394d17bd9ec3d467e7da847cde4509", - "reference": "bbcb697efb394d17bd9ec3d467e7da847cde4509", - "shasum": "" - }, - "require": { - "php": ">=5.3.19" - }, - "require-dev": { - "phpdocumentor/phpdocumentor": "2.*", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "autoload": { - "classmap": [ - "lib/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "description": "A php client for WebDriver", - "homepage": "https://github.com/facebook/php-webdriver", - "keywords": [ - "facebook", - "php", - "selenium", - "webdriver" - ], - "time": "2014-11-05 20:53:09" - }, - { - "name": "guzzlehttp/guzzle", - "version": "4.2.3", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "66fd916e9f9130bc22c51450476823391cb2f67c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/66fd916e9f9130bc22c51450476823391cb2f67c", - "reference": "66fd916e9f9130bc22c51450476823391cb2f67c", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/streams": "~2.1", - "php": ">=5.4.0" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "~4.0", - "psr/log": "~1.0" - }, - "suggest": { - "ext-curl": "Guzzle will use specific adapters if cURL is present" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2014-10-05 19:29:14" - }, - { - "name": "guzzlehttp/streams", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/streams.git", - "reference": "f91b721d73f0e561410903b3b3c90a5d0e40b534" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/streams/zipball/f91b721d73f0e561410903b3b3c90a5d0e40b534", - "reference": "f91b721d73f0e561410903b3b3c90a5d0e40b534", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Stream\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Provides a simple abstraction over streams of data (Guzzle 4+)", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "stream" - ], - "time": "2014-08-17 21:15:53" - }, - { - "name": "phpspec/prophecy", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "9ca52329bcdd1500de24427542577ebf3fc2f1c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/9ca52329bcdd1500de24427542577ebf3fc2f1c9", - "reference": "9ca52329bcdd1500de24427542577ebf3fc2f1c9", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "~1.0,>=1.0.2", - "phpdocumentor/reflection-docblock": "~2.0" - }, - "require-dev": { - "phpspec/phpspec": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "http://phpspec.org", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2014-11-17 16:23:49" - }, - { - "name": "phpunit/php-code-coverage", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "21b9006b7ceb7e1cb0b705615af31f67c8cd1692" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/21b9006b7ceb7e1cb0b705615af31f67c8cd1692", - "reference": "21b9006b7ceb7e1cb0b705615af31f67c8cd1692", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "~1.0", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "dev-master" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2014-11-11 14:18:30" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "File/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2013-10-10 15:34:57" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "Text/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2014-01-30 17:20:04" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "PHP/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2013-08-02 07:42:54" - }, - { - "name": "phpunit/php-token-stream", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "f8d5d08c56de5cfd592b3340424a81733259a876" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/f8d5d08c56de5cfd592b3340424a81733259a876", - "reference": "f8d5d08c56de5cfd592b3340424a81733259a876", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2014-08-31 06:12:13" - }, - { - "name": "phpunit/phpunit", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a137e59f5fe1c09a013b41f3164f3499509a92d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a137e59f5fe1c09a013b41f3164f3499509a92d0", - "reference": "a137e59f5fe1c09a013b41f3164f3499509a92d0", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "~1.3.1", - "phpunit/php-code-coverage": "3.0.*@dev", - "phpunit/php-file-iterator": "~1.3.2", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "~1.0.2", - "phpunit/phpunit-mock-objects": "2.4.*@dev", - "sebastian/comparator": "1.1.*@dev", - "sebastian/diff": "~1.1", - "sebastian/environment": "~1.2", - "sebastian/exporter": "~1.0", - "sebastian/global-state": "1.0.*@dev", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.5.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2014-11-22 10:32:03" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "96c5b81f9842f38fe6c73ad0020306cc4862a9e3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/96c5b81f9842f38fe6c73ad0020306cc4862a9e3", - "reference": "96c5b81f9842f38fe6c73ad0020306cc4862a9e3", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "~1.0,>=1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "4.4.*@dev" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2014-10-04 10:04:20" - }, - { - "name": "sebastian/comparator", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "c484a80f97573ab934e37826dba0135a3301b26a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/c484a80f97573ab934e37826dba0135a3301b26a", - "reference": "c484a80f97573ab934e37826dba0135a3301b26a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.1", - "sebastian/exporter": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2014-11-16 21:32:38" - }, - { - "name": "sebastian/diff", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "f38057b48125c2b421361da224a8aa800d70aeca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/f38057b48125c2b421361da224a8aa800d70aeca", - "reference": "f38057b48125c2b421361da224a8aa800d70aeca", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2014-11-22 06:25:40" - }, - { - "name": "sebastian/environment", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e6c71d918088c251b181ba8b3088af4ac336dd7", - "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2014-10-25 08:00:45" - }, - { - "name": "sebastian/exporter", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", - "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2014-09-10 00:51:36" - }, - { - "name": "sebastian/global-state", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "231d48620efde984fd077ee92916099a3ece9a59" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/231d48620efde984fd077ee92916099a3ece9a59", - "reference": "231d48620efde984fd077ee92916099a3ece9a59", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2014-10-06 09:49:11" - }, - { - "name": "sebastian/version", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2014-03-07 15:35:33" - }, - { - "name": "symfony/yaml", - "version": "2.7.x-dev", - "target-dir": "Symfony/Component/Yaml", - "source": { - "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "75deb1b183d2bbf12f4b54c644c0caafca338fbe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/75deb1b183d2bbf12f4b54c644c0caafca338fbe", - "reference": "75deb1b183d2bbf12f4b54c644c0caafca338fbe", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Yaml Component", - "homepage": "http://symfony.com", - "time": "2014-11-20 13:24:30" - } - ], - "aliases": [ - - ], - "minimum-stability": "dev", - "stability-flags": { - "barryvdh/laravel-debugbar": 20, - "webpatser/laravel-countries": 20, - "lokielse/omnipay-alipay": 20, - "alfaproject/omnipay-skrill": 20, - "codeception/codeception": 20 - }, - "prefer-stable": false, - "platform": [ - - ], - "platform-dev": [ - - ] -} diff --git a/node_modules/grunt-contrib-concat/LICENSE-MIT b/node_modules/grunt-contrib-concat/LICENSE-MIT deleted file mode 100644 index f01cf517a960..000000000000 --- a/node_modules/grunt-contrib-concat/LICENSE-MIT +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2014 "Cowboy" Ben Alman, contributors - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/grunt-contrib-concat/README.md b/node_modules/grunt-contrib-concat/README.md deleted file mode 100644 index 613fdb10c8d8..000000000000 --- a/node_modules/grunt-contrib-concat/README.md +++ /dev/null @@ -1,280 +0,0 @@ -# grunt-contrib-concat v0.4.0 [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-concat.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-concat) - -> Concatenate files. - - - -## Getting Started -This plugin requires Grunt `~0.4.0` - -If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command: - -```shell -npm install grunt-contrib-concat --save-dev -``` - -Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript: - -```js -grunt.loadNpmTasks('grunt-contrib-concat'); -``` - - - - -## Concat task -_Run this task with the `grunt concat` command._ - -Task targets, files and options may be specified according to the Grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide. - -### Options - -#### separator -Type: `String` -Default: `grunt.util.linefeed` - -Concatenated files will be joined on this string. If you're post-processing concatenated JavaScript files with a minifier, you may need to use a semicolon `';'` as the separator. - -#### banner -Type: `String` -Default: empty string - -This string will be prepended to the beginning of the concatenated output. It is processed using [grunt.template.process][], using the default options. - -_(Default processing options are explained in the [grunt.template.process][] documentation)_ - -#### footer -Type: `String` -Default: empty string - -This string will be appended to the end of the concatenated output. It is processed using [grunt.template.process][], using the default options. - -_(Default processing options are explained in the [grunt.template.process][] documentation)_ - -#### stripBanners -Type: `Boolean` `Object` -Default: `false` - -Strip JavaScript banner comments from source files. - -* `false` - No comments are stripped. -* `true` - `/* ... */` block comments are stripped, but _NOT_ `/*! ... */` comments. -* `options` object: - * By default, behaves as if `true` were specified. - * `block` - If true, _all_ block comments are stripped. - * `line` - If true, any contiguous _leading_ `//` line comments are stripped. - -#### process -Type: `Boolean` `Object` `Function` -Default: `false` - -Process source files before concatenating, either as [templates][] or with a custom function. - -* `false` - No processing will occur. -* `true` - Process source files using [grunt.template.process][] defaults. -* `data` object - Process source files using [grunt.template.process][], using the specified options. -* `function(src, filepath)` - Process source files using the given function, called once for each file. The returned value will be used as source code. - -_(Default processing options are explained in the [grunt.template.process][] documentation)_ - - [templates]: https://github.com/gruntjs/grunt-docs/blob/master/grunt.template.md - [grunt.template.process]: https://github.com/gruntjs/grunt-docs/blob/master/grunt.template.md#grunttemplateprocess - -### Usage Examples - -#### Concatenating with a custom separator - -In this example, running `grunt concat:dist` (or `grunt concat` because `concat` is a [multi task][multitask]) will concatenate the three specified source files (in order), joining files with `;` and writing the output to `dist/built.js`. - -```js -// Project configuration. -grunt.initConfig({ - concat: { - options: { - separator: ';', - }, - dist: { - src: ['src/intro.js', 'src/project.js', 'src/outro.js'], - dest: 'dist/built.js', - }, - }, -}); -``` - -#### Banner comments - -In this example, running `grunt concat:dist` will first strip any preexisting banner comment from the `src/project.js` file, then concatenate the result with a newly-generated banner comment, writing the output to `dist/built.js`. - -This generated banner will be the contents of the `banner` template string interpolated with the config object. In this case, those properties are the values imported from the `package.json` file (which are available via the `pkg` config property) plus today's date. - -_Note: you don't have to use an external JSON file. It's also valid to create the `pkg` object inline in the config. That being said, if you already have a JSON file, you might as well reference it._ - -```js -// Project configuration. -grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - concat: { - options: { - stripBanners: true, - banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + - '<%= grunt.template.today("yyyy-mm-dd") %> */', - }, - dist: { - src: ['src/project.js'], - dest: 'dist/built.js', - }, - }, -}); -``` - -#### Multiple targets - -In this example, running `grunt concat` will build two separate files. One "basic" version, with the main file essentially just copied to `dist/basic.js`, and another "with_extras" concatenated version written to `dist/with_extras.js`. - -While each concat target can be built individually by running `grunt concat:basic` or `grunt concat:extras`, running `grunt concat` will build all concat targets. This is because `concat` is a [multi task][multitask]. - -```js -// Project configuration. -grunt.initConfig({ - concat: { - basic: { - src: ['src/main.js'], - dest: 'dist/basic.js', - }, - extras: { - src: ['src/main.js', 'src/extras.js'], - dest: 'dist/with_extras.js', - }, - }, -}); -``` - -#### Multiple files per target - -Like the previous example, in this example running `grunt concat` will build two separate files. One "basic" version, with the main file essentially just copied to `dist/basic.js`, and another "with_extras" concatenated version written to `dist/with_extras.js`. - -This example differs in that both files are built under the same target. - -Using the `files` object, you can have list any number of source-destination pairs. - -```js -// Project configuration. -grunt.initConfig({ - concat: { - basic_and_extras: { - files: { - 'dist/basic.js': ['src/main.js'], - 'dist/with_extras.js': ['src/main.js', 'src/extras.js'], - }, - }, - }, -}); -``` - -#### Dynamic filenames - -Filenames can be generated dynamically by using `<%= %>` delimited underscore templates as filenames. - -In this example, running `grunt concat:dist` generates a destination file whose name is generated from the `name` and `version` properties of the referenced `package.json` file (via the `pkg` config property). - -```js -// Project configuration. -grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - concat: { - dist: { - src: ['src/main.js'], - dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js', - }, - }, -}); -``` - -#### Advanced dynamic filenames - -In this more involved example, running `grunt concat` will build two separate files (because `concat` is a [multi task][multitask]). The destination file paths will be expanded dynamically based on the specified templates, recursively if necessary. - -For example, if the `package.json` file contained `{"name": "awesome", "version": "1.0.0"}`, the files `dist/awesome/1.0.0/basic.js` and `dist/awesome/1.0.0/with_extras.js` would be generated. - -```js -// Project configuration. -grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - dirs: { - src: 'src/files', - dest: 'dist/<%= pkg.name %>/<%= pkg.version %>', - }, - concat: { - basic: { - src: ['<%= dirs.src %>/main.js'], - dest: '<%= dirs.dest %>/basic.js', - }, - extras: { - src: ['<%= dirs.src %>/main.js', '<%= dirs.src %>/extras.js'], - dest: '<%= dirs.dest %>/with_extras.js', - }, - }, -}); -``` - -#### Invalid or Missing Files Warning -If you would like the `concat` task to warn if a given file is missing or invalid be sure to set `nonull` to `true`: - -```js -grunt.initConfig({ - concat: { - missing: { - src: ['src/invalid_or_missing_file'], - dest: 'compiled.js', - nonull: true, - }, - }, -}); -``` - -See [configuring files for a task](http://gruntjs.com/configuring-tasks#files) for how to configure file globbing in Grunt. - - -#### Custom process function -If you would like to do any custom processing before concatenating, use a custom process function: - -```js -grunt.initConfig({ - concat: { - dist: { - options: { - // Replace all 'use strict' statements in the code with a single one at the top - banner: "'use strict';\n", - process: function(src, filepath) { - return '// Source: ' + filepath + '\n' + - src.replace(/(^|\n)[ \t]*('use strict'|"use strict");?\s*/g, '$1'); - }, - }, - files: { - 'dist/built.js': ['src/project.js'], - }, - }, - }, -}); -``` - -[multitask]: http://gruntjs.com/creating-tasks#multi-tasks - - -## Release History - - * 2014-03-21   v0.4.0   README updates. Output updates. - * 2013-04-25   v0.3.0   Add option to process files with a custom function. - * 2013-04-08   v0.2.0   Don't normalize separator to allow user to set LF even on a Windows environment. - * 2013-02-22   v0.1.3   Support footer option. - * 2013-02-15   v0.1.2   First official release for Grunt 0.4.0. - * 2013-01-18   v0.1.2rc6   Updating grunt/gruntplugin dependencies to rc6. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions. - * 2013-01-09   v0.1.2rc5   Updating to work with grunt v0.4.0rc5. Switching back to this.files api. - * 2012-11-13   v0.1.1   Switch to this.file api internally. - * 2012-10-03   v0.1.0   Work in progress, not yet officially released. - ---- - -Task submitted by ["Cowboy" Ben Alman](http://benalman.com/) - -*This file was generated on Mon Mar 31 2014 11:20:28.* diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/index.js b/node_modules/grunt-contrib-concat/node_modules/chalk/index.js deleted file mode 100644 index a21f702233e6..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/index.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; -var ansi = require('ansi-styles'); -var stripAnsi = require('strip-ansi'); -var hasColor = require('has-color'); -var defineProps = Object.defineProperties; -var chalk = module.exports; - -var styles = (function () { - var ret = {}; - - ansi.grey = ansi.gray; - - Object.keys(ansi).forEach(function (key) { - ret[key] = { - get: function () { - this._styles.push(key); - return this; - } - }; - }); - - return ret; -})(); - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - var obj = defineProps(function self() { - var str = [].slice.call(arguments).join(' '); - - if (!chalk.enabled) { - return str; - } - - return self._styles.reduce(function (str, name) { - var code = ansi[name]; - return str ? code.open + str + code.close : ''; - }, str); - }, styles); - - obj._styles = []; - - return obj[name]; - } - } - }); - - return ret; -} - -defineProps(chalk, init()); - -chalk.styles = ansi; -chalk.stripColor = stripAnsi; -chalk.supportsColor = hasColor; - -// detect mode if not set manually -if (chalk.enabled === undefined) { - chalk.enabled = chalk.supportsColor; -} diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/.bin/strip-ansi b/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/.bin/strip-ansi deleted file mode 120000 index b65c9f81df9d..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/.bin/strip-ansi +++ /dev/null @@ -1 +0,0 @@ -../strip-ansi/cli.js \ No newline at end of file diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js deleted file mode 100644 index 3da548c405db..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; -var styles = module.exports; - -var codes = { - reset: [0, 0], - - bold: [1, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - strikethrough: [9, 29], - - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] -}; - -Object.keys(codes).forEach(function (key) { - var val = codes[key]; - var style = styles[key] = {}; - style.open = '\x1b[' + val[0] + 'm'; - style.close = '\x1b[' + val[1] + 'm'; -}); diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index 2d61dabe918d..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "ansi-styles", - "version": "1.0.0", - "description": "ANSI escape codes for colorizing strings in the terminal", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/ansi-styles", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-styles/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "ansi-styles.js" - ], - "main": "ansi-styles", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/ansi-styles.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green.open + 'Hello world!' + ansi.green.close);\n```\n\n## API\n\nEach style has an `open` and `close` property.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "ansi-styles@1.0.0", - "_from": "ansi-styles@~1.0.0" -} diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/readme.md deleted file mode 100644 index 4ac8cbd0ab76..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,65 +0,0 @@ -# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal. - -You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. - -![screenshot](screenshot.png) - - -## Install - -Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` - - -## Example - -```js -var ansi = require('ansi-styles'); - -console.log(ansi.green.open + 'Hello world!' + ansi.green.close); -``` - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/index.js b/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/index.js deleted file mode 100644 index 092d0baef669..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/index.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; -module.exports = (function () { - if (process.argv.indexOf('--no-color') !== -1) { - return false; - } - - if (process.argv.indexOf('--color') !== -1) { - return true; - } - - if (process.stdout && !process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - if (process.env.TERM === 'dumb') { - return false; - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; - } - - return false; -})(); diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/package.json b/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/package.json deleted file mode 100644 index e956888c6ad3..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "has-color", - "version": "0.1.7", - "description": "Detect whether a terminal supports color", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/has-color" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "capability", - "detect" - ], - "devDependencies": { - "mocha": "*" - }, - "readme": "# has-color [![Build Status](https://travis-ci.org/sindresorhus/has-color.svg?branch=master)](https://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\n```bash\n$ npm install --save has-color\n```\n\n\n## Usage\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the `--color` and `--no-color` CLI flags.\n\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/has-color/issues" - }, - "homepage": "https://github.com/sindresorhus/has-color", - "_id": "has-color@0.1.7", - "dist": { - "shasum": "1b80986f9e0b4cd0a22bd67b4cd4f04c0363375f" - }, - "_from": "has-color@~0.1.0", - "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz" -} diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/readme.md deleted file mode 100644 index 37bbd8991a64..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# has-color [![Build Status](https://travis-ci.org/sindresorhus/has-color.svg?branch=master)](https://travis-ci.org/sindresorhus/has-color) - -> Detect whether a terminal supports color. - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -```bash -$ npm install --save has-color -``` - - -## Usage - -```js -var hasColor = require('has-color'); - -if (hasColor) { - console.log('Terminal supports color.'); -} -``` - -It obeys the `--color` and `--no-color` CLI flags. - - -## License - -[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/cli.js b/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/cli.js deleted file mode 100755 index f8019cdae576..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/cli.js +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var fs = require('fs'); -var strip = require('./index'); -var input = process.argv[2]; - -if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) { - console.log('strip-ansi > '); - console.log('or'); - console.log('cat | strip-ansi > '); - return; -} - -if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) { - console.log(require('./package').version); - return; -} - -if (input) { - process.stdout.write(strip(fs.readFileSync(input, 'utf8'))); - return; -} - -process.stdin.setEncoding('utf8'); -process.stdin.on('data', function (data) { - process.stdout.write(strip(data)); -}); diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/index.js b/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/index.js deleted file mode 100644 index 62320c5914a0..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = function (str) { - return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str; -}; diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/package.json b/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/package.json deleted file mode 100644 index 7ca2b5d14da6..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "strip-ansi", - "version": "0.1.1", - "description": "Strip ANSI escape codes (used for colorizing strings in the terminal)", - "license": "MIT", - "bin": { - "strip-ansi": "cli.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/strip-ansi" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js", - "cli.js" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "devDependencies": { - "mocha": "~1.x" - }, - "readme": "# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi)\n\n> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal)\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall locally with [npm](https://npmjs.org/package/strip-ansi):\n\n```\nnpm install --save strip-ansi\n```\n\nOr globally if you want to use it as a CLI app:\n\n```\nnpm install --global strip-ansi\n```\n\nYou can then use it in your Terminal like:\n\n```\nstrip-ansi file-with-color-codes\n```\n\nOr pipe something to it:\n\n```\nls | strip-ansi\n```\n\n\n## Example\n\n```js\nvar stripAnsi = require('strip-ansi');\nstripAnsi('\\x1b[4mcake\\x1b[0m');\n//=> cake\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/strip-ansi/issues" - }, - "homepage": "https://github.com/sindresorhus/strip-ansi", - "_id": "strip-ansi@0.1.1", - "_from": "strip-ansi@~0.1.0" -} diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/readme.md b/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/readme.md deleted file mode 100644 index eb661b3d829b..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi) - -> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal) - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install locally with [npm](https://npmjs.org/package/strip-ansi): - -``` -npm install --save strip-ansi -``` - -Or globally if you want to use it as a CLI app: - -``` -npm install --global strip-ansi -``` - -You can then use it in your Terminal like: - -``` -strip-ansi file-with-color-codes -``` - -Or pipe something to it: - -``` -ls | strip-ansi -``` - - -## Example - -```js -var stripAnsi = require('strip-ansi'); -stripAnsi('\x1b[4mcake\x1b[0m'); -//=> cake -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/grunt-contrib-concat/node_modules/chalk/package.json b/node_modules/grunt-contrib-concat/node_modules/chalk/package.json deleted file mode 100644 index 853b0144c71a..000000000000 --- a/node_modules/grunt-contrib-concat/node_modules/chalk/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "chalk", - "version": "0.4.0", - "description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/chalk" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "ansi", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "has-color": "~0.1.0", - "ansi-styles": "~1.0.0", - "strip-ansi": "~0.1.0" - }, - "devDependencies": { - "mocha": "~1.x" - }, - "readme": "# \"chalk\"\n\n> Terminal string styling done right\n\n[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain and nest the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log( chalk.blue('Hello world!') );\n\n// combine styled and normal strings\nconsole.log( chalk.blue('Hello'), 'World' + chalk.red('!') );\n\n// compose multiple styles using the chainable API\nconsole.log( chalk.blue.bgRed.bold('Hello world!') );\n\n// nest styles\nconsole.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') );\n\n// pass in multiple arguments\nconsole.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') );\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.` - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/grunt/node_modules/iconv-lite/test/greek-test.js b/node_modules/grunt/node_modules/iconv-lite/test/greek-test.js deleted file mode 100644 index 0394ee6f5581..000000000000 --- a/node_modules/grunt/node_modules/iconv-lite/test/greek-test.js +++ /dev/null @@ -1,79 +0,0 @@ -var vows = require('vows'), - assert = require('assert'), - iconv = require(__dirname+'/../'); - -var baseStrings = { - empty: "", - hi: "Γειά!", - ascii: '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f'+ - ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f', - greek: "αβγδεζηθικλμνξοπÏστυφχψωΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡΣΤΥΦΧΨΩάέήίόÏώΆΈΉΊΌΎÎϊϋΪΫ", - untranslatable: "Åçþÿ¿" -}; - -var encodings = [{ - name: "windows1253", - variations: ['windows-1253', 'win-1253', 'win1253', 'cp1253', 'cp-1253', 1253], - encodedStrings: { - empty: new Buffer(''), - hi: new Buffer('\xc3\xe5\xe9\xdc!', 'binary'), - ascii: new Buffer(baseStrings.ascii, 'binary'), - greek: new Buffer('\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xdc\xdd\xde\xdf\xfc\xfd\xfe\xa2\xb8\xb9\xba\xbc\xbe\xbf\xfa\xfb\xda\xdb', 'binary'), - } -}, { - name: "iso88597", - variations: ['iso-8859-7', 'greek', 'greek8', 'cp28597', 'cp-28597', 28597], - encodedStrings: { - empty: new Buffer(''), - hi: new Buffer('\xc3\xe5\xe9\xdc!', 'binary'), - ascii: new Buffer(baseStrings.ascii, 'binary'), - greek: new Buffer('\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xdc\xdd\xde\xdf\xfc\xfd\xfe\xb6\xb8\xb9\xba\xbc\xbe\xbf\xfa\xfb\xda\xdb', 'binary'), - } -}, { - name: "cp737", - variations: ['cp-737', 737], - encodedStrings: { - empty: new Buffer(''), - hi: new Buffer('\x82\x9c\xa0\xe1!', 'binary'), - ascii: new Buffer(baseStrings.ascii, 'binary'), - greek: new Buffer('\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xab\xac\xad\xae\xaf\xe0\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\xe1\xe2\xe3\xe5\xe6\xe7\xe9\xea\xeb\xec\xed\xee\xef\xf0\xe4\xe8\xf4\xf5', 'binary'), - } -}]; - -var testsBatch = {}; -encodings.forEach(function(encoding) { - var enc = encoding.variations[0]; - var key = "hi"; - var tests = { - "Convert to empty buffer": function() { - assert.strictEqual(iconv.toEncoding("", enc).toString('binary'), new Buffer('').toString('binary')); - }, - "Convert from empty buffer": function() { - assert.strictEqual(iconv.fromEncoding(new Buffer(''), enc), ""); - }, - "Convert from buffer": function() { - for (var key in encoding.encodedStrings) - assert.strictEqual(iconv.fromEncoding(encoding.encodedStrings[key], enc), - baseStrings[key]); - }, - "Convert to buffer": function() { - for (var key in encoding.encodedStrings) - assert.strictEqual(iconv.toEncoding(baseStrings[key], enc).toString('binary'), - encoding.encodedStrings[key].toString('binary')); - }, - "Try different variations of encoding": function() { - encoding.variations.forEach(function(enc) { - assert.strictEqual(iconv.fromEncoding(encoding.encodedStrings[key], enc), baseStrings[key]); - assert.strictEqual(iconv.toEncoding(baseStrings[key], enc).toString('binary'), encoding.encodedStrings[key].toString('binary')); - }); - }, - "Untranslatable chars are converted to defaultCharSingleByte": function() { - var expected = baseStrings.untranslatable.split('').map(function(c) {return iconv.defaultCharSingleByte; }).join(''); - assert.strictEqual(iconv.toEncoding(baseStrings.untranslatable, enc).toString('binary'), expected); // Only '?' characters. - } - }; - - testsBatch[encoding.name+":"] = tests; -}); - -vows.describe("Test Greek encodings").addBatch(testsBatch).export(module); diff --git a/node_modules/grunt/node_modules/iconv-lite/test/main-test.js b/node_modules/grunt/node_modules/iconv-lite/test/main-test.js deleted file mode 100644 index 50177f221837..000000000000 --- a/node_modules/grunt/node_modules/iconv-lite/test/main-test.js +++ /dev/null @@ -1,55 +0,0 @@ -var vows = require('vows'), - assert = require('assert'), - iconv = require(__dirname+'/../'); - -var testString = "Hello123!"; -var testStringLatin1 = "Hello123!£Å÷×çþÿ¿®"; -var testStringBase64 = "SGVsbG8xMjMh"; - -vows.describe("Generic UTF8-UCS2 tests").addBatch({ - "Vows is working": function() {}, - "Return values are of correct types": function() { - assert.ok(iconv.toEncoding(testString, "utf8") instanceof Buffer); - - var s = iconv.fromEncoding(new Buffer(testString), "utf8"); - assert.strictEqual(Object.prototype.toString.call(s), "[object String]"); - }, - "Internal encodings all correctly encoded/decoded": function() { - ['utf8', "UTF-8", "UCS2", "binary", ""].forEach(function(enc) { - assert.strictEqual(iconv.toEncoding(testStringLatin1, enc).toString(enc), testStringLatin1); - assert.strictEqual(iconv.fromEncoding(new Buffer(testStringLatin1, enc), enc), testStringLatin1); - }); - }, - "Base64 correctly encoded/decoded": function() { - assert.strictEqual(iconv.toEncoding(testStringBase64, "base64").toString("binary"), testString); - assert.strictEqual(iconv.fromEncoding(new Buffer(testString, "binary"), "base64"), testStringBase64); - }, - "Latin1 correctly encoded/decoded": function() { - assert.strictEqual(iconv.toEncoding(testStringLatin1, "latin1").toString("binary"), testStringLatin1); - assert.strictEqual(iconv.fromEncoding(new Buffer(testStringLatin1, "binary"), "latin1"), testStringLatin1); - }, - "Convert from string, not buffer (binary encoding used)": function() { - assert.strictEqual(iconv.fromEncoding(testStringLatin1, "binary"), testStringLatin1); - }, - "Convert to string, not buffer (utf8 used)": function() { - var res = iconv.toEncoding(new Buffer(testStringLatin1, "utf8")); - assert.ok(res instanceof Buffer); - assert.strictEqual(res.toString("utf8"), testStringLatin1); - }, - "Throws on unknown encodings": function() { - assert.throws(function() { iconv.toEncoding("a", "xxx"); }); - assert.throws(function() { iconv.fromEncoding("a", "xxx"); }); - }, - "Convert non-strings and non-buffers": function() { - assert.strictEqual(iconv.toEncoding({}, "utf8").toString(), "[object Object]"); - assert.strictEqual(iconv.toEncoding(10, "utf8").toString(), "10"); - assert.strictEqual(iconv.toEncoding(undefined, "utf8").toString(), ""); - assert.strictEqual(iconv.fromEncoding({}, "utf8"), "[object Object]"); - assert.strictEqual(iconv.fromEncoding(10, "utf8"), "10"); - assert.strictEqual(iconv.fromEncoding(undefined, "utf8"), ""); - }, - "Aliases encode and decode work the same as toEncoding and fromEncoding": function() { - assert.strictEqual(iconv.toEncoding(testString, "latin1").toString("binary"), iconv.encode(testString, "latin1").toString("binary")); - assert.strictEqual(iconv.fromEncoding(testStringLatin1, "latin1"), iconv.decode(testStringLatin1, "latin1")); - }, -}).export(module) diff --git a/node_modules/grunt/node_modules/iconv-lite/test/performance.js b/node_modules/grunt/node_modules/iconv-lite/test/performance.js deleted file mode 100644 index 835deac5792e..000000000000 --- a/node_modules/grunt/node_modules/iconv-lite/test/performance.js +++ /dev/null @@ -1,67 +0,0 @@ - -var iconv = require('iconv'); -var iconv_lite = require("../index"); - -var encoding = process.argv[2] || "windows-1251"; -var convertTimes = 10000; - -var encodingStrings = { - 'windows-1251': 'This is a test string 32 chars..', - 'gbk': '这是中文字符测试。。ï¼@ï¿¥%12', - 'utf8': '这是中文字符测试。。ï¼@ï¿¥%12This is a test string 48 chars..', -}; -// Test encoding. -var str = encodingStrings[encoding]; -if (!str) { - throw new Error('Don\'t support ' + encoding + ' performance test.'); -} -for (var i = 0; i < 13; i++) { - str = str + str; -} - -console.log('\n' + encoding + ' charset performance test:'); -console.log("\nEncoding "+str.length+" chars "+convertTimes+" times:"); - -var start = Date.now(); -var converter = new iconv.Iconv("utf8", encoding); -for (var i = 0; i < convertTimes; i++) { - var b = converter.convert(str); -} -var duration = Date.now() - start; -var mbs = convertTimes*b.length/duration/1024; - -console.log("iconv: "+duration+"ms, "+mbs.toFixed(2)+" Mb/s."); - -var start = Date.now(); -for (var i = 0; i < convertTimes; i++) { - var b = iconv_lite.encode(str, encoding); -} -var duration = Date.now() - start; -var mbs = convertTimes*b.length/duration/1024; - -console.log("iconv-lite: "+duration+"ms, "+mbs.toFixed(2)+" Mb/s."); - - -// Test decoding. -var buf = iconv_lite.encode(str, encoding); -console.log("\nDecoding "+buf.length+" bytes "+convertTimes+" times:"); - -var start = Date.now(); -var converter = new iconv.Iconv(encoding, "utf8"); -for (var i = 0; i < convertTimes; i++) { - var s = converter.convert(buf).toString(); -} -var duration = Date.now() - start; -var mbs = convertTimes*buf.length/duration/1024; - -console.log("iconv: "+duration+"ms, "+mbs.toFixed(2)+" Mb/s."); - -var start = Date.now(); -for (var i = 0; i < convertTimes; i++) { - var s = iconv_lite.decode(buf, encoding); -} -var duration = Date.now() - start; -var mbs = convertTimes*buf.length/duration/1024; - -console.log("iconv-lite: "+duration+"ms, "+mbs.toFixed(2)+" Mb/s."); - diff --git a/node_modules/grunt/node_modules/iconv-lite/test/turkish-test.js b/node_modules/grunt/node_modules/iconv-lite/test/turkish-test.js deleted file mode 100644 index b2eb68e67c6d..000000000000 --- a/node_modules/grunt/node_modules/iconv-lite/test/turkish-test.js +++ /dev/null @@ -1,90 +0,0 @@ -var vows = require('vows'), - assert = require('assert'), - iconv = require(__dirname+'/../'); - -var ascii = '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f'+ - ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f'; - -var encodings = [{ - name: "windows1254", - variations: ['windows-1254', 'win-1254', 'win1254', 'cp1254', 'cp-1254', 1254], - strings: { - empty: "", - ascii: ascii, - turkish: "€‚ƒ„…†‡ˆ‰Š‹Œ‘’“â€â€¢â€“—˜™š›œŸ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ", - untranslatable: "\x81\x8d\x8e\x8f\x90\x9d\x9e" - }, - encodedStrings: { - empty: new Buffer(''), - ascii: new Buffer(ascii, 'binary'), - turkish: new Buffer( - '\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c' + - '\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9f' + - '\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xae\xaf' + - '\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf' + - '\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf' + - '\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf' + - '\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef' + - '\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff', - 'binary'), - } -}, { - name: "iso88599", - variations: ['iso-8859-9', 'turkish', 'turkish8', 'cp28599', 'cp-28599', 28599], - strings: { - empty: "", - ascii: ascii, - turkish: "\xa0¡¢£¤¥¦§¨©ª«¬\xad®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ", - untranslatable: '' - }, - encodedStrings: { - empty: new Buffer(''), - ascii: new Buffer(ascii, 'binary'), - turkish: new Buffer( - '\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf' + - '\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf' + - '\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf' + - '\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf' + - '\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef' + - '\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff', - 'binary') - } -}]; - -var testsBatch = {}; -encodings.forEach(function(encoding) { - var enc = encoding.variations[0]; - var key = "turkish"; - var tests = { - "Convert to empty buffer": function() { - assert.strictEqual(iconv.toEncoding("", enc).toString('binary'), new Buffer('').toString('binary')); - }, - "Convert from empty buffer": function() { - assert.strictEqual(iconv.fromEncoding(new Buffer(''), enc), ""); - }, - "Convert from buffer": function() { - for (var key in encoding.encodedStrings) - assert.strictEqual(iconv.fromEncoding(encoding.encodedStrings[key], enc), - encoding.strings[key]); - }, - "Convert to buffer": function() { - for (var key in encoding.encodedStrings) - assert.strictEqual(iconv.toEncoding(encoding.strings[key], enc).toString('binary'), - encoding.encodedStrings[key].toString('binary')); - }, - "Try different variations of encoding": function() { - encoding.variations.forEach(function(enc) { - assert.strictEqual(iconv.fromEncoding(encoding.encodedStrings[key], enc), encoding.strings[key]); - assert.strictEqual(iconv.toEncoding(encoding.strings[key], enc).toString('binary'), encoding.encodedStrings[key].toString('binary')); - }); - }, - "Untranslatable chars are converted to defaultCharSingleByte": function() { - var expected = encoding.strings.untranslatable.split('').map(function(c) {return iconv.defaultCharSingleByte; }).join(''); - assert.strictEqual(iconv.toEncoding(encoding.strings.untranslatable, enc).toString('binary'), expected); // Only '?' characters. - } - }; - - testsBatch[encoding.name+":"] = tests; -}); - -vows.describe("Test Turkish encodings").addBatch(testsBatch).export(module); diff --git a/node_modules/grunt/node_modules/js-yaml/HISTORY.md b/node_modules/grunt/node_modules/js-yaml/HISTORY.md deleted file mode 100644 index dfc48c2b173f..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/HISTORY.md +++ /dev/null @@ -1,155 +0,0 @@ -2.0.5 / 2013-04-26 ------------------- - -* Close security issue in !!js/function constructor. - Big thanks to @nealpoole for security audit. - - -2.0.4 / 2013-04-08 ------------------- - -* Updated .npmignore to reduce package size - - -2.0.3 / 2013-02-26 ------------------- - -* Fixed dumping of empty arrays ans objects. ([] and {} instead of null) - - -2.0.2 / 2013-02-15 ------------------- - -* Fixed input validation: tabs are printable characters. - - -2.0.1 / 2013-02-09 ------------------- - -* Fixed error, when options not passed to function cass - - -2.0.0 / 2013-02-09 ------------------- - -* Full rewrite. New architecture. Fast one-stage parsing. -* Changed custom types API. -* Added YAML dumper. - - -1.0.3 / 2012-11-05 ------------------- - -* Fixed utf-8 files loading. - - -1.0.2 / 2012-08-02 ------------------- - -* Pull out hand-written shims. Use ES5-Shims for old browsers support. See #44. -* Fix timstamps incorectly parsed in local time when no time part specified. - - -1.0.1 / 2012-07-07 ------------------- - -* Fixes `TypeError: 'undefined' is not an object` under Safari. Thanks Phuong. -* Fix timestamps incorrectly parsed in local time. Thanks @caolan. Closes #46. - - -1.0.0 / 2012-07-01 ------------------- - -* `y`, `yes`, `n`, `no`, `on`, `off` are not converted to Booleans anymore. - Fixes #42. -* `require(filename)` now returns a single document and throws an Error if - file contains more than one document. -* CLI was merged back from js-yaml.bin - - -0.3.7 / 2012-02-28 ------------------- - -* Fix export of `addConstructor()`. Closes #39. - - -0.3.6 / 2012-02-22 ------------------- - -* Removed AMD parts - too buggy to use. Need help to rewrite from scratch -* Removed YUI compressor warning (renamed `double` variable). Closes #40. - - -0.3.5 / 2012-01-10 ------------------- - -* Workagound for .npmignore fuckup under windows. Thanks to airportyh. - - -0.3.4 / 2011-12-24 ------------------- - -* Fixes str[] for oldIEs support. -* Adds better has change support for browserified demo. -* improves compact output of Error. Closes #33. - - -0.3.3 / 2011-12-20 ------------------- - -* jsyaml executable moved to separate module. -* adds `compact` stringification of Errors. - - -0.3.2 / 2011-12-16 ------------------- - -* Fixes ug with block style scalars. Closes #26. -* All sources are passing JSLint now. -* Fixes bug in Safari. Closes #28. -* Fixes bug in Opers. Closes #29. -* Improves browser support. Closes #20. -* Added jsyaml executable. -* Added !!js/function support. Closes #12. - - -0.3.1 / 2011-11-18 ------------------- - -* Added AMD support for browserified version. -* Wrapped browserified js-yaml into closure. -* Fixed the resolvement of non-specific tags. Closes #17. -* Added permalinks for online demo YAML snippets. Now we have YPaste service, lol. -* Added !!js/regexp and !!js/undefined types. Partially solves #12. -* Fixed !!set mapping. -* Fixed month parse in dates. Closes #19. - - -0.3.0 / 2011-11-09 ------------------- - -* Removed JS.Class dependency. Closes #3. -* Added browserified version. Closes #13. -* Added live demo of browserified version. -* Ported some of the PyYAML tests. See #14. -* Fixed timestamp bug when fraction was given. - - -0.2.2 / 2011-11-06 ------------------- - -* Fixed crash on docs without ---. Closes #8. -* Fixed miltiline string parse -* Fixed tests/comments for using array as key - - -0.2.1 / 2011-11-02 ------------------- - -* Fixed short file read (<4k). Closes #9. - - -0.2.0 / 2011-11-02 ------------------- - -* First public release diff --git a/node_modules/grunt/node_modules/js-yaml/LICENSE b/node_modules/grunt/node_modules/js-yaml/LICENSE deleted file mode 100644 index 0f16ee957d42..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2011, 2013 by Vitaly Puzrin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/grunt/node_modules/js-yaml/README.md b/node_modules/grunt/node_modules/js-yaml/README.md deleted file mode 100644 index e326d6026845..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/README.md +++ /dev/null @@ -1,249 +0,0 @@ -JS-YAML - YAML 1.2 parser and serializer for JavaScript -======================================================= - -[![Build Status](https://secure.travis-ci.org/nodeca/js-yaml.png)](http://travis-ci.org/nodeca/js-yaml) - -[Online Demo](http://nodeca.github.com/js-yaml/) - - -This is an implementation of [YAML](http://yaml.org/), a human friendly data -serialization language. Started as [PyYAML](http://pyyaml.org/) port, it was -completely rewritten from scratch. Now it's very fast, and supports 1.2 spec. - - -Breaking changes in 1.x.x -> 2.0.x ----------------------------------- - -If your have not used __custom__ tags or loader classes - no changes needed. Just -upgrade library and enjoy high parse speed. - -In other case, you should rewrite your tag constructors and custom loader -classes, to conform new schema-based API. See -[examples](https://github.com/nodeca/js-yaml/tree/master/examples) and -[wiki](https://github.com/nodeca/js-yaml/wiki) for details. -Note, that parser internals were completely rewritten. - - -Installation ------------- - -### YAML module for node.js - -``` -npm install js-yaml -``` - - -### CLI executable - -If you want to inspect your YAML files from CLI, install js-yaml globally: - -``` -npm install js-yaml -g -``` - -#### Usage - -``` -usage: js-yaml [-h] [-v] [-c] [-j] [-t] file - -Positional arguments: - file File with YAML document(s) - -Optional arguments: - -h, --help Show this help message and exit. - -v, --version Show program's version number and exit. - -c, --compact Display errors in compact mode - -j, --to-json Output a non-funky boring JSON - -t, --trace Show stack trace on error -``` - - -### Bundled YAML library for browsers - -``` html - - -``` - -Browser support was done mostly for online demo. If you find any errors - feel -free to send pull requests with fixes. Also note, that IE and other old browsers -needs [es5-shims](https://github.com/kriskowal/es5-shim) to operate. - - -API ---- - -Here we cover the most 'useful' methods. If you need advanced details (creating -your own tags), see [wiki](https://github.com/nodeca/js-yaml/wiki) and -[examples](https://github.com/nodeca/js-yaml/tree/master/examples) for more -info. - -In node.js JS-YAML automatically registers handlers for `.yml` and `.yaml` -files. You can load them just with `require`. That's mostly equivalent to -calling `load()` on fetched content of a file. Just with one string! - -``` javascript -require('js-yaml'); - -// Get document, or throw exception on error -try { - var doc = require('/home/ixti/example.yml'); - console.log(doc); -} catch (e) { - console.log(e); -} -``` - - -### load (string [ , options ]) - -Parses `string` as single YAML document. Returns a JavaScript object or throws -`YAMLException` on error. - -NOTE: This function **does not** understands multi-document sources, it throws -exception on those. - -options: - -- `filename` _(default: null)_ - string to be used as a file path in - error/warning messages. -- `strict` _(default - false)_ makes the loader to throw errors instead of - warnings. -- `schema` _(default: `DEFAULT_SCHEMA`)_ - specifies a schema to use. - - -### loadAll (string, iterator [ , options ]) - -Same as `load()`, but understands multi-document sources and apply `iterator` to -each document. - -``` javascript -var yaml = require('js-yaml'); - -yaml.loadAll(data, function (doc) { - console.log(doc); -}); -``` - - -### safeLoad (string [ , options ]) - -Same as `load()` but uses `SAFE_SCHEMA` by default - only recommended tags of -YAML specification (no JavaScript-specific tags, e.g. `!!js/regexp`). - - -### safeLoadAll (string, iterator [ , options ]) - -Same as `loadAll()` but uses `SAFE_SCHEMA` by default - only recommended tags of -YAML specification (no JavaScript-specific tags, e.g. `!!js/regexp`). - - -### dump (object [ , options ]) - -Serializes `object` as YAML document. - -options: - -- `indent` _(default: 2)_ - indentation width to use (in spaces). -- `flowLevel` (default: -1) - specifies level of nesting, when to switch from - block to flow style for collections. -1 means block style everwhere -- `styles` - "tag" => "style" map. Each tag may have own set of styles. -- `schema` _(default: `DEFAULT_SCHEMA`)_ specifies a schema to use. - -styles: - -``` none -!!null - "canonical" => "~" - -!!int - "binary" => "0b1", "0b101010", "0b1110001111010" - "octal" => "01", "052", "016172" - "decimal" => "1", "42", "7290" - "hexadecimal" => "0x1", "0x2A", "0x1C7A" - -!!null, !!bool, !!float - "lowercase" => "null", "true", "false", ".nan", '.inf' - "uppercase" => "NULL", "TRUE", "FALSE", ".NAN", '.INF' - "camelcase" => "Null", "True", "False", ".NaN", '.Inf' -``` - -By default, !!int uses `decimal`, and !!null, !!bool, !!float use `lowercase`. - - -### safeDump (object [ , options ]) - -Same as `dump()` but uses `SAFE_SCHEMA` by default - only recommended tags of -YAML specification (no JavaScript-specific tags, e.g. `!!js/regexp`). - - -Supported YAML types --------------------- - -The list of standard YAML tags and corresponding JavaScipt types. See also -[YAML tag discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and -[YAML types repository](http://yaml.org/type/). - -``` -!!null '' # null -!!bool 'yes' # bool -!!int '3...' # number -!!float '3.14...' # number -!!binary '...base64...' # buffer -!!timestamp 'YYYY-...' # date -!!omap [ ... ] # array of key-value pairs -!!pairs [ ... ] # array or array pairs -!!set { ... } # array of objects with given keys and null values -!!str '...' # string -!!seq [ ... ] # array -!!map { ... } # object -``` - -**JavaScript-specific tags** - -``` -!!js/regexp /pattern/gim # RegExp -!!js/undefined '' # Undefined -!!js/function 'function () {...}' # Function -``` - - - - -## Caveats - -Note, that you use arrays or objects as key in JS-YAML. JS do not allows objects -or array as keys, and stringifies (by calling .toString method) them at the -moment of adding them. - -``` yaml ---- -? [ foo, bar ] -: - baz -? { foo: bar } -: - baz - - baz -``` - -``` javascript -{ "foo,bar": ["baz"], "[object Object]": ["baz", "baz"] } -``` - -Also, reading of properties on implicit block mapping keys is not supported yet. -So, the following YAML document cannot be loaded. - -``` yaml -&anchor foo: - foo: bar - *anchor: duplicate key - baz: bat - *anchor: duplicate key -``` - -## License - -View the [LICENSE](https://github.com/nodeca/js-yaml/blob/master/LICENSE) file -(MIT). diff --git a/node_modules/grunt/node_modules/js-yaml/bin/js-yaml.js b/node_modules/grunt/node_modules/js-yaml/bin/js-yaml.js deleted file mode 100755 index 5110a4c7ab65..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/bin/js-yaml.js +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env node - - -'use strict'; - - -// stdlib -var fs = require('fs'); -var util = require('util'); - - -// 3rd-party -var ArgumentParser = require('argparse').ArgumentParser; - - -// internal -var yaml = require('..'); - - -//////////////////////////////////////////////////////////////////////////////// - - -var cli = new ArgumentParser({ - prog: 'js-yaml', - version: require('../package.json').version, - addHelp: true -}); - - -cli.addArgument(['-c', '--compact'], { - help: 'Display errors in compact mode', - action: 'storeTrue' -}); - - -cli.addArgument(['-j', '--to-json'], { - help: 'Output a non-funky boring JSON', - dest: 'json', - action: 'storeTrue' -}); - - -cli.addArgument(['-t', '--trace'], { - help: 'Show stack trace on error', - action: 'storeTrue' -}); - - -cli.addArgument(['file'], { - help: 'File to read' -}); - - -//////////////////////////////////////////////////////////////////////////////// - - -var options = cli.parseArgs(); - - -//////////////////////////////////////////////////////////////////////////////// - - -fs.readFile(options.file, 'utf8', function (error, input) { - var output, isYaml; - - if (error) { - if ('ENOENT' === error.code) { - console.error('File not found: ' + options.file); - process.exit(2); - } - - console.error( - options.trace && error.stack || - error.message || - String(error)); - - process.exit(1); - } - - try { - output = JSON.parse(input); - isYaml = false; - } catch (error) { - if (error instanceof SyntaxError) { - try { - output = []; - yaml.loadAll(input, function (doc) { output.push(doc); }, {}); - isYaml = true; - - if (0 === output.length) { - output = null; - } else if (1 === output.length) { - output = output[0]; - } - } catch (error) { - if (options.trace && error.stack) { - console.error(error.stack); - } else { - console.error(error.toString(options.compact)); - } - - process.exit(1); - } - } else { - console.error( - options.trace && error.stack || - error.message || - String(error)); - - process.exit(1); - } - } - - if (isYaml) { - if (options.json) { - console.log(JSON.stringify(output, null, ' ')); - } else { - console.log("\n" + util.inspect(output, false, 10, true) + "\n"); - } - } else { - console.log(yaml.dump(output)); - } - - process.exit(0); -}); diff --git a/node_modules/grunt/node_modules/js-yaml/examples/custom_types.js b/node_modules/grunt/node_modules/js-yaml/examples/custom_types.js deleted file mode 100644 index 1cb987c16cdd..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/examples/custom_types.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - - -var fs = require('fs'); -var path = require('path'); -var util = require('util'); -var yaml = require('../lib/js-yaml'); - - -// Let define a couple of classes... - -function Point(x, y, z) { - this.klass = 'Point'; - this.x = x; - this.y = y; - this.z = z; -} - - -function Space(height, width, points) { - if (points) { - if (!points.every(function (point) { return point instanceof Point; })) { - throw new Error('A non-Point inside a points array!'); - } - } - - this.klass = 'Space'; - this.height = height; - this.width = width; - this.points = points; -} - - -// Let define YAML types to load and dump our Point/Space objects. - -var pointYamlType = new yaml.Type('!point', { - // The information used to load a Point. - loader: { - kind: 'array', // It must be an array. (sequence in YAML) - resolver: function (object) { - // It must contain exactly tree elements. - if (3 === object.length) { - return new Point(object[0], object[1], object[2]); - - // Otherwise, it is NOT a Point. - } else { - return yaml.NIL; - } - } - }, - // The information used to dump a Point. - dumper: { - kind: 'object', // It must be an object but not an array. - instanceOf: Point, // Also, it must be an instance of Point class. - representer: function (point) { - // And it should be represented in YAML as three-element sequence. - return [ point.x, point.y, point.z ]; - } - } -}); - - -var spaceYamlType = new yaml.Type('!space', { - loader: { - kind: 'object', // 'object' here means 'mapping' in YAML. - resolver: function (object) { - return new Space(object.height, object.width, object.points); - } - }, - dumper: { - kind: 'object', - instanceOf: Space - // The representer is omitted here. So, Space objects will be dumped as is. - // That is regular mapping with three key-value pairs but with !space tag. - } -}); - - -// After our types are defined, it's time to join them into a schema. - -var SPACE_SCHEMA = yaml.Schema.create([ spaceYamlType, pointYamlType ]); - - -// And read a document using that schema. - -fs.readFile(path.join(__dirname, 'custom_types.yaml'), 'utf8', function (error, data) { - var loaded; - - if (!error) { - loaded = yaml.load(data, { schema: SPACE_SCHEMA }); - console.log(util.inspect(loaded, false, 20, true)); - } else { - console.error(error.stack || error.message || String(error)); - } -}); - - -// There are some exports to play with this example interactively. - -module.exports.Point = Point; -module.exports.Space = Space; -module.exports.pointYamlType = pointYamlType; -module.exports.spaceYamlType = spaceYamlType; -module.exports.SPACE_SCHEMA = SPACE_SCHEMA; diff --git a/node_modules/grunt/node_modules/js-yaml/examples/custom_types.yaml b/node_modules/grunt/node_modules/js-yaml/examples/custom_types.yaml deleted file mode 100644 index 033134f5ec30..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/examples/custom_types.yaml +++ /dev/null @@ -1,18 +0,0 @@ -subject: Custom types in JS-YAML -spaces: -- !space - height: 1000 - width: 1000 - points: - - !point [ 10, 43, 23 ] - - !point [ 165, 0, 50 ] - - !point [ 100, 100, 100 ] - -- !space - height: 64 - width: 128 - points: - - !point [ 12, 43, 0 ] - - !point [ 1, 4, 90 ] - -- !space {} # An empty space diff --git a/node_modules/grunt/node_modules/js-yaml/examples/dumper.js b/node_modules/grunt/node_modules/js-yaml/examples/dumper.js deleted file mode 100644 index 7952b18d29a4..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/examples/dumper.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - - -var yaml = require('../lib/js-yaml'); -var object = require('./dumper.json'); - - -console.log(yaml.dump(object, { - flowLevel: 3, - styles: { - '!!int' : 'hexadecimal', - '!!null' : 'camelcase' - } -})); - - -// Output: -//============================================================================== -// name: Wizzard -// level: 0x11 -// sanity: Null -// inventory: -// - name: Hat -// features: [magic, pointed] -// traits: {} -// - name: Staff -// features: [] -// traits: {damage: 0xA} -// - name: Cloak -// features: [old] -// traits: {defence: 0x0, comfort: 0x3} diff --git a/node_modules/grunt/node_modules/js-yaml/examples/dumper.json b/node_modules/grunt/node_modules/js-yaml/examples/dumper.json deleted file mode 100644 index 9f54c053e517..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/examples/dumper.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name" : "Wizzard", - "level" : 17, - "sanity" : null, - "inventory" : [ - { - "name" : "Hat", - "features" : [ "magic", "pointed" ], - "traits" : {} - }, - { - "name" : "Staff", - "features" : [], - "traits" : { "damage" : 10 } - }, - { - "name" : "Cloak", - "features" : [ "old" ], - "traits" : { "defence" : 0, "comfort" : 3 } - } - ] -} diff --git a/node_modules/grunt/node_modules/js-yaml/examples/sample_document.js b/node_modules/grunt/node_modules/js-yaml/examples/sample_document.js deleted file mode 100644 index 1ce370d896f5..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/examples/sample_document.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - - -var inspect = require('util').inspect; - -// just require jsyaml -require('../lib/js-yaml'); - - -try { - var doc = require(__dirname + '/sample_document.yaml'); - console.log(inspect(doc, false, 10, true)); -} catch (e) { - console.log(e.stack || e.toString()); -} diff --git a/node_modules/grunt/node_modules/js-yaml/examples/sample_document.yaml b/node_modules/grunt/node_modules/js-yaml/examples/sample_document.yaml deleted file mode 100644 index 4479ee9c0783..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/examples/sample_document.yaml +++ /dev/null @@ -1,197 +0,0 @@ ---- -# Collection Types ############################################################# -################################################################################ - -# http://yaml.org/type/map.html -----------------------------------------------# - -map: - # Unordered set of key: value pairs. - Block style: !!map - Clark : Evans - Ingy : döt Net - Oren : Ben-Kiki - Flow style: !!map { Clark: Evans, Ingy: döt Net, Oren: Ben-Kiki } - -# http://yaml.org/type/omap.html ----------------------------------------------# - -omap: - # Explicitly typed ordered map (dictionary). - Bestiary: !!omap - - aardvark: African pig-like ant eater. Ugly. - - anteater: South-American ant eater. Two species. - - anaconda: South-American constrictor snake. Scaly. - # Etc. - # Flow style - Numbers: !!omap [ one: 1, two: 2, three : 3 ] - -# http://yaml.org/type/pairs.html ---------------------------------------------# - -pairs: - # Explicitly typed pairs. - Block tasks: !!pairs - - meeting: with team. - - meeting: with boss. - - break: lunch. - - meeting: with client. - Flow tasks: !!pairs [ meeting: with team, meeting: with boss ] - -# http://yaml.org/type/set.html -----------------------------------------------# - -set: - # Explicitly typed set. - baseball players: !!set - ? Mark McGwire - ? Sammy Sosa - ? Ken Griffey - # Flow style - baseball teams: !!set { Boston Red Sox, Detroit Tigers, New York Yankees } - -# http://yaml.org/type/seq.html -----------------------------------------------# - -seq: - # Ordered sequence of nodes - Block style: !!seq - - Mercury # Rotates - no light/dark sides. - - Venus # Deadliest. Aptly named. - - Earth # Mostly dirt. - - Mars # Seems empty. - - Jupiter # The king. - - Saturn # Pretty. - - Uranus # Where the sun hardly shines. - - Neptune # Boring. No rings. - - Pluto # You call this a planet? - Flow style: !!seq [ Mercury, Venus, Earth, Mars, # Rocks - Jupiter, Saturn, Uranus, Neptune, # Gas - Pluto ] # Overrated - - -# Scalar Types ################################################################# -################################################################################ - -# http://yaml.org/type/binary.html --------------------------------------------# - -binary: - canonical: !!binary "\ - R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\ - OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\ - +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\ - AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=" - generic: !!binary | - R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5 - OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+ - +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC - AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs= - description: - The binary value above is a tiny arrow encoded as a gif image. - -# http://yaml.org/type/bool.html ----------------------------------------------# - -bool: - - true - - True - - TRUE - - false - - False - - FALSE - -# http://yaml.org/type/float.html ---------------------------------------------# - -float: - canonical: 6.8523015e+5 - exponentioal: 685.230_15e+03 - fixed: 685_230.15 - sexagesimal: 190:20:30.15 - negative infinity: -.inf - not a number: .NaN - -# http://yaml.org/type/int.html -----------------------------------------------# - -int: - canonical: 685230 - decimal: +685_230 - octal: 02472256 - hexadecimal: 0x_0A_74_AE - binary: 0b1010_0111_0100_1010_1110 - sexagesimal: 190:20:30 - -# http://yaml.org/type/merge.html ---------------------------------------------# - -merge: - - &CENTER { x: 1, y: 2 } - - &LEFT { x: 0, y: 2 } - - &BIG { r: 10 } - - &SMALL { r: 1 } - - # All the following maps are equal: - - - # Explicit keys - x: 1 - y: 2 - r: 10 - label: nothing - - - # Merge one map - << : *CENTER - r: 10 - label: center - - - # Merge multiple maps - << : [ *CENTER, *BIG ] - label: center/big - - - # Override - << : [ *BIG, *LEFT, *SMALL ] - x: 1 - label: big/left/small - -# http://yaml.org/type/null.html ----------------------------------------------# - -null: - # This mapping has four keys, - # one has a value. - empty: - canonical: ~ - english: null - ~: null key - # This sequence has five - # entries, two have values. - sparse: - - ~ - - 2nd entry - - - - 4th entry - - Null - -# http://yaml.org/type/str.html -----------------------------------------------# - -string: abcd - -# http://yaml.org/type/timestamp.html -----------------------------------------# - -timestamp: - canonical: 2001-12-15T02:59:43.1Z - valid iso8601: 2001-12-14t21:59:43.10-05:00 - space separated: 2001-12-14 21:59:43.10 -5 - no time zone (Z): 2001-12-15 2:59:43.10 - date (00:00:00Z): 2002-12-14 - - -# JavaScript Specific Types #################################################### -################################################################################ - -# https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp - -regexp: - simple: !!js/regexp foobar - modifiers: !!js/regexp /foobar/mi - -# https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/undefined - -undefined: !!js/undefined ~ - -# https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function - -function: !!js/function > - function foobar() { - return 'Wow! JS-YAML Rocks!'; - } diff --git a/node_modules/grunt/node_modules/js-yaml/index.js b/node_modules/grunt/node_modules/js-yaml/index.js deleted file mode 100644 index 40606ddc2f38..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/js-yaml.js'); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml.js deleted file mode 100644 index a5146a3263fd..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - - -var loader = require('./js-yaml/loader'); -var dumper = require('./js-yaml/dumper'); - - -function deprecated(name) { - return function () { - throw new Error('Function ' + name + ' is deprecated and cannot be used.'); - }; -} - - -module.exports.Type = require('./js-yaml/type'); -module.exports.Schema = require('./js-yaml/schema'); -module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/minimal'); -module.exports.SAFE_SCHEMA = require('./js-yaml/schema/safe'); -module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default'); -module.exports.load = loader.load; -module.exports.loadAll = loader.loadAll; -module.exports.safeLoad = loader.safeLoad; -module.exports.safeLoadAll = loader.safeLoadAll; -module.exports.dump = dumper.dump; -module.exports.safeDump = dumper.safeDump; -module.exports.YAMLException = require('./js-yaml/exception'); -module.exports.scan = deprecated('scan'); -module.exports.parse = deprecated('parse'); -module.exports.compose = deprecated('compose'); -module.exports.addConstructor = deprecated('addConstructor'); - - -require('./js-yaml/require'); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/common.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/common.js deleted file mode 100644 index cc7f824cc517..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/common.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - - -var NIL = {}; - - -function isNothing(subject) { - return (undefined === subject) || (null === subject); -} - - -function isObject(subject) { - return ('object' === typeof subject) && (null !== subject); -} - - -function toArray(sequence) { - if (Array.isArray(sequence)) { - return sequence; - } else if (isNothing(sequence)) { - return []; - } else { - return [ sequence ]; - } -} - - -function extend(target, source) { - var index, length, key, sourceKeys; - - if (source) { - sourceKeys = Object.keys(source); - - for (index = 0, length = sourceKeys.length; index < length; index += 1) { - key = sourceKeys[index]; - target[key] = source[key]; - } - } - - return target; -} - - -function repeat(string, count) { - var result = '', cycle; - - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - - return result; -} - - -module.exports.NIL = NIL; -module.exports.isNothing = isNothing; -module.exports.isObject = isObject; -module.exports.toArray = toArray; -module.exports.repeat = repeat; -module.exports.extend = extend; diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/dumper.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/dumper.js deleted file mode 100644 index 2385f569bce2..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/dumper.js +++ /dev/null @@ -1,437 +0,0 @@ -'use strict'; - - -var common = require('./common'); -var NIL = common.NIL; -var YAMLException = require('./exception'); -var DEFAULT_SCHEMA = require('./schema/default'); -var SAFE_SCHEMA = require('./schema/safe'); - - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - - -var CHAR_TAB = 0x09; /* Tab */ -var CHAR_LINE_FEED = 0x0A; /* LF */ -var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ -var CHAR_SPACE = 0x20; /* Space */ -var CHAR_EXCLAMATION = 0x21; /* ! */ -var CHAR_DOUBLE_QUOTE = 0x22; /* " */ -var CHAR_SHARP = 0x23; /* # */ -var CHAR_PERCENT = 0x25; /* % */ -var CHAR_AMPERSAND = 0x26; /* & */ -var CHAR_SINGLE_QUOTE = 0x27; /* ' */ -var CHAR_ASTERISK = 0x2A; /* * */ -var CHAR_COMMA = 0x2C; /* , */ -var CHAR_MINUS = 0x2D; /* - */ -var CHAR_COLON = 0x3A; /* : */ -var CHAR_GREATER_THAN = 0x3E; /* > */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - - -var ESCAPE_SEQUENCES = {}; - -ESCAPE_SEQUENCES[0x00] = '\\0'; -ESCAPE_SEQUENCES[0x07] = '\\a'; -ESCAPE_SEQUENCES[0x08] = '\\b'; -ESCAPE_SEQUENCES[0x09] = '\\t'; -ESCAPE_SEQUENCES[0x0A] = '\\n'; -ESCAPE_SEQUENCES[0x0B] = '\\v'; -ESCAPE_SEQUENCES[0x0C] = '\\f'; -ESCAPE_SEQUENCES[0x0D] = '\\r'; -ESCAPE_SEQUENCES[0x1B] = '\\e'; -ESCAPE_SEQUENCES[0x22] = '\\"'; -ESCAPE_SEQUENCES[0x5C] = '\\\\'; -ESCAPE_SEQUENCES[0x85] = '\\N'; -ESCAPE_SEQUENCES[0xA0] = '\\_'; -ESCAPE_SEQUENCES[0x2028] = '\\L'; -ESCAPE_SEQUENCES[0x2029] = '\\P'; - - -function kindOf(object) { - var kind = typeof object; - - if (null === object) { - return 'null'; - } else if ('number' === kind) { - return 0 === object % 1 ? 'integer' : 'float'; - } else if ('object' === kind && Array.isArray(object)) { - return 'array'; - } else { - return kind; - } -} - - -function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (null === map) { - return {}; - } - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if ('!!' === tag.slice(0, 2)) { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } - - type = schema.compiledTypeMap[tag]; - - if (type && type.dumper) { - if (_hasOwnProperty.call(type.dumper.styleAliases, style)) { - style = type.dumper.styleAliases[style]; - } - } - - result[tag] = style; - } - - return result; -} - - -function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; -} - - -function dump(input, options) { - options = options || {}; - - var schema = options['schema'] || DEFAULT_SCHEMA, - indent = Math.max(1, (options['indent'] || 2)), - flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']), - styleMap = compileStyleMap(schema, options['styles'] || null), - - implicitTypes = schema.compiledImplicit, - explicitTypes = schema.compiledExplicit, - - kind, - tag, - result; - - function generateNextLine(level) { - return '\n' + common.repeat(' ', indent * level); - } - - function testImplicitResolving(object) { - var index, length, type; - - for (index = 0, length = implicitTypes.length; index < length; index += 1) { - type = implicitTypes[index]; - - if (null !== type.loader && - NIL !== type.loader.resolver(object, false)) { - return true; - } - } - - return false; - } - - function writeScalar(object) { - var isQuoted, checkpoint, position, length, character; - - result = ''; - isQuoted = false; - checkpoint = 0; - - if (0 === object.length || - CHAR_SPACE === object.charCodeAt(0) || - CHAR_SPACE === object.charCodeAt(object.length - 1)) { - isQuoted = true; - } - - for (position = 0, length = object.length; position < length; position += 1) { - character = object.charCodeAt(position); - - if (!isQuoted) { - if (CHAR_TAB === character || - CHAR_LINE_FEED === character || - CHAR_CARRIAGE_RETURN === character || - CHAR_COMMA === character || - CHAR_LEFT_SQUARE_BRACKET === character || - CHAR_RIGHT_SQUARE_BRACKET === character || - CHAR_LEFT_CURLY_BRACKET === character || - CHAR_RIGHT_CURLY_BRACKET === character || - CHAR_SHARP === character || - CHAR_AMPERSAND === character || - CHAR_ASTERISK === character || - CHAR_EXCLAMATION === character || - CHAR_VERTICAL_LINE === character || - CHAR_GREATER_THAN === character || - CHAR_SINGLE_QUOTE === character || - CHAR_DOUBLE_QUOTE === character || - CHAR_PERCENT === character || - CHAR_COMMERCIAL_AT === character || - CHAR_GRAVE_ACCENT === character || - CHAR_QUESTION === character || - CHAR_COLON === character || - CHAR_MINUS === character) { - isQuoted = true; - } - } - - if (ESCAPE_SEQUENCES[character] || - !((0x00020 <= character && character <= 0x00007E) || - (0x00085 === character) || - (0x000A0 <= character && character <= 0x00D7FF) || - (0x0E000 <= character && character <= 0x00FFFD) || - (0x10000 <= character && character <= 0x10FFFF))) { - result += object.slice(checkpoint, position); - result += ESCAPE_SEQUENCES[character] || encodeHex(character); - checkpoint = position + 1; - isQuoted = true; - } - } - - if (checkpoint < position) { - result += object.slice(checkpoint, position); - } - - if (!isQuoted && testImplicitResolving(result)) { - isQuoted = true; - } - - if (isQuoted) { - result = '"' + result + '"'; - } - } - - function writeFlowSequence(level, object) { - var _result = '', - _tag = tag, - index, - length; - - for (index = 0, length = object.length; index < length; index += 1) { - if (0 !== index) { - _result += ', '; - } - - writeNode(level, object[index], false, false); - _result += result; - } - - tag = _tag; - result = '[' + _result + ']'; - } - - function writeBlockSequence(level, object, compact) { - var _result = '', - _tag = tag, - index, - length; - - for (index = 0, length = object.length; index < length; index += 1) { - if (!compact || 0 !== index) { - _result += generateNextLine(level); - } - - writeNode(level + 1, object[index], true, true); - _result += '- ' + result; - } - - tag = _tag; - result = _result; - } - - function writeFlowMapping(level, object) { - var _result = '', - _tag = tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - if (0 !== index) { - _result += ', '; - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - writeNode(level, objectKey, false, false); - - if (result.length > 1024) { - _result += '? '; - } - - _result += result + ': '; - writeNode(level, objectValue, false, false); - _result += result; - } - - tag = _tag; - result = '{' + _result + '}'; - } - - function writeBlockMapping(level, object, compact) { - var _result = '', - _tag = tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - if (!compact || 0 !== index) { - _result += generateNextLine(level); - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - writeNode(level + 1, objectKey, true, true); - explicitPair = (null !== tag && '?' !== tag && result.length <= 1024); - - if (explicitPair) { - _result += '? '; - } - - _result += result; - - if (explicitPair) { - _result += generateNextLine(level); - } - - writeNode(level + 1, objectValue, true, explicitPair); - _result += ': ' + result; - } - - tag = _tag; - result = _result; - } - - function detectType(object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? explicitTypes : implicitTypes; - kind = kindOf(object); - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((null !== type.dumper) && - (null === type.dumper.kind || kind === type.dumper.kind) && - (null === type.dumper.instanceOf || object instanceof type.dumper.instanceOf) && - (null === type.dumper.predicate || type.dumper.predicate(object))) { - tag = explicit ? type.tag : '?'; - - if (null !== type.dumper.representer) { - style = styleMap[type.tag] || type.dumper.defaultStyle; - - if ('function' === typeof type.dumper.representer) { - _result = type.dumper.representer(object, style); - } else if (_hasOwnProperty.call(type.dumper.representer, style)) { - _result = type.dumper.representer[style](object, style); - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - - if (NIL !== _result) { - kind = kindOf(_result); - result = _result; - } else { - if (explicit) { - throw new YAMLException('cannot represent an object of !<' + type.tag + '> type'); - } else { - continue; - } - } - } - - return true; - } - } - - return false; - } - - function writeNode(level, object, block, compact) { - tag = null; - result = object; - - if (!detectType(object, false)) { - detectType(object, true); - } - - if (block) { - block = (0 > flowLevel || flowLevel > level); - } - - if ((null !== tag && '?' !== tag) || (2 !== indent && level > 0)) { - compact = false; - } - - if ('object' === kind) { - if (block && (0 !== Object.keys(result).length)) { - writeBlockMapping(level, result, compact); - } else { - writeFlowMapping(level, result); - } - } else if ('array' === kind) { - if (block && (0 !== result.length)) { - writeBlockSequence(level, result, compact); - } else { - writeFlowSequence(level, result); - } - } else if ('string' === kind) { - if ('?' !== tag) { - writeScalar(result); - } - } else { - throw new YAMLException('unacceptabe kind of an object to dump (' + kind + ')'); - } - - if (null !== tag && '?' !== tag) { - result = '!<' + tag + '> ' + result; - } - } - - writeNode(0, input, true, true); - return result + '\n'; -} - - -function safeDump(input, options) { - return dump(input, common.extend({ schema: SAFE_SCHEMA }, options)); -} - - -module.exports.dump = dump; -module.exports.safeDump = safeDump; diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/exception.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/exception.js deleted file mode 100644 index 479ba88791de..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/exception.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - - -function YAMLException(reason, mark) { - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = this.toString(false); -} - - -YAMLException.prototype.toString = function toString(compact) { - var result; - - result = 'JS-YAML: ' + (this.reason || '(unknown reason)'); - - if (!compact && this.mark) { - result += ' ' + this.mark.toString(); - } - - return result; -}; - - -module.exports = YAMLException; diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/loader.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/loader.js deleted file mode 100644 index bdc71d1e0f9e..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/loader.js +++ /dev/null @@ -1,1549 +0,0 @@ -'use strict'; - - -var common = require('./common'); -var YAMLException = require('./exception'); -var Mark = require('./mark'); -var NIL = common.NIL; -var SAFE_SCHEMA = require('./schema/safe'); -var DEFAULT_SCHEMA = require('./schema/default'); - - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - - -var KIND_STRING = 'string'; -var KIND_ARRAY = 'array'; -var KIND_OBJECT = 'object'; - - -var CONTEXT_FLOW_IN = 1; -var CONTEXT_FLOW_OUT = 2; -var CONTEXT_BLOCK_IN = 3; -var CONTEXT_BLOCK_OUT = 4; - - -var CHOMPING_CLIP = 1; -var CHOMPING_STRIP = 2; -var CHOMPING_KEEP = 3; - - -var CHAR_TAB = 0x09; /* Tab */ -var CHAR_LINE_FEED = 0x0A; /* LF */ -var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ -var CHAR_SPACE = 0x20; /* Space */ -var CHAR_EXCLAMATION = 0x21; /* ! */ -var CHAR_DOUBLE_QUOTE = 0x22; /* " */ -var CHAR_SHARP = 0x23; /* # */ -var CHAR_PERCENT = 0x25; /* % */ -var CHAR_AMPERSAND = 0x26; /* & */ -var CHAR_SINGLE_QUOTE = 0x27; /* ' */ -var CHAR_ASTERISK = 0x2A; /* * */ -var CHAR_PLUS = 0x2B; /* + */ -var CHAR_COMMA = 0x2C; /* , */ -var CHAR_MINUS = 0x2D; /* - */ -var CHAR_DOT = 0x2E; /* . */ -var CHAR_SLASH = 0x2F; /* / */ -var CHAR_DIGIT_ZERO = 0x30; /* 0 */ -var CHAR_DIGIT_ONE = 0x31; /* 1 */ -var CHAR_DIGIT_NINE = 0x39; /* 9 */ -var CHAR_COLON = 0x3A; /* : */ -var CHAR_LESS_THAN = 0x3C; /* < */ -var CHAR_GREATER_THAN = 0x3E; /* > */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_CAPITAL_A = 0x41; /* A */ -var CHAR_CAPITAL_F = 0x46; /* F */ -var CHAR_CAPITAL_L = 0x4C; /* L */ -var CHAR_CAPITAL_N = 0x4E; /* N */ -var CHAR_CAPITAL_P = 0x50; /* P */ -var CHAR_CAPITAL_U = 0x55; /* U */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_BACKSLASH = 0x5C; /* \ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_UNDERSCORE = 0x5F; /* _ */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_SMALL_A = 0x61; /* a */ -var CHAR_SMALL_B = 0x62; /* b */ -var CHAR_SMALL_E = 0x65; /* e */ -var CHAR_SMALL_F = 0x66; /* f */ -var CHAR_SMALL_N = 0x6E; /* n */ -var CHAR_SMALL_R = 0x72; /* r */ -var CHAR_SMALL_T = 0x74; /* t */ -var CHAR_SMALL_U = 0x75; /* u */ -var CHAR_SMALL_V = 0x76; /* v */ -var CHAR_SMALL_X = 0x78; /* x */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - - -var SIMPLE_ESCAPE_SEQUENCES = {}; - -SIMPLE_ESCAPE_SEQUENCES[CHAR_DIGIT_ZERO] = '\x00'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_A] = '\x07'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_B] = '\x08'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_T] = '\x09'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_TAB] = '\x09'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_N] = '\x0A'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_V] = '\x0B'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_F] = '\x0C'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_R] = '\x0D'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_E] = '\x1B'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_SPACE] = ' '; -SIMPLE_ESCAPE_SEQUENCES[CHAR_DOUBLE_QUOTE] = '\x22'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_SLASH] = '/'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_BACKSLASH] = '\x5C'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_CAPITAL_N] = '\x85'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_UNDERSCORE] = '\xA0'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_CAPITAL_L] = '\u2028'; -SIMPLE_ESCAPE_SEQUENCES[CHAR_CAPITAL_P] = '\u2029'; - - -var HEXADECIMAL_ESCAPE_SEQUENCES = {}; - -HEXADECIMAL_ESCAPE_SEQUENCES[CHAR_SMALL_X] = 2; -HEXADECIMAL_ESCAPE_SEQUENCES[CHAR_SMALL_U] = 4; -HEXADECIMAL_ESCAPE_SEQUENCES[CHAR_CAPITAL_U] = 8; - - -var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uD800-\uDFFF\uFFFE\uFFFF]/; -var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; -var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; -var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; -var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - -function loadAll(input, output, options) { - options = options || {}; - - var filename = options['filename'] || null, - schema = options['schema'] || DEFAULT_SCHEMA, - resolve = options['resolve'] || true, - validate = options['validate'] || true, - strict = options['strict'] || false, - legacy = options['legacy'] || false, - - directiveHandlers = {}, - implicitTypes = schema.compiledImplicit, - typeMap = schema.compiledTypeMap, - - length = input.length, - position = 0, - line = 0, - lineStart = 0, - lineIndent = 0, - character = input.charCodeAt(position), - - version, - checkLineBreaks, - tagMap, - anchorMap, - tag, - anchor, - kind, - result; - - function generateError(message) { - return new YAMLException( - message, - new Mark(filename, input, position, line, (position - lineStart))); - } - - function throwError(message) { - throw generateError(message); - } - - function throwWarning(message) { - var error = generateError(message); - - if (strict) { - throw error; - } else { - console.warn(error.toString()); - } - } - - directiveHandlers['YAML'] = function handleYamlDirective(name, args) { - var match, major, minor; - - if (null !== version) { - throwError('duplication of %YAML directive'); - } - - if (1 !== args.length) { - throwError('YAML directive accepts exactly one argument'); - } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (null === match) { - throwError('ill-formed argument of the YAML directive'); - } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (1 !== major) { - throwError('unacceptable YAML version of the document'); - } - - version = args[0]; - checkLineBreaks = (minor < 2); - - if (1 !== minor && 2 !== minor) { - throwWarning('unsupported YAML version of the document'); - } - }; - - directiveHandlers['TAG'] = function handleTagDirective(name, args) { - var handle, prefix; - - if (2 !== args.length) { - throwError('TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError('ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty.call(tagMap, handle)) { - throwError('there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError('ill-formed tag prefix (second argument) of the TAG directive'); - } - - tagMap[handle] = prefix; - }; - - function captureSegment(start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = input.slice(start, end); - - if (checkJson && validate) { - for (_position = 0, _length = _result.length; - _position < _length; - _position += 1) { - _character = _result.charCodeAt(_position); - if (!(0x09 === _character || - 0x20 <= _character && _character <= 0x10FFFF)) { - throwError('expected valid JSON character'); - } - } - } - - result += _result; - } - } - - function mergeMappings(destination, source) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError('cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty.call(destination, key)) { - destination[key] = source[key]; - } - } - } - - function storeMappingPair(_result, keyTag, keyNode, valueNode) { - var index, quantity; - - keyNode = String(keyNode); - - if (null === _result) { - _result = {}; - } - - if ('tag:yaml.org,2002:merge' === keyTag) { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(_result, valueNode[index]); - } - } else { - mergeMappings(_result, valueNode); - } - } else { - _result[keyNode] = valueNode; - } - - return _result; - } - - function readLineBreak() { - if (CHAR_LINE_FEED === character) { - position += 1; - } else if (CHAR_CARRIAGE_RETURN === character) { - if (CHAR_LINE_FEED === input.charCodeAt(position + 1)) { - position += 2; - } else { - position += 1; - } - } else { - throwError('a line break is expected'); - } - - line += 1; - lineStart = position; - character = input.charCodeAt(position); - } - - function skipSeparationSpace(allowComments, checkIndent) { - var lineBreaks = 0; - - while (position < length) { - while (CHAR_SPACE === character || CHAR_TAB === character) { - character = input.charCodeAt(++position); - } - - if (allowComments && CHAR_SHARP === character) { - do { character = input.charCodeAt(++position); } - while (position < length && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character); - } - - if (CHAR_LINE_FEED === character || CHAR_CARRIAGE_RETURN === character) { - readLineBreak(); - lineBreaks += 1; - lineIndent = 0; - - while (CHAR_SPACE === character) { - lineIndent += 1; - character = input.charCodeAt(++position); - } - - if (lineIndent < checkIndent) { - throwWarning('deficient indentation'); - } - } else { - break; - } - } - - return lineBreaks; - } - - function testDocumentSeparator() { - var _position, _character; - - if (position === lineStart && - (CHAR_MINUS === character || CHAR_DOT === character) && - input.charCodeAt(position + 1) === character && - input.charCodeAt(position + 2) === character) { - - _position = position + 3; - _character = input.charCodeAt(_position); - - if (_position >= length || - CHAR_SPACE === _character || - CHAR_TAB === _character || - CHAR_LINE_FEED === _character || - CHAR_CARRIAGE_RETURN === _character) { - return true; - } - } - - return false; - } - - function writeFoldedLines(count) { - if (1 === count) { - result += ' '; - } else if (count > 1) { - result += common.repeat('\n', count - 1); - } - } - - function readPlainScalar(nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = kind, - _result = result; - - if (CHAR_SPACE === character || - CHAR_TAB === character || - CHAR_LINE_FEED === character || - CHAR_CARRIAGE_RETURN === character || - CHAR_COMMA === character || - CHAR_LEFT_SQUARE_BRACKET === character || - CHAR_RIGHT_SQUARE_BRACKET === character || - CHAR_LEFT_CURLY_BRACKET === character || - CHAR_RIGHT_CURLY_BRACKET === character || - CHAR_SHARP === character || - CHAR_AMPERSAND === character || - CHAR_ASTERISK === character || - CHAR_EXCLAMATION === character || - CHAR_VERTICAL_LINE === character || - CHAR_GREATER_THAN === character || - CHAR_SINGLE_QUOTE === character || - CHAR_DOUBLE_QUOTE === character || - CHAR_PERCENT === character || - CHAR_COMMERCIAL_AT === character || - CHAR_GRAVE_ACCENT === character) { - return false; - } - - if (CHAR_QUESTION === character || - CHAR_MINUS === character) { - following = input.charCodeAt(position + 1); - - if (CHAR_SPACE === following || - CHAR_TAB === following || - CHAR_LINE_FEED === following || - CHAR_CARRIAGE_RETURN === following || - withinFlowCollection && - (CHAR_COMMA === following || - CHAR_LEFT_SQUARE_BRACKET === following || - CHAR_RIGHT_SQUARE_BRACKET === following || - CHAR_LEFT_CURLY_BRACKET === following || - CHAR_RIGHT_CURLY_BRACKET === following)) { - return false; - } - } - - kind = KIND_STRING; - result = ''; - captureStart = captureEnd = position; - hasPendingContent = false; - - while (position < length) { - if (CHAR_COLON === character) { - following = input.charCodeAt(position + 1); - - if (CHAR_SPACE === following || - CHAR_TAB === following || - CHAR_LINE_FEED === following || - CHAR_CARRIAGE_RETURN === following || - withinFlowCollection && - (CHAR_COMMA === following || - CHAR_LEFT_SQUARE_BRACKET === following || - CHAR_RIGHT_SQUARE_BRACKET === following || - CHAR_LEFT_CURLY_BRACKET === following || - CHAR_RIGHT_CURLY_BRACKET === following)) { - break; - } - - } else if (CHAR_SHARP === character) { - preceding = input.charCodeAt(position - 1); - - if (CHAR_SPACE === preceding || - CHAR_TAB === preceding || - CHAR_LINE_FEED === preceding || - CHAR_CARRIAGE_RETURN === preceding) { - break; - } - - } else if ((position === lineStart && testDocumentSeparator()) || - withinFlowCollection && - (CHAR_COMMA === character || - CHAR_LEFT_SQUARE_BRACKET === character || - CHAR_RIGHT_SQUARE_BRACKET === character || - CHAR_LEFT_CURLY_BRACKET === character || - CHAR_RIGHT_CURLY_BRACKET === character)) { - break; - - } else if (CHAR_LINE_FEED === character || - CHAR_CARRIAGE_RETURN === character) { - _line = line; - _lineStart = lineStart; - _lineIndent = lineIndent; - skipSeparationSpace(false, -1); - - if (lineIndent >= nodeIndent) { - hasPendingContent = true; - continue; - } else { - position = captureEnd; - line = _line; - lineStart = _lineStart; - lineIndent = _lineIndent; - character = input.charCodeAt(position); - break; - } - } - - if (hasPendingContent) { - captureSegment(captureStart, captureEnd, false); - writeFoldedLines(line - _line); - captureStart = captureEnd = position; - hasPendingContent = false; - } - - if (CHAR_SPACE !== character && CHAR_TAB !== character) { - captureEnd = position + 1; - } - - character = input.charCodeAt(++position); - } - - captureSegment(captureStart, captureEnd, false); - - if (result) { - return true; - } else { - kind = _kind; - result = _result; - return false; - } - } - - function readSingleQuotedScalar(nodeIndent) { - var captureStart, captureEnd; - - if (CHAR_SINGLE_QUOTE !== character) { - return false; - } - - kind = KIND_STRING; - result = ''; - character = input.charCodeAt(++position); - captureStart = captureEnd = position; - - while (position < length) { - if (CHAR_SINGLE_QUOTE === character) { - captureSegment(captureStart, position, true); - character = input.charCodeAt(++position); - - if (CHAR_SINGLE_QUOTE === character) { - captureStart = captureEnd = position; - character = input.charCodeAt(++position); - } else { - return true; - } - - } else if (CHAR_LINE_FEED === character || - CHAR_CARRIAGE_RETURN === character) { - captureSegment(captureStart, captureEnd, true); - writeFoldedLines(skipSeparationSpace(false, nodeIndent)); - captureStart = captureEnd = position; - character = input.charCodeAt(position); - - } else if (position === lineStart && testDocumentSeparator()) { - throwError('unexpected end of the document within a single quoted scalar'); - - } else { - character = input.charCodeAt(++position); - captureEnd = position; - } - } - - throwError('unexpected end of the stream within a single quoted scalar'); - } - - function readDoubleQuotedScalar(nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexIndex, - hexOffset, - hexResult; - - if (CHAR_DOUBLE_QUOTE !== character) { - return false; - } - - kind = KIND_STRING; - result = ''; - character = input.charCodeAt(++position); - captureStart = captureEnd = position; - - while (position < length) { - if (CHAR_DOUBLE_QUOTE === character) { - captureSegment(captureStart, position, true); - character = input.charCodeAt(++position); - return true; - - } else if (CHAR_BACKSLASH === character) { - captureSegment(captureStart, position, true); - character = input.charCodeAt(++position); - - if (CHAR_LINE_FEED === character || - CHAR_CARRIAGE_RETURN === character) { - skipSeparationSpace(false, nodeIndent); - - } else if (SIMPLE_ESCAPE_SEQUENCES[character]) { - result += SIMPLE_ESCAPE_SEQUENCES[character]; - character = input.charCodeAt(++position); - - } else if (HEXADECIMAL_ESCAPE_SEQUENCES[character]) { - hexLength = HEXADECIMAL_ESCAPE_SEQUENCES[character]; - hexResult = 0; - - for (hexIndex = 1; hexIndex <= hexLength; hexIndex += 1) { - hexOffset = (hexLength - hexIndex) * 4; - character = input.charCodeAt(++position); - - if (CHAR_DIGIT_ZERO <= character && character <= CHAR_DIGIT_NINE) { - hexResult |= (character - CHAR_DIGIT_ZERO) << hexOffset; - - } else if (CHAR_CAPITAL_A <= character && character <= CHAR_CAPITAL_F) { - hexResult |= (character - CHAR_CAPITAL_A + 10) << hexOffset; - - } else if (CHAR_SMALL_A <= character && character <= CHAR_SMALL_F) { - hexResult |= (character - CHAR_SMALL_A + 10) << hexOffset; - - } else { - throwError('expected hexadecimal character'); - } - } - - result += String.fromCharCode(hexResult); - character = input.charCodeAt(++position); - - } else { - throwError('unknown escape sequence'); - } - - captureStart = captureEnd = position; - - } else if (CHAR_LINE_FEED === character || - CHAR_CARRIAGE_RETURN === character) { - captureSegment(captureStart, captureEnd, true); - writeFoldedLines(skipSeparationSpace(false, nodeIndent)); - captureStart = captureEnd = position; - character = input.charCodeAt(position); - - } else if (position === lineStart && testDocumentSeparator()) { - throwError('unexpected end of the document within a double quoted scalar'); - - } else { - character = input.charCodeAt(++position); - captureEnd = position; - } - } - - throwError('unexpected end of the stream within a double quoted scalar'); - } - - function readFlowCollection(nodeIndent) { - var readNext = true, - _line, - _tag = tag, - _result, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - keyNode, - keyTag, - valueNode; - - switch (character) { - case CHAR_LEFT_SQUARE_BRACKET: - terminator = CHAR_RIGHT_SQUARE_BRACKET; - isMapping = false; - _result = []; - break; - - case CHAR_LEFT_CURLY_BRACKET: - terminator = CHAR_RIGHT_CURLY_BRACKET; - isMapping = true; - _result = {}; - break; - - default: - return false; - } - - if (null !== anchor) { - anchorMap[anchor] = _result; - } - - character = input.charCodeAt(++position); - - while (position < length) { - skipSeparationSpace(true, nodeIndent); - - if (character === terminator) { - character = input.charCodeAt(++position); - tag = _tag; - kind = isMapping ? KIND_OBJECT : KIND_ARRAY; - result = _result; - return true; - } else if (!readNext) { - throwError('missed comma between flow collection entries'); - } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (CHAR_QUESTION === character) { - following = input.charCodeAt(position + 1); - - if (CHAR_SPACE === following || - CHAR_TAB === following || - CHAR_LINE_FEED === following || - CHAR_CARRIAGE_RETURN === following) { - isPair = isExplicitPair = true; - position += 1; - character = following; - skipSeparationSpace(true, nodeIndent); - } - } - - _line = line; - composeNode(nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = tag; - keyNode = result; - - if ((isExplicitPair || line === _line) && CHAR_COLON === character) { - isPair = true; - character = input.charCodeAt(++position); - skipSeparationSpace(true, nodeIndent); - composeNode(nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = result; - } - - if (isMapping) { - storeMappingPair(_result, keyTag, keyNode, valueNode); - } else if (isPair) { - _result.push(storeMappingPair(null, keyTag, keyNode, valueNode)); - } else { - _result.push(keyNode); - } - - skipSeparationSpace(true, nodeIndent); - - if (CHAR_COMMA === character) { - readNext = true; - character = input.charCodeAt(++position); - } else { - readNext = false; - } - } - - throwError('unexpected end of the stream within a flow collection'); - } - - function readBlockScalar(nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = -1; - - switch (character) { - case CHAR_VERTICAL_LINE: - folding = false; - break; - - case CHAR_GREATER_THAN: - folding = true; - break; - - default: - return false; - } - - kind = KIND_STRING; - result = ''; - - while (position < length) { - character = input.charCodeAt(++position); - - if (CHAR_PLUS === character || CHAR_MINUS === character) { - if (CHOMPING_CLIP === chomping) { - chomping = (CHAR_PLUS === character) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError('repeat of a chomping mode identifier'); - } - - } else if (CHAR_DIGIT_ZERO <= character && character <= CHAR_DIGIT_NINE) { - if (CHAR_DIGIT_ZERO === character) { - throwError('bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + (character - CHAR_DIGIT_ONE); - detectedIndent = true; - } else { - throwError('repeat of an indentation width identifier'); - } - - } else { - break; - } - } - - if (CHAR_SPACE === character || CHAR_TAB === character) { - do { character = input.charCodeAt(++position); } - while (CHAR_SPACE === character || CHAR_TAB === character); - - if (CHAR_SHARP === character) { - do { character = input.charCodeAt(++position); } - while (position < length && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character); - } - } - - while (position < length) { - readLineBreak(); - lineIndent = 0; - - while ((!detectedIndent || lineIndent < textIndent) && - (CHAR_SPACE === character)) { - lineIndent += 1; - character = input.charCodeAt(++position); - } - - if (!detectedIndent && lineIndent > textIndent) { - textIndent = lineIndent; - } - - if (CHAR_LINE_FEED === character || CHAR_CARRIAGE_RETURN === character) { - emptyLines += 1; - continue; - } - - // End of the scalar. Perform the chomping. - if (lineIndent < textIndent) { - if (CHOMPING_KEEP === chomping) { - result += common.repeat('\n', emptyLines + 1); - } else if (CHOMPING_CLIP === chomping) { - result += '\n'; - } - break; - } - - detectedIndent = true; - - if (folding) { - if (CHAR_SPACE === character || CHAR_TAB === character) { - result += common.repeat('\n', emptyLines + 1); - emptyLines = 1; - } else if (0 === emptyLines) { - result += ' '; - emptyLines = 0; - } else { - result += common.repeat('\n', emptyLines); - emptyLines = 0; - } - } else { - result += common.repeat('\n', emptyLines + 1); - emptyLines = 0; - } - - captureStart = position; - - do { character = input.charCodeAt(++position); } - while (position < length && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character); - - captureSegment(captureStart, position, false); - } - - return true; - } - - function readBlockSequence(nodeIndent) { - var _line, - _tag = tag, - _result = [], - following, - detected = false; - - if (null !== anchor) { - anchorMap[anchor] = _result; - } - - while (position < length) { - if (CHAR_MINUS !== character) { - break; - } - - following = input.charCodeAt(position + 1); - - if (CHAR_SPACE !== following && - CHAR_TAB !== following && - CHAR_LINE_FEED !== following && - CHAR_CARRIAGE_RETURN !== following) { - break; - } - - detected = true; - position += 1; - character = following; - - if (skipSeparationSpace(true, -1)) { - if (lineIndent <= nodeIndent) { - _result.push(null); - continue; - } - } - - _line = line; - composeNode(nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(result); - skipSeparationSpace(true, -1); - - if ((line === _line || lineIndent > nodeIndent) && position < length) { - throwError('bad indentation of a sequence entry'); - } else if (lineIndent < nodeIndent) { - break; - } - } - - if (detected) { - tag = _tag; - kind = KIND_ARRAY; - result = _result; - return true; - } else { - return false; - } - } - - function readBlockMapping(nodeIndent) { - var following, - allowCompact, - _line, - _tag = tag, - _result = {}, - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false; - - if (null !== anchor) { - anchorMap[anchor] = _result; - } - - while (position < length) { - following = input.charCodeAt(position + 1); - _line = line; // Save the current line. - - if ((CHAR_QUESTION === character || - CHAR_COLON === character) && - (CHAR_SPACE === following || - CHAR_TAB === following || - CHAR_LINE_FEED === following || - CHAR_CARRIAGE_RETURN === following)) { - - if (CHAR_QUESTION === character) { - if (atExplicitKey) { - storeMappingPair(_result, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. CHAR_COLON === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError('incomplete explicit mapping pair; a key node is missed'); - } - - position += 1; - character = following; - - } else if (composeNode(nodeIndent, CONTEXT_FLOW_OUT, false, true)) { - if (line === _line) { - // TODO: Remove this cycle when the flow readers will consume - // trailing whitespaces like the block readers. - while (CHAR_SPACE === character || - CHAR_TAB === character) { - character = input.charCodeAt(++position); - } - - if (CHAR_COLON === character) { - character = input.charCodeAt(++position); - - if (CHAR_SPACE !== character && - CHAR_TAB !== character && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character) { - throwError('a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(_result, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = tag; - keyNode = result; - - } else if (detected) { - throwError('can not read an implicit mapping pair; a colon is missed'); - - } else { - tag = _tag; - return true; // Keep the result of `composeNode`. - } - - } else if (detected) { - throwError('can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - tag = _tag; - return true; // Keep the result of `composeNode`. - } - - } else { - break; - } - - if (line === _line || lineIndent > nodeIndent) { - if (composeNode(nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = result; - } else { - valueNode = result; - } - } - - if (!atExplicitKey) { - storeMappingPair(_result, keyTag, keyNode, valueNode); - keyTag = keyNode = valueNode = null; - } - - // TODO: It is needed only for flow node readers. It should be removed - // when the flow readers will consume trailing whitespaces as well as - // the block readers. - skipSeparationSpace(true, -1); - } - - if (lineIndent > nodeIndent && position < length) { - throwError('bad indentation of a mapping entry'); - } else if (lineIndent < nodeIndent) { - break; - } - } - - if (atExplicitKey) { - storeMappingPair(_result, keyTag, keyNode, null); - } - - if (detected) { - tag = _tag; - kind = KIND_OBJECT; - result = _result; - } - - return detected; - } - - function readTagProperty() { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName; - - if (CHAR_EXCLAMATION !== character) { - return false; - } - - if (null !== tag) { - throwError('duplication of a tag property'); - } - - character = input.charCodeAt(++position); - - if (CHAR_LESS_THAN === character) { - isVerbatim = true; - character = input.charCodeAt(++position); - - } else if (CHAR_EXCLAMATION === character) { - isNamed = true; - tagHandle = '!!'; - character = input.charCodeAt(++position); - - } else { - tagHandle = '!'; - } - - _position = position; - - if (isVerbatim) { - do { character = input.charCodeAt(++position); } - while (position < length && CHAR_GREATER_THAN !== character); - - if (position < length) { - tagName = input.slice(_position, position); - character = input.charCodeAt(++position); - } else { - throwError('unexpected end of the stream within a verbatim tag'); - } - } else { - while (position < length && - CHAR_SPACE !== character && - CHAR_TAB !== character && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character) { - - if (CHAR_EXCLAMATION === character) { - if (!isNamed) { - tagHandle = input.slice(_position - 1, position + 1); - - if (validate && !PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError('named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = position + 1; - } else { - throwError('tag suffix cannot contain exclamation marks'); - } - } - - character = input.charCodeAt(++position); - } - - tagName = input.slice(_position, position); - - if (validate && PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError('tag suffix cannot contain flow indicator characters'); - } - } - - if (validate && tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError('tag name cannot contain such characters: ' + tagName); - } - - if (isVerbatim) { - tag = tagName; - - } else if (_hasOwnProperty.call(tagMap, tagHandle)) { - tag = tagMap[tagHandle] + tagName; - - } else if ('!' === tagHandle) { - tag = '!' + tagName; - - } else if ('!!' === tagHandle) { - tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError('undeclared tag handle "' + tagHandle + '"'); - } - - return true; - } - - function readAnchorProperty() { - var _position; - - if (CHAR_AMPERSAND !== character) { - return false; - } - - if (null !== anchor) { - throwError('duplication of an anchor property'); - } - - character = input.charCodeAt(++position); - _position = position; - - while (position < length && - CHAR_SPACE !== character && - CHAR_TAB !== character && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character && - CHAR_COMMA !== character && - CHAR_LEFT_SQUARE_BRACKET !== character && - CHAR_RIGHT_SQUARE_BRACKET !== character && - CHAR_LEFT_CURLY_BRACKET !== character && - CHAR_RIGHT_CURLY_BRACKET !== character) { - character = input.charCodeAt(++position); - } - - if (position === _position) { - throwError('name of an anchor node must contain at least one character'); - } - - anchor = input.slice(_position, position); - return true; - } - - function readAlias() { - var _position, alias; - - if (CHAR_ASTERISK !== character) { - return false; - } - - character = input.charCodeAt(++position); - _position = position; - - while (position < length && - CHAR_SPACE !== character && - CHAR_TAB !== character && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character && - CHAR_COMMA !== character && - CHAR_LEFT_SQUARE_BRACKET !== character && - CHAR_RIGHT_SQUARE_BRACKET !== character && - CHAR_LEFT_CURLY_BRACKET !== character && - CHAR_RIGHT_CURLY_BRACKET !== character) { - character = input.charCodeAt(++position); - } - - if (position === _position) { - throwError('name of an alias node must contain at least one character'); - } - - alias = input.slice(_position, position); - - if (!anchorMap.hasOwnProperty(alias)) { - throwError('unidentified alias "' + alias + '"'); - } - - result = anchorMap[alias]; - skipSeparationSpace(true, -1); - return true; - } - - function composeNode(parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - atNewLine = false, - isIndented = true, - hasContent = false, - typeIndex, - typeQuantity, - type, - typeLoader, - flowIndent, - blockIndent, - _result; - - tag = null; - anchor = null; - kind = null; - result = null; - - allowBlockStyles = allowBlockScalars = allowBlockCollections = - CONTEXT_BLOCK_OUT === nodeContext || - CONTEXT_BLOCK_IN === nodeContext; - - if (allowToSeek) { - if (skipSeparationSpace(true, -1)) { - atNewLine = true; - - if (lineIndent === parentIndent) { - isIndented = false; - - } else if (lineIndent > parentIndent) { - isIndented = true; - - } else { - return false; - } - } - } - - if (isIndented) { - while (readTagProperty() || readAnchorProperty()) { - if (skipSeparationSpace(true, -1)) { - atNewLine = true; - - if (lineIndent > parentIndent) { - isIndented = true; - allowBlockCollections = allowBlockStyles; - - } else if (lineIndent === parentIndent) { - isIndented = false; - allowBlockCollections = allowBlockStyles; - - } else { - return true; - } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (isIndented || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = position - lineStart; - - if (isIndented) { - if (allowBlockCollections && - (readBlockSequence(blockIndent) || - readBlockMapping(blockIndent)) || - readFlowCollection(flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(flowIndent)) || - readSingleQuotedScalar(flowIndent) || - readDoubleQuotedScalar(flowIndent)) { - hasContent = true; - - } else if (readAlias()) { - hasContent = true; - - if (null !== tag || null !== anchor) { - throwError('alias node should not have any properties'); - } - - } else if (readPlainScalar(flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (null === tag) { - tag = '?'; - } - } - - if (null !== anchor) { - anchorMap[anchor] = result; - } - } - } else { - hasContent = allowBlockCollections && readBlockSequence(blockIndent); - } - } - - if (null !== tag && '!' !== tag) { - if ('?' === tag) { - if (resolve) { - for (typeIndex = 0, typeQuantity = implicitTypes.length; - typeIndex < typeQuantity; - typeIndex += 1) { - type = implicitTypes[typeIndex]; - - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only assigned to plain scalars. So, it isn't - // needed to check for 'kind' conformity. - _result = type.loader.resolver(result, false); - - if (NIL !== _result) { - tag = type.tag; - result = _result; - break; - } - } - } - } else if (_hasOwnProperty.call(typeMap, tag)) { - typeLoader = typeMap[tag].loader; - - if (null !== result && typeLoader.kind !== kind) { - throwError('unacceptable node kind for !<' + tag + '> tag; it should be "' + typeLoader.kind + '", not "' + kind + '"'); - } - - if (typeLoader.resolver) { - _result = typeLoader.resolver(result, true); - - if (NIL !== _result) { - result = _result; - } else { - throwError('cannot resolve a node with !<' + tag + '> explicit tag'); - } - } - } else { - throwWarning('unknown tag !<' + tag + '>'); - } - } - - return null !== tag || null !== anchor || hasContent; - } - - function readDocument() { - var documentStart = position, - _position, - directiveName, - directiveArgs, - hasDirectives = false; - - version = null; - checkLineBreaks = legacy; - tagMap = {}; - anchorMap = {}; - - while (position < length) { - skipSeparationSpace(true, -1); - - if (lineIndent > 0 || CHAR_PERCENT !== character) { - break; - } - - hasDirectives = true; - character = input.charCodeAt(++position); - _position = position; - - while (position < length && - CHAR_SPACE !== character && - CHAR_TAB !== character && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character) { - character = input.charCodeAt(++position); - } - - directiveName = input.slice(_position, position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError('directive name must not be less than one character in length'); - } - - while (position < length) { - while (CHAR_SPACE === character || CHAR_TAB === character) { - character = input.charCodeAt(++position); - } - - if (CHAR_SHARP === character) { - do { character = input.charCodeAt(++position); } - while (position < length && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character); - break; - } - - if (CHAR_LINE_FEED === character || CHAR_CARRIAGE_RETURN === character) { - break; - } - - _position = position; - - while (position < length && - CHAR_SPACE !== character && - CHAR_TAB !== character && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character) { - character = input.charCodeAt(++position); - } - - directiveArgs.push(input.slice(_position, position)); - } - - if (position < length) { - readLineBreak(); - } - - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](directiveName, directiveArgs); - } else { - throwWarning('unknown document directive "' + directiveName + '"'); - } - } - - skipSeparationSpace(true, -1); - - if (0 === lineIndent && - CHAR_MINUS === character && - CHAR_MINUS === input.charCodeAt(position + 1) && - CHAR_MINUS === input.charCodeAt(position + 2)) { - position += 3; - character = input.charCodeAt(position); - skipSeparationSpace(true, -1); - - } else if (hasDirectives) { - throwError('directives end mark is expected'); - } - - composeNode(lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(true, -1); - - if (validate && checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(input.slice(documentStart, position))) { - throwWarning('non-ASCII line breaks are interpreted as content'); - } - - output(result); - - if (position === lineStart && testDocumentSeparator()) { - if (CHAR_DOT === character) { - position += 3; - character = input.charCodeAt(position); - skipSeparationSpace(true, -1); - } - return; - } - - if (position < length) { - throwError('end of the stream or a document separator is expected'); - } else { - return; - } - } - - if (validate && PATTERN_NON_PRINTABLE.test(input)) { - throwError('the stream contains non-printable characters'); - } - - while (CHAR_SPACE === character) { - lineIndent += 1; - character = input.charCodeAt(++position); - } - - while (position < length) { - readDocument(); - } -} - - -function load(input, options) { - var result = null, received = false; - - function callback(data) { - if (!received) { - result = data; - received = true; - } else { - throw new YAMLException('expected a single document in the stream, but found more'); - } - } - - loadAll(input, callback, options); - - return result; -} - - -function safeLoadAll(input, output, options) { - loadAll(input, output, common.extend({ schema: SAFE_SCHEMA }, options)); -} - - -function safeLoad(input, options) { - return load(input, common.extend({ schema: SAFE_SCHEMA }, options)); -} - - -module.exports.loadAll = loadAll; -module.exports.load = load; -module.exports.safeLoadAll = safeLoadAll; -module.exports.safeLoad = safeLoad; diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/mark.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/mark.js deleted file mode 100644 index bfe279ba52c3..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/mark.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - - -var common = require('./common'); - - -function Mark(name, buffer, position, line, column) { - this.name = name; - this.buffer = buffer; - this.position = position; - this.line = line; - this.column = column; -} - - -Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { - var head, start, tail, end, snippet; - - if (!this.buffer) { - return null; - } - - indent = indent || 4; - maxLength = maxLength || 75; - - head = ''; - start = this.position; - - while (start > 0 && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1))) { - start -= 1; - if (this.position - start > (maxLength / 2 - 1)) { - head = ' ... '; - start += 5; - break; - } - } - - tail = ''; - end = this.position; - - while (end < this.buffer.length && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end))) { - end += 1; - if (end - this.position > (maxLength / 2 - 1)) { - tail = ' ... '; - end -= 5; - break; - } - } - - snippet = this.buffer.slice(start, end); - - return common.repeat(' ', indent) + head + snippet + tail + '\n' + - common.repeat(' ', indent + this.position - start + head.length) + '^'; -}; - - -Mark.prototype.toString = function toString(compact) { - var snippet, where = ''; - - if (this.name) { - where += 'in "' + this.name + '" '; - } - - where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); - - if (!compact) { - snippet = this.getSnippet(); - - if (snippet) { - where += ':\n' + snippet; - } - } - - return where; -}; - - -module.exports = Mark; diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/require.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/require.js deleted file mode 100644 index 47b77e31d29c..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/require.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - - -var fs = require('fs'); -var loader = require('./loader'); - - -function yamlRequireHandler(module, filename) { - var content = fs.readFileSync(filename, 'utf8'); - - // fill in documents - module.exports = loader.load(content, { filename: filename }); -} - -// register require extensions only if we're on node.js -// hack for browserify -if (undefined !== require.extensions) { - require.extensions['.yml'] = yamlRequireHandler; - require.extensions['.yaml'] = yamlRequireHandler; -} - - -module.exports = require; diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema.js deleted file mode 100644 index ce213912620b..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema.js +++ /dev/null @@ -1,103 +0,0 @@ -'use strict'; - - -var common = require('./common'); -var YAMLException = require('./exception'); -var Type = require('./type'); - - -function compileList(schema, name, result) { - var exclude = []; - - schema.include.forEach(function (includedSchema) { - result = compileList(includedSchema, name, result); - }); - - schema[name].forEach(function (currentType) { - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag) { - exclude.push(previousIndex); - } - }); - - result.push(currentType); - }); - - return result.filter(function (type, index) { - return -1 === exclude.indexOf(index); - }); -} - - -function compileMap(/* lists... */) { - var result = {}, index, length; - - function collectType(type) { - result[type.tag] = type; - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - - return result; -} - - -function Schema(definition) { - this.include = definition.include || []; - this.implicit = definition.implicit || []; - this.explicit = definition.explicit || []; - - this.implicit.forEach(function (type) { - if (null !== type.loader && 'string' !== type.loader.kind) { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); - } - }); - - this.compiledImplicit = compileList(this, 'implicit', []); - this.compiledExplicit = compileList(this, 'explicit', []); - this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); -} - - -Schema.DEFAULT = null; - - -Schema.create = function createSchema() { - var schemas, types; - - switch (arguments.length) { - case 1: - schemas = Schema.DEFAULT; - types = arguments[0]; - break; - - case 2: - schemas = arguments[0]; - types = arguments[1]; - break; - - default: - throw new YAMLException('Wrong number of arguments for Schema.create function'); - } - - schemas = common.toArray(schemas); - types = common.toArray(types); - - if (!schemas.every(function (schema) { return schema instanceof Schema; })) { - throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); - } - - if (!types.every(function (type) { return type instanceof Type; })) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - return new Schema({ - include: schemas, - explicit: types - }); -}; - - -module.exports = Schema; diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/default.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/default.js deleted file mode 100644 index 71bb3fcca355..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/default.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = Schema.DEFAULT = new Schema({ - include: [ - require('./safe') - ], - explicit: [ - require('../type/js/undefined'), - require('../type/js/regexp'), - require('../type/js/function') - ] -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/minimal.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/minimal.js deleted file mode 100644 index 7a6ebbec7f70..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/minimal.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - explicit: [ - require('../type/str'), - require('../type/seq'), - require('../type/map') - ] -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/safe.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/safe.js deleted file mode 100644 index 856b7c415f91..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/safe.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - include: [ - require('./minimal') - ], - implicit: [ - require('../type/null'), - require('../type/bool'), - require('../type/int'), - require('../type/float'), - require('../type/timestamp'), - require('../type/merge') - ], - explicit: [ - require('../type/binary'), - require('../type/omap'), - require('../type/pairs'), - require('../type/set') - ] -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type.js deleted file mode 100644 index e0124f2c1655..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; - - -var YAMLException = require('./exception'); - - -// TODO: Add tag format check. -function Type(tag, options) { - options = options || {}; - - this.tag = tag; - this.loader = options['loader'] || null; - this.dumper = options['dumper'] || null; - - if (null === this.loader && null === this.dumper) { - throw new YAMLException('Incomplete YAML type definition. "loader" or "dumper" setting must be specified.'); - } - - if (null !== this.loader) { - this.loader = new Type.Loader(this.loader); - } - - if (null !== this.dumper) { - this.dumper = new Type.Dumper(this.dumper); - } -} - - -Type.Loader = function TypeLoader(options) { - options = options || {}; - - this.kind = options['kind'] || null; - this.resolver = options['resolver'] || null; - - if ('string' !== this.kind && - 'array' !== this.kind && - 'object' !== this.kind) { - throw new YAMLException('Unacceptable "kind" setting of a type loader.'); - } -}; - - -function compileAliases(map) { - var result = {}; - - if (null !== map) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; -} - - -Type.Dumper = function TypeDumper(options) { - options = options || {}; - - this.kind = options['kind'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.representer = options['representer'] || null; - this.styleAliases = compileAliases(options['styleAliases'] || null); - - if ('undefined' !== this.kind && - 'null' !== this.kind && - 'boolean' !== this.kind && - 'integer' !== this.kind && - 'float' !== this.kind && - 'string' !== this.kind && - 'array' !== this.kind && - 'object' !== this.kind && - 'function' !== this.kind) { - throw new YAMLException('Unacceptable "kind" setting of a type dumper.'); - } -}; - - -module.exports = Type; diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/binary.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/binary.js deleted file mode 100644 index 37b4bc70f0d3..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/binary.js +++ /dev/null @@ -1,118 +0,0 @@ -// Modified from: -// https://raw.github.com/kanaka/noVNC/d890e8640f20fba3215ba7be8e0ff145aeb8c17c/include/base64.js - -'use strict'; - - -var NodeBuffer = require('buffer').Buffer; // A trick for browserified version. -var common = require('../common'); -var NIL = common.NIL; -var Type = require('../type'); - - - -var BASE64_PADDING = '='; - -var BASE64_BINTABLE = [ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, 0, -1, -1, - -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, - -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1 -]; - -var BASE64_CHARTABLE = - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - -function resolveYamlBinary(object /*, explicit*/) { - var value, code, idx = 0, result = [], leftbits, leftdata; - - leftbits = 0; // number of bits decoded, but yet to be appended - leftdata = 0; // bits decoded, but yet to be appended - - // Convert one by one. - for (idx = 0; idx < object.length; idx += 1) { - code = object.charCodeAt(idx); - value = BASE64_BINTABLE[code & 0x7F]; - - // Skip LF(NL) || CR - if (0x0A !== code && 0x0D !== code) { - // Fail on illegal characters - if (-1 === value) { - return NIL; - } - - // Collect data into leftdata, update bitcount - leftdata = (leftdata << 6) | value; - leftbits += 6; - - // If we have 8 or more bits, append 8 bits to the result - if (leftbits >= 8) { - leftbits -= 8; - - // Append if not padding. - if (BASE64_PADDING !== object.charAt(idx)) { - result.push((leftdata >> leftbits) & 0xFF); - } - - leftdata &= (1 << leftbits) - 1; - } - } - } - - // If there are any bits left, the base64 string was corrupted - if (leftbits) { - return NIL; - } else { - return new NodeBuffer(result); - } -} - - -function representYamlBinary(object /*, style*/) { - var result = '', index, length, rest; - - // Convert every three bytes to 4 ASCII characters. - for (index = 0, length = object.length - 2; index < length; index += 3) { - result += BASE64_CHARTABLE[object[index + 0] >> 2]; - result += BASE64_CHARTABLE[((object[index + 0] & 0x03) << 4) + (object[index + 1] >> 4)]; - result += BASE64_CHARTABLE[((object[index + 1] & 0x0F) << 2) + (object[index + 2] >> 6)]; - result += BASE64_CHARTABLE[object[index + 2] & 0x3F]; - } - - rest = object.length % 3; - - // Convert the remaining 1 or 2 bytes, padding out to 4 characters. - if (0 !== rest) { - index = object.length - rest; - result += BASE64_CHARTABLE[object[index + 0] >> 2]; - - if (2 === rest) { - result += BASE64_CHARTABLE[((object[index + 0] & 0x03) << 4) + (object[index + 1] >> 4)]; - result += BASE64_CHARTABLE[(object[index + 1] & 0x0F) << 2]; - result += BASE64_PADDING; - } else { - result += BASE64_CHARTABLE[(object[index + 0] & 0x03) << 4]; - result += BASE64_PADDING + BASE64_PADDING; - } - } - - return result; -} - - -module.exports = new Type('tag:yaml.org,2002:binary', { - loader: { - kind: 'string', - resolver: resolveYamlBinary - }, - dumper: { - kind: 'object', - instanceOf: NodeBuffer, - representer: representYamlBinary - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/bool.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/bool.js deleted file mode 100644 index 987a9e62a613..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/bool.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - - -var NIL = require('../common').NIL; -var Type = require('../type'); - - -var YAML_IMPLICIT_BOOLEAN_MAP = { - 'true' : true, - 'True' : true, - 'TRUE' : true, - 'false' : false, - 'False' : false, - 'FALSE' : false -}; - -var YAML_EXPLICIT_BOOLEAN_MAP = { - 'true' : true, - 'True' : true, - 'TRUE' : true, - 'false' : false, - 'False' : false, - 'FALSE' : false, - 'y' : true, - 'Y' : true, - 'yes' : true, - 'Yes' : true, - 'YES' : true, - 'n' : false, - 'N' : false, - 'no' : false, - 'No' : false, - 'NO' : false, - 'on' : true, - 'On' : true, - 'ON' : true, - 'off' : false, - 'Off' : false, - 'OFF' : false -}; - - -function resolveYamlBoolean(object, explicit) { - if (explicit) { - if (YAML_EXPLICIT_BOOLEAN_MAP.hasOwnProperty(object)) { - return YAML_EXPLICIT_BOOLEAN_MAP[object]; - } else { - return NIL; - } - } else { - if (YAML_IMPLICIT_BOOLEAN_MAP.hasOwnProperty(object)) { - return YAML_IMPLICIT_BOOLEAN_MAP[object]; - } else { - return NIL; - } - } -} - - -module.exports = new Type('tag:yaml.org,2002:bool', { - loader: { - kind: 'string', - resolver: resolveYamlBoolean - }, - dumper: { - kind: 'boolean', - defaultStyle: 'lowercase', - representer: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - } - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/float.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/float.js deleted file mode 100644 index edb5fcba3f3c..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/float.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - - -var NIL = require('../common').NIL; -var Type = require('../type'); - - -var YAML_FLOAT_PATTERN = new RegExp( - '^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?' + - '|\\.[0-9_]+(?:[eE][-+][0-9]+)?' + - '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + - '|[-+]?\\.(?:inf|Inf|INF)' + - '|\\.(?:nan|NaN|NAN))$'); - - -function resolveYamlFloat(object /*, explicit*/) { - var value, sign, base, digits; - - if (!YAML_FLOAT_PATTERN.test(object)) { - return NIL; - } - - value = object.replace(/_/g, '').toLowerCase(); - sign = '-' === value[0] ? -1 : 1; - digits = []; - - if (0 <= '+-'.indexOf(value[0])) { - value = value.slice(1); - } - - if ('.inf' === value) { - return (1 === sign) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if ('.nan' === value) { - return NaN; - - } else if (0 <= value.indexOf(':')) { - value.split(':').forEach(function (v) { - digits.unshift(parseFloat(v, 10)); - }); - - value = 0.0; - base = 1; - - digits.forEach(function (d) { - value += d * base; - base *= 60; - }); - - return sign * value; - - } else { - return sign * parseFloat(value, 10); - } -} - - -function representYamlFloat(object, style) { - if (isNaN(object)) { - switch (style) { - case 'lowercase': - return '.nan'; - case 'uppercase': - return '.NAN'; - case 'camelcase': - return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': - return '.inf'; - case 'uppercase': - return '.INF'; - case 'camelcase': - return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': - return '-.inf'; - case 'uppercase': - return '-.INF'; - case 'camelcase': - return '-.Inf'; - } - } else { - return object.toString(10); - } -} - - -module.exports = new Type('tag:yaml.org,2002:float', { - loader: { - kind: 'string', - resolver: resolveYamlFloat - }, - dumper: { - kind: 'float', - defaultStyle: 'lowercase', - representer: representYamlFloat - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/int.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/int.js deleted file mode 100644 index f5e1e7e51ad1..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/int.js +++ /dev/null @@ -1,85 +0,0 @@ -'use strict'; - - -var NIL = require('../common').NIL; -var Type = require('../type'); - - -var YAML_INTEGER_PATTERN = new RegExp( - '^(?:[-+]?0b[0-1_]+' + - '|[-+]?0[0-7_]+' + - '|[-+]?(?:0|[1-9][0-9_]*)' + - '|[-+]?0x[0-9a-fA-F_]+' + - '|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$'); - - -function resolveYamlInteger(object /*, explicit*/) { - var value, sign, base, digits; - - if (!YAML_INTEGER_PATTERN.test(object)) { - return NIL; - } - - value = object.replace(/_/g, ''); - sign = '-' === value[0] ? -1 : 1; - digits = []; - - if (0 <= '+-'.indexOf(value[0])) { - value = value.slice(1); - } - - if ('0' === value) { - return 0; - - } else if (/^0b/.test(value)) { - return sign * parseInt(value.slice(2), 2); - - } else if (/^0x/.test(value)) { - return sign * parseInt(value, 16); - - } else if ('0' === value[0]) { - return sign * parseInt(value, 8); - - } else if (0 <= value.indexOf(':')) { - value.split(':').forEach(function (v) { - digits.unshift(parseInt(v, 10)); - }); - - value = 0; - base = 1; - - digits.forEach(function (d) { - value += (d * base); - base *= 60; - }); - - return sign * value; - - } else { - return sign * parseInt(value, 10); - } -} - - -module.exports = new Type('tag:yaml.org,2002:int', { - loader: { - kind: 'string', - resolver: resolveYamlInteger - }, - dumper: { - kind: 'integer', - defaultStyle: 'decimal', - representer: { - binary: function (object) { return '0b' + object.toString(2); }, - octal: function (object) { return '0' + object.toString(8); }, - decimal: function (object) { return object.toString(10); }, - hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); } - }, - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/function.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/function.js deleted file mode 100644 index 4b3b3ca56fee..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/function.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - - -var esprima = require('esprima'); - - -var NIL = require('../../common').NIL; -var Type = require('../../type'); - - -function resolveJavascriptFunction(object /*, explicit*/) { - /*jslint evil:true*/ - - try { - var source = '(' + object + ')', - ast = esprima.parse(source, { range: true }), - params = [], - body; - - if ('Program' !== ast.type || - 1 !== ast.body.length || - 'ExpressionStatement' !== ast.body[0].type || - 'FunctionExpression' !== ast.body[0].expression.type) { - return NIL; - } - - ast.body[0].expression.params.forEach(function (param) { - params.push(param.name); - }); - - body = ast.body[0].expression.body.range; - - // Esprima's ranges include the first '{' and the last '}' characters on - // function expressions. So cut them out. - return new Function(params, source.slice(body[0]+1, body[1]-1)); - } catch (err) { - return NIL; - } -} - - -function representJavascriptFunction(object /*, style*/) { - return object.toString(); -} - - -module.exports = new Type('tag:yaml.org,2002:js/function', { - loader: { - kind: 'string', - resolver: resolveJavascriptFunction - }, - dumper: { - kind: 'function', - representer: representJavascriptFunction, - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js deleted file mode 100644 index 9f4f89e04bb7..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - - -var NIL = require('../../common').NIL; -var Type = require('../../type'); - - -function resolveJavascriptRegExp(object /*, explicit*/) { - var regexp = object, - tail = /\/([gim]*)$/.exec(object), - modifiers; - - // `/foo/gim` - tail can be maximum 4 chars - if ('/' === regexp[0] && tail && 4 >= tail[0].length) { - regexp = regexp.slice(1, regexp.length - tail[0].length); - modifiers = tail[1]; - } - - try { - return new RegExp(regexp, modifiers); - } catch (error) { - return NIL; - } -} - - -function representJavascriptRegExp(object /*, style*/) { - var result = '/' + object.source + '/'; - - if (object.global) { - result += 'g'; - } - - if (object.multiline) { - result += 'm'; - } - - if (object.ignoreCase) { - result += 'i'; - } - - return result; -} - - -module.exports = new Type('tag:yaml.org,2002:js/regexp', { - loader: { - kind: 'string', - resolver: resolveJavascriptRegExp - }, - dumper: { - kind: 'object', - instanceOf: RegExp, - representer: representJavascriptRegExp - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js deleted file mode 100644 index 8d2835e19043..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - - -var Type = require('../../type'); - - -function resolveJavascriptUndefined(/*object, explicit*/) { - var undef; - - return undef; -} - - -function representJavascriptUndefined(/*object, explicit*/) { - return ''; -} - - -module.exports = new Type('tag:yaml.org,2002:js/undefined', { - loader: { - kind: 'string', - resolver: resolveJavascriptUndefined - }, - dumper: { - kind: 'undefined', - representer: representJavascriptUndefined - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/map.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/map.js deleted file mode 100644 index 5cda6de766a5..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/map.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - - -var Type = require('../type'); - - -module.exports = new Type('tag:yaml.org,2002:map', { - loader: { - kind: 'object' - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/merge.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/merge.js deleted file mode 100644 index 8facc7080c3c..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/merge.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - - -var NIL = require('../common').NIL; -var Type = require('../type'); - - -function resolveYamlMerge(object /*, explicit*/) { - return '<<' === object ? object : NIL; -} - - -module.exports = new Type('tag:yaml.org,2002:merge', { - loader: { - kind: 'string', - resolver: resolveYamlMerge - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/null.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/null.js deleted file mode 100644 index 796e1af112bd..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/null.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - - -var NIL = require('../common').NIL; -var Type = require('../type'); - - -var YAML_NULL_MAP = { - '~' : true, - 'null' : true, - 'Null' : true, - 'NULL' : true -}; - - -function resolveYamlNull(object /*, explicit*/) { - return YAML_NULL_MAP[object] ? null : NIL; -} - - -module.exports = new Type('tag:yaml.org,2002:null', { - loader: { - kind: 'string', - resolver: resolveYamlNull - }, - dumper: { - kind: 'null', - defaultStyle: 'lowercase', - representer: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; }, - } - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/omap.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/omap.js deleted file mode 100644 index f7c248d4ca09..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/omap.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - - -var NIL = require('../common').NIL; -var Type = require('../type'); - - -var _hasOwnProperty = Object.prototype.hasOwnProperty; -var _toString = Object.prototype.toString; - - -function resolveYamlOmap(object /*, explicit*/) { - var objectKeys = [], index, length, pair, pairKey, pairHasKey; - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - - if ('[object Object]' !== _toString.call(pair)) { - return NIL; - } - - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) { - pairHasKey = true; - } else { - return NIL; - } - } - } - - if (!pairHasKey) { - return NIL; - } - - if (-1 === objectKeys.indexOf(pairKey)) { - objectKeys.push(pairKey); - } else { - return NIL; - } - } - - return object; -} - - -module.exports = new Type('tag:yaml.org,2002:omap', { - loader: { - kind: 'array', - resolver: resolveYamlOmap - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/pairs.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/pairs.js deleted file mode 100644 index 828ff1bb02c9..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/pairs.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - - -var NIL = require('../common').NIL; -var Type = require('../type'); - - -var _toString = Object.prototype.toString; - - -function resolveYamlPairs(object /*, explicit*/) { - var index, length, pair, keys, result; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - if ('[object Object]' !== _toString.call(pair)) { - return NIL; - } - - keys = Object.keys(pair); - - if (1 !== keys.length) { - return NIL; - } - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return result; -} - - -module.exports = new Type('tag:yaml.org,2002:pairs', { - loader: { - kind: 'array', - resolver: resolveYamlPairs - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/seq.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/seq.js deleted file mode 100644 index 80a7cf0fa199..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/seq.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - - -var Type = require('../type'); - - -module.exports = new Type('tag:yaml.org,2002:seq', { - loader: { - kind: 'array' - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/set.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/set.js deleted file mode 100644 index 64bdc6699190..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/set.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - - -var NIL = require('../common').NIL; -var Type = require('../type'); - - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - - -function resolveYamlSet(object /*, explicit*/) { - var key; - - for (key in object) { - if (_hasOwnProperty.call(object, key)) { - if (null !== object[key]) { - return NIL; - } - } - } - - return object; -} - - -module.exports = new Type('tag:yaml.org,2002:set', { - loader: { - kind: 'object', - resolver: resolveYamlSet - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/str.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/str.js deleted file mode 100644 index 384f14e47913..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/str.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - - -var Type = require('../type'); - - -module.exports = new Type('tag:yaml.org,2002:str', { - loader: { - kind: 'string' - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/timestamp.js b/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/timestamp.js deleted file mode 100644 index 24da9e2ed9c4..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - - -var NIL = require('../common').NIL; -var Type = require('../type'); - - -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?)?$'); // [11] tz_minute - - -function resolveYamlTimestamp(object /*, explicit*/) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, data; - - match = YAML_TIMESTAMP_REGEXP.exec(object); - - if (null === match) { - return NIL; - } - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; - } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if ('-' === match[9]) { - delta = -delta; - } - } - - data = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) { - data.setTime(data.getTime() - delta); - } - - return data; -} - - -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); -} - - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - loader: { - kind: 'string', - resolver: resolveYamlTimestamp - }, - dumper: { - kind: 'object', - instanceOf: Date, - representer: representYamlTimestamp - } -}); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esparse b/node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esparse deleted file mode 120000 index 7423b18b24ef..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esparse +++ /dev/null @@ -1 +0,0 @@ -../esprima/bin/esparse.js \ No newline at end of file diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esvalidate b/node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esvalidate deleted file mode 120000 index 16069effbc99..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esvalidate +++ /dev/null @@ -1 +0,0 @@ -../esprima/bin/esvalidate.js \ No newline at end of file diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/HISTORY.md b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/HISTORY.md deleted file mode 100644 index 102f82bf5c28..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/HISTORY.md +++ /dev/null @@ -1,109 +0,0 @@ -0.1.15 / 2013-05-13 -------------------- - -* Fixed #55, @trebor89 - - -0.1.14 / 2013-05-12 -------------------- - -* Fixed #62, @maxtaco - - -0.1.13 / 2013-04-08 -------------------- - -* Added `.npmignore` to reduce package size - - -0.1.12 / 2013-02-10 -------------------- - -* Fixed conflictHandler (#46), @hpaulj - - -0.1.11 / 2013-02-07 -------------------- - -* Multiple bugfixes, @hpaulj -* Added 70+ tests (ported from python), @hpaulj -* Added conflictHandler, @applepicke -* Added fromfilePrefixChar, @hpaulj - - -0.1.10 / 2012-12-30 -------------------- - -* Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) - support, thanks to @hpaulj -* Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj - - -0.1.9 / 2012-12-27 ------------------- - -* Fixed option dest interferens with other options (issue #23), thanks to @hpaulj -* Fixed default value behavior with `*` positionals, thanks to @hpaulj -* Improve `getDefault()` behavior, thanks to @hpaulj -* Imrove negative argument parsing, thanks to @hpaulj - - -0.1.8 / 2012-12-01 ------------------- - -* Fixed parser parents (issue #19), thanks to @hpaulj -* Fixed negative argument parse (issue #20), thanks to @hpaulj - - -0.1.7 / 2012-10-14 ------------------- - -* Fixed 'choices' argument parse (issue #16) -* Fixed stderr output (issue #15) - - -0.1.6 / 2012-09-09 ------------------- - -* Fixed check for conflict of options (thanks to @tomxtobin) - - -0.1.5 / 2012-09-03 ------------------- - -* Fix parser #setDefaults method (thanks to @tomxtobin) - - -0.1.4 / 2012-07-30 ------------------- - -* Fixed pseudo-argument support (thanks to @CGamesPlay) -* Fixed addHelp default (should be true), if not set (thanks to @benblank) - - -0.1.3 / 2012-06-27 ------------------- - -* Fixed formatter api name: Formatter -> HelpFormatter - - -0.1.2 / 2012-05-29 ------------------- - -* Added basic tests -* Removed excess whitespace in help -* Fixed error reporting, when parcer with subcommands - called with empty arguments - - -0.1.1 / 2012-05-23 ------------------- - -* Fixed line wrapping in help formatter -* Added better error reporting on invalid arguments - - -0.1.0 / 2012-05-16 ------------------- - -* First release. diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/LICENSE b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/LICENSE deleted file mode 100644 index 1afdae558405..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2012 by Vitaly Puzrin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/README.md b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/README.md deleted file mode 100644 index f20e0c1f0c2b..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/README.md +++ /dev/null @@ -1,239 +0,0 @@ -argparse -======== - -[![Build Status](https://secure.travis-ci.org/nodeca/argparse.png?branch=master)](http://travis-ci.org/nodeca/argparse) - -CLI arguments parser for node.js. Javascript port of python's -[argparse](http://docs.python.org/dev/library/argparse.html) module -(original version 3.2). That's a full port, except some very rare options, -recorded in issue tracker. - -**NB.** Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/). - - -Example -======= - -test.js file: - -```javascript -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp:true, - description: 'Argparse example' -}); -parser.addArgument( - [ '-f', '--foo' ], - { - help: 'foo bar' - } -); -parser.addArgument( - [ '-b', '--bar' ], - { - help: 'bar foo' - } -); -var args = parser.parseArgs(); -console.dir(args); -``` - -Display help: - -``` -$ ./test.js -h -usage: example.js [-h] [-v] [-f FOO] [-b BAR] - -Argparse example - -Optional arguments: - -h, --help Show this help message and exit. - -v, --version Show program's version number and exit. - -f FOO, --foo FOO foo bar - -b BAR, --bar BAR bar foo -``` - -Parse arguments: - -``` -$ ./test.js -f=3 --bar=4 -{ foo: '3', bar: '4' } -``` - -More [examples](https://github.com/nodeca/argparse/tree/master/examples). - - -ArgumentParser objects -====================== - -``` -new ArgumentParser({paramters hash}); -``` - -Creates a new ArgumentParser object. - -**Supported params:** - -- ```description``` - Text to display before the argument help. -- ```epilog``` - Text to display after the argument help. -- ```addHelp``` - Add a -h/–help option to the parser. (default: True) -- ```argumentDefault``` - Set the global default value for arguments. (default: None) -- ```parents``` - A list of ArgumentParser objects whose arguments should also be included. -- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘) -- ```formatterClass``` - A class for customizing the help output. -- ```prog``` - The name of the program (default: sys.argv[0]) -- ```usage``` - The string describing the program usage (default: generated) -- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals. - -**Not supportied yet** - -- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read. - - -Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects) - - -addArgument() method -==================== - -``` -ArgumentParser.addArgument([names or flags], {options}) -``` - -Defines how a single command-line argument should be parsed. - -- ```name or flags``` - Either a name or a list of option strings, e.g. foo or -f, --foo. - -Options: - -- ```action``` - The basic type of action to be taken when this argument is encountered at the command line. -- ```nargs```- The number of command-line arguments that should be consumed. -- ```constant``` - A constant value required by some action and nargs selections. -- ```defaultValue``` - The value produced if the argument is absent from the command line. -- ```type``` - The type to which the command-line argument should be converted. -- ```choices``` - A container of the allowable values for the argument. -- ```required``` - Whether or not the command-line option may be omitted (optionals only). -- ```help``` - A brief description of what the argument does. -- ```metavar``` - A name for the argument in usage messages. -- ```dest``` - The name of the attribute to be added to the object returned by parseArgs(). - -Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method) - - -Action (some details) -================ - -ArgumentParser objects associate command-line arguments with actions. -These actions can do just about anything with the command-line arguments associated -with them, though most actions simply add an attribute to the object returned by -parseArgs(). The action keyword argument specifies how the command-line arguments -should be handled. The supported actions are: - -- ```store``` - Just stores the argument’s value. This is the default action. -- ```storeConst``` - Stores value, specified by the const keyword argument. - (Note that the const keyword argument defaults to the rather unhelpful None.) - The 'storeConst' action is most commonly used with optional arguments, that - specify some sort of flag. -- ```storeTrue``` and ```storeFalse``` - Stores values True and False - respectively. These are special cases of 'storeConst'. -- ```append``` - Stores a list, and appends each argument value to the list. - This is useful to allow an option to be specified multiple times. -- ```appendConst``` - Stores a list, and appends value, specified by the - const keyword argument to the list. (Note, that the const keyword argument defaults - is None.) The 'appendConst' action is typically used when multiple arguments need - to store constants to the same list. -- ```count``` - Counts the number of times a keyword argument occurs. For example, - used for increasing verbosity levels. -- ```help``` - Prints a complete help message for all the options in the current - parser and then exits. By default a help action is automatically added to the parser. - See ArgumentParser for details of how the output is created. -- ```version``` - Prints version information and exit. Expects a `version=` - keyword argument in the addArgument() call. - -Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action) - - -Sub-commands -============ - -ArgumentParser.addSubparsers() - -Many programs split their functionality into a number of sub-commands, for -example, the svn program can invoke sub-commands like `svn checkout`, `svn update`, -and `svn commit`. Splitting up functionality this way can be a particularly good -idea when a program performs several different functions which require different -kinds of command-line arguments. `ArgumentParser` supports creation of such -sub-commands with `addSubparsers()` method. The `addSubparsers()` method is -normally called with no arguments and returns an special action object. -This object has a single method `addParser()`, which takes a command name and -any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object -that can be modified as usual. - -Example: - -sub_commands.js -```javascript -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp:true, - description: 'Argparse examples: sub-commands', -}); - -var subparsers = parser.addSubparsers({ - title:'subcommands', - dest:"subcommand_name" -}); - -var bar = subparsers.addParser('c1', {addHelp:true}); -bar.addArgument( - [ '-f', '--foo' ], - { - action: 'store', - help: 'foo3 bar3' - } -); -var bar = subparsers.addParser( - 'c2', - {aliases:['co'], addHelp:true} -); -bar.addArgument( - [ '-b', '--bar' ], - { - action: 'store', - type: 'int', - help: 'foo3 bar3' - } -); - -var args = parser.parseArgs(); -console.dir(args); - -``` - -Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands) - - -Contributors -============ - -- [Eugene Shkuropat](https://github.com/shkuropat) -- [Paul Jacobson](https://github.com/hpaulj) - -[others](https://github.com/nodeca/argparse/graphs/contributors) - -License -======= - -Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin). -Released under the MIT license. See -[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details. - - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/arguments.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/arguments.js deleted file mode 100755 index 5b090fa2e118..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/arguments.js +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: arguments' -}); -parser.addArgument( - [ '-f', '--foo' ], - { - help: 'foo bar' - } -); -parser.addArgument( - [ '-b', '--bar' ], - { - help: 'bar foo' - } -); - - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs('-f 1 -b2'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('-f=3 --bar=4'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('--foo 5 --bar 6'.split(' ')); -console.dir(args); -console.log('-----------'); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js deleted file mode 100755 index 2616fa4d7527..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: choice' -}); - -parser.addArgument(['foo'], {choices: 'abc'}); - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs(['c']); -console.dir(args); -console.log('-----------'); -parser.parseArgs(['X']); -console.dir(args); - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/constants.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/constants.js deleted file mode 100755 index 172a4f3d4f62..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/constants.js +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: constant' -}); - -parser.addArgument( - [ '-a'], - { - action: 'storeConst', - dest: 'answer', - help: 'store constant', - constant: 42 - } -); -parser.addArgument( - [ '--str' ], - { - action: 'appendConst', - dest: 'types', - help: 'append constant "str" to types', - constant: 'str' - } -); -parser.addArgument( - [ '--int' ], - { - action: 'appendConst', - dest: 'types', - help: 'append constant "int" to types', - constant: 'int' - } -); - -parser.addArgument( - [ '--true' ], - { - action: 'storeTrue', - help: 'store true constant' - } -); -parser.addArgument( - [ '--false' ], - { - action: 'storeFalse', - help: 'store false constant' - } -); - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs('-a --str --int --true'.split(' ')); -console.dir(args); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/help.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/help.js deleted file mode 100755 index 7eb955534fe2..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/help.js +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: help', - epilog: 'help epilog', - prog: 'help_example_prog', - usage: 'Usage %(prog)s ' -}); -parser.printHelp(); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/nargs.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/nargs.js deleted file mode 100755 index 74f376beba4a..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/nargs.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: nargs' -}); -parser.addArgument( - [ '-f', '--foo' ], - { - help: 'foo bar', - nargs: 1 - } -); -parser.addArgument( - [ '-b', '--bar' ], - { - help: 'bar foo', - nargs: '*' - } -); - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs('--foo a --bar c d'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('--bar b c f --foo a'.split(' ')); -console.dir(args); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/parents.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/parents.js deleted file mode 100755 index dfe896868bd0..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/parents.js +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; - -var args; -var parent_parser = new ArgumentParser({ addHelp: false }); -// note addHelp:false to prevent duplication of the -h option -parent_parser.addArgument( - ['--parent'], - { type: 'int', description: 'parent' } -); - -var foo_parser = new ArgumentParser({ - parents: [ parent_parser ], - description: 'child1' -}); -foo_parser.addArgument(['foo']); -args = foo_parser.parseArgs(['--parent', '2', 'XXX']); -console.log(args); - -var bar_parser = new ArgumentParser({ - parents: [ parent_parser ], - description: 'child2' -}); -bar_parser.addArgument(['--bar']); -args = bar_parser.parseArgs(['--bar', 'YYY']); -console.log(args); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js deleted file mode 100755 index 430d5e182346..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: prefix_chars', - prefixChars: '-+' -}); -parser.addArgument(['+f', '++foo']); -parser.addArgument(['++bar'], {action: 'storeTrue'}); - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs(['+f', '1']); -console.dir(args); -args = parser.parseArgs(['++bar']); -console.dir(args); -args = parser.parseArgs(['++foo', '2', '++bar']); -console.dir(args); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js deleted file mode 100755 index df9c494440be..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: sub-commands' -}); - -var subparsers = parser.addSubparsers({ - title: 'subcommands', - dest: "subcommand_name" -}); - -var bar = subparsers.addParser('c1', {addHelp: true, help: 'c1 help'}); -bar.addArgument( - [ '-f', '--foo' ], - { - action: 'store', - help: 'foo3 bar3' - } -); -var bar = subparsers.addParser( - 'c2', - {aliases: ['co'], addHelp: true, help: 'c2 help'} -); -bar.addArgument( - [ '-b', '--bar' ], - { - action: 'store', - type: 'int', - help: 'foo3 bar3' - } -); -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs('c1 -f 2'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('c2 -b 1'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('co -b 1'.split(' ')); -console.dir(args); -console.log('-----------'); -parser.parseArgs(['c1', '-h']); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sum.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sum.js deleted file mode 100755 index 4532800a50d3..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sum.js +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ description: 'Process some integers.' }); - - -function sum(arr) { - return arr.reduce(function (a, b) { - return a + b; - }, 0); -} -function max(arr) { - return Math.max.apply(Math, arr); -} - - -parser.addArgument(['integers'], { - metavar: 'N', - type: 'int', - nargs: '+', - help: 'an integer for the accumulator' -}); -parser.addArgument(['--sum'], { - dest: 'accumulate', - action: 'storeConst', - constant: sum, - defaultValue: max, - help: 'sum the integers (default: find the max)' -}); - -var args = parser.parseArgs('--sum 1 2 -1'.split(' ')); -console.log(args.accumulate(args.integers)); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js deleted file mode 100644 index afb4a2d68150..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js +++ /dev/null @@ -1,270 +0,0 @@ -'use strict'; - -var a, group, parser, helptext; - -var assert = require('assert'); -var _ = require('underscore'); -_.str = require('underscore.string'); -var print = function () { - return console.log.apply(console, arguments); - }; -// print = function () {}; - -var argparse = require('argparse'); - -print("TEST argparse.ArgumentDefaultsHelpFormatter"); - -parser = new argparse.ArgumentParser({ - debug: true, - formatterClass: argparse.ArgumentDefaultsHelpFormatter, - description: 'description' -}); - -parser.addArgument(['--foo'], { - help: 'foo help - oh and by the way, %(defaultValue)s' -}); - -parser.addArgument(['--bar'], { - action: 'storeTrue', - help: 'bar help' -}); - -parser.addArgument(['spam'], { - help: 'spam help' -}); - -parser.addArgument(['badger'], { - nargs: '?', - defaultValue: 'wooden', - help: 'badger help' -}); - -group = parser.addArgumentGroup({ - title: 'title', - description: 'group description' -}); - -group.addArgument(['--baz'], { - type: 'int', - defaultValue: 42, - help: 'baz help' -}); - -helptext = parser.formatHelp(); -print(helptext); -// test selected clips -assert(helptext.match(/badger help \(default: wooden\)/)); -assert(helptext.match(/foo help - oh and by the way, null/)); -assert(helptext.match(/bar help \(default: false\)/)); -assert(helptext.match(/title:\n {2}group description/)); // test indent -assert(helptext.match(/baz help \(default: 42\)/im)); - -/* -usage: PROG [-h] [--foo FOO] [--bar] [--baz BAZ] spam [badger] - -description - -positional arguments: - spam spam help - badger badger help (default: wooden) - -optional arguments: - -h, --help show this help message and exit - --foo FOO foo help - oh and by the way, null - --bar bar help (default: false) - -title: - group description - - --baz BAZ baz help (default: 42) -*/ - -print("TEST argparse.RawDescriptionHelpFormatter"); - -parser = new argparse.ArgumentParser({ - debug: true, - prog: 'PROG', - formatterClass: argparse.RawDescriptionHelpFormatter, - description: 'Keep the formatting\n' + - ' exactly as it is written\n' + - '\n' + - 'here\n' -}); - -a = parser.addArgument(['--foo'], { - help: ' foo help should not\n' + - ' retain this odd formatting' -}); - -parser.addArgument(['spam'], { - 'help': 'spam help' -}); - -group = parser.addArgumentGroup({ - title: 'title', - description: ' This text\n' + - ' should be indented\n' + - ' exactly like it is here\n' -}); - -group.addArgument(['--bar'], { - help: 'bar help' -}); - -helptext = parser.formatHelp(); -print(helptext); -// test selected clips -assert(helptext.match(parser.description)); -assert.equal(helptext.match(a.help), null); -assert(helptext.match(/foo help should not retain this odd formatting/)); - -/* -class TestHelpRawDescription(HelpTestCase): - """Test the RawTextHelpFormatter""" -.... - -usage: PROG [-h] [--foo FOO] [--bar BAR] spam - -Keep the formatting - exactly as it is written - -here - -positional arguments: - spam spam help - -optional arguments: - -h, --help show this help message and exit - --foo FOO foo help should not retain this odd formatting - -title: - This text - should be indented - exactly like it is here - - --bar BAR bar help -*/ - - -print("TEST argparse.RawTextHelpFormatter"); - -parser = new argparse.ArgumentParser({ - debug: true, - prog: 'PROG', - formatterClass: argparse.RawTextHelpFormatter, - description: 'Keep the formatting\n' + - ' exactly as it is written\n' + - '\n' + - 'here\n' -}); - -parser.addArgument(['--baz'], { - help: ' baz help should also\n' + - 'appear as given here' -}); - -a = parser.addArgument(['--foo'], { - help: ' foo help should also\n' + - 'appear as given here' -}); - -parser.addArgument(['spam'], { - 'help': 'spam help' -}); - -group = parser.addArgumentGroup({ - title: 'title', - description: ' This text\n' + - ' should be indented\n' + - ' exactly like it is here\n' -}); - -group.addArgument(['--bar'], { - help: 'bar help' -}); - -helptext = parser.formatHelp(); -print(helptext); -// test selected clips -assert(helptext.match(parser.description)); -assert(helptext.match(/( {14})appear as given here/gm)); - -/* -class TestHelpRawText(HelpTestCase): - """Test the RawTextHelpFormatter""" - -usage: PROG [-h] [--foo FOO] [--bar BAR] spam - -Keep the formatting - exactly as it is written - -here - -positional arguments: - spam spam help - -optional arguments: - -h, --help show this help message and exit - --foo FOO foo help should also - appear as given here - -title: - This text - should be indented - exactly like it is here - - --bar BAR bar help -*/ - - -print("TEST metavar as a tuple"); - -parser = new argparse.ArgumentParser({ - prog: 'PROG' -}); - -parser.addArgument(['-w'], { - help: 'w', - nargs: '+', - metavar: ['W1', 'W2'] -}); - -parser.addArgument(['-x'], { - help: 'x', - nargs: '*', - metavar: ['X1', 'X2'] -}); - -parser.addArgument(['-y'], { - help: 'y', - nargs: 3, - metavar: ['Y1', 'Y2', 'Y3'] -}); - -parser.addArgument(['-z'], { - help: 'z', - nargs: '?', - metavar: ['Z1'] -}); - -helptext = parser.formatHelp(); -print(helptext); -var ustring = 'PROG [-h] [-w W1 [W2 ...]] [-x [X1 [X2 ...]]] [-y Y1 Y2 Y3] [-z [Z1]]'; -ustring = ustring.replace(/\[/g, '\\[').replace(/\]/g, '\\]'); -// print(ustring) -assert(helptext.match(new RegExp(ustring))); - -/* -class TestHelpTupleMetavar(HelpTestCase): - """Test specifying metavar as a tuple""" - -usage: PROG [-h] [-w W1 [W2 ...]] [-x [X1 [X2 ...]]] [-y Y1 Y2 Y3] [-z [Z1]] - -optional arguments: - -h, --help show this help message and exit - -w W1 [W2 ...] w - -x [X1 [X2 ...]] x - -y Y1 Y2 Y3 y - -z [Z1] z -*/ - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/index.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/index.js deleted file mode 100644 index 3b6eea0138b8..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/argparse'); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action.js deleted file mode 100644 index 6f7e9a56ccc6..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action.js +++ /dev/null @@ -1,146 +0,0 @@ -/** - * class Action - * - * Base class for all actions - * Do not call in your code, use this class only for inherits your own action - * - * Information about how to convert command line strings to Javascript objects. - * Action objects are used by an ArgumentParser to represent the information - * needed to parse a single argument from one or more strings from the command - * line. The keyword arguments to the Action constructor are also all attributes - * of Action instances. - * - * #####Alowed keywords: - * - * - `store` - * - `storeConstant` - * - `storeTrue` - * - `storeFalse` - * - `append` - * - `appendConstant` - * - `count` - * - `help` - * - `version` - * - * Information about action options see [[Action.new]] - * - * See also [original guide](http://docs.python.org/dev/library/argparse.html#action) - * - **/ - -'use strict'; - - -// Constants -var $$ = require('./const'); - - -/** - * new Action(options) - * - * Base class for all actions. Used only for inherits - * - * - * ##### Options: - * - * - `optionStrings` A list of command-line option strings for the action. - * - `dest` Attribute to hold the created object(s) - * - `nargs` The number of command-line arguments that should be consumed. - * By default, one argument will be consumed and a single value will be - * produced. - * - `constant` Default value for an action with no value. - * - `defaultValue` The value to be produced if the option is not specified. - * - `type` Cast to 'string'|'int'|'float'|'complex'|function (string). If - * None, 'string'. - * - `choices` The choices available. - * - `required` True if the action must always be specified at the command - * line. - * - `help` The help describing the argument. - * - `metavar` The name to be used for the option's argument with the help - * string. If None, the 'dest' value will be used as the name. - * - * ##### nargs supported values: - * - * - `N` (an integer) consumes N arguments (and produces a list) - * - `?` consumes zero or one arguments - * - `*` consumes zero or more arguments (and produces a list) - * - `+` consumes one or more arguments (and produces a list) - * - * Note: that the difference between the default and nargs=1 is that with the - * default, a single value will be produced, while with nargs=1, a list - * containing a single value will be produced. - **/ -var Action = module.exports = function Action(options) { - options = options || {}; - this.optionStrings = options.optionStrings || []; - this.dest = options.dest; - this.nargs = options.nargs !== undefined ? options.nargs : null; - this.constant = options.constant !== undefined ? options.constant : null; - this.defaultValue = options.defaultValue; - this.type = options.type !== undefined ? options.type : null; - this.choices = options.choices !== undefined ? options.choices : null; - this.required = options.required !== undefined ? options.required: false; - this.help = options.help !== undefined ? options.help : null; - this.metavar = options.metavar !== undefined ? options.metavar : null; - - if (!(this.optionStrings instanceof Array)) { - throw new Error('optionStrings should be an array'); - } - if (this.required !== undefined && typeof(this.required) !== 'boolean') { - throw new Error('required should be a boolean'); - } -}; - -/** - * Action#getName -> String - * - * Tells action name - **/ -Action.prototype.getName = function () { - if (this.optionStrings.length > 0) { - return this.optionStrings.join('/'); - } else if (this.metavar !== null && this.metavar !== $$.SUPPRESS) { - return this.metavar; - } else if (this.dest !== undefined && this.dest !== $$.SUPPRESS) { - return this.dest; - } - return null; -}; - -/** - * Action#isOptional -> Boolean - * - * Return true if optional - **/ -Action.prototype.isOptional = function () { - return !this.isPositional(); -}; - -/** - * Action#isPositional -> Boolean - * - * Return true if positional - **/ -Action.prototype.isPositional = function () { - return (this.optionStrings.length === 0); -}; - -/** - * Action#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Should be implemented in inherited classes - * - * ##### Example - * - * ActionCount.prototype.call = function (parser, namespace, values, optionString) { - * namespace.set(this.dest, (namespace[this.dest] || 0) + 1); - * }; - * - **/ -Action.prototype.call = function () { - throw new Error('.call() not defined');// Not Implemented error -}; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append.js deleted file mode 100644 index 48c6dbe30de5..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append.js +++ /dev/null @@ -1,55 +0,0 @@ -/*:nodoc:* - * class ActionAppend - * - * This action stores a list, and appends each argument value to the list. - * This is useful to allow an option to be specified multiple times. - * This class inherided from [[Action]] - * - **/ - -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -// Constants -var $$ = require('../const'); - -/*:nodoc:* - * new ActionAppend(options) - * - options (object): options hash see [[Action.new]] - * - * Note: options.nargs should be optional for constants - * and more then zero for other - **/ -var ActionAppend = module.exports = function ActionAppend(options) { - options = options || {}; - if (this.nargs <= 0) { - throw new Error('nargs for append actions must be > 0; if arg ' + - 'strings are not supplying the value to append, ' + - 'the append const action may be more appropriate'); - } - if (!!this.constant && this.nargs !== $$.OPTIONAL) { - throw new Error('nargs must be OPTIONAL to supply const'); - } - Action.call(this, options); -}; -util.inherits(ActionAppend, Action); - -/*:nodoc:* - * ActionAppend#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionAppend.prototype.call = function (parser, namespace, values) { - var items = [].concat(namespace[this.dest] || []); // or _.clone - items.push(values); - namespace.set(this.dest, items); -}; - - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js deleted file mode 100644 index 90747abbf611..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js +++ /dev/null @@ -1,47 +0,0 @@ -/*:nodoc:* - * class ActionAppendConstant - * - * This stores a list, and appends the value specified by - * the const keyword argument to the list. - * (Note that the const keyword argument defaults to null.) - * The 'appendConst' action is typically useful when multiple - * arguments need to store constants to the same list. - * - * This class inherited from [[Action]] - **/ - -'use strict'; - -var util = require('util'); - -var Action = require('../../action'); - -/*:nodoc:* - * new ActionAppendConstant(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionAppendConstant = module.exports = function ActionAppendConstant(options) { - options = options || {}; - options.nargs = 0; - if (options.constant === undefined) { - throw new Error('constant option is required for appendAction'); - } - Action.call(this, options); -}; -util.inherits(ActionAppendConstant, Action); - -/*:nodoc:* - * ActionAppendConstant#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionAppendConstant.prototype.call = function (parser, namespace) { - var items = [].concat(namespace[this.dest] || []); - items.push(this.constant); - namespace.set(this.dest, items); -}; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/count.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/count.js deleted file mode 100644 index d6a5899d07ef..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/count.js +++ /dev/null @@ -1,40 +0,0 @@ -/*:nodoc:* - * class ActionCount - * - * This counts the number of times a keyword argument occurs. - * For example, this is useful for increasing verbosity levels - * - * This class inherided from [[Action]] - * - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -/*:nodoc:* - * new ActionCount(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionCount = module.exports = function ActionCount(options) { - options = options || {}; - options.nargs = 0; - - Action.call(this, options); -}; -util.inherits(ActionCount, Action); - -/*:nodoc:* - * ActionCount#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionCount.prototype.call = function (parser, namespace) { - namespace.set(this.dest, (namespace[this.dest] || 0) + 1); -}; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/help.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/help.js deleted file mode 100644 index 7f7b4e2d2121..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/help.js +++ /dev/null @@ -1,48 +0,0 @@ -/*:nodoc:* - * class ActionHelp - * - * Support action for printing help - * This class inherided from [[Action]] - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -// Constants -var $$ = require('../const'); - -/*:nodoc:* - * new ActionHelp(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionHelp = module.exports = function ActionHelp(options) { - options = options || {}; - if (options.defaultValue !== null) { - options.defaultValue = options.defaultValue; - } - else { - options.defaultValue = $$.SUPPRESS; - } - options.dest = (options.dest !== null ? options.dest: $$.SUPPRESS); - options.nargs = 0; - Action.call(this, options); - -}; -util.inherits(ActionHelp, Action); - -/*:nodoc:* - * ActionHelp#call(parser, namespace, values, optionString) - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Print help and exit - **/ -ActionHelp.prototype.call = function (parser) { - parser.printHelp(); - parser.exit(); -}; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store.js deleted file mode 100644 index 8ebc9748b691..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store.js +++ /dev/null @@ -1,50 +0,0 @@ -/*:nodoc:* - * class ActionStore - * - * This action just stores the argument’s value. This is the default action. - * - * This class inherited from [[Action]] - * - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -// Constants -var $$ = require('../const'); - - -/*:nodoc:* - * new ActionStore(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionStore = module.exports = function ActionStore(options) { - options = options || {}; - if (this.nargs <= 0) { - throw new Error('nargs for store actions must be > 0; if you ' + - 'have nothing to store, actions such as store ' + - 'true or store const may be more appropriate'); - - } - if (this.constant !== undefined && this.nargs !== $$.OPTIONAL) { - throw new Error('nargs must be OPTIONAL to supply const'); - } - Action.call(this, options); -}; -util.inherits(ActionStore, Action); - -/*:nodoc:* - * ActionStore#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionStore.prototype.call = function (parser, namespace, values) { - namespace.set(this.dest, values); -}; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js deleted file mode 100644 index 8410fcf784c6..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js +++ /dev/null @@ -1,43 +0,0 @@ -/*:nodoc:* - * class ActionStoreConstant - * - * This action stores the value specified by the const keyword argument. - * (Note that the const keyword argument defaults to the rather unhelpful null.) - * The 'store_const' action is most commonly used with optional - * arguments that specify some sort of flag. - * - * This class inherited from [[Action]] - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../../action'); - -/*:nodoc:* - * new ActionStoreConstant(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionStoreConstant = module.exports = function ActionStoreConstant(options) { - options = options || {}; - options.nargs = 0; - if (options.constant === undefined) { - throw new Error('constant option is required for storeAction'); - } - Action.call(this, options); -}; -util.inherits(ActionStoreConstant, Action); - -/*:nodoc:* - * ActionStoreConstant#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionStoreConstant.prototype.call = function (parser, namespace) { - namespace.set(this.dest, this.constant); -}; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js deleted file mode 100644 index 66417bf6d8f0..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js +++ /dev/null @@ -1,27 +0,0 @@ -/*:nodoc:* - * class ActionStoreFalse - * - * This action store the values False respectively. - * This is special cases of 'storeConst' - * - * This class inherited from [[Action]] - **/ - -'use strict'; - -var util = require('util'); - -var ActionStoreConstant = require('./constant'); - -/*:nodoc:* - * new ActionStoreFalse(options) - * - options (object): hash of options see [[Action.new]] - * - **/ -var ActionStoreFalse = module.exports = function ActionStoreFalse(options) { - options = options || {}; - options.constant = false; - options.defaultValue = options.defaultValue !== null ? options.defaultValue: true; - ActionStoreConstant.call(this, options); -}; -util.inherits(ActionStoreFalse, ActionStoreConstant); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js deleted file mode 100644 index 43ec7086f629..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js +++ /dev/null @@ -1,26 +0,0 @@ -/*:nodoc:* - * class ActionStoreTrue - * - * This action store the values True respectively. - * This isspecial cases of 'storeConst' - * - * This class inherited from [[Action]] - **/ -'use strict'; - -var util = require('util'); - -var ActionStoreConstant = require('./constant'); - -/*:nodoc:* - * new ActionStoreTrue(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionStoreTrue = module.exports = function ActionStoreTrue(options) { - options = options || {}; - options.constant = true; - options.defaultValue = options.defaultValue !== null ? options.defaultValue: false; - ActionStoreConstant.call(this, options); -}; -util.inherits(ActionStoreTrue, ActionStoreConstant); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js deleted file mode 100644 index adecf654a96e..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js +++ /dev/null @@ -1,148 +0,0 @@ -/** internal - * class ActionSubparsers - * - * Support the creation of such sub-commands with the addSubparsers() - * - * This class inherited from [[Action]] - **/ -'use strict'; - -var util = require('util'); -var format = require('util').format; -var _ = require('underscore'); - - -var Action = require('../action'); - -// Constants -var $$ = require('../const'); - -// Errors -var argumentErrorHelper = require('../argument/error'); - - -/*:nodoc:* - * new ChoicesPseudoAction(name, help) - * - * Create pseudo action for correct help text - * - **/ -var ChoicesPseudoAction = function (name, help) { - var options = { - optionStrings: [], - dest: name, - help: help - }; - - Action.call(this, options); -}; -util.inherits(ChoicesPseudoAction, Action); - -/** - * new ActionSubparsers(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionSubparsers = module.exports = function ActionSubparsers(options) { - options = options || {}; - options.dest = options.dest || $$.SUPPRESS; - options.nargs = $$.PARSER; - - this.debug = (options.debug === true); - - this._progPrefix = options.prog; - this._parserClass = options.parserClass; - this._nameParserMap = {}; - this._choicesActions = []; - - options.choices = this._nameParserMap; - Action.call(this, options); -}; -util.inherits(ActionSubparsers, Action); - -/*:nodoc:* - * ActionSubparsers#addParser(name, options) -> ArgumentParser - * - name (string): sub-command name - * - options (object): see [[ArgumentParser.new]] - * - * Note: - * addParser supports an additional aliases option, - * which allows multiple strings to refer to the same subparser. - * This example, like svn, aliases co as a shorthand for checkout - * - **/ -ActionSubparsers.prototype.addParser = function (name, options) { - var parser; - - var self = this; - - options = options || {}; - - options.debug = (this.debug === true); - - // set program from the existing prefix - if (!options.prog) { - options.prog = this._progPrefix + ' ' + name; - } - - var aliases = options.aliases || []; - - // create a pseudo-action to hold the choice help - if (!!options.help || _.isString(options.help)) { - var help = options.help; - delete options.help; - - var choiceAction = new ChoicesPseudoAction(name, help); - this._choicesActions.push(choiceAction); - } - - // create the parser and add it to the map - parser = new this._parserClass(options); - this._nameParserMap[name] = parser; - - // make parser available under aliases also - aliases.forEach(function (alias) { - self._nameParserMap[alias] = parser; - }); - - return parser; -}; - -ActionSubparsers.prototype._getSubactions = function () { - return this._choicesActions; -}; - -/*:nodoc:* - * ActionSubparsers#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Parse input aguments - **/ -ActionSubparsers.prototype.call = function (parser, namespace, values) { - var parserName = values[0]; - var argStrings = values.slice(1); - - // set the parser name if requested - if (this.dest !== $$.SUPPRESS) { - namespace[this.dest] = parserName; - } - - // select the parser - if (!!this._nameParserMap[parserName]) { - parser = this._nameParserMap[parserName]; - } else { - throw argumentErrorHelper(format( - 'Unknown parser "%s" (choices: [%s]).', - parserName, - _.keys(this._nameParserMap).join(', ') - )); - } - - // parse all the remaining options into the namespace - parser.parseArgs(argStrings, namespace); -}; - - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/version.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/version.js deleted file mode 100644 index a17877c0bacc..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/version.js +++ /dev/null @@ -1,50 +0,0 @@ -/*:nodoc:* - * class ActionVersion - * - * Support action for printing program version - * This class inherited from [[Action]] - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -// -// Constants -// -var $$ = require('../const'); - -/*:nodoc:* - * new ActionVersion(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionVersion = module.exports = function ActionVersion(options) { - options = options || {}; - options.defaultValue = (!!options.defaultValue ? options.defaultValue: $$.SUPPRESS); - options.dest = (options.dest || $$.SUPPRESS); - options.nargs = 0; - this.version = options.version; - Action.call(this, options); -}; -util.inherits(ActionVersion, Action); - -/*:nodoc:* - * ActionVersion#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Print version and exit - **/ -ActionVersion.prototype.call = function (parser) { - var version = this.version || parser.version; - var formatter = parser._getFormatter(); - formatter.addText(version); - parser.exit(0, formatter.formatHelp()); -}; - - - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action_container.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action_container.js deleted file mode 100644 index dbe3e3c46abd..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action_container.js +++ /dev/null @@ -1,481 +0,0 @@ -/** internal - * class ActionContainer - * - * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] - **/ - -'use strict'; - -var format = require('util').format; -var _ = require('underscore'); - -_.str = require('underscore.string'); - -// Constants -var $$ = require('./const'); - -//Actions -var ActionHelp = require('./action/help'); -var ActionAppend = require('./action/append'); -var ActionAppendConstant = require('./action/append/constant'); -var ActionCount = require('./action/count'); -var ActionStore = require('./action/store'); -var ActionStoreConstant = require('./action/store/constant'); -var ActionStoreTrue = require('./action/store/true'); -var ActionStoreFalse = require('./action/store/false'); -var ActionVersion = require('./action/version'); -var ActionSubparsers = require('./action/subparsers'); - -// Errors -var argumentErrorHelper = require('./argument/error'); - - - -/** - * new ActionContainer(options) - * - * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] - * - * ##### Options: - * - * - `description` -- A description of what the program does - * - `prefixChars` -- Characters that prefix optional arguments - * - `argumentDefault` -- The default value for all arguments - * - `conflictHandler` -- The conflict handler to use for duplicate arguments - **/ -var ActionContainer = module.exports = function ActionContainer(options) { - options = options || {}; - - this.description = options.description; - this.argumentDefault = options.argumentDefault; - this.prefixChars = options.prefixChars || ''; - this.conflictHandler = options.conflictHandler; - - // set up registries - this._registries = {}; - - // register actions - this.register('action', null, ActionStore); - this.register('action', 'store', ActionStore); - this.register('action', 'storeConst', ActionStoreConstant); - this.register('action', 'storeTrue', ActionStoreTrue); - this.register('action', 'storeFalse', ActionStoreFalse); - this.register('action', 'append', ActionAppend); - this.register('action', 'appendConst', ActionAppendConstant); - this.register('action', 'count', ActionCount); - this.register('action', 'help', ActionHelp); - this.register('action', 'version', ActionVersion); - this.register('action', 'parsers', ActionSubparsers); - - // raise an exception if the conflict handler is invalid - this._getHandler(); - - // action storage - this._actions = []; - this._optionStringActions = {}; - - // groups - this._actionGroups = []; - this._mutuallyExclusiveGroups = []; - - // defaults storage - this._defaults = {}; - - // determines whether an "option" looks like a negative number - // -1, -1.5 -5e+4 - this._regexpNegativeNumber = new RegExp('^[-]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$'); - - // whether or not there are any optionals that look like negative - // numbers -- uses a list so it can be shared and edited - this._hasNegativeNumberOptionals = []; -}; - -// Groups must be required, then ActionContainer already defined -var ArgumentGroup = require('./argument/group'); -var MutuallyExclusiveGroup = require('./argument/exclusive'); - -// -// Registration methods -// - -/** - * ActionContainer#register(registryName, value, object) -> Void - * - registryName (String) : object type action|type - * - value (string) : keyword - * - object (Object|Function) : handler - * - * Register handlers - **/ -ActionContainer.prototype.register = function (registryName, value, object) { - this._registries[registryName] = this._registries[registryName] || {}; - this._registries[registryName][value] = object; -}; - -ActionContainer.prototype._registryGet = function (registryName, value, defaultValue) { - if (3 > arguments.length) { - defaultValue = null; - } - return this._registries[registryName][value] || defaultValue; -}; - -// -// Namespace default accessor methods -// - -/** - * ActionContainer#setDefaults(options) -> Void - * - options (object):hash of options see [[Action.new]] - * - * Set defaults - **/ -ActionContainer.prototype.setDefaults = function (options) { - options = options || {}; - for (var property in options) { - this._defaults[property] = options[property]; - } - - // if these defaults match any existing arguments, replace the previous - // default on the object with the new one - this._actions.forEach(function (action) { - if (action.dest in options) { - action.defaultValue = options[action.dest]; - } - }); -}; - -/** - * ActionContainer#getDefault(dest) -> Mixed - * - dest (string): action destination - * - * Return action default value - **/ -ActionContainer.prototype.getDefault = function (dest) { - var result = (_.has(this._defaults, dest)) ? this._defaults[dest] : null; - - this._actions.forEach(function (action) { - if (action.dest === dest && _.has(action, 'defaultValue')) { - result = action.defaultValue; - } - }); - - return result; -}; -// -// Adding argument actions -// - -/** - * ActionContainer#addArgument(args, options) -> Object - * - args (Array): array of argument keys - * - options (Object): action objects see [[Action.new]] - * - * #### Examples - * - addArgument([-f, --foo], {action:'store', defaultValue=1, ...}) - * - addArgument(['bar'], action: 'store', nargs:1, ...}) - **/ -ActionContainer.prototype.addArgument = function (args, options) { - args = args; - options = options || {}; - - if (!_.isArray(args)) { - throw new TypeError('addArgument first argument should be an array'); - } - if (!_.isObject(options) || _.isArray(options)) { - throw new TypeError('addArgument second argument should be a hash'); - } - - // if no positional args are supplied or only one is supplied and - // it doesn't look like an option string, parse a positional argument - if (!args || args.length === 1 && this.prefixChars.indexOf(args[0][0]) < 0) { - if (args && !!options.dest) { - throw new Error('dest supplied twice for positional argument'); - } - options = this._getPositional(args, options); - - // otherwise, we're adding an optional argument - } else { - options = this._getOptional(args, options); - } - - // if no default was supplied, use the parser-level default - if (_.isUndefined(options.defaultValue)) { - var dest = options.dest; - if (_.has(this._defaults, dest)) { - options.defaultValue = this._defaults[dest]; - } else if (!_.isUndefined(this.argumentDefault)) { - options.defaultValue = this.argumentDefault; - } - } - - // create the action object, and add it to the parser - var ActionClass = this._popActionClass(options); - if (! _.isFunction(ActionClass)) { - throw new Error(format('Unknown action "%s".', ActionClass)); - } - var action = new ActionClass(options); - - // throw an error if the action type is not callable - var typeFunction = this._registryGet('type', action.type, action.type); - if (!_.isFunction(typeFunction)) { - throw new Error(format('"%s" is not callable', typeFunction)); - } - - return this._addAction(action); -}; - -/** - * ActionContainer#addArgumentGroup(options) -> ArgumentGroup - * - options (Object): hash of options see [[ArgumentGroup.new]] - * - * Create new arguments groups - **/ -ActionContainer.prototype.addArgumentGroup = function (options) { - var group = new ArgumentGroup(this, options); - this._actionGroups.push(group); - return group; -}; - -/** - * ActionContainer#addMutuallyExclusiveGroup(options) -> ArgumentGroup - * - options (Object): {required: false} - * - * Create new mutual exclusive groups - **/ -ActionContainer.prototype.addMutuallyExclusiveGroup = function (options) { - var group = new MutuallyExclusiveGroup(this, options); - this._mutuallyExclusiveGroups.push(group); - return group; -}; - -ActionContainer.prototype._addAction = function (action) { - var self = this; - - // resolve any conflicts - this._checkConflict(action); - - // add to actions list - this._actions.push(action); - action.container = this; - - // index the action by any option strings it has - action.optionStrings.forEach(function (optionString) { - self._optionStringActions[optionString] = action; - }); - - // set the flag if any option strings look like negative numbers - action.optionStrings.forEach(function (optionString) { - if (optionString.match(self._regexpNegativeNumber)) { - if (!_.any(self._hasNegativeNumberOptionals)) { - self._hasNegativeNumberOptionals.push(true); - } - } - }); - - // return the created action - return action; -}; - -ActionContainer.prototype._removeAction = function (action) { - var actionIndex = this._actions.indexOf(action); - if (actionIndex >= 0) { - this._actions.splice(actionIndex, 1); - } -}; - -ActionContainer.prototype._addContainerActions = function (container) { - // collect groups by titles - var titleGroupMap = {}; - this._actionGroups.forEach(function (group) { - if (titleGroupMap[group.title]) { - throw new Error(format('Cannot merge actions - two groups are named "%s".', group.title)); - } - titleGroupMap[group.title] = group; - }); - - // map each action to its group - var groupMap = {}; - function actionHash(action) { - // unique (hopefully?) string suitable as dictionary key - return action.getName(); - } - container._actionGroups.forEach(function (group) { - // if a group with the title exists, use that, otherwise - // create a new group matching the container's group - if (!titleGroupMap[group.title]) { - titleGroupMap[group.title] = this.addArgumentGroup({ - title: group.title, - description: group.description - }); - } - - // map the actions to their new group - group._groupActions.forEach(function (action) { - groupMap[actionHash(action)] = titleGroupMap[group.title]; - }); - }, this); - - // add container's mutually exclusive groups - // NOTE: if add_mutually_exclusive_group ever gains title= and - // description= then this code will need to be expanded as above - var mutexGroup; - container._mutuallyExclusiveGroups.forEach(function (group) { - mutexGroup = this.addMutuallyExclusiveGroup({ - required: group.required - }); - // map the actions to their new mutex group - group._groupActions.forEach(function (action) { - groupMap[actionHash(action)] = mutexGroup; - }); - }, this); // forEach takes a 'this' argument - - // add all actions to this container or their group - container._actions.forEach(function (action) { - var key = actionHash(action); - if (!!groupMap[key]) { - groupMap[key]._addAction(action); - } - else - { - this._addAction(action); - } - }); -}; - -ActionContainer.prototype._getPositional = function (dest, options) { - if (_.isArray(dest)) { - dest = _.first(dest); - } - // make sure required is not specified - if (options.required) { - throw new Error('"required" is an invalid argument for positionals.'); - } - - // mark positional arguments as required if at least one is - // always required - if (options.nargs !== $$.OPTIONAL && options.nargs !== $$.ZERO_OR_MORE) { - options.required = true; - } - if (options.nargs === $$.ZERO_OR_MORE && options.defaultValue === undefined) { - options.required = true; - } - - // return the keyword arguments with no option strings - options.dest = dest; - options.optionStrings = []; - return options; -}; - -ActionContainer.prototype._getOptional = function (args, options) { - var prefixChars = this.prefixChars; - var optionStrings = []; - var optionStringsLong = []; - - // determine short and long option strings - args.forEach(function (optionString) { - // error on strings that don't start with an appropriate prefix - if (prefixChars.indexOf(optionString[0]) < 0) { - throw new Error(format('Invalid option string "%s": must start with a "%s".', - optionString, - prefixChars - )); - } - - // strings starting with two prefix characters are long options - optionStrings.push(optionString); - if (optionString.length > 1 && prefixChars.indexOf(optionString[1]) >= 0) { - optionStringsLong.push(optionString); - } - }); - - // infer dest, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' - var dest = options.dest || null; - delete options.dest; - - if (!dest) { - var optionStringDest = optionStringsLong.length ? optionStringsLong[0] :optionStrings[0]; - dest = _.str.strip(optionStringDest, this.prefixChars); - - if (dest.length === 0) { - throw new Error( - format('dest= is required for options like "%s"', optionStrings.join(', ')) - ); - } - dest = dest.replace(/-/g, '_'); - } - - // return the updated keyword arguments - options.dest = dest; - options.optionStrings = optionStrings; - - return options; -}; - -ActionContainer.prototype._popActionClass = function (options, defaultValue) { - defaultValue = defaultValue || null; - - var action = (options.action || defaultValue); - delete options.action; - - var actionClass = this._registryGet('action', action, action); - return actionClass; -}; - -ActionContainer.prototype._getHandler = function () { - var handlerString = this.conflictHandler; - var handlerFuncName = "_handleConflict" + _.str.capitalize(handlerString); - var func = this[handlerFuncName]; - if (typeof func === 'undefined') { - var msg = "invalid conflict resolution value: " + handlerString; - throw new Error(msg); - } else { - return func; - } -}; - -ActionContainer.prototype._checkConflict = function (action) { - var optionStringActions = this._optionStringActions; - var conflictOptionals = []; - - // find all options that conflict with this option - // collect pairs, the string, and an existing action that it conflicts with - action.optionStrings.forEach(function (optionString) { - var conflOptional = optionStringActions[optionString]; - if (typeof conflOptional !== 'undefined') { - conflictOptionals.push([optionString, conflOptional]); - } - }); - - if (conflictOptionals.length > 0) { - var conflictHandler = this._getHandler(); - conflictHandler.call(this, action, conflictOptionals); - } -}; - -ActionContainer.prototype._handleConflictError = function (action, conflOptionals) { - var conflicts = _.map(conflOptionals, function (pair) {return pair[0]; }); - conflicts = conflicts.join(', '); - throw argumentErrorHelper( - action, - format('Conflicting option string(s): %s', conflicts) - ); -}; - -ActionContainer.prototype._handleConflictResolve = function (action, conflOptionals) { - // remove all conflicting options - var self = this; - conflOptionals.forEach(function (pair) { - var optionString = pair[0]; - var conflictingAction = pair[1]; - // remove the conflicting option string - var i = conflictingAction.optionStrings.indexOf(optionString); - if (i >= 0) { - conflictingAction.optionStrings.splice(i, 1); - } - delete self._optionStringActions[optionString]; - // if the option now has no option string, remove it from the - // container holding it - if (conflictingAction.optionStrings.length === 0) { - conflictingAction.container._removeAction(conflictingAction); - } - }); -}; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argparse.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argparse.js deleted file mode 100644 index f2a2c51d9a89..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argparse.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -module.exports.ArgumentParser = require('./argument_parser.js'); -module.exports.Namespace = require('./namespace'); -module.exports.Action = require('./action'); -module.exports.HelpFormatter = require('./help/formatter.js'); -module.exports.Const = require('./const.js'); - -module.exports.ArgumentDefaultsHelpFormatter = - require('./help/added_formatters.js').ArgumentDefaultsHelpFormatter; -module.exports.RawDescriptionHelpFormatter = - require('./help/added_formatters.js').RawDescriptionHelpFormatter; -module.exports.RawTextHelpFormatter = - require('./help/added_formatters.js').RawTextHelpFormatter; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js deleted file mode 100644 index c8a02a08b8fb..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - - -var format = require('util').format; - - -var ERR_CODE = 'ARGError'; - -/*:nodoc:* - * argumentError(argument, message) -> TypeError - * - argument (Object): action with broken argument - * - message (String): error message - * - * Error format helper. An error from creating or using an argument - * (optional or positional). The string value of this exception - * is the message, augmented with information - * about the argument that caused it. - * - * #####Example - * - * var argumentErrorHelper = require('./argument/error'); - * if (conflictOptionals.length > 0) { - * throw argumentErrorHelper( - * action, - * format('Conflicting option string(s): %s', conflictOptionals.join(', ')) - * ); - * } - * - **/ -module.exports = function (argument, message) { - var argumentName = null; - var errMessage; - var err; - - if (argument.getName) { - argumentName = argument.getName(); - } else { - argumentName = '' + argument; - } - - if (!argumentName) { - errMessage = message; - } else { - errMessage = format('argument "%s": %s', argumentName, message); - } - - err = new TypeError(errMessage); - err.code = ERR_CODE; - return err; -}; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js deleted file mode 100644 index 8287e00d0464..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js +++ /dev/null @@ -1,54 +0,0 @@ -/** internal - * class MutuallyExclusiveGroup - * - * Group arguments. - * By default, ArgumentParser groups command-line arguments - * into “positional arguments†and “optional arguments†- * when displaying help messages. When there is a better - * conceptual grouping of arguments than this default one, - * appropriate groups can be created using the addArgumentGroup() method - * - * This class inherited from [[ArgumentContainer]] - **/ -'use strict'; - -var util = require('util'); - -var ArgumentGroup = require('./group'); - -/** - * new MutuallyExclusiveGroup(container, options) - * - container (object): main container - * - options (object): options.required -> true/false - * - * `required` could be an argument itself, but making it a property of - * the options argument is more consistent with the JS adaptation of the Python) - **/ -var MutuallyExclusiveGroup = module.exports = function MutuallyExclusiveGroup(container, options) { - var required; - options = options || {}; - required = options.required || false; - ArgumentGroup.call(this, container); - this.required = required; - -}; -util.inherits(MutuallyExclusiveGroup, ArgumentGroup); - - -MutuallyExclusiveGroup.prototype._addAction = function (action) { - var msg; - if (action.required) { - msg = 'mutually exclusive arguments must be optional'; - throw new Error(msg); - } - action = this._container._addAction(action); - this._groupActions.push(action); - return action; -}; - - -MutuallyExclusiveGroup.prototype._removeAction = function (action) { - this._container._removeAction(action); - this._groupActions.remove(action); -}; - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js deleted file mode 100644 index 58b271f2fec8..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js +++ /dev/null @@ -1,75 +0,0 @@ -/** internal - * class ArgumentGroup - * - * Group arguments. - * By default, ArgumentParser groups command-line arguments - * into “positional arguments†and “optional arguments†- * when displaying help messages. When there is a better - * conceptual grouping of arguments than this default one, - * appropriate groups can be created using the addArgumentGroup() method - * - * This class inherited from [[ArgumentContainer]] - **/ -'use strict'; - -var util = require('util'); - -var ActionContainer = require('../action_container'); - - -/** - * new ArgumentGroup(container, options) - * - container (object): main container - * - options (object): hash of group options - * - * #### options - * - **prefixChars** group name prefix - * - **argumentDefault** default argument value - * - **title** group title - * - **description** group description - * - **/ -var ArgumentGroup = module.exports = function ArgumentGroup(container, options) { - - options = options || {}; - - // add any missing keyword arguments by checking the container - options.conflictHandler = (options.conflictHandler || container.conflictHandler); - options.prefixChars = (options.prefixChars || container.prefixChars); - options.argumentDefault = (options.argumentDefault || container.argumentDefault); - - ActionContainer.call(this, options); - - // group attributes - this.title = options.title; - this._groupActions = []; - - // share most attributes with the container - this._container = container; - this._registries = container._registries; - this._actions = container._actions; - this._optionStringActions = container._optionStringActions; - this._defaults = container._defaults; - this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals; - this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups; -}; -util.inherits(ArgumentGroup, ActionContainer); - - -ArgumentGroup.prototype._addAction = function (action) { - // Parent add action - action = ActionContainer.prototype._addAction.call(this, action); - this._groupActions.push(action); - return action; -}; - - -ArgumentGroup.prototype._removeAction = function (action) { - // Parent remove action - ActionContainer.prototype._removeAction.call(this, action); - var actionIndex = this._groupActions.indexOf(action); - if (actionIndex >= 0) { - this._groupActions.splice(actionIndex, 1); - } -}; - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js deleted file mode 100644 index 97cf098234e0..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js +++ /dev/null @@ -1,1165 +0,0 @@ -/** - * class ArgumentParser - * - * Object for parsing command line strings into js objects. - * - * Inherited from [[ActionContainer]] - **/ -'use strict'; - -var util = require('util'); -var format = require('util').format; -var Path = require('path'); - -var _ = require('underscore'); -_.str = require('underscore.string'); - -// Constants -var $$ = require('./const'); - -var ActionContainer = require('./action_container'); - -// Errors -var argumentErrorHelper = require('./argument/error'); - -var HelpFormatter = require('./help/formatter'); - -var Namespace = require('./namespace'); - - -/** - * new ArgumentParser(options) - * - * Create a new ArgumentParser object. - * - * ##### Options: - * - `prog` The name of the program (default: sys.argv[0]) - * - `usage` A usage message (default: auto-generated from arguments) - * - `description` A description of what the program does - * - `epilog` Text following the argument descriptions - * - `parents` Parsers whose arguments should be copied into this one - * - `formatterClass` HelpFormatter class for printing help messages - * - `prefixChars` Characters that prefix optional arguments - * - `fromfilePrefixChars` Characters that prefix files containing additional arguments - * - `argumentDefault` The default value for all arguments - * - `addHelp` Add a -h/-help option - * - `conflictHandler` Specifies how to handle conflicting argument names - * - `debug` Enable debug mode. Argument errors throw exception in - * debug mode and process.exit in normal. Used for development and - * testing (default: false) - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#argumentparser-objects - **/ -var ArgumentParser = module.exports = function ArgumentParser(options) { - var self = this; - options = options || {}; - - options.description = (options.description || null); - options.argumentDefault = (options.argumentDefault || null); - options.prefixChars = (options.prefixChars || '-'); - options.conflictHandler = (options.conflictHandler || 'error'); - ActionContainer.call(this, options); - - options.addHelp = (options.addHelp === undefined || !!options.addHelp); - options.parents = (options.parents || []); - // default program name - options.prog = (options.prog || Path.basename(process.argv[1])); - this.prog = options.prog; - this.usage = options.usage; - this.epilog = options.epilog; - this.version = options.version; - - this.debug = (options.debug === true); - - this.formatterClass = (options.formatterClass || HelpFormatter); - this.fromfilePrefixChars = options.fromfilePrefixChars || null; - this._positionals = this.addArgumentGroup({title: 'Positional arguments'}); - this._optionals = this.addArgumentGroup({title: 'Optional arguments'}); - this._subparsers = null; - - // register types - var FUNCTION_IDENTITY = function (o) { - return o; - }; - this.register('type', 'auto', FUNCTION_IDENTITY); - this.register('type', null, FUNCTION_IDENTITY); - this.register('type', 'int', function (x) { - var result = parseInt(x, 10); - if (isNaN(result)) { - throw new Error(x + ' is not a valid integer.'); - } - return result; - }); - this.register('type', 'float', function (x) { - var result = parseFloat(x); - if (isNaN(result)) { - throw new Error(x + ' is not a valid float.'); - } - return result; - }); - this.register('type', 'string', function (x) { - return '' + x; - }); - - // add help and version arguments if necessary - var defaultPrefix = (this.prefixChars.indexOf('-') > -1) ? '-' : this.prefixChars[0]; - if (options.addHelp) { - this.addArgument( - [defaultPrefix + 'h', defaultPrefix + defaultPrefix + 'help'], - { - action: 'help', - defaultValue: $$.SUPPRESS, - help: 'Show this help message and exit.' - } - ); - } - if (this.version !== undefined) { - this.addArgument( - [defaultPrefix + 'v', defaultPrefix + defaultPrefix + 'version'], - { - action: 'version', - version: this.version, - defaultValue: $$.SUPPRESS, - help: "Show program's version number and exit." - } - ); - } - - // add parent arguments and defaults - options.parents.forEach(function (parent) { - self._addContainerActions(parent); - if (parent._defaults !== undefined) { - for (var defaultKey in parent._defaults) { - if (parent._defaults.hasOwnProperty(defaultKey)) { - self._defaults[defaultKey] = parent._defaults[defaultKey]; - } - } - } - }); - -}; -util.inherits(ArgumentParser, ActionContainer); - -/** - * ArgumentParser#addSubparsers(options) -> [[ActionSubparsers]] - * - options (object): hash of options see [[ActionSubparsers.new]] - * - * See also [subcommands][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#sub-commands - **/ -ArgumentParser.prototype.addSubparsers = function (options) { - if (!!this._subparsers) { - this.error('Cannot have multiple subparser arguments.'); - } - - options = options || {}; - options.debug = (this.debug === true); - options.optionStrings = []; - options.parserClass = (options.parserClass || ArgumentParser); - - - if (!!options.title || !!options.description) { - - this._subparsers = this.addArgumentGroup({ - title: (options.title || 'subcommands'), - description: options.description - }); - delete options.title; - delete options.description; - - } else { - this._subparsers = this._positionals; - } - - // prog defaults to the usage message of this parser, skipping - // optional arguments and with no "usage:" prefix - if (!options.prog) { - var formatter = this._getFormatter(); - var positionals = this._getPositionalActions(); - var groups = this._mutuallyExclusiveGroups; - formatter.addUsage(this.usage, positionals, groups, ''); - options.prog = _.str.strip(formatter.formatHelp()); - } - - // create the parsers action and add it to the positionals list - var ParsersClass = this._popActionClass(options, 'parsers'); - var action = new ParsersClass(options); - this._subparsers._addAction(action); - - // return the created parsers action - return action; -}; - -ArgumentParser.prototype._addAction = function (action) { - if (action.isOptional()) { - this._optionals._addAction(action); - } else { - this._positionals._addAction(action); - } - return action; -}; - -ArgumentParser.prototype._getOptionalActions = function () { - return this._actions.filter(function (action) { - return action.isOptional(); - }); -}; - -ArgumentParser.prototype._getPositionalActions = function () { - return this._actions.filter(function (action) { - return action.isPositional(); - }); -}; - - -/** - * ArgumentParser#parseArgs(args, namespace) -> Namespace|Object - * - args (array): input elements - * - namespace (Namespace|Object): result object - * - * Parsed args and throws error if some arguments are not recognized - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#the-parse-args-method - **/ -ArgumentParser.prototype.parseArgs = function (args, namespace) { - var argv; - var result = this.parseKnownArgs(args, namespace); - - args = result[0]; - argv = result[1]; - if (argv && argv.length > 0) { - this.error( - format('Unrecognized arguments: %s.', argv.join(' ')) - ); - } - return args; -}; - -/** - * ArgumentParser#parseKnownArgs(args, namespace) -> array - * - args (array): input options - * - namespace (Namespace|Object): result object - * - * Parse known arguments and return tuple of result object - * and unknown args - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#partial-parsing - **/ -ArgumentParser.prototype.parseKnownArgs = function (args, namespace) { - var self = this; - - // args default to the system args - args = args || process.argv.slice(2); - - // default Namespace built from parser defaults - namespace = namespace || new Namespace(); - - self._actions.forEach(function (action) { - if (action.dest !== $$.SUPPRESS) { - if (!_.has(namespace, action.dest)) { - if (action.defaultValue !== $$.SUPPRESS) { - var defaultValue = action.defaultValue; - if (_.isString(action.defaultValue)) { - defaultValue = self._getValue(action, defaultValue); - } - namespace[action.dest] = defaultValue; - } - } - } - }); - - _.keys(self._defaults).forEach(function (dest) { - namespace[dest] = self._defaults[dest]; - }); - - // parse the arguments and exit if there are any errors - try { - var res = this._parseKnownArgs(args, namespace); - - namespace = res[0]; - args = res[1]; - if (_.has(namespace, $$._UNRECOGNIZED_ARGS_ATTR)) { - args = _.union(args, namespace[$$._UNRECOGNIZED_ARGS_ATTR]); - delete namespace[$$._UNRECOGNIZED_ARGS_ATTR]; - } - return [namespace, args]; - } catch (e) { - this.error(e); - } -}; - -ArgumentParser.prototype._parseKnownArgs = function (argStrings, namespace) { - var self = this; - - var extras = []; - - // replace arg strings that are file references - if (this.fromfilePrefixChars !== null) { - argStrings = this._readArgsFromFiles(argStrings); - } - // map all mutually exclusive arguments to the other arguments - // they can't occur with - // Python has 'conflicts = action_conflicts.setdefault(mutex_action, [])' - // though I can't conceive of a way in which an action could be a member - // of two different mutually exclusive groups. - - function actionHash(action) { - // some sort of hashable key for this action - // action itself cannot be a key in actionConflicts - // I think getName() (join of optionStrings) is unique enough - return action.getName(); - } - var conflicts, key; - var actionConflicts = {}; - this._mutuallyExclusiveGroups.forEach(function (mutexGroup) { - mutexGroup._groupActions.forEach(function (mutexAction, i, groupActions) { - key = actionHash(mutexAction); - if (!_.has(actionConflicts, key)) { - actionConflicts[key] = []; - } - conflicts = actionConflicts[key]; - conflicts.push.apply(conflicts, groupActions.slice(0, i)); - conflicts.push.apply(conflicts, groupActions.slice(i + 1)); - }); - }); - - // find all option indices, and determine the arg_string_pattern - // which has an 'O' if there is an option at an index, - // an 'A' if there is an argument, or a '-' if there is a '--' - var optionStringIndices = {}; - - var argStringPatternParts = []; - - argStrings.forEach(function (argString, argStringIndex) { - if (argString === '--') { - argStringPatternParts.push('-'); - while (argStringIndex < argStrings.length) { - argStringPatternParts.push('A'); - argStringIndex++; - } - } - // otherwise, add the arg to the arg strings - // and note the index if it was an option - else { - var pattern; - var optionTuple = self._parseOptional(argString); - if (!optionTuple) { - pattern = 'A'; - } - else { - optionStringIndices[argStringIndex] = optionTuple; - pattern = 'O'; - } - argStringPatternParts.push(pattern); - } - }); - var argStringsPattern = argStringPatternParts.join(''); - - var seenActions = []; - var seenNonDefaultActions = []; - - - function takeAction(action, argumentStrings, optionString) { - seenActions.push(action); - var argumentValues = self._getValues(action, argumentStrings); - - // error if this argument is not allowed with other previously - // seen arguments, assuming that actions that use the default - // value don't really count as "present" - if (argumentValues !== action.defaultValue) { - seenNonDefaultActions.push(action); - if (!!actionConflicts[actionHash(action)]) { - actionConflicts[actionHash(action)].forEach(function (actionConflict) { - if (seenNonDefaultActions.indexOf(actionConflict) >= 0) { - throw argumentErrorHelper( - action, - format('Not allowed with argument "%s".', actionConflict.getName()) - ); - } - }); - } - } - - if (argumentValues !== $$.SUPPRESS) { - action.call(self, namespace, argumentValues, optionString); - } - } - - function consumeOptional(startIndex) { - // get the optional identified at this index - var optionTuple = optionStringIndices[startIndex]; - var action = optionTuple[0]; - var optionString = optionTuple[1]; - var explicitArg = optionTuple[2]; - - // identify additional optionals in the same arg string - // (e.g. -xyz is the same as -x -y -z if no args are required) - var actionTuples = []; - - var args, argCount, start, stop; - - while (true) { - if (!action) { - extras.push(argStrings[startIndex]); - return startIndex + 1; - } - if (!!explicitArg) { - argCount = self._matchArgument(action, 'A'); - - // if the action is a single-dash option and takes no - // arguments, try to parse more single-dash options out - // of the tail of the option string - var chars = self.prefixChars; - if (argCount === 0 && chars.indexOf(optionString[1]) < 0) { - actionTuples.push([action, [], optionString]); - optionString = optionString[0] + explicitArg[0]; - var newExplicitArg = explicitArg.slice(1) || null; - var optionalsMap = self._optionStringActions; - - if (_.keys(optionalsMap).indexOf(optionString) >= 0) { - action = optionalsMap[optionString]; - explicitArg = newExplicitArg; - } - else { - var msg = 'ignored explicit argument %r'; - throw argumentErrorHelper(action, msg); - } - } - // if the action expect exactly one argument, we've - // successfully matched the option; exit the loop - else if (argCount === 1) { - stop = startIndex + 1; - args = [explicitArg]; - actionTuples.push([action, args, optionString]); - break; - } - // error if a double-dash option did not use the - // explicit argument - else { - var message = 'ignored explicit argument %r'; - throw argumentErrorHelper(action, _.str.sprintf(message, explicitArg)); - } - } - // if there is no explicit argument, try to match the - // optional's string arguments with the following strings - // if successful, exit the loop - else { - - start = startIndex + 1; - var selectedPatterns = argStringsPattern.substr(start); - - argCount = self._matchArgument(action, selectedPatterns); - stop = start + argCount; - - - args = argStrings.slice(start, stop); - - actionTuples.push([action, args, optionString]); - break; - } - - } - - // add the Optional to the list and return the index at which - // the Optional's string args stopped - if (actionTuples.length < 1) { - throw new Error('length should be > 0'); - } - for (var i = 0; i < actionTuples.length; i++) { - takeAction.apply(self, actionTuples[i]); - } - return stop; - } - - // the list of Positionals left to be parsed; this is modified - // by consume_positionals() - var positionals = self._getPositionalActions(); - - function consumePositionals(startIndex) { - // match as many Positionals as possible - var selectedPattern = argStringsPattern.substr(startIndex); - var argCounts = self._matchArgumentsPartial(positionals, selectedPattern); - - // slice off the appropriate arg strings for each Positional - // and add the Positional and its args to the list - _.zip(positionals, argCounts).forEach(function (item) { - var action = item[0]; - var argCount = item[1]; - if (argCount === undefined) { - return; - } - var args = argStrings.slice(startIndex, startIndex + argCount); - - startIndex += argCount; - takeAction(action, args); - }); - - // slice off the Positionals that we just parsed and return the - // index at which the Positionals' string args stopped - positionals = positionals.slice(argCounts.length); - return startIndex; - } - - // consume Positionals and Optionals alternately, until we have - // passed the last option string - var startIndex = 0; - var position; - - var maxOptionStringIndex = -1; - if (!!optionStringIndices) { - for (position in optionStringIndices) { - maxOptionStringIndex = Math.max(maxOptionStringIndex, parseInt(position, 10)); - } - } - - var positionalsEndIndex, nextOptionStringIndex; - - while (startIndex <= maxOptionStringIndex) { - // consume any Positionals preceding the next option - nextOptionStringIndex = null; - for (position in optionStringIndices) { - position = parseInt(position, 10); - if (position >= startIndex) { - if (nextOptionStringIndex !== null) { - nextOptionStringIndex = Math.min(nextOptionStringIndex, position); - } - else { - nextOptionStringIndex = position; - } - } - } - - if (startIndex !== nextOptionStringIndex) { - positionalsEndIndex = consumePositionals(startIndex); - // only try to parse the next optional if we didn't consume - // the option string during the positionals parsing - if (positionalsEndIndex > startIndex) { - startIndex = positionalsEndIndex; - continue; - } - else { - startIndex = positionalsEndIndex; - } - } - - // if we consumed all the positionals we could and we're not - // at the index of an option string, there were extra arguments - if (!optionStringIndices[startIndex]) { - var strings = argStrings.slice(startIndex, nextOptionStringIndex); - extras = extras.concat(strings); - startIndex = nextOptionStringIndex; - } - // consume the next optional and any arguments for it - startIndex = consumeOptional(startIndex); - } - - // consume any positionals following the last Optional - var stopIndex = consumePositionals(startIndex); - - // if we didn't consume all the argument strings, there were extras - extras = extras.concat(_.rest(argStrings, stopIndex)); - - // if we didn't use all the Positional objects, there were too few - // arg strings supplied. - if (positionals.length > 0) { - self.error('too few arguments'); - } - - // make sure all required actions were present - self._actions.forEach(function (action) { - if (action.required) { - if (_.indexOf(seenActions, action) < 0) { - self.error(format('Argument "%s" is required', action.getName())); - } - } - }); - - // make sure all required groups have one option present - var actionUsed = false; - self._mutuallyExclusiveGroups.forEach(function (group) { - if (group.required) { - actionUsed = _.any(group._groupActions, function (action) { - return _.contains(seenNonDefaultActions, action); - }); - - // if no actions were used, report the error - if (!actionUsed) { - var names = []; - group._groupActions.forEach(function (action) { - if (action.help !== $$.SUPPRESS) { - names.push(action.getName()); - } - }); - names = names.join(' '); - var msg = 'one of the arguments ' + names + ' is required'; - self.error(msg); - } - } - }); - - // return the updated namespace and the extra arguments - return [namespace, extras]; -}; - -ArgumentParser.prototype._readArgsFromFiles = function (argStrings) { - // expand arguments referencing files - var _this = this; - var fs = require('fs'); - var newArgStrings = []; - argStrings.forEach(function (argString) { - if (_this.fromfilePrefixChars.indexOf(argString[0]) < 0) { - // for regular arguments, just add them back into the list - newArgStrings.push(argString); - } else { - // replace arguments referencing files with the file content - try { - var argstrs = []; - var filename = argString.slice(1); - var content = fs.readFileSync(filename, 'utf8'); - content = content.trim().split('\n'); - content.forEach(function (argLine) { - _this.convertArgLineToArgs(argLine).forEach(function (arg) { - argstrs.push(arg); - }); - argstrs = _this._readArgsFromFiles(argstrs); - }); - newArgStrings.push.apply(newArgStrings, argstrs); - } catch (error) { - return _this.error(error.message); - } - } - }); - return newArgStrings; -}; - -ArgumentParser.prototype.convertArgLineToArgs = function (argLine) { - return [argLine]; -}; - -ArgumentParser.prototype._matchArgument = function (action, regexpArgStrings) { - - // match the pattern for this action to the arg strings - var regexpNargs = new RegExp('^' + this._getNargsPattern(action)); - var matches = regexpArgStrings.match(regexpNargs); - var message; - - // throw an exception if we weren't able to find a match - if (!matches) { - switch (action.nargs) { - case undefined: - case null: - message = 'Expected one argument.'; - break; - case $$.OPTIONAL: - message = 'Expected at most one argument.'; - break; - case $$.ONE_OR_MORE: - message = 'Expected at least one argument.'; - break; - default: - message = 'Expected %s argument(s)'; - } - - throw argumentErrorHelper( - action, - format(message, action.nargs) - ); - } - // return the number of arguments matched - return matches[1].length; -}; - -ArgumentParser.prototype._matchArgumentsPartial = function (actions, regexpArgStrings) { - // progressively shorten the actions list by slicing off the - // final actions until we find a match - var self = this; - var result = []; - var actionSlice, pattern, matches; - var i, j; - - var getLength = function (string) { - return string.length; - }; - - for (i = actions.length; i > 0; i -= 1) { - pattern = ''; - actionSlice = actions.slice(0, i); - for (j in actionSlice) { - pattern += self._getNargsPattern(actionSlice[j]); - } - - pattern = new RegExp('^' + pattern); - matches = regexpArgStrings.match(pattern); - - if (matches && matches.length > 0) { - // need only groups - matches = matches.splice(1); - result = result.concat(matches.map(getLength)); - break; - } - } - - // return the list of arg string counts - return result; -}; - -ArgumentParser.prototype._parseOptional = function (argString) { - var action, optionString, argExplicit, optionTuples; - - // if it's an empty string, it was meant to be a positional - if (!argString) { - return null; - } - - // if it doesn't start with a prefix, it was meant to be positional - if (this.prefixChars.indexOf(argString[0]) < 0) { - return null; - } - - // if the option string is present in the parser, return the action - if (!!this._optionStringActions[argString]) { - return [this._optionStringActions[argString], argString, null]; - } - - // if it's just a single character, it was meant to be positional - if (argString.length === 1) { - return null; - } - - // if the option string before the "=" is present, return the action - if (argString.indexOf('=') >= 0) { - var argStringSplit = argString.split('='); - optionString = argStringSplit[0]; - argExplicit = argStringSplit[1]; - - if (!!this._optionStringActions[optionString]) { - action = this._optionStringActions[optionString]; - return [action, optionString, argExplicit]; - } - } - - // search through all possible prefixes of the option string - // and all actions in the parser for possible interpretations - optionTuples = this._getOptionTuples(argString); - - // if multiple actions match, the option string was ambiguous - if (optionTuples.length > 1) { - var optionStrings = optionTuples.map(function (optionTuple) { - return optionTuple[1]; - }); - this.error(format( - 'Ambiguous option: "%s" could match %s.', - argString, optionStrings.join(', ') - )); - // if exactly one action matched, this segmentation is good, - // so return the parsed action - } else if (optionTuples.length === 1) { - return optionTuples[0]; - } - - // if it was not found as an option, but it looks like a negative - // number, it was meant to be positional - // unless there are negative-number-like options - if (argString.match(this._regexpNegativeNumber)) { - if (!_.any(this._hasNegativeNumberOptionals)) { - return null; - } - } - // if it contains a space, it was meant to be a positional - if (argString.search(' ') >= 0) { - return null; - } - - // it was meant to be an optional but there is no such option - // in this parser (though it might be a valid option in a subparser) - return [null, argString, null]; -}; - -ArgumentParser.prototype._getOptionTuples = function (optionString) { - var result = []; - var chars = this.prefixChars; - var optionPrefix; - var argExplicit; - var action; - var actionOptionString; - - // option strings starting with two prefix characters are only split at - // the '=' - if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) >= 0) { - if (optionString.indexOf('=') >= 0) { - var optionStringSplit = optionString.split('=', 1); - - optionPrefix = optionStringSplit[0]; - argExplicit = optionStringSplit[1]; - } else { - optionPrefix = optionString; - argExplicit = null; - } - - for (actionOptionString in this._optionStringActions) { - if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) { - action = this._optionStringActions[actionOptionString]; - result.push([action, actionOptionString, argExplicit]); - } - } - - // single character options can be concatenated with their arguments - // but multiple character options always have to have their argument - // separate - } else if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) < 0) { - optionPrefix = optionString; - argExplicit = null; - var optionPrefixShort = optionString.substr(0, 2); - var argExplicitShort = optionString.substr(2); - - for (actionOptionString in this._optionStringActions) { - action = this._optionStringActions[actionOptionString]; - if (actionOptionString === optionPrefixShort) { - result.push([action, actionOptionString, argExplicitShort]); - } else if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) { - result.push([action, actionOptionString, argExplicit]); - } - } - - // shouldn't ever get here - } else { - throw new Error(format('Unexpected option string: %s.', optionString)); - } - // return the collected option tuples - return result; -}; - -ArgumentParser.prototype._getNargsPattern = function (action) { - // in all examples below, we have to allow for '--' args - // which are represented as '-' in the pattern - var regexpNargs; - - switch (action.nargs) { - // the default (null) is assumed to be a single argument - case undefined: - case null: - regexpNargs = '(-*A-*)'; - break; - // allow zero or more arguments - case $$.OPTIONAL: - regexpNargs = '(-*A?-*)'; - break; - // allow zero or more arguments - case $$.ZERO_OR_MORE: - regexpNargs = '(-*[A-]*)'; - break; - // allow one or more arguments - case $$.ONE_OR_MORE: - regexpNargs = '(-*A[A-]*)'; - break; - // allow any number of options or arguments - case $$.REMAINDER: - regexpNargs = '([-AO]*)'; - break; - // allow one argument followed by any number of options or arguments - case $$.PARSER: - regexpNargs = '(-*A[-AO]*)'; - break; - // all others should be integers - default: - regexpNargs = '(-*' + _.str.repeat('-*A', action.nargs) + '-*)'; - } - - // if this is an optional action, -- is not allowed - if (action.isOptional()) { - regexpNargs = regexpNargs.replace(/-\*/g, ''); - regexpNargs = regexpNargs.replace(/-/g, ''); - } - - // return the pattern - return regexpNargs; -}; - -// -// Value conversion methods -// - -ArgumentParser.prototype._getValues = function (action, argStrings) { - var self = this; - - // for everything but PARSER args, strip out '--' - if (action.nargs !== $$.PARSER && action.nargs !== $$.REMAINDER) { - argStrings = argStrings.filter(function (arrayElement) { - return arrayElement !== '--'; - }); - } - - var value, argString; - - // optional argument produces a default when not present - if (argStrings.length === 0 && action.nargs === $$.OPTIONAL) { - - value = (action.isOptional()) ? action.constant: action.defaultValue; - - if (typeof(value) === 'string') { - value = this._getValue(action, value); - this._checkValue(action, value); - } - - // when nargs='*' on a positional, if there were no command-line - // args, use the default if it is anything other than None - } else if (argStrings.length === 0 && action.nargs === $$.ZERO_OR_MORE && - action.optionStrings.length === 0) { - - value = (action.defaultValue || argStrings); - this._checkValue(action, value); - - // single argument or optional argument produces a single value - } else if (argStrings.length === 1 && - (!action.nargs || action.nargs === $$.OPTIONAL)) { - - argString = argStrings[0]; - value = this._getValue(action, argString); - this._checkValue(action, value); - - // REMAINDER arguments convert all values, checking none - } else if (action.nargs === $$.REMAINDER) { - value = argStrings.map(function (v) { - return self._getValue(action, v); - }); - - // PARSER arguments convert all values, but check only the first - } else if (action.nargs === $$.PARSER) { - value = argStrings.map(function (v) { - return self._getValue(action, v); - }); - this._checkValue(action, value[0]); - - // all other types of nargs produce a list - } else { - value = argStrings.map(function (v) { - return self._getValue(action, v); - }); - value.forEach(function (v) { - self._checkValue(action, v); - }); - } - - // return the converted value - return value; -}; - -ArgumentParser.prototype._getValue = function (action, argString) { - var result; - - var typeFunction = this._registryGet('type', action.type, action.type); - if (!_.isFunction(typeFunction)) { - var message = format('%s is not callable', typeFunction); - throw argumentErrorHelper(action, message); - } - - // convert the value to the appropriate type - try { - result = typeFunction(argString); - - // ArgumentTypeErrors indicate errors - // If action.type is not a registered string, it is a function - // Try to deduce its name for inclusion in the error message - // Failing that, include the error message it raised. - } catch (e) { - var name = null; - if (_.isString(action.type)) { - name = action.type; - } else { - name = action.type.name || action.type.displayName || ''; - } - var msg = format('Invalid %s value: %s', name, argString); - if (name === '') {msg += '\n' + e.message; } - throw argumentErrorHelper(action, msg); - } - // return the converted value - return result; -}; - -ArgumentParser.prototype._checkValue = function (action, value) { - // converted value must be one of the choices (if specified) - var choices = action.choices; - if (!!choices) { - // choise for argument can by array or string - if ((_.isString(choices) || _.isArray(choices)) && - choices.indexOf(value) !== -1) { - return; - } - // choise for subparsers can by only hash - if (_.isObject(choices) && !_.isArray(choices) && choices[value]) { - return; - } - - if (_.isString(choices)) { - choices = choices.split('').join(', '); - } - else if (_.isArray(choices)) { - choices = choices.join(', '); - } - else { - choices = _.keys(choices).join(', '); - } - var message = format('Invalid choice: %s (choose from [%s])', value, choices); - throw argumentErrorHelper(action, message); - } -}; - -// -// Help formatting methods -// - -/** - * ArgumentParser#formatUsage -> string - * - * Return usage string - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#printing-help - **/ -ArgumentParser.prototype.formatUsage = function () { - var formatter = this._getFormatter(); - formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups); - return formatter.formatHelp(); -}; - -/** - * ArgumentParser#formatHelp -> string - * - * Return help - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#printing-help - **/ -ArgumentParser.prototype.formatHelp = function () { - var formatter = this._getFormatter(); - - // usage - formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups); - - // description - formatter.addText(this.description); - - // positionals, optionals and user-defined groups - this._actionGroups.forEach(function (actionGroup) { - formatter.startSection(actionGroup.title); - formatter.addText(actionGroup.description); - formatter.addArguments(actionGroup._groupActions); - formatter.endSection(); - }); - - // epilog - formatter.addText(this.epilog); - - // determine help from format above - return formatter.formatHelp(); -}; - -ArgumentParser.prototype._getFormatter = function () { - var FormatterClass = this.formatterClass; - var formatter = new FormatterClass({prog: this.prog}); - return formatter; -}; - -// -// Print functions -// - -/** - * ArgumentParser#printUsage() -> Void - * - * Print usage - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#printing-help - **/ -ArgumentParser.prototype.printUsage = function () { - this._printMessage(this.formatUsage()); -}; - -/** - * ArgumentParser#printHelp() -> Void - * - * Print help - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#printing-help - **/ -ArgumentParser.prototype.printHelp = function () { - this._printMessage(this.formatHelp()); -}; - -ArgumentParser.prototype._printMessage = function (message, stream) { - if (!stream) { - stream = process.stdout; - } - if (message) { - stream.write('' + message); - } -}; - -// -// Exit functions -// - -/** - * ArgumentParser#exit(status=0, message) -> Void - * - status (int): exit status - * - message (string): message - * - * Print message in stderr/stdout and exit program - **/ -ArgumentParser.prototype.exit = function (status, message) { - if (!!message) { - if (status === 0) { - this._printMessage(message); - } - else { - this._printMessage(message, process.stderr); - } - } - - process.exit(status); -}; - -/** - * ArgumentParser#error(message) -> Void - * - err (Error|string): message - * - * Error method Prints a usage message incorporating the message to stderr and - * exits. If you override this in a subclass, - * it should not return -- it should - * either exit or throw an exception. - * - **/ -ArgumentParser.prototype.error = function (err) { - var message; - if (err instanceof Error) { - if (this.debug === true) { - throw err; - } - message = err.message; - } - else { - message = err; - } - var msg = format('%s: error: %s', this.prog, message) + $$.EOL; - - if (this.debug === true) { - throw new Error(msg); - } - - this.printUsage(process.stderr); - - return this.exit(2, msg); -}; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/const.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/const.js deleted file mode 100644 index de831ba4e93f..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/const.js +++ /dev/null @@ -1,18 +0,0 @@ -// -// Constants -// -module.exports.EOL = '\n'; - -module.exports.SUPPRESS = '==SUPPRESS=='; - -module.exports.OPTIONAL = '?'; - -module.exports.ZERO_OR_MORE = '*'; - -module.exports.ONE_OR_MORE = '+'; - -module.exports.PARSER = 'A...'; - -module.exports.REMAINDER = '...'; - -module.exports._UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js deleted file mode 100644 index cd2f369b6d30..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -var util = require('util'); -var _ = require('underscore'); -_.str = require('underscore.string'); - -// Constants -var $$ = require('../const'); - -var HelpFormatter = require('./formatter.js'); - -/** - * new RawDescriptionHelpFormatter(options) - * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) - * - * Help message formatter which adds default values to argument help. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - **/ - -var ArgumentDefaultsHelpFormatter = function ArgumentDefaultsHelpFormatter(options) { - HelpFormatter.call(this, options); -}; - -util.inherits(ArgumentDefaultsHelpFormatter, HelpFormatter); - -ArgumentDefaultsHelpFormatter.prototype._getHelpString = function (action) { - var help = action.help; - if (action.help.indexOf('%(defaultValue)s') === -1) { - if (action.defaultValue !== $$.SUPPRESS) { - var defaulting_nargs = [$$.OPTIONAL, $$.ZERO_OR_MORE]; - if (action.isOptional() || (defaulting_nargs.indexOf(action.nargs) >= 0)) { - help += ' (default: %(defaultValue)s)'; - } - } - } - return help; -}; - -module.exports.ArgumentDefaultsHelpFormatter = ArgumentDefaultsHelpFormatter; - -/** - * new RawDescriptionHelpFormatter(options) - * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) - * - * Help message formatter which retains any formatting in descriptions. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - **/ - -var RawDescriptionHelpFormatter = function RawDescriptionHelpFormatter(options) { - HelpFormatter.call(this, options); -}; - -util.inherits(RawDescriptionHelpFormatter, HelpFormatter); - -RawDescriptionHelpFormatter.prototype._fillText = function (text, width, indent) { - var lines = text.split('\n'); - lines = lines.map(function (line) { - return _.str.rtrim(indent + line); - }); - return lines.join('\n'); -}; -module.exports.RawDescriptionHelpFormatter = RawDescriptionHelpFormatter; - -/** - * new RawTextHelpFormatter(options) - * new ArgumentParser({formatterClass: argparse.RawTextHelpFormatter, ...}) - * - * Help message formatter which retains formatting of all help text. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - **/ - -var RawTextHelpFormatter = function RawTextHelpFormatter(options) { - RawDescriptionHelpFormatter.call(this, options); -}; - -util.inherits(RawTextHelpFormatter, RawDescriptionHelpFormatter); - -RawTextHelpFormatter.prototype._splitLines = function (text) { - return text.split('\n'); -}; - -module.exports.RawTextHelpFormatter = RawTextHelpFormatter; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js deleted file mode 100644 index 541d918b6736..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js +++ /dev/null @@ -1,803 +0,0 @@ -/** - * class HelpFormatter - * - * Formatter for generating usage messages and argument help strings. Only the - * name of this class is considered a public API. All the methods provided by - * the class are considered an implementation detail. - * - * Do not call in your code, use this class only for inherits your own forvatter - * - * ToDo add [additonal formatters][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#formatter-class - **/ -'use strict'; - -var _ = require('underscore'); -_.str = require('underscore.string'); - -// Constants -var $$ = require('../const'); - - -/*:nodoc:* internal - * new Support(parent, heding) - * - parent (object): parent section - * - heading (string): header string - * - **/ -function Section(parent, heading) { - this._parent = parent; - this._heading = heading; - this._items = []; -} - -/*:nodoc:* internal - * Section#addItem(callback) -> Void - * - callback (array): tuple with function and args - * - * Add function for single element - **/ -Section.prototype.addItem = function (callback) { - this._items.push(callback); -}; - -/*:nodoc:* internal - * Section#formatHelp(formatter) -> string - * - formatter (HelpFormatter): current formatter - * - * Form help section string - * - **/ -Section.prototype.formatHelp = function (formatter) { - var itemHelp, heading; - - // format the indented section - if (!!this._parent) { - formatter._indent(); - } - - itemHelp = this._items.map(function (item) { - var obj, func, args; - - obj = formatter; - func = item[0]; - args = item[1]; - return func.apply(obj, args); - }); - itemHelp = formatter._joinParts(itemHelp); - - if (!!this._parent) { - formatter._dedent(); - } - - // return nothing if the section was empty - if (!itemHelp) { - return ''; - } - - // add the heading if the section was non-empty - heading = ''; - if (!!this._heading && this._heading !== $$.SUPPRESS) { - var currentIndent = formatter.currentIndent; - heading = _.str.repeat(' ', currentIndent) + this._heading + ':' + $$.EOL; - } - - // join the section-initialize newline, the heading and the help - return formatter._joinParts([$$.EOL, heading, itemHelp, $$.EOL]); -}; - -/** - * new HelpFormatter(options) - * - * #### Options: - * - `prog`: program name - * - `indentIncriment`: indent step, default value 2 - * - `maxHelpPosition`: max help position, default value = 24 - * - `width`: line width - * - **/ -var HelpFormatter = module.exports = function HelpFormatter(options) { - options = options || {}; - - this._prog = options.prog; - - this._maxHelpPosition = options.maxHelpPosition || 24; - this._width = (options.width || ((process.env.COLUMNS || 80) - 2)); - - this._currentIndent = 0; - this._indentIncriment = options.indentIncriment || 2; - this._level = 0; - this._actionMaxLength = 0; - - this._rootSection = new Section(null); - this._currentSection = this._rootSection; - - this._whitespaceMatcher = new RegExp('\\s+', 'g'); - this._longBreakMatcher = new RegExp($$.EOL + $$.EOL + $$.EOL + '+', 'g'); -}; - -HelpFormatter.prototype._indent = function () { - this._currentIndent += this._indentIncriment; - this._level += 1; -}; - -HelpFormatter.prototype._dedent = function () { - this._currentIndent -= this._indentIncriment; - this._level -= 1; - if (this._currentIndent < 0) { - throw new Error('Indent decreased below 0.'); - } -}; - -HelpFormatter.prototype._addItem = function (func, args) { - this._currentSection.addItem([func, args]); -}; - -// -// Message building methods -// - -/** - * HelpFormatter#startSection(heading) -> Void - * - heading (string): header string - * - * Start new help section - * - * See alse [code example][1] - * - * ##### Example - * - * formatter.startSection(actionGroup.title); - * formatter.addText(actionGroup.description); - * formatter.addArguments(actionGroup._groupActions); - * formatter.endSection(); - * - **/ -HelpFormatter.prototype.startSection = function (heading) { - this._indent(); - var section = new Section(this._currentSection, heading); - var func = section.formatHelp.bind(section); - this._addItem(func, [this]); - this._currentSection = section; -}; - -/** - * HelpFormatter#endSection -> Void - * - * End help section - * - * ##### Example - * - * formatter.startSection(actionGroup.title); - * formatter.addText(actionGroup.description); - * formatter.addArguments(actionGroup._groupActions); - * formatter.endSection(); - **/ -HelpFormatter.prototype.endSection = function () { - this._currentSection = this._currentSection._parent; - this._dedent(); -}; - -/** - * HelpFormatter#addText(text) -> Void - * - text (string): plain text - * - * Add plain text into current section - * - * ##### Example - * - * formatter.startSection(actionGroup.title); - * formatter.addText(actionGroup.description); - * formatter.addArguments(actionGroup._groupActions); - * formatter.endSection(); - * - **/ -HelpFormatter.prototype.addText = function (text) { - if (!!text && text !== $$.SUPPRESS) { - this._addItem(this._formatText, [text]); - } -}; - -/** - * HelpFormatter#addUsage(usage, actions, groups, prefix) -> Void - * - usage (string): usage text - * - actions (array): actions list - * - groups (array): groups list - * - prefix (string): usage prefix - * - * Add usage data into current section - * - * ##### Example - * - * formatter.addUsage(this.usage, this._actions, []); - * return formatter.formatHelp(); - * - **/ -HelpFormatter.prototype.addUsage = function (usage, actions, groups, prefix) { - if (usage !== $$.SUPPRESS) { - this._addItem(this._formatUsage, [usage, actions, groups, prefix]); - } -}; - -/** - * HelpFormatter#addArgument(action) -> Void - * - action (object): action - * - * Add argument into current section - * - * Single variant of [[HelpFormatter#addArguments]] - **/ -HelpFormatter.prototype.addArgument = function (action) { - if (action.help !== $$.SUPPRESS) { - var self = this; - - // find all invocations - var invocations = [this._formatActionInvocation(action)]; - var invocationLength = invocations[0].length; - - var actionLength; - - if (!!action._getSubactions) { - this._indent(); - action._getSubactions().forEach(function (subaction) { - - var invocationNew = self._formatActionInvocation(subaction); - invocations.push(invocationNew); - invocationLength = Math.max(invocationLength, invocationNew.length); - - }); - this._dedent(); - } - - // update the maximum item length - actionLength = invocationLength + this._currentIndent; - this._actionMaxLength = Math.max(this._actionMaxLength, actionLength); - - // add the item to the list - this._addItem(this._formatAction, [action]); - } -}; - -/** - * HelpFormatter#addArguments(actions) -> Void - * - actions (array): actions list - * - * Mass add arguments into current section - * - * ##### Example - * - * formatter.startSection(actionGroup.title); - * formatter.addText(actionGroup.description); - * formatter.addArguments(actionGroup._groupActions); - * formatter.endSection(); - * - **/ -HelpFormatter.prototype.addArguments = function (actions) { - var self = this; - actions.forEach(function (action) { - self.addArgument(action); - }); -}; - -// -// Help-formatting methods -// - -/** - * HelpFormatter#formatHelp -> string - * - * Format help - * - * ##### Example - * - * formatter.addText(this.epilog); - * return formatter.formatHelp(); - * - **/ -HelpFormatter.prototype.formatHelp = function () { - var help = this._rootSection.formatHelp(this); - if (help) { - help = help.replace(this._longBreakMatcher, $$.EOL + $$.EOL); - help = _.str.strip(help, $$.EOL) + $$.EOL; - } - return help; -}; - -HelpFormatter.prototype._joinParts = function (partStrings) { - return partStrings.filter(function (part) { - return (!!part && part !== $$.SUPPRESS); - }).join(''); -}; - -HelpFormatter.prototype._formatUsage = function (usage, actions, groups, prefix) { - if (!prefix && !_.isString(prefix)) { - prefix = 'usage: '; - } - - actions = actions || []; - groups = groups || []; - - - // if usage is specified, use that - if (usage) { - usage = _.str.sprintf(usage, {prog: this._prog}); - - // if no optionals or positionals are available, usage is just prog - } else if (!usage && actions.length === 0) { - usage = this._prog; - - // if optionals and positionals are available, calculate usage - } else if (!usage) { - var prog = this._prog; - var optionals = []; - var positionals = []; - var actionUsage; - var textWidth; - - // split optionals from positionals - actions.forEach(function (action) { - if (action.isOptional()) { - optionals.push(action); - } else { - positionals.push(action); - } - }); - - // build full usage string - actionUsage = this._formatActionsUsage([].concat(optionals, positionals), groups); - usage = [prog, actionUsage].join(' '); - - // wrap the usage parts if it's too long - textWidth = this._width - this._currentIndent; - if ((prefix.length + usage.length) > textWidth) { - - // break usage into wrappable parts - var regexpPart = new RegExp('\\(.*?\\)+|\\[.*?\\]+|\\S+', 'g'); - var optionalUsage = this._formatActionsUsage(optionals, groups); - var positionalUsage = this._formatActionsUsage(positionals, groups); - - - var optionalParts = optionalUsage.match(regexpPart); - var positionalParts = positionalUsage.match(regexpPart) || []; - - if (optionalParts.join(' ') !== optionalUsage) { - throw new Error('assert "optionalParts.join(\' \') === optionalUsage"'); - } - if (positionalParts.join(' ') !== positionalUsage) { - throw new Error('assert "positionalParts.join(\' \') === positionalUsage"'); - } - - // helper for wrapping lines - var _getLines = function (parts, indent, prefix) { - var lines = []; - var line = []; - - var lineLength = !!prefix ? prefix.length - 1: indent.length - 1; - - parts.forEach(function (part) { - if (lineLength + 1 + part.length > textWidth) { - lines.push(indent + line.join(' ')); - line = []; - lineLength = indent.length - 1; - } - line.push(part); - lineLength += part.length + 1; - }); - - if (line) { - lines.push(indent + line.join(' ')); - } - if (prefix) { - lines[0] = lines[0].substr(indent.length); - } - return lines; - }; - - var lines, indent, parts; - // if prog is short, follow it with optionals or positionals - if (prefix.length + prog.length <= 0.75 * textWidth) { - indent = _.str.repeat(' ', (prefix.length + prog.length + 1)); - if (optionalParts) { - lines = [].concat( - _getLines([prog].concat(optionalParts), indent, prefix), - _getLines(positionalParts, indent) - ); - } else if (positionalParts) { - lines = _getLines([prog].concat(positionalParts), indent, prefix); - } else { - lines = [prog]; - } - - // if prog is long, put it on its own line - } else { - indent = _.str.repeat(' ', prefix.length); - parts = optionalParts + positionalParts; - lines = _getLines(parts, indent); - if (lines.length > 1) { - lines = [].concat( - _getLines(optionalParts, indent), - _getLines(positionalParts, indent) - ); - } - lines = [prog] + lines; - } - // join lines into usage - usage = lines.join($$.EOL); - } - } - - // prefix with 'usage:' - return prefix + usage + $$.EOL + $$.EOL; -}; - -HelpFormatter.prototype._formatActionsUsage = function (actions, groups) { - // find group indices and identify actions in groups - var groupActions = []; - var inserts = []; - var self = this; - - groups.forEach(function (group) { - var end; - var i; - - var start = actions.indexOf(group._groupActions[0]); - if (start >= 0) { - end = start + group._groupActions.length; - - //if (actions.slice(start, end) === group._groupActions) { - if (_.isEqual(actions.slice(start, end), group._groupActions)) { - group._groupActions.forEach(function (action) { - groupActions.push(action); - }); - - if (!group.required) { - if (!!inserts[start]) { - inserts[start] += ' ['; - } - else { - inserts[start] = '['; - } - inserts[end] = ']'; - } else { - if (!!inserts[start]) { - inserts[start] += ' ('; - } - else { - inserts[start] = '('; - } - inserts[end] = ')'; - } - for (i = start + 1; i < end; i += 1) { - inserts[i] = '|'; - } - } - } - }); - - // collect all actions format strings - var parts = []; - - actions.forEach(function (action, actionIndex) { - var part; - var optionString; - var argsDefault; - var argsString; - - // suppressed arguments are marked with None - // remove | separators for suppressed arguments - if (action.help === $$.SUPPRESS) { - parts.push(null); - if (inserts[actionIndex] === '|') { - inserts.splice(actionIndex, actionIndex); - } else if (inserts[actionIndex + 1] === '|') { - inserts.splice(actionIndex + 1, actionIndex + 1); - } - - // produce all arg strings - } else if (!action.isOptional()) { - part = self._formatArgs(action, action.dest); - - // if it's in a group, strip the outer [] - if (groupActions.indexOf(action) >= 0) { - if (part[0] === '[' && part[part.length - 1] === ']') { - part = part.slice(1, -1); - } - } - // add the action string to the list - parts.push(part); - - // produce the first way to invoke the option in brackets - } else { - optionString = action.optionStrings[0]; - - // if the Optional doesn't take a value, format is: -s or --long - if (action.nargs === 0) { - part = '' + optionString; - - // if the Optional takes a value, format is: -s ARGS or --long ARGS - } else { - argsDefault = action.dest.toUpperCase(); - argsString = self._formatArgs(action, argsDefault); - part = optionString + ' ' + argsString; - } - // make it look optional if it's not required or in a group - if (!action.required && groupActions.indexOf(action) < 0) { - part = '[' + part + ']'; - } - // add the action string to the list - parts.push(part); - } - }); - - // insert things at the necessary indices - for (var i = inserts.length - 1; i >= 0; --i) { - if (inserts[i] !== null) { - parts.splice(i, 0, inserts[i]); - } - } - - // join all the action items with spaces - var text = parts.filter(function (part) { - return !!part; - }).join(' '); - - // clean up separators for mutually exclusive groups - text = text.replace(/([\[(]) /g, '$1'); // remove spaces - text = text.replace(/ ([\])])/g, '$1'); - text = text.replace(/\[ *\]/g, ''); // remove empty groups - text = text.replace(/\( *\)/g, ''); - text = text.replace(/\(([^|]*)\)/g, '$1'); // remove () from single action groups - - text = _.str.strip(text); - - // return the text - return text; -}; - -HelpFormatter.prototype._formatText = function (text) { - text = _.str.sprintf(text, {prog: this._prog}); - var textWidth = this._width - this._currentIndent; - var indentIncriment = _.str.repeat(' ', this._currentIndent); - return this._fillText(text, textWidth, indentIncriment) + $$.EOL + $$.EOL; -}; - -HelpFormatter.prototype._formatAction = function (action) { - var self = this; - - var helpText; - var helpLines; - var parts; - var indentFirst; - - // determine the required width and the entry label - var helpPosition = Math.min(this._actionMaxLength + 2, this._maxHelpPosition); - var helpWidth = this._width - helpPosition; - var actionWidth = helpPosition - this._currentIndent - 2; - var actionHeader = this._formatActionInvocation(action); - - // no help; start on same line and add a final newline - if (!action.help) { - actionHeader = _.str.repeat(' ', this._currentIndent) + actionHeader + $$.EOL; - - // short action name; start on the same line and pad two spaces - } else if (actionHeader.length <= actionWidth) { - actionHeader = _.str.repeat(' ', this._currentIndent) + - actionHeader + - ' ' + - _.str.repeat(' ', actionWidth - actionHeader.length); - indentFirst = 0; - - // long action name; start on the next line - } else { - actionHeader = _.str.repeat(' ', this._currentIndent) + actionHeader + $$.EOL; - indentFirst = helpPosition; - } - - // collect the pieces of the action help - parts = [actionHeader]; - - // if there was help for the action, add lines of help text - if (!!action.help) { - helpText = this._expandHelp(action); - helpLines = this._splitLines(helpText, helpWidth); - parts.push(_.str.repeat(' ', indentFirst) + helpLines[0] + $$.EOL); - helpLines.slice(1).forEach(function (line) { - parts.push(_.str.repeat(' ', helpPosition) + line + $$.EOL); - }); - - // or add a newline if the description doesn't end with one - } else if (actionHeader.charAt(actionHeader.length - 1) !== $$.EOL) { - parts.push($$.EOL); - } - // if there are any sub-actions, add their help as well - if (!!action._getSubactions) { - this._indent(); - action._getSubactions().forEach(function (subaction) { - parts.push(self._formatAction(subaction)); - }); - this._dedent(); - } - // return a single string - return this._joinParts(parts); -}; - -HelpFormatter.prototype._formatActionInvocation = function (action) { - if (!action.isOptional()) { - var format_func = this._metavarFormatter(action, action.dest); - var metavars = format_func(1); - return metavars[0]; - } else { - var parts = []; - var argsDefault; - var argsString; - - // if the Optional doesn't take a value, format is: -s, --long - if (action.nargs === 0) { - parts = parts.concat(action.optionStrings); - - // if the Optional takes a value, format is: -s ARGS, --long ARGS - } else { - argsDefault = action.dest.toUpperCase(); - argsString = this._formatArgs(action, argsDefault); - action.optionStrings.forEach(function (optionString) { - parts.push(optionString + ' ' + argsString); - }); - } - return parts.join(', '); - } -}; - -HelpFormatter.prototype._metavarFormatter = function (action, metavarDefault) { - var result; - - if (!!action.metavar || action.metavar === '') { - result = action.metavar; - } else if (!!action.choices) { - var choices = action.choices; - - if (_.isString(choices)) { - choices = choices.split('').join(', '); - } else if (_.isArray(choices)) { - choices = choices.join(','); - } - else - { - choices = _.keys(choices).join(','); - } - result = '{' + choices + '}'; - } else { - result = metavarDefault; - } - - return function (size) { - if (Array.isArray(result)) { - return result; - } else { - var metavars = []; - for (var i = 0; i < size; i += 1) { - metavars.push(result); - } - return metavars; - } - }; -}; - -HelpFormatter.prototype._formatArgs = function (action, metavarDefault) { - var result; - var metavars; - - var buildMetavar = this._metavarFormatter(action, metavarDefault); - - switch (action.nargs) { - case undefined: - case null: - metavars = buildMetavar(1); - result = '' + metavars[0]; - break; - case $$.OPTIONAL: - metavars = buildMetavar(1); - result = '[' + metavars[0] + ']'; - break; - case $$.ZERO_OR_MORE: - metavars = buildMetavar(2); - result = '[' + metavars[0] + ' [' + metavars[1] + ' ...]]'; - break; - case $$.ONE_OR_MORE: - metavars = buildMetavar(2); - result = '' + metavars[0] + ' [' + metavars[1] + ' ...]'; - break; - case $$.REMAINDER: - result = '...'; - break; - case $$.PARSER: - metavars = buildMetavar(1); - result = metavars[0] + ' ...'; - break; - default: - metavars = buildMetavar(action.nargs); - result = metavars.join(' '); - } - return result; -}; - -HelpFormatter.prototype._expandHelp = function (action) { - var actionProperty; - var actionValue; - - var params = {prog: this._prog}; - - for (actionProperty in action) { - if (action.hasOwnProperty(actionProperty)) { - actionValue = action[actionProperty]; - - if (actionValue !== $$.SUPPRESS) { - params[actionProperty] = actionValue; - } - } - } - - if (!!params.choices) { - if (_.isString(params.choices)) { - params.choices = params.choices.split('').join(', '); - } - else if (_.isArray(params.choices)) { - params.choices = params.choices.join(', '); - } - else { - params.choices = _.keys(params.choices).join(', '); - } - } - - return _.str.sprintf(this._getHelpString(action), params); -}; - -HelpFormatter.prototype._splitLines = function (text, width) { - var lines = []; - var delimiters = [" ", ".", ",", "!", "?"]; - var re = new RegExp('[' + delimiters.join('') + '][^' + delimiters.join('') + ']*$'); - - text = text.replace(/[\n\|\t]/g, ' '); - - text = _.str.strip(text); - text = text.replace(this._whitespaceMatcher, ' '); - - // Wraps the single paragraph in text (a string) so every line - // is at most width characters long. - text.split($$.EOL).forEach(function (line) { - if (width >= line.length) { - lines.push(line); - return; - } - - var wrapStart = 0; - var wrapEnd = width; - var delimiterIndex = 0; - while (wrapEnd <= line.length) { - if (wrapEnd !== line.length && delimiters.indexOf(line[wrapEnd] < -1)) { - delimiterIndex = (re.exec(line.substring(wrapStart, wrapEnd)) || {}).index; - wrapEnd = wrapStart + delimiterIndex + 1; - } - lines.push(line.substring(wrapStart, wrapEnd)); - wrapStart = wrapEnd; - wrapEnd += width; - } - if (wrapStart < line.length) { - lines.push(line.substring(wrapStart, wrapEnd)); - } - }); - - return lines; -}; - -HelpFormatter.prototype._fillText = function (text, width, indent) { - var lines = this._splitLines(text, width); - lines = lines.map(function (line) { - return indent + line; - }); - return lines.join($$.EOL); -}; - -HelpFormatter.prototype._getHelpString = function (action) { - return action.help; -}; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/namespace.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/namespace.js deleted file mode 100644 index 3546f2daf63d..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/namespace.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * class Namespace - * - * Simple object for storing attributes. Implements equality by attribute names - * and values, and provides a simple string representation. - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#the-namespace-object - **/ -'use strict'; - -var _ = require('underscore'); - -/** - * new Namespace(options) - * - options(object): predefined propertis for result object - * - **/ -var Namespace = module.exports = function Namespace(options) { - _.extend(this, options); -}; - -/** - * Namespace#isset(key) -> Boolean - * - key (string|number): property name - * - * Tells whenever `namespace` contains given `key` or not. - **/ -Namespace.prototype.isset = function (key) { - return _.has(this, key); -}; - -/** - * Namespace#set(key, value) -> self - * -key (string|number|object): propery name - * -value (mixed): new property value - * - * Set the property named key with value. - * If key object then set all key properties to namespace object - **/ -Namespace.prototype.set = function (key, value) { - if (typeof (key) === 'object') { - _.extend(this, key); - } else { - this[key] = value; - } - return this; -}; - -/** - * Namespace#get(key, defaultValue) -> mixed - * - key (string|number): property name - * - defaultValue (mixed): default value - * - * Return the property key or defaulValue if not set - **/ -Namespace.prototype.get = function (key, defaultValue) { - return !this[key] ? defaultValue: this[key]; -}; - -/** - * Namespace#unset(key, defaultValue) -> mixed - * - key (string|number): property name - * - defaultValue (mixed): default value - * - * Return data[key](and delete it) or defaultValue - **/ -Namespace.prototype.unset = function (key, defaultValue) { - var value = this[key]; - if (value !== null) { - delete this[key]; - return value; - } else { - return defaultValue; - } -}; diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.travis.yml b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.travis.yml deleted file mode 100644 index ab27b29b7188..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: ruby -rvm: - - 1.9.3 - -before_script: - - "export DISPLAY=:99.0" - - "sh -e /etc/init.d/xvfb start" - - sleep 2 \ No newline at end of file diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile deleted file mode 100644 index aed29c3ca3dd..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile +++ /dev/null @@ -1,4 +0,0 @@ -source "https://rubygems.org" - -gem 'uglifier' -gem 'rake' diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock deleted file mode 100644 index 2c52be466972..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock +++ /dev/null @@ -1,17 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - execjs (1.4.0) - multi_json (~> 1.0) - multi_json (1.3.6) - rake (0.9.2.2) - uglifier (1.3.0) - execjs (>= 0.3.0) - multi_json (~> 1.0, >= 1.0.2) - -PLATFORMS - ruby - -DEPENDENCIES - rake - uglifier diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown deleted file mode 100644 index 1a39ad965b46..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown +++ /dev/null @@ -1,814 +0,0 @@ -# Underscore.string [![Build Status](https://secure.travis-ci.org/epeli/underscore.string.png?branch=master)](http://travis-ci.org/epeli/underscore.string) # - - - -Javascript lacks complete string manipulation operations. -This an attempt to fill that gap. List of build-in methods can be found -for example from [Dive Into JavaScript][d]. - -[d]: http://www.diveintojavascript.com/core-javascript-reference/the-string-object - - -As name states this an extension for [Underscore.js][u], but it can be used -independently from **_s**-global variable. But with Underscore.js you can -use Object-Oriented style and chaining: - -[u]: http://documentcloud.github.com/underscore/ - -```javascript -_(" epeli ").chain().trim().capitalize().value() -=> "Epeli" -``` - -## Download ## - - * [Development version](https://raw.github.com/epeli/underscore.string/master/lib/underscore.string.js) *Uncompressed with Comments 18kb* - * [Production version](https://github.com/epeli/underscore.string/raw/master/dist/underscore.string.min.js) *Minified 7kb* - - -## Node.js installation ## - -**npm package** - - npm install underscore.string - -**Standalone usage**: - -```javascript -var _s = require('underscore.string'); -``` - -**Integrate with Underscore.js**: - -```javascript -var _ = require('underscore'); - -// Import Underscore.string to separate object, because there are conflict functions (include, reverse, contains) -_.str = require('underscore.string'); - -// Mix in non-conflict functions to Underscore namespace if you want -_.mixin(_.str.exports()); - -// All functions, include conflict, will be available through _.str object -_.str.include('Underscore.string', 'string'); // => true -``` - -**Or Integrate with Underscore.js without module loading** - -Run the following expression after Underscore.js and Underscore.string are loaded -```javascript -// _.str becomes a global variable if no module loading is detected -// Mix in non-conflict functions to Underscore namespace -_.mixin(_.str.exports()); -``` - -## String Functions ## - -For availability of functions in this way you need to mix in Underscore.string functions: - -```javascript -_.mixin(_.string.exports()); -``` - -otherwise functions from examples will be available through _.string or _.str objects: - -```javascript -_.str.capitalize('epeli') -=> "Epeli" -``` - -**numberFormat** _.numberFormat(number, [ decimals=0, decimalSeparator='.', orderSeparator=',']) - -Formats the numbers. - -```javascript -_.numberFormat(1000, 2) -=> "1,000.00" - -_.numberFormat(123456789.123, 5, '.', ',') -=> "123,456,789.12300" -``` - - -**levenshtein** _.levenshtein(string1, string2) - -Calculates [Levenshtein distance][ld] between two strings. -[ld]: http://en.wikipedia.org/wiki/Levenshtein_distance - -```javascript -_.levenshtein('kitten', 'kittah') -=> 2 -``` - -**capitalize** _.capitalize(string) - -Converts first letter of the string to uppercase. - -```javascript -_.capitalize("foo Bar") -=> "Foo Bar" -``` - -**chop** _.chop(string, step) - -```javascript -_.chop('whitespace', 3) -=> ['whi','tes','pac','e'] -``` - -**clean** _.clean(str) - -Compress some whitespaces to one. - -```javascript -_.clean(" foo bar ") -=> 'foo bar' -``` - -**chars** _.chars(str) - -```javascript -_.chars('Hello') -=> ['H','e','l','l','o'] -``` - -**swapCase** _.swapCase(str) - -Returns a copy of the string in which all the case-based characters have had their case swapped. - -```javascript -_.swapCase('hELLO') -=> 'Hello' -``` - -**include** available only through _.str object, because Underscore has function with the same name. - -```javascript -_.str.include("foobar", "ob") -=> true -``` - -(removed) **includes** _.includes(string, substring) - -Tests if string contains a substring. - -```javascript -_.includes("foobar", "ob") -=> true -``` - -**includes** function was removed - -But you can create it in this way, for compatibility with previous versions: - -```javascript -_.includes = _.str.include -``` - -**count** _.count(string, substring) - -```javascript -_('Hello world').count('l') -=> 3 -``` - -**escapeHTML** _.escapeHTML(string) - -Converts HTML special characters to their entity equivalents. - -```javascript -_('
    Blah blah blah
    ').escapeHTML(); -=> '<div>Blah blah blah</div>' -``` - -**unescapeHTML** _.unescapeHTML(string) - -Converts entity characters to HTML equivalents. - -```javascript -_('<div>Blah blah blah</div>').unescapeHTML(); -=> '
    Blah blah blah
    ' -``` - -**insert** _.insert(string, index, substing) - -```javascript -_('Hello ').insert(6, 'world') -=> 'Hello world' -``` - -**isBlank** _.isBlank(string) - -```javascript -_('').isBlank(); // => true -_('\n').isBlank(); // => true -_(' ').isBlank(); // => true -_('a').isBlank(); // => false -``` - -**join** _.join(separator, *strings) - -Joins strings together with given separator - -```javascript -_.join(" ", "foo", "bar") -=> "foo bar" -``` - -**lines** _.lines(str) - -```javascript -_.lines("Hello\nWorld") -=> ["Hello", "World"] -``` - -**reverse** available only through _.str object, because Underscore has function with the same name. - -Return reversed string: - -```javascript -_.str.reverse("foobar") -=> 'raboof' -``` - -**splice** _.splice(string, index, howmany, substring) - -Like a array splice. - -```javascript -_('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli') -=> 'https://edtsech@bitbucket.org/epeli/underscore.strings' -``` - -**startsWith** _.startsWith(string, starts) - -This method checks whether string starts with starts. - -```javascript -_("image.gif").startsWith("image") -=> true -``` - -**endsWith** _.endsWith(string, ends) - -This method checks whether string ends with ends. - -```javascript -_("image.gif").endsWith("gif") -=> true -``` - -**succ** _.succ(str) - -Returns the successor to str. - -```javascript -_('a').succ() -=> 'b' - -_('A').succ() -=> 'B' -``` - -**supplant** - -Supplant function was removed, use Underscore.js [template function][p]. - -[p]: http://documentcloud.github.com/underscore/#template - -**strip** alias for *trim* - -**lstrip** alias for *ltrim* - -**rstrip** alias for *rtrim* - -**titleize** _.titleize(string) - -```javascript -_('my name is epeli').titleize() -=> 'My Name Is Epeli' -``` - -**camelize** _.camelize(string) - -Converts underscored or dasherized string to a camelized one - -```javascript -_('-moz-transform').camelize() -=> 'MozTransform' -``` - -**classify** _.classify(string) - -Converts string to camelized class name - -```javascript -_('some_class_name').classify() -=> 'SomeClassName' -``` - -**underscored** _.underscored(string) - -Converts a camelized or dasherized string into an underscored one - -```javascript -_('MozTransform').underscored() -=> 'moz_transform' -``` - -**dasherize** _.dasherize(string) - -Converts a underscored or camelized string into an dasherized one - -```javascript -_('MozTransform').dasherize() -=> '-moz-transform' -``` - -**humanize** _.humanize(string) - -Converts an underscored, camelized, or dasherized string into a humanized one. -Also removes beginning and ending whitespace, and removes the postfix '_id'. - -```javascript -_(' capitalize dash-CamelCase_underscore trim ').humanize() -=> 'Capitalize dash camel case underscore trim' -``` - -**trim** _.trim(string, [characters]) - -trims defined characters from begining and ending of the string. -Defaults to whitespace characters. - -```javascript -_.trim(" foobar ") -=> "foobar" - -_.trim("_-foobar-_", "_-") -=> "foobar" -``` - - -**ltrim** _.ltrim(string, [characters]) - -Left trim. Similar to trim, but only for left side. - - -**rtrim** _.rtrim(string, [characters]) - -Right trim. Similar to trim, but only for right side. - -**truncate** _.truncate(string, length, truncateString) - -```javascript -_('Hello world').truncate(5) -=> 'Hello...' - -_('Hello').truncate(10) -=> 'Hello' -``` - -**prune** _.prune(string, length, pruneString) - -Elegant version of truncate. -Makes sure the pruned string does not exceed the original length. -Avoid half-chopped words when truncating. - -```javascript -_('Hello, world').prune(5) -=> 'Hello...' - -_('Hello, world').prune(8) -=> 'Hello...' - -_('Hello, world').prune(5, ' (read a lot more)') -=> 'Hello, world' (as adding "(read a lot more)" would be longer than the original string) - -_('Hello, cruel world').prune(15) -=> 'Hello, cruel...' - -_('Hello').prune(10) -=> 'Hello' -``` - -**words** _.words(str, delimiter=/\s+/) - -Split string by delimiter (String or RegExp), /\s+/ by default. - -```javascript -_.words(" I love you ") -=> ["I","love","you"] - -_.words("I_love_you", "_") -=> ["I","love","you"] - -_.words("I-love-you", /-/) -=> ["I","love","you"] - -_.words(" ") -=> [] -``` - -**sprintf** _.sprintf(string format, *arguments) - -C like string formatting. -Credits goes to [Alexandru Marasteanu][o]. -For more detailed documentation, see the [original page][o]. - -[o]: http://www.diveintojavascript.com/projects/sprintf-for-javascript - -```javascript -_.sprintf("%.1f", 1.17) -"1.2" -``` - -**pad** _.pad(str, length, [padStr, type]) - -pads the `str` with characters until the total string length is equal to the passed `length` parameter. By default, pads on the **left** with the space char (`" "`). `padStr` is truncated to a single character if necessary. - -```javascript -_.pad("1", 8) --> " 1"; - -_.pad("1", 8, '0') --> "00000001"; - -_.pad("1", 8, '0', 'right') --> "10000000"; - -_.pad("1", 8, '0', 'both') --> "00001000"; - -_.pad("1", 8, 'bleepblorp', 'both') --> "bbbb1bbb"; -``` - -**lpad** _.lpad(str, length, [padStr]) - -left-pad a string. Alias for `pad(str, length, padStr, 'left')` - -```javascript -_.lpad("1", 8, '0') --> "00000001"; -``` - -**rpad** _.rpad(str, length, [padStr]) - -right-pad a string. Alias for `pad(str, length, padStr, 'right')` - -```javascript -_.rpad("1", 8, '0') --> "10000000"; -``` - -**lrpad** _.lrpad(str, length, [padStr]) - -left/right-pad a string. Alias for `pad(str, length, padStr, 'both')` - -```javascript -_.lrpad("1", 8, '0') --> "00001000"; -``` - -**center** alias for **lrpad** - -**ljust** alias for *rpad* - -**rjust** alias for *lpad* - -**toNumber** _.toNumber(string, [decimals]) - -Parse string to number. Returns NaN if string can't be parsed to number. - -```javascript -_('2.556').toNumber() -=> 3 - -_('2.556').toNumber(1) -=> 2.6 -``` - -**strRight** _.strRight(string, pattern) - -Searches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found. - -```javascript -_('This_is_a_test_string').strRight('_') -=> "is_a_test_string"; -``` - -**strRightBack** _.strRightBack(string, pattern) - -Searches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found. - -```javascript -_('This_is_a_test_string').strRightBack('_') -=> "string"; -``` - -**strLeft** _.strLeft(string, pattern) - -Searches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found. - -```javascript -_('This_is_a_test_string').strLeft('_') -=> "This"; -``` - -**strLeftBack** _.strLeftBack(string, pattern) - -Searches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found. - -```javascript -_('This_is_a_test_string').strLeftBack('_') -=> "This_is_a_test"; -``` - -**stripTags** - -Removes all html tags from string. - -```javascript -_('a link').stripTags() -=> 'a link' - -_('a link').stripTags() -=> 'a linkalert("hello world!")' -``` - -**toSentence** _.toSentence(array, [delimiter, lastDelimiter]) - -Join an array into a human readable sentence. - -```javascript -_.toSentence(['jQuery', 'Mootools', 'Prototype']) -=> 'jQuery, Mootools and Prototype'; - -_.toSentence(['jQuery', 'Mootools', 'Prototype'], ', ', ' unt ') -=> 'jQuery, Mootools unt Prototype'; -``` - -**toSentenceSerial** _.toSentenceSerial(array, [delimiter, lastDelimiter]) - -The same as `toSentence`, but adjusts delimeters to use [Serial comma](http://en.wikipedia.org/wiki/Serial_comma). - -```javascript -_.toSentenceSerial(['jQuery', 'Mootools']) -=> 'jQuery and Mootools'; - -_.toSentenceSerial(['jQuery', 'Mootools', 'Prototype']) -=> 'jQuery, Mootools, and Prototype' - -_.toSentenceSerial(['jQuery', 'Mootools', 'Prototype'], ', ', ' unt '); -=> 'jQuery, Mootools, unt Prototype'; -``` - -**repeat** _.repeat(string, count, [separator]) - -Repeats a string count times. - -```javascript -_.repeat("foo", 3) -=> 'foofoofoo'; - -_.repeat("foo", 3, "bar") -=> 'foobarfoobarfoo' -``` - -**surround** _.surround(string, wrap) - -Surround a string with another string. - -```javascript -_.surround("foo", "ab") -=> 'abfooab'; -``` - -**quote** _.quote(string, quoteChar) or _.q(string, quoteChar) - -Quotes a string. `quoteChar` defaults to `"`. - -```javascript -_.quote('foo', quoteChar) -=> '"foo"'; -``` -**unquote** _.unquote(string, quoteChar) - -Unquotes a string. `quoteChar` defaults to `"`. - -```javascript -_.unquote('"foo"') -=> 'foo'; -_.unquote("'foo'", "'") -=> 'foo'; -``` - - -**slugify** _.slugify(string) - -Transform text into a URL slug. Replaces whitespaces, accentuated, and special characters with a dash. - -```javascript -_.slugify("Un éléphant à l'orée du bois") -=> 'un-elephant-a-loree-du-bois'; -``` - -***Caution: this function is charset dependent*** - -**naturalCmp** array.sort(_.naturalCmp) - -Naturally sort strings like humans would do. - -```javascript -['foo20', 'foo5'].sort(_.naturalCmp) -=> [ 'foo5', 'foo20' ] -``` - -**toBoolean** _.toBoolean(string) or _.toBool(string) - -Turn strings that can be commonly considered as booleas to real booleans. Such as "true", "false", "1" and "0". This function is case insensitive. - -```javascript -_.toBoolean("true") -=> true -_.toBoolean("FALSE") -=> false -_.toBoolean("random") -=> undefined -``` - -It can be customized by giving arrays of truth and falsy value matcher as parameters. Matchers can be also RegExp objects. - -```javascript -_.toBoolean("truthy", ["truthy"], ["falsy"]) -=> true -_.toBoolean("true only at start", [/^true/]) -=> true -``` - -## Roadmap ## - -Any suggestions or bug reports are welcome. Just email me or more preferably open an issue. - -#### Problems - -We lose two things for `include` and `reverse` methods from `_.string`: - -* Calls like `_('foobar').include('bar')` aren't available; -* Chaining isn't available too. - -But if you need this functionality you can create aliases for conflict functions which will be convenient for you: - -```javascript -_.mixin({ - includeString: _.str.include, - reverseString: _.str.reverse -}) - -// Now wrapper calls and chaining are available. -_('foobar').chain().reverseString().includeString('rab').value() -``` - -#### Standalone Usage - -If you are using Underscore.string without Underscore. You also have `_.string` namespace for it and `_.str` alias -But of course you can just reassign `_` variable with `_.string` - -```javascript -_ = _.string -``` - -## Changelog ## - -### 2.3.3 ### - -* Add `toBoolean` -* Add `unquote` -* Add quote char option to `quote` -* Support dash-separated words in `titleize` - -### 2.3.2 ### - -* Add `naturalCmp` -* Bug fix to `camelize` -* Add ă, ș, ț and ś to `slugify` -* Doc updates -* Add support for [component](http://component.io/) -* [Full changelog](https://github.com/epeli/underscore.string/compare/v2.3.1...v2.3.2) - -### 2.3.1 ### - -* Bug fixes to `escapeHTML`, `classify`, `substr` -* Faster `count` -* Documentation fixes -* [Full changelog](https://github.com/epeli/underscore.string/compare/v2.3.0...v2.3.1) - -### 2.3.0 ### - -* Added `numberformat` method -* Added `levenshtein` method (Levenshtein distance calculation) -* Added `swapCase` method -* Changed default behavior of `words` method -* Added `toSentenceSerial` method -* Added `surround` and `quote` methods - -### 2.2.1 ### - -* Same as 2.2.0 (2.2.0rc on npm) to fix some npm drama - -### 2.2.0 ### - -* Capitalize method behavior changed -* Various perfomance tweaks - -### 2.1.1### - -* Fixed words method bug -* Added classify method - -### 2.1.0 ### - -* AMD support -* Added toSentence method -* Added slugify method -* Lots of speed optimizations - -### 2.0.0 ### - -* Added prune, humanize functions -* Added _.string (_.str) namespace for Underscore.string library -* Removed includes function - -For upgrading to this version you need to mix in Underscore.string library to Underscore object: - -```javascript -_.mixin(_.string.exports()); -``` - -and all non-conflict Underscore.string functions will be available through Underscore object. -Also function `includes` has been removed, you should replace this function by `_.str.include` -or create alias `_.includes = _.str.include` and all your code will work fine. - -### 1.1.6 ### - -* Fixed reverse and truncate -* Added isBlank, stripTags, inlude(alias for includes) -* Added uglifier compression - -### 1.1.5 ### - -* Added strRight, strRightBack, strLeft, strLeftBack - -### 1.1.4 ### - -* Added pad, lpad, rpad, lrpad methods and aliases center, ljust, rjust -* Integration with Underscore 1.1.6 - -### 1.1.3 ### - -* Added methods: underscored, camelize, dasherize -* Support newer version of npm - -### 1.1.2 ### - -* Created functions: lines, chars, words functions - -### 1.0.2 ### - -* Created integration test suite with underscore.js 1.1.4 (now it's absolutely compatible) -* Removed 'reverse' function, because this function override underscore.js 'reverse' - -## Contribute ## - -* Fork & pull request. Don't forget about tests. -* If you planning add some feature please create issue before. - -Otherwise changes will be rejected. - -## Contributors list ## -[Can be found here](https://github.com/epeli/underscore.string/graphs/contributors). - - -## Licence ## - -The MIT License - -Copyright (c) 2011 Esa-Matti Suuronen esa-matti@suuronen.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile deleted file mode 100644 index 2cd9eed9738d..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile +++ /dev/null @@ -1,23 +0,0 @@ -# encoding: utf-8 -task default: :test - -desc 'Use UglifyJS to compress Underscore.string' -task :build do - require 'uglifier' - source = File.read('lib/underscore.string.js', :encoding => 'utf-8') - compressed = Uglifier.compile(source, copyright: false) - File.open('dist/underscore.string.min.js', 'w'){ |f| f.write compressed } - compression_rate = compressed.length.to_f/source.length - puts "compressed dist/underscore.string.min.js: #{compressed.length}/#{source.length} #{(compression_rate * 100).round}%" -end - -desc 'Run tests' -task :test do - puts "Running underscore.string test suite." - result1 = system %{phantomjs ./test/run-qunit.js "test/test.html"} - - puts "Running Underscore test suite." - result2 = system %{phantomjs ./test/run-qunit.js "test/test_underscore/index.html"} - - exit(result1 && result2 ? 0 : 1) -end diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json deleted file mode 100644 index ae91b65b5feb..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "underscore.string", - "repo": "epeli/underscore.string", - "description": "String manipulation extensions for Underscore.js javascript library", - "version": "2.3.3", - "keywords": ["underscore", "string"], - "dependencies": {}, - "development": {}, - "main": "lib/underscore.string.js", - "scripts": ["lib/underscore.string.js"] -} diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js deleted file mode 100644 index 4f6b2b93e87b..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,n){"use strict";function r(e,n){var r,t,u=e.toLowerCase();for(n=[].concat(n),r=0;n.length>r;r+=1)if(t=n[r]){if(t.test&&t.test(e))return!0;if(t.toLowerCase()===u)return!0}}var t=n.prototype.trim,u=n.prototype.trimRight,i=n.prototype.trimLeft,l=function(e){return 1*e||0},o=function(e,n){if(1>n)return"";for(var r="";n>0;)1&n&&(r+=e),n>>=1,e+=e;return r},a=[].slice,c=function(e){return null==e?"\\s":e.source?e.source:"["+g.escapeRegExp(e)+"]"},s={lt:"<",gt:">",quot:'"',amp:"&",apos:"'"},f={};for(var p in s)f[s[p]]=p;f["'"]="#39";var h=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var r=o,t=function(){return t.cache.hasOwnProperty(arguments[0])||(t.cache[arguments[0]]=t.parse(arguments[0])),t.format.call(null,t.cache[arguments[0]],arguments)};return t.format=function(t,u){var i,l,o,a,c,s,f,p=1,g=t.length,d="",m=[];for(l=0;g>l;l++)if(d=e(t[l]),"string"===d)m.push(t[l]);else if("array"===d){if(a=t[l],a[2])for(i=u[p],o=0;a[2].length>o;o++){if(!i.hasOwnProperty(a[2][o]))throw new Error(h('[_.sprintf] property "%s" does not exist',a[2][o]));i=i[a[2][o]]}else i=a[1]?u[a[1]]:u[p++];if(/[^s]/.test(a[8])&&"number"!=e(i))throw new Error(h("[_.sprintf] expecting number but found %s",e(i)));switch(a[8]){case"b":i=i.toString(2);break;case"c":i=n.fromCharCode(i);break;case"d":i=parseInt(i,10);break;case"e":i=a[7]?i.toExponential(a[7]):i.toExponential();break;case"f":i=a[7]?parseFloat(i).toFixed(a[7]):parseFloat(i);break;case"o":i=i.toString(8);break;case"s":i=(i=n(i))&&a[7]?i.substring(0,a[7]):i;break;case"u":i=Math.abs(i);break;case"x":i=i.toString(16);break;case"X":i=i.toString(16).toUpperCase()}i=/[def]/.test(a[8])&&a[3]&&i>=0?"+"+i:i,s=a[4]?"0"==a[4]?"0":a[4].charAt(1):" ",f=a[6]-n(i).length,c=a[6]?r(s,f):"",m.push(a[5]?i+c:c+i)}return m.join("")},t.cache={},t.parse=function(e){for(var n=e,r=[],t=[],u=0;n;){if(null!==(r=/^[^\x25]+/.exec(n)))t.push(r[0]);else if(null!==(r=/^\x25{2}/.exec(n)))t.push("%");else{if(null===(r=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(n)))throw new Error("[_.sprintf] huh?");if(r[2]){u|=1;var i=[],l=r[2],o=[];if(null===(o=/^([a-z_][a-z_\d]*)/i.exec(l)))throw new Error("[_.sprintf] huh?");for(i.push(o[1]);""!==(l=l.substring(o[0].length));)if(null!==(o=/^\.([a-z_][a-z_\d]*)/i.exec(l)))i.push(o[1]);else{if(null===(o=/^\[(\d+)\]/.exec(l)))throw new Error("[_.sprintf] huh?");i.push(o[1])}r[2]=i}else u|=2;if(3===u)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");t.push(r)}n=n.substring(r[0].length)}return t},t}(),g={VERSION:"2.3.0",isBlank:function(e){return null==e&&(e=""),/^\s*$/.test(e)},stripTags:function(e){return null==e?"":n(e).replace(/<\/?[^>]+>/g,"")},capitalize:function(e){return e=null==e?"":n(e),e.charAt(0).toUpperCase()+e.slice(1)},chop:function(e,r){return null==e?[]:(e=n(e),r=~~r,r>0?e.match(new RegExp(".{1,"+r+"}","g")):[e])},clean:function(e){return g.strip(e).replace(/\s+/g," ")},count:function(e,r){if(null==e||null==r)return 0;e=n(e),r=n(r);for(var t=0,u=0,i=r.length;;){if(u=e.indexOf(r,u),-1===u)break;t++,u+=i}return t},chars:function(e){return null==e?[]:n(e).split("")},swapCase:function(e){return null==e?"":n(e).replace(/\S/g,function(e){return e===e.toUpperCase()?e.toLowerCase():e.toUpperCase()})},escapeHTML:function(e){return null==e?"":n(e).replace(/[&<>"']/g,function(e){return"&"+f[e]+";"})},unescapeHTML:function(e){return null==e?"":n(e).replace(/\&([^;]+);/g,function(e,r){var t;return r in s?s[r]:(t=r.match(/^#x([\da-fA-F]+)$/))?n.fromCharCode(parseInt(t[1],16)):(t=r.match(/^#(\d+)$/))?n.fromCharCode(~~t[1]):e})},escapeRegExp:function(e){return null==e?"":n(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(e,n,r,t){var u=g.chars(e);return u.splice(~~n,~~r,t),u.join("")},insert:function(e,n,r){return g.splice(e,n,0,r)},include:function(e,r){return""===r?!0:null==e?!1:-1!==n(e).indexOf(r)},join:function(){var e=a.call(arguments),n=e.shift();return null==n&&(n=""),e.join(n)},lines:function(e){return null==e?[]:n(e).split("\n")},reverse:function(e){return g.chars(e).reverse().join("")},startsWith:function(e,r){return""===r?!0:null==e||null==r?!1:(e=n(e),r=n(r),e.length>=r.length&&e.slice(0,r.length)===r)},endsWith:function(e,r){return""===r?!0:null==e||null==r?!1:(e=n(e),r=n(r),e.length>=r.length&&e.slice(e.length-r.length)===r)},succ:function(e){return null==e?"":(e=n(e),e.slice(0,-1)+n.fromCharCode(e.charCodeAt(e.length-1)+1))},titleize:function(e){return null==e?"":(e=n(e).toLowerCase(),e.replace(/(?:^|\s|-)\S/g,function(e){return e.toUpperCase()}))},camelize:function(e){return g.trim(e).replace(/[-_\s]+(.)?/g,function(e,n){return n?n.toUpperCase():""})},underscored:function(e){return g.trim(e).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(e){return g.trim(e).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()},classify:function(e){return g.titleize(n(e).replace(/[\W_]/g," ")).replace(/\s/g,"")},humanize:function(e){return g.capitalize(g.underscored(e).replace(/_id$/,"").replace(/_/g," "))},trim:function(e,r){return null==e?"":!r&&t?t.call(e):(r=c(r),n(e).replace(new RegExp("^"+r+"+|"+r+"+$","g"),""))},ltrim:function(e,r){return null==e?"":!r&&i?i.call(e):(r=c(r),n(e).replace(new RegExp("^"+r+"+"),""))},rtrim:function(e,r){return null==e?"":!r&&u?u.call(e):(r=c(r),n(e).replace(new RegExp(r+"+$"),""))},truncate:function(e,r,t){return null==e?"":(e=n(e),t=t||"...",r=~~r,e.length>r?e.slice(0,r)+t:e)},prune:function(e,r,t){if(null==e)return"";if(e=n(e),r=~~r,t=null!=t?n(t):"...",r>=e.length)return e;var u=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},i=e.slice(0,r+1).replace(/.(?=\W*\w*$)/g,u);return i=i.slice(i.length-2).match(/\w\w/)?i.replace(/\s*\S+$/,""):g.rtrim(i.slice(0,i.length-1)),(i+t).length>e.length?e:e.slice(0,i.length)+t},words:function(e,n){return g.isBlank(e)?[]:g.trim(e,n).split(n||/\s+/)},pad:function(e,r,t,u){e=null==e?"":n(e),r=~~r;var i=0;switch(t?t.length>1&&(t=t.charAt(0)):t=" ",u){case"right":return i=r-e.length,e+o(t,i);case"both":return i=r-e.length,o(t,Math.ceil(i/2))+e+o(t,Math.floor(i/2));default:return i=r-e.length,o(t,i)+e}},lpad:function(e,n,r){return g.pad(e,n,r)},rpad:function(e,n,r){return g.pad(e,n,r,"right")},lrpad:function(e,n,r){return g.pad(e,n,r,"both")},sprintf:h,vsprintf:function(e,n){return n.unshift(e),h.apply(null,n)},toNumber:function(e,n){return e?(e=g.trim(e),e.match(/^-?\d+(?:\.\d+)?$/)?l(l(e).toFixed(~~n)):0/0):0},numberFormat:function(e,n,r,t){if(isNaN(e)||null==e)return"";e=e.toFixed(~~n),t="string"==typeof t?t:",";var u=e.split("."),i=u[0],l=u[1]?(r||".")+u[1]:"";return i.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+t)+l},strRight:function(e,r){if(null==e)return"";e=n(e),r=null!=r?n(r):r;var t=r?e.indexOf(r):-1;return~t?e.slice(t+r.length,e.length):e},strRightBack:function(e,r){if(null==e)return"";e=n(e),r=null!=r?n(r):r;var t=r?e.lastIndexOf(r):-1;return~t?e.slice(t+r.length,e.length):e},strLeft:function(e,r){if(null==e)return"";e=n(e),r=null!=r?n(r):r;var t=r?e.indexOf(r):-1;return~t?e.slice(0,t):e},strLeftBack:function(e,n){if(null==e)return"";e+="",n=null!=n?""+n:n;var r=e.lastIndexOf(n);return~r?e.slice(0,r):e},toSentence:function(e,n,r,t){n=n||", ",r=r||" and ";var u=e.slice(),i=u.pop();return e.length>2&&t&&(r=g.rtrim(n)+r),u.length?u.join(n)+r+i:i},toSentenceSerial:function(){var e=a.call(arguments);return e[3]=!0,g.toSentence.apply(g,e)},slugify:function(e){if(null==e)return"";var r="ąàáäâãåæăćęèéëêìíïîłńòóöôõøśșțùúüûñçżź",t="aaaaaaaaaceeeeeiiiilnoooooosstuuuunczz",u=new RegExp(c(r),"g");return e=n(e).toLowerCase().replace(u,function(e){var n=r.indexOf(e);return t.charAt(n)||"-"}),g.dasherize(e.replace(/[^\w\s-]/g,""))},surround:function(e,n){return[n,e,n].join("")},quote:function(e,n){return g.surround(e,n||'"')},unquote:function(e,n){return n=n||'"',e[0]===n&&e[e.length-1]===n?e.slice(1,e.length-1):e},exports:function(){var e={};for(var n in this)this.hasOwnProperty(n)&&!n.match(/^(?:include|contains|reverse)$/)&&(e[n]=this[n]);return e},repeat:function(e,r,t){if(null==e)return"";if(r=~~r,null==t)return o(n(e),r);for(var u=[];r>0;u[--r]=e);return u.join(t)},naturalCmp:function(e,r){if(e==r)return 0;if(!e)return-1;if(!r)return 1;for(var t=/(\.\d+)|(\d+)|(\D+)/g,u=n(e).toLowerCase().match(t),i=n(r).toLowerCase().match(t),l=Math.min(u.length,i.length),o=0;l>o;o++){var a=u[o],c=i[o];if(a!==c){var s=parseInt(a,10);if(!isNaN(s)){var f=parseInt(c,10);if(!isNaN(f)&&s-f)return s-f}return c>a?-1:1}}return u.length===i.length?u.length-i.length:r>e?-1:1},levenshtein:function(e,r){if(null==e&&null==r)return 0;if(null==e)return n(r).length;if(null==r)return n(e).length;e=n(e),r=n(r);for(var t,u,i=[],l=0;r.length>=l;l++)for(var o=0;e.length>=o;o++)u=l&&o?e.charAt(o-1)===r.charAt(l-1)?t:Math.min(i[o],i[o-1],t)+1:l+o,t=i[o],i[o]=u;return i.pop()},toBoolean:function(e,n,t){return"number"==typeof e&&(e=""+e),"string"!=typeof e?!!e:(e=g.trim(e),r(e,n||["true","1"])?!0:r(e,t||["false","0"])?!1:void 0)}};g.strip=g.trim,g.lstrip=g.ltrim,g.rstrip=g.rtrim,g.center=g.lrpad,g.rjust=g.lpad,g.ljust=g.rpad,g.contains=g.include,g.q=g.quote,g.toBool=g.toBoolean,"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(module.exports=g),exports._s=g),"function"==typeof define&&define.amd&&define("underscore.string",[],function(){return g}),e._=e._||{},e._.string=e._.str=g}(this,String); \ No newline at end of file diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js deleted file mode 100644 index 87611173bace..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js +++ /dev/null @@ -1,673 +0,0 @@ -// Underscore.string -// (c) 2010 Esa-Matti Suuronen -// Underscore.string is freely distributable under the terms of the MIT license. -// Documentation: https://github.com/epeli/underscore.string -// Some code is borrowed from MooTools and Alexandru Marasteanu. -// Version '2.3.2' - -!function(root, String){ - 'use strict'; - - // Defining helper functions. - - var nativeTrim = String.prototype.trim; - var nativeTrimRight = String.prototype.trimRight; - var nativeTrimLeft = String.prototype.trimLeft; - - var parseNumber = function(source) { return source * 1 || 0; }; - - var strRepeat = function(str, qty){ - if (qty < 1) return ''; - var result = ''; - while (qty > 0) { - if (qty & 1) result += str; - qty >>= 1, str += str; - } - return result; - }; - - var slice = [].slice; - - var defaultToWhiteSpace = function(characters) { - if (characters == null) - return '\\s'; - else if (characters.source) - return characters.source; - else - return '[' + _s.escapeRegExp(characters) + ']'; - }; - - // Helper for toBoolean - function boolMatch(s, matchers) { - var i, matcher, down = s.toLowerCase(); - matchers = [].concat(matchers); - for (i = 0; i < matchers.length; i += 1) { - matcher = matchers[i]; - if (!matcher) continue; - if (matcher.test && matcher.test(s)) return true; - if (matcher.toLowerCase() === down) return true; - } - } - - var escapeChars = { - lt: '<', - gt: '>', - quot: '"', - amp: '&', - apos: "'" - }; - - var reversedEscapeChars = {}; - for(var key in escapeChars) reversedEscapeChars[escapeChars[key]] = key; - reversedEscapeChars["'"] = '#39'; - - // sprintf() for JavaScript 0.7-beta1 - // http://www.diveintojavascript.com/projects/javascript-sprintf - // - // Copyright (c) Alexandru Marasteanu - // All rights reserved. - - var sprintf = (function() { - function get_type(variable) { - return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase(); - } - - var str_repeat = strRepeat; - - var str_format = function() { - if (!str_format.cache.hasOwnProperty(arguments[0])) { - str_format.cache[arguments[0]] = str_format.parse(arguments[0]); - } - return str_format.format.call(null, str_format.cache[arguments[0]], arguments); - }; - - str_format.format = function(parse_tree, argv) { - var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length; - for (i = 0; i < tree_length; i++) { - node_type = get_type(parse_tree[i]); - if (node_type === 'string') { - output.push(parse_tree[i]); - } - else if (node_type === 'array') { - match = parse_tree[i]; // convenience purposes only - if (match[2]) { // keyword argument - arg = argv[cursor]; - for (k = 0; k < match[2].length; k++) { - if (!arg.hasOwnProperty(match[2][k])) { - throw new Error(sprintf('[_.sprintf] property "%s" does not exist', match[2][k])); - } - arg = arg[match[2][k]]; - } - } else if (match[1]) { // positional argument (explicit) - arg = argv[match[1]]; - } - else { // positional argument (implicit) - arg = argv[cursor++]; - } - - if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) { - throw new Error(sprintf('[_.sprintf] expecting number but found %s', get_type(arg))); - } - switch (match[8]) { - case 'b': arg = arg.toString(2); break; - case 'c': arg = String.fromCharCode(arg); break; - case 'd': arg = parseInt(arg, 10); break; - case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break; - case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break; - case 'o': arg = arg.toString(8); break; - case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break; - case 'u': arg = Math.abs(arg); break; - case 'x': arg = arg.toString(16); break; - case 'X': arg = arg.toString(16).toUpperCase(); break; - } - arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg); - pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' '; - pad_length = match[6] - String(arg).length; - pad = match[6] ? str_repeat(pad_character, pad_length) : ''; - output.push(match[5] ? arg + pad : pad + arg); - } - } - return output.join(''); - }; - - str_format.cache = {}; - - str_format.parse = function(fmt) { - var _fmt = fmt, match = [], parse_tree = [], arg_names = 0; - while (_fmt) { - if ((match = /^[^\x25]+/.exec(_fmt)) !== null) { - parse_tree.push(match[0]); - } - else if ((match = /^\x25{2}/.exec(_fmt)) !== null) { - parse_tree.push('%'); - } - else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) { - if (match[2]) { - arg_names |= 1; - var field_list = [], replacement_field = match[2], field_match = []; - if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') { - if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - } - else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - } - else { - throw new Error('[_.sprintf] huh?'); - } - } - } - else { - throw new Error('[_.sprintf] huh?'); - } - match[2] = field_list; - } - else { - arg_names |= 2; - } - if (arg_names === 3) { - throw new Error('[_.sprintf] mixing positional and named placeholders is not (yet) supported'); - } - parse_tree.push(match); - } - else { - throw new Error('[_.sprintf] huh?'); - } - _fmt = _fmt.substring(match[0].length); - } - return parse_tree; - }; - - return str_format; - })(); - - - - // Defining underscore.string - - var _s = { - - VERSION: '2.3.0', - - isBlank: function(str){ - if (str == null) str = ''; - return (/^\s*$/).test(str); - }, - - stripTags: function(str){ - if (str == null) return ''; - return String(str).replace(/<\/?[^>]+>/g, ''); - }, - - capitalize : function(str){ - str = str == null ? '' : String(str); - return str.charAt(0).toUpperCase() + str.slice(1); - }, - - chop: function(str, step){ - if (str == null) return []; - str = String(str); - step = ~~step; - return step > 0 ? str.match(new RegExp('.{1,' + step + '}', 'g')) : [str]; - }, - - clean: function(str){ - return _s.strip(str).replace(/\s+/g, ' '); - }, - - count: function(str, substr){ - if (str == null || substr == null) return 0; - - str = String(str); - substr = String(substr); - - var count = 0, - pos = 0, - length = substr.length; - - while (true) { - pos = str.indexOf(substr, pos); - if (pos === -1) break; - count++; - pos += length; - } - - return count; - }, - - chars: function(str) { - if (str == null) return []; - return String(str).split(''); - }, - - swapCase: function(str) { - if (str == null) return ''; - return String(str).replace(/\S/g, function(c){ - return c === c.toUpperCase() ? c.toLowerCase() : c.toUpperCase(); - }); - }, - - escapeHTML: function(str) { - if (str == null) return ''; - return String(str).replace(/[&<>"']/g, function(m){ return '&' + reversedEscapeChars[m] + ';'; }); - }, - - unescapeHTML: function(str) { - if (str == null) return ''; - return String(str).replace(/\&([^;]+);/g, function(entity, entityCode){ - var match; - - if (entityCode in escapeChars) { - return escapeChars[entityCode]; - } else if (match = entityCode.match(/^#x([\da-fA-F]+)$/)) { - return String.fromCharCode(parseInt(match[1], 16)); - } else if (match = entityCode.match(/^#(\d+)$/)) { - return String.fromCharCode(~~match[1]); - } else { - return entity; - } - }); - }, - - escapeRegExp: function(str){ - if (str == null) return ''; - return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); - }, - - splice: function(str, i, howmany, substr){ - var arr = _s.chars(str); - arr.splice(~~i, ~~howmany, substr); - return arr.join(''); - }, - - insert: function(str, i, substr){ - return _s.splice(str, i, 0, substr); - }, - - include: function(str, needle){ - if (needle === '') return true; - if (str == null) return false; - return String(str).indexOf(needle) !== -1; - }, - - join: function() { - var args = slice.call(arguments), - separator = args.shift(); - - if (separator == null) separator = ''; - - return args.join(separator); - }, - - lines: function(str) { - if (str == null) return []; - return String(str).split("\n"); - }, - - reverse: function(str){ - return _s.chars(str).reverse().join(''); - }, - - startsWith: function(str, starts){ - if (starts === '') return true; - if (str == null || starts == null) return false; - str = String(str); starts = String(starts); - return str.length >= starts.length && str.slice(0, starts.length) === starts; - }, - - endsWith: function(str, ends){ - if (ends === '') return true; - if (str == null || ends == null) return false; - str = String(str); ends = String(ends); - return str.length >= ends.length && str.slice(str.length - ends.length) === ends; - }, - - succ: function(str){ - if (str == null) return ''; - str = String(str); - return str.slice(0, -1) + String.fromCharCode(str.charCodeAt(str.length-1) + 1); - }, - - titleize: function(str){ - if (str == null) return ''; - str = String(str).toLowerCase(); - return str.replace(/(?:^|\s|-)\S/g, function(c){ return c.toUpperCase(); }); - }, - - camelize: function(str){ - return _s.trim(str).replace(/[-_\s]+(.)?/g, function(match, c){ return c ? c.toUpperCase() : ""; }); - }, - - underscored: function(str){ - return _s.trim(str).replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/[-\s]+/g, '_').toLowerCase(); - }, - - dasherize: function(str){ - return _s.trim(str).replace(/([A-Z])/g, '-$1').replace(/[-_\s]+/g, '-').toLowerCase(); - }, - - classify: function(str){ - return _s.titleize(String(str).replace(/[\W_]/g, ' ')).replace(/\s/g, ''); - }, - - humanize: function(str){ - return _s.capitalize(_s.underscored(str).replace(/_id$/,'').replace(/_/g, ' ')); - }, - - trim: function(str, characters){ - if (str == null) return ''; - if (!characters && nativeTrim) return nativeTrim.call(str); - characters = defaultToWhiteSpace(characters); - return String(str).replace(new RegExp('\^' + characters + '+|' + characters + '+$', 'g'), ''); - }, - - ltrim: function(str, characters){ - if (str == null) return ''; - if (!characters && nativeTrimLeft) return nativeTrimLeft.call(str); - characters = defaultToWhiteSpace(characters); - return String(str).replace(new RegExp('^' + characters + '+'), ''); - }, - - rtrim: function(str, characters){ - if (str == null) return ''; - if (!characters && nativeTrimRight) return nativeTrimRight.call(str); - characters = defaultToWhiteSpace(characters); - return String(str).replace(new RegExp(characters + '+$'), ''); - }, - - truncate: function(str, length, truncateStr){ - if (str == null) return ''; - str = String(str); truncateStr = truncateStr || '...'; - length = ~~length; - return str.length > length ? str.slice(0, length) + truncateStr : str; - }, - - /** - * _s.prune: a more elegant version of truncate - * prune extra chars, never leaving a half-chopped word. - * @author github.com/rwz - */ - prune: function(str, length, pruneStr){ - if (str == null) return ''; - - str = String(str); length = ~~length; - pruneStr = pruneStr != null ? String(pruneStr) : '...'; - - if (str.length <= length) return str; - - var tmpl = function(c){ return c.toUpperCase() !== c.toLowerCase() ? 'A' : ' '; }, - template = str.slice(0, length+1).replace(/.(?=\W*\w*$)/g, tmpl); // 'Hello, world' -> 'HellAA AAAAA' - - if (template.slice(template.length-2).match(/\w\w/)) - template = template.replace(/\s*\S+$/, ''); - else - template = _s.rtrim(template.slice(0, template.length-1)); - - return (template+pruneStr).length > str.length ? str : str.slice(0, template.length)+pruneStr; - }, - - words: function(str, delimiter) { - if (_s.isBlank(str)) return []; - return _s.trim(str, delimiter).split(delimiter || /\s+/); - }, - - pad: function(str, length, padStr, type) { - str = str == null ? '' : String(str); - length = ~~length; - - var padlen = 0; - - if (!padStr) - padStr = ' '; - else if (padStr.length > 1) - padStr = padStr.charAt(0); - - switch(type) { - case 'right': - padlen = length - str.length; - return str + strRepeat(padStr, padlen); - case 'both': - padlen = length - str.length; - return strRepeat(padStr, Math.ceil(padlen/2)) + str - + strRepeat(padStr, Math.floor(padlen/2)); - default: // 'left' - padlen = length - str.length; - return strRepeat(padStr, padlen) + str; - } - }, - - lpad: function(str, length, padStr) { - return _s.pad(str, length, padStr); - }, - - rpad: function(str, length, padStr) { - return _s.pad(str, length, padStr, 'right'); - }, - - lrpad: function(str, length, padStr) { - return _s.pad(str, length, padStr, 'both'); - }, - - sprintf: sprintf, - - vsprintf: function(fmt, argv){ - argv.unshift(fmt); - return sprintf.apply(null, argv); - }, - - toNumber: function(str, decimals) { - if (!str) return 0; - str = _s.trim(str); - if (!str.match(/^-?\d+(?:\.\d+)?$/)) return NaN; - return parseNumber(parseNumber(str).toFixed(~~decimals)); - }, - - numberFormat : function(number, dec, dsep, tsep) { - if (isNaN(number) || number == null) return ''; - - number = number.toFixed(~~dec); - tsep = typeof tsep == 'string' ? tsep : ','; - - var parts = number.split('.'), fnums = parts[0], - decimals = parts[1] ? (dsep || '.') + parts[1] : ''; - - return fnums.replace(/(\d)(?=(?:\d{3})+$)/g, '$1' + tsep) + decimals; - }, - - strRight: function(str, sep){ - if (str == null) return ''; - str = String(str); sep = sep != null ? String(sep) : sep; - var pos = !sep ? -1 : str.indexOf(sep); - return ~pos ? str.slice(pos+sep.length, str.length) : str; - }, - - strRightBack: function(str, sep){ - if (str == null) return ''; - str = String(str); sep = sep != null ? String(sep) : sep; - var pos = !sep ? -1 : str.lastIndexOf(sep); - return ~pos ? str.slice(pos+sep.length, str.length) : str; - }, - - strLeft: function(str, sep){ - if (str == null) return ''; - str = String(str); sep = sep != null ? String(sep) : sep; - var pos = !sep ? -1 : str.indexOf(sep); - return ~pos ? str.slice(0, pos) : str; - }, - - strLeftBack: function(str, sep){ - if (str == null) return ''; - str += ''; sep = sep != null ? ''+sep : sep; - var pos = str.lastIndexOf(sep); - return ~pos ? str.slice(0, pos) : str; - }, - - toSentence: function(array, separator, lastSeparator, serial) { - separator = separator || ', '; - lastSeparator = lastSeparator || ' and '; - var a = array.slice(), lastMember = a.pop(); - - if (array.length > 2 && serial) lastSeparator = _s.rtrim(separator) + lastSeparator; - - return a.length ? a.join(separator) + lastSeparator + lastMember : lastMember; - }, - - toSentenceSerial: function() { - var args = slice.call(arguments); - args[3] = true; - return _s.toSentence.apply(_s, args); - }, - - slugify: function(str) { - if (str == null) return ''; - - var from = "ąàáäâãåæăćęèéëêìíïîłńòóöôõøśșțùúüûñçżź", - to = "aaaaaaaaaceeeeeiiiilnoooooosstuuuunczz", - regex = new RegExp(defaultToWhiteSpace(from), 'g'); - - str = String(str).toLowerCase().replace(regex, function(c){ - var index = from.indexOf(c); - return to.charAt(index) || '-'; - }); - - return _s.dasherize(str.replace(/[^\w\s-]/g, '')); - }, - - surround: function(str, wrapper) { - return [wrapper, str, wrapper].join(''); - }, - - quote: function(str, quoteChar) { - return _s.surround(str, quoteChar || '"'); - }, - - unquote: function(str, quoteChar) { - quoteChar = quoteChar || '"'; - if (str[0] === quoteChar && str[str.length-1] === quoteChar) - return str.slice(1,str.length-1); - else return str; - }, - - exports: function() { - var result = {}; - - for (var prop in this) { - if (!this.hasOwnProperty(prop) || prop.match(/^(?:include|contains|reverse)$/)) continue; - result[prop] = this[prop]; - } - - return result; - }, - - repeat: function(str, qty, separator){ - if (str == null) return ''; - - qty = ~~qty; - - // using faster implementation if separator is not needed; - if (separator == null) return strRepeat(String(str), qty); - - // this one is about 300x slower in Google Chrome - for (var repeat = []; qty > 0; repeat[--qty] = str) {} - return repeat.join(separator); - }, - - naturalCmp: function(str1, str2){ - if (str1 == str2) return 0; - if (!str1) return -1; - if (!str2) return 1; - - var cmpRegex = /(\.\d+)|(\d+)|(\D+)/g, - tokens1 = String(str1).toLowerCase().match(cmpRegex), - tokens2 = String(str2).toLowerCase().match(cmpRegex), - count = Math.min(tokens1.length, tokens2.length); - - for(var i = 0; i < count; i++) { - var a = tokens1[i], b = tokens2[i]; - - if (a !== b){ - var num1 = parseInt(a, 10); - if (!isNaN(num1)){ - var num2 = parseInt(b, 10); - if (!isNaN(num2) && num1 - num2) - return num1 - num2; - } - return a < b ? -1 : 1; - } - } - - if (tokens1.length === tokens2.length) - return tokens1.length - tokens2.length; - - return str1 < str2 ? -1 : 1; - }, - - levenshtein: function(str1, str2) { - if (str1 == null && str2 == null) return 0; - if (str1 == null) return String(str2).length; - if (str2 == null) return String(str1).length; - - str1 = String(str1); str2 = String(str2); - - var current = [], prev, value; - - for (var i = 0; i <= str2.length; i++) - for (var j = 0; j <= str1.length; j++) { - if (i && j) - if (str1.charAt(j - 1) === str2.charAt(i - 1)) - value = prev; - else - value = Math.min(current[j], current[j - 1], prev) + 1; - else - value = i + j; - - prev = current[j]; - current[j] = value; - } - - return current.pop(); - }, - - toBoolean: function(str, trueValues, falseValues) { - if (typeof str === "number") str = "" + str; - if (typeof str !== "string") return !!str; - str = _s.trim(str); - if (boolMatch(str, trueValues || ["true", "1"])) return true; - if (boolMatch(str, falseValues || ["false", "0"])) return false; - } - }; - - // Aliases - - _s.strip = _s.trim; - _s.lstrip = _s.ltrim; - _s.rstrip = _s.rtrim; - _s.center = _s.lrpad; - _s.rjust = _s.lpad; - _s.ljust = _s.rpad; - _s.contains = _s.include; - _s.q = _s.quote; - _s.toBool = _s.toBoolean; - - // Exporting - - // CommonJS module is defined - if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) - module.exports = _s; - - exports._s = _s; - } - - // Register as a named module with AMD. - if (typeof define === 'function' && define.amd) - define('underscore.string', [], function(){ return _s; }); - - - // Integrate with Underscore.js if defined - // or create our own underscore object. - root._ = root._ || {}; - root._.string = root._.str = _s; -}(this, String); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/libpeerconnection.log b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/libpeerconnection.log deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json deleted file mode 100644 index 4b47216d2479..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "underscore.string", - "version": "2.3.3", - "description": "String manipulation extensions for Underscore.js javascript library.", - "homepage": "http://epeli.github.com/underscore.string/", - "contributors": [ - { - "name": "Esa-Matti Suuronen", - "email": "esa-matti@suuronen.org", - "url": "http://esa-matti.suuronen.org/" - }, - { - "name": "Edward Tsech", - "email": "edtsech@gmail.com" - }, - { - "name": "Pavel Pravosud", - "email": "pavel@pravosud.com", - "url": "" - }, - { - "name": "Sasha Koss", - "email": "kossnocorp@gmail.com", - "url": "http://koss.nocorp.me/" - }, - { - "name": "Vladimir Dronnikov", - "email": "dronnikov@gmail.com" - }, - { - "name": "Pete Kruckenberg", - "email": "https://github.com/kruckenb", - "url": "" - }, - { - "name": "Paul Chavard", - "email": "paul@chavard.net", - "url": "" - }, - { - "name": "Ed Finkler", - "email": "coj@funkatron.com", - "url": "" - } - ], - "keywords": [ - "underscore", - "string" - ], - "main": "./lib/underscore.string", - "directories": { - "lib": "./lib" - }, - "engines": { - "node": "*" - }, - "repository": { - "type": "git", - "url": "https://github.com/epeli/underscore.string.git" - }, - "bugs": { - "url": "https://github.com/epeli/underscore.string/issues" - }, - "licenses": [ - { - "type": "MIT" - } - ], - "readme": "# Underscore.string [![Build Status](https://secure.travis-ci.org/epeli/underscore.string.png?branch=master)](http://travis-ci.org/epeli/underscore.string) #\n\n\n\nJavascript lacks complete string manipulation operations.\nThis an attempt to fill that gap. List of build-in methods can be found\nfor example from [Dive Into JavaScript][d].\n\n[d]: http://www.diveintojavascript.com/core-javascript-reference/the-string-object\n\n\nAs name states this an extension for [Underscore.js][u], but it can be used\nindependently from **_s**-global variable. But with Underscore.js you can\nuse Object-Oriented style and chaining:\n\n[u]: http://documentcloud.github.com/underscore/\n\n```javascript\n_(\" epeli \").chain().trim().capitalize().value()\n=> \"Epeli\"\n```\n\n## Download ##\n\n * [Development version](https://raw.github.com/epeli/underscore.string/master/lib/underscore.string.js) *Uncompressed with Comments 18kb*\n * [Production version](https://github.com/epeli/underscore.string/raw/master/dist/underscore.string.min.js) *Minified 7kb*\n\n\n## Node.js installation ##\n\n**npm package**\n\n npm install underscore.string\n\n**Standalone usage**:\n\n```javascript\nvar _s = require('underscore.string');\n```\n\n**Integrate with Underscore.js**:\n\n```javascript\nvar _ = require('underscore');\n\n// Import Underscore.string to separate object, because there are conflict functions (include, reverse, contains)\n_.str = require('underscore.string');\n\n// Mix in non-conflict functions to Underscore namespace if you want\n_.mixin(_.str.exports());\n\n// All functions, include conflict, will be available through _.str object\n_.str.include('Underscore.string', 'string'); // => true\n```\n\n**Or Integrate with Underscore.js without module loading**\n\nRun the following expression after Underscore.js and Underscore.string are loaded\n```javascript\n// _.str becomes a global variable if no module loading is detected\n// Mix in non-conflict functions to Underscore namespace\n_.mixin(_.str.exports());\n```\n\n## String Functions ##\n\nFor availability of functions in this way you need to mix in Underscore.string functions:\n\n```javascript\n_.mixin(_.string.exports());\n```\n\notherwise functions from examples will be available through _.string or _.str objects:\n\n```javascript\n_.str.capitalize('epeli')\n=> \"Epeli\"\n```\n\n**numberFormat** _.numberFormat(number, [ decimals=0, decimalSeparator='.', orderSeparator=','])\n\nFormats the numbers.\n\n```javascript\n_.numberFormat(1000, 2)\n=> \"1,000.00\"\n\n_.numberFormat(123456789.123, 5, '.', ',')\n=> \"123,456,789.12300\"\n```\n\n\n**levenshtein** _.levenshtein(string1, string2)\n\nCalculates [Levenshtein distance][ld] between two strings.\n[ld]: http://en.wikipedia.org/wiki/Levenshtein_distance\n\n```javascript\n_.levenshtein('kitten', 'kittah')\n=> 2\n```\n\n**capitalize** _.capitalize(string)\n\nConverts first letter of the string to uppercase.\n\n```javascript\n_.capitalize(\"foo Bar\")\n=> \"Foo Bar\"\n```\n\n**chop** _.chop(string, step)\n\n```javascript\n_.chop('whitespace', 3)\n=> ['whi','tes','pac','e']\n```\n\n**clean** _.clean(str)\n\nCompress some whitespaces to one.\n\n```javascript\n_.clean(\" foo bar \")\n=> 'foo bar'\n```\n\n**chars** _.chars(str)\n\n```javascript\n_.chars('Hello')\n=> ['H','e','l','l','o']\n```\n\n**swapCase** _.swapCase(str)\n\nReturns a copy of the string in which all the case-based characters have had their case swapped.\n\n```javascript\n_.swapCase('hELLO')\n=> 'Hello'\n```\n\n**include** available only through _.str object, because Underscore has function with the same name.\n\n```javascript\n_.str.include(\"foobar\", \"ob\")\n=> true\n```\n\n(removed) **includes** _.includes(string, substring)\n\nTests if string contains a substring.\n\n```javascript\n_.includes(\"foobar\", \"ob\")\n=> true\n```\n\n**includes** function was removed\n\nBut you can create it in this way, for compatibility with previous versions:\n\n```javascript\n_.includes = _.str.include\n```\n\n**count** _.count(string, substring)\n\n```javascript\n_('Hello world').count('l')\n=> 3\n```\n\n**escapeHTML** _.escapeHTML(string)\n\nConverts HTML special characters to their entity equivalents.\n\n```javascript\n_('
    Blah blah blah
    ').escapeHTML();\n=> '<div>Blah blah blah</div>'\n```\n\n**unescapeHTML** _.unescapeHTML(string)\n\nConverts entity characters to HTML equivalents.\n\n```javascript\n_('<div>Blah blah blah</div>').unescapeHTML();\n=> '
    Blah blah blah
    '\n```\n\n**insert** _.insert(string, index, substing)\n\n```javascript\n_('Hello ').insert(6, 'world')\n=> 'Hello world'\n```\n\n**isBlank** _.isBlank(string)\n\n```javascript\n_('').isBlank(); // => true\n_('\\n').isBlank(); // => true\n_(' ').isBlank(); // => true\n_('a').isBlank(); // => false\n```\n\n**join** _.join(separator, *strings)\n\nJoins strings together with given separator\n\n```javascript\n_.join(\" \", \"foo\", \"bar\")\n=> \"foo bar\"\n```\n\n**lines** _.lines(str)\n\n```javascript\n_.lines(\"Hello\\nWorld\")\n=> [\"Hello\", \"World\"]\n```\n\n**reverse** available only through _.str object, because Underscore has function with the same name.\n\nReturn reversed string:\n\n```javascript\n_.str.reverse(\"foobar\")\n=> 'raboof'\n```\n\n**splice** _.splice(string, index, howmany, substring)\n\nLike a array splice.\n\n```javascript\n_('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli')\n=> 'https://edtsech@bitbucket.org/epeli/underscore.strings'\n```\n\n**startsWith** _.startsWith(string, starts)\n\nThis method checks whether string starts with starts.\n\n```javascript\n_(\"image.gif\").startsWith(\"image\")\n=> true\n```\n\n**endsWith** _.endsWith(string, ends)\n\nThis method checks whether string ends with ends.\n\n```javascript\n_(\"image.gif\").endsWith(\"gif\")\n=> true\n```\n\n**succ** _.succ(str)\n\nReturns the successor to str.\n\n```javascript\n_('a').succ()\n=> 'b'\n\n_('A').succ()\n=> 'B'\n```\n\n**supplant**\n\nSupplant function was removed, use Underscore.js [template function][p].\n\n[p]: http://documentcloud.github.com/underscore/#template\n\n**strip** alias for *trim*\n\n**lstrip** alias for *ltrim*\n\n**rstrip** alias for *rtrim*\n\n**titleize** _.titleize(string)\n\n```javascript\n_('my name is epeli').titleize()\n=> 'My Name Is Epeli'\n```\n\n**camelize** _.camelize(string)\n\nConverts underscored or dasherized string to a camelized one\n\n```javascript\n_('-moz-transform').camelize()\n=> 'MozTransform'\n```\n\n**classify** _.classify(string)\n\nConverts string to camelized class name\n\n```javascript\n_('some_class_name').classify()\n=> 'SomeClassName'\n```\n\n**underscored** _.underscored(string)\n\nConverts a camelized or dasherized string into an underscored one\n\n```javascript\n_('MozTransform').underscored()\n=> 'moz_transform'\n```\n\n**dasherize** _.dasherize(string)\n\nConverts a underscored or camelized string into an dasherized one\n\n```javascript\n_('MozTransform').dasherize()\n=> '-moz-transform'\n```\n\n**humanize** _.humanize(string)\n\nConverts an underscored, camelized, or dasherized string into a humanized one.\nAlso removes beginning and ending whitespace, and removes the postfix '_id'.\n\n```javascript\n_(' capitalize dash-CamelCase_underscore trim ').humanize()\n=> 'Capitalize dash camel case underscore trim'\n```\n\n**trim** _.trim(string, [characters])\n\ntrims defined characters from begining and ending of the string.\nDefaults to whitespace characters.\n\n```javascript\n_.trim(\" foobar \")\n=> \"foobar\"\n\n_.trim(\"_-foobar-_\", \"_-\")\n=> \"foobar\"\n```\n\n\n**ltrim** _.ltrim(string, [characters])\n\nLeft trim. Similar to trim, but only for left side.\n\n\n**rtrim** _.rtrim(string, [characters])\n\nRight trim. Similar to trim, but only for right side.\n\n**truncate** _.truncate(string, length, truncateString)\n\n```javascript\n_('Hello world').truncate(5)\n=> 'Hello...'\n\n_('Hello').truncate(10)\n=> 'Hello'\n```\n\n**prune** _.prune(string, length, pruneString)\n\nElegant version of truncate.\nMakes sure the pruned string does not exceed the original length.\nAvoid half-chopped words when truncating.\n\n```javascript\n_('Hello, world').prune(5)\n=> 'Hello...'\n\n_('Hello, world').prune(8)\n=> 'Hello...'\n\n_('Hello, world').prune(5, ' (read a lot more)')\n=> 'Hello, world' (as adding \"(read a lot more)\" would be longer than the original string)\n\n_('Hello, cruel world').prune(15)\n=> 'Hello, cruel...'\n\n_('Hello').prune(10)\n=> 'Hello'\n```\n\n**words** _.words(str, delimiter=/\\s+/)\n\nSplit string by delimiter (String or RegExp), /\\s+/ by default.\n\n```javascript\n_.words(\" I love you \")\n=> [\"I\",\"love\",\"you\"]\n\n_.words(\"I_love_you\", \"_\")\n=> [\"I\",\"love\",\"you\"]\n\n_.words(\"I-love-you\", /-/)\n=> [\"I\",\"love\",\"you\"]\n\n_.words(\" \")\n=> []\n```\n\n**sprintf** _.sprintf(string format, *arguments)\n\nC like string formatting.\nCredits goes to [Alexandru Marasteanu][o].\nFor more detailed documentation, see the [original page][o].\n\n[o]: http://www.diveintojavascript.com/projects/sprintf-for-javascript\n\n```javascript\n_.sprintf(\"%.1f\", 1.17)\n\"1.2\"\n```\n\n**pad** _.pad(str, length, [padStr, type])\n\npads the `str` with characters until the total string length is equal to the passed `length` parameter. By default, pads on the **left** with the space char (`\" \"`). `padStr` is truncated to a single character if necessary.\n\n```javascript\n_.pad(\"1\", 8)\n-> \" 1\";\n\n_.pad(\"1\", 8, '0')\n-> \"00000001\";\n\n_.pad(\"1\", 8, '0', 'right')\n-> \"10000000\";\n\n_.pad(\"1\", 8, '0', 'both')\n-> \"00001000\";\n\n_.pad(\"1\", 8, 'bleepblorp', 'both')\n-> \"bbbb1bbb\";\n```\n\n**lpad** _.lpad(str, length, [padStr])\n\nleft-pad a string. Alias for `pad(str, length, padStr, 'left')`\n\n```javascript\n_.lpad(\"1\", 8, '0')\n-> \"00000001\";\n```\n\n**rpad** _.rpad(str, length, [padStr])\n\nright-pad a string. Alias for `pad(str, length, padStr, 'right')`\n\n```javascript\n_.rpad(\"1\", 8, '0')\n-> \"10000000\";\n```\n\n**lrpad** _.lrpad(str, length, [padStr])\n\nleft/right-pad a string. Alias for `pad(str, length, padStr, 'both')`\n\n```javascript\n_.lrpad(\"1\", 8, '0')\n-> \"00001000\";\n```\n\n**center** alias for **lrpad**\n\n**ljust** alias for *rpad*\n\n**rjust** alias for *lpad*\n\n**toNumber** _.toNumber(string, [decimals])\n\nParse string to number. Returns NaN if string can't be parsed to number.\n\n```javascript\n_('2.556').toNumber()\n=> 3\n\n_('2.556').toNumber(1)\n=> 2.6\n```\n\n**strRight** _.strRight(string, pattern)\n\nSearches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strRight('_')\n=> \"is_a_test_string\";\n```\n\n**strRightBack** _.strRightBack(string, pattern)\n\nSearches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strRightBack('_')\n=> \"string\";\n```\n\n**strLeft** _.strLeft(string, pattern)\n\nSearches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strLeft('_')\n=> \"This\";\n```\n\n**strLeftBack** _.strLeftBack(string, pattern)\n\nSearches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strLeftBack('_')\n=> \"This_is_a_test\";\n```\n\n**stripTags**\n\nRemoves all html tags from string.\n\n```javascript\n_('a link').stripTags()\n=> 'a link'\n\n_('a link').stripTags()\n=> 'a linkalert(\"hello world!\")'\n```\n\n**toSentence** _.toSentence(array, [delimiter, lastDelimiter])\n\nJoin an array into a human readable sentence.\n\n```javascript\n_.toSentence(['jQuery', 'Mootools', 'Prototype'])\n=> 'jQuery, Mootools and Prototype';\n\n_.toSentence(['jQuery', 'Mootools', 'Prototype'], ', ', ' unt ')\n=> 'jQuery, Mootools unt Prototype';\n```\n\n**toSentenceSerial** _.toSentenceSerial(array, [delimiter, lastDelimiter])\n\nThe same as `toSentence`, but adjusts delimeters to use [Serial comma](http://en.wikipedia.org/wiki/Serial_comma).\n\n```javascript\n_.toSentenceSerial(['jQuery', 'Mootools'])\n=> 'jQuery and Mootools';\n\n_.toSentenceSerial(['jQuery', 'Mootools', 'Prototype'])\n=> 'jQuery, Mootools, and Prototype'\n\n_.toSentenceSerial(['jQuery', 'Mootools', 'Prototype'], ', ', ' unt ');\n=> 'jQuery, Mootools, unt Prototype';\n```\n\n**repeat** _.repeat(string, count, [separator])\n\nRepeats a string count times.\n\n```javascript\n_.repeat(\"foo\", 3)\n=> 'foofoofoo';\n\n_.repeat(\"foo\", 3, \"bar\")\n=> 'foobarfoobarfoo'\n```\n\n**surround** _.surround(string, wrap)\n\nSurround a string with another string.\n\n```javascript\n_.surround(\"foo\", \"ab\")\n=> 'abfooab';\n```\n\n**quote** _.quote(string, quoteChar) or _.q(string, quoteChar)\n\nQuotes a string. `quoteChar` defaults to `\"`.\n\n```javascript\n_.quote('foo', quoteChar)\n=> '\"foo\"';\n```\n**unquote** _.unquote(string, quoteChar)\n\nUnquotes a string. `quoteChar` defaults to `\"`.\n\n```javascript\n_.unquote('\"foo\"')\n=> 'foo';\n_.unquote(\"'foo'\", \"'\")\n=> 'foo';\n```\n\n\n**slugify** _.slugify(string)\n\nTransform text into a URL slug. Replaces whitespaces, accentuated, and special characters with a dash.\n\n```javascript\n_.slugify(\"Un éléphant à l'orée du bois\")\n=> 'un-elephant-a-loree-du-bois';\n```\n\n***Caution: this function is charset dependent***\n\n**naturalCmp** array.sort(_.naturalCmp)\n\nNaturally sort strings like humans would do.\n\n```javascript\n['foo20', 'foo5'].sort(_.naturalCmp)\n=> [ 'foo5', 'foo20' ]\n```\n\n**toBoolean** _.toBoolean(string) or _.toBool(string)\n\nTurn strings that can be commonly considered as booleas to real booleans. Such as \"true\", \"false\", \"1\" and \"0\". This function is case insensitive.\n\n```javascript\n_.toBoolean(\"true\")\n=> true\n_.toBoolean(\"FALSE\")\n=> false\n_.toBoolean(\"random\")\n=> undefined\n```\n\nIt can be customized by giving arrays of truth and falsy value matcher as parameters. Matchers can be also RegExp objects.\n\n```javascript\n_.toBoolean(\"truthy\", [\"truthy\"], [\"falsy\"])\n=> true\n_.toBoolean(\"true only at start\", [/^true/])\n=> true\n```\n\n## Roadmap ##\n\nAny suggestions or bug reports are welcome. Just email me or more preferably open an issue.\n\n#### Problems\n\nWe lose two things for `include` and `reverse` methods from `_.string`:\n\n* Calls like `_('foobar').include('bar')` aren't available;\n* Chaining isn't available too.\n\nBut if you need this functionality you can create aliases for conflict functions which will be convenient for you:\n\n```javascript\n_.mixin({\n includeString: _.str.include,\n reverseString: _.str.reverse\n})\n\n// Now wrapper calls and chaining are available.\n_('foobar').chain().reverseString().includeString('rab').value()\n```\n\n#### Standalone Usage\n\nIf you are using Underscore.string without Underscore. You also have `_.string` namespace for it and `_.str` alias\nBut of course you can just reassign `_` variable with `_.string`\n\n```javascript\n_ = _.string\n```\n\n## Changelog ##\n\n### 2.3.3 ###\n\n* Add `toBoolean`\n* Add `unquote`\n* Add quote char option to `quote`\n* Support dash-separated words in `titleize`\n\n### 2.3.2 ###\n\n* Add `naturalCmp`\n* Bug fix to `camelize`\n* Add ă, ș, ț and ś to `slugify`\n* Doc updates\n* Add support for [component](http://component.io/)\n* [Full changelog](https://github.com/epeli/underscore.string/compare/v2.3.1...v2.3.2)\n\n### 2.3.1 ###\n\n* Bug fixes to `escapeHTML`, `classify`, `substr`\n* Faster `count`\n* Documentation fixes\n* [Full changelog](https://github.com/epeli/underscore.string/compare/v2.3.0...v2.3.1)\n\n### 2.3.0 ###\n\n* Added `numberformat` method\n* Added `levenshtein` method (Levenshtein distance calculation)\n* Added `swapCase` method\n* Changed default behavior of `words` method\n* Added `toSentenceSerial` method\n* Added `surround` and `quote` methods\n\n### 2.2.1 ###\n\n* Same as 2.2.0 (2.2.0rc on npm) to fix some npm drama\n\n### 2.2.0 ###\n\n* Capitalize method behavior changed\n* Various perfomance tweaks\n\n### 2.1.1###\n\n* Fixed words method bug\n* Added classify method\n\n### 2.1.0 ###\n\n* AMD support\n* Added toSentence method\n* Added slugify method\n* Lots of speed optimizations\n\n### 2.0.0 ###\n\n* Added prune, humanize functions\n* Added _.string (_.str) namespace for Underscore.string library\n* Removed includes function\n\nFor upgrading to this version you need to mix in Underscore.string library to Underscore object:\n\n```javascript\n_.mixin(_.string.exports());\n```\n\nand all non-conflict Underscore.string functions will be available through Underscore object.\nAlso function `includes` has been removed, you should replace this function by `_.str.include`\nor create alias `_.includes = _.str.include` and all your code will work fine.\n\n### 1.1.6 ###\n\n* Fixed reverse and truncate\n* Added isBlank, stripTags, inlude(alias for includes)\n* Added uglifier compression\n\n### 1.1.5 ###\n\n* Added strRight, strRightBack, strLeft, strLeftBack\n\n### 1.1.4 ###\n\n* Added pad, lpad, rpad, lrpad methods and aliases center, ljust, rjust\n* Integration with Underscore 1.1.6\n\n### 1.1.3 ###\n\n* Added methods: underscored, camelize, dasherize\n* Support newer version of npm\n\n### 1.1.2 ###\n\n* Created functions: lines, chars, words functions\n\n### 1.0.2 ###\n\n* Created integration test suite with underscore.js 1.1.4 (now it's absolutely compatible)\n* Removed 'reverse' function, because this function override underscore.js 'reverse'\n\n## Contribute ##\n\n* Fork & pull request. Don't forget about tests.\n* If you planning add some feature please create issue before.\n\nOtherwise changes will be rejected.\n\n## Contributors list ##\n[Can be found here](https://github.com/epeli/underscore.string/graphs/contributors).\n\n\n## Licence ##\n\nThe MIT License\n\nCopyright (c) 2011 Esa-Matti Suuronen esa-matti@suuronen.org\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "readmeFilename": "README.markdown", - "_id": "underscore.string@2.3.3", - "_from": "underscore.string@~2.3.1" -} diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js deleted file mode 100644 index 44a21670563b..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js +++ /dev/null @@ -1,45 +0,0 @@ -function waitFor(test, complete, timeout) { - var result, start = new Date().getTime() - setInterval(function interval() { - if ((new Date().getTime() - start < timeout) && !result) { - result = test() - } else { - if (!result) { - phantom.exit(1) - } else { - complete() - clearInterval(interval) - } - } - }, 100) -} - - -var fs = require('fs'), page = require('webpage').create(); -var url = 'file://localhost' + fs.workingDirectory + '/' + phantom.args[0]; - -page.onConsoleMessage = function(msg) { - console.log(msg) -} - -page.open(url, function(status) { - waitFor(function() { - return page.evaluate(function(){ - var el = document.getElementById('qunit-testresult') - return el && el.innerText.match('completed') - }) - }, function() { - var failures = page.evaluate(function() { - var el = document.getElementById('qunit-testresult'), - fails = document.getElementsByClassName('fail') - - for (var i = 0; i < fails.length; i++) - console.log(fails[i].innerText) - - console.log(el.innerText) - - return parseInt(el.getElementsByClassName('failed')[0].innerHTML) - }) - phantom.exit(failures > 0 ? 1 : 0) - }, 10000) -}) \ No newline at end of file diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js deleted file mode 100644 index 9ceeea76d029..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js +++ /dev/null @@ -1,148 +0,0 @@ -(function() { - - JSLitmus.test('levenshtein', function() { - return [ - _.levenshtein('pineapple', 'potato'), - _.levenshtein('seven', 'eight'), - _.levenshtein('the very same string', 'the very same string'), - _.levenshtein('very very very long string', 'something completely different') - ]; - }); - - - JSLitmus.test('trimNoNative', function() { - return _.trim(" foobar ", " "); - }); - - JSLitmus.test('trim', function() { - return _.trim(" foobar "); - }); - - JSLitmus.test('trim object-oriented', function() { - return _(" foobar ").trim(); - }); - - JSLitmus.test('trim jQuery', function() { - return jQuery.trim(" foobar "); - }); - - JSLitmus.test('ltrimp', function() { - return _.ltrim(" foobar ", " "); - }); - - JSLitmus.test('rtrimp', function() { - return _.rtrim(" foobar ", " "); - }); - - JSLitmus.test('startsWith', function() { - return _.startsWith("foobar", "foo"); - }); - - JSLitmus.test('endsWith', function() { - return _.endsWith("foobar", "xx"); - }); - - JSLitmus.test('chop', function(){ - return _('whitespace').chop(2); - }); - - JSLitmus.test('count', function(){ - return _('Hello worls').count('l'); - }); - - JSLitmus.test('insert', function() { - return _('Hello ').insert(6, 'world'); - }); - - JSLitmus.test('splice', function() { - return _('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli'); - }); - - JSLitmus.test('succ', function(){ - var let = 'a', alphabet = []; - - for (var i=0; i < 26; i++) { - alphabet.push(let); - let = _(let).succ(); - } - - return alphabet; - }); - - JSLitmus.test('titleize', function(){ - return _('the titleize string method').titleize(); - }); - - JSLitmus.test('truncate', function(){ - return _('Hello world').truncate(5); - }); - - JSLitmus.test('prune', function(){ - return _('Hello world').prune(5); - }); - - JSLitmus.test('isBlank', function(){ - return _('').isBlank(); - }); - - JSLitmus.test('escapeHTML', function(){ - _('
    Blah blah blah
    ').escapeHTML(); - }); - - JSLitmus.test('unescapeHTML', function(){ - _('<div>Blah blah blah</div>').unescapeHTML(); - }); - - JSLitmus.test('reverse', function(){ - _('Hello World').reverse(); - }); - - JSLitmus.test('pad default', function(){ - _('foo').pad(12); - }); - - JSLitmus.test('pad hash left', function(){ - _('foo').pad(12, '#'); - }); - - JSLitmus.test('pad hash right', function(){ - _('foo').pad(12, '#', 'right'); - }); - - JSLitmus.test('pad hash both', function(){ - _('foo').pad(12, '#', 'both'); - }); - - JSLitmus.test('pad hash both longPad', function(){ - _('foo').pad(12, 'f00f00f00', 'both'); - }); - - JSLitmus.test('toNumber', function(){ - _('10.232323').toNumber(2); - }); - - JSLitmus.test('strRight', function(){ - _('aaa_bbb_ccc').strRight('_'); - }); - - JSLitmus.test('strRightBack', function(){ - _('aaa_bbb_ccc').strRightBack('_'); - }); - - JSLitmus.test('strLeft', function(){ - _('aaa_bbb_ccc').strLeft('_'); - }); - - JSLitmus.test('strLeftBack', function(){ - _('aaa_bbb_ccc').strLeftBack('_'); - }); - - JSLitmus.test('join', function(){ - _('separator').join(1, 2, 3, 4, 5, 6, 7, 8, 'foo', 'bar', 'lol', 'wut'); - }); - - JSLitmus.test('slugify', function(){ - _("Un éléphant à l'orée du bois").slugify(); - }); - -})(); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js deleted file mode 100644 index 77364f205a0e..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js +++ /dev/null @@ -1,685 +0,0 @@ -$(document).ready(function() { - - // Include Underscore.string methods to Underscore namespace - _.mixin(_.str.exports()); - - module('String extensions'); - - test('Strings: naturalSort', function() { - var arr = ['foo2', 'foo1', 'foo10', 'foo30', 'foo100', 'foo10bar'], - sorted = ['foo1', 'foo2', 'foo10', 'foo10bar', 'foo30', 'foo100']; - deepEqual(arr.sort(_.naturalCmp), sorted); - }); - - test('Strings: trim', function() { - equal(_.trim(123), '123', 'Non string'); - equal(_(' foo').trim(), 'foo'); - equal(_('foo ').trim(), 'foo'); - equal(_(' foo ').trim(), 'foo'); - equal(_(' foo ').trim(), 'foo'); - equal(_(' foo ').trim(' '), 'foo', 'Manually set whitespace'); - equal(_('\t foo \t ').trim(/\s/), 'foo', 'Manually set RegExp /\\s+/'); - - equal(_('ffoo').trim('f'), 'oo'); - equal(_('ooff').trim('f'), 'oo'); - equal(_('ffooff').trim('f'), 'oo'); - - - equal(_('_-foobar-_').trim('_-'), 'foobar'); - - equal(_('http://foo/').trim('/'), 'http://foo'); - equal(_('c:\\').trim('\\'), 'c:'); - - equal(_(123).trim(), '123'); - equal(_(123).trim(3), '12'); - equal(_('').trim(), '', 'Trim empty string should return empty string'); - equal(_(null).trim(), '', 'Trim null should return empty string'); - equal(_(undefined).trim(), '', 'Trim undefined should return empty string'); - }); - - test('String: levenshtein', function() { - equal(_.levenshtein('Godfather', 'Godfather'), 0); - equal(_.levenshtein('Godfather', 'Godfathe'), 1); - equal(_.levenshtein('Godfather', 'odfather'), 1); - equal(_.levenshtein('Godfather', 'Gdfthr'), 3); - equal(_.levenshtein('seven', 'eight'), 5); - equal(_.levenshtein('123', 123), 0); - equal(_.levenshtein(321, '321'), 0); - equal(_.levenshtein('lol', null), 3); - equal(_.levenshtein('lol'), 3); - equal(_.levenshtein(null, 'lol'), 3); - equal(_.levenshtein(undefined, 'lol'), 3); - equal(_.levenshtein(), 0); - }); - - test('Strings: ltrim', function() { - equal(_(' foo').ltrim(), 'foo'); - equal(_(' foo').ltrim(), 'foo'); - equal(_('foo ').ltrim(), 'foo '); - equal(_(' foo ').ltrim(), 'foo '); - equal(_('').ltrim(), '', 'ltrim empty string should return empty string'); - equal(_(null).ltrim(), '', 'ltrim null should return empty string'); - equal(_(undefined).ltrim(), '', 'ltrim undefined should return empty string'); - - equal(_('ffoo').ltrim('f'), 'oo'); - equal(_('ooff').ltrim('f'), 'ooff'); - equal(_('ffooff').ltrim('f'), 'ooff'); - - equal(_('_-foobar-_').ltrim('_-'), 'foobar-_'); - - equal(_(123).ltrim(1), '23'); - }); - - test('Strings: rtrim', function() { - equal(_('http://foo/').rtrim('/'), 'http://foo', 'clean trailing slash'); - equal(_(' foo').rtrim(), ' foo'); - equal(_('foo ').rtrim(), 'foo'); - equal(_('foo ').rtrim(), 'foo'); - equal(_('foo bar ').rtrim(), 'foo bar'); - equal(_(' foo ').rtrim(), ' foo'); - - equal(_('ffoo').rtrim('f'), 'ffoo'); - equal(_('ooff').rtrim('f'), 'oo'); - equal(_('ffooff').rtrim('f'), 'ffoo'); - - equal(_('_-foobar-_').rtrim('_-'), '_-foobar'); - - equal(_(123).rtrim(3), '12'); - equal(_('').rtrim(), '', 'rtrim empty string should return empty string'); - equal(_(null).rtrim(), '', 'rtrim null should return empty string'); - }); - - test('Strings: capitalize', function() { - equal(_('fabio').capitalize(), 'Fabio', 'First letter is upper case'); - equal(_.capitalize('fabio'), 'Fabio', 'First letter is upper case'); - equal(_.capitalize('FOO'), 'FOO', 'Other letters unchanged'); - equal(_(123).capitalize(), '123', 'Non string'); - equal(_.capitalize(''), '', 'Capitalizing empty string returns empty string'); - equal(_.capitalize(null), '', 'Capitalizing null returns empty string'); - equal(_.capitalize(undefined), '', 'Capitalizing undefined returns empty string'); - }); - - test('Strings: join', function() { - equal(_.join('', 'foo', 'bar'), 'foobar', 'basic join'); - equal(_.join('', 1, 'foo', 2), '1foo2', 'join numbers and strings'); - equal(_.join(' ','foo', 'bar'), 'foo bar', 'join with spaces'); - equal(_.join('1', '2', '2'), '212', 'join number strings'); - equal(_.join(1, 2, 2), '212', 'join numbers'); - equal(_.join('','foo', null), 'foo', 'join null with string returns string'); - equal(_.join(null,'foo', 'bar'), 'foobar', 'join strings with null returns string'); - equal(_(' ').join('foo', 'bar'), 'foo bar', 'join object oriented'); - }); - - test('Strings: reverse', function() { - equal(_.str.reverse('foo'), 'oof' ); - equal(_.str.reverse('foobar'), 'raboof' ); - equal(_.str.reverse('foo bar'), 'rab oof' ); - equal(_.str.reverse('saippuakauppias'), 'saippuakauppias' ); - equal(_.str.reverse(123), '321', 'Non string'); - equal(_.str.reverse(123.45), '54.321', 'Non string'); - equal(_.str.reverse(''), '', 'reversing empty string returns empty string' ); - equal(_.str.reverse(null), '', 'reversing null returns empty string' ); - equal(_.str.reverse(undefined), '', 'reversing undefined returns empty string' ); - }); - - test('Strings: clean', function() { - equal(_(' foo bar ').clean(), 'foo bar'); - equal(_(123).clean(), '123'); - equal(_('').clean(), '', 'claning empty string returns empty string'); - equal(_(null).clean(), '', 'claning null returns empty string'); - equal(_(undefined).clean(), '', 'claning undefined returns empty string'); - }); - - test('Strings: sprintf', function() { - // Should be very tested function already. Thanks to - // http://www.diveintojavascript.com/projects/sprintf-for-javascript - equal(_.sprintf('Hello %s', 'me'), 'Hello me', 'basic'); - equal(_('Hello %s').sprintf('me'), 'Hello me', 'object'); - equal(_('hello %s').chain().sprintf('me').capitalize().value(), 'Hello me', 'Chaining works'); - equal(_.sprintf('%.1f', 1.22222), '1.2', 'round'); - equal(_.sprintf('%.1f', 1.17), '1.2', 'round 2'); - equal(_.sprintf('%(id)d - %(name)s', {id: 824, name: 'Hello World'}), '824 - Hello World', 'Named replacements work'); - equal(_.sprintf('%(args[0].id)d - %(args[1].name)s', {args: [{id: 824}, {name: 'Hello World'}]}), '824 - Hello World', 'Named replacements with arrays work'); - }); - - - test('Strings: vsprintf', function() { - equal(_.vsprintf('Hello %s', ['me']), 'Hello me', 'basic'); - equal(_('Hello %s').vsprintf(['me']), 'Hello me', 'object'); - equal(_('hello %s').chain().vsprintf(['me']).capitalize().value(), 'Hello me', 'Chaining works'); - equal(_.vsprintf('%.1f', [1.22222]), '1.2', 'round'); - equal(_.vsprintf('%.1f', [1.17]), '1.2', 'round 2'); - equal(_.vsprintf('%(id)d - %(name)s', [{id: 824, name: 'Hello World'}]), '824 - Hello World', 'Named replacement works'); - equal(_.vsprintf('%(args[0].id)d - %(args[1].name)s', [{args: [{id: 824}, {name: 'Hello World'}]}]), '824 - Hello World', 'Named replacement with arrays works'); - }); - - test('Strings: startsWith', function() { - ok(_('foobar').startsWith('foo'), 'foobar starts with foo'); - ok(!_('oobar').startsWith('foo'), 'oobar does not start with foo'); - ok(_(12345).startsWith(123), '12345 starts with 123'); - ok(!_(2345).startsWith(123), '2345 does not start with 123'); - ok(_('').startsWith(''), 'empty string starts with empty string'); - ok(_(null).startsWith(''), 'null starts with empty string'); - ok(!_(null).startsWith('foo'), 'null starts with foo'); - }); - - test('Strings: endsWith', function() { - ok(_('foobar').endsWith('bar'), 'foobar ends with bar'); - ok(_.endsWith('foobar', 'bar'), 'foobar ends with bar'); - ok(_.endsWith('00018-0000062.Plone.sdh264.1a7264e6912a91aa4a81b64dc5517df7b8875994.mp4', 'mp4'), 'endsWith .mp4'); - ok(!_('fooba').endsWith('bar'), 'fooba does not end with bar'); - ok(_.endsWith(12345, 45), '12345 ends with 45'); - ok(!_.endsWith(12345, 6), '12345 does not end with 6'); - ok(_('').endsWith(''), 'empty string ends with empty string'); - ok(_(null).endsWith(''), 'null ends with empty string'); - ok(!_(null).endsWith('foo'), 'null ends with foo'); - }); - - test('Strings: include', function() { - ok(_.str.include('foobar', 'bar'), 'foobar includes bar'); - ok(!_.str.include('foobar', 'buzz'), 'foobar does not includes buzz'); - ok(_.str.include(12345, 34), '12345 includes 34'); - ok(!_.str.contains(12345, 6), '12345 does not includes 6'); - ok(!_.str.include('', 34), 'empty string includes 34'); - ok(!_.str.include(null, 34), 'null includes 34'); - ok(_.str.include(null, ''), 'null includes empty string'); - }); - - test('String: chop', function(){ - ok(_('whitespace').chop(2).length === 5, 'output [wh, it, es, pa, ce]'); - ok(_('whitespace').chop(3).length === 4, 'output [whi, tes, pac, e]'); - ok(_('whitespace').chop()[0].length === 10, 'output [whitespace]'); - ok(_(12345).chop(1).length === 5, 'output [1, 2, 3, 4, 5]'); - }); - - test('String: clean', function(){ - equal(_.clean(' foo bar '), 'foo bar'); - equal(_.clean(''), ''); - equal(_.clean(null), ''); - equal(_.clean(1), '1'); - }); - - test('String: count', function(){ - equal(_('Hello world').count('l'), 3); - equal(_('Hello world').count('Hello'), 1); - equal(_('Hello world').count('foo'), 0); - equal(_('x.xx....x.x').count('x'), 5); - equal(_('').count('x'), 0); - equal(_(null).count('x'), 0); - equal(_(undefined).count('x'), 0); - equal(_(12345).count(1), 1); - equal(_(11345).count(1), 2); - }); - - test('String: insert', function(){ - equal(_('Hello ').insert(6, 'Jessy'), 'Hello Jessy'); - equal(_('Hello ').insert(100, 'Jessy'), 'Hello Jessy'); - equal(_('').insert(100, 'Jessy'), 'Jessy'); - equal(_(null).insert(100, 'Jessy'), 'Jessy'); - equal(_(undefined).insert(100, 'Jessy'), 'Jessy'); - equal(_(12345).insert(6, 'Jessy'), '12345Jessy'); - }); - - test('String: splice', function(){ - equal(_('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli'), - 'https://edtsech@bitbucket.org/epeli/underscore.strings'); - equal(_.splice(12345, 1, 2, 321), '132145', 'Non strings'); - }); - - test('String: succ', function(){ - equal(_('a').succ(), 'b'); - equal(_('A').succ(), 'B'); - equal(_('+').succ(), ','); - equal(_(1).succ(), '2'); - }); - - test('String: titleize', function(){ - equal(_('the titleize string method').titleize(), 'The Titleize String Method'); - equal(_('the titleize string method').titleize(), 'The Titleize String Method'); - equal(_('').titleize(), '', 'Titleize empty string returns empty string'); - equal(_(null).titleize(), '', 'Titleize null returns empty string'); - equal(_(undefined).titleize(), '', 'Titleize undefined returns empty string'); - equal(_('let\'s have some fun').titleize(), 'Let\'s Have Some Fun'); - equal(_('a-dash-separated-string').titleize(), 'A-Dash-Separated-String'); - equal(_('A-DASH-SEPARATED-STRING').titleize(), 'A-Dash-Separated-String'); - equal(_(123).titleize(), '123'); - }); - - test('String: camelize', function(){ - equal(_('the_camelize_string_method').camelize(), 'theCamelizeStringMethod'); - equal(_('-the-camelize-string-method').camelize(), 'TheCamelizeStringMethod'); - equal(_('the camelize string method').camelize(), 'theCamelizeStringMethod'); - equal(_(' the camelize string method').camelize(), 'theCamelizeStringMethod'); - equal(_('the camelize string method').camelize(), 'theCamelizeStringMethod'); - equal(_('').camelize(), '', 'Camelize empty string returns empty string'); - equal(_(null).camelize(), '', 'Camelize null returns empty string'); - equal(_(undefined).camelize(), '', 'Camelize undefined returns empty string'); - equal(_(123).camelize(), '123'); - }); - - test('String: underscored', function(){ - equal(_('the-underscored-string-method').underscored(), 'the_underscored_string_method'); - equal(_('theUnderscoredStringMethod').underscored(), 'the_underscored_string_method'); - equal(_('TheUnderscoredStringMethod').underscored(), 'the_underscored_string_method'); - equal(_(' the underscored string method').underscored(), 'the_underscored_string_method'); - equal(_('').underscored(), ''); - equal(_(null).underscored(), ''); - equal(_(undefined).underscored(), ''); - equal(_(123).underscored(), '123'); - }); - - test('String: dasherize', function(){ - equal(_('the_dasherize_string_method').dasherize(), 'the-dasherize-string-method'); - equal(_('TheDasherizeStringMethod').dasherize(), '-the-dasherize-string-method'); - equal(_('thisIsATest').dasherize(), 'this-is-a-test'); - equal(_('this Is A Test').dasherize(), 'this-is-a-test'); - equal(_('thisIsATest123').dasherize(), 'this-is-a-test123'); - equal(_('123thisIsATest').dasherize(), '123this-is-a-test'); - equal(_('the dasherize string method').dasherize(), 'the-dasherize-string-method'); - equal(_('the dasherize string method ').dasherize(), 'the-dasherize-string-method'); - equal(_('téléphone').dasherize(), 'téléphone'); - equal(_('foo$bar').dasherize(), 'foo$bar'); - equal(_('').dasherize(), ''); - equal(_(null).dasherize(), ''); - equal(_(undefined).dasherize(), ''); - equal(_(123).dasherize(), '123'); - }); - - test('String: camelize', function(){ - equal(_.camelize('-moz-transform'), 'MozTransform'); - equal(_.camelize('webkit-transform'), 'webkitTransform'); - equal(_.camelize('under_scored'), 'underScored'); - equal(_.camelize(' with spaces'), 'withSpaces'); - equal(_('').camelize(), ''); - equal(_(null).camelize(), ''); - equal(_(undefined).camelize(), ''); - equal(_("_som eWeird---name-").camelize(), 'SomEWeirdName'); - }); - - test('String: join', function(){ - equal(_.join(1, 2, 3, 4), '21314'); - equal(_.join('|', 'foo', 'bar', 'baz'), 'foo|bar|baz'); - equal(_.join('',2,3,null), '23'); - equal(_.join(null,2,3), '23'); - }); - - test('String: classify', function(){ - equal(_.classify(1), '1'); - equal(_('some_class_name').classify(), 'SomeClassName'); - equal(_('my wonderfull class_name').classify(), 'MyWonderfullClassName'); - equal(_('my wonderfull.class.name').classify(), 'MyWonderfullClassName'); - }); - - test('String: humanize', function(){ - equal(_('the_humanize_string_method').humanize(), 'The humanize string method'); - equal(_('ThehumanizeStringMethod').humanize(), 'Thehumanize string method'); - equal(_('the humanize string method').humanize(), 'The humanize string method'); - equal(_('the humanize_id string method_id').humanize(), 'The humanize id string method'); - equal(_('the humanize string method ').humanize(), 'The humanize string method'); - equal(_(' capitalize dash-CamelCase_underscore trim ').humanize(), 'Capitalize dash camel case underscore trim'); - equal(_(123).humanize(), '123'); - equal(_('').humanize(), ''); - equal(_(null).humanize(), ''); - equal(_(undefined).humanize(), ''); - }); - - test('String: truncate', function(){ - equal(_('Hello world').truncate(6, 'read more'), 'Hello read more'); - equal(_('Hello world').truncate(5), 'Hello...'); - equal(_('Hello').truncate(10), 'Hello'); - equal(_('').truncate(10), ''); - equal(_(null).truncate(10), ''); - equal(_(undefined).truncate(10), ''); - equal(_(1234567890).truncate(5), '12345...'); - }); - - test('String: prune', function(){ - equal(_('Hello, cruel world').prune(6, ' read more'), 'Hello read more'); - equal(_('Hello, world').prune(5, 'read a lot more'), 'Hello, world'); - equal(_('Hello, world').prune(5), 'Hello...'); - equal(_('Hello, world').prune(8), 'Hello...'); - equal(_('Hello, cruel world').prune(15), 'Hello, cruel...'); - equal(_('Hello world').prune(22), 'Hello world'); - equal(_('Привет, жеÑтокий мир').prune(6, ' read more'), 'Привет read more'); - equal(_('Привет, мир').prune(6, 'read a lot more'), 'Привет, мир'); - equal(_('Привет, мир').prune(6), 'Привет...'); - equal(_('Привет, мир').prune(8), 'Привет...'); - equal(_('Привет, жеÑтокий мир').prune(16), 'Привет, жеÑтокий...'); - equal(_('Привет, мир').prune(22), 'Привет, мир'); - equal(_('alksjd!!!!!!....').prune(100, ''), 'alksjd!!!!!!....'); - equal(_(123).prune(10), '123'); - equal(_(123).prune(1, 321), '321'); - equal(_('').prune(5), ''); - equal(_(null).prune(5), ''); - equal(_(undefined).prune(5), ''); - }); - - test('String: isBlank', function(){ - ok(_('').isBlank()); - ok(_(' ').isBlank()); - ok(_('\n').isBlank()); - ok(!_('a').isBlank()); - ok(!_('0').isBlank()); - ok(!_(0).isBlank()); - ok(_('').isBlank()); - ok(_(null).isBlank()); - ok(_(undefined).isBlank()); - }); - - test('String: escapeRegExp', function(){ - equal(_.escapeRegExp(/hello(?=\sworld)/.source), 'hello\\(\\?\\=\\\\sworld\\)', 'with lookahead'); - equal(_.escapeRegExp(/hello(?!\shell)/.source), 'hello\\(\\?\\!\\\\shell\\)', 'with negative lookahead'); - }); - - test('String: escapeHTML', function(){ - equal(_('
    Blah & "blah" & \'blah\'
    ').escapeHTML(), - '<div>Blah & "blah" & 'blah'</div>'); - equal(_('<').escapeHTML(), '&lt;'); - equal(_(5).escapeHTML(), '5'); - equal(_('').escapeHTML(), ''); - equal(_(null).escapeHTML(), ''); - equal(_(undefined).escapeHTML(), ''); - }); - - test('String: unescapeHTML', function(){ - equal(_('<div>Blah & "blah" & 'blah'</div>').unescapeHTML(), - '
    Blah & "blah" & \'blah\'
    '); - equal(_('&lt;').unescapeHTML(), '<'); - equal(_(''').unescapeHTML(), '\''); - equal(_(''').unescapeHTML(), '\''); - equal(_(''').unescapeHTML(), '\''); - equal(_('J').unescapeHTML(), 'J'); - equal(_('J').unescapeHTML(), 'J'); - equal(_('J').unescapeHTML(), 'J'); - equal(_('&_#39;').unescapeHTML(), '&_#39;'); - equal(_(''_;').unescapeHTML(), ''_;'); - equal(_('&#38;').unescapeHTML(), '&'); - equal(_('&amp;').unescapeHTML(), '&'); - equal(_('').unescapeHTML(), ''); - equal(_(null).unescapeHTML(), ''); - equal(_(undefined).unescapeHTML(), ''); - equal(_(5).unescapeHTML(), '5'); - // equal(_(undefined).unescapeHTML(), ''); - }); - - test('String: words', function() { - deepEqual(_('I love you!').words(), ['I', 'love', 'you!']); - deepEqual(_(' I love you! ').words(), ['I', 'love', 'you!']); - deepEqual(_('I_love_you!').words('_'), ['I', 'love', 'you!']); - deepEqual(_('I-love-you!').words(/-/), ['I', 'love', 'you!']); - deepEqual(_(123).words(), ['123'], '123 number has one word "123".'); - deepEqual(_(0).words(), ['0'], 'Zero number has one word "0".'); - deepEqual(_('').words(), [], 'Empty strings has no words.'); - deepEqual(_(' ').words(), [], 'Blank strings has no words.'); - deepEqual(_(null).words(), [], 'null has no words.'); - deepEqual(_(undefined).words(), [], 'undefined has no words.'); - }); - - test('String: chars', function() { - equal(_('Hello').chars().length, 5); - equal(_(123).chars().length, 3); - equal(_('').chars().length, 0); - equal(_(null).chars().length, 0); - equal(_(undefined).chars().length, 0); - }); - - test('String: swapCase', function(){ - equal(_('AaBbCcDdEe').swapCase(), 'aAbBcCdDeE'); - equal(_('Hello World').swapCase(), 'hELLO wORLD'); - equal(_('').swapCase(), ''); - equal(_(null).swapCase(), ''); - equal(_(undefined).swapCase(), ''); - }); - - test('String: lines', function() { - equal(_('Hello\nWorld').lines().length, 2); - equal(_('Hello World').lines().length, 1); - equal(_(123).lines().length, 1); - equal(_('').lines().length, 1); - equal(_(null).lines().length, 0); - equal(_(undefined).lines().length, 0); - }); - - test('String: pad', function() { - equal(_('1').pad(8), ' 1'); - equal(_(1).pad(8), ' 1'); - equal(_('1').pad(8, '0'), '00000001'); - equal(_('1').pad(8, '0', 'left'), '00000001'); - equal(_('1').pad(8, '0', 'right'), '10000000'); - equal(_('1').pad(8, '0', 'both'), '00001000'); - equal(_('foo').pad(8, '0', 'both'), '000foo00'); - equal(_('foo').pad(7, '0', 'both'), '00foo00'); - equal(_('foo').pad(7, '!@$%dofjrofj', 'both'), '!!foo!!'); - equal(_('').pad(2), ' '); - equal(_(null).pad(2), ' '); - equal(_(undefined).pad(2), ' '); - }); - - test('String: lpad', function() { - equal(_('1').lpad(8), ' 1'); - equal(_(1).lpad(8), ' 1'); - equal(_('1').lpad(8, '0'), '00000001'); - equal(_('1').lpad(8, '0', 'left'), '00000001'); - equal(_('').lpad(2), ' '); - equal(_(null).lpad(2), ' '); - equal(_(undefined).lpad(2), ' '); - }); - - test('String: rpad', function() { - equal(_('1').rpad(8), '1 '); - equal(_(1).lpad(8), ' 1'); - equal(_('1').rpad(8, '0'), '10000000'); - equal(_('foo').rpad(8, '0'), 'foo00000'); - equal(_('foo').rpad(7, '0'), 'foo0000'); - equal(_('').rpad(2), ' '); - equal(_(null).rpad(2), ' '); - equal(_(undefined).rpad(2), ' '); - }); - - test('String: lrpad', function() { - equal(_('1').lrpad(8), ' 1 '); - equal(_(1).lrpad(8), ' 1 '); - equal(_('1').lrpad(8, '0'), '00001000'); - equal(_('foo').lrpad(8, '0'), '000foo00'); - equal(_('foo').lrpad(7, '0'), '00foo00'); - equal(_('foo').lrpad(7, '!@$%dofjrofj'), '!!foo!!'); - equal(_('').lrpad(2), ' '); - equal(_(null).lrpad(2), ' '); - equal(_(undefined).lrpad(2), ' '); - }); - - test('String: toNumber', function() { - deepEqual(_('not a number').toNumber(), NaN); - equal(_(0).toNumber(), 0); - equal(_('0').toNumber(), 0); - equal(_('0.0').toNumber(), 0); - equal(_('0.1').toNumber(), 0); - equal(_('0.1').toNumber(1), 0.1); - equal(_(' 0.1 ').toNumber(1), 0.1); - equal(_('0000').toNumber(), 0); - equal(_('2.345').toNumber(), 2); - equal(_('2.345').toNumber(NaN), 2); - equal(_('2.345').toNumber(2), 2.35); - equal(_('2.344').toNumber(2), 2.34); - equal(_('2').toNumber(2), 2.00); - equal(_(2).toNumber(2), 2.00); - equal(_(-2).toNumber(), -2); - equal(_('-2').toNumber(), -2); - equal(_('').toNumber(), 0); - equal(_(null).toNumber(), 0); - equal(_(undefined).toNumber(), 0); - }); - - test('String: numberFormat', function() { - equal(_.numberFormat(9000), '9,000'); - equal(_.numberFormat(9000, 0), '9,000'); - equal(_.numberFormat(9000, 0, '', ''), '9000'); - equal(_.numberFormat(90000, 2), '90,000.00'); - equal(_.numberFormat(1000.754), '1,001'); - equal(_.numberFormat(1000.754, 2), '1,000.75'); - equal(_.numberFormat(1000.754, 0, ',', '.'), '1.001'); - equal(_.numberFormat(1000.754, 2, ',', '.'), '1.000,75'); - equal(_.numberFormat(1000000.754, 2, ',', '.'), '1.000.000,75'); - equal(_.numberFormat(1000000000), '1,000,000,000'); - equal(_.numberFormat(100000000), '100,000,000'); - equal(_.numberFormat('not number'), ''); - equal(_.numberFormat(), ''); - equal(_.numberFormat(null, '.', ','), ''); - equal(_.numberFormat(undefined, '.', ','), ''); - equal(_.numberFormat(new Number(5000)), '5,000'); - }); - - test('String: strRight', function() { - equal(_('This_is_a_test_string').strRight('_'), 'is_a_test_string'); - equal(_('This_is_a_test_string').strRight('string'), ''); - equal(_('This_is_a_test_string').strRight(), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strRight(''), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strRight('-'), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strRight(''), 'This_is_a_test_string'); - equal(_('').strRight('foo'), ''); - equal(_(null).strRight('foo'), ''); - equal(_(undefined).strRight('foo'), ''); - equal(_(12345).strRight(2), '345'); - }); - - test('String: strRightBack', function() { - equal(_('This_is_a_test_string').strRightBack('_'), 'string'); - equal(_('This_is_a_test_string').strRightBack('string'), ''); - equal(_('This_is_a_test_string').strRightBack(), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strRightBack(''), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strRightBack('-'), 'This_is_a_test_string'); - equal(_('').strRightBack('foo'), ''); - equal(_(null).strRightBack('foo'), ''); - equal(_(undefined).strRightBack('foo'), ''); - equal(_(12345).strRightBack(2), '345'); - }); - - test('String: strLeft', function() { - equal(_('This_is_a_test_string').strLeft('_'), 'This'); - equal(_('This_is_a_test_string').strLeft('This'), ''); - equal(_('This_is_a_test_string').strLeft(), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strLeft(''), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strLeft('-'), 'This_is_a_test_string'); - equal(_('').strLeft('foo'), ''); - equal(_(null).strLeft('foo'), ''); - equal(_(undefined).strLeft('foo'), ''); - equal(_(123454321).strLeft(3), '12'); - }); - - test('String: strLeftBack', function() { - equal(_('This_is_a_test_string').strLeftBack('_'), 'This_is_a_test'); - equal(_('This_is_a_test_string').strLeftBack('This'), ''); - equal(_('This_is_a_test_string').strLeftBack(), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strLeftBack(''), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strLeftBack('-'), 'This_is_a_test_string'); - equal(_('').strLeftBack('foo'), ''); - equal(_(null).strLeftBack('foo'), ''); - equal(_(undefined).strLeftBack('foo'), ''); - equal(_(123454321).strLeftBack(3), '123454'); - }); - - test('Strings: stripTags', function() { - equal(_('a link').stripTags(), 'a link'); - equal(_('a link - - - - - - - - -

    Underscore.string Test Suite

    -

    -

    -
      -
      -

      Underscore.string Speed Suite

      - -
      - - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html deleted file mode 100644 index 9854c17115c4..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - Underscore.strings Test Suite - - - - - - - - -

      Underscore.string Test Suite

      -

      -

      -
        - - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js deleted file mode 100644 index 32252a3f5906..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js +++ /dev/null @@ -1,200 +0,0 @@ -$(document).ready(function() { - - module("Arrays"); - - test("first", function() { - equal(_.first([1,2,3]), 1, 'can pull out the first element of an array'); - equal(_([1, 2, 3]).first(), 1, 'can perform OO-style "first()"'); - equal(_.first([1,2,3], 0).join(', '), "", 'can pass an index to first'); - equal(_.first([1,2,3], 2).join(', '), '1, 2', 'can pass an index to first'); - equal(_.first([1,2,3], 5).join(', '), '1, 2, 3', 'can pass an index to first'); - var result = (function(){ return _.first(arguments); })(4, 3, 2, 1); - equal(result, 4, 'works on an arguments object.'); - result = _.map([[1,2,3],[1,2,3]], _.first); - equal(result.join(','), '1,1', 'works well with _.map'); - result = (function() { return _.take([1,2,3], 2); })(); - equal(result.join(','), '1,2', 'aliased as take'); - - equal(_.first(null), undefined, 'handles nulls'); - }); - - test("rest", function() { - var numbers = [1, 2, 3, 4]; - equal(_.rest(numbers).join(", "), "2, 3, 4", 'working rest()'); - equal(_.rest(numbers, 0).join(", "), "1, 2, 3, 4", 'working rest(0)'); - equal(_.rest(numbers, 2).join(', '), '3, 4', 'rest can take an index'); - var result = (function(){ return _(arguments).tail(); })(1, 2, 3, 4); - equal(result.join(', '), '2, 3, 4', 'aliased as tail and works on arguments object'); - result = _.map([[1,2,3],[1,2,3]], _.rest); - equal(_.flatten(result).join(','), '2,3,2,3', 'works well with _.map'); - result = (function(){ return _(arguments).drop(); })(1, 2, 3, 4); - equal(result.join(', '), '2, 3, 4', 'aliased as drop and works on arguments object'); - }); - - test("initial", function() { - equal(_.initial([1,2,3,4,5]).join(", "), "1, 2, 3, 4", 'working initial()'); - equal(_.initial([1,2,3,4],2).join(", "), "1, 2", 'initial can take an index'); - var result = (function(){ return _(arguments).initial(); })(1, 2, 3, 4); - equal(result.join(", "), "1, 2, 3", 'initial works on arguments object'); - result = _.map([[1,2,3],[1,2,3]], _.initial); - equal(_.flatten(result).join(','), '1,2,1,2', 'initial works with _.map'); - }); - - test("last", function() { - equal(_.last([1,2,3]), 3, 'can pull out the last element of an array'); - equal(_.last([1,2,3], 0).join(', '), "", 'can pass an index to last'); - equal(_.last([1,2,3], 2).join(', '), '2, 3', 'can pass an index to last'); - equal(_.last([1,2,3], 5).join(', '), '1, 2, 3', 'can pass an index to last'); - var result = (function(){ return _(arguments).last(); })(1, 2, 3, 4); - equal(result, 4, 'works on an arguments object'); - result = _.map([[1,2,3],[1,2,3]], _.last); - equal(result.join(','), '3,3', 'works well with _.map'); - - equal(_.last(null), undefined, 'handles nulls'); - }); - - test("compact", function() { - equal(_.compact([0, 1, false, 2, false, 3]).length, 3, 'can trim out all falsy values'); - var result = (function(){ return _(arguments).compact().length; })(0, 1, false, 2, false, 3); - equal(result, 3, 'works on an arguments object'); - }); - - test("flatten", function() { - if (window.JSON) { - var list = [1, [2], [3, [[[4]]]]]; - equal(JSON.stringify(_.flatten(list)), '[1,2,3,4]', 'can flatten nested arrays'); - equal(JSON.stringify(_.flatten(list, true)), '[1,2,3,[[[4]]]]', 'can shallowly flatten nested arrays'); - var result = (function(){ return _.flatten(arguments); })(1, [2], [3, [[[4]]]]); - equal(JSON.stringify(result), '[1,2,3,4]', 'works on an arguments object'); - } - }); - - test("without", function() { - var list = [1, 2, 1, 0, 3, 1, 4]; - equal(_.without(list, 0, 1).join(', '), '2, 3, 4', 'can remove all instances of an object'); - var result = (function(){ return _.without(arguments, 0, 1); })(1, 2, 1, 0, 3, 1, 4); - equal(result.join(', '), '2, 3, 4', 'works on an arguments object'); - - var list = [{one : 1}, {two : 2}]; - ok(_.without(list, {one : 1}).length == 2, 'uses real object identity for comparisons.'); - ok(_.without(list, list[0]).length == 1, 'ditto.'); - }); - - test("uniq", function() { - var list = [1, 2, 1, 3, 1, 4]; - equal(_.uniq(list).join(', '), '1, 2, 3, 4', 'can find the unique values of an unsorted array'); - - var list = [1, 1, 1, 2, 2, 3]; - equal(_.uniq(list, true).join(', '), '1, 2, 3', 'can find the unique values of a sorted array faster'); - - var list = [{name:'moe'}, {name:'curly'}, {name:'larry'}, {name:'curly'}]; - var iterator = function(value) { return value.name; }; - equal(_.map(_.uniq(list, false, iterator), iterator).join(', '), 'moe, curly, larry', 'can find the unique values of an array using a custom iterator'); - - var iterator = function(value) { return value +1; }; - var list = [1, 2, 2, 3, 4, 4]; - equal(_.uniq(list, true, iterator).join(', '), '1, 2, 3, 4', 'iterator works with sorted array'); - - var result = (function(){ return _.uniq(arguments); })(1, 2, 1, 3, 1, 4); - equal(result.join(', '), '1, 2, 3, 4', 'works on an arguments object'); - }); - - test("intersection", function() { - var stooges = ['moe', 'curly', 'larry'], leaders = ['moe', 'groucho']; - equal(_.intersection(stooges, leaders).join(''), 'moe', 'can take the set intersection of two arrays'); - equal(_(stooges).intersection(leaders).join(''), 'moe', 'can perform an OO-style intersection'); - var result = (function(){ return _.intersection(arguments, leaders); })('moe', 'curly', 'larry'); - equal(result.join(''), 'moe', 'works on an arguments object'); - }); - - test("union", function() { - var result = _.union([1, 2, 3], [2, 30, 1], [1, 40]); - equal(result.join(' '), '1 2 3 30 40', 'takes the union of a list of arrays'); - - var result = _.union([1, 2, 3], [2, 30, 1], [1, 40, [1]]); - equal(result.join(' '), '1 2 3 30 40 1', 'takes the union of a list of nested arrays'); - }); - - test("difference", function() { - var result = _.difference([1, 2, 3], [2, 30, 40]); - equal(result.join(' '), '1 3', 'takes the difference of two arrays'); - - var result = _.difference([1, 2, 3, 4], [2, 30, 40], [1, 11, 111]); - equal(result.join(' '), '3 4', 'takes the difference of three arrays'); - }); - - test('zip', function() { - var names = ['moe', 'larry', 'curly'], ages = [30, 40, 50], leaders = [true]; - var stooges = _.zip(names, ages, leaders); - equal(String(stooges), 'moe,30,true,larry,40,,curly,50,', 'zipped together arrays of different lengths'); - }); - - test('object', function() { - var result = _.object(['moe', 'larry', 'curly'], [30, 40, 50]); - var shouldBe = {moe: 30, larry: 40, curly: 50}; - ok(_.isEqual(result, shouldBe), 'two arrays zipped together into an object'); - - result = _.object([['one', 1], ['two', 2], ['three', 3]]); - shouldBe = {one: 1, two: 2, three: 3}; - ok(_.isEqual(result, shouldBe), 'an array of pairs zipped together into an object'); - - var stooges = {moe: 30, larry: 40, curly: 50}; - ok(_.isEqual(_.object(_.pairs(stooges)), stooges), 'an object converted to pairs and back to an object'); - - ok(_.isEqual(_.object(null), {}), 'handles nulls'); - }); - - test("indexOf", function() { - var numbers = [1, 2, 3]; - numbers.indexOf = null; - equal(_.indexOf(numbers, 2), 1, 'can compute indexOf, even without the native function'); - var result = (function(){ return _.indexOf(arguments, 2); })(1, 2, 3); - equal(result, 1, 'works on an arguments object'); - equal(_.indexOf(null, 2), -1, 'handles nulls properly'); - - var numbers = [10, 20, 30, 40, 50], num = 35; - var index = _.indexOf(numbers, num, true); - equal(index, -1, '35 is not in the list'); - - numbers = [10, 20, 30, 40, 50]; num = 40; - index = _.indexOf(numbers, num, true); - equal(index, 3, '40 is in the list'); - - numbers = [1, 40, 40, 40, 40, 40, 40, 40, 50, 60, 70]; num = 40; - index = _.indexOf(numbers, num, true); - equal(index, 1, '40 is in the list'); - - numbers = [1, 2, 3, 1, 2, 3, 1, 2, 3]; - index = _.indexOf(numbers, 2, 5); - equal(index, 7, 'supports the fromIndex argument'); - }); - - test("lastIndexOf", function() { - var numbers = [1, 0, 1]; - equal(_.lastIndexOf(numbers, 1), 2); - - numbers = [1, 0, 1, 0, 0, 1, 0, 0, 0]; - numbers.lastIndexOf = null; - equal(_.lastIndexOf(numbers, 1), 5, 'can compute lastIndexOf, even without the native function'); - equal(_.lastIndexOf(numbers, 0), 8, 'lastIndexOf the other element'); - var result = (function(){ return _.lastIndexOf(arguments, 1); })(1, 0, 1, 0, 0, 1, 0, 0, 0); - equal(result, 5, 'works on an arguments object'); - equal(_.indexOf(null, 2), -1, 'handles nulls properly'); - - numbers = [1, 2, 3, 1, 2, 3, 1, 2, 3]; - index = _.lastIndexOf(numbers, 2, 2); - equal(index, 1, 'supports the fromIndex argument'); - }); - - test("range", function() { - equal(_.range(0).join(''), '', 'range with 0 as a first argument generates an empty array'); - equal(_.range(4).join(' '), '0 1 2 3', 'range with a single positive argument generates an array of elements 0,1,2,...,n-1'); - equal(_.range(5, 8).join(' '), '5 6 7', 'range with two arguments a & b, a<b generates an array of elements a,a+1,a+2,...,b-2,b-1'); - equal(_.range(8, 5).join(''), '', 'range with two arguments a & b, b<a generates an empty array'); - equal(_.range(3, 10, 3).join(' '), '3 6 9', 'range with three arguments a & b & c, c < b-a, a < b generates an array of elements a,a+c,a+2c,...,b - (multiplier of a) < c'); - equal(_.range(3, 10, 15).join(''), '3', 'range with three arguments a & b & c, c > b-a, a < b generates an array with a single element, equal to a'); - equal(_.range(12, 7, -2).join(' '), '12 10 8', 'range with three arguments a & b & c, a > b, c < 0 generates an array of elements a,a-c,a-2c and ends with the number not less than b'); - equal(_.range(0, -10, -1).join(' '), '0 -1 -2 -3 -4 -5 -6 -7 -8 -9', 'final example in the Python docs'); - }); - -}); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js deleted file mode 100644 index 16cf7bf57417..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js +++ /dev/null @@ -1,59 +0,0 @@ -$(document).ready(function() { - - module("Chaining"); - - test("map/flatten/reduce", function() { - var lyrics = [ - "I'm a lumberjack and I'm okay", - "I sleep all night and I work all day", - "He's a lumberjack and he's okay", - "He sleeps all night and he works all day" - ]; - var counts = _(lyrics).chain() - .map(function(line) { return line.split(''); }) - .flatten() - .reduce(function(hash, l) { - hash[l] = hash[l] || 0; - hash[l]++; - return hash; - }, {}).value(); - ok(counts['a'] == 16 && counts['e'] == 10, 'counted all the letters in the song'); - }); - - test("select/reject/sortBy", function() { - var numbers = [1,2,3,4,5,6,7,8,9,10]; - numbers = _(numbers).chain().select(function(n) { - return n % 2 == 0; - }).reject(function(n) { - return n % 4 == 0; - }).sortBy(function(n) { - return -n; - }).value(); - equal(numbers.join(', '), "10, 6, 2", "filtered and reversed the numbers"); - }); - - test("select/reject/sortBy in functional style", function() { - var numbers = [1,2,3,4,5,6,7,8,9,10]; - numbers = _.chain(numbers).select(function(n) { - return n % 2 == 0; - }).reject(function(n) { - return n % 4 == 0; - }).sortBy(function(n) { - return -n; - }).value(); - equal(numbers.join(', '), "10, 6, 2", "filtered and reversed the numbers"); - }); - - test("reverse/concat/unshift/pop/map", function() { - var numbers = [1,2,3,4,5]; - numbers = _(numbers).chain() - .reverse() - .concat([5, 5, 5]) - .unshift(17) - .pop() - .map(function(n){ return n * 2; }) - .value(); - equal(numbers.join(', '), "34, 10, 8, 6, 4, 2, 10, 10", 'can chain together array functions.'); - }); - -}); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js deleted file mode 100644 index e089626dfdbb..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js +++ /dev/null @@ -1,426 +0,0 @@ -$(document).ready(function() { - - module("Collections"); - - test("each", function() { - _.each([1, 2, 3], function(num, i) { - equal(num, i + 1, 'each iterators provide value and iteration count'); - }); - - var answers = []; - _.each([1, 2, 3], function(num){ answers.push(num * this.multiplier);}, {multiplier : 5}); - equal(answers.join(', '), '5, 10, 15', 'context object property accessed'); - - answers = []; - _.forEach([1, 2, 3], function(num){ answers.push(num); }); - equal(answers.join(', '), '1, 2, 3', 'aliased as "forEach"'); - - answers = []; - var obj = {one : 1, two : 2, three : 3}; - obj.constructor.prototype.four = 4; - _.each(obj, function(value, key){ answers.push(key); }); - equal(answers.join(", "), 'one, two, three', 'iterating over objects works, and ignores the object prototype.'); - delete obj.constructor.prototype.four; - - answer = null; - _.each([1, 2, 3], function(num, index, arr){ if (_.include(arr, num)) answer = true; }); - ok(answer, 'can reference the original collection from inside the iterator'); - - answers = 0; - _.each(null, function(){ ++answers; }); - equal(answers, 0, 'handles a null properly'); - }); - - test('map', function() { - var doubled = _.map([1, 2, 3], function(num){ return num * 2; }); - equal(doubled.join(', '), '2, 4, 6', 'doubled numbers'); - - doubled = _.collect([1, 2, 3], function(num){ return num * 2; }); - equal(doubled.join(', '), '2, 4, 6', 'aliased as "collect"'); - - var tripled = _.map([1, 2, 3], function(num){ return num * this.multiplier; }, {multiplier : 3}); - equal(tripled.join(', '), '3, 6, 9', 'tripled numbers with context'); - - var doubled = _([1, 2, 3]).map(function(num){ return num * 2; }); - equal(doubled.join(', '), '2, 4, 6', 'OO-style doubled numbers'); - - if (document.querySelectorAll) { - var ids = _.map(document.querySelectorAll('#map-test *'), function(n){ return n.id; }); - deepEqual(ids, ['id1', 'id2'], 'Can use collection methods on NodeLists.'); - } - - var ids = _.map($('#map-test').children(), function(n){ return n.id; }); - deepEqual(ids, ['id1', 'id2'], 'Can use collection methods on jQuery Array-likes.'); - - var ids = _.map(document.images, function(n){ return n.id; }); - ok(ids[0] == 'chart_image', 'can use collection methods on HTMLCollections'); - - var ifnull = _.map(null, function(){}); - ok(_.isArray(ifnull) && ifnull.length === 0, 'handles a null properly'); - }); - - test('reduce', function() { - var sum = _.reduce([1, 2, 3], function(sum, num){ return sum + num; }, 0); - equal(sum, 6, 'can sum up an array'); - - var context = {multiplier : 3}; - sum = _.reduce([1, 2, 3], function(sum, num){ return sum + num * this.multiplier; }, 0, context); - equal(sum, 18, 'can reduce with a context object'); - - sum = _.inject([1, 2, 3], function(sum, num){ return sum + num; }, 0); - equal(sum, 6, 'aliased as "inject"'); - - sum = _([1, 2, 3]).reduce(function(sum, num){ return sum + num; }, 0); - equal(sum, 6, 'OO-style reduce'); - - var sum = _.reduce([1, 2, 3], function(sum, num){ return sum + num; }); - equal(sum, 6, 'default initial value'); - - var ifnull; - try { - _.reduce(null, function(){}); - } catch (ex) { - ifnull = ex; - } - ok(ifnull instanceof TypeError, 'handles a null (without inital value) properly'); - - ok(_.reduce(null, function(){}, 138) === 138, 'handles a null (with initial value) properly'); - equal(_.reduce([], function(){}, undefined), undefined, 'undefined can be passed as a special case'); - raises(function() { _.reduce([], function(){}); }, TypeError, 'throws an error for empty arrays with no initial value'); - }); - - test('reduceRight', function() { - var list = _.reduceRight(["foo", "bar", "baz"], function(memo, str){ return memo + str; }, ''); - equal(list, 'bazbarfoo', 'can perform right folds'); - - var list = _.foldr(["foo", "bar", "baz"], function(memo, str){ return memo + str; }, ''); - equal(list, 'bazbarfoo', 'aliased as "foldr"'); - - var list = _.foldr(["foo", "bar", "baz"], function(memo, str){ return memo + str; }); - equal(list, 'bazbarfoo', 'default initial value'); - - var ifnull; - try { - _.reduceRight(null, function(){}); - } catch (ex) { - ifnull = ex; - } - ok(ifnull instanceof TypeError, 'handles a null (without inital value) properly'); - - var sum = _.reduceRight({a: 1, b: 2, c: 3}, function(sum, num){ return sum + num; }); - equal(sum, 6, 'default initial value on object'); - - ok(_.reduceRight(null, function(){}, 138) === 138, 'handles a null (with initial value) properly'); - - equal(_.reduceRight([], function(){}, undefined), undefined, 'undefined can be passed as a special case'); - raises(function() { _.reduceRight([], function(){}); }, TypeError, 'throws an error for empty arrays with no initial value'); - - // Assert that the correct arguments are being passed. - - var args, - memo = {}, - object = {a: 1, b: 2}, - lastKey = _.keys(object).pop(); - - var expected = lastKey == 'a' - ? [memo, 1, 'a', object] - : [memo, 2, 'b', object]; - - _.reduceRight(object, function() { - args || (args = _.toArray(arguments)); - }, memo); - - deepEqual(args, expected); - - // And again, with numeric keys. - - object = {'2': 'a', '1': 'b'}; - lastKey = _.keys(object).pop(); - args = null; - - expected = lastKey == '2' - ? [memo, 'a', '2', object] - : [memo, 'b', '1', object]; - - _.reduceRight(object, function() { - args || (args = _.toArray(arguments)); - }, memo); - - deepEqual(args, expected); - }); - - test('find', function() { - var array = [1, 2, 3, 4]; - strictEqual(_.find(array, function(n) { return n > 2; }), 3, 'should return first found `value`'); - strictEqual(_.find(array, function() { return false; }), void 0, 'should return `undefined` if `value` is not found'); - }); - - test('detect', function() { - var result = _.detect([1, 2, 3], function(num){ return num * 2 == 4; }); - equal(result, 2, 'found the first "2" and broke the loop'); - }); - - test('select', function() { - var evens = _.select([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }); - equal(evens.join(', '), '2, 4, 6', 'selected each even number'); - - evens = _.filter([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }); - equal(evens.join(', '), '2, 4, 6', 'aliased as "filter"'); - }); - - test('reject', function() { - var odds = _.reject([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }); - equal(odds.join(', '), '1, 3, 5', 'rejected each even number'); - - var context = "obj"; - - var evens = _.reject([1, 2, 3, 4, 5, 6], function(num){ - equal(context, "obj"); - return num % 2 != 0; - }, context); - equal(evens.join(', '), '2, 4, 6', 'rejected each odd number'); - }); - - test('all', function() { - ok(_.all([], _.identity), 'the empty set'); - ok(_.all([true, true, true], _.identity), 'all true values'); - ok(!_.all([true, false, true], _.identity), 'one false value'); - ok(_.all([0, 10, 28], function(num){ return num % 2 == 0; }), 'even numbers'); - ok(!_.all([0, 11, 28], function(num){ return num % 2 == 0; }), 'an odd number'); - ok(_.all([1], _.identity) === true, 'cast to boolean - true'); - ok(_.all([0], _.identity) === false, 'cast to boolean - false'); - ok(_.every([true, true, true], _.identity), 'aliased as "every"'); - ok(!_.all([undefined, undefined, undefined], _.identity), 'works with arrays of undefined'); - }); - - test('any', function() { - var nativeSome = Array.prototype.some; - Array.prototype.some = null; - ok(!_.any([]), 'the empty set'); - ok(!_.any([false, false, false]), 'all false values'); - ok(_.any([false, false, true]), 'one true value'); - ok(_.any([null, 0, 'yes', false]), 'a string'); - ok(!_.any([null, 0, '', false]), 'falsy values'); - ok(!_.any([1, 11, 29], function(num){ return num % 2 == 0; }), 'all odd numbers'); - ok(_.any([1, 10, 29], function(num){ return num % 2 == 0; }), 'an even number'); - ok(_.any([1], _.identity) === true, 'cast to boolean - true'); - ok(_.any([0], _.identity) === false, 'cast to boolean - false'); - ok(_.some([false, false, true]), 'aliased as "some"'); - Array.prototype.some = nativeSome; - }); - - test('include', function() { - ok(_.include([1,2,3], 2), 'two is in the array'); - ok(!_.include([1,3,9], 2), 'two is not in the array'); - ok(_.contains({moe:1, larry:3, curly:9}, 3) === true, '_.include on objects checks their values'); - ok(_([1,2,3]).include(2), 'OO-style include'); - }); - - test('invoke', function() { - var list = [[5, 1, 7], [3, 2, 1]]; - var result = _.invoke(list, 'sort'); - equal(result[0].join(', '), '1, 5, 7', 'first array sorted'); - equal(result[1].join(', '), '1, 2, 3', 'second array sorted'); - }); - - test('invoke w/ function reference', function() { - var list = [[5, 1, 7], [3, 2, 1]]; - var result = _.invoke(list, Array.prototype.sort); - equal(result[0].join(', '), '1, 5, 7', 'first array sorted'); - equal(result[1].join(', '), '1, 2, 3', 'second array sorted'); - }); - - // Relevant when using ClojureScript - test('invoke when strings have a call method', function() { - String.prototype.call = function() { - return 42; - }; - var list = [[5, 1, 7], [3, 2, 1]]; - var s = "foo"; - equal(s.call(), 42, "call function exists"); - var result = _.invoke(list, 'sort'); - equal(result[0].join(', '), '1, 5, 7', 'first array sorted'); - equal(result[1].join(', '), '1, 2, 3', 'second array sorted'); - delete String.prototype.call; - equal(s.call, undefined, "call function removed"); - }); - - test('pluck', function() { - var people = [{name : 'moe', age : 30}, {name : 'curly', age : 50}]; - equal(_.pluck(people, 'name').join(', '), 'moe, curly', 'pulls names out of objects'); - }); - - test('where', function() { - var list = [{a: 1, b: 2}, {a: 2, b: 2}, {a: 1, b: 3}, {a: 1, b: 4}]; - var result = _.where(list, {a: 1}); - equal(result.length, 3); - equal(result[result.length - 1].b, 4); - result = _.where(list, {b: 2}); - equal(result.length, 2); - equal(result[0].a, 1); - }); - - test('max', function() { - equal(3, _.max([1, 2, 3]), 'can perform a regular Math.max'); - - var neg = _.max([1, 2, 3], function(num){ return -num; }); - equal(neg, 1, 'can perform a computation-based max'); - - equal(-Infinity, _.max({}), 'Maximum value of an empty object'); - equal(-Infinity, _.max([]), 'Maximum value of an empty array'); - - equal(299999, _.max(_.range(1,300000)), "Maximum value of a too-big array"); - }); - - test('min', function() { - equal(1, _.min([1, 2, 3]), 'can perform a regular Math.min'); - - var neg = _.min([1, 2, 3], function(num){ return -num; }); - equal(neg, 3, 'can perform a computation-based min'); - - equal(Infinity, _.min({}), 'Minimum value of an empty object'); - equal(Infinity, _.min([]), 'Minimum value of an empty array'); - - var now = new Date(9999999999); - var then = new Date(0); - equal(_.min([now, then]), then); - - equal(1, _.min(_.range(1,300000)), "Minimum value of a too-big array"); - }); - - test('sortBy', function() { - var people = [{name : 'curly', age : 50}, {name : 'moe', age : 30}]; - people = _.sortBy(people, function(person){ return person.age; }); - equal(_.pluck(people, 'name').join(', '), 'moe, curly', 'stooges sorted by age'); - - var list = [undefined, 4, 1, undefined, 3, 2]; - equal(_.sortBy(list, _.identity).join(','), '1,2,3,4,,', 'sortBy with undefined values'); - - var list = ["one", "two", "three", "four", "five"]; - var sorted = _.sortBy(list, 'length'); - equal(sorted.join(' '), 'one two four five three', 'sorted by length'); - - function Pair(x, y) { - this.x = x; - this.y = y; - } - - var collection = [ - new Pair(1, 1), new Pair(1, 2), - new Pair(1, 3), new Pair(1, 4), - new Pair(1, 5), new Pair(1, 6), - new Pair(2, 1), new Pair(2, 2), - new Pair(2, 3), new Pair(2, 4), - new Pair(2, 5), new Pair(2, 6), - new Pair(undefined, 1), new Pair(undefined, 2), - new Pair(undefined, 3), new Pair(undefined, 4), - new Pair(undefined, 5), new Pair(undefined, 6) - ]; - - var actual = _.sortBy(collection, function(pair) { - return pair.x; - }); - - deepEqual(actual, collection, 'sortBy should be stable'); - }); - - test('groupBy', function() { - var parity = _.groupBy([1, 2, 3, 4, 5, 6], function(num){ return num % 2; }); - ok('0' in parity && '1' in parity, 'created a group for each value'); - equal(parity[0].join(', '), '2, 4, 6', 'put each even number in the right group'); - - var list = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"]; - var grouped = _.groupBy(list, 'length'); - equal(grouped['3'].join(' '), 'one two six ten'); - equal(grouped['4'].join(' '), 'four five nine'); - equal(grouped['5'].join(' '), 'three seven eight'); - - var context = {}; - _.groupBy([{}], function(){ ok(this === context); }, context); - - grouped = _.groupBy([4.2, 6.1, 6.4], function(num) { - return Math.floor(num) > 4 ? 'hasOwnProperty' : 'constructor'; - }); - equal(grouped.constructor.length, 1); - equal(grouped.hasOwnProperty.length, 2); - - var array = [{}]; - _.groupBy(array, function(value, index, obj){ ok(obj === array); }); - }); - - test('countBy', function() { - var parity = _.countBy([1, 2, 3, 4, 5], function(num){ return num % 2 == 0; }); - equal(parity['true'], 2); - equal(parity['false'], 3); - - var list = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"]; - var grouped = _.countBy(list, 'length'); - equal(grouped['3'], 4); - equal(grouped['4'], 3); - equal(grouped['5'], 3); - - var context = {}; - _.countBy([{}], function(){ ok(this === context); }, context); - - grouped = _.countBy([4.2, 6.1, 6.4], function(num) { - return Math.floor(num) > 4 ? 'hasOwnProperty' : 'constructor'; - }); - equal(grouped.constructor, 1); - equal(grouped.hasOwnProperty, 2); - - var array = [{}]; - _.countBy(array, function(value, index, obj){ ok(obj === array); }); - }); - - test('sortedIndex', function() { - var numbers = [10, 20, 30, 40, 50], num = 35; - var indexForNum = _.sortedIndex(numbers, num); - equal(indexForNum, 3, '35 should be inserted at index 3'); - - var indexFor30 = _.sortedIndex(numbers, 30); - equal(indexFor30, 2, '30 should be inserted at index 2'); - - var objects = [{x: 10}, {x: 20}, {x: 30}, {x: 40}]; - var iterator = function(obj){ return obj.x; }; - strictEqual(_.sortedIndex(objects, {x: 25}, iterator), 2); - strictEqual(_.sortedIndex(objects, {x: 35}, 'x'), 3); - - var context = {1: 2, 2: 3, 3: 4}; - iterator = function(obj){ return this[obj]; }; - strictEqual(_.sortedIndex([1, 3], 2, iterator, context), 1); - }); - - test('shuffle', function() { - var numbers = _.range(10); - var shuffled = _.shuffle(numbers).sort(); - notStrictEqual(numbers, shuffled, 'original object is unmodified'); - equal(shuffled.join(','), numbers.join(','), 'contains the same members before and after shuffle'); - }); - - test('toArray', function() { - ok(!_.isArray(arguments), 'arguments object is not an array'); - ok(_.isArray(_.toArray(arguments)), 'arguments object converted into array'); - var a = [1,2,3]; - ok(_.toArray(a) !== a, 'array is cloned'); - equal(_.toArray(a).join(', '), '1, 2, 3', 'cloned array contains same elements'); - - var numbers = _.toArray({one : 1, two : 2, three : 3}); - equal(numbers.join(', '), '1, 2, 3', 'object flattened into array'); - }); - - test('size', function() { - equal(_.size({one : 1, two : 2, three : 3}), 3, 'can compute the size of an object'); - equal(_.size([1, 2, 3]), 3, 'can compute the size of an array'); - - var func = function() { - return _.size(arguments); - }; - - equal(func(1, 2, 3, 4), 4, 'can test the size of the arguments object'); - - equal(_.size('hello'), 5, 'can compute the size of a string'); - - equal(_.size(null), 0, 'handles nulls'); - }); - -}); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js deleted file mode 100644 index a529658779da..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js +++ /dev/null @@ -1,259 +0,0 @@ -$(document).ready(function() { - - module("Functions"); - - test("bind", function() { - var context = {name : 'moe'}; - var func = function(arg) { return "name: " + (this.name || arg); }; - var bound = _.bind(func, context); - equal(bound(), 'name: moe', 'can bind a function to a context'); - - bound = _(func).bind(context); - equal(bound(), 'name: moe', 'can do OO-style binding'); - - bound = _.bind(func, null, 'curly'); - equal(bound(), 'name: curly', 'can bind without specifying a context'); - - func = function(salutation, name) { return salutation + ': ' + name; }; - func = _.bind(func, this, 'hello'); - equal(func('moe'), 'hello: moe', 'the function was partially applied in advance'); - - var func = _.bind(func, this, 'curly'); - equal(func(), 'hello: curly', 'the function was completely applied in advance'); - - var func = function(salutation, firstname, lastname) { return salutation + ': ' + firstname + ' ' + lastname; }; - func = _.bind(func, this, 'hello', 'moe', 'curly'); - equal(func(), 'hello: moe curly', 'the function was partially applied in advance and can accept multiple arguments'); - - func = function(context, message) { equal(this, context, message); }; - _.bind(func, 0, 0, 'can bind a function to `0`')(); - _.bind(func, '', '', 'can bind a function to an empty string')(); - _.bind(func, false, false, 'can bind a function to `false`')(); - - // These tests are only meaningful when using a browser without a native bind function - // To test this with a modern browser, set underscore's nativeBind to undefined - var F = function () { return this; }; - var Boundf = _.bind(F, {hello: "moe curly"}); - equal(new Boundf().hello, undefined, "function should not be bound to the context, to comply with ECMAScript 5"); - equal(Boundf().hello, "moe curly", "When called without the new operator, it's OK to be bound to the context"); - }); - - test("bindAll", function() { - var curly = {name : 'curly'}, moe = { - name : 'moe', - getName : function() { return 'name: ' + this.name; }, - sayHi : function() { return 'hi: ' + this.name; } - }; - curly.getName = moe.getName; - _.bindAll(moe, 'getName', 'sayHi'); - curly.sayHi = moe.sayHi; - equal(curly.getName(), 'name: curly', 'unbound function is bound to current object'); - equal(curly.sayHi(), 'hi: moe', 'bound function is still bound to original object'); - - curly = {name : 'curly'}; - moe = { - name : 'moe', - getName : function() { return 'name: ' + this.name; }, - sayHi : function() { return 'hi: ' + this.name; } - }; - _.bindAll(moe); - curly.sayHi = moe.sayHi; - equal(curly.sayHi(), 'hi: moe', 'calling bindAll with no arguments binds all functions to the object'); - }); - - test("memoize", function() { - var fib = function(n) { - return n < 2 ? n : fib(n - 1) + fib(n - 2); - }; - var fastFib = _.memoize(fib); - equal(fib(10), 55, 'a memoized version of fibonacci produces identical results'); - equal(fastFib(10), 55, 'a memoized version of fibonacci produces identical results'); - - var o = function(str) { - return str; - }; - var fastO = _.memoize(o); - equal(o('toString'), 'toString', 'checks hasOwnProperty'); - equal(fastO('toString'), 'toString', 'checks hasOwnProperty'); - }); - - asyncTest("delay", 2, function() { - var delayed = false; - _.delay(function(){ delayed = true; }, 100); - setTimeout(function(){ ok(!delayed, "didn't delay the function quite yet"); }, 50); - setTimeout(function(){ ok(delayed, 'delayed the function'); start(); }, 150); - }); - - asyncTest("defer", 1, function() { - var deferred = false; - _.defer(function(bool){ deferred = bool; }, true); - _.delay(function(){ ok(deferred, "deferred the function"); start(); }, 50); - }); - - asyncTest("throttle", 2, function() { - var counter = 0; - var incr = function(){ counter++; }; - var throttledIncr = _.throttle(incr, 100); - throttledIncr(); throttledIncr(); throttledIncr(); - setTimeout(throttledIncr, 70); - setTimeout(throttledIncr, 120); - setTimeout(throttledIncr, 140); - setTimeout(throttledIncr, 190); - setTimeout(throttledIncr, 220); - setTimeout(throttledIncr, 240); - _.delay(function(){ equal(counter, 1, "incr was called immediately"); }, 30); - _.delay(function(){ equal(counter, 4, "incr was throttled"); start(); }, 400); - }); - - asyncTest("throttle arguments", 2, function() { - var value = 0; - var update = function(val){ value = val; }; - var throttledUpdate = _.throttle(update, 100); - throttledUpdate(1); throttledUpdate(2); throttledUpdate(3); - setTimeout(function(){ throttledUpdate(4); }, 120); - setTimeout(function(){ throttledUpdate(5); }, 140); - setTimeout(function(){ throttledUpdate(6); }, 250); - _.delay(function(){ equal(value, 1, "updated to latest value"); }, 40); - _.delay(function(){ equal(value, 6, "updated to latest value"); start(); }, 400); - }); - - asyncTest("throttle once", 2, function() { - var counter = 0; - var incr = function(){ return ++counter; }; - var throttledIncr = _.throttle(incr, 100); - var result = throttledIncr(); - _.delay(function(){ - equal(result, 1, "throttled functions return their value"); - equal(counter, 1, "incr was called once"); start(); - }, 220); - }); - - asyncTest("throttle twice", 1, function() { - var counter = 0; - var incr = function(){ counter++; }; - var throttledIncr = _.throttle(incr, 100); - throttledIncr(); throttledIncr(); - _.delay(function(){ equal(counter, 2, "incr was called twice"); start(); }, 220); - }); - - asyncTest("throttle repeatedly with results", 9, function() { - var counter = 0; - var incr = function(){ return ++counter; }; - var throttledIncr = _.throttle(incr, 100); - var results = []; - var saveResult = function() { results.push(throttledIncr()); }; - saveResult(); saveResult(); saveResult(); - setTimeout(saveResult, 70); - setTimeout(saveResult, 120); - setTimeout(saveResult, 140); - setTimeout(saveResult, 190); - setTimeout(saveResult, 240); - setTimeout(saveResult, 260); - _.delay(function() { - equal(results[0], 1, "incr was called once"); - equal(results[1], 1, "incr was throttled"); - equal(results[2], 1, "incr was throttled"); - equal(results[3], 1, "incr was throttled"); - equal(results[4], 2, "incr was called twice"); - equal(results[5], 2, "incr was throttled"); - equal(results[6], 2, "incr was throttled"); - equal(results[7], 3, "incr was called thrice"); - equal(results[8], 3, "incr was throttled"); - start(); - }, 400); - }); - - asyncTest("debounce", 1, function() { - var counter = 0; - var incr = function(){ counter++; }; - var debouncedIncr = _.debounce(incr, 50); - debouncedIncr(); debouncedIncr(); debouncedIncr(); - setTimeout(debouncedIncr, 30); - setTimeout(debouncedIncr, 60); - setTimeout(debouncedIncr, 90); - setTimeout(debouncedIncr, 120); - setTimeout(debouncedIncr, 150); - _.delay(function(){ equal(counter, 1, "incr was debounced"); start(); }, 220); - }); - - asyncTest("debounce asap", 5, function() { - var a, b, c; - var counter = 0; - var incr = function(){ return ++counter; }; - var debouncedIncr = _.debounce(incr, 50, true); - a = debouncedIncr(); - b = debouncedIncr(); - c = debouncedIncr(); - equal(a, 1); - equal(b, 1); - equal(c, 1); - equal(counter, 1, 'incr was called immediately'); - setTimeout(debouncedIncr, 30); - setTimeout(debouncedIncr, 60); - setTimeout(debouncedIncr, 90); - setTimeout(debouncedIncr, 120); - setTimeout(debouncedIncr, 150); - _.delay(function(){ equal(counter, 1, "incr was debounced"); start(); }, 220); - }); - - asyncTest("debounce asap recursively", 2, function() { - var counter = 0; - var debouncedIncr = _.debounce(function(){ - counter++; - if (counter < 5) debouncedIncr(); - }, 50, true); - debouncedIncr(); - equal(counter, 1, 'incr was called immediately'); - _.delay(function(){ equal(counter, 1, "incr was debounced"); start(); }, 70); - }); - - test("once", function() { - var num = 0; - var increment = _.once(function(){ num++; }); - increment(); - increment(); - equal(num, 1); - }); - - test("wrap", function() { - var greet = function(name){ return "hi: " + name; }; - var backwards = _.wrap(greet, function(func, name){ return func(name) + ' ' + name.split('').reverse().join(''); }); - equal(backwards('moe'), 'hi: moe eom', 'wrapped the saluation function'); - - var inner = function(){ return "Hello "; }; - var obj = {name : "Moe"}; - obj.hi = _.wrap(inner, function(fn){ return fn() + this.name; }); - equal(obj.hi(), "Hello Moe"); - - var noop = function(){}; - var wrapped = _.wrap(noop, function(fn){ return Array.prototype.slice.call(arguments, 0); }); - var ret = wrapped(['whats', 'your'], 'vector', 'victor'); - deepEqual(ret, [noop, ['whats', 'your'], 'vector', 'victor']); - }); - - test("compose", function() { - var greet = function(name){ return "hi: " + name; }; - var exclaim = function(sentence){ return sentence + '!'; }; - var composed = _.compose(exclaim, greet); - equal(composed('moe'), 'hi: moe!', 'can compose a function that takes another'); - - composed = _.compose(greet, exclaim); - equal(composed('moe'), 'hi: moe!', 'in this case, the functions are also commutative'); - }); - - test("after", function() { - var testAfter = function(afterAmount, timesCalled) { - var afterCalled = 0; - var after = _.after(afterAmount, function() { - afterCalled++; - }); - while (timesCalled--) after(); - return afterCalled; - }; - - equal(testAfter(5, 5), 1, "after(N) should fire after being called N times"); - equal(testAfter(5, 4), 0, "after(N) should not fire unless called N times"); - equal(testAfter(0, 0), 1, "after(0) should fire immediately"); - }); - -}); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html deleted file mode 100644 index 064fa98611a2..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - Underscore Test Suite - - - - - - - - - - - - - - - - -
        -
        -
        -
        -
        -
        -
        -
        -

        Underscore Speed Suite

        -

        - A representative sample of the functions are benchmarked here, to provide - a sense of how fast they might run in different browsers. - Each iteration runs on an array of 1000 elements.

        - For example, the 'intersection' test measures the number of times you can - find the intersection of two thousand-element arrays in one second. -

        -
        - - - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js deleted file mode 100644 index 22949c3bfe06..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js +++ /dev/null @@ -1,548 +0,0 @@ -$(document).ready(function() { - - module("Objects"); - - test("keys", function() { - equal(_.keys({one : 1, two : 2}).join(', '), 'one, two', 'can extract the keys from an object'); - // the test above is not safe because it relies on for-in enumeration order - var a = []; a[1] = 0; - equal(_.keys(a).join(', '), '1', 'is not fooled by sparse arrays; see issue #95'); - raises(function() { _.keys(null); }, TypeError, 'throws an error for `null` values'); - raises(function() { _.keys(void 0); }, TypeError, 'throws an error for `undefined` values'); - raises(function() { _.keys(1); }, TypeError, 'throws an error for number primitives'); - raises(function() { _.keys('a'); }, TypeError, 'throws an error for string primitives'); - raises(function() { _.keys(true); }, TypeError, 'throws an error for boolean primitives'); - }); - - test("values", function() { - equal(_.values({one: 1, two: 2}).join(', '), '1, 2', 'can extract the values from an object'); - equal(_.values({one: 1, two: 2, length: 3}).join(', '), '1, 2, 3', '... even when one of them is "length"'); - }); - - test("pairs", function() { - deepEqual(_.pairs({one: 1, two: 2}), [['one', 1], ['two', 2]], 'can convert an object into pairs'); - deepEqual(_.pairs({one: 1, two: 2, length: 3}), [['one', 1], ['two', 2], ['length', 3]], '... even when one of them is "length"'); - }); - - test("invert", function() { - var obj = {first: 'Moe', second: 'Larry', third: 'Curly'}; - equal(_.keys(_.invert(obj)).join(' '), 'Moe Larry Curly', 'can invert an object'); - ok(_.isEqual(_.invert(_.invert(obj)), obj), 'two inverts gets you back where you started'); - - var obj = {length: 3}; - ok(_.invert(obj)['3'] == 'length', 'can invert an object with "length"') - }); - - test("functions", function() { - var obj = {a : 'dash', b : _.map, c : (/yo/), d : _.reduce}; - ok(_.isEqual(['b', 'd'], _.functions(obj)), 'can grab the function names of any passed-in object'); - - var Animal = function(){}; - Animal.prototype.run = function(){}; - equal(_.functions(new Animal).join(''), 'run', 'also looks up functions on the prototype'); - }); - - test("extend", function() { - var result; - equal(_.extend({}, {a:'b'}).a, 'b', 'can extend an object with the attributes of another'); - equal(_.extend({a:'x'}, {a:'b'}).a, 'b', 'properties in source override destination'); - equal(_.extend({x:'x'}, {a:'b'}).x, 'x', 'properties not in source dont get overriden'); - result = _.extend({x:'x'}, {a:'a'}, {b:'b'}); - ok(_.isEqual(result, {x:'x', a:'a', b:'b'}), 'can extend from multiple source objects'); - result = _.extend({x:'x'}, {a:'a', x:2}, {a:'b'}); - ok(_.isEqual(result, {x:2, a:'b'}), 'extending from multiple source objects last property trumps'); - result = _.extend({}, {a: void 0, b: null}); - equal(_.keys(result).join(''), 'ab', 'extend does not copy undefined values'); - }); - - test("pick", function() { - var result; - result = _.pick({a:1, b:2, c:3}, 'a', 'c'); - ok(_.isEqual(result, {a:1, c:3}), 'can restrict properties to those named'); - result = _.pick({a:1, b:2, c:3}, ['b', 'c']); - ok(_.isEqual(result, {b:2, c:3}), 'can restrict properties to those named in an array'); - result = _.pick({a:1, b:2, c:3}, ['a'], 'b'); - ok(_.isEqual(result, {a:1, b:2}), 'can restrict properties to those named in mixed args'); - - var Obj = function(){}; - Obj.prototype = {a: 1, b: 2, c: 3}; - ok(_.isEqual(_.pick(new Obj, 'a', 'c'), {a:1, c: 3}), 'include prototype props'); - }); - - test("omit", function() { - var result; - result = _.omit({a:1, b:2, c:3}, 'b'); - ok(_.isEqual(result, {a:1, c:3}), 'can omit a single named property'); - result = _.omit({a:1, b:2, c:3}, 'a', 'c'); - ok(_.isEqual(result, {b:2}), 'can omit several named properties'); - result = _.omit({a:1, b:2, c:3}, ['b', 'c']); - ok(_.isEqual(result, {a:1}), 'can omit properties named in an array'); - - var Obj = function(){}; - Obj.prototype = {a: 1, b: 2, c: 3}; - ok(_.isEqual(_.omit(new Obj, 'b'), {a:1, c: 3}), 'include prototype props'); - }); - - test("defaults", function() { - var result; - var options = {zero: 0, one: 1, empty: "", nan: NaN, string: "string"}; - - _.defaults(options, {zero: 1, one: 10, twenty: 20}); - equal(options.zero, 0, 'value exists'); - equal(options.one, 1, 'value exists'); - equal(options.twenty, 20, 'default applied'); - - _.defaults(options, {empty: "full"}, {nan: "nan"}, {word: "word"}, {word: "dog"}); - equal(options.empty, "", 'value exists'); - ok(_.isNaN(options.nan), "NaN isn't overridden"); - equal(options.word, "word", 'new value is added, first one wins'); - }); - - test("clone", function() { - var moe = {name : 'moe', lucky : [13, 27, 34]}; - var clone = _.clone(moe); - equal(clone.name, 'moe', 'the clone as the attributes of the original'); - - clone.name = 'curly'; - ok(clone.name == 'curly' && moe.name == 'moe', 'clones can change shallow attributes without affecting the original'); - - clone.lucky.push(101); - equal(_.last(moe.lucky), 101, 'changes to deep attributes are shared with the original'); - - equal(_.clone(undefined), void 0, 'non objects should not be changed by clone'); - equal(_.clone(1), 1, 'non objects should not be changed by clone'); - equal(_.clone(null), null, 'non objects should not be changed by clone'); - }); - - test("isEqual", function() { - function First() { - this.value = 1; - } - First.prototype.value = 1; - function Second() { - this.value = 1; - } - Second.prototype.value = 2; - - // Basic equality and identity comparisons. - ok(_.isEqual(null, null), "`null` is equal to `null`"); - ok(_.isEqual(), "`undefined` is equal to `undefined`"); - - ok(!_.isEqual(0, -0), "`0` is not equal to `-0`"); - ok(!_.isEqual(-0, 0), "Commutative equality is implemented for `0` and `-0`"); - ok(!_.isEqual(null, undefined), "`null` is not equal to `undefined`"); - ok(!_.isEqual(undefined, null), "Commutative equality is implemented for `null` and `undefined`"); - - // String object and primitive comparisons. - ok(_.isEqual("Curly", "Curly"), "Identical string primitives are equal"); - ok(_.isEqual(new String("Curly"), new String("Curly")), "String objects with identical primitive values are equal"); - ok(_.isEqual(new String("Curly"), "Curly"), "String primitives and their corresponding object wrappers are equal"); - ok(_.isEqual("Curly", new String("Curly")), "Commutative equality is implemented for string objects and primitives"); - - ok(!_.isEqual("Curly", "Larry"), "String primitives with different values are not equal"); - ok(!_.isEqual(new String("Curly"), new String("Larry")), "String objects with different primitive values are not equal"); - ok(!_.isEqual(new String("Curly"), {toString: function(){ return "Curly"; }}), "String objects and objects with a custom `toString` method are not equal"); - - // Number object and primitive comparisons. - ok(_.isEqual(75, 75), "Identical number primitives are equal"); - ok(_.isEqual(new Number(75), new Number(75)), "Number objects with identical primitive values are equal"); - ok(_.isEqual(75, new Number(75)), "Number primitives and their corresponding object wrappers are equal"); - ok(_.isEqual(new Number(75), 75), "Commutative equality is implemented for number objects and primitives"); - ok(!_.isEqual(new Number(0), -0), "`new Number(0)` and `-0` are not equal"); - ok(!_.isEqual(0, new Number(-0)), "Commutative equality is implemented for `new Number(0)` and `-0`"); - - ok(!_.isEqual(new Number(75), new Number(63)), "Number objects with different primitive values are not equal"); - ok(!_.isEqual(new Number(63), {valueOf: function(){ return 63; }}), "Number objects and objects with a `valueOf` method are not equal"); - - // Comparisons involving `NaN`. - ok(_.isEqual(NaN, NaN), "`NaN` is equal to `NaN`"); - ok(!_.isEqual(61, NaN), "A number primitive is not equal to `NaN`"); - ok(!_.isEqual(new Number(79), NaN), "A number object is not equal to `NaN`"); - ok(!_.isEqual(Infinity, NaN), "`Infinity` is not equal to `NaN`"); - - // Boolean object and primitive comparisons. - ok(_.isEqual(true, true), "Identical boolean primitives are equal"); - ok(_.isEqual(new Boolean, new Boolean), "Boolean objects with identical primitive values are equal"); - ok(_.isEqual(true, new Boolean(true)), "Boolean primitives and their corresponding object wrappers are equal"); - ok(_.isEqual(new Boolean(true), true), "Commutative equality is implemented for booleans"); - ok(!_.isEqual(new Boolean(true), new Boolean), "Boolean objects with different primitive values are not equal"); - - // Common type coercions. - ok(!_.isEqual(true, new Boolean(false)), "Boolean objects are not equal to the boolean primitive `true`"); - ok(!_.isEqual("75", 75), "String and number primitives with like values are not equal"); - ok(!_.isEqual(new Number(63), new String(63)), "String and number objects with like values are not equal"); - ok(!_.isEqual(75, "75"), "Commutative equality is implemented for like string and number values"); - ok(!_.isEqual(0, ""), "Number and string primitives with like values are not equal"); - ok(!_.isEqual(1, true), "Number and boolean primitives with like values are not equal"); - ok(!_.isEqual(new Boolean(false), new Number(0)), "Boolean and number objects with like values are not equal"); - ok(!_.isEqual(false, new String("")), "Boolean primitives and string objects with like values are not equal"); - ok(!_.isEqual(12564504e5, new Date(2009, 9, 25)), "Dates and their corresponding numeric primitive values are not equal"); - - // Dates. - ok(_.isEqual(new Date(2009, 9, 25), new Date(2009, 9, 25)), "Date objects referencing identical times are equal"); - ok(!_.isEqual(new Date(2009, 9, 25), new Date(2009, 11, 13)), "Date objects referencing different times are not equal"); - ok(!_.isEqual(new Date(2009, 11, 13), { - getTime: function(){ - return 12606876e5; - } - }), "Date objects and objects with a `getTime` method are not equal"); - ok(!_.isEqual(new Date("Curly"), new Date("Curly")), "Invalid dates are not equal"); - - // Functions. - ok(!_.isEqual(First, Second), "Different functions with identical bodies and source code representations are not equal"); - - // RegExps. - ok(_.isEqual(/(?:)/gim, /(?:)/gim), "RegExps with equivalent patterns and flags are equal"); - ok(!_.isEqual(/(?:)/g, /(?:)/gi), "RegExps with equivalent patterns and different flags are not equal"); - ok(!_.isEqual(/Moe/gim, /Curly/gim), "RegExps with different patterns and equivalent flags are not equal"); - ok(!_.isEqual(/(?:)/gi, /(?:)/g), "Commutative equality is implemented for RegExps"); - ok(!_.isEqual(/Curly/g, {source: "Larry", global: true, ignoreCase: false, multiline: false}), "RegExps and RegExp-like objects are not equal"); - - // Empty arrays, array-like objects, and object literals. - ok(_.isEqual({}, {}), "Empty object literals are equal"); - ok(_.isEqual([], []), "Empty array literals are equal"); - ok(_.isEqual([{}], [{}]), "Empty nested arrays and objects are equal"); - ok(!_.isEqual({length: 0}, []), "Array-like objects and arrays are not equal."); - ok(!_.isEqual([], {length: 0}), "Commutative equality is implemented for array-like objects"); - - ok(!_.isEqual({}, []), "Object literals and array literals are not equal"); - ok(!_.isEqual([], {}), "Commutative equality is implemented for objects and arrays"); - - // Arrays with primitive and object values. - ok(_.isEqual([1, "Larry", true], [1, "Larry", true]), "Arrays containing identical primitives are equal"); - ok(_.isEqual([(/Moe/g), new Date(2009, 9, 25)], [(/Moe/g), new Date(2009, 9, 25)]), "Arrays containing equivalent elements are equal"); - - // Multi-dimensional arrays. - var a = [new Number(47), false, "Larry", /Moe/, new Date(2009, 11, 13), ['running', 'biking', new String('programming')], {a: 47}]; - var b = [new Number(47), false, "Larry", /Moe/, new Date(2009, 11, 13), ['running', 'biking', new String('programming')], {a: 47}]; - ok(_.isEqual(a, b), "Arrays containing nested arrays and objects are recursively compared"); - - // Overwrite the methods defined in ES 5.1 section 15.4.4. - a.forEach = a.map = a.filter = a.every = a.indexOf = a.lastIndexOf = a.some = a.reduce = a.reduceRight = null; - b.join = b.pop = b.reverse = b.shift = b.slice = b.splice = b.concat = b.sort = b.unshift = null; - - // Array elements and properties. - ok(_.isEqual(a, b), "Arrays containing equivalent elements and different non-numeric properties are equal"); - a.push("White Rocks"); - ok(!_.isEqual(a, b), "Arrays of different lengths are not equal"); - a.push("East Boulder"); - b.push("Gunbarrel Ranch", "Teller Farm"); - ok(!_.isEqual(a, b), "Arrays of identical lengths containing different elements are not equal"); - - // Sparse arrays. - ok(_.isEqual(Array(3), Array(3)), "Sparse arrays of identical lengths are equal"); - ok(!_.isEqual(Array(3), Array(6)), "Sparse arrays of different lengths are not equal when both are empty"); - - // Simple objects. - ok(_.isEqual({a: "Curly", b: 1, c: true}, {a: "Curly", b: 1, c: true}), "Objects containing identical primitives are equal"); - ok(_.isEqual({a: /Curly/g, b: new Date(2009, 11, 13)}, {a: /Curly/g, b: new Date(2009, 11, 13)}), "Objects containing equivalent members are equal"); - ok(!_.isEqual({a: 63, b: 75}, {a: 61, b: 55}), "Objects of identical sizes with different values are not equal"); - ok(!_.isEqual({a: 63, b: 75}, {a: 61, c: 55}), "Objects of identical sizes with different property names are not equal"); - ok(!_.isEqual({a: 1, b: 2}, {a: 1}), "Objects of different sizes are not equal"); - ok(!_.isEqual({a: 1}, {a: 1, b: 2}), "Commutative equality is implemented for objects"); - ok(!_.isEqual({x: 1, y: undefined}, {x: 1, z: 2}), "Objects with identical keys and different values are not equivalent"); - - // `A` contains nested objects and arrays. - a = { - name: new String("Moe Howard"), - age: new Number(77), - stooge: true, - hobbies: ["acting"], - film: { - name: "Sing a Song of Six Pants", - release: new Date(1947, 9, 30), - stars: [new String("Larry Fine"), "Shemp Howard"], - minutes: new Number(16), - seconds: 54 - } - }; - - // `B` contains equivalent nested objects and arrays. - b = { - name: new String("Moe Howard"), - age: new Number(77), - stooge: true, - hobbies: ["acting"], - film: { - name: "Sing a Song of Six Pants", - release: new Date(1947, 9, 30), - stars: [new String("Larry Fine"), "Shemp Howard"], - minutes: new Number(16), - seconds: 54 - } - }; - ok(_.isEqual(a, b), "Objects with nested equivalent members are recursively compared"); - - // Instances. - ok(_.isEqual(new First, new First), "Object instances are equal"); - ok(!_.isEqual(new First, new Second), "Objects with different constructors and identical own properties are not equal"); - ok(!_.isEqual({value: 1}, new First), "Object instances and objects sharing equivalent properties are not equal"); - ok(!_.isEqual({value: 2}, new Second), "The prototype chain of objects should not be examined"); - - // Circular Arrays. - (a = []).push(a); - (b = []).push(b); - ok(_.isEqual(a, b), "Arrays containing circular references are equal"); - a.push(new String("Larry")); - b.push(new String("Larry")); - ok(_.isEqual(a, b), "Arrays containing circular references and equivalent properties are equal"); - a.push("Shemp"); - b.push("Curly"); - ok(!_.isEqual(a, b), "Arrays containing circular references and different properties are not equal"); - - // More circular arrays #767. - a = ["everything is checked but", "this", "is not"]; - a[1] = a; - b = ["everything is checked but", ["this", "array"], "is not"]; - ok(!_.isEqual(a, b), "Comparison of circular references with non-circular references are not equal"); - - // Circular Objects. - a = {abc: null}; - b = {abc: null}; - a.abc = a; - b.abc = b; - ok(_.isEqual(a, b), "Objects containing circular references are equal"); - a.def = 75; - b.def = 75; - ok(_.isEqual(a, b), "Objects containing circular references and equivalent properties are equal"); - a.def = new Number(75); - b.def = new Number(63); - ok(!_.isEqual(a, b), "Objects containing circular references and different properties are not equal"); - - // More circular objects #767. - a = {everything: "is checked", but: "this", is: "not"}; - a.but = a; - b = {everything: "is checked", but: {that:"object"}, is: "not"}; - ok(!_.isEqual(a, b), "Comparison of circular references with non-circular object references are not equal"); - - // Cyclic Structures. - a = [{abc: null}]; - b = [{abc: null}]; - (a[0].abc = a).push(a); - (b[0].abc = b).push(b); - ok(_.isEqual(a, b), "Cyclic structures are equal"); - a[0].def = "Larry"; - b[0].def = "Larry"; - ok(_.isEqual(a, b), "Cyclic structures containing equivalent properties are equal"); - a[0].def = new String("Larry"); - b[0].def = new String("Curly"); - ok(!_.isEqual(a, b), "Cyclic structures containing different properties are not equal"); - - // Complex Circular References. - a = {foo: {b: {foo: {c: {foo: null}}}}}; - b = {foo: {b: {foo: {c: {foo: null}}}}}; - a.foo.b.foo.c.foo = a; - b.foo.b.foo.c.foo = b; - ok(_.isEqual(a, b), "Cyclic structures with nested and identically-named properties are equal"); - - // Chaining. - ok(!_.isEqual(_({x: 1, y: undefined}).chain(), _({x: 1, z: 2}).chain()), 'Chained objects containing different values are not equal'); - equal(_({x: 1, y: 2}).chain().isEqual(_({x: 1, y: 2}).chain()).value(), true, '`isEqual` can be chained'); - - // Custom `isEqual` methods. - var isEqualObj = {isEqual: function (o) { return o.isEqual == this.isEqual; }, unique: {}}; - var isEqualObjClone = {isEqual: isEqualObj.isEqual, unique: {}}; - - ok(_.isEqual(isEqualObj, isEqualObjClone), 'Both objects implement identical `isEqual` methods'); - ok(_.isEqual(isEqualObjClone, isEqualObj), 'Commutative equality is implemented for objects with custom `isEqual` methods'); - ok(!_.isEqual(isEqualObj, {}), 'Objects that do not implement equivalent `isEqual` methods are not equal'); - ok(!_.isEqual({}, isEqualObj), 'Commutative equality is implemented for objects with different `isEqual` methods'); - - // Objects from another frame. - ok(_.isEqual({}, iObject)); - }); - - test("isEmpty", function() { - ok(!_([1]).isEmpty(), '[1] is not empty'); - ok(_.isEmpty([]), '[] is empty'); - ok(!_.isEmpty({one : 1}), '{one : 1} is not empty'); - ok(_.isEmpty({}), '{} is empty'); - ok(_.isEmpty(new RegExp('')), 'objects with prototype properties are empty'); - ok(_.isEmpty(null), 'null is empty'); - ok(_.isEmpty(), 'undefined is empty'); - ok(_.isEmpty(''), 'the empty string is empty'); - ok(!_.isEmpty('moe'), 'but other strings are not'); - - var obj = {one : 1}; - delete obj.one; - ok(_.isEmpty(obj), 'deleting all the keys from an object empties it'); - }); - - // Setup remote variables for iFrame tests. - var iframe = document.createElement('iframe'); - jQuery(iframe).appendTo(document.body); - var iDoc = iframe.contentDocument || iframe.contentWindow.document; - iDoc.write( - "" - ); - iDoc.close(); - - test("isElement", function() { - ok(!_.isElement('div'), 'strings are not dom elements'); - ok(_.isElement($('html')[0]), 'the html tag is a DOM element'); - ok(_.isElement(iElement), 'even from another frame'); - }); - - test("isArguments", function() { - var args = (function(){ return arguments; })(1, 2, 3); - ok(!_.isArguments('string'), 'a string is not an arguments object'); - ok(!_.isArguments(_.isArguments), 'a function is not an arguments object'); - ok(_.isArguments(args), 'but the arguments object is an arguments object'); - ok(!_.isArguments(_.toArray(args)), 'but not when it\'s converted into an array'); - ok(!_.isArguments([1,2,3]), 'and not vanilla arrays.'); - ok(_.isArguments(iArguments), 'even from another frame'); - }); - - test("isObject", function() { - ok(_.isObject(arguments), 'the arguments object is object'); - ok(_.isObject([1, 2, 3]), 'and arrays'); - ok(_.isObject($('html')[0]), 'and DOM element'); - ok(_.isObject(iElement), 'even from another frame'); - ok(_.isObject(function () {}), 'and functions'); - ok(_.isObject(iFunction), 'even from another frame'); - ok(!_.isObject(null), 'but not null'); - ok(!_.isObject(undefined), 'and not undefined'); - ok(!_.isObject('string'), 'and not string'); - ok(!_.isObject(12), 'and not number'); - ok(!_.isObject(true), 'and not boolean'); - ok(_.isObject(new String('string')), 'but new String()'); - }); - - test("isArray", function() { - ok(!_.isArray(arguments), 'the arguments object is not an array'); - ok(_.isArray([1, 2, 3]), 'but arrays are'); - ok(_.isArray(iArray), 'even from another frame'); - }); - - test("isString", function() { - ok(!_.isString(document.body), 'the document body is not a string'); - ok(_.isString([1, 2, 3].join(', ')), 'but strings are'); - ok(_.isString(iString), 'even from another frame'); - }); - - test("isNumber", function() { - ok(!_.isNumber('string'), 'a string is not a number'); - ok(!_.isNumber(arguments), 'the arguments object is not a number'); - ok(!_.isNumber(undefined), 'undefined is not a number'); - ok(_.isNumber(3 * 4 - 7 / 10), 'but numbers are'); - ok(_.isNumber(NaN), 'NaN *is* a number'); - ok(_.isNumber(Infinity), 'Infinity is a number'); - ok(_.isNumber(iNumber), 'even from another frame'); - ok(!_.isNumber('1'), 'numeric strings are not numbers'); - }); - - test("isBoolean", function() { - ok(!_.isBoolean(2), 'a number is not a boolean'); - ok(!_.isBoolean("string"), 'a string is not a boolean'); - ok(!_.isBoolean("false"), 'the string "false" is not a boolean'); - ok(!_.isBoolean("true"), 'the string "true" is not a boolean'); - ok(!_.isBoolean(arguments), 'the arguments object is not a boolean'); - ok(!_.isBoolean(undefined), 'undefined is not a boolean'); - ok(!_.isBoolean(NaN), 'NaN is not a boolean'); - ok(!_.isBoolean(null), 'null is not a boolean'); - ok(_.isBoolean(true), 'but true is'); - ok(_.isBoolean(false), 'and so is false'); - ok(_.isBoolean(iBoolean), 'even from another frame'); - }); - - test("isFunction", function() { - ok(!_.isFunction([1, 2, 3]), 'arrays are not functions'); - ok(!_.isFunction('moe'), 'strings are not functions'); - ok(_.isFunction(_.isFunction), 'but functions are'); - ok(_.isFunction(iFunction), 'even from another frame'); - }); - - test("isDate", function() { - ok(!_.isDate(100), 'numbers are not dates'); - ok(!_.isDate({}), 'objects are not dates'); - ok(_.isDate(new Date()), 'but dates are'); - ok(_.isDate(iDate), 'even from another frame'); - }); - - test("isRegExp", function() { - ok(!_.isRegExp(_.identity), 'functions are not RegExps'); - ok(_.isRegExp(/identity/), 'but RegExps are'); - ok(_.isRegExp(iRegExp), 'even from another frame'); - }); - - test("isFinite", function() { - ok(!_.isFinite(undefined), 'undefined is not Finite'); - ok(!_.isFinite(null), 'null is not Finite'); - ok(!_.isFinite(NaN), 'NaN is not Finite'); - ok(!_.isFinite(Infinity), 'Infinity is not Finite'); - ok(!_.isFinite(-Infinity), '-Infinity is not Finite'); - ok(!_.isFinite('12'), 'Strings are not numbers'); - var obj = new Number(5); - ok(_.isFinite(obj), 'Number instances can be finite'); - ok(_.isFinite(0), '0 is Finite'); - ok(_.isFinite(123), 'Ints are Finite'); - ok(_.isFinite(-12.44), 'Floats are Finite'); - }); - - test("isNaN", function() { - ok(!_.isNaN(undefined), 'undefined is not NaN'); - ok(!_.isNaN(null), 'null is not NaN'); - ok(!_.isNaN(0), '0 is not NaN'); - ok(_.isNaN(NaN), 'but NaN is'); - ok(_.isNaN(iNaN), 'even from another frame'); - ok(_.isNaN(new Number(NaN)), 'wrapped NaN is still NaN'); - }); - - test("isNull", function() { - ok(!_.isNull(undefined), 'undefined is not null'); - ok(!_.isNull(NaN), 'NaN is not null'); - ok(_.isNull(null), 'but null is'); - ok(_.isNull(iNull), 'even from another frame'); - }); - - test("isUndefined", function() { - ok(!_.isUndefined(1), 'numbers are defined'); - ok(!_.isUndefined(null), 'null is defined'); - ok(!_.isUndefined(false), 'false is defined'); - ok(!_.isUndefined(NaN), 'NaN is defined'); - ok(_.isUndefined(), 'nothing is undefined'); - ok(_.isUndefined(undefined), 'undefined is undefined'); - ok(_.isUndefined(iUndefined), 'even from another frame'); - }); - - if (window.ActiveXObject) { - test("IE host objects", function() { - var xml = new ActiveXObject("Msxml2.DOMDocument.3.0"); - ok(!_.isNumber(xml)); - ok(!_.isBoolean(xml)); - ok(!_.isNaN(xml)); - ok(!_.isFunction(xml)); - ok(!_.isNull(xml)); - ok(!_.isUndefined(xml)); - }); - } - - test("tap", function() { - var intercepted = null; - var interceptor = function(obj) { intercepted = obj; }; - var returned = _.tap(1, interceptor); - equal(intercepted, 1, "passes tapped object to interceptor"); - equal(returned, 1, "returns tapped object"); - - returned = _([1,2,3]).chain(). - map(function(n){ return n * 2; }). - max(). - tap(interceptor). - value(); - ok(returned == 6 && intercepted == 6, 'can use tapped objects in a chain'); - }); -}); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js deleted file mode 100644 index 05e3f2a37e01..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js +++ /dev/null @@ -1,75 +0,0 @@ -(function() { - - var numbers = []; - for (var i=0; i<1000; i++) numbers.push(i); - var objects = _.map(numbers, function(n){ return {num : n}; }); - var randomized = _.sortBy(numbers, function(){ return Math.random(); }); - var deep = _.map(_.range(100), function() { return _.range(1000); }); - - JSLitmus.test('_.each()', function() { - var timesTwo = []; - _.each(numbers, function(num){ timesTwo.push(num * 2); }); - return timesTwo; - }); - - JSLitmus.test('_(list).each()', function() { - var timesTwo = []; - _(numbers).each(function(num){ timesTwo.push(num * 2); }); - return timesTwo; - }); - - JSLitmus.test('jQuery.each()', function() { - var timesTwo = []; - jQuery.each(numbers, function(){ timesTwo.push(this * 2); }); - return timesTwo; - }); - - JSLitmus.test('_.map()', function() { - return _.map(objects, function(obj){ return obj.num; }); - }); - - JSLitmus.test('jQuery.map()', function() { - return jQuery.map(objects, function(obj){ return obj.num; }); - }); - - JSLitmus.test('_.pluck()', function() { - return _.pluck(objects, 'num'); - }); - - JSLitmus.test('_.uniq()', function() { - return _.uniq(randomized); - }); - - JSLitmus.test('_.uniq() (sorted)', function() { - return _.uniq(numbers, true); - }); - - JSLitmus.test('_.sortBy()', function() { - return _.sortBy(numbers, function(num){ return -num; }); - }); - - JSLitmus.test('_.isEqual()', function() { - return _.isEqual(numbers, randomized); - }); - - JSLitmus.test('_.keys()', function() { - return _.keys(objects); - }); - - JSLitmus.test('_.values()', function() { - return _.values(objects); - }); - - JSLitmus.test('_.intersection()', function() { - return _.intersection(numbers, randomized); - }); - - JSLitmus.test('_.range()', function() { - return _.range(1000); - }); - - JSLitmus.test('_.flatten()', function() { - return _.flatten(deep); - }); - -})(); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js deleted file mode 100644 index c9be20ad7968..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js +++ /dev/null @@ -1,249 +0,0 @@ -$(document).ready(function() { - - var templateSettings; - - module("Utility", { - - setup: function() { - templateSettings = _.clone(_.templateSettings); - }, - - teardown: function() { - _.templateSettings = templateSettings; - } - - }); - - test("#750 - Return _ instance.", 2, function() { - var instance = _([]); - ok(_(instance) === instance); - ok(new _(instance) === instance); - }); - - test("identity", function() { - var moe = {name : 'moe'}; - equal(_.identity(moe), moe, 'moe is the same as his identity'); - }); - - test("uniqueId", function() { - var ids = [], i = 0; - while(i++ < 100) ids.push(_.uniqueId()); - equal(_.uniq(ids).length, ids.length, 'can generate a globally-unique stream of ids'); - }); - - test("times", function() { - var vals = []; - _.times(3, function (i) { vals.push(i); }); - ok(_.isEqual(vals, [0,1,2]), "is 0 indexed"); - // - vals = []; - _(3).times(function (i) { vals.push(i); }); - ok(_.isEqual(vals, [0,1,2]), "works as a wrapper"); - }); - - test("mixin", function() { - _.mixin({ - myReverse: function(string) { - return string.split('').reverse().join(''); - } - }); - equal(_.myReverse('panacea'), 'aecanap', 'mixed in a function to _'); - equal(_('champ').myReverse(), 'pmahc', 'mixed in a function to the OOP wrapper'); - }); - - test("_.escape", function() { - equal(_.escape("Curly & Moe"), "Curly & Moe"); - equal(_.escape("Curly & Moe"), "Curly &amp; Moe"); - equal(_.escape(null), ''); - }); - - test("_.unescape", function() { - var string = "Curly & Moe"; - equal(_.unescape("Curly & Moe"), string); - equal(_.unescape("Curly &amp; Moe"), "Curly & Moe"); - equal(_.unescape(null), ''); - equal(_.unescape(_.escape(string)), string); - }); - - test("template", function() { - var basicTemplate = _.template("<%= thing %> is gettin' on my noives!"); - var result = basicTemplate({thing : 'This'}); - equal(result, "This is gettin' on my noives!", 'can do basic attribute interpolation'); - - var sansSemicolonTemplate = _.template("A <% this %> B"); - equal(sansSemicolonTemplate(), "A B"); - - var backslashTemplate = _.template("<%= thing %> is \\ridanculous"); - equal(backslashTemplate({thing: 'This'}), "This is \\ridanculous"); - - var escapeTemplate = _.template('<%= a ? "checked=\\"checked\\"" : "" %>'); - equal(escapeTemplate({a: true}), 'checked="checked"', 'can handle slash escapes in interpolations.'); - - var fancyTemplate = _.template("
          <% \ - for (key in people) { \ - %>
        • <%= people[key] %>
        • <% } %>
        "); - result = fancyTemplate({people : {moe : "Moe", larry : "Larry", curly : "Curly"}}); - equal(result, "
        • Moe
        • Larry
        • Curly
        ", 'can run arbitrary javascript in templates'); - - var escapedCharsInJavascriptTemplate = _.template("
          <% _.each(numbers.split('\\n'), function(item) { %>
        • <%= item %>
        • <% }) %>
        "); - result = escapedCharsInJavascriptTemplate({numbers: "one\ntwo\nthree\nfour"}); - equal(result, "
        • one
        • two
        • three
        • four
        ", 'Can use escaped characters (e.g. \\n) in Javascript'); - - var namespaceCollisionTemplate = _.template("<%= pageCount %> <%= thumbnails[pageCount] %> <% _.each(thumbnails, function(p) { %>
        \">
        <% }); %>"); - result = namespaceCollisionTemplate({ - pageCount: 3, - thumbnails: { - 1: "p1-thumbnail.gif", - 2: "p2-thumbnail.gif", - 3: "p3-thumbnail.gif" - } - }); - equal(result, "3 p3-thumbnail.gif
        "); - - var noInterpolateTemplate = _.template("

        Just some text. Hey, I know this is silly but it aids consistency.

        "); - result = noInterpolateTemplate(); - equal(result, "

        Just some text. Hey, I know this is silly but it aids consistency.

        "); - - var quoteTemplate = _.template("It's its, not it's"); - equal(quoteTemplate({}), "It's its, not it's"); - - var quoteInStatementAndBody = _.template("<%\ - if(foo == 'bar'){ \ - %>Statement quotes and 'quotes'.<% } %>"); - equal(quoteInStatementAndBody({foo: "bar"}), "Statement quotes and 'quotes'."); - - var withNewlinesAndTabs = _.template('This\n\t\tis: <%= x %>.\n\tok.\nend.'); - equal(withNewlinesAndTabs({x: 'that'}), 'This\n\t\tis: that.\n\tok.\nend.'); - - var template = _.template("<%- value %>"); - var result = template({value: " - - - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.js deleted file mode 100644 index 2cf0ca5b0913..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./underscore'); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/package.json b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/package.json deleted file mode 100644 index 014ab265f48c..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "underscore", - "description": "JavaScript's functional programming helper library.", - "homepage": "http://underscorejs.org", - "keywords": [ - "util", - "functional", - "server", - "client", - "browser" - ], - "author": { - "name": "Jeremy Ashkenas", - "email": "jeremy@documentcloud.org" - }, - "repository": { - "type": "git", - "url": "git://github.com/documentcloud/underscore.git" - }, - "main": "underscore.js", - "version": "1.4.4", - "devDependencies": { - "phantomjs": "0.2.2" - }, - "scripts": { - "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true" - }, - "readme": " __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usual functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/documentcloud/underscore/issues" - }, - "_id": "underscore@1.4.4", - "_from": "underscore@~1.4.3" -} diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore-min.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore-min.js deleted file mode 100644 index c1d9d3aed083..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore-min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,d=e.filter,g=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=function(n){return n instanceof w?n:this instanceof w?(this._wrapped=n,void 0):new w(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):n._=w,w.VERSION="1.4.4";var A=w.each=w.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(w.has(n,a)&&t.call(e,n[a],a,n)===r)return};w.map=w.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e[e.length]=t.call(r,n,u,i)}),e)};var O="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=w.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},w.reduceRight=w.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=w.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=w.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},w.find=w.detect=function(n,t,r){var e;return E(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},w.filter=w.select=function(n,t,r){var e=[];return null==n?e:d&&n.filter===d?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&(e[e.length]=n)}),e)},w.reject=function(n,t,r){return w.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},w.every=w.all=function(n,t,e){t||(t=w.identity);var u=!0;return null==n?u:g&&n.every===g?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var E=w.some=w.any=function(n,t,e){t||(t=w.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};w.contains=w.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:E(n,function(n){return n===t})},w.invoke=function(n,t){var r=o.call(arguments,2),e=w.isFunction(t);return w.map(n,function(n){return(e?t:n[t]).apply(n,r)})},w.pluck=function(n,t){return w.map(n,function(n){return n[t]})},w.where=function(n,t,r){return w.isEmpty(t)?r?null:[]:w[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},w.findWhere=function(n,t){return w.where(n,t,!0)},w.max=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.max.apply(Math,n);if(!t&&w.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>=e.computed&&(e={value:n,computed:a})}),e.value},w.min=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.min.apply(Math,n);if(!t&&w.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;e.computed>a&&(e={value:n,computed:a})}),e.value},w.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=w.random(r++),e[r-1]=e[t],e[t]=n}),e};var k=function(n){return w.isFunction(n)?n:function(t){return t[n]}};w.sortBy=function(n,t,r){var e=k(t);return w.pluck(w.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.indexi;){var o=i+a>>>1;u>r.call(e,n[o])?i=o+1:a=o}return i},w.toArray=function(n){return n?w.isArray(n)?o.call(n):n.length===+n.length?w.map(n,w.identity):w.values(n):[]},w.size=function(n){return null==n?0:n.length===+n.length?n.length:w.keys(n).length},w.first=w.head=w.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},w.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},w.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},w.rest=w.tail=w.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},w.compact=function(n){return w.filter(n,w.identity)};var R=function(n,t,r){return A(n,function(n){w.isArray(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r};w.flatten=function(n,t){return R(n,t,[])},w.without=function(n){return w.difference(n,o.call(arguments,1))},w.uniq=w.unique=function(n,t,r,e){w.isFunction(t)&&(e=r,r=t,t=!1);var u=r?w.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:w.contains(a,r))||(a.push(r),i.push(n[e]))}),i},w.union=function(){return w.uniq(c.apply(e,arguments))},w.intersection=function(n){var t=o.call(arguments,1);return w.filter(w.uniq(n),function(n){return w.every(t,function(t){return w.indexOf(t,n)>=0})})},w.difference=function(n){var t=c.apply(e,o.call(arguments,1));return w.filter(n,function(n){return!w.contains(t,n)})},w.zip=function(){for(var n=o.call(arguments),t=w.max(w.pluck(n,"length")),r=Array(t),e=0;t>e;e++)r[e]=w.pluck(n,""+e);return r},w.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},w.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=w.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},w.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},w.range=function(n,t,r){1>=arguments.length&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=Array(e);e>u;)i[u++]=n,n+=r;return i},w.bind=function(n,t){if(n.bind===j&&j)return j.apply(n,o.call(arguments,1));var r=o.call(arguments,2);return function(){return n.apply(t,r.concat(o.call(arguments)))}},w.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},w.bindAll=function(n){var t=o.call(arguments,1);return 0===t.length&&(t=w.functions(n)),A(t,function(t){n[t]=w.bind(n[t],n)}),n},w.memoize=function(n,t){var r={};return t||(t=w.identity),function(){var e=t.apply(this,arguments);return w.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},w.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},w.defer=function(n){return w.delay.apply(w,[n,1].concat(o.call(arguments,1)))},w.throttle=function(n,t){var r,e,u,i,a=0,o=function(){a=new Date,u=null,i=n.apply(r,e)};return function(){var c=new Date,l=t-(c-a);return r=this,e=arguments,0>=l?(clearTimeout(u),u=null,a=c,i=n.apply(r,e)):u||(u=setTimeout(o,l)),i}},w.debounce=function(n,t,r){var e,u;return function(){var i=this,a=arguments,o=function(){e=null,r||(u=n.apply(i,a))},c=r&&!e;return clearTimeout(e),e=setTimeout(o,t),c&&(u=n.apply(i,a)),u}},w.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},w.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},w.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},w.after=function(n,t){return 0>=n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},w.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)w.has(n,r)&&(t[t.length]=r);return t},w.values=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push(n[r]);return t},w.pairs=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push([r,n[r]]);return t},w.invert=function(n){var t={};for(var r in n)w.has(n,r)&&(t[n[r]]=r);return t},w.functions=w.methods=function(n){var t=[];for(var r in n)w.isFunction(n[r])&&t.push(r);return t.sort()},w.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},w.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},w.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)w.contains(r,u)||(t[u]=n[u]);return t},w.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)null==n[r]&&(n[r]=t[r])}),n},w.clone=function(n){return w.isObject(n)?w.isArray(n)?n.slice():w.extend({},n):n},w.tap=function(n,t){return t(n),n};var I=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof w&&(n=n._wrapped),t instanceof w&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==t+"";case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;r.push(n),e.push(t);var a=0,o=!0;if("[object Array]"==u){if(a=n.length,o=a==t.length)for(;a--&&(o=I(n[a],t[a],r,e)););}else{var c=n.constructor,f=t.constructor;if(c!==f&&!(w.isFunction(c)&&c instanceof c&&w.isFunction(f)&&f instanceof f))return!1;for(var s in n)if(w.has(n,s)&&(a++,!(o=w.has(t,s)&&I(n[s],t[s],r,e))))break;if(o){for(s in t)if(w.has(t,s)&&!a--)break;o=!a}}return r.pop(),e.pop(),o};w.isEqual=function(n,t){return I(n,t,[],[])},w.isEmpty=function(n){if(null==n)return!0;if(w.isArray(n)||w.isString(n))return 0===n.length;for(var t in n)if(w.has(n,t))return!1;return!0},w.isElement=function(n){return!(!n||1!==n.nodeType)},w.isArray=x||function(n){return"[object Array]"==l.call(n)},w.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){w["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),w.isArguments(arguments)||(w.isArguments=function(n){return!(!n||!w.has(n,"callee"))}),"function"!=typeof/./&&(w.isFunction=function(n){return"function"==typeof n}),w.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},w.isNaN=function(n){return w.isNumber(n)&&n!=+n},w.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},w.isNull=function(n){return null===n},w.isUndefined=function(n){return n===void 0},w.has=function(n,t){return f.call(n,t)},w.noConflict=function(){return n._=t,this},w.identity=function(n){return n},w.times=function(n,t,r){for(var e=Array(n),u=0;n>u;u++)e[u]=t.call(r,u);return e},w.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var M={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};M.unescape=w.invert(M.escape);var S={escape:RegExp("["+w.keys(M.escape).join("")+"]","g"),unescape:RegExp("("+w.keys(M.unescape).join("|")+")","g")};w.each(["escape","unescape"],function(n){w[n]=function(t){return null==t?"":(""+t).replace(S[n],function(t){return M[n][t]})}}),w.result=function(n,t){if(null==n)return null;var r=n[t];return w.isFunction(r)?r.call(n):r},w.mixin=function(n){A(w.functions(n),function(t){var r=w[t]=n[t];w.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),D.call(this,r.apply(w,n))}})};var N=0;w.uniqueId=function(n){var t=++N+"";return n?n+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var T=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},B=/\\|'|\r|\n|\t|\u2028|\u2029/g;w.template=function(n,t,r){var e;r=w.defaults({},r,w.templateSettings);var u=RegExp([(r.escape||T).source,(r.interpolate||T).source,(r.evaluate||T).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(B,function(n){return"\\"+q[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,w);var c=function(n){return e.call(this,n,w)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},w.chain=function(n){return w(n).chain()};var D=function(n){return this._chain?w(n).chain():n};w.mixin(w),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];w.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],D.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];w.prototype[n]=function(){return D.call(this,t.apply(this._wrapped,arguments))}}),w.extend(w.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this); \ No newline at end of file diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore.js b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore.js deleted file mode 100644 index a12f0d96cfb4..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore.js +++ /dev/null @@ -1,1226 +0,0 @@ -// Underscore.js 1.4.4 -// http://underscorejs.org -// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. -// Underscore may be freely distributed under the MIT license. - -(function() { - - // Baseline setup - // -------------- - - // Establish the root object, `window` in the browser, or `global` on the server. - var root = this; - - // Save the previous value of the `_` variable. - var previousUnderscore = root._; - - // Establish the object that gets returned to break out of a loop iteration. - var breaker = {}; - - // Save bytes in the minified (but not gzipped) version: - var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; - - // Create quick reference variables for speed access to core prototypes. - var push = ArrayProto.push, - slice = ArrayProto.slice, - concat = ArrayProto.concat, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; - - // All **ECMAScript 5** native function implementations that we hope to use - // are declared here. - var - nativeForEach = ArrayProto.forEach, - nativeMap = ArrayProto.map, - nativeReduce = ArrayProto.reduce, - nativeReduceRight = ArrayProto.reduceRight, - nativeFilter = ArrayProto.filter, - nativeEvery = ArrayProto.every, - nativeSome = ArrayProto.some, - nativeIndexOf = ArrayProto.indexOf, - nativeLastIndexOf = ArrayProto.lastIndexOf, - nativeIsArray = Array.isArray, - nativeKeys = Object.keys, - nativeBind = FuncProto.bind; - - // Create a safe reference to the Underscore object for use below. - var _ = function(obj) { - if (obj instanceof _) return obj; - if (!(this instanceof _)) return new _(obj); - this._wrapped = obj; - }; - - // Export the Underscore object for **Node.js**, with - // backwards-compatibility for the old `require()` API. If we're in - // the browser, add `_` as a global object via a string identifier, - // for Closure Compiler "advanced" mode. - if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) { - exports = module.exports = _; - } - exports._ = _; - } else { - root._ = _; - } - - // Current version. - _.VERSION = '1.4.4'; - - // Collection Functions - // -------------------- - - // The cornerstone, an `each` implementation, aka `forEach`. - // Handles objects with the built-in `forEach`, arrays, and raw objects. - // Delegates to **ECMAScript 5**'s native `forEach` if available. - var each = _.each = _.forEach = function(obj, iterator, context) { - if (obj == null) return; - if (nativeForEach && obj.forEach === nativeForEach) { - obj.forEach(iterator, context); - } else if (obj.length === +obj.length) { - for (var i = 0, l = obj.length; i < l; i++) { - if (iterator.call(context, obj[i], i, obj) === breaker) return; - } - } else { - for (var key in obj) { - if (_.has(obj, key)) { - if (iterator.call(context, obj[key], key, obj) === breaker) return; - } - } - } - }; - - // Return the results of applying the iterator to each element. - // Delegates to **ECMAScript 5**'s native `map` if available. - _.map = _.collect = function(obj, iterator, context) { - var results = []; - if (obj == null) return results; - if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); - each(obj, function(value, index, list) { - results[results.length] = iterator.call(context, value, index, list); - }); - return results; - }; - - var reduceError = 'Reduce of empty array with no initial value'; - - // **Reduce** builds up a single result from a list of values, aka `inject`, - // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available. - _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) { - var initial = arguments.length > 2; - if (obj == null) obj = []; - if (nativeReduce && obj.reduce === nativeReduce) { - if (context) iterator = _.bind(iterator, context); - return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator); - } - each(obj, function(value, index, list) { - if (!initial) { - memo = value; - initial = true; - } else { - memo = iterator.call(context, memo, value, index, list); - } - }); - if (!initial) throw new TypeError(reduceError); - return memo; - }; - - // The right-associative version of reduce, also known as `foldr`. - // Delegates to **ECMAScript 5**'s native `reduceRight` if available. - _.reduceRight = _.foldr = function(obj, iterator, memo, context) { - var initial = arguments.length > 2; - if (obj == null) obj = []; - if (nativeReduceRight && obj.reduceRight === nativeReduceRight) { - if (context) iterator = _.bind(iterator, context); - return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator); - } - var length = obj.length; - if (length !== +length) { - var keys = _.keys(obj); - length = keys.length; - } - each(obj, function(value, index, list) { - index = keys ? keys[--length] : --length; - if (!initial) { - memo = obj[index]; - initial = true; - } else { - memo = iterator.call(context, memo, obj[index], index, list); - } - }); - if (!initial) throw new TypeError(reduceError); - return memo; - }; - - // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, iterator, context) { - var result; - any(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) { - result = value; - return true; - } - }); - return result; - }; - - // Return all the elements that pass a truth test. - // Delegates to **ECMAScript 5**'s native `filter` if available. - // Aliased as `select`. - _.filter = _.select = function(obj, iterator, context) { - var results = []; - if (obj == null) return results; - if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context); - each(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) results[results.length] = value; - }); - return results; - }; - - // Return all the elements for which a truth test fails. - _.reject = function(obj, iterator, context) { - return _.filter(obj, function(value, index, list) { - return !iterator.call(context, value, index, list); - }, context); - }; - - // Determine whether all of the elements match a truth test. - // Delegates to **ECMAScript 5**'s native `every` if available. - // Aliased as `all`. - _.every = _.all = function(obj, iterator, context) { - iterator || (iterator = _.identity); - var result = true; - if (obj == null) return result; - if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context); - each(obj, function(value, index, list) { - if (!(result = result && iterator.call(context, value, index, list))) return breaker; - }); - return !!result; - }; - - // Determine if at least one element in the object matches a truth test. - // Delegates to **ECMAScript 5**'s native `some` if available. - // Aliased as `any`. - var any = _.some = _.any = function(obj, iterator, context) { - iterator || (iterator = _.identity); - var result = false; - if (obj == null) return result; - if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context); - each(obj, function(value, index, list) { - if (result || (result = iterator.call(context, value, index, list))) return breaker; - }); - return !!result; - }; - - // Determine if the array or object contains a given value (using `===`). - // Aliased as `include`. - _.contains = _.include = function(obj, target) { - if (obj == null) return false; - if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; - return any(obj, function(value) { - return value === target; - }); - }; - - // Invoke a method (with arguments) on every item in a collection. - _.invoke = function(obj, method) { - var args = slice.call(arguments, 2); - var isFunc = _.isFunction(method); - return _.map(obj, function(value) { - return (isFunc ? method : value[method]).apply(value, args); - }); - }; - - // Convenience version of a common use case of `map`: fetching a property. - _.pluck = function(obj, key) { - return _.map(obj, function(value){ return value[key]; }); - }; - - // Convenience version of a common use case of `filter`: selecting only objects - // containing specific `key:value` pairs. - _.where = function(obj, attrs, first) { - if (_.isEmpty(attrs)) return first ? null : []; - return _[first ? 'find' : 'filter'](obj, function(value) { - for (var key in attrs) { - if (attrs[key] !== value[key]) return false; - } - return true; - }); - }; - - // Convenience version of a common use case of `find`: getting the first object - // containing specific `key:value` pairs. - _.findWhere = function(obj, attrs) { - return _.where(obj, attrs, true); - }; - - // Return the maximum element or (element-based computation). - // Can't optimize arrays of integers longer than 65,535 elements. - // See: https://bugs.webkit.org/show_bug.cgi?id=80797 - _.max = function(obj, iterator, context) { - if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { - return Math.max.apply(Math, obj); - } - if (!iterator && _.isEmpty(obj)) return -Infinity; - var result = {computed : -Infinity, value: -Infinity}; - each(obj, function(value, index, list) { - var computed = iterator ? iterator.call(context, value, index, list) : value; - computed >= result.computed && (result = {value : value, computed : computed}); - }); - return result.value; - }; - - // Return the minimum element (or element-based computation). - _.min = function(obj, iterator, context) { - if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { - return Math.min.apply(Math, obj); - } - if (!iterator && _.isEmpty(obj)) return Infinity; - var result = {computed : Infinity, value: Infinity}; - each(obj, function(value, index, list) { - var computed = iterator ? iterator.call(context, value, index, list) : value; - computed < result.computed && (result = {value : value, computed : computed}); - }); - return result.value; - }; - - // Shuffle an array. - _.shuffle = function(obj) { - var rand; - var index = 0; - var shuffled = []; - each(obj, function(value) { - rand = _.random(index++); - shuffled[index - 1] = shuffled[rand]; - shuffled[rand] = value; - }); - return shuffled; - }; - - // An internal function to generate lookup iterators. - var lookupIterator = function(value) { - return _.isFunction(value) ? value : function(obj){ return obj[value]; }; - }; - - // Sort the object's values by a criterion produced by an iterator. - _.sortBy = function(obj, value, context) { - var iterator = lookupIterator(value); - return _.pluck(_.map(obj, function(value, index, list) { - return { - value : value, - index : index, - criteria : iterator.call(context, value, index, list) - }; - }).sort(function(left, right) { - var a = left.criteria; - var b = right.criteria; - if (a !== b) { - if (a > b || a === void 0) return 1; - if (a < b || b === void 0) return -1; - } - return left.index < right.index ? -1 : 1; - }), 'value'); - }; - - // An internal function used for aggregate "group by" operations. - var group = function(obj, value, context, behavior) { - var result = {}; - var iterator = lookupIterator(value || _.identity); - each(obj, function(value, index) { - var key = iterator.call(context, value, index, obj); - behavior(result, key, value); - }); - return result; - }; - - // Groups the object's values by a criterion. Pass either a string attribute - // to group by, or a function that returns the criterion. - _.groupBy = function(obj, value, context) { - return group(obj, value, context, function(result, key, value) { - (_.has(result, key) ? result[key] : (result[key] = [])).push(value); - }); - }; - - // Counts instances of an object that group by a certain criterion. Pass - // either a string attribute to count by, or a function that returns the - // criterion. - _.countBy = function(obj, value, context) { - return group(obj, value, context, function(result, key) { - if (!_.has(result, key)) result[key] = 0; - result[key]++; - }); - }; - - // Use a comparator function to figure out the smallest index at which - // an object should be inserted so as to maintain order. Uses binary search. - _.sortedIndex = function(array, obj, iterator, context) { - iterator = iterator == null ? _.identity : lookupIterator(iterator); - var value = iterator.call(context, obj); - var low = 0, high = array.length; - while (low < high) { - var mid = (low + high) >>> 1; - iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid; - } - return low; - }; - - // Safely convert anything iterable into a real, live array. - _.toArray = function(obj) { - if (!obj) return []; - if (_.isArray(obj)) return slice.call(obj); - if (obj.length === +obj.length) return _.map(obj, _.identity); - return _.values(obj); - }; - - // Return the number of elements in an object. - _.size = function(obj) { - if (obj == null) return 0; - return (obj.length === +obj.length) ? obj.length : _.keys(obj).length; - }; - - // Array Functions - // --------------- - - // Get the first element of an array. Passing **n** will return the first N - // values in the array. Aliased as `head` and `take`. The **guard** check - // allows it to work with `_.map`. - _.first = _.head = _.take = function(array, n, guard) { - if (array == null) return void 0; - return (n != null) && !guard ? slice.call(array, 0, n) : array[0]; - }; - - // Returns everything but the last entry of the array. Especially useful on - // the arguments object. Passing **n** will return all the values in - // the array, excluding the last N. The **guard** check allows it to work with - // `_.map`. - _.initial = function(array, n, guard) { - return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n)); - }; - - // Get the last element of an array. Passing **n** will return the last N - // values in the array. The **guard** check allows it to work with `_.map`. - _.last = function(array, n, guard) { - if (array == null) return void 0; - if ((n != null) && !guard) { - return slice.call(array, Math.max(array.length - n, 0)); - } else { - return array[array.length - 1]; - } - }; - - // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. - // Especially useful on the arguments object. Passing an **n** will return - // the rest N values in the array. The **guard** - // check allows it to work with `_.map`. - _.rest = _.tail = _.drop = function(array, n, guard) { - return slice.call(array, (n == null) || guard ? 1 : n); - }; - - // Trim out all falsy values from an array. - _.compact = function(array) { - return _.filter(array, _.identity); - }; - - // Internal implementation of a recursive `flatten` function. - var flatten = function(input, shallow, output) { - each(input, function(value) { - if (_.isArray(value)) { - shallow ? push.apply(output, value) : flatten(value, shallow, output); - } else { - output.push(value); - } - }); - return output; - }; - - // Return a completely flattened version of an array. - _.flatten = function(array, shallow) { - return flatten(array, shallow, []); - }; - - // Return a version of the array that does not contain the specified value(s). - _.without = function(array) { - return _.difference(array, slice.call(arguments, 1)); - }; - - // Produce a duplicate-free version of the array. If the array has already - // been sorted, you have the option of using a faster algorithm. - // Aliased as `unique`. - _.uniq = _.unique = function(array, isSorted, iterator, context) { - if (_.isFunction(isSorted)) { - context = iterator; - iterator = isSorted; - isSorted = false; - } - var initial = iterator ? _.map(array, iterator, context) : array; - var results = []; - var seen = []; - each(initial, function(value, index) { - if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) { - seen.push(value); - results.push(array[index]); - } - }); - return results; - }; - - // Produce an array that contains the union: each distinct element from all of - // the passed-in arrays. - _.union = function() { - return _.uniq(concat.apply(ArrayProto, arguments)); - }; - - // Produce an array that contains every item shared between all the - // passed-in arrays. - _.intersection = function(array) { - var rest = slice.call(arguments, 1); - return _.filter(_.uniq(array), function(item) { - return _.every(rest, function(other) { - return _.indexOf(other, item) >= 0; - }); - }); - }; - - // Take the difference between one array and a number of other arrays. - // Only the elements present in just the first array will remain. - _.difference = function(array) { - var rest = concat.apply(ArrayProto, slice.call(arguments, 1)); - return _.filter(array, function(value){ return !_.contains(rest, value); }); - }; - - // Zip together multiple lists into a single array -- elements that share - // an index go together. - _.zip = function() { - var args = slice.call(arguments); - var length = _.max(_.pluck(args, 'length')); - var results = new Array(length); - for (var i = 0; i < length; i++) { - results[i] = _.pluck(args, "" + i); - } - return results; - }; - - // Converts lists into objects. Pass either a single array of `[key, value]` - // pairs, or two parallel arrays of the same length -- one of keys, and one of - // the corresponding values. - _.object = function(list, values) { - if (list == null) return {}; - var result = {}; - for (var i = 0, l = list.length; i < l; i++) { - if (values) { - result[list[i]] = values[i]; - } else { - result[list[i][0]] = list[i][1]; - } - } - return result; - }; - - // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**), - // we need this function. Return the position of the first occurrence of an - // item in an array, or -1 if the item is not included in the array. - // Delegates to **ECMAScript 5**'s native `indexOf` if available. - // If the array is large and already in sort order, pass `true` - // for **isSorted** to use binary search. - _.indexOf = function(array, item, isSorted) { - if (array == null) return -1; - var i = 0, l = array.length; - if (isSorted) { - if (typeof isSorted == 'number') { - i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted); - } else { - i = _.sortedIndex(array, item); - return array[i] === item ? i : -1; - } - } - if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted); - for (; i < l; i++) if (array[i] === item) return i; - return -1; - }; - - // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available. - _.lastIndexOf = function(array, item, from) { - if (array == null) return -1; - var hasIndex = from != null; - if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) { - return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item); - } - var i = (hasIndex ? from : array.length); - while (i--) if (array[i] === item) return i; - return -1; - }; - - // Generate an integer Array containing an arithmetic progression. A port of - // the native Python `range()` function. See - // [the Python documentation](http://docs.python.org/library/functions.html#range). - _.range = function(start, stop, step) { - if (arguments.length <= 1) { - stop = start || 0; - start = 0; - } - step = arguments[2] || 1; - - var len = Math.max(Math.ceil((stop - start) / step), 0); - var idx = 0; - var range = new Array(len); - - while(idx < len) { - range[idx++] = start; - start += step; - } - - return range; - }; - - // Function (ahem) Functions - // ------------------ - - // Create a function bound to a given object (assigning `this`, and arguments, - // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if - // available. - _.bind = function(func, context) { - if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); - var args = slice.call(arguments, 2); - return function() { - return func.apply(context, args.concat(slice.call(arguments))); - }; - }; - - // Partially apply a function by creating a version that has had some of its - // arguments pre-filled, without changing its dynamic `this` context. - _.partial = function(func) { - var args = slice.call(arguments, 1); - return function() { - return func.apply(this, args.concat(slice.call(arguments))); - }; - }; - - // Bind all of an object's methods to that object. Useful for ensuring that - // all callbacks defined on an object belong to it. - _.bindAll = function(obj) { - var funcs = slice.call(arguments, 1); - if (funcs.length === 0) funcs = _.functions(obj); - each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); - return obj; - }; - - // Memoize an expensive function by storing its results. - _.memoize = function(func, hasher) { - var memo = {}; - hasher || (hasher = _.identity); - return function() { - var key = hasher.apply(this, arguments); - return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments)); - }; - }; - - // Delays a function for the given number of milliseconds, and then calls - // it with the arguments supplied. - _.delay = function(func, wait) { - var args = slice.call(arguments, 2); - return setTimeout(function(){ return func.apply(null, args); }, wait); - }; - - // Defers a function, scheduling it to run after the current call stack has - // cleared. - _.defer = function(func) { - return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); - }; - - // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. - _.throttle = function(func, wait) { - var context, args, timeout, result; - var previous = 0; - var later = function() { - previous = new Date; - timeout = null; - result = func.apply(context, args); - }; - return function() { - var now = new Date; - var remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0) { - clearTimeout(timeout); - timeout = null; - previous = now; - result = func.apply(context, args); - } else if (!timeout) { - timeout = setTimeout(later, remaining); - } - return result; - }; - }; - - // Returns a function, that, as long as it continues to be invoked, will not - // be triggered. The function will be called after it stops being called for - // N milliseconds. If `immediate` is passed, trigger the function on the - // leading edge, instead of the trailing. - _.debounce = function(func, wait, immediate) { - var timeout, result; - return function() { - var context = this, args = arguments; - var later = function() { - timeout = null; - if (!immediate) result = func.apply(context, args); - }; - var callNow = immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - if (callNow) result = func.apply(context, args); - return result; - }; - }; - - // Returns a function that will be executed at most one time, no matter how - // often you call it. Useful for lazy initialization. - _.once = function(func) { - var ran = false, memo; - return function() { - if (ran) return memo; - ran = true; - memo = func.apply(this, arguments); - func = null; - return memo; - }; - }; - - // Returns the first function passed as an argument to the second, - // allowing you to adjust arguments, run code before and after, and - // conditionally execute the original function. - _.wrap = function(func, wrapper) { - return function() { - var args = [func]; - push.apply(args, arguments); - return wrapper.apply(this, args); - }; - }; - - // Returns a function that is the composition of a list of functions, each - // consuming the return value of the function that follows. - _.compose = function() { - var funcs = arguments; - return function() { - var args = arguments; - for (var i = funcs.length - 1; i >= 0; i--) { - args = [funcs[i].apply(this, args)]; - } - return args[0]; - }; - }; - - // Returns a function that will only be executed after being called N times. - _.after = function(times, func) { - if (times <= 0) return func(); - return function() { - if (--times < 1) { - return func.apply(this, arguments); - } - }; - }; - - // Object Functions - // ---------------- - - // Retrieve the names of an object's properties. - // Delegates to **ECMAScript 5**'s native `Object.keys` - _.keys = nativeKeys || function(obj) { - if (obj !== Object(obj)) throw new TypeError('Invalid object'); - var keys = []; - for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key; - return keys; - }; - - // Retrieve the values of an object's properties. - _.values = function(obj) { - var values = []; - for (var key in obj) if (_.has(obj, key)) values.push(obj[key]); - return values; - }; - - // Convert an object into a list of `[key, value]` pairs. - _.pairs = function(obj) { - var pairs = []; - for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]); - return pairs; - }; - - // Invert the keys and values of an object. The values must be serializable. - _.invert = function(obj) { - var result = {}; - for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key; - return result; - }; - - // Return a sorted list of the function names available on the object. - // Aliased as `methods` - _.functions = _.methods = function(obj) { - var names = []; - for (var key in obj) { - if (_.isFunction(obj[key])) names.push(key); - } - return names.sort(); - }; - - // Extend a given object with all the properties in passed-in object(s). - _.extend = function(obj) { - each(slice.call(arguments, 1), function(source) { - if (source) { - for (var prop in source) { - obj[prop] = source[prop]; - } - } - }); - return obj; - }; - - // Return a copy of the object only containing the whitelisted properties. - _.pick = function(obj) { - var copy = {}; - var keys = concat.apply(ArrayProto, slice.call(arguments, 1)); - each(keys, function(key) { - if (key in obj) copy[key] = obj[key]; - }); - return copy; - }; - - // Return a copy of the object without the blacklisted properties. - _.omit = function(obj) { - var copy = {}; - var keys = concat.apply(ArrayProto, slice.call(arguments, 1)); - for (var key in obj) { - if (!_.contains(keys, key)) copy[key] = obj[key]; - } - return copy; - }; - - // Fill in a given object with default properties. - _.defaults = function(obj) { - each(slice.call(arguments, 1), function(source) { - if (source) { - for (var prop in source) { - if (obj[prop] == null) obj[prop] = source[prop]; - } - } - }); - return obj; - }; - - // Create a (shallow-cloned) duplicate of an object. - _.clone = function(obj) { - if (!_.isObject(obj)) return obj; - return _.isArray(obj) ? obj.slice() : _.extend({}, obj); - }; - - // Invokes interceptor with the obj, and then returns obj. - // The primary purpose of this method is to "tap into" a method chain, in - // order to perform operations on intermediate results within the chain. - _.tap = function(obj, interceptor) { - interceptor(obj); - return obj; - }; - - // Internal recursive comparison function for `isEqual`. - var eq = function(a, b, aStack, bStack) { - // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal. - if (a === b) return a !== 0 || 1 / a == 1 / b; - // A strict comparison is necessary because `null == undefined`. - if (a == null || b == null) return a === b; - // Unwrap any wrapped objects. - if (a instanceof _) a = a._wrapped; - if (b instanceof _) b = b._wrapped; - // Compare `[[Class]]` names. - var className = toString.call(a); - if (className != toString.call(b)) return false; - switch (className) { - // Strings, numbers, dates, and booleans are compared by value. - case '[object String]': - // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is - // equivalent to `new String("5")`. - return a == String(b); - case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for - // other numeric values. - return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b); - case '[object Date]': - case '[object Boolean]': - // Coerce dates and booleans to numeric primitive values. Dates are compared by their - // millisecond representations. Note that invalid dates with millisecond representations - // of `NaN` are not equivalent. - return +a == +b; - // RegExps are compared by their source patterns and flags. - case '[object RegExp]': - return a.source == b.source && - a.global == b.global && - a.multiline == b.multiline && - a.ignoreCase == b.ignoreCase; - } - if (typeof a != 'object' || typeof b != 'object') return false; - // Assume equality for cyclic structures. The algorithm for detecting cyclic - // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. - var length = aStack.length; - while (length--) { - // Linear search. Performance is inversely proportional to the number of - // unique nested structures. - if (aStack[length] == a) return bStack[length] == b; - } - // Add the first object to the stack of traversed objects. - aStack.push(a); - bStack.push(b); - var size = 0, result = true; - // Recursively compare objects and arrays. - if (className == '[object Array]') { - // Compare array lengths to determine if a deep comparison is necessary. - size = a.length; - result = size == b.length; - if (result) { - // Deep compare the contents, ignoring non-numeric properties. - while (size--) { - if (!(result = eq(a[size], b[size], aStack, bStack))) break; - } - } - } else { - // Objects with different constructors are not equivalent, but `Object`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) && - _.isFunction(bCtor) && (bCtor instanceof bCtor))) { - return false; - } - // Deep compare objects. - for (var key in a) { - if (_.has(a, key)) { - // Count the expected number of properties. - size++; - // Deep compare each member. - if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break; - } - } - // Ensure that both objects contain the same number of properties. - if (result) { - for (key in b) { - if (_.has(b, key) && !(size--)) break; - } - result = !size; - } - } - // Remove the first object from the stack of traversed objects. - aStack.pop(); - bStack.pop(); - return result; - }; - - // Perform a deep comparison to check if two objects are equal. - _.isEqual = function(a, b) { - return eq(a, b, [], []); - }; - - // Is a given array, string, or object empty? - // An "empty" object has no enumerable own-properties. - _.isEmpty = function(obj) { - if (obj == null) return true; - if (_.isArray(obj) || _.isString(obj)) return obj.length === 0; - for (var key in obj) if (_.has(obj, key)) return false; - return true; - }; - - // Is a given value a DOM element? - _.isElement = function(obj) { - return !!(obj && obj.nodeType === 1); - }; - - // Is a given value an array? - // Delegates to ECMA5's native Array.isArray - _.isArray = nativeIsArray || function(obj) { - return toString.call(obj) == '[object Array]'; - }; - - // Is a given variable an object? - _.isObject = function(obj) { - return obj === Object(obj); - }; - - // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp. - each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) { - _['is' + name] = function(obj) { - return toString.call(obj) == '[object ' + name + ']'; - }; - }); - - // Define a fallback version of the method in browsers (ahem, IE), where - // there isn't any inspectable "Arguments" type. - if (!_.isArguments(arguments)) { - _.isArguments = function(obj) { - return !!(obj && _.has(obj, 'callee')); - }; - } - - // Optimize `isFunction` if appropriate. - if (typeof (/./) !== 'function') { - _.isFunction = function(obj) { - return typeof obj === 'function'; - }; - } - - // Is a given object a finite number? - _.isFinite = function(obj) { - return isFinite(obj) && !isNaN(parseFloat(obj)); - }; - - // Is the given value `NaN`? (NaN is the only number which does not equal itself). - _.isNaN = function(obj) { - return _.isNumber(obj) && obj != +obj; - }; - - // Is a given value a boolean? - _.isBoolean = function(obj) { - return obj === true || obj === false || toString.call(obj) == '[object Boolean]'; - }; - - // Is a given value equal to null? - _.isNull = function(obj) { - return obj === null; - }; - - // Is a given variable undefined? - _.isUndefined = function(obj) { - return obj === void 0; - }; - - // Shortcut function for checking if an object has a given property directly - // on itself (in other words, not on a prototype). - _.has = function(obj, key) { - return hasOwnProperty.call(obj, key); - }; - - // Utility Functions - // ----------------- - - // Run Underscore.js in *noConflict* mode, returning the `_` variable to its - // previous owner. Returns a reference to the Underscore object. - _.noConflict = function() { - root._ = previousUnderscore; - return this; - }; - - // Keep the identity function around for default iterators. - _.identity = function(value) { - return value; - }; - - // Run a function **n** times. - _.times = function(n, iterator, context) { - var accum = Array(n); - for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i); - return accum; - }; - - // Return a random integer between min and max (inclusive). - _.random = function(min, max) { - if (max == null) { - max = min; - min = 0; - } - return min + Math.floor(Math.random() * (max - min + 1)); - }; - - // List of HTML entities for escaping. - var entityMap = { - escape: { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '/': '/' - } - }; - entityMap.unescape = _.invert(entityMap.escape); - - // Regexes containing the keys and values listed immediately above. - var entityRegexes = { - escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'), - unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g') - }; - - // Functions for escaping and unescaping strings to/from HTML interpolation. - _.each(['escape', 'unescape'], function(method) { - _[method] = function(string) { - if (string == null) return ''; - return ('' + string).replace(entityRegexes[method], function(match) { - return entityMap[method][match]; - }); - }; - }); - - // If the value of the named property is a function then invoke it; - // otherwise, return it. - _.result = function(object, property) { - if (object == null) return null; - var value = object[property]; - return _.isFunction(value) ? value.call(object) : value; - }; - - // Add your own custom functions to the Underscore object. - _.mixin = function(obj) { - each(_.functions(obj), function(name){ - var func = _[name] = obj[name]; - _.prototype[name] = function() { - var args = [this._wrapped]; - push.apply(args, arguments); - return result.call(this, func.apply(_, args)); - }; - }); - }; - - // Generate a unique integer id (unique within the entire client session). - // Useful for temporary DOM ids. - var idCounter = 0; - _.uniqueId = function(prefix) { - var id = ++idCounter + ''; - return prefix ? prefix + id : id; - }; - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function(text, data, settings) { - var render; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset) - .replace(escaper, function(match) { return '\\' + escapes[match]; }); - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } - if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } - if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - index = offset + match.length; - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + "return __p;\n"; - - try { - render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - if (data) return render(data, _); - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled function source as a convenience for precompilation. - template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; - - return template; - }; - - // Add a "chain" function, which will delegate to the wrapper. - _.chain = function(obj) { - return _(obj).chain(); - }; - - // OOP - // --------------- - // If Underscore is called as a function, it returns a wrapped object that - // can be used OO-style. This wrapper holds altered versions of all the - // underscore functions. Wrapped objects may be chained. - - // Helper function to continue chaining intermediate results. - var result = function(obj) { - return this._chain ? _(obj).chain() : obj; - }; - - // Add all of the Underscore functions to the wrapper object. - _.mixin(_); - - // Add all mutator Array functions to the wrapper. - each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - var obj = this._wrapped; - method.apply(obj, arguments); - if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0]; - return result.call(this, obj); - }; - }); - - // Add all accessor Array functions to the wrapper. - each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - return result.call(this, method.apply(this._wrapped, arguments)); - }; - }); - - _.extend(_.prototype, { - - // Start chaining a wrapped Underscore object. - chain: function() { - this._chain = true; - return this; - }, - - // Extracts the result from a wrapped and chained object. - value: function() { - return this._wrapped; - } - - }); - -}).call(this); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/package.json b/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/package.json deleted file mode 100644 index 09382f8357a9..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "argparse", - "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library", - "version": "0.1.15", - "keywords": [ - "cli", - "parser", - "argparse", - "option", - "args" - ], - "homepage": "https://github.com/nodeca/argparse", - "contributors": [ - { - "name": "Eugene Shkuropat" - }, - { - "name": "Paul Jacobson" - } - ], - "bugs": { - "url": "https://github.com/nodeca/argparse/issues" - }, - "license": { - "type": "MIT", - "url": "https://github.com/nodeca/argparse/blob/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodeca/argparse.git" - }, - "main": "./index.js", - "scripts": { - "test": "make test" - }, - "dependencies": { - "underscore": "~1.4.3", - "underscore.string": "~2.3.1" - }, - "devDependencies": { - "mocha": "*" - }, - "engines": { - "node": ">= 0.6.0" - }, - "readme": "argparse\n========\n\n[![Build Status](https://secure.travis-ci.org/nodeca/argparse.png?branch=master)](http://travis-ci.org/nodeca/argparse)\n\nCLI arguments parser for node.js. Javascript port of python's\n[argparse](http://docs.python.org/dev/library/argparse.html) module\n(original version 3.2). That's a full port, except some very rare options,\nrecorded in issue tracker.\n\n**NB.** Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/).\n\n\nExample\n=======\n\ntest.js file:\n\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar ArgumentParser = require('../lib/argparse').ArgumentParser;\nvar parser = new ArgumentParser({\n version: '0.0.1',\n addHelp:true,\n description: 'Argparse example'\n});\nparser.addArgument(\n [ '-f', '--foo' ],\n {\n help: 'foo bar'\n }\n);\nparser.addArgument(\n [ '-b', '--bar' ],\n {\n help: 'bar foo'\n }\n);\nvar args = parser.parseArgs();\nconsole.dir(args);\n```\n\nDisplay help:\n\n```\n$ ./test.js -h\nusage: example.js [-h] [-v] [-f FOO] [-b BAR]\n\nArgparse example\n\nOptional arguments:\n -h, --help Show this help message and exit.\n -v, --version Show program's version number and exit.\n -f FOO, --foo FOO foo bar\n -b BAR, --bar BAR bar foo\n```\n\nParse arguments:\n\n```\n$ ./test.js -f=3 --bar=4\n{ foo: '3', bar: '4' }\n```\n\nMore [examples](https://github.com/nodeca/argparse/tree/master/examples).\n\n\nArgumentParser objects\n======================\n\n```\nnew ArgumentParser({paramters hash});\n```\n\nCreates a new ArgumentParser object.\n\n**Supported params:**\n\n- ```description``` - Text to display before the argument help.\n- ```epilog``` - Text to display after the argument help.\n- ```addHelp``` - Add a -h/–help option to the parser. (default: True)\n- ```argumentDefault``` - Set the global default value for arguments. (default: None)\n- ```parents``` - A list of ArgumentParser objects whose arguments should also be included.\n- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘)\n- ```formatterClass``` - A class for customizing the help output.\n- ```prog``` - The name of the program (default: sys.argv[0])\n- ```usage``` - The string describing the program usage (default: generated)\n- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals.\n\n**Not supportied yet**\n\n- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read.\n\n\nDetails in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects)\n\n\naddArgument() method\n====================\n\n```\nArgumentParser.addArgument([names or flags], {options})\n```\n\nDefines how a single command-line argument should be parsed.\n\n- ```name or flags``` - Either a name or a list of option strings, e.g. foo or -f, --foo.\n\nOptions:\n\n- ```action``` - The basic type of action to be taken when this argument is encountered at the command line.\n- ```nargs```- The number of command-line arguments that should be consumed.\n- ```constant``` - A constant value required by some action and nargs selections.\n- ```defaultValue``` - The value produced if the argument is absent from the command line.\n- ```type``` - The type to which the command-line argument should be converted.\n- ```choices``` - A container of the allowable values for the argument.\n- ```required``` - Whether or not the command-line option may be omitted (optionals only).\n- ```help``` - A brief description of what the argument does.\n- ```metavar``` - A name for the argument in usage messages.\n- ```dest``` - The name of the attribute to be added to the object returned by parseArgs().\n\nDetails in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method)\n\n\nAction (some details)\n================\n\nArgumentParser objects associate command-line arguments with actions.\nThese actions can do just about anything with the command-line arguments associated\nwith them, though most actions simply add an attribute to the object returned by\nparseArgs(). The action keyword argument specifies how the command-line arguments\nshould be handled. The supported actions are:\n\n- ```store``` - Just stores the argument’s value. This is the default action.\n- ```storeConst``` - Stores value, specified by the const keyword argument.\n (Note that the const keyword argument defaults to the rather unhelpful None.)\n The 'storeConst' action is most commonly used with optional arguments, that\n specify some sort of flag.\n- ```storeTrue``` and ```storeFalse``` - Stores values True and False\n respectively. These are special cases of 'storeConst'.\n- ```append``` - Stores a list, and appends each argument value to the list.\n This is useful to allow an option to be specified multiple times.\n- ```appendConst``` - Stores a list, and appends value, specified by the\n const keyword argument to the list. (Note, that the const keyword argument defaults\n is None.) The 'appendConst' action is typically used when multiple arguments need\n to store constants to the same list.\n- ```count``` - Counts the number of times a keyword argument occurs. For example,\n used for increasing verbosity levels.\n- ```help``` - Prints a complete help message for all the options in the current\n parser and then exits. By default a help action is automatically added to the parser.\n See ArgumentParser for details of how the output is created.\n- ```version``` - Prints version information and exit. Expects a `version=`\n keyword argument in the addArgument() call.\n\nDetails in [original action guide](http://docs.python.org/dev/library/argparse.html#action)\n\n\nSub-commands\n============\n\nArgumentParser.addSubparsers()\n\nMany programs split their functionality into a number of sub-commands, for\nexample, the svn program can invoke sub-commands like `svn checkout`, `svn update`,\nand `svn commit`. Splitting up functionality this way can be a particularly good\nidea when a program performs several different functions which require different\nkinds of command-line arguments. `ArgumentParser` supports creation of such\nsub-commands with `addSubparsers()` method. The `addSubparsers()` method is\nnormally called with no arguments and returns an special action object.\nThis object has a single method `addParser()`, which takes a command name and\nany `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object\nthat can be modified as usual.\n\nExample:\n\nsub_commands.js\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar ArgumentParser = require('../lib/argparse').ArgumentParser;\nvar parser = new ArgumentParser({\n version: '0.0.1',\n addHelp:true,\n description: 'Argparse examples: sub-commands',\n});\n\nvar subparsers = parser.addSubparsers({\n title:'subcommands',\n dest:\"subcommand_name\"\n});\n\nvar bar = subparsers.addParser('c1', {addHelp:true});\nbar.addArgument(\n [ '-f', '--foo' ],\n {\n action: 'store',\n help: 'foo3 bar3'\n }\n);\nvar bar = subparsers.addParser(\n 'c2',\n {aliases:['co'], addHelp:true}\n);\nbar.addArgument(\n [ '-b', '--bar' ],\n {\n action: 'store',\n type: 'int',\n help: 'foo3 bar3'\n }\n);\n\nvar args = parser.parseArgs();\nconsole.dir(args);\n\n```\n\nDetails in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands)\n\n\nContributors\n============\n\n- [Eugene Shkuropat](https://github.com/shkuropat)\n- [Paul Jacobson](https://github.com/hpaulj)\n\n[others](https://github.com/nodeca/argparse/graphs/contributors)\n\nLicense\n=======\n\nCopyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin).\nReleased under the MIT license. See\n[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details.\n\n\n", - "readmeFilename": "README.md", - "_id": "argparse@0.1.15", - "_from": "argparse@~ 0.1.11" -} diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/README.md b/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/README.md deleted file mode 100644 index a74bd12d6f1a..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/README.md +++ /dev/null @@ -1,73 +0,0 @@ -**Esprima** ([esprima.org](http://esprima.org)) is a high performance, -standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) -parser written in ECMAScript (also popularly known as -[JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript)). -Esprima is created and maintained by [Ariya Hidayat](http://twitter.com/ariyahidayat), -with the help of [many contributors](https://github.com/ariya/esprima/contributors). - -Esprima runs on web browsers (IE 6+, Firefox 1+, Safari 3+, Chrome 1+, Konqueror 4.6+, Opera 8+) as well as -[Node.js](http://nodejs.org). - -### Features - -- Full support for [ECMAScript 5.1](http://www.ecma-international.org/publications/standards/Ecma-262.htm)(ECMA-262) -- Sensible [syntax tree format](http://esprima.org/doc/index.html#ast) compatible with Mozilla -[Parser AST](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) -- Heavily tested (> 550 [unit tests](http://esprima.org/test/) with solid 100% statement coverage) -- Optional tracking of syntax node location (index-based and line-column) -- Experimental support for ES6/Harmony (module, class, destructuring, ...) - -Esprima is blazing fast (see the [benchmark suite](http://esprima.org/test/benchmarks.html)). -It is up to 3x faster than UglifyJS v1 and it is still [competitive](http://esprima.org/test/compare.html) -with the new generation of fast parsers. - -### Applications - -Esprima serves as the basis for many popular JavaScript development tools: - -- Code coverage analysis: [node-cover](https://github.com/itay/node-cover), [Istanbul](https://github.com/yahoo/Istanbul) -- Documentation tool: [JFDoc](https://github.com/thejohnfreeman/jfdoc), [JSDuck](https://github.com/senchalabs/jsduck) -- Language extension: [LLJS](http://mbebenita.github.com/LLJS/) (low-level JS), -[Sweet.js](http://sweetjs.org/) (macro) -- ES6/Harmony transpiler: [Six](https://github.com/matthewrobb/six), [Harmonizr](https://github.com/jdiamond/harmonizr) -- Eclipse Orion smart editing ([outline view](https://github.com/aclement/esprima-outline), [content assist](http://contraptionsforprogramming.blogspot.com/2012/02/better-javascript-content-assist-in.html)) -- Source code modification: [Esmorph](https://github.com/ariya/esmorph), [Code Painter](https://github.com/fawek/codepainter), -- Source transformation: [node-falafel](https://github.com/substack/node-falafel), [Esmangle](https://github.com/Constellation/esmangle), [escodegen](https://github.com/Constellation/escodegen) - -### Questions? -- [Documentation](http://esprima.org/doc) -- [Issue tracker](http://issues.esprima.org): [known problems](http://code.google.com/p/esprima/issues/list?q=Defect) -and [future plans](http://code.google.com/p/esprima/issues/list?q=Enhancement) -- [Mailing list](http://groups.google.com/group/esprima) -- [Contribution guide](http://esprima.org/doc/index.html#contribution) - -Follow [@Esprima](http://twitter.com/Esprima) on Twitter to get the -development updates. -Feedback and contribution are welcomed! - -### License - -Copyright (C) 2012, 2011 [Ariya Hidayat](http://ariya.ofilabs.com/about) - and other contributors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esparse.js b/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esparse.js deleted file mode 100755 index 3e7bb81ea308..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esparse.js +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env node -/* - Copyright (C) 2012 Ariya Hidayat - Copyright (C) 2011 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*jslint sloppy:true node:true rhino:true */ - -var fs, esprima, fname, content, options, syntax; - -if (typeof require === 'function') { - fs = require('fs'); - esprima = require('esprima'); -} else if (typeof load === 'function') { - try { - load('esprima.js'); - } catch (e) { - load('../esprima.js'); - } -} - -// Shims to Node.js objects when running under Rhino. -if (typeof console === 'undefined' && typeof process === 'undefined') { - console = { log: print }; - fs = { readFileSync: readFile }; - process = { argv: arguments, exit: quit }; - process.argv.unshift('esparse.js'); - process.argv.unshift('rhino'); -} - -function showUsage() { - console.log('Usage:'); - console.log(' esparse [options] file.js'); - console.log(); - console.log('Available options:'); - console.log(); - console.log(' --comment Gather all line and block comments in an array'); - console.log(' --loc Include line-column location info for each syntax node'); - console.log(' --range Include index-based range for each syntax node'); - console.log(' --raw Display the raw value of literals'); - console.log(' --tokens List all tokens in an array'); - console.log(' --tolerant Tolerate errors on a best-effort basis (experimental)'); - console.log(' -v, --version Shows program version'); - console.log(); - process.exit(1); -} - -if (process.argv.length <= 2) { - showUsage(); -} - -options = {}; - -process.argv.splice(2).forEach(function (entry) { - - if (entry === '-h' || entry === '--help') { - showUsage(); - } else if (entry === '-v' || entry === '--version') { - console.log('ECMAScript Parser (using Esprima version', esprima.version, ')'); - console.log(); - process.exit(0); - } else if (entry === '--comment') { - options.comment = true; - } else if (entry === '--loc') { - options.loc = true; - } else if (entry === '--range') { - options.range = true; - } else if (entry === '--raw') { - options.raw = true; - } else if (entry === '--tokens') { - options.tokens = true; - } else if (entry === '--tolerant') { - options.tolerant = true; - } else if (entry.slice(0, 2) === '--') { - console.log('Error: unknown option ' + entry + '.'); - process.exit(1); - } else if (typeof fname === 'string') { - console.log('Error: more than one input file.'); - process.exit(1); - } else { - fname = entry; - } -}); - -if (typeof fname !== 'string') { - console.log('Error: no input file.'); - process.exit(1); -} - -try { - content = fs.readFileSync(fname, 'utf-8'); - syntax = esprima.parse(content, options); - console.log(JSON.stringify(syntax, null, 4)); -} catch (e) { - console.log('Error: ' + e.message); - process.exit(1); -} diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js b/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js deleted file mode 100755 index e0af3f705156..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/env node -/* - Copyright (C) 2012 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*jslint sloppy:true plusplus:true node:true rhino:true */ - -var fs, esprima, options, fnames, count; - -if (typeof require === 'function') { - fs = require('fs'); - esprima = require('esprima'); -} else if (typeof load === 'function') { - try { - load('esprima.js'); - } catch (e) { - load('../esprima.js'); - } -} - -// Shims to Node.js objects when running under Rhino. -if (typeof console === 'undefined' && typeof process === 'undefined') { - console = { log: print }; - fs = { readFileSync: readFile }; - process = { argv: arguments, exit: quit }; - process.argv.unshift('esvalidate.js'); - process.argv.unshift('rhino'); -} - -function showUsage() { - console.log('Usage:'); - console.log(' esvalidate [options] file.js'); - console.log(); - console.log('Available options:'); - console.log(); - console.log(' --format=type Set the report format, plain (default) or junit'); - console.log(' -v, --version Print program version'); - console.log(); - process.exit(1); -} - -if (process.argv.length <= 2) { - showUsage(); -} - -options = { - format: 'plain' -}; - -fnames = []; - -process.argv.splice(2).forEach(function (entry) { - - if (entry === '-h' || entry === '--help') { - showUsage(); - } else if (entry === '-v' || entry === '--version') { - console.log('ECMAScript Validator (using Esprima version', esprima.version, ')'); - console.log(); - process.exit(0); - } else if (entry.slice(0, 9) === '--format=') { - options.format = entry.slice(9); - if (options.format !== 'plain' && options.format !== 'junit') { - console.log('Error: unknown report format ' + options.format + '.'); - process.exit(1); - } - } else if (entry.slice(0, 2) === '--') { - console.log('Error: unknown option ' + entry + '.'); - process.exit(1); - } else { - fnames.push(entry); - } -}); - -if (fnames.length === 0) { - console.log('Error: no input file.'); - process.exit(1); -} - -if (options.format === 'junit') { - console.log(''); - console.log(''); -} - -count = 0; -fnames.forEach(function (fname) { - var content, timestamp, syntax, name; - try { - content = fs.readFileSync(fname, 'utf-8'); - - if (content[0] === '#' && content[1] === '!') { - content = '//' + content.substr(2, content.length); - } - - timestamp = Date.now(); - syntax = esprima.parse(content, { tolerant: true }); - - if (options.format === 'junit') { - - name = fname; - if (name.lastIndexOf('/') >= 0) { - name = name.slice(name.lastIndexOf('/') + 1); - } - - console.log(''); - - syntax.errors.forEach(function (error) { - var msg = error.message; - msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); - console.log(' '); - console.log(' ' + - error.message + '(' + name + ':' + error.lineNumber + ')' + - ''); - console.log(' '); - }); - - console.log(''); - - } else if (options.format === 'plain') { - - syntax.errors.forEach(function (error) { - var msg = error.message; - msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); - msg = fname + ':' + error.lineNumber + ': ' + msg; - console.log(msg); - ++count; - }); - - } - } catch (e) { - ++count; - if (options.format === 'junit') { - console.log(''); - console.log(' '); - console.log(' ' + - e.message + '(' + fname + ((e.lineNumber) ? ':' + e.lineNumber : '') + - ')'); - console.log(' '); - console.log(''); - } else { - console.log('Error: ' + e.message); - } - } -}); - -if (options.format === 'junit') { - console.log(''); -} - -if (count > 0) { - process.exit(1); -} diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/esprima.js b/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/esprima.js deleted file mode 100644 index f1320daf9bd1..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/esprima.js +++ /dev/null @@ -1,3908 +0,0 @@ -/* - Copyright (C) 2012 Ariya Hidayat - Copyright (C) 2012 Mathias Bynens - Copyright (C) 2012 Joost-Wim Boekesteijn - Copyright (C) 2012 Kris Kowal - Copyright (C) 2012 Yusuke Suzuki - Copyright (C) 2012 Arpad Borsos - Copyright (C) 2011 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*jslint bitwise:true plusplus:true */ -/*global esprima:true, define:true, exports:true, window: true, -throwError: true, createLiteral: true, generateStatement: true, -parseAssignmentExpression: true, parseBlock: true, parseExpression: true, -parseFunctionDeclaration: true, parseFunctionExpression: true, -parseFunctionSourceElements: true, parseVariableIdentifier: true, -parseLeftHandSideExpression: true, -parseStatement: true, parseSourceElement: true */ - -(function (root, factory) { - 'use strict'; - - // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, - // Rhino, and plain browser loading. - if (typeof define === 'function' && define.amd) { - define(['exports'], factory); - } else if (typeof exports !== 'undefined') { - factory(exports); - } else { - factory((root.esprima = {})); - } -}(this, function (exports) { - 'use strict'; - - var Token, - TokenName, - Syntax, - PropertyKind, - Messages, - Regex, - source, - strict, - index, - lineNumber, - lineStart, - length, - buffer, - state, - extra; - - Token = { - BooleanLiteral: 1, - EOF: 2, - Identifier: 3, - Keyword: 4, - NullLiteral: 5, - NumericLiteral: 6, - Punctuator: 7, - StringLiteral: 8 - }; - - TokenName = {}; - TokenName[Token.BooleanLiteral] = 'Boolean'; - TokenName[Token.EOF] = ''; - TokenName[Token.Identifier] = 'Identifier'; - TokenName[Token.Keyword] = 'Keyword'; - TokenName[Token.NullLiteral] = 'Null'; - TokenName[Token.NumericLiteral] = 'Numeric'; - TokenName[Token.Punctuator] = 'Punctuator'; - TokenName[Token.StringLiteral] = 'String'; - - Syntax = { - AssignmentExpression: 'AssignmentExpression', - ArrayExpression: 'ArrayExpression', - BlockStatement: 'BlockStatement', - BinaryExpression: 'BinaryExpression', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DoWhileStatement: 'DoWhileStatement', - DebuggerStatement: 'DebuggerStatement', - EmptyStatement: 'EmptyStatement', - ExpressionStatement: 'ExpressionStatement', - ForStatement: 'ForStatement', - ForInStatement: 'ForInStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - Identifier: 'Identifier', - IfStatement: 'IfStatement', - Literal: 'Literal', - LabeledStatement: 'LabeledStatement', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - Program: 'Program', - Property: 'Property', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SwitchStatement: 'SwitchStatement', - SwitchCase: 'SwitchCase', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement' - }; - - PropertyKind = { - Data: 1, - Get: 2, - Set: 4 - }; - - // Error messages should be identical to V8. - Messages = { - UnexpectedToken: 'Unexpected token %0', - UnexpectedNumber: 'Unexpected number', - UnexpectedString: 'Unexpected string', - UnexpectedIdentifier: 'Unexpected identifier', - UnexpectedReserved: 'Unexpected reserved word', - UnexpectedEOS: 'Unexpected end of input', - NewlineAfterThrow: 'Illegal newline after throw', - InvalidRegExp: 'Invalid regular expression', - UnterminatedRegExp: 'Invalid regular expression: missing /', - InvalidLHSInAssignment: 'Invalid left-hand side in assignment', - InvalidLHSInForIn: 'Invalid left-hand side in for-in', - MultipleDefaultsInSwitch: 'More than one default clause in switch statement', - NoCatchOrFinally: 'Missing catch or finally after try', - UnknownLabel: 'Undefined label \'%0\'', - Redeclaration: '%0 \'%1\' has already been declared', - IllegalContinue: 'Illegal continue statement', - IllegalBreak: 'Illegal break statement', - IllegalReturn: 'Illegal return statement', - StrictModeWith: 'Strict mode code may not include a with statement', - StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', - StrictVarName: 'Variable name may not be eval or arguments in strict mode', - StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', - StrictParamDupe: 'Strict mode function may not have duplicate parameter names', - StrictFunctionName: 'Function name may not be eval or arguments in strict mode', - StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', - StrictDelete: 'Delete of an unqualified identifier in strict mode.', - StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode', - AccessorDataProperty: 'Object literal may not have data and accessor property with the same name', - AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name', - StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', - StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', - StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', - StrictReservedWord: 'Use of future reserved word in strict mode' - }; - - // See also tools/generate-unicode-regex.py. - Regex = { - NonAsciiIdentifierStart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'), - NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]') - }; - - // Ensure the condition is true, otherwise throw an error. - // This is only to have a better contract semantic, i.e. another safety net - // to catch a logic error. The condition shall be fulfilled in normal case. - // Do NOT use this to enforce a certain condition on any user input. - - function assert(condition, message) { - if (!condition) { - throw new Error('ASSERT: ' + message); - } - } - - function sliceSource(from, to) { - return source.slice(from, to); - } - - if (typeof 'esprima'[0] === 'undefined') { - sliceSource = function sliceArraySource(from, to) { - return source.slice(from, to).join(''); - }; - } - - function isDecimalDigit(ch) { - return '0123456789'.indexOf(ch) >= 0; - } - - function isHexDigit(ch) { - return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; - } - - function isOctalDigit(ch) { - return '01234567'.indexOf(ch) >= 0; - } - - - // 7.2 White Space - - function isWhiteSpace(ch) { - return (ch === ' ') || (ch === '\u0009') || (ch === '\u000B') || - (ch === '\u000C') || (ch === '\u00A0') || - (ch.charCodeAt(0) >= 0x1680 && - '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(ch) >= 0); - } - - // 7.3 Line Terminators - - function isLineTerminator(ch) { - return (ch === '\n' || ch === '\r' || ch === '\u2028' || ch === '\u2029'); - } - - // 7.6 Identifier Names and Identifiers - - function isIdentifierStart(ch) { - return (ch === '$') || (ch === '_') || (ch === '\\') || - (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || - ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierStart.test(ch)); - } - - function isIdentifierPart(ch) { - return (ch === '$') || (ch === '_') || (ch === '\\') || - (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || - ((ch >= '0') && (ch <= '9')) || - ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierPart.test(ch)); - } - - // 7.6.1.2 Future Reserved Words - - function isFutureReservedWord(id) { - switch (id) { - - // Future reserved words. - case 'class': - case 'enum': - case 'export': - case 'extends': - case 'import': - case 'super': - return true; - } - - return false; - } - - function isStrictModeReservedWord(id) { - switch (id) { - - // Strict Mode reserved words. - case 'implements': - case 'interface': - case 'package': - case 'private': - case 'protected': - case 'public': - case 'static': - case 'yield': - case 'let': - return true; - } - - return false; - } - - function isRestrictedWord(id) { - return id === 'eval' || id === 'arguments'; - } - - // 7.6.1.1 Keywords - - function isKeyword(id) { - var keyword = false; - switch (id.length) { - case 2: - keyword = (id === 'if') || (id === 'in') || (id === 'do'); - break; - case 3: - keyword = (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try'); - break; - case 4: - keyword = (id === 'this') || (id === 'else') || (id === 'case') || (id === 'void') || (id === 'with'); - break; - case 5: - keyword = (id === 'while') || (id === 'break') || (id === 'catch') || (id === 'throw'); - break; - case 6: - keyword = (id === 'return') || (id === 'typeof') || (id === 'delete') || (id === 'switch'); - break; - case 7: - keyword = (id === 'default') || (id === 'finally'); - break; - case 8: - keyword = (id === 'function') || (id === 'continue') || (id === 'debugger'); - break; - case 10: - keyword = (id === 'instanceof'); - break; - } - - if (keyword) { - return true; - } - - switch (id) { - // Future reserved words. - // 'const' is specialized as Keyword in V8. - case 'const': - return true; - - // For compatiblity to SpiderMonkey and ES.next - case 'yield': - case 'let': - return true; - } - - if (strict && isStrictModeReservedWord(id)) { - return true; - } - - return isFutureReservedWord(id); - } - - // 7.4 Comments - - function skipComment() { - var ch, blockComment, lineComment; - - blockComment = false; - lineComment = false; - - while (index < length) { - ch = source[index]; - - if (lineComment) { - ch = source[index++]; - if (isLineTerminator(ch)) { - lineComment = false; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - ++lineNumber; - lineStart = index; - } - } else if (blockComment) { - if (isLineTerminator(ch)) { - if (ch === '\r' && source[index + 1] === '\n') { - ++index; - } - ++lineNumber; - ++index; - lineStart = index; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - ch = source[index++]; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - if (ch === '*') { - ch = source[index]; - if (ch === '/') { - ++index; - blockComment = false; - } - } - } - } else if (ch === '/') { - ch = source[index + 1]; - if (ch === '/') { - index += 2; - lineComment = true; - } else if (ch === '*') { - index += 2; - blockComment = true; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - break; - } - } else if (isWhiteSpace(ch)) { - ++index; - } else if (isLineTerminator(ch)) { - ++index; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - ++lineNumber; - lineStart = index; - } else { - break; - } - } - } - - function scanHexEscape(prefix) { - var i, len, ch, code = 0; - - len = (prefix === 'u') ? 4 : 2; - for (i = 0; i < len; ++i) { - if (index < length && isHexDigit(source[index])) { - ch = source[index++]; - code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); - } else { - return ''; - } - } - return String.fromCharCode(code); - } - - function scanIdentifier() { - var ch, start, id, restore; - - ch = source[index]; - if (!isIdentifierStart(ch)) { - return; - } - - start = index; - if (ch === '\\') { - ++index; - if (source[index] !== 'u') { - return; - } - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - if (ch === '\\' || !isIdentifierStart(ch)) { - return; - } - id = ch; - } else { - index = restore; - id = 'u'; - } - } else { - id = source[index++]; - } - - while (index < length) { - ch = source[index]; - if (!isIdentifierPart(ch)) { - break; - } - if (ch === '\\') { - ++index; - if (source[index] !== 'u') { - return; - } - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - if (ch === '\\' || !isIdentifierPart(ch)) { - return; - } - id += ch; - } else { - index = restore; - id += 'u'; - } - } else { - id += source[index++]; - } - } - - // There is no keyword or literal with only one character. - // Thus, it must be an identifier. - if (id.length === 1) { - return { - type: Token.Identifier, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (isKeyword(id)) { - return { - type: Token.Keyword, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.8.1 Null Literals - - if (id === 'null') { - return { - type: Token.NullLiteral, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.8.2 Boolean Literals - - if (id === 'true' || id === 'false') { - return { - type: Token.BooleanLiteral, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - return { - type: Token.Identifier, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.7 Punctuators - - function scanPunctuator() { - var start = index, - ch1 = source[index], - ch2, - ch3, - ch4; - - // Check for most common single-character punctuators. - - if (ch1 === ';' || ch1 === '{' || ch1 === '}') { - ++index; - return { - type: Token.Punctuator, - value: ch1, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === ',' || ch1 === '(' || ch1 === ')') { - ++index; - return { - type: Token.Punctuator, - value: ch1, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // Dot (.) can also start a floating-point number, hence the need - // to check the next character. - - ch2 = source[index + 1]; - if (ch1 === '.' && !isDecimalDigit(ch2)) { - return { - type: Token.Punctuator, - value: source[index++], - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // Peek more characters. - - ch3 = source[index + 2]; - ch4 = source[index + 3]; - - // 4-character punctuator: >>>= - - if (ch1 === '>' && ch2 === '>' && ch3 === '>') { - if (ch4 === '=') { - index += 4; - return { - type: Token.Punctuator, - value: '>>>=', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - // 3-character punctuators: === !== >>> <<= >>= - - if (ch1 === '=' && ch2 === '=' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '===', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '!' && ch2 === '=' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '!==', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '>' && ch2 === '>' && ch3 === '>') { - index += 3; - return { - type: Token.Punctuator, - value: '>>>', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '<' && ch2 === '<' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '<<=', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '>' && ch2 === '>' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '>>=', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 2-character punctuators: <= >= == != ++ -- << >> && || - // += -= *= %= &= |= ^= /= - - if (ch2 === '=') { - if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) { - index += 2; - return { - type: Token.Punctuator, - value: ch1 + ch2, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - if (ch1 === ch2 && ('+-<>&|'.indexOf(ch1) >= 0)) { - if ('+-<>&|'.indexOf(ch2) >= 0) { - index += 2; - return { - type: Token.Punctuator, - value: ch1 + ch2, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - // The remaining 1-character punctuators. - - if ('[]<>+-*%&|^!~?:=/'.indexOf(ch1) >= 0) { - return { - type: Token.Punctuator, - value: source[index++], - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - // 7.8.3 Numeric Literals - - function scanNumericLiteral() { - var number, start, ch; - - ch = source[index]; - assert(isDecimalDigit(ch) || (ch === '.'), - 'Numeric literal must start with a decimal digit or a decimal point'); - - start = index; - number = ''; - if (ch !== '.') { - number = source[index++]; - ch = source[index]; - - // Hex number starts with '0x'. - // Octal number starts with '0'. - if (number === '0') { - if (ch === 'x' || ch === 'X') { - number += source[index++]; - while (index < length) { - ch = source[index]; - if (!isHexDigit(ch)) { - break; - } - number += source[index++]; - } - - if (number.length <= 2) { - // only 0x - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - if (index < length) { - ch = source[index]; - if (isIdentifierStart(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - return { - type: Token.NumericLiteral, - value: parseInt(number, 16), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } else if (isOctalDigit(ch)) { - number += source[index++]; - while (index < length) { - ch = source[index]; - if (!isOctalDigit(ch)) { - break; - } - number += source[index++]; - } - - if (index < length) { - ch = source[index]; - if (isIdentifierStart(ch) || isDecimalDigit(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - return { - type: Token.NumericLiteral, - value: parseInt(number, 8), - octal: true, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // decimal number starts with '0' such as '09' is illegal. - if (isDecimalDigit(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - while (index < length) { - ch = source[index]; - if (!isDecimalDigit(ch)) { - break; - } - number += source[index++]; - } - } - - if (ch === '.') { - number += source[index++]; - while (index < length) { - ch = source[index]; - if (!isDecimalDigit(ch)) { - break; - } - number += source[index++]; - } - } - - if (ch === 'e' || ch === 'E') { - number += source[index++]; - - ch = source[index]; - if (ch === '+' || ch === '-') { - number += source[index++]; - } - - ch = source[index]; - if (isDecimalDigit(ch)) { - number += source[index++]; - while (index < length) { - ch = source[index]; - if (!isDecimalDigit(ch)) { - break; - } - number += source[index++]; - } - } else { - ch = 'character ' + ch; - if (index >= length) { - ch = ''; - } - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - if (index < length) { - ch = source[index]; - if (isIdentifierStart(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - return { - type: Token.NumericLiteral, - value: parseFloat(number), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.8.4 String Literals - - function scanStringLiteral() { - var str = '', quote, start, ch, code, unescaped, restore, octal = false; - - quote = source[index]; - assert((quote === '\'' || quote === '"'), - 'String literal must starts with a quote'); - - start = index; - ++index; - - while (index < length) { - ch = source[index++]; - - if (ch === quote) { - quote = ''; - break; - } else if (ch === '\\') { - ch = source[index++]; - if (!isLineTerminator(ch)) { - switch (ch) { - case 'n': - str += '\n'; - break; - case 'r': - str += '\r'; - break; - case 't': - str += '\t'; - break; - case 'u': - case 'x': - restore = index; - unescaped = scanHexEscape(ch); - if (unescaped) { - str += unescaped; - } else { - index = restore; - str += ch; - } - break; - case 'b': - str += '\b'; - break; - case 'f': - str += '\f'; - break; - case 'v': - str += '\x0B'; - break; - - default: - if (isOctalDigit(ch)) { - code = '01234567'.indexOf(ch); - - // \0 is not octal escape sequence - if (code !== 0) { - octal = true; - } - - if (index < length && isOctalDigit(source[index])) { - octal = true; - code = code * 8 + '01234567'.indexOf(source[index++]); - - // 3 digits are only allowed when string starts - // with 0, 1, 2, 3 - if ('0123'.indexOf(ch) >= 0 && - index < length && - isOctalDigit(source[index])) { - code = code * 8 + '01234567'.indexOf(source[index++]); - } - } - str += String.fromCharCode(code); - } else { - str += ch; - } - break; - } - } else { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - } - } else if (isLineTerminator(ch)) { - break; - } else { - str += ch; - } - } - - if (quote !== '') { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - return { - type: Token.StringLiteral, - value: str, - octal: octal, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - function scanRegExp() { - var str, ch, start, pattern, flags, value, classMarker = false, restore, terminated = false; - - buffer = null; - skipComment(); - - start = index; - ch = source[index]; - assert(ch === '/', 'Regular expression literal must start with a slash'); - str = source[index++]; - - while (index < length) { - ch = source[index++]; - str += ch; - if (ch === '\\') { - ch = source[index++]; - // ECMA-262 7.8.5 - if (isLineTerminator(ch)) { - throwError({}, Messages.UnterminatedRegExp); - } - str += ch; - } else if (classMarker) { - if (ch === ']') { - classMarker = false; - } - } else { - if (ch === '/') { - terminated = true; - break; - } else if (ch === '[') { - classMarker = true; - } else if (isLineTerminator(ch)) { - throwError({}, Messages.UnterminatedRegExp); - } - } - } - - if (!terminated) { - throwError({}, Messages.UnterminatedRegExp); - } - - // Exclude leading and trailing slash. - pattern = str.substr(1, str.length - 2); - - flags = ''; - while (index < length) { - ch = source[index]; - if (!isIdentifierPart(ch)) { - break; - } - - ++index; - if (ch === '\\' && index < length) { - ch = source[index]; - if (ch === 'u') { - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - flags += ch; - str += '\\u'; - for (; restore < index; ++restore) { - str += source[restore]; - } - } else { - index = restore; - flags += 'u'; - str += '\\u'; - } - } else { - str += '\\'; - } - } else { - flags += ch; - str += ch; - } - } - - try { - value = new RegExp(pattern, flags); - } catch (e) { - throwError({}, Messages.InvalidRegExp); - } - - return { - literal: str, - value: value, - range: [start, index] - }; - } - - function isIdentifierName(token) { - return token.type === Token.Identifier || - token.type === Token.Keyword || - token.type === Token.BooleanLiteral || - token.type === Token.NullLiteral; - } - - function advance() { - var ch, token; - - skipComment(); - - if (index >= length) { - return { - type: Token.EOF, - lineNumber: lineNumber, - lineStart: lineStart, - range: [index, index] - }; - } - - token = scanPunctuator(); - if (typeof token !== 'undefined') { - return token; - } - - ch = source[index]; - - if (ch === '\'' || ch === '"') { - return scanStringLiteral(); - } - - if (ch === '.' || isDecimalDigit(ch)) { - return scanNumericLiteral(); - } - - token = scanIdentifier(); - if (typeof token !== 'undefined') { - return token; - } - - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - function lex() { - var token; - - if (buffer) { - index = buffer.range[1]; - lineNumber = buffer.lineNumber; - lineStart = buffer.lineStart; - token = buffer; - buffer = null; - return token; - } - - buffer = null; - return advance(); - } - - function lookahead() { - var pos, line, start; - - if (buffer !== null) { - return buffer; - } - - pos = index; - line = lineNumber; - start = lineStart; - buffer = advance(); - index = pos; - lineNumber = line; - lineStart = start; - - return buffer; - } - - // Return true if there is a line terminator before the next token. - - function peekLineTerminator() { - var pos, line, start, found; - - pos = index; - line = lineNumber; - start = lineStart; - skipComment(); - found = lineNumber !== line; - index = pos; - lineNumber = line; - lineStart = start; - - return found; - } - - // Throw an exception - - function throwError(token, messageFormat) { - var error, - args = Array.prototype.slice.call(arguments, 2), - msg = messageFormat.replace( - /%(\d)/g, - function (whole, index) { - return args[index] || ''; - } - ); - - if (typeof token.lineNumber === 'number') { - error = new Error('Line ' + token.lineNumber + ': ' + msg); - error.index = token.range[0]; - error.lineNumber = token.lineNumber; - error.column = token.range[0] - lineStart + 1; - } else { - error = new Error('Line ' + lineNumber + ': ' + msg); - error.index = index; - error.lineNumber = lineNumber; - error.column = index - lineStart + 1; - } - - throw error; - } - - function throwErrorTolerant() { - try { - throwError.apply(null, arguments); - } catch (e) { - if (extra.errors) { - extra.errors.push(e); - } else { - throw e; - } - } - } - - - // Throw an exception because of the token. - - function throwUnexpected(token) { - if (token.type === Token.EOF) { - throwError(token, Messages.UnexpectedEOS); - } - - if (token.type === Token.NumericLiteral) { - throwError(token, Messages.UnexpectedNumber); - } - - if (token.type === Token.StringLiteral) { - throwError(token, Messages.UnexpectedString); - } - - if (token.type === Token.Identifier) { - throwError(token, Messages.UnexpectedIdentifier); - } - - if (token.type === Token.Keyword) { - if (isFutureReservedWord(token.value)) { - throwError(token, Messages.UnexpectedReserved); - } else if (strict && isStrictModeReservedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictReservedWord); - return; - } - throwError(token, Messages.UnexpectedToken, token.value); - } - - // BooleanLiteral, NullLiteral, or Punctuator. - throwError(token, Messages.UnexpectedToken, token.value); - } - - // Expect the next token to match the specified punctuator. - // If not, an exception will be thrown. - - function expect(value) { - var token = lex(); - if (token.type !== Token.Punctuator || token.value !== value) { - throwUnexpected(token); - } - } - - // Expect the next token to match the specified keyword. - // If not, an exception will be thrown. - - function expectKeyword(keyword) { - var token = lex(); - if (token.type !== Token.Keyword || token.value !== keyword) { - throwUnexpected(token); - } - } - - // Return true if the next token matches the specified punctuator. - - function match(value) { - var token = lookahead(); - return token.type === Token.Punctuator && token.value === value; - } - - // Return true if the next token matches the specified keyword - - function matchKeyword(keyword) { - var token = lookahead(); - return token.type === Token.Keyword && token.value === keyword; - } - - // Return true if the next token is an assignment operator - - function matchAssign() { - var token = lookahead(), - op = token.value; - - if (token.type !== Token.Punctuator) { - return false; - } - return op === '=' || - op === '*=' || - op === '/=' || - op === '%=' || - op === '+=' || - op === '-=' || - op === '<<=' || - op === '>>=' || - op === '>>>=' || - op === '&=' || - op === '^=' || - op === '|='; - } - - function consumeSemicolon() { - var token, line; - - // Catch the very common case first. - if (source[index] === ';') { - lex(); - return; - } - - line = lineNumber; - skipComment(); - if (lineNumber !== line) { - return; - } - - if (match(';')) { - lex(); - return; - } - - token = lookahead(); - if (token.type !== Token.EOF && !match('}')) { - throwUnexpected(token); - } - } - - // Return true if provided expression is LeftHandSideExpression - - function isLeftHandSide(expr) { - return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression; - } - - // 11.1.4 Array Initialiser - - function parseArrayInitialiser() { - var elements = []; - - expect('['); - - while (!match(']')) { - if (match(',')) { - lex(); - elements.push(null); - } else { - elements.push(parseAssignmentExpression()); - - if (!match(']')) { - expect(','); - } - } - } - - expect(']'); - - return { - type: Syntax.ArrayExpression, - elements: elements - }; - } - - // 11.1.5 Object Initialiser - - function parsePropertyFunction(param, first) { - var previousStrict, body; - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (first && strict && isRestrictedWord(param[0].name)) { - throwErrorTolerant(first, Messages.StrictParamName); - } - strict = previousStrict; - - return { - type: Syntax.FunctionExpression, - id: null, - params: param, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }; - } - - function parseObjectPropertyKey() { - var token = lex(); - - // Note: This function is called only from parseObjectProperty(), where - // EOF and Punctuator tokens are already filtered out. - - if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) { - if (strict && token.octal) { - throwErrorTolerant(token, Messages.StrictOctalLiteral); - } - return createLiteral(token); - } - - return { - type: Syntax.Identifier, - name: token.value - }; - } - - function parseObjectProperty() { - var token, key, id, param; - - token = lookahead(); - - if (token.type === Token.Identifier) { - - id = parseObjectPropertyKey(); - - // Property Assignment: Getter and Setter. - - if (token.value === 'get' && !match(':')) { - key = parseObjectPropertyKey(); - expect('('); - expect(')'); - return { - type: Syntax.Property, - key: key, - value: parsePropertyFunction([]), - kind: 'get' - }; - } else if (token.value === 'set' && !match(':')) { - key = parseObjectPropertyKey(); - expect('('); - token = lookahead(); - if (token.type !== Token.Identifier) { - expect(')'); - throwErrorTolerant(token, Messages.UnexpectedToken, token.value); - return { - type: Syntax.Property, - key: key, - value: parsePropertyFunction([]), - kind: 'set' - }; - } else { - param = [ parseVariableIdentifier() ]; - expect(')'); - return { - type: Syntax.Property, - key: key, - value: parsePropertyFunction(param, token), - kind: 'set' - }; - } - } else { - expect(':'); - return { - type: Syntax.Property, - key: id, - value: parseAssignmentExpression(), - kind: 'init' - }; - } - } else if (token.type === Token.EOF || token.type === Token.Punctuator) { - throwUnexpected(token); - } else { - key = parseObjectPropertyKey(); - expect(':'); - return { - type: Syntax.Property, - key: key, - value: parseAssignmentExpression(), - kind: 'init' - }; - } - } - - function parseObjectInitialiser() { - var properties = [], property, name, kind, map = {}, toString = String; - - expect('{'); - - while (!match('}')) { - property = parseObjectProperty(); - - if (property.key.type === Syntax.Identifier) { - name = property.key.name; - } else { - name = toString(property.key.value); - } - kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set; - if (Object.prototype.hasOwnProperty.call(map, name)) { - if (map[name] === PropertyKind.Data) { - if (strict && kind === PropertyKind.Data) { - throwErrorTolerant({}, Messages.StrictDuplicateProperty); - } else if (kind !== PropertyKind.Data) { - throwErrorTolerant({}, Messages.AccessorDataProperty); - } - } else { - if (kind === PropertyKind.Data) { - throwErrorTolerant({}, Messages.AccessorDataProperty); - } else if (map[name] & kind) { - throwErrorTolerant({}, Messages.AccessorGetSet); - } - } - map[name] |= kind; - } else { - map[name] = kind; - } - - properties.push(property); - - if (!match('}')) { - expect(','); - } - } - - expect('}'); - - return { - type: Syntax.ObjectExpression, - properties: properties - }; - } - - // 11.1.6 The Grouping Operator - - function parseGroupExpression() { - var expr; - - expect('('); - - expr = parseExpression(); - - expect(')'); - - return expr; - } - - - // 11.1 Primary Expressions - - function parsePrimaryExpression() { - var token = lookahead(), - type = token.type; - - if (type === Token.Identifier) { - return { - type: Syntax.Identifier, - name: lex().value - }; - } - - if (type === Token.StringLiteral || type === Token.NumericLiteral) { - if (strict && token.octal) { - throwErrorTolerant(token, Messages.StrictOctalLiteral); - } - return createLiteral(lex()); - } - - if (type === Token.Keyword) { - if (matchKeyword('this')) { - lex(); - return { - type: Syntax.ThisExpression - }; - } - - if (matchKeyword('function')) { - return parseFunctionExpression(); - } - } - - if (type === Token.BooleanLiteral) { - lex(); - token.value = (token.value === 'true'); - return createLiteral(token); - } - - if (type === Token.NullLiteral) { - lex(); - token.value = null; - return createLiteral(token); - } - - if (match('[')) { - return parseArrayInitialiser(); - } - - if (match('{')) { - return parseObjectInitialiser(); - } - - if (match('(')) { - return parseGroupExpression(); - } - - if (match('/') || match('/=')) { - return createLiteral(scanRegExp()); - } - - return throwUnexpected(lex()); - } - - // 11.2 Left-Hand-Side Expressions - - function parseArguments() { - var args = []; - - expect('('); - - if (!match(')')) { - while (index < length) { - args.push(parseAssignmentExpression()); - if (match(')')) { - break; - } - expect(','); - } - } - - expect(')'); - - return args; - } - - function parseNonComputedProperty() { - var token = lex(); - - if (!isIdentifierName(token)) { - throwUnexpected(token); - } - - return { - type: Syntax.Identifier, - name: token.value - }; - } - - function parseNonComputedMember() { - expect('.'); - - return parseNonComputedProperty(); - } - - function parseComputedMember() { - var expr; - - expect('['); - - expr = parseExpression(); - - expect(']'); - - return expr; - } - - function parseNewExpression() { - var expr; - - expectKeyword('new'); - - expr = { - type: Syntax.NewExpression, - callee: parseLeftHandSideExpression(), - 'arguments': [] - }; - - if (match('(')) { - expr['arguments'] = parseArguments(); - } - - return expr; - } - - function parseLeftHandSideExpressionAllowCall() { - var expr; - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[') || match('(')) { - if (match('(')) { - expr = { - type: Syntax.CallExpression, - callee: expr, - 'arguments': parseArguments() - }; - } else if (match('[')) { - expr = { - type: Syntax.MemberExpression, - computed: true, - object: expr, - property: parseComputedMember() - }; - } else { - expr = { - type: Syntax.MemberExpression, - computed: false, - object: expr, - property: parseNonComputedMember() - }; - } - } - - return expr; - } - - - function parseLeftHandSideExpression() { - var expr; - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[')) { - if (match('[')) { - expr = { - type: Syntax.MemberExpression, - computed: true, - object: expr, - property: parseComputedMember() - }; - } else { - expr = { - type: Syntax.MemberExpression, - computed: false, - object: expr, - property: parseNonComputedMember() - }; - } - } - - return expr; - } - - // 11.3 Postfix Expressions - - function parsePostfixExpression() { - var expr = parseLeftHandSideExpressionAllowCall(), token; - - token = lookahead(); - if (token.type !== Token.Punctuator) { - return expr; - } - - if ((match('++') || match('--')) && !peekLineTerminator()) { - // 11.3.1, 11.3.2 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant({}, Messages.StrictLHSPostfix); - } - if (!isLeftHandSide(expr)) { - throwErrorTolerant({}, Messages.InvalidLHSInAssignment); - } - - expr = { - type: Syntax.UpdateExpression, - operator: lex().value, - argument: expr, - prefix: false - }; - } - - return expr; - } - - // 11.4 Unary Operators - - function parseUnaryExpression() { - var token, expr; - - token = lookahead(); - if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { - return parsePostfixExpression(); - } - - if (match('++') || match('--')) { - token = lex(); - expr = parseUnaryExpression(); - // 11.4.4, 11.4.5 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant({}, Messages.StrictLHSPrefix); - } - - if (!isLeftHandSide(expr)) { - throwErrorTolerant({}, Messages.InvalidLHSInAssignment); - } - - expr = { - type: Syntax.UpdateExpression, - operator: token.value, - argument: expr, - prefix: true - }; - return expr; - } - - if (match('+') || match('-') || match('~') || match('!')) { - expr = { - type: Syntax.UnaryExpression, - operator: lex().value, - argument: parseUnaryExpression(), - prefix: true - }; - return expr; - } - - if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { - expr = { - type: Syntax.UnaryExpression, - operator: lex().value, - argument: parseUnaryExpression(), - prefix: true - }; - if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { - throwErrorTolerant({}, Messages.StrictDelete); - } - return expr; - } - - return parsePostfixExpression(); - } - - // 11.5 Multiplicative Operators - - function parseMultiplicativeExpression() { - var expr = parseUnaryExpression(); - - while (match('*') || match('/') || match('%')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseUnaryExpression() - }; - } - - return expr; - } - - // 11.6 Additive Operators - - function parseAdditiveExpression() { - var expr = parseMultiplicativeExpression(); - - while (match('+') || match('-')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseMultiplicativeExpression() - }; - } - - return expr; - } - - // 11.7 Bitwise Shift Operators - - function parseShiftExpression() { - var expr = parseAdditiveExpression(); - - while (match('<<') || match('>>') || match('>>>')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseAdditiveExpression() - }; - } - - return expr; - } - // 11.8 Relational Operators - - function parseRelationalExpression() { - var expr, previousAllowIn; - - previousAllowIn = state.allowIn; - state.allowIn = true; - - expr = parseShiftExpression(); - - while (match('<') || match('>') || match('<=') || match('>=') || (previousAllowIn && matchKeyword('in')) || matchKeyword('instanceof')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseShiftExpression() - }; - } - - state.allowIn = previousAllowIn; - return expr; - } - - // 11.9 Equality Operators - - function parseEqualityExpression() { - var expr = parseRelationalExpression(); - - while (match('==') || match('!=') || match('===') || match('!==')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseRelationalExpression() - }; - } - - return expr; - } - - // 11.10 Binary Bitwise Operators - - function parseBitwiseANDExpression() { - var expr = parseEqualityExpression(); - - while (match('&')) { - lex(); - expr = { - type: Syntax.BinaryExpression, - operator: '&', - left: expr, - right: parseEqualityExpression() - }; - } - - return expr; - } - - function parseBitwiseXORExpression() { - var expr = parseBitwiseANDExpression(); - - while (match('^')) { - lex(); - expr = { - type: Syntax.BinaryExpression, - operator: '^', - left: expr, - right: parseBitwiseANDExpression() - }; - } - - return expr; - } - - function parseBitwiseORExpression() { - var expr = parseBitwiseXORExpression(); - - while (match('|')) { - lex(); - expr = { - type: Syntax.BinaryExpression, - operator: '|', - left: expr, - right: parseBitwiseXORExpression() - }; - } - - return expr; - } - - // 11.11 Binary Logical Operators - - function parseLogicalANDExpression() { - var expr = parseBitwiseORExpression(); - - while (match('&&')) { - lex(); - expr = { - type: Syntax.LogicalExpression, - operator: '&&', - left: expr, - right: parseBitwiseORExpression() - }; - } - - return expr; - } - - function parseLogicalORExpression() { - var expr = parseLogicalANDExpression(); - - while (match('||')) { - lex(); - expr = { - type: Syntax.LogicalExpression, - operator: '||', - left: expr, - right: parseLogicalANDExpression() - }; - } - - return expr; - } - - // 11.12 Conditional Operator - - function parseConditionalExpression() { - var expr, previousAllowIn, consequent; - - expr = parseLogicalORExpression(); - - if (match('?')) { - lex(); - previousAllowIn = state.allowIn; - state.allowIn = true; - consequent = parseAssignmentExpression(); - state.allowIn = previousAllowIn; - expect(':'); - - expr = { - type: Syntax.ConditionalExpression, - test: expr, - consequent: consequent, - alternate: parseAssignmentExpression() - }; - } - - return expr; - } - - // 11.13 Assignment Operators - - function parseAssignmentExpression() { - var token, expr; - - token = lookahead(); - expr = parseConditionalExpression(); - - if (matchAssign()) { - // LeftHandSideExpression - if (!isLeftHandSide(expr)) { - throwErrorTolerant({}, Messages.InvalidLHSInAssignment); - } - - // 11.13.1 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant(token, Messages.StrictLHSAssignment); - } - - expr = { - type: Syntax.AssignmentExpression, - operator: lex().value, - left: expr, - right: parseAssignmentExpression() - }; - } - - return expr; - } - - // 11.14 Comma Operator - - function parseExpression() { - var expr = parseAssignmentExpression(); - - if (match(',')) { - expr = { - type: Syntax.SequenceExpression, - expressions: [ expr ] - }; - - while (index < length) { - if (!match(',')) { - break; - } - lex(); - expr.expressions.push(parseAssignmentExpression()); - } - - } - return expr; - } - - // 12.1 Block - - function parseStatementList() { - var list = [], - statement; - - while (index < length) { - if (match('}')) { - break; - } - statement = parseSourceElement(); - if (typeof statement === 'undefined') { - break; - } - list.push(statement); - } - - return list; - } - - function parseBlock() { - var block; - - expect('{'); - - block = parseStatementList(); - - expect('}'); - - return { - type: Syntax.BlockStatement, - body: block - }; - } - - // 12.2 Variable Statement - - function parseVariableIdentifier() { - var token = lex(); - - if (token.type !== Token.Identifier) { - throwUnexpected(token); - } - - return { - type: Syntax.Identifier, - name: token.value - }; - } - - function parseVariableDeclaration(kind) { - var id = parseVariableIdentifier(), - init = null; - - // 12.2.1 - if (strict && isRestrictedWord(id.name)) { - throwErrorTolerant({}, Messages.StrictVarName); - } - - if (kind === 'const') { - expect('='); - init = parseAssignmentExpression(); - } else if (match('=')) { - lex(); - init = parseAssignmentExpression(); - } - - return { - type: Syntax.VariableDeclarator, - id: id, - init: init - }; - } - - function parseVariableDeclarationList(kind) { - var list = []; - - do { - list.push(parseVariableDeclaration(kind)); - if (!match(',')) { - break; - } - lex(); - } while (index < length); - - return list; - } - - function parseVariableStatement() { - var declarations; - - expectKeyword('var'); - - declarations = parseVariableDeclarationList(); - - consumeSemicolon(); - - return { - type: Syntax.VariableDeclaration, - declarations: declarations, - kind: 'var' - }; - } - - // kind may be `const` or `let` - // Both are experimental and not in the specification yet. - // see http://wiki.ecmascript.org/doku.php?id=harmony:const - // and http://wiki.ecmascript.org/doku.php?id=harmony:let - function parseConstLetDeclaration(kind) { - var declarations; - - expectKeyword(kind); - - declarations = parseVariableDeclarationList(kind); - - consumeSemicolon(); - - return { - type: Syntax.VariableDeclaration, - declarations: declarations, - kind: kind - }; - } - - // 12.3 Empty Statement - - function parseEmptyStatement() { - expect(';'); - - return { - type: Syntax.EmptyStatement - }; - } - - // 12.4 Expression Statement - - function parseExpressionStatement() { - var expr = parseExpression(); - - consumeSemicolon(); - - return { - type: Syntax.ExpressionStatement, - expression: expr - }; - } - - // 12.5 If statement - - function parseIfStatement() { - var test, consequent, alternate; - - expectKeyword('if'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - consequent = parseStatement(); - - if (matchKeyword('else')) { - lex(); - alternate = parseStatement(); - } else { - alternate = null; - } - - return { - type: Syntax.IfStatement, - test: test, - consequent: consequent, - alternate: alternate - }; - } - - // 12.6 Iteration Statements - - function parseDoWhileStatement() { - var body, test, oldInIteration; - - expectKeyword('do'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - expectKeyword('while'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - if (match(';')) { - lex(); - } - - return { - type: Syntax.DoWhileStatement, - body: body, - test: test - }; - } - - function parseWhileStatement() { - var test, body, oldInIteration; - - expectKeyword('while'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - return { - type: Syntax.WhileStatement, - test: test, - body: body - }; - } - - function parseForVariableDeclaration() { - var token = lex(); - - return { - type: Syntax.VariableDeclaration, - declarations: parseVariableDeclarationList(), - kind: token.value - }; - } - - function parseForStatement() { - var init, test, update, left, right, body, oldInIteration; - - init = test = update = null; - - expectKeyword('for'); - - expect('('); - - if (match(';')) { - lex(); - } else { - if (matchKeyword('var') || matchKeyword('let')) { - state.allowIn = false; - init = parseForVariableDeclaration(); - state.allowIn = true; - - if (init.declarations.length === 1 && matchKeyword('in')) { - lex(); - left = init; - right = parseExpression(); - init = null; - } - } else { - state.allowIn = false; - init = parseExpression(); - state.allowIn = true; - - if (matchKeyword('in')) { - // LeftHandSideExpression - if (!isLeftHandSide(init)) { - throwErrorTolerant({}, Messages.InvalidLHSInForIn); - } - - lex(); - left = init; - right = parseExpression(); - init = null; - } - } - - if (typeof left === 'undefined') { - expect(';'); - } - } - - if (typeof left === 'undefined') { - - if (!match(';')) { - test = parseExpression(); - } - expect(';'); - - if (!match(')')) { - update = parseExpression(); - } - } - - expect(')'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - if (typeof left === 'undefined') { - return { - type: Syntax.ForStatement, - init: init, - test: test, - update: update, - body: body - }; - } - - return { - type: Syntax.ForInStatement, - left: left, - right: right, - body: body, - each: false - }; - } - - // 12.7 The continue statement - - function parseContinueStatement() { - var token, label = null; - - expectKeyword('continue'); - - // Optimize the most common form: 'continue;'. - if (source[index] === ';') { - lex(); - - if (!state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return { - type: Syntax.ContinueStatement, - label: null - }; - } - - if (peekLineTerminator()) { - if (!state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return { - type: Syntax.ContinueStatement, - label: null - }; - } - - token = lookahead(); - if (token.type === Token.Identifier) { - label = parseVariableIdentifier(); - - if (!Object.prototype.hasOwnProperty.call(state.labelSet, label.name)) { - throwError({}, Messages.UnknownLabel, label.name); - } - } - - consumeSemicolon(); - - if (label === null && !state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return { - type: Syntax.ContinueStatement, - label: label - }; - } - - // 12.8 The break statement - - function parseBreakStatement() { - var token, label = null; - - expectKeyword('break'); - - // Optimize the most common form: 'break;'. - if (source[index] === ';') { - lex(); - - if (!(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return { - type: Syntax.BreakStatement, - label: null - }; - } - - if (peekLineTerminator()) { - if (!(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return { - type: Syntax.BreakStatement, - label: null - }; - } - - token = lookahead(); - if (token.type === Token.Identifier) { - label = parseVariableIdentifier(); - - if (!Object.prototype.hasOwnProperty.call(state.labelSet, label.name)) { - throwError({}, Messages.UnknownLabel, label.name); - } - } - - consumeSemicolon(); - - if (label === null && !(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return { - type: Syntax.BreakStatement, - label: label - }; - } - - // 12.9 The return statement - - function parseReturnStatement() { - var token, argument = null; - - expectKeyword('return'); - - if (!state.inFunctionBody) { - throwErrorTolerant({}, Messages.IllegalReturn); - } - - // 'return' followed by a space and an identifier is very common. - if (source[index] === ' ') { - if (isIdentifierStart(source[index + 1])) { - argument = parseExpression(); - consumeSemicolon(); - return { - type: Syntax.ReturnStatement, - argument: argument - }; - } - } - - if (peekLineTerminator()) { - return { - type: Syntax.ReturnStatement, - argument: null - }; - } - - if (!match(';')) { - token = lookahead(); - if (!match('}') && token.type !== Token.EOF) { - argument = parseExpression(); - } - } - - consumeSemicolon(); - - return { - type: Syntax.ReturnStatement, - argument: argument - }; - } - - // 12.10 The with statement - - function parseWithStatement() { - var object, body; - - if (strict) { - throwErrorTolerant({}, Messages.StrictModeWith); - } - - expectKeyword('with'); - - expect('('); - - object = parseExpression(); - - expect(')'); - - body = parseStatement(); - - return { - type: Syntax.WithStatement, - object: object, - body: body - }; - } - - // 12.10 The swith statement - - function parseSwitchCase() { - var test, - consequent = [], - statement; - - if (matchKeyword('default')) { - lex(); - test = null; - } else { - expectKeyword('case'); - test = parseExpression(); - } - expect(':'); - - while (index < length) { - if (match('}') || matchKeyword('default') || matchKeyword('case')) { - break; - } - statement = parseStatement(); - if (typeof statement === 'undefined') { - break; - } - consequent.push(statement); - } - - return { - type: Syntax.SwitchCase, - test: test, - consequent: consequent - }; - } - - function parseSwitchStatement() { - var discriminant, cases, clause, oldInSwitch, defaultFound; - - expectKeyword('switch'); - - expect('('); - - discriminant = parseExpression(); - - expect(')'); - - expect('{'); - - cases = []; - - if (match('}')) { - lex(); - return { - type: Syntax.SwitchStatement, - discriminant: discriminant, - cases: cases - }; - } - - oldInSwitch = state.inSwitch; - state.inSwitch = true; - defaultFound = false; - - while (index < length) { - if (match('}')) { - break; - } - clause = parseSwitchCase(); - if (clause.test === null) { - if (defaultFound) { - throwError({}, Messages.MultipleDefaultsInSwitch); - } - defaultFound = true; - } - cases.push(clause); - } - - state.inSwitch = oldInSwitch; - - expect('}'); - - return { - type: Syntax.SwitchStatement, - discriminant: discriminant, - cases: cases - }; - } - - // 12.13 The throw statement - - function parseThrowStatement() { - var argument; - - expectKeyword('throw'); - - if (peekLineTerminator()) { - throwError({}, Messages.NewlineAfterThrow); - } - - argument = parseExpression(); - - consumeSemicolon(); - - return { - type: Syntax.ThrowStatement, - argument: argument - }; - } - - // 12.14 The try statement - - function parseCatchClause() { - var param; - - expectKeyword('catch'); - - expect('('); - if (match(')')) { - throwUnexpected(lookahead()); - } - - param = parseVariableIdentifier(); - // 12.14.1 - if (strict && isRestrictedWord(param.name)) { - throwErrorTolerant({}, Messages.StrictCatchVariable); - } - - expect(')'); - - return { - type: Syntax.CatchClause, - param: param, - body: parseBlock() - }; - } - - function parseTryStatement() { - var block, handlers = [], finalizer = null; - - expectKeyword('try'); - - block = parseBlock(); - - if (matchKeyword('catch')) { - handlers.push(parseCatchClause()); - } - - if (matchKeyword('finally')) { - lex(); - finalizer = parseBlock(); - } - - if (handlers.length === 0 && !finalizer) { - throwError({}, Messages.NoCatchOrFinally); - } - - return { - type: Syntax.TryStatement, - block: block, - guardedHandlers: [], - handlers: handlers, - finalizer: finalizer - }; - } - - // 12.15 The debugger statement - - function parseDebuggerStatement() { - expectKeyword('debugger'); - - consumeSemicolon(); - - return { - type: Syntax.DebuggerStatement - }; - } - - // 12 Statements - - function parseStatement() { - var token = lookahead(), - expr, - labeledBody; - - if (token.type === Token.EOF) { - throwUnexpected(token); - } - - if (token.type === Token.Punctuator) { - switch (token.value) { - case ';': - return parseEmptyStatement(); - case '{': - return parseBlock(); - case '(': - return parseExpressionStatement(); - default: - break; - } - } - - if (token.type === Token.Keyword) { - switch (token.value) { - case 'break': - return parseBreakStatement(); - case 'continue': - return parseContinueStatement(); - case 'debugger': - return parseDebuggerStatement(); - case 'do': - return parseDoWhileStatement(); - case 'for': - return parseForStatement(); - case 'function': - return parseFunctionDeclaration(); - case 'if': - return parseIfStatement(); - case 'return': - return parseReturnStatement(); - case 'switch': - return parseSwitchStatement(); - case 'throw': - return parseThrowStatement(); - case 'try': - return parseTryStatement(); - case 'var': - return parseVariableStatement(); - case 'while': - return parseWhileStatement(); - case 'with': - return parseWithStatement(); - default: - break; - } - } - - expr = parseExpression(); - - // 12.12 Labelled Statements - if ((expr.type === Syntax.Identifier) && match(':')) { - lex(); - - if (Object.prototype.hasOwnProperty.call(state.labelSet, expr.name)) { - throwError({}, Messages.Redeclaration, 'Label', expr.name); - } - - state.labelSet[expr.name] = true; - labeledBody = parseStatement(); - delete state.labelSet[expr.name]; - - return { - type: Syntax.LabeledStatement, - label: expr, - body: labeledBody - }; - } - - consumeSemicolon(); - - return { - type: Syntax.ExpressionStatement, - expression: expr - }; - } - - // 13 Function Definition - - function parseFunctionSourceElements() { - var sourceElement, sourceElements = [], token, directive, firstRestricted, - oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody; - - expect('{'); - - while (index < length) { - token = lookahead(); - if (token.type !== Token.StringLiteral) { - break; - } - - sourceElement = parseSourceElement(); - sourceElements.push(sourceElement); - if (sourceElement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = sliceSource(token.range[0] + 1, token.range[1] - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - - oldLabelSet = state.labelSet; - oldInIteration = state.inIteration; - oldInSwitch = state.inSwitch; - oldInFunctionBody = state.inFunctionBody; - - state.labelSet = {}; - state.inIteration = false; - state.inSwitch = false; - state.inFunctionBody = true; - - while (index < length) { - if (match('}')) { - break; - } - sourceElement = parseSourceElement(); - if (typeof sourceElement === 'undefined') { - break; - } - sourceElements.push(sourceElement); - } - - expect('}'); - - state.labelSet = oldLabelSet; - state.inIteration = oldInIteration; - state.inSwitch = oldInSwitch; - state.inFunctionBody = oldInFunctionBody; - - return { - type: Syntax.BlockStatement, - body: sourceElements - }; - } - - function parseFunctionDeclaration() { - var id, param, params = [], body, token, stricted, firstRestricted, message, previousStrict, paramSet; - - expectKeyword('function'); - token = lookahead(); - id = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - - expect('('); - - if (!match(')')) { - paramSet = {}; - while (index < length) { - token = lookahead(); - param = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - stricted = token; - message = Messages.StrictParamName; - } - if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { - stricted = token; - message = Messages.StrictParamDupe; - } - } else if (!firstRestricted) { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictParamName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } else if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { - firstRestricted = token; - message = Messages.StrictParamDupe; - } - } - params.push(param); - paramSet[param.name] = true; - if (match(')')) { - break; - } - expect(','); - } - } - - expect(')'); - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (strict && firstRestricted) { - throwError(firstRestricted, message); - } - if (strict && stricted) { - throwErrorTolerant(stricted, message); - } - strict = previousStrict; - - return { - type: Syntax.FunctionDeclaration, - id: id, - params: params, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }; - } - - function parseFunctionExpression() { - var token, id = null, stricted, firstRestricted, message, param, params = [], body, previousStrict, paramSet; - - expectKeyword('function'); - - if (!match('(')) { - token = lookahead(); - id = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - } - - expect('('); - - if (!match(')')) { - paramSet = {}; - while (index < length) { - token = lookahead(); - param = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - stricted = token; - message = Messages.StrictParamName; - } - if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { - stricted = token; - message = Messages.StrictParamDupe; - } - } else if (!firstRestricted) { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictParamName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } else if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { - firstRestricted = token; - message = Messages.StrictParamDupe; - } - } - params.push(param); - paramSet[param.name] = true; - if (match(')')) { - break; - } - expect(','); - } - } - - expect(')'); - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (strict && firstRestricted) { - throwError(firstRestricted, message); - } - if (strict && stricted) { - throwErrorTolerant(stricted, message); - } - strict = previousStrict; - - return { - type: Syntax.FunctionExpression, - id: id, - params: params, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }; - } - - // 14 Program - - function parseSourceElement() { - var token = lookahead(); - - if (token.type === Token.Keyword) { - switch (token.value) { - case 'const': - case 'let': - return parseConstLetDeclaration(token.value); - case 'function': - return parseFunctionDeclaration(); - default: - return parseStatement(); - } - } - - if (token.type !== Token.EOF) { - return parseStatement(); - } - } - - function parseSourceElements() { - var sourceElement, sourceElements = [], token, directive, firstRestricted; - - while (index < length) { - token = lookahead(); - if (token.type !== Token.StringLiteral) { - break; - } - - sourceElement = parseSourceElement(); - sourceElements.push(sourceElement); - if (sourceElement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = sliceSource(token.range[0] + 1, token.range[1] - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - - while (index < length) { - sourceElement = parseSourceElement(); - if (typeof sourceElement === 'undefined') { - break; - } - sourceElements.push(sourceElement); - } - return sourceElements; - } - - function parseProgram() { - var program; - strict = false; - program = { - type: Syntax.Program, - body: parseSourceElements() - }; - return program; - } - - // The following functions are needed only when the option to preserve - // the comments is active. - - function addComment(type, value, start, end, loc) { - assert(typeof start === 'number', 'Comment must have valid position'); - - // Because the way the actual token is scanned, often the comments - // (if any) are skipped twice during the lexical analysis. - // Thus, we need to skip adding a comment if the comment array already - // handled it. - if (extra.comments.length > 0) { - if (extra.comments[extra.comments.length - 1].range[1] > start) { - return; - } - } - - extra.comments.push({ - type: type, - value: value, - range: [start, end], - loc: loc - }); - } - - function scanComment() { - var comment, ch, loc, start, blockComment, lineComment; - - comment = ''; - blockComment = false; - lineComment = false; - - while (index < length) { - ch = source[index]; - - if (lineComment) { - ch = source[index++]; - if (isLineTerminator(ch)) { - loc.end = { - line: lineNumber, - column: index - lineStart - 1 - }; - lineComment = false; - addComment('Line', comment, start, index - 1, loc); - if (ch === '\r' && source[index] === '\n') { - ++index; - } - ++lineNumber; - lineStart = index; - comment = ''; - } else if (index >= length) { - lineComment = false; - comment += ch; - loc.end = { - line: lineNumber, - column: length - lineStart - }; - addComment('Line', comment, start, length, loc); - } else { - comment += ch; - } - } else if (blockComment) { - if (isLineTerminator(ch)) { - if (ch === '\r' && source[index + 1] === '\n') { - ++index; - comment += '\r\n'; - } else { - comment += ch; - } - ++lineNumber; - ++index; - lineStart = index; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - ch = source[index++]; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - comment += ch; - if (ch === '*') { - ch = source[index]; - if (ch === '/') { - comment = comment.substr(0, comment.length - 1); - blockComment = false; - ++index; - loc.end = { - line: lineNumber, - column: index - lineStart - }; - addComment('Block', comment, start, index, loc); - comment = ''; - } - } - } - } else if (ch === '/') { - ch = source[index + 1]; - if (ch === '/') { - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - start = index; - index += 2; - lineComment = true; - if (index >= length) { - loc.end = { - line: lineNumber, - column: index - lineStart - }; - lineComment = false; - addComment('Line', comment, start, index, loc); - } - } else if (ch === '*') { - start = index; - index += 2; - blockComment = true; - loc = { - start: { - line: lineNumber, - column: index - lineStart - 2 - } - }; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - break; - } - } else if (isWhiteSpace(ch)) { - ++index; - } else if (isLineTerminator(ch)) { - ++index; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - ++lineNumber; - lineStart = index; - } else { - break; - } - } - } - - function filterCommentLocation() { - var i, entry, comment, comments = []; - - for (i = 0; i < extra.comments.length; ++i) { - entry = extra.comments[i]; - comment = { - type: entry.type, - value: entry.value - }; - if (extra.range) { - comment.range = entry.range; - } - if (extra.loc) { - comment.loc = entry.loc; - } - comments.push(comment); - } - - extra.comments = comments; - } - - function collectToken() { - var start, loc, token, range, value; - - skipComment(); - start = index; - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - - token = extra.advance(); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - - if (token.type !== Token.EOF) { - range = [token.range[0], token.range[1]]; - value = sliceSource(token.range[0], token.range[1]); - extra.tokens.push({ - type: TokenName[token.type], - value: value, - range: range, - loc: loc - }); - } - - return token; - } - - function collectRegex() { - var pos, loc, regex, token; - - skipComment(); - - pos = index; - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - - regex = extra.scanRegExp(); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - - // Pop the previous token, which is likely '/' or '/=' - if (extra.tokens.length > 0) { - token = extra.tokens[extra.tokens.length - 1]; - if (token.range[0] === pos && token.type === 'Punctuator') { - if (token.value === '/' || token.value === '/=') { - extra.tokens.pop(); - } - } - } - - extra.tokens.push({ - type: 'RegularExpression', - value: regex.literal, - range: [pos, index], - loc: loc - }); - - return regex; - } - - function filterTokenLocation() { - var i, entry, token, tokens = []; - - for (i = 0; i < extra.tokens.length; ++i) { - entry = extra.tokens[i]; - token = { - type: entry.type, - value: entry.value - }; - if (extra.range) { - token.range = entry.range; - } - if (extra.loc) { - token.loc = entry.loc; - } - tokens.push(token); - } - - extra.tokens = tokens; - } - - function createLiteral(token) { - return { - type: Syntax.Literal, - value: token.value - }; - } - - function createRawLiteral(token) { - return { - type: Syntax.Literal, - value: token.value, - raw: sliceSource(token.range[0], token.range[1]) - }; - } - - function createLocationMarker() { - var marker = {}; - - marker.range = [index, index]; - marker.loc = { - start: { - line: lineNumber, - column: index - lineStart - }, - end: { - line: lineNumber, - column: index - lineStart - } - }; - - marker.end = function () { - this.range[1] = index; - this.loc.end.line = lineNumber; - this.loc.end.column = index - lineStart; - }; - - marker.applyGroup = function (node) { - if (extra.range) { - node.groupRange = [this.range[0], this.range[1]]; - } - if (extra.loc) { - node.groupLoc = { - start: { - line: this.loc.start.line, - column: this.loc.start.column - }, - end: { - line: this.loc.end.line, - column: this.loc.end.column - } - }; - } - }; - - marker.apply = function (node) { - if (extra.range) { - node.range = [this.range[0], this.range[1]]; - } - if (extra.loc) { - node.loc = { - start: { - line: this.loc.start.line, - column: this.loc.start.column - }, - end: { - line: this.loc.end.line, - column: this.loc.end.column - } - }; - } - }; - - return marker; - } - - function trackGroupExpression() { - var marker, expr; - - skipComment(); - marker = createLocationMarker(); - expect('('); - - expr = parseExpression(); - - expect(')'); - - marker.end(); - marker.applyGroup(expr); - - return expr; - } - - function trackLeftHandSideExpression() { - var marker, expr; - - skipComment(); - marker = createLocationMarker(); - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[')) { - if (match('[')) { - expr = { - type: Syntax.MemberExpression, - computed: true, - object: expr, - property: parseComputedMember() - }; - marker.end(); - marker.apply(expr); - } else { - expr = { - type: Syntax.MemberExpression, - computed: false, - object: expr, - property: parseNonComputedMember() - }; - marker.end(); - marker.apply(expr); - } - } - - return expr; - } - - function trackLeftHandSideExpressionAllowCall() { - var marker, expr; - - skipComment(); - marker = createLocationMarker(); - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[') || match('(')) { - if (match('(')) { - expr = { - type: Syntax.CallExpression, - callee: expr, - 'arguments': parseArguments() - }; - marker.end(); - marker.apply(expr); - } else if (match('[')) { - expr = { - type: Syntax.MemberExpression, - computed: true, - object: expr, - property: parseComputedMember() - }; - marker.end(); - marker.apply(expr); - } else { - expr = { - type: Syntax.MemberExpression, - computed: false, - object: expr, - property: parseNonComputedMember() - }; - marker.end(); - marker.apply(expr); - } - } - - return expr; - } - - function filterGroup(node) { - var n, i, entry; - - n = (Object.prototype.toString.apply(node) === '[object Array]') ? [] : {}; - for (i in node) { - if (node.hasOwnProperty(i) && i !== 'groupRange' && i !== 'groupLoc') { - entry = node[i]; - if (entry === null || typeof entry !== 'object' || entry instanceof RegExp) { - n[i] = entry; - } else { - n[i] = filterGroup(entry); - } - } - } - return n; - } - - function wrapTrackingFunction(range, loc) { - - return function (parseFunction) { - - function isBinary(node) { - return node.type === Syntax.LogicalExpression || - node.type === Syntax.BinaryExpression; - } - - function visit(node) { - var start, end; - - if (isBinary(node.left)) { - visit(node.left); - } - if (isBinary(node.right)) { - visit(node.right); - } - - if (range) { - if (node.left.groupRange || node.right.groupRange) { - start = node.left.groupRange ? node.left.groupRange[0] : node.left.range[0]; - end = node.right.groupRange ? node.right.groupRange[1] : node.right.range[1]; - node.range = [start, end]; - } else if (typeof node.range === 'undefined') { - start = node.left.range[0]; - end = node.right.range[1]; - node.range = [start, end]; - } - } - if (loc) { - if (node.left.groupLoc || node.right.groupLoc) { - start = node.left.groupLoc ? node.left.groupLoc.start : node.left.loc.start; - end = node.right.groupLoc ? node.right.groupLoc.end : node.right.loc.end; - node.loc = { - start: start, - end: end - }; - } else if (typeof node.loc === 'undefined') { - node.loc = { - start: node.left.loc.start, - end: node.right.loc.end - }; - } - } - } - - return function () { - var marker, node; - - skipComment(); - - marker = createLocationMarker(); - node = parseFunction.apply(null, arguments); - marker.end(); - - if (range && typeof node.range === 'undefined') { - marker.apply(node); - } - - if (loc && typeof node.loc === 'undefined') { - marker.apply(node); - } - - if (isBinary(node)) { - visit(node); - } - - return node; - }; - }; - } - - function patch() { - - var wrapTracking; - - if (extra.comments) { - extra.skipComment = skipComment; - skipComment = scanComment; - } - - if (extra.raw) { - extra.createLiteral = createLiteral; - createLiteral = createRawLiteral; - } - - if (extra.range || extra.loc) { - - extra.parseGroupExpression = parseGroupExpression; - extra.parseLeftHandSideExpression = parseLeftHandSideExpression; - extra.parseLeftHandSideExpressionAllowCall = parseLeftHandSideExpressionAllowCall; - parseGroupExpression = trackGroupExpression; - parseLeftHandSideExpression = trackLeftHandSideExpression; - parseLeftHandSideExpressionAllowCall = trackLeftHandSideExpressionAllowCall; - - wrapTracking = wrapTrackingFunction(extra.range, extra.loc); - - extra.parseAdditiveExpression = parseAdditiveExpression; - extra.parseAssignmentExpression = parseAssignmentExpression; - extra.parseBitwiseANDExpression = parseBitwiseANDExpression; - extra.parseBitwiseORExpression = parseBitwiseORExpression; - extra.parseBitwiseXORExpression = parseBitwiseXORExpression; - extra.parseBlock = parseBlock; - extra.parseFunctionSourceElements = parseFunctionSourceElements; - extra.parseCatchClause = parseCatchClause; - extra.parseComputedMember = parseComputedMember; - extra.parseConditionalExpression = parseConditionalExpression; - extra.parseConstLetDeclaration = parseConstLetDeclaration; - extra.parseEqualityExpression = parseEqualityExpression; - extra.parseExpression = parseExpression; - extra.parseForVariableDeclaration = parseForVariableDeclaration; - extra.parseFunctionDeclaration = parseFunctionDeclaration; - extra.parseFunctionExpression = parseFunctionExpression; - extra.parseLogicalANDExpression = parseLogicalANDExpression; - extra.parseLogicalORExpression = parseLogicalORExpression; - extra.parseMultiplicativeExpression = parseMultiplicativeExpression; - extra.parseNewExpression = parseNewExpression; - extra.parseNonComputedProperty = parseNonComputedProperty; - extra.parseObjectProperty = parseObjectProperty; - extra.parseObjectPropertyKey = parseObjectPropertyKey; - extra.parsePostfixExpression = parsePostfixExpression; - extra.parsePrimaryExpression = parsePrimaryExpression; - extra.parseProgram = parseProgram; - extra.parsePropertyFunction = parsePropertyFunction; - extra.parseRelationalExpression = parseRelationalExpression; - extra.parseStatement = parseStatement; - extra.parseShiftExpression = parseShiftExpression; - extra.parseSwitchCase = parseSwitchCase; - extra.parseUnaryExpression = parseUnaryExpression; - extra.parseVariableDeclaration = parseVariableDeclaration; - extra.parseVariableIdentifier = parseVariableIdentifier; - - parseAdditiveExpression = wrapTracking(extra.parseAdditiveExpression); - parseAssignmentExpression = wrapTracking(extra.parseAssignmentExpression); - parseBitwiseANDExpression = wrapTracking(extra.parseBitwiseANDExpression); - parseBitwiseORExpression = wrapTracking(extra.parseBitwiseORExpression); - parseBitwiseXORExpression = wrapTracking(extra.parseBitwiseXORExpression); - parseBlock = wrapTracking(extra.parseBlock); - parseFunctionSourceElements = wrapTracking(extra.parseFunctionSourceElements); - parseCatchClause = wrapTracking(extra.parseCatchClause); - parseComputedMember = wrapTracking(extra.parseComputedMember); - parseConditionalExpression = wrapTracking(extra.parseConditionalExpression); - parseConstLetDeclaration = wrapTracking(extra.parseConstLetDeclaration); - parseEqualityExpression = wrapTracking(extra.parseEqualityExpression); - parseExpression = wrapTracking(extra.parseExpression); - parseForVariableDeclaration = wrapTracking(extra.parseForVariableDeclaration); - parseFunctionDeclaration = wrapTracking(extra.parseFunctionDeclaration); - parseFunctionExpression = wrapTracking(extra.parseFunctionExpression); - parseLeftHandSideExpression = wrapTracking(parseLeftHandSideExpression); - parseLogicalANDExpression = wrapTracking(extra.parseLogicalANDExpression); - parseLogicalORExpression = wrapTracking(extra.parseLogicalORExpression); - parseMultiplicativeExpression = wrapTracking(extra.parseMultiplicativeExpression); - parseNewExpression = wrapTracking(extra.parseNewExpression); - parseNonComputedProperty = wrapTracking(extra.parseNonComputedProperty); - parseObjectProperty = wrapTracking(extra.parseObjectProperty); - parseObjectPropertyKey = wrapTracking(extra.parseObjectPropertyKey); - parsePostfixExpression = wrapTracking(extra.parsePostfixExpression); - parsePrimaryExpression = wrapTracking(extra.parsePrimaryExpression); - parseProgram = wrapTracking(extra.parseProgram); - parsePropertyFunction = wrapTracking(extra.parsePropertyFunction); - parseRelationalExpression = wrapTracking(extra.parseRelationalExpression); - parseStatement = wrapTracking(extra.parseStatement); - parseShiftExpression = wrapTracking(extra.parseShiftExpression); - parseSwitchCase = wrapTracking(extra.parseSwitchCase); - parseUnaryExpression = wrapTracking(extra.parseUnaryExpression); - parseVariableDeclaration = wrapTracking(extra.parseVariableDeclaration); - parseVariableIdentifier = wrapTracking(extra.parseVariableIdentifier); - } - - if (typeof extra.tokens !== 'undefined') { - extra.advance = advance; - extra.scanRegExp = scanRegExp; - - advance = collectToken; - scanRegExp = collectRegex; - } - } - - function unpatch() { - if (typeof extra.skipComment === 'function') { - skipComment = extra.skipComment; - } - - if (extra.raw) { - createLiteral = extra.createLiteral; - } - - if (extra.range || extra.loc) { - parseAdditiveExpression = extra.parseAdditiveExpression; - parseAssignmentExpression = extra.parseAssignmentExpression; - parseBitwiseANDExpression = extra.parseBitwiseANDExpression; - parseBitwiseORExpression = extra.parseBitwiseORExpression; - parseBitwiseXORExpression = extra.parseBitwiseXORExpression; - parseBlock = extra.parseBlock; - parseFunctionSourceElements = extra.parseFunctionSourceElements; - parseCatchClause = extra.parseCatchClause; - parseComputedMember = extra.parseComputedMember; - parseConditionalExpression = extra.parseConditionalExpression; - parseConstLetDeclaration = extra.parseConstLetDeclaration; - parseEqualityExpression = extra.parseEqualityExpression; - parseExpression = extra.parseExpression; - parseForVariableDeclaration = extra.parseForVariableDeclaration; - parseFunctionDeclaration = extra.parseFunctionDeclaration; - parseFunctionExpression = extra.parseFunctionExpression; - parseGroupExpression = extra.parseGroupExpression; - parseLeftHandSideExpression = extra.parseLeftHandSideExpression; - parseLeftHandSideExpressionAllowCall = extra.parseLeftHandSideExpressionAllowCall; - parseLogicalANDExpression = extra.parseLogicalANDExpression; - parseLogicalORExpression = extra.parseLogicalORExpression; - parseMultiplicativeExpression = extra.parseMultiplicativeExpression; - parseNewExpression = extra.parseNewExpression; - parseNonComputedProperty = extra.parseNonComputedProperty; - parseObjectProperty = extra.parseObjectProperty; - parseObjectPropertyKey = extra.parseObjectPropertyKey; - parsePrimaryExpression = extra.parsePrimaryExpression; - parsePostfixExpression = extra.parsePostfixExpression; - parseProgram = extra.parseProgram; - parsePropertyFunction = extra.parsePropertyFunction; - parseRelationalExpression = extra.parseRelationalExpression; - parseStatement = extra.parseStatement; - parseShiftExpression = extra.parseShiftExpression; - parseSwitchCase = extra.parseSwitchCase; - parseUnaryExpression = extra.parseUnaryExpression; - parseVariableDeclaration = extra.parseVariableDeclaration; - parseVariableIdentifier = extra.parseVariableIdentifier; - } - - if (typeof extra.scanRegExp === 'function') { - advance = extra.advance; - scanRegExp = extra.scanRegExp; - } - } - - function stringToArray(str) { - var length = str.length, - result = [], - i; - for (i = 0; i < length; ++i) { - result[i] = str.charAt(i); - } - return result; - } - - function parse(code, options) { - var program, toString; - - toString = String; - if (typeof code !== 'string' && !(code instanceof String)) { - code = toString(code); - } - - source = code; - index = 0; - lineNumber = (source.length > 0) ? 1 : 0; - lineStart = 0; - length = source.length; - buffer = null; - state = { - allowIn: true, - labelSet: {}, - inFunctionBody: false, - inIteration: false, - inSwitch: false - }; - - extra = {}; - if (typeof options !== 'undefined') { - extra.range = (typeof options.range === 'boolean') && options.range; - extra.loc = (typeof options.loc === 'boolean') && options.loc; - extra.raw = (typeof options.raw === 'boolean') && options.raw; - if (typeof options.tokens === 'boolean' && options.tokens) { - extra.tokens = []; - } - if (typeof options.comment === 'boolean' && options.comment) { - extra.comments = []; - } - if (typeof options.tolerant === 'boolean' && options.tolerant) { - extra.errors = []; - } - } - - if (length > 0) { - if (typeof source[0] === 'undefined') { - // Try first to convert to a string. This is good as fast path - // for old IE which understands string indexing for string - // literals only and not for string object. - if (code instanceof String) { - source = code.valueOf(); - } - - // Force accessing the characters via an array. - if (typeof source[0] === 'undefined') { - source = stringToArray(code); - } - } - } - - patch(); - try { - program = parseProgram(); - if (typeof extra.comments !== 'undefined') { - filterCommentLocation(); - program.comments = extra.comments; - } - if (typeof extra.tokens !== 'undefined') { - filterTokenLocation(); - program.tokens = extra.tokens; - } - if (typeof extra.errors !== 'undefined') { - program.errors = extra.errors; - } - if (extra.range || extra.loc) { - program.body = filterGroup(program.body); - } - } catch (e) { - throw e; - } finally { - unpatch(); - extra = {}; - } - - return program; - } - - // Sync with package.json. - exports.version = '1.0.4'; - - exports.parse = parse; - - // Deep copy. - exports.Syntax = (function () { - var name, types = {}; - - if (typeof Object.create === 'function') { - types = Object.create(null); - } - - for (name in Syntax) { - if (Syntax.hasOwnProperty(name)) { - types[name] = Syntax[name]; - } - } - - if (typeof Object.freeze === 'function') { - Object.freeze(types); - } - - return types; - }()); - -})); -/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/package.json b/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/package.json deleted file mode 100644 index 9a2294ae28c7..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "esprima", - "description": "ECMAScript parsing infrastructure for multipurpose analysis", - "homepage": "http://esprima.org", - "main": "esprima.js", - "bin": { - "esparse": "./bin/esparse.js", - "esvalidate": "./bin/esvalidate.js" - }, - "files": [ - "bin", - "test/run.js", - "test/runner.js", - "test/test.js", - "test/compat.js", - "test/reflect.js", - "esprima.js" - ], - "version": "1.0.4", - "engines": { - "node": ">=0.4.0" - }, - "maintainers": [ - { - "name": "Ariya Hidayat", - "email": "ariya.hidayat@gmail.com", - "url": "http://ariya.ofilabs.com" - } - ], - "repository": { - "type": "git", - "url": "http://github.com/ariya/esprima.git" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/ariya/esprima/raw/master/LICENSE.BSD" - } - ], - "keywords": [ - "ast", - "ecmascript", - "javascript", - "parser", - "syntax" - ], - "scripts": { - "test": "node test/run.js", - "benchmark": "node test/benchmarks.js", - "benchmark-quick": "node test/benchmarks.js quick" - }, - "readme": "**Esprima** ([esprima.org](http://esprima.org)) is a high performance,\nstandard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)\nparser written in ECMAScript (also popularly known as\n[JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript)).\nEsprima is created and maintained by [Ariya Hidayat](http://twitter.com/ariyahidayat),\nwith the help of [many contributors](https://github.com/ariya/esprima/contributors).\n\nEsprima runs on web browsers (IE 6+, Firefox 1+, Safari 3+, Chrome 1+, Konqueror 4.6+, Opera 8+) as well as\n[Node.js](http://nodejs.org).\n\n### Features\n\n- Full support for [ECMAScript 5.1](http://www.ecma-international.org/publications/standards/Ecma-262.htm)(ECMA-262)\n- Sensible [syntax tree format](http://esprima.org/doc/index.html#ast) compatible with Mozilla\n[Parser AST](https://developer.mozilla.org/en/SpiderMonkey/Parser_API)\n- Heavily tested (> 550 [unit tests](http://esprima.org/test/) with solid 100% statement coverage)\n- Optional tracking of syntax node location (index-based and line-column)\n- Experimental support for ES6/Harmony (module, class, destructuring, ...)\n\nEsprima is blazing fast (see the [benchmark suite](http://esprima.org/test/benchmarks.html)).\nIt is up to 3x faster than UglifyJS v1 and it is still [competitive](http://esprima.org/test/compare.html)\nwith the new generation of fast parsers.\n\n### Applications\n\nEsprima serves as the basis for many popular JavaScript development tools:\n\n- Code coverage analysis: [node-cover](https://github.com/itay/node-cover), [Istanbul](https://github.com/yahoo/Istanbul)\n- Documentation tool: [JFDoc](https://github.com/thejohnfreeman/jfdoc), [JSDuck](https://github.com/senchalabs/jsduck)\n- Language extension: [LLJS](http://mbebenita.github.com/LLJS/) (low-level JS),\n[Sweet.js](http://sweetjs.org/) (macro)\n- ES6/Harmony transpiler: [Six](https://github.com/matthewrobb/six), [Harmonizr](https://github.com/jdiamond/harmonizr)\n- Eclipse Orion smart editing ([outline view](https://github.com/aclement/esprima-outline), [content assist](http://contraptionsforprogramming.blogspot.com/2012/02/better-javascript-content-assist-in.html))\n- Source code modification: [Esmorph](https://github.com/ariya/esmorph), [Code Painter](https://github.com/fawek/codepainter),\n- Source transformation: [node-falafel](https://github.com/substack/node-falafel), [Esmangle](https://github.com/Constellation/esmangle), [escodegen](https://github.com/Constellation/escodegen)\n\n### Questions?\n- [Documentation](http://esprima.org/doc)\n- [Issue tracker](http://issues.esprima.org): [known problems](http://code.google.com/p/esprima/issues/list?q=Defect)\nand [future plans](http://code.google.com/p/esprima/issues/list?q=Enhancement)\n- [Mailing list](http://groups.google.com/group/esprima)\n- [Contribution guide](http://esprima.org/doc/index.html#contribution)\n\nFollow [@Esprima](http://twitter.com/Esprima) on Twitter to get the\ndevelopment updates.\nFeedback and contribution are welcomed!\n\n### License\n\nCopyright (C) 2012, 2011 [Ariya Hidayat](http://ariya.ofilabs.com/about)\n and other contributors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\nTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/ariya/esprima/issues" - }, - "_id": "esprima@1.0.4", - "_from": "esprima@~ 1.0.2" -} diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/compat.js b/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/compat.js deleted file mode 100644 index ee3a6295eba7..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/compat.js +++ /dev/null @@ -1,239 +0,0 @@ -/* - Copyright (C) 2012 Joost-Wim Boekesteijn - Copyright (C) 2011 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*jslint node: true */ -/*global document: true, window:true, esprima: true, testReflect: true */ - -var runTests; - -function getContext(esprima, reportCase, reportFailure) { - 'use strict'; - - var Reflect, Pattern; - - // Maps Mozilla Reflect object to our Esprima parser. - Reflect = { - parse: function (code) { - var result; - - reportCase(code); - - try { - result = esprima.parse(code); - } catch (error) { - result = error; - } - - return result; - } - }; - - // This is used by Reflect test suite to match a syntax tree. - Pattern = function (obj) { - var pattern; - - // Poor man's deep object cloning. - pattern = JSON.parse(JSON.stringify(obj)); - - // Special handling for regular expression literal since we need to - // convert it to a string literal, otherwise it will be decoded - // as object "{}" and the regular expression would be lost. - if (obj.type && obj.type === 'Literal') { - if (obj.value instanceof RegExp) { - pattern = { - type: obj.type, - value: obj.value.toString() - }; - } - } - - // Special handling for branch statement because SpiderMonkey - // prefers to put the 'alternate' property before 'consequent'. - if (obj.type && obj.type === 'IfStatement') { - pattern = { - type: pattern.type, - test: pattern.test, - consequent: pattern.consequent, - alternate: pattern.alternate - }; - } - - // Special handling for do while statement because SpiderMonkey - // prefers to put the 'test' property before 'body'. - if (obj.type && obj.type === 'DoWhileStatement') { - pattern = { - type: pattern.type, - body: pattern.body, - test: pattern.test - }; - } - - function adjustRegexLiteralAndRaw(key, value) { - if (key === 'value' && value instanceof RegExp) { - value = value.toString(); - } else if (key === 'raw' && typeof value === "string") { - // Ignore Esprima-specific 'raw' property. - return undefined; - } - return value; - } - - if (obj.type && (obj.type === 'Program')) { - pattern.assert = function (tree) { - var actual, expected; - actual = JSON.stringify(tree, adjustRegexLiteralAndRaw, 4); - expected = JSON.stringify(obj, null, 4); - - if (expected !== actual) { - reportFailure(expected, actual); - } - }; - } - - return pattern; - }; - - return { - Reflect: Reflect, - Pattern: Pattern - }; -} - -if (typeof window !== 'undefined') { - // Run all tests in a browser environment. - runTests = function () { - 'use strict'; - - var total = 0, - failures = 0; - - function setText(el, str) { - if (typeof el.innerText === 'string') { - el.innerText = str; - } else { - el.textContent = str; - } - } - - function reportCase(code) { - var report, e; - report = document.getElementById('report'); - e = document.createElement('pre'); - e.setAttribute('class', 'code'); - setText(e, code); - report.appendChild(e); - total += 1; - } - - function reportFailure(expected, actual) { - var report, e; - - failures += 1; - - report = document.getElementById('report'); - - e = document.createElement('p'); - setText(e, 'Expected'); - report.appendChild(e); - - e = document.createElement('pre'); - e.setAttribute('class', 'expected'); - setText(e, expected); - report.appendChild(e); - - e = document.createElement('p'); - setText(e, 'Actual'); - report.appendChild(e); - - e = document.createElement('pre'); - e.setAttribute('class', 'actual'); - setText(e, actual); - report.appendChild(e); - } - - setText(document.getElementById('version'), esprima.version); - - window.setTimeout(function () { - var tick, context = getContext(esprima, reportCase, reportFailure); - - tick = new Date(); - testReflect(context.Reflect, context.Pattern); - tick = (new Date()) - tick; - - if (failures > 0) { - setText(document.getElementById('status'), total + ' tests. ' + - 'Failures: ' + failures + '. ' + tick + ' ms'); - } else { - setText(document.getElementById('status'), total + ' tests. ' + - 'No failure. ' + tick + ' ms'); - } - }, 513); - }; -} else { - (function (global) { - 'use strict'; - var esprima = require('../esprima'), - tick, - total = 0, - failures = [], - header, - current, - context; - - function reportCase(code) { - total += 1; - current = code; - } - - function reportFailure(expected, actual) { - failures.push({ - source: current, - expected: expected.toString(), - actual: actual.toString() - }); - } - - context = getContext(esprima, reportCase, reportFailure); - - tick = new Date(); - require('./reflect').testReflect(context.Reflect, context.Pattern); - tick = (new Date()) - tick; - - header = total + ' tests. ' + failures.length + ' failures. ' + - tick + ' ms'; - if (failures.length) { - console.error(header); - failures.forEach(function (failure) { - console.error(failure.source + ': Expected\n ' + - failure.expected.split('\n').join('\n ') + - '\nto match\n ' + failure.actual); - }); - } else { - console.log(header); - } - process.exit(failures.length === 0 ? 0 : 1); - }(this)); -} -/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/reflect.js b/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/reflect.js deleted file mode 100644 index dba1ba8f1fe3..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/reflect.js +++ /dev/null @@ -1,422 +0,0 @@ -// This is modified from Mozilla Reflect.parse test suite (the file is located -// at js/src/tests/js1_8_5/extensions/reflect-parse.js in the source tree). -// -// Some notable changes: -// * Removed unsupported features (destructuring, let, comprehensions...). -// * Removed tests for E4X (ECMAScript for XML). -// * Removed everything related to builder. -// * Enclosed every 'Pattern' construct with a scope. -// * Tweaked some expected tree to remove generator field. -// * Removed the test for bug 632030 and bug 632024. - -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/licenses/publicdomain/ - */ - -(function (exports) { - -function testReflect(Reflect, Pattern) { - -function program(elts) { return Pattern({ type: "Program", body: elts }) } -function exprStmt(expr) { return Pattern({ type: "ExpressionStatement", expression: expr }) } -function throwStmt(expr) { return Pattern({ type: "ThrowStatement", argument: expr }) } -function returnStmt(expr) { return Pattern({ type: "ReturnStatement", argument: expr }) } -function yieldExpr(expr) { return Pattern({ type: "YieldExpression", argument: expr }) } -function lit(val) { return Pattern({ type: "Literal", value: val }) } -var thisExpr = Pattern({ type: "ThisExpression" }); -function funDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration", - id: id, - params: params, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }) } -function genFunDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration", - id: id, - params: params, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }) } -function declarator(id, init) { return Pattern({ type: "VariableDeclarator", id: id, init: init }) } -function varDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "var" }) } -function letDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "let" }) } -function constDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "const" }) } -function ident(name) { return Pattern({ type: "Identifier", name: name }) } -function dotExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: false, object: obj, property: id }) } -function memExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: true, object: obj, property: id }) } -function forStmt(init, test, update, body) { return Pattern({ type: "ForStatement", init: init, test: test, update: update, body: body }) } -function forInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: false }) } -function forEachInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: true }) } -function breakStmt(lab) { return Pattern({ type: "BreakStatement", label: lab }) } -function continueStmt(lab) { return Pattern({ type: "ContinueStatement", label: lab }) } -function blockStmt(body) { return Pattern({ type: "BlockStatement", body: body }) } -var emptyStmt = Pattern({ type: "EmptyStatement" }); -function ifStmt(test, cons, alt) { return Pattern({ type: "IfStatement", test: test, alternate: alt, consequent: cons }) } -function labStmt(lab, stmt) { return Pattern({ type: "LabeledStatement", label: lab, body: stmt }) } -function withStmt(obj, stmt) { return Pattern({ type: "WithStatement", object: obj, body: stmt }) } -function whileStmt(test, stmt) { return Pattern({ type: "WhileStatement", test: test, body: stmt }) } -function doStmt(stmt, test) { return Pattern({ type: "DoWhileStatement", test: test, body: stmt }) } -function switchStmt(disc, cases) { return Pattern({ type: "SwitchStatement", discriminant: disc, cases: cases }) } -function caseClause(test, stmts) { return Pattern({ type: "SwitchCase", test: test, consequent: stmts }) } -function defaultClause(stmts) { return Pattern({ type: "SwitchCase", test: null, consequent: stmts }) } -function catchClause(id, guard, body) { if (guard) { return Pattern({ type: "GuardedCatchClause", param: id, guard: guard, body: body }) } else { return Pattern({ type: "CatchClause", param: id, body: body }) } } -function tryStmt(body, guarded, catches, fin) { return Pattern({ type: "TryStatement", block: body, guardedHandlers: guarded, handlers: catches, finalizer: fin }) } -function letStmt(head, body) { return Pattern({ type: "LetStatement", head: head, body: body }) } -function funExpr(id, args, body, gen) { return Pattern({ type: "FunctionExpression", - id: id, - params: args, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }) } -function genFunExpr(id, args, body) { return Pattern({ type: "FunctionExpression", - id: id, - params: args, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }) } - -function unExpr(op, arg) { return Pattern({ type: "UnaryExpression", operator: op, argument: arg, prefix: true }) } -function binExpr(op, left, right) { return Pattern({ type: "BinaryExpression", operator: op, left: left, right: right }) } -function aExpr(op, left, right) { return Pattern({ type: "AssignmentExpression", operator: op, left: left, right: right }) } -function updExpr(op, arg, prefix) { return Pattern({ type: "UpdateExpression", operator: op, argument: arg, prefix: prefix }) } -function logExpr(op, left, right) { return Pattern({ type: "LogicalExpression", operator: op, left: left, right: right }) } - -function condExpr(test, cons, alt) { return Pattern({ type: "ConditionalExpression", test: test, consequent: cons, alternate: alt }) } -function seqExpr(exprs) { return Pattern({ type: "SequenceExpression", expressions: exprs }) } -function newExpr(callee, args) { return Pattern({ type: "NewExpression", callee: callee, arguments: args }) } -function callExpr(callee, args) { return Pattern({ type: "CallExpression", callee: callee, arguments: args }) } -function arrExpr(elts) { return Pattern({ type: "ArrayExpression", elements: elts }) } -function objExpr(elts) { return Pattern({ type: "ObjectExpression", properties: elts }) } -function objProp(key, value, kind) { return Pattern({ type: "Property", key: key, value: value, kind: kind }) } - -function arrPatt(elts) { return Pattern({ type: "ArrayPattern", elements: elts }) } -function objPatt(elts) { return Pattern({ type: "ObjectPattern", properties: elts }) } - -function localSrc(src) { return "(function(){ " + src + " })" } -function localPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([patt])))]) } -function blockSrc(src) { return "(function(){ { " + src + " } })" } -function blockPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([blockStmt([patt])])))]) } - -function assertBlockStmt(src, patt) { - blockPatt(patt).assert(Reflect.parse(blockSrc(src))); -} - -function assertBlockExpr(src, patt) { - assertBlockStmt(src, exprStmt(patt)); -} - -function assertBlockDecl(src, patt, builder) { - blockPatt(patt).assert(Reflect.parse(blockSrc(src), {builder: builder})); -} - -function assertLocalStmt(src, patt) { - localPatt(patt).assert(Reflect.parse(localSrc(src))); -} - -function assertLocalExpr(src, patt) { - assertLocalStmt(src, exprStmt(patt)); -} - -function assertLocalDecl(src, patt) { - localPatt(patt).assert(Reflect.parse(localSrc(src))); -} - -function assertGlobalStmt(src, patt, builder) { - program([patt]).assert(Reflect.parse(src, {builder: builder})); -} - -function assertGlobalExpr(src, patt, builder) { - program([exprStmt(patt)]).assert(Reflect.parse(src, {builder: builder})); - //assertStmt(src, exprStmt(patt)); -} - -function assertGlobalDecl(src, patt) { - program([patt]).assert(Reflect.parse(src)); -} - -function assertProg(src, patt) { - program(patt).assert(Reflect.parse(src)); -} - -function assertStmt(src, patt) { - assertLocalStmt(src, patt); - assertGlobalStmt(src, patt); - assertBlockStmt(src, patt); -} - -function assertExpr(src, patt) { - assertLocalExpr(src, patt); - assertGlobalExpr(src, patt); - assertBlockExpr(src, patt); -} - -function assertDecl(src, patt) { - assertLocalDecl(src, patt); - assertGlobalDecl(src, patt); - assertBlockDecl(src, patt); -} - -function assertError(src, errorType) { - try { - Reflect.parse(src); - } catch (e) { - return; - } - throw new Error("expected " + errorType.name + " for " + uneval(src)); -} - - -// general tests - -// NB: These are useful but for now jit-test doesn't do I/O reliably. - -//program(_).assert(Reflect.parse(snarf('data/flapjax.txt'))); -//program(_).assert(Reflect.parse(snarf('data/jquery-1.4.2.txt'))); -//program(_).assert(Reflect.parse(snarf('data/prototype.js'))); -//program(_).assert(Reflect.parse(snarf('data/dojo.js.uncompressed.js'))); -//program(_).assert(Reflect.parse(snarf('data/mootools-1.2.4-core-nc.js'))); - - -// declarations - -assertDecl("var x = 1, y = 2, z = 3", - varDecl([declarator(ident("x"), lit(1)), - declarator(ident("y"), lit(2)), - declarator(ident("z"), lit(3))])); -assertDecl("var x, y, z", - varDecl([declarator(ident("x"), null), - declarator(ident("y"), null), - declarator(ident("z"), null)])); -assertDecl("function foo() { }", - funDecl(ident("foo"), [], blockStmt([]))); -assertDecl("function foo() { return 42 }", - funDecl(ident("foo"), [], blockStmt([returnStmt(lit(42))]))); - - -// Bug 591437: rebound args have their defs turned into uses -assertDecl("function f(a) { function a() { } }", - funDecl(ident("f"), [ident("a")], blockStmt([funDecl(ident("a"), [], blockStmt([]))]))); -assertDecl("function f(a,b,c) { function b() { } }", - funDecl(ident("f"), [ident("a"),ident("b"),ident("c")], blockStmt([funDecl(ident("b"), [], blockStmt([]))]))); - -// expressions - -assertExpr("true", lit(true)); -assertExpr("false", lit(false)); -assertExpr("42", lit(42)); -assertExpr("(/asdf/)", lit(/asdf/)); -assertExpr("this", thisExpr); -assertExpr("foo", ident("foo")); -assertExpr("foo.bar", dotExpr(ident("foo"), ident("bar"))); -assertExpr("foo[bar]", memExpr(ident("foo"), ident("bar"))); -assertExpr("(function(){})", funExpr(null, [], blockStmt([]))); -assertExpr("(function f() {})", funExpr(ident("f"), [], blockStmt([]))); -assertExpr("(function f(x,y,z) {})", funExpr(ident("f"), [ident("x"),ident("y"),ident("z")], blockStmt([]))); -assertExpr("(++x)", updExpr("++", ident("x"), true)); -assertExpr("(x++)", updExpr("++", ident("x"), false)); -assertExpr("(+x)", unExpr("+", ident("x"))); -assertExpr("(-x)", unExpr("-", ident("x"))); -assertExpr("(!x)", unExpr("!", ident("x"))); -assertExpr("(~x)", unExpr("~", ident("x"))); -assertExpr("(delete x)", unExpr("delete", ident("x"))); -assertExpr("(typeof x)", unExpr("typeof", ident("x"))); -assertExpr("(void x)", unExpr("void", ident("x"))); -assertExpr("(x == y)", binExpr("==", ident("x"), ident("y"))); -assertExpr("(x != y)", binExpr("!=", ident("x"), ident("y"))); -assertExpr("(x === y)", binExpr("===", ident("x"), ident("y"))); -assertExpr("(x !== y)", binExpr("!==", ident("x"), ident("y"))); -assertExpr("(x < y)", binExpr("<", ident("x"), ident("y"))); -assertExpr("(x <= y)", binExpr("<=", ident("x"), ident("y"))); -assertExpr("(x > y)", binExpr(">", ident("x"), ident("y"))); -assertExpr("(x >= y)", binExpr(">=", ident("x"), ident("y"))); -assertExpr("(x << y)", binExpr("<<", ident("x"), ident("y"))); -assertExpr("(x >> y)", binExpr(">>", ident("x"), ident("y"))); -assertExpr("(x >>> y)", binExpr(">>>", ident("x"), ident("y"))); -assertExpr("(x + y)", binExpr("+", ident("x"), ident("y"))); -assertExpr("(w + x + y + z)", binExpr("+", binExpr("+", binExpr("+", ident("w"), ident("x")), ident("y")), ident("z"))); -assertExpr("(x - y)", binExpr("-", ident("x"), ident("y"))); -assertExpr("(w - x - y - z)", binExpr("-", binExpr("-", binExpr("-", ident("w"), ident("x")), ident("y")), ident("z"))); -assertExpr("(x * y)", binExpr("*", ident("x"), ident("y"))); -assertExpr("(x / y)", binExpr("/", ident("x"), ident("y"))); -assertExpr("(x % y)", binExpr("%", ident("x"), ident("y"))); -assertExpr("(x | y)", binExpr("|", ident("x"), ident("y"))); -assertExpr("(x ^ y)", binExpr("^", ident("x"), ident("y"))); -assertExpr("(x & y)", binExpr("&", ident("x"), ident("y"))); -assertExpr("(x in y)", binExpr("in", ident("x"), ident("y"))); -assertExpr("(x instanceof y)", binExpr("instanceof", ident("x"), ident("y"))); -assertExpr("(x = y)", aExpr("=", ident("x"), ident("y"))); -assertExpr("(x += y)", aExpr("+=", ident("x"), ident("y"))); -assertExpr("(x -= y)", aExpr("-=", ident("x"), ident("y"))); -assertExpr("(x *= y)", aExpr("*=", ident("x"), ident("y"))); -assertExpr("(x /= y)", aExpr("/=", ident("x"), ident("y"))); -assertExpr("(x %= y)", aExpr("%=", ident("x"), ident("y"))); -assertExpr("(x <<= y)", aExpr("<<=", ident("x"), ident("y"))); -assertExpr("(x >>= y)", aExpr(">>=", ident("x"), ident("y"))); -assertExpr("(x >>>= y)", aExpr(">>>=", ident("x"), ident("y"))); -assertExpr("(x |= y)", aExpr("|=", ident("x"), ident("y"))); -assertExpr("(x ^= y)", aExpr("^=", ident("x"), ident("y"))); -assertExpr("(x &= y)", aExpr("&=", ident("x"), ident("y"))); -assertExpr("(x || y)", logExpr("||", ident("x"), ident("y"))); -assertExpr("(x && y)", logExpr("&&", ident("x"), ident("y"))); -assertExpr("(w || x || y || z)", logExpr("||", logExpr("||", logExpr("||", ident("w"), ident("x")), ident("y")), ident("z"))) -assertExpr("(x ? y : z)", condExpr(ident("x"), ident("y"), ident("z"))); -assertExpr("(x,y)", seqExpr([ident("x"),ident("y")])) -assertExpr("(x,y,z)", seqExpr([ident("x"),ident("y"),ident("z")])) -assertExpr("(a,b,c,d,e,f,g)", seqExpr([ident("a"),ident("b"),ident("c"),ident("d"),ident("e"),ident("f"),ident("g")])); -assertExpr("(new Object)", newExpr(ident("Object"), [])); -assertExpr("(new Object())", newExpr(ident("Object"), [])); -assertExpr("(new Object(42))", newExpr(ident("Object"), [lit(42)])); -assertExpr("(new Object(1,2,3))", newExpr(ident("Object"), [lit(1),lit(2),lit(3)])); -assertExpr("(String())", callExpr(ident("String"), [])); -assertExpr("(String(42))", callExpr(ident("String"), [lit(42)])); -assertExpr("(String(1,2,3))", callExpr(ident("String"), [lit(1),lit(2),lit(3)])); -assertExpr("[]", arrExpr([])); -assertExpr("[1]", arrExpr([lit(1)])); -assertExpr("[1,2]", arrExpr([lit(1),lit(2)])); -assertExpr("[1,2,3]", arrExpr([lit(1),lit(2),lit(3)])); -assertExpr("[1,,2,3]", arrExpr([lit(1),,lit(2),lit(3)])); -assertExpr("[1,,,2,3]", arrExpr([lit(1),,,lit(2),lit(3)])); -assertExpr("[1,,,2,,3]", arrExpr([lit(1),,,lit(2),,lit(3)])); -assertExpr("[1,,,2,,,3]", arrExpr([lit(1),,,lit(2),,,lit(3)])); -assertExpr("[,1,2,3]", arrExpr([,lit(1),lit(2),lit(3)])); -assertExpr("[,,1,2,3]", arrExpr([,,lit(1),lit(2),lit(3)])); -assertExpr("[,,,1,2,3]", arrExpr([,,,lit(1),lit(2),lit(3)])); -assertExpr("[,,,1,2,3,]", arrExpr([,,,lit(1),lit(2),lit(3)])); -assertExpr("[,,,1,2,3,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined])); -assertExpr("[,,,1,2,3,,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined,undefined])); -assertExpr("[,,,,,]", arrExpr([undefined,undefined,undefined,undefined,undefined])); -assertExpr("({})", objExpr([])); -assertExpr("({x:1})", objExpr([objProp(ident("x"), lit(1), "init")])); -assertExpr("({x:1, y:2})", objExpr([objProp(ident("x"), lit(1), "init"), - objProp(ident("y"), lit(2), "init")])); -assertExpr("({x:1, y:2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"), - objProp(ident("y"), lit(2), "init"), - objProp(ident("z"), lit(3), "init") ])); -assertExpr("({x:1, 'y':2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"), - objProp(lit("y"), lit(2), "init"), - objProp(ident("z"), lit(3), "init") ])); -assertExpr("({'x':1, 'y':2, z:3})", objExpr([objProp(lit("x"), lit(1), "init"), - objProp(lit("y"), lit(2), "init"), - objProp(ident("z"), lit(3), "init") ])); -assertExpr("({'x':1, 'y':2, 3:3})", objExpr([objProp(lit("x"), lit(1), "init"), - objProp(lit("y"), lit(2), "init"), - objProp(lit(3), lit(3), "init") ])); - -// Bug 571617: eliminate constant-folding -assertExpr("2 + 3", binExpr("+", lit(2), lit(3))); - -// Bug 632026: constant-folding -assertExpr("typeof(0?0:a)", unExpr("typeof", condExpr(lit(0), lit(0), ident("a")))); - -// Bug 632056: constant-folding -program([exprStmt(ident("f")), - ifStmt(lit(1), - funDecl(ident("f"), [], blockStmt([])), - null)]).assert(Reflect.parse("f; if (1) function f(){}")); - -// statements - -assertStmt("throw 42", throwStmt(lit(42))); -assertStmt("for (;;) break", forStmt(null, null, null, breakStmt(null))); -assertStmt("for (x; y; z) break", forStmt(ident("x"), ident("y"), ident("z"), breakStmt(null))); -assertStmt("for (var x; y; z) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), ident("z"), breakStmt(null))); -assertStmt("for (var x = 42; y; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), ident("y"), ident("z"), breakStmt(null))); -assertStmt("for (x; ; z) break", forStmt(ident("x"), null, ident("z"), breakStmt(null))); -assertStmt("for (var x; ; z) break", forStmt(varDecl([declarator(ident("x"), null)]), null, ident("z"), breakStmt(null))); -assertStmt("for (var x = 42; ; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), null, ident("z"), breakStmt(null))); -assertStmt("for (x; y; ) break", forStmt(ident("x"), ident("y"), null, breakStmt(null))); -assertStmt("for (var x; y; ) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), null, breakStmt(null))); -assertStmt("for (var x = 42; y; ) break", forStmt(varDecl([declarator(ident("x"),lit(42))]), ident("y"), null, breakStmt(null))); -assertStmt("for (var x in y) break", forInStmt(varDecl([declarator(ident("x"),null)]), ident("y"), breakStmt(null))); -assertStmt("for (x in y) break", forInStmt(ident("x"), ident("y"), breakStmt(null))); -assertStmt("{ }", blockStmt([])); -assertStmt("{ throw 1; throw 2; throw 3; }", blockStmt([ throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))])); -assertStmt(";", emptyStmt); -assertStmt("if (foo) throw 42;", ifStmt(ident("foo"), throwStmt(lit(42)), null)); -assertStmt("if (foo) throw 42; else true;", ifStmt(ident("foo"), throwStmt(lit(42)), exprStmt(lit(true)))); -assertStmt("if (foo) { throw 1; throw 2; throw 3; }", - ifStmt(ident("foo"), - blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]), - null)); -assertStmt("if (foo) { throw 1; throw 2; throw 3; } else true;", - ifStmt(ident("foo"), - blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]), - exprStmt(lit(true)))); -assertStmt("foo: for(;;) break foo;", labStmt(ident("foo"), forStmt(null, null, null, breakStmt(ident("foo"))))); -assertStmt("foo: for(;;) continue foo;", labStmt(ident("foo"), forStmt(null, null, null, continueStmt(ident("foo"))))); -assertStmt("with (obj) { }", withStmt(ident("obj"), blockStmt([]))); -assertStmt("with (obj) { obj; }", withStmt(ident("obj"), blockStmt([exprStmt(ident("obj"))]))); -assertStmt("while (foo) { }", whileStmt(ident("foo"), blockStmt([]))); -assertStmt("while (foo) { foo; }", whileStmt(ident("foo"), blockStmt([exprStmt(ident("foo"))]))); -assertStmt("do { } while (foo);", doStmt(blockStmt([]), ident("foo"))); -assertStmt("do { foo; } while (foo)", doStmt(blockStmt([exprStmt(ident("foo"))]), ident("foo"))); -assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; }", - switchStmt(ident("foo"), - [ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]), - caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]), - defaultClause([ exprStmt(lit(3)) ]) ])); -assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; case 42: 42; }", - switchStmt(ident("foo"), - [ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]), - caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]), - defaultClause([ exprStmt(lit(3)) ]), - caseClause(lit(42), [ exprStmt(lit(42)) ]) ])); -assertStmt("try { } catch (e) { }", - tryStmt(blockStmt([]), - [], - [ catchClause(ident("e"), null, blockStmt([])) ], - null)); -assertStmt("try { } catch (e) { } finally { }", - tryStmt(blockStmt([]), - [], - [ catchClause(ident("e"), null, blockStmt([])) ], - blockStmt([]))); -assertStmt("try { } finally { }", - tryStmt(blockStmt([]), - [], - [], - blockStmt([]))); - -// redeclarations (TOK_NAME nodes with lexdef) - -assertStmt("function f() { function g() { } function g() { } }", - funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])), - funDecl(ident("g"), [], blockStmt([]))]))); - -assertStmt("function f() { function g() { } function g() { return 42 } }", - funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])), - funDecl(ident("g"), [], blockStmt([returnStmt(lit(42))]))]))); - -assertStmt("function f() { var x = 42; var x = 43; }", - funDecl(ident("f"), [], blockStmt([varDecl([declarator(ident("x"),lit(42))]), - varDecl([declarator(ident("x"),lit(43))])]))); - -// getters and setters - - assertExpr("({ get x() { return 42 } })", - objExpr([ objProp(ident("x"), - funExpr(null, [], blockStmt([returnStmt(lit(42))])), - "get" ) ])); - assertExpr("({ set x(v) { return 42 } })", - objExpr([ objProp(ident("x"), - funExpr(null, [ident("v")], blockStmt([returnStmt(lit(42))])), - "set" ) ])); - -} - -exports.testReflect = testReflect; - -}(typeof exports === 'undefined' ? this : exports)); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/run.js b/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/run.js deleted file mode 100644 index 32ca3faa4f65..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/run.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright (C) 2012 Yusuke Suzuki - Copyright (C) 2012 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*jslint node:true */ - -(function () { - 'use strict'; - - var child = require('child_process'), - nodejs = '"' + process.execPath + '"', - ret = 0, - suites, - index; - - suites = [ - 'runner', - 'compat' - ]; - - function nextTest() { - var suite = suites[index]; - - if (index < suites.length) { - child.exec(nodejs + ' ./test/' + suite + '.js', function (err, stdout, stderr) { - if (stdout) { - process.stdout.write(suite + ': ' + stdout); - } - if (stderr) { - process.stderr.write(suite + ': ' + stderr); - } - if (err) { - ret = err.code; - } - index += 1; - nextTest(); - }); - } else { - process.exit(ret); - } - } - - index = 0; - nextTest(); -}()); diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/runner.js b/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/runner.js deleted file mode 100644 index c1a3fc9bf05d..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/runner.js +++ /dev/null @@ -1,387 +0,0 @@ -/* - Copyright (C) 2012 Ariya Hidayat - Copyright (C) 2012 Joost-Wim Boekesteijn - Copyright (C) 2012 Yusuke Suzuki - Copyright (C) 2012 Arpad Borsos - Copyright (C) 2011 Ariya Hidayat - Copyright (C) 2011 Yusuke Suzuki - Copyright (C) 2011 Arpad Borsos - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*jslint browser:true node:true */ -/*global esprima:true, testFixture:true */ - -var runTests; - -// Special handling for regular expression literal since we need to -// convert it to a string literal, otherwise it will be decoded -// as object "{}" and the regular expression would be lost. -function adjustRegexLiteral(key, value) { - 'use strict'; - if (key === 'value' && value instanceof RegExp) { - value = value.toString(); - } - return value; -} - -function NotMatchingError(expected, actual) { - 'use strict'; - Error.call(this, 'Expected '); - this.expected = expected; - this.actual = actual; -} -NotMatchingError.prototype = new Error(); - -function errorToObject(e) { - 'use strict'; - var msg = e.toString(); - - // Opera 9.64 produces an non-standard string in toString(). - if (msg.substr(0, 6) !== 'Error:') { - if (typeof e.message === 'string') { - msg = 'Error: ' + e.message; - } - } - - return { - index: e.index, - lineNumber: e.lineNumber, - column: e.column, - message: msg - }; -} - -function testParse(esprima, code, syntax) { - 'use strict'; - var expected, tree, actual, options, StringObject, i, len, err; - - // alias, so that JSLint does not complain. - StringObject = String; - - options = { - comment: (typeof syntax.comments !== 'undefined'), - range: true, - loc: true, - tokens: (typeof syntax.tokens !== 'undefined'), - raw: true, - tolerant: (typeof syntax.errors !== 'undefined') - }; - - if (typeof syntax.tokens !== 'undefined') { - if (syntax.tokens.length > 0) { - options.range = (typeof syntax.tokens[0].range !== 'undefined'); - options.loc = (typeof syntax.tokens[0].loc !== 'undefined'); - } - } - - if (typeof syntax.comments !== 'undefined') { - if (syntax.comments.length > 0) { - options.range = (typeof syntax.comments[0].range !== 'undefined'); - options.loc = (typeof syntax.comments[0].loc !== 'undefined'); - } - } - - expected = JSON.stringify(syntax, null, 4); - try { - tree = esprima.parse(code, options); - tree = (options.comment || options.tokens || options.tolerant) ? tree : tree.body[0]; - - if (options.tolerant) { - for (i = 0, len = tree.errors.length; i < len; i += 1) { - tree.errors[i] = errorToObject(tree.errors[i]); - } - } - - actual = JSON.stringify(tree, adjustRegexLiteral, 4); - - // Only to ensure that there is no error when using string object. - esprima.parse(new StringObject(code), options); - - } catch (e) { - throw new NotMatchingError(expected, e.toString()); - } - if (expected !== actual) { - throw new NotMatchingError(expected, actual); - } - - function filter(key, value) { - if (key === 'value' && value instanceof RegExp) { - value = value.toString(); - } - return (key === 'loc' || key === 'range') ? undefined : value; - } - - if (options.tolerant) { - return; - } - - - // Check again without any location info. - options.range = false; - options.loc = false; - expected = JSON.stringify(syntax, filter, 4); - try { - tree = esprima.parse(code, options); - tree = (options.comment || options.tokens) ? tree : tree.body[0]; - - if (options.tolerant) { - for (i = 0, len = tree.errors.length; i < len; i += 1) { - tree.errors[i] = errorToObject(tree.errors[i]); - } - } - - actual = JSON.stringify(tree, filter, 4); - } catch (e) { - throw new NotMatchingError(expected, e.toString()); - } - if (expected !== actual) { - throw new NotMatchingError(expected, actual); - } -} - -function testError(esprima, code, exception) { - 'use strict'; - var i, options, expected, actual, handleInvalidRegexFlag; - - // Different parsing options should give the same error. - options = [ - {}, - { comment: true }, - { raw: true }, - { raw: true, comment: true } - ]; - - // If handleInvalidRegexFlag is true, an invalid flag in a regular expression - // will throw an exception. In some old version V8, this is not the case - // and hence handleInvalidRegexFlag is false. - handleInvalidRegexFlag = false; - try { - 'test'.match(new RegExp('[a-z]', 'x')); - } catch (e) { - handleInvalidRegexFlag = true; - } - - expected = JSON.stringify(exception); - - for (i = 0; i < options.length; i += 1) { - - try { - esprima.parse(code, options[i]); - } catch (e) { - actual = JSON.stringify(errorToObject(e)); - } - - if (expected !== actual) { - - // Compensate for old V8 which does not handle invalid flag. - if (exception.message.indexOf('Invalid regular expression') > 0) { - if (typeof actual === 'undefined' && !handleInvalidRegexFlag) { - return; - } - } - - throw new NotMatchingError(expected, actual); - } - - } -} - -function testAPI(esprima, code, result) { - 'use strict'; - var expected, res, actual; - - expected = JSON.stringify(result.result, null, 4); - try { - if (typeof result.property !== 'undefined') { - res = esprima[result.property]; - } else { - res = esprima[result.call].apply(esprima, result.args); - } - actual = JSON.stringify(res, adjustRegexLiteral, 4); - } catch (e) { - throw new NotMatchingError(expected, e.toString()); - } - if (expected !== actual) { - throw new NotMatchingError(expected, actual); - } -} - -function runTest(esprima, code, result) { - 'use strict'; - if (result.hasOwnProperty('lineNumber')) { - testError(esprima, code, result); - } else if (result.hasOwnProperty('result')) { - testAPI(esprima, code, result); - } else { - testParse(esprima, code, result); - } -} - -if (typeof window !== 'undefined') { - // Run all tests in a browser environment. - runTests = function () { - 'use strict'; - var total = 0, - failures = 0, - category, - fixture, - source, - tick, - expected, - index, - len; - - function setText(el, str) { - if (typeof el.innerText === 'string') { - el.innerText = str; - } else { - el.textContent = str; - } - } - - function startCategory(category) { - var report, e; - report = document.getElementById('report'); - e = document.createElement('h4'); - setText(e, category); - report.appendChild(e); - } - - function reportSuccess(code) { - var report, e; - report = document.getElementById('report'); - e = document.createElement('pre'); - e.setAttribute('class', 'code'); - setText(e, code); - report.appendChild(e); - } - - function reportFailure(code, expected, actual) { - var report, e; - - report = document.getElementById('report'); - - e = document.createElement('p'); - setText(e, 'Code:'); - report.appendChild(e); - - e = document.createElement('pre'); - e.setAttribute('class', 'code'); - setText(e, code); - report.appendChild(e); - - e = document.createElement('p'); - setText(e, 'Expected'); - report.appendChild(e); - - e = document.createElement('pre'); - e.setAttribute('class', 'expected'); - setText(e, expected); - report.appendChild(e); - - e = document.createElement('p'); - setText(e, 'Actual'); - report.appendChild(e); - - e = document.createElement('pre'); - e.setAttribute('class', 'actual'); - setText(e, actual); - report.appendChild(e); - } - - setText(document.getElementById('version'), esprima.version); - - tick = new Date(); - for (category in testFixture) { - if (testFixture.hasOwnProperty(category)) { - startCategory(category); - fixture = testFixture[category]; - for (source in fixture) { - if (fixture.hasOwnProperty(source)) { - expected = fixture[source]; - total += 1; - try { - runTest(esprima, source, expected); - reportSuccess(source, JSON.stringify(expected, null, 4)); - } catch (e) { - failures += 1; - reportFailure(source, e.expected, e.actual); - } - } - } - } - } - tick = (new Date()) - tick; - - if (failures > 0) { - setText(document.getElementById('status'), total + ' tests. ' + - 'Failures: ' + failures + '. ' + tick + ' ms'); - } else { - setText(document.getElementById('status'), total + ' tests. ' + - 'No failure. ' + tick + ' ms'); - } - }; -} else { - (function () { - 'use strict'; - - var esprima = require('../esprima'), - vm = require('vm'), - fs = require('fs'), - total = 0, - failures = [], - tick = new Date(), - expected, - header; - - vm.runInThisContext(fs.readFileSync(__dirname + '/test.js', 'utf-8')); - - Object.keys(testFixture).forEach(function (category) { - Object.keys(testFixture[category]).forEach(function (source) { - total += 1; - expected = testFixture[category][source]; - try { - runTest(esprima, source, expected); - } catch (e) { - e.source = source; - failures.push(e); - } - }); - }); - tick = (new Date()) - tick; - - header = total + ' tests. ' + failures.length + ' failures. ' + - tick + ' ms'; - if (failures.length) { - console.error(header); - failures.forEach(function (failure) { - console.error(failure.source + ': Expected\n ' + - failure.expected.split('\n').join('\n ') + - '\nto match\n ' + failure.actual); - }); - } else { - console.log(header); - } - process.exit(failures.length === 0 ? 0 : 1); - }()); -} diff --git a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/test.js b/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/test.js deleted file mode 100644 index 8ceee54b7497..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/test.js +++ /dev/null @@ -1,20238 +0,0 @@ -/* - Copyright (C) 2012 Ariya Hidayat - Copyright (C) 2012 Joost-Wim Boekesteijn - Copyright (C) 2012 Yusuke Suzuki - Copyright (C) 2012 Arpad Borsos - Copyright (C) 2011 Ariya Hidayat - Copyright (C) 2011 Yusuke Suzuki - Copyright (C) 2011 Arpad Borsos - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -var testFixture = { - - 'Primary Expression': { - - 'this\n': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'ThisExpression', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 0 } - } - }], - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 0 } - }, - tokens: [{ - type: 'Keyword', - value: 'this', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }] - }, - - 'null\n': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: null, - raw: 'null', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 0 } - } - }], - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 0 } - }, - tokens: [{ - type: 'Null', - value: 'null', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }] - }, - - '\n 42\n\n': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [5, 7], - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - } - }, - range: [5, 9], - loc: { - start: { line: 2, column: 4 }, - end: { line: 4, column: 0 } - } - }], - range: [5, 9], - loc: { - start: { line: 2, column: 4 }, - end: { line: 4, column: 0 } - }, - tokens: [{ - type: 'Numeric', - value: '42', - range: [5, 7], - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - } - }] - }, - - '(1 + 2 ) * 3': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '*', - left: { - type: 'BinaryExpression', - operator: '+', - left: { - type: 'Literal', - value: 1, - raw: '1', - range: [1, 2], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 2 } - } - }, - right: { - type: 'Literal', - value: 2, - raw: '2', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [1, 6], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 6 } - } - }, - right: { - type: 'Literal', - value: 3, - raw: '3', - range: [11, 12], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - } - - }, - - 'Grouping Operator': { - - '(1) + (2 ) + 3': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '+', - left: { - type: 'BinaryExpression', - operator: '+', - left: { - type: 'Literal', - value: 1, - raw: '1', - range: [1, 2], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 2 } - } - }, - right: { - type: 'Literal', - value: 2, - raw: '2', - range: [7, 8], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 8 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - right: { - type: 'Literal', - value: 3, - raw: '3', - range: [14, 15], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 15 } - } - }, - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - }, - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - }, - - '4 + 5 << (6)': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '<<', - left: { - type: 'BinaryExpression', - operator: '+', - left: { - type: 'Literal', - value: 4, - raw: '4', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 5, - raw: '5', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Literal', - value: 6, - raw: '6', - range: [10, 11], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - } - - }, - - 'Array Initializer': { - - 'x = []': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ArrayExpression', - elements: [], - range: [4, 6], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }], - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - }, - tokens: [{ - type: 'Identifier', - value: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, { - type: 'Punctuator', - value: '=', - range: [2, 3], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 3 } - } - }, { - type: 'Punctuator', - value: '[', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, { - type: 'Punctuator', - value: ']', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }] - }, - - 'x = [ ]': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ArrayExpression', - elements: [], - range: [4, 7], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - 'x = [ 42 ]': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ArrayExpression', - elements: [{ - type: 'Literal', - value: 42, - raw: '42', - range: [6, 8], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 8 } - } - }], - range: [4, 10], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 10 } - } - }, - range: [0, 10], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 10 } - } - }, - range: [0, 10], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 10 } - } - }, - - 'x = [ 42, ]': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ArrayExpression', - elements: [{ - type: 'Literal', - value: 42, - raw: '42', - range: [6, 8], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 8 } - } - }], - range: [4, 11], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - - 'x = [ ,, 42 ]': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ArrayExpression', - elements: [ - null, - null, - { - type: 'Literal', - value: 42, - raw: '42', - range: [9, 11], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 11 } - } - }], - range: [4, 13], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - - 'x = [ 1, 2, 3, ]': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ArrayExpression', - elements: [{ - type: 'Literal', - value: 1, - raw: '1', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, { - type: 'Literal', - value: 2, - raw: '2', - range: [9, 10], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 10 } - } - }, { - type: 'Literal', - value: 3, - raw: '3', - range: [12, 13], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 13 } - } - }], - range: [4, 16], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - - 'x = [ 1, 2,, 3, ]': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ArrayExpression', - elements: [{ - type: 'Literal', - value: 1, - raw: '1', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, { - type: 'Literal', - value: 2, - raw: '2', - range: [9, 10], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 10 } - } - }, null, { - type: 'Literal', - value: 3, - raw: '3', - range: [13, 14], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 14 } - } - }], - range: [4, 17], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 17 } - } - }, - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }, - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }, - - '日本語 = []': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: '日本語', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - right: { - type: 'ArrayExpression', - elements: [], - range: [6, 8], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 8 } - } - }, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - - 'T\u203F = []': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'T\u203F', - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - right: { - type: 'ArrayExpression', - elements: [], - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - 'T\u200C = []': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'T\u200C', - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - right: { - type: 'ArrayExpression', - elements: [], - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - 'T\u200D = []': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'T\u200D', - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - right: { - type: 'ArrayExpression', - elements: [], - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - '\u2163\u2161 = []': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: '\u2163\u2161', - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - right: { - type: 'ArrayExpression', - elements: [], - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - '\u2163\u2161\u200A=\u2009[]': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: '\u2163\u2161', - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - right: { - type: 'ArrayExpression', - elements: [], - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - } - - }, - - 'Object Initializer': { - - 'x = {}': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [], - range: [4, 6], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'x = { }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [], - range: [4, 7], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - 'x = { answer: 42 }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'answer', - range: [6, 12], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 12 } - } - }, - value: { - type: 'Literal', - value: 42, - raw: '42', - range: [14, 16], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 16 } - } - }, - kind: 'init', - range: [6, 16], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 16 } - } - }], - range: [4, 18], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 18 } - } - }, - range: [0, 18], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 18 } - } - }, - range: [0, 18], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 18 } - } - }, - - 'x = { if: 42 }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'if', - range: [6, 8], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 8 } - } - }, - value: { - type: 'Literal', - value: 42, - raw: '42', - range: [10, 12], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 12 } - } - }, - kind: 'init', - range: [6, 12], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 12 } - } - }], - range: [4, 14], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - - 'x = { true: 42 }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'true', - range: [6, 10], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 10 } - } - }, - value: { - type: 'Literal', - value: 42, - raw: '42', - range: [12, 14], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 14 } - } - }, - kind: 'init', - range: [6, 14], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 14 } - } - }], - range: [4, 16], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - - 'x = { false: 42 }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'false', - range: [6, 11], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 11 } - } - }, - value: { - type: 'Literal', - value: 42, - raw: '42', - range: [13, 15], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 15 } - } - }, - kind: 'init', - range: [6, 15], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 15 } - } - }], - range: [4, 17], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 17 } - } - }, - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }, - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }, - - 'x = { null: 42 }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'null', - range: [6, 10], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 10 } - } - }, - value: { - type: 'Literal', - value: 42, - raw: '42', - range: [12, 14], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 14 } - } - }, - kind: 'init', - range: [6, 14], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 14 } - } - }], - range: [4, 16], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - - 'x = { "answer": 42 }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Literal', - value: 'answer', - raw: '"answer"', - range: [6, 14], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 14 } - } - }, - value: { - type: 'Literal', - value: 42, - raw: '42', - range: [16, 18], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 18 } - } - }, - kind: 'init', - range: [6, 18], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 18 } - } - }], - range: [4, 20], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 20 } - } - }, - range: [0, 20], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 20 } - } - }, - range: [0, 20], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 20 } - } - }, - - 'x = { x: 1, x: 2 }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [ - { - type: 'Property', - key: { - type: 'Identifier', - name: 'x', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - value: { - type: 'Literal', - value: 1, - raw: '1', - range: [9, 10], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 10 } - } - }, - kind: 'init', - range: [6, 10], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 10 } - } - }, - { - type: 'Property', - key: { - type: 'Identifier', - name: 'x', - range: [12, 13], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 13 } - } - }, - value: { - type: 'Literal', - value: 2, - raw: '2', - range: [15, 16], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 16 } - } - }, - kind: 'init', - range: [12, 16], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 16 } - } - } - ], - range: [4, 18], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 18 } - } - }, - range: [0, 18], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 18 } - } - }, - range: [0, 18], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 18 } - } - }, - - 'x = { get width() { return m_width } }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'width', - range: [10, 15], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 15 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ReturnStatement', - argument: { - type: 'Identifier', - name: 'm_width', - range: [27, 34], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 34 } - } - }, - range: [20, 35], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 35 } - } - }], - range: [18, 36], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 36 } - } - }, - rest: null, - generator: false, - expression: false, - range: [18, 36], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 36 } - } - }, - kind: 'get', - range: [6, 36], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 36 } - } - }], - range: [4, 38], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 38 } - } - }, - range: [0, 38], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 38 } - } - }, - range: [0, 38], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 38 } - } - }, - - 'x = { get undef() {} }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'undef', - range: [10, 15], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 15 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [18, 20], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 20 } - } - }, - rest: null, - generator: false, - expression: false, - range: [18, 20], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 20 } - } - }, - kind: 'get', - range: [6, 20], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 20 } - } - }], - range: [4, 22], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 22 } - } - }, - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 22 } - } - }, - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 22 } - } - }, - - 'x = { get if() {} }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'if', - range: [10, 12], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 12 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [15, 17], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 17 } - } - }, - rest: null, - generator: false, - expression: false, - range: [15, 17], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 17 } - } - }, - kind: 'get', - range: [6, 17], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 17 } - } - }], - range: [4, 19], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 19 } - } - }, - range: [0, 19], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 19 } - } - }, - range: [0, 19], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 19 } - } - }, - - 'x = { get true() {} }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'true', - range: [10, 14], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 14 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [17, 19], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 19 } - } - }, - rest: null, - generator: false, - expression: false, - range: [17, 19], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 19 } - } - }, - kind: 'get', - range: [6, 19], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 19 } - } - }], - range: [4, 21], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 21 } - } - }, - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - } - }, - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - } - }, - - 'x = { get false() {} }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'false', - range: [10, 15], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 15 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [18, 20], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 20 } - } - }, - rest: null, - generator: false, - expression: false, - range: [18, 20], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 20 } - } - }, - kind: 'get', - range: [6, 20], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 20 } - } - }], - range: [4, 22], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 22 } - } - }, - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 22 } - } - }, - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 22 } - } - }, - - 'x = { get null() {} }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'null', - range: [10, 14], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 14 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [17, 19], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 19 } - } - }, - rest: null, - generator: false, - expression: false, - range: [17, 19], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 19 } - } - }, - kind: 'get', - range: [6, 19], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 19 } - } - }], - range: [4, 21], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 21 } - } - }, - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - } - }, - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - } - }, - - 'x = { get "undef"() {} }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Literal', - value: 'undef', - raw: '"undef"', - range: [10, 17], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 17 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [20, 22], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 22 } - } - }, - rest: null, - generator: false, - expression: false, - range: [20, 22], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 22 } - } - }, - kind: 'get', - range: [6, 22], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 22 } - } - }], - range: [4, 24], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 24 } - } - }, - range: [0, 24], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 24 } - } - }, - range: [0, 24], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 24 } - } - }, - - 'x = { get 10() {} }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Literal', - value: 10, - raw: '10', - range: [10, 12], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 12 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [15, 17], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 17 } - } - }, - rest: null, - generator: false, - expression: false, - range: [15, 17], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 17 } - } - }, - kind: 'get', - range: [6, 17], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 17 } - } - }], - range: [4, 19], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 19 } - } - }, - range: [0, 19], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 19 } - } - }, - range: [0, 19], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 19 } - } - }, - - 'x = { set width(w) { m_width = w } }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'width', - range: [10, 15], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 15 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [{ - type: 'Identifier', - name: 'w', - range: [16, 17], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 17 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'm_width', - range: [21, 28], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 28 } - } - }, - right: { - type: 'Identifier', - name: 'w', - range: [31, 32], - loc: { - start: { line: 1, column: 31 }, - end: { line: 1, column: 32 } - } - }, - range: [21, 32], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 32 } - } - }, - range: [21, 33], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 33 } - } - }], - range: [19, 34], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 34 } - } - }, - rest: null, - generator: false, - expression: false, - range: [19, 34], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 34 } - } - }, - kind: 'set', - range: [6, 34], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 34 } - } - }], - range: [4, 36], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 36 } - } - }, - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 36 } - } - }, - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 36 } - } - }, - - 'x = { set if(w) { m_if = w } }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'if', - range: [10, 12], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 12 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [{ - type: 'Identifier', - name: 'w', - range: [13, 14], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 14 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'm_if', - range: [18, 22], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 22 } - } - }, - right: { - type: 'Identifier', - name: 'w', - range: [25, 26], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 26 } - } - }, - range: [18, 26], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 26 } - } - }, - range: [18, 27], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 27 } - } - }], - range: [16, 28], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 28 } - } - }, - rest: null, - generator: false, - expression: false, - range: [16, 28], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 28 } - } - }, - kind: 'set', - range: [6, 28], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 28 } - } - }], - range: [4, 30], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 30 } - } - }, - range: [0, 30], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 30 } - } - }, - range: [0, 30], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 30 } - } - }, - - 'x = { set true(w) { m_true = w } }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'true', - range: [10, 14], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 14 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [{ - type: 'Identifier', - name: 'w', - range: [15, 16], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 16 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'm_true', - range: [20, 26], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 26 } - } - }, - right: { - type: 'Identifier', - name: 'w', - range: [29, 30], - loc: { - start: { line: 1, column: 29 }, - end: { line: 1, column: 30 } - } - }, - range: [20, 30], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 30 } - } - }, - range: [20, 31], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 31 } - } - }], - range: [18, 32], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 32 } - } - }, - rest: null, - generator: false, - expression: false, - range: [18, 32], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 32 } - } - }, - kind: 'set', - range: [6, 32], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 32 } - } - }], - range: [4, 34], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 34 } - } - }, - range: [0, 34], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 34 } - } - }, - range: [0, 34], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 34 } - } - }, - - 'x = { set false(w) { m_false = w } }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'false', - range: [10, 15], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 15 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [{ - type: 'Identifier', - name: 'w', - range: [16, 17], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 17 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'm_false', - range: [21, 28], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 28 } - } - }, - right: { - type: 'Identifier', - name: 'w', - range: [31, 32], - loc: { - start: { line: 1, column: 31 }, - end: { line: 1, column: 32 } - } - }, - range: [21, 32], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 32 } - } - }, - range: [21, 33], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 33 } - } - }], - range: [19, 34], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 34 } - } - }, - rest: null, - generator: false, - expression: false, - range: [19, 34], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 34 } - } - }, - kind: 'set', - range: [6, 34], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 34 } - } - }], - range: [4, 36], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 36 } - } - }, - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 36 } - } - }, - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 36 } - } - }, - - 'x = { set null(w) { m_null = w } }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'null', - range: [10, 14], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 14 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [{ - type: 'Identifier', - name: 'w', - range: [15, 16], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 16 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'm_null', - range: [20, 26], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 26 } - } - }, - right: { - type: 'Identifier', - name: 'w', - range: [29, 30], - loc: { - start: { line: 1, column: 29 }, - end: { line: 1, column: 30 } - } - }, - range: [20, 30], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 30 } - } - }, - range: [20, 31], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 31 } - } - }], - range: [18, 32], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 32 } - } - }, - rest: null, - generator: false, - expression: false, - range: [18, 32], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 32 } - } - }, - kind: 'set', - range: [6, 32], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 32 } - } - }], - range: [4, 34], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 34 } - } - }, - range: [0, 34], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 34 } - } - }, - range: [0, 34], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 34 } - } - }, - - 'x = { set "null"(w) { m_null = w } }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Literal', - value: 'null', - raw: '"null"', - range: [10, 16], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 16 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [{ - type: 'Identifier', - name: 'w', - range: [17, 18], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 18 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'm_null', - range: [22, 28], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 28 } - } - }, - right: { - type: 'Identifier', - name: 'w', - range: [31, 32], - loc: { - start: { line: 1, column: 31 }, - end: { line: 1, column: 32 } - } - }, - range: [22, 32], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 32 } - } - }, - range: [22, 33], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 33 } - } - }], - range: [20, 34], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 34 } - } - }, - rest: null, - generator: false, - expression: false, - range: [20, 34], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 34 } - } - }, - kind: 'set', - range: [6, 34], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 34 } - } - }], - range: [4, 36], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 36 } - } - }, - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 36 } - } - }, - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 36 } - } - }, - - 'x = { set 10(w) { m_null = w } }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Literal', - value: 10, - raw: '10', - range: [10, 12], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 12 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [{ - type: 'Identifier', - name: 'w', - range: [13, 14], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 14 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'm_null', - range: [18, 24], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 24 } - } - }, - right: { - type: 'Identifier', - name: 'w', - range: [27, 28], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 28 } - } - }, - range: [18, 28], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 28 } - } - }, - range: [18, 29], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 29 } - } - }], - range: [16, 30], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 30 } - } - }, - rest: null, - generator: false, - expression: false, - range: [16, 30], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 30 } - } - }, - kind: 'set', - range: [6, 30], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 30 } - } - }], - range: [4, 32], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 32 } - } - }, - range: [0, 32], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 32 } - } - }, - range: [0, 32], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 32 } - } - }, - - 'x = { get: 42 }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'get', - range: [6, 9], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 9 } - } - }, - value: { - type: 'Literal', - value: 42, - raw: '42', - range: [11, 13], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 13 } - } - }, - kind: 'init', - range: [6, 13], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 13 } - } - }], - range: [4, 15], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 15 } - } - }, - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - }, - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - }, - - 'x = { set: 43 }': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'set', - range: [6, 9], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 9 } - } - }, - value: { - type: 'Literal', - value: 43, - raw: '43', - range: [11, 13], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 13 } - } - }, - kind: 'init', - range: [6, 13], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 13 } - } - }], - range: [4, 15], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 15 } - } - }, - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - }, - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - } - - }, - - 'Comments': { - - '/* block comment */ 42': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [20, 22], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 22 } - } - }, - range: [20, 22], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 22 } - } - }, - - '42 /*The*/ /*Answer*/': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - } - }], - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - }, - comments: [{ - type: 'Block', - value: 'The', - range: [3, 10], - loc: { - start: { line: 1, column: 3 }, - end: { line: 1, column: 10 } - } - }, { - type: 'Block', - value: 'Answer', - range: [11, 21], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 21 } - } - }] - }, - - '42 /*the*/ /*answer*/': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [0, 2] - }, - range: [0, 21] - }], - range: [0, 21], - comments: [{ - type: 'Block', - value: 'the', - range: [3, 10] - }, { - type: 'Block', - value: 'answer', - range: [11, 21] - }] - }, - - '/* multiline\ncomment\nshould\nbe\nignored */ 42': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [42, 44], - loc: { - start: { line: 5, column: 11 }, - end: { line: 5, column: 13 } - } - }, - range: [42, 44], - loc: { - start: { line: 5, column: 11 }, - end: { line: 5, column: 13 } - } - }, - - '/*a\r\nb*/ 42': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [9, 11], - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - } - }, - range: [9, 11], - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - } - }], - range: [9, 11], - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - }, - comments: [{ - type: 'Block', - value: 'a\r\nb', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 3 } - } - }] - }, - - '/*a\rb*/ 42': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [8, 10], - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - } - }, - range: [8, 10], - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - } - }], - range: [8, 10], - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - }, - comments: [{ - type: 'Block', - value: 'a\rb', - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 3 } - } - }] - }, - - '/*a\nb*/ 42': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [8, 10], - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - } - }, - range: [8, 10], - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - } - }], - range: [8, 10], - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - }, - comments: [{ - type: 'Block', - value: 'a\nb', - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 3 } - } - }] - }, - - '/*a\nc*/ 42': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - } - }, - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - } - }], - loc: { - start: { line: 2, column: 4 }, - end: { line: 2, column: 6 } - }, - comments: [{ - type: 'Block', - value: 'a\nc', - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 3 } - } - }] - }, - - '// line comment\n42': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [16, 18], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 2 } - } - }, - range: [16, 18], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 2 } - } - }, - - '42 // line comment': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - range: [0, 18], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 18 } - } - }], - range: [0, 18], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 18 } - }, - comments: [{ - type: 'Line', - value: ' line comment', - range: [3, 18], - loc: { - start: { line: 1, column: 3 }, - end: { line: 1, column: 18 } - } - }] - }, - - '// Hello, world!\n42': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [17, 19], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 2 } - } - }, - range: [17, 19], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 2 } - } - }], - range: [17, 19], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 2 } - }, - comments: [{ - type: 'Line', - value: ' Hello, world!', - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }] - }, - - '// Hello, world!\n': { - type: 'Program', - body: [], - range: [17, 17], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 0 } - }, - comments: [{ - type: 'Line', - value: ' Hello, world!', - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }] - }, - - '// Hallo, world!\n': { - type: 'Program', - body: [], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 0 } - }, - comments: [{ - type: 'Line', - value: ' Hallo, world!', - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }] - }, - - '//\n42': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [3, 5], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 2 } - } - }, - range: [3, 5], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 2 } - } - }], - range: [3, 5], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 2 } - }, - comments: [{ - type: 'Line', - value: '', - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }] - }, - - '//': { - type: 'Program', - body: [], - range: [2, 2], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 2 } - }, - comments: [{ - type: 'Line', - value: '', - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }] - }, - - '// ': { - type: 'Program', - body: [], - range: [3, 3], - comments: [{ - type: 'Line', - value: ' ', - range: [0, 3] - }] - }, - - '/**/42': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [4, 6], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 6 } - } - }, - range: [4, 6], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 6 } - } - }], - range: [4, 6], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 6 } - }, - comments: [{ - type: 'Block', - value: '', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }] - }, - - '// Hello, world!\n\n// Another hello\n42': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [37, 39], - loc: { - start: { line: 4, column: 0 }, - end: { line: 4, column: 2 } - } - }, - range: [37, 39], - loc: { - start: { line: 4, column: 0 }, - end: { line: 4, column: 2 } - } - }], - range: [37, 39], - loc: { - start: { line: 4, column: 0 }, - end: { line: 4, column: 2 } - }, - comments: [{ - type: 'Line', - value: ' Hello, world!', - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, { - type: 'Line', - value: ' Another hello', - range: [18, 36], - loc: { - start: { line: 3, column: 0 }, - end: { line: 3, column: 18 } - } - }] - }, - - 'if (x) { // Some comment\ndoThat(); }': { - type: 'Program', - body: [{ - type: 'IfStatement', - test: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - consequent: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'doThat', - range: [25, 31], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 6 } - } - }, - 'arguments': [], - range: [25, 33], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 8 } - } - }, - range: [25, 34], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 9 } - } - }], - range: [7, 36], - loc: { - start: { line: 1, column: 7 }, - end: { line: 2, column: 11 } - } - }, - alternate: null, - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 11 } - } - }], - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 11 } - }, - comments: [{ - type: 'Line', - value: ' Some comment', - range: [9, 24], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 24 } - } - }] - }, - - 'switch (answer) { case 42: /* perfect */ bingo() }': { - type: 'Program', - body: [{ - type: 'SwitchStatement', - discriminant: { - type: 'Identifier', - name: 'answer', - range: [8, 14], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 14 } - } - }, - cases: [{ - type: 'SwitchCase', - test: { - type: 'Literal', - value: 42, - raw: '42', - range: [23, 25], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 25 } - } - }, - consequent: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'bingo', - range: [41, 46], - loc: { - start: { line: 1, column: 41 }, - end: { line: 1, column: 46 } - } - }, - 'arguments': [], - range: [41, 48], - loc: { - start: { line: 1, column: 41 }, - end: { line: 1, column: 48 } - } - }, - range: [41, 49], - loc: { - start: { line: 1, column: 41 }, - end: { line: 1, column: 49 } - } - }], - range: [18, 49], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 49 } - } - }], - range: [0, 50], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 50 } - } - }], - range: [0, 50], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 50 } - }, - comments: [{ - type: 'Block', - value: ' perfect ', - range: [27, 40], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 40 } - } - }] - } - - }, - - 'Numeric Literals': { - - '0': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 0, - raw: '0', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - - '42': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42, - raw: '42', - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - - '3': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 3, - raw: '3', - range: [0, 1] - }, - range: [0, 1] - }], - range: [0, 1], - tokens: [{ - type: 'Numeric', - value: '3', - range: [0, 1] - }] - }, - - '5': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 5, - raw: '5', - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - }, - tokens: [{ - type: 'Numeric', - value: '5', - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }] - }, - - '.14': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 0.14, - raw: '.14', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - - '3.14159': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 3.14159, - raw: '3.14159', - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - '6.02214179e+23': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 6.02214179e+23, - raw: '6.02214179e+23', - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - - '1.492417830e-10': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 1.49241783e-10, - raw: '1.492417830e-10', - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - }, - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - }, - - '0x0': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 0, - raw: '0x0', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - - '0e+100': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 0, - raw: '0e+100', - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - '0xabc': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 0xabc, - raw: '0xabc', - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - '0xdef': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 0xdef, - raw: '0xdef', - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - '0X1A': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 0x1A, - raw: '0X1A', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - - '0x10': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 0x10, - raw: '0x10', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - - '0x100': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 0x100, - raw: '0x100', - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - '0X04': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 0X04, - raw: '0X04', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - - '02': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 2, - raw: '02', - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - - '012': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 10, - raw: '012', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - - '0012': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 10, - raw: '0012', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - } - - }, - - 'String Literals': { - - '"Hello"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Hello', - raw: '"Hello"', - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - '"\\n\\r\\t\\v\\b\\f\\\\\\\'\\"\\0"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: '\n\r\t\x0B\b\f\\\'"\x00', - raw: '"\\n\\r\\t\\v\\b\\f\\\\\\\'\\"\\0"', - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 22 } - } - }, - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 22 } - } - }, - - '"\\u0061"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'a', - raw: '"\\u0061"', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - - '"\\x61"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'a', - raw: '"\\x61"', - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - '"\\u00"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'u00', - raw: '"\\u00"', - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - '"\\xt"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'xt', - raw: '"\\xt"', - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - '"Hello\\nworld"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Hello\nworld', - raw: '"Hello\\nworld"', - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - - '"Hello\\\nworld"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Helloworld', - raw: '"Hello\\\nworld"', - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 14 } - } - }, - - '"Hello\\02World"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Hello\u0002World', - raw: '"Hello\\02World"', - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - }, - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - }, - - '"Hello\\012World"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Hello\u000AWorld', - raw: '"Hello\\012World"', - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - - '"Hello\\122World"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Hello\122World', - raw: '"Hello\\122World"', - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - - '"Hello\\0122World"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Hello\u000A2World', - raw: '"Hello\\0122World"', - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }, - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }, - - '"Hello\\312World"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Hello\u00CAWorld', - raw: '"Hello\\312World"', - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - - '"Hello\\412World"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Hello\412World', - raw: '"Hello\\412World"', - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - - '"Hello\\812World"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Hello812World', - raw: '"Hello\\812World"', - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - - '"Hello\\712World"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Hello\712World', - raw: '"Hello\\712World"', - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - - '"Hello\\0World"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Hello\u0000World', - raw: '"Hello\\0World"', - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - - '"Hello\\\r\nworld"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Helloworld', - raw: '"Hello\\\r\nworld"', - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 15 } - } - }, - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 15 } - } - }, - - '"Hello\\1World"': { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'Hello\u0001World', - raw: '"Hello\\1World"', - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - } - }, - - 'Regular Expression Literals': { - - 'var x = /[a-z]/i': { - type: 'Program', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: { - type: 'Literal', - value: '/[a-z]/i', - raw: '/[a-z]/i', - range: [8, 16], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 16 } - } - }, - range: [4, 16], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 16 } - } - }], - kind: 'var', - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }], - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - }, - tokens: [{ - type: 'Keyword', - value: 'var', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, { - type: 'Identifier', - value: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, { - type: 'Punctuator', - value: '=', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, { - type: 'RegularExpression', - value: '/[a-z]/i', - range: [8, 16], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 16 } - } - }] - }, - - 'var x = /[x-z]/i': { - type: 'Program', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5] - }, - init: { - type: 'Literal', - value: '/[x-z]/i', - raw: '/[x-z]/i', - range: [8, 16] - }, - range: [4, 16] - }], - kind: 'var', - range: [0, 16] - }], - range: [0, 16], - tokens: [{ - type: 'Keyword', - value: 'var', - range: [0, 3] - }, { - type: 'Identifier', - value: 'x', - range: [4, 5] - }, { - type: 'Punctuator', - value: '=', - range: [6, 7] - }, { - type: 'RegularExpression', - value: '/[x-z]/i', - range: [8, 16] - }] - }, - - 'var x = /[a-c]/i': { - type: 'Program', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: { - type: 'Literal', - value: '/[a-c]/i', - raw: '/[a-c]/i', - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 16 } - } - }, - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 16 } - } - }], - kind: 'var', - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - }, - tokens: [{ - type: 'Keyword', - value: 'var', - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, { - type: 'Identifier', - value: 'x', - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, { - type: 'Punctuator', - value: '=', - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, { - type: 'RegularExpression', - value: '/[a-c]/i', - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 16 } - } - }] - }, - - 'var x = /[P QR]/i': { - type: 'Program', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: { - type: 'Literal', - value: '/[P QR]/i', - raw: '/[P QR]/i', - range: [8, 17], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 17 } - } - }, - range: [4, 17], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 17 } - } - }], - kind: 'var', - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }], - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - }, - tokens: [{ - type: 'Keyword', - value: 'var', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, { - type: 'Identifier', - value: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, { - type: 'Punctuator', - value: '=', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, { - type: 'RegularExpression', - value: '/[P QR]/i', - range: [8, 17], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 17 } - } - }] - }, - - 'var x = /[\\]/]/': { - type: 'Program', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: { - type: 'Literal', - value: new RegExp('[\\]/]').toString(), - raw: '/[\\]/]/', - range: [8, 15], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 15 } - } - }, - range: [4, 15], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 15 } - } - }], - kind: 'var', - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - }], - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - }, - tokens: [{ - type: 'Keyword', - value: 'var', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, { - type: 'Identifier', - value: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, { - type: 'Punctuator', - value: '=', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, { - type: 'RegularExpression', - value: '/[\\]/]/', - range: [8, 15], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 15 } - } - }] - }, - - 'var x = /foo\\/bar/': { - type: 'Program', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: { - type: 'Literal', - value: '/foo\\/bar/', - raw: '/foo\\/bar/', - range: [8, 18], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 18 } - } - }, - range: [4, 18], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 18 } - } - }], - kind: 'var', - range: [0, 18], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 18 } - } - }], - range: [0, 18], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 18 } - }, - tokens: [{ - type: 'Keyword', - value: 'var', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, { - type: 'Identifier', - value: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, { - type: 'Punctuator', - value: '=', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, { - type: 'RegularExpression', - value: '/foo\\/bar/', - range: [8, 18], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 18 } - } - }] - }, - - 'var x = /=([^=\\s])+/g': { - type: 'Program', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: { - type: 'Literal', - value: '/=([^=\\s])+/g', - raw: '/=([^=\\s])+/g', - range: [8, 21], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 21 } - } - }, - range: [4, 21], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 21 } - } - }], - kind: 'var', - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - } - }], - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - }, - tokens: [{ - type: 'Keyword', - value: 'var', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, { - type: 'Identifier', - value: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, { - type: 'Punctuator', - value: '=', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, { - type: 'RegularExpression', - value: '/=([^=\\s])+/g', - range: [8, 21], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 21 } - } - }] - }, - - 'var x = /[P QR]/\\u0067': { - type: 'Program', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: { - type: 'Literal', - value: '/[P QR]/g', - raw: '/[P QR]/\\u0067', - range: [8, 22], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 22 } - } - }, - range: [4, 22], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 22 } - } - }], - kind: 'var', - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 22 } - } - }], - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 22 } - }, - tokens: [{ - type: 'Keyword', - value: 'var', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, { - type: 'Identifier', - value: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, { - type: 'Punctuator', - value: '=', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, { - type: 'RegularExpression', - value: '/[P QR]/\\u0067', - range: [8, 22], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 22 } - } - }] - }, - - 'var x = /[P QR]/\\g': { - type: 'Program', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: { - type: 'Literal', - value: '/[P QR]/g', - raw: '/[P QR]/\\g', - range: [8, 18], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 18 } - } - }, - range: [4, 18], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 18 } - } - }], - kind: 'var', - range: [0, 18], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 18 } - } - }], - range: [0, 18], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 18 } - }, - tokens: [{ - type: 'Keyword', - value: 'var', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, { - type: 'Identifier', - value: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, { - type: 'Punctuator', - value: '=', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, { - type: 'RegularExpression', - value: '/[P QR]/\\g', - range: [8, 18], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 18 } - } - }] - } - - }, - - 'Left-Hand-Side Expression': { - - 'new Button': { - type: 'ExpressionStatement', - expression: { - type: 'NewExpression', - callee: { - type: 'Identifier', - name: 'Button', - range: [4, 10], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 10 } - } - }, - 'arguments': [], - range: [0, 10], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 10 } - } - }, - range: [0, 10], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 10 } - } - }, - - 'new Button()': { - type: 'ExpressionStatement', - expression: { - type: 'NewExpression', - callee: { - type: 'Identifier', - name: 'Button', - range: [4, 10], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 10 } - } - }, - 'arguments': [], - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - - 'new new foo': { - type: 'ExpressionStatement', - expression: { - type: 'NewExpression', - callee: { - type: 'NewExpression', - callee: { - type: 'Identifier', - name: 'foo', - range: [8, 11], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 11 } - } - }, - 'arguments': [], - range: [4, 11], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 11 } - } - }, - 'arguments': [], - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - - 'new new foo()': { - type: 'ExpressionStatement', - expression: { - type: 'NewExpression', - callee: { - type: 'NewExpression', - callee: { - type: 'Identifier', - name: 'foo', - range: [8, 11], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 11 } - } - }, - 'arguments': [], - range: [4, 13], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 13 } - } - }, - 'arguments': [], - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - - 'new foo().bar()': { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'MemberExpression', - computed: false, - object: { - type: 'NewExpression', - callee: { - type: 'Identifier', - name: 'foo', - range: [4, 7], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 7 } - } - }, - 'arguments': [], - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - property: { - type: 'Identifier', - name: 'bar', - range: [10, 13], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - 'arguments': [], - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - }, - range: [0, 15], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 15 } - } - }, - - 'new foo[bar]': { - type: 'ExpressionStatement', - expression: { - type: 'NewExpression', - callee: { - type: 'MemberExpression', - computed: true, - object: { - type: 'Identifier', - name: 'foo', - range: [4, 7], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 7 } - } - }, - property: { - type: 'Identifier', - name: 'bar', - range: [8, 11], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 11 } - } - }, - range: [4, 12], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 12 } - } - }, - 'arguments': [], - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - - 'new foo.bar()': { - type: 'ExpressionStatement', - expression: { - type: 'NewExpression', - callee: { - type: 'MemberExpression', - computed: false, - object: { - type: 'Identifier', - name: 'foo', - range: [4, 7], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 7 } - } - }, - property: { - type: 'Identifier', - name: 'bar', - range: [8, 11], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 11 } - } - }, - range: [4, 11], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 11 } - } - }, - 'arguments': [], - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - - '( new foo).bar()': { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'MemberExpression', - computed: false, - object: { - type: 'NewExpression', - callee: { - type: 'Identifier', - name: 'foo', - range: [6, 9], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 9 } - } - }, - 'arguments': [], - range: [2, 9], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 9 } - } - }, - property: { - type: 'Identifier', - name: 'bar', - range: [11, 14], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - 'arguments': [], - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - - 'foo(bar, baz)': { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'foo', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'bar', - range: [4, 7], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 7 } - } - }, { - type: 'Identifier', - name: 'baz', - range: [9, 12], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 12 } - } - }], - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - - '( foo )()': { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'foo', - range: [5, 8], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 8 } - } - }, - 'arguments': [], - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - - 'universe.milkyway': { - type: 'ExpressionStatement', - expression: { - type: 'MemberExpression', - computed: false, - object: { - type: 'Identifier', - name: 'universe', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - property: { - type: 'Identifier', - name: 'milkyway', - range: [9, 17], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 17 } - } - }, - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }, - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }, - - 'universe.milkyway.solarsystem': { - type: 'ExpressionStatement', - expression: { - type: 'MemberExpression', - computed: false, - object: { - type: 'MemberExpression', - computed: false, - object: { - type: 'Identifier', - name: 'universe', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - property: { - type: 'Identifier', - name: 'milkyway', - range: [9, 17], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 17 } - } - }, - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }, - property: { - type: 'Identifier', - name: 'solarsystem', - range: [18, 29], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 29 } - } - }, - range: [0, 29], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 29 } - } - }, - range: [0, 29], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 29 } - } - }, - - 'universe.milkyway.solarsystem.Earth': { - type: 'ExpressionStatement', - expression: { - type: 'MemberExpression', - computed: false, - object: { - type: 'MemberExpression', - computed: false, - object: { - type: 'MemberExpression', - computed: false, - object: { - type: 'Identifier', - name: 'universe', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - property: { - type: 'Identifier', - name: 'milkyway', - range: [9, 17], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 17 } - } - }, - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }, - property: { - type: 'Identifier', - name: 'solarsystem', - range: [18, 29], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 29 } - } - }, - range: [0, 29], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 29 } - } - }, - property: { - type: 'Identifier', - name: 'Earth', - range: [30, 35], - loc: { - start: { line: 1, column: 30 }, - end: { line: 1, column: 35 } - } - }, - range: [0, 35], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 35 } - } - }, - range: [0, 35], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 35 } - } - }, - - 'universe[galaxyName, otherUselessName]': { - type: 'ExpressionStatement', - expression: { - type: 'MemberExpression', - computed: true, - object: { - type: 'Identifier', - name: 'universe', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - property: { - type: 'SequenceExpression', - expressions: [{ - type: 'Identifier', - name: 'galaxyName', - range: [9, 19], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 19 } - } - }, { - type: 'Identifier', - name: 'otherUselessName', - range: [21, 37], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 37 } - } - }], - range: [9, 37], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 37 } - } - }, - range: [0, 38], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 38 } - } - }, - range: [0, 38], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 38 } - } - }, - - 'universe[galaxyName]': { - type: 'ExpressionStatement', - expression: { - type: 'MemberExpression', - computed: true, - object: { - type: 'Identifier', - name: 'universe', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - property: { - type: 'Identifier', - name: 'galaxyName', - range: [9, 19], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 19 } - } - }, - range: [0, 20], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 20 } - } - }, - range: [0, 20], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 20 } - } - }, - - 'universe[42].galaxies': { - type: 'ExpressionStatement', - expression: { - type: 'MemberExpression', - computed: false, - object: { - type: 'MemberExpression', - computed: true, - object: { - type: 'Identifier', - name: 'universe', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - property: { - type: 'Literal', - value: 42, - raw: '42', - range: [9, 11], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - property: { - type: 'Identifier', - name: 'galaxies', - range: [13, 21], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 21 } - } - }, - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - } - }, - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - } - }, - - 'universe(42).galaxies': { - type: 'ExpressionStatement', - expression: { - type: 'MemberExpression', - computed: false, - object: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'universe', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - 'arguments': [{ - type: 'Literal', - value: 42, - raw: '42', - range: [9, 11], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 11 } - } - }], - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - property: { - type: 'Identifier', - name: 'galaxies', - range: [13, 21], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 21 } - } - }, - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - } - }, - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - } - }, - - 'universe(42).galaxies(14, 3, 77).milkyway': { - type: 'ExpressionStatement', - expression: { - type: 'MemberExpression', - computed: false, - object: { - type: 'CallExpression', - callee: { - type: 'MemberExpression', - computed: false, - object: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'universe', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - 'arguments': [{ - type: 'Literal', - value: 42, - raw: '42', - range: [9, 11], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 11 } - } - }], - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - property: { - type: 'Identifier', - name: 'galaxies', - range: [13, 21], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 21 } - } - }, - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - } - }, - 'arguments': [{ - type: 'Literal', - value: 14, - raw: '14', - range: [22, 24], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 24 } - } - }, { - type: 'Literal', - value: 3, - raw: '3', - range: [26, 27], - loc: { - start: { line: 1, column: 26 }, - end: { line: 1, column: 27 } - } - }, { - type: 'Literal', - value: 77, - raw: '77', - range: [29, 31], - loc: { - start: { line: 1, column: 29 }, - end: { line: 1, column: 31 } - } - }], - range: [0, 32], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 32 } - } - }, - property: { - type: 'Identifier', - name: 'milkyway', - range: [33, 41], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 41 } - } - }, - range: [0, 41], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 41 } - } - }, - range: [0, 41], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 41 } - } - }, - - 'earth.asia.Indonesia.prepareForElection(2014)': { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'MemberExpression', - computed: false, - object: { - type: 'MemberExpression', - computed: false, - object: { - type: 'MemberExpression', - computed: false, - object: { - type: 'Identifier', - name: 'earth', - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - property: { - type: 'Identifier', - name: 'asia', - range: [6, 10], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 10 } - } - }, - range: [0, 10], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 10 } - } - }, - property: { - type: 'Identifier', - name: 'Indonesia', - range: [11, 20], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 20 } - } - }, - range: [0, 20], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 20 } - } - }, - property: { - type: 'Identifier', - name: 'prepareForElection', - range: [21, 39], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 39 } - } - }, - range: [0, 39], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 39 } - } - }, - 'arguments': [{ - type: 'Literal', - value: 2014, - raw: '2014', - range: [40, 44], - loc: { - start: { line: 1, column: 40 }, - end: { line: 1, column: 44 } - } - }], - range: [0, 45], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 45 } - } - }, - range: [0, 45], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 45 } - } - }, - - 'universe.if': { - type: 'ExpressionStatement', - expression: { - type: 'MemberExpression', - computed: false, - object: { - type: 'Identifier', - name: 'universe', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - property: { - type: 'Identifier', - name: 'if', - range: [9, 11], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - - 'universe.true': { - type: 'ExpressionStatement', - expression: { - type: 'MemberExpression', - computed: false, - object: { - type: 'Identifier', - name: 'universe', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - property: { - type: 'Identifier', - name: 'true', - range: [9, 13], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - - 'universe.false': { - type: 'ExpressionStatement', - expression: { - type: 'MemberExpression', - computed: false, - object: { - type: 'Identifier', - name: 'universe', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - property: { - type: 'Identifier', - name: 'false', - range: [9, 14], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - - 'universe.null': { - type: 'ExpressionStatement', - expression: { - type: 'MemberExpression', - computed: false, - object: { - type: 'Identifier', - name: 'universe', - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - property: { - type: 'Identifier', - name: 'null', - range: [9, 13], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - } - - }, - - 'Postfix Expressions': { - - 'x++': { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - prefix: false, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - - 'x--': { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '--', - argument: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - prefix: false, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - - 'eval++': { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'eval', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - prefix: false, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'eval--': { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '--', - argument: { - type: 'Identifier', - name: 'eval', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - prefix: false, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'arguments++': { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'arguments', - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - prefix: false, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - - 'arguments--': { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '--', - argument: { - type: 'Identifier', - name: 'arguments', - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - prefix: false, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - } - - }, - - 'Unary Operators': { - - '++x': { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'x', - range: [2, 3], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 3 } - } - }, - prefix: true, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - - '--x': { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '--', - argument: { - type: 'Identifier', - name: 'x', - range: [2, 3], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 3 } - } - }, - prefix: true, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - - '++eval': { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'eval', - range: [2, 6], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 6 } - } - }, - prefix: true, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - '--eval': { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '--', - argument: { - type: 'Identifier', - name: 'eval', - range: [2, 6], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 6 } - } - }, - prefix: true, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - '++arguments': { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'arguments', - range: [2, 11], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 11 } - } - }, - prefix: true, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - - '--arguments': { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '--', - argument: { - type: 'Identifier', - name: 'arguments', - range: [2, 11], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 11 } - } - }, - prefix: true, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - - '+x': { - type: 'ExpressionStatement', - expression: { - type: 'UnaryExpression', - operator: '+', - argument: { - type: 'Identifier', - name: 'x', - range: [1, 2], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 2 } - } - }, - prefix: true, - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - - '-x': { - type: 'ExpressionStatement', - expression: { - type: 'UnaryExpression', - operator: '-', - argument: { - type: 'Identifier', - name: 'x', - range: [1, 2], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 2 } - } - }, - prefix: true, - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - - '~x': { - type: 'ExpressionStatement', - expression: { - type: 'UnaryExpression', - operator: '~', - argument: { - type: 'Identifier', - name: 'x', - range: [1, 2], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 2 } - } - }, - prefix: true, - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - - '!x': { - type: 'ExpressionStatement', - expression: { - type: 'UnaryExpression', - operator: '!', - argument: { - type: 'Identifier', - name: 'x', - range: [1, 2], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 2 } - } - }, - prefix: true, - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - }, - - 'void x': { - type: 'ExpressionStatement', - expression: { - type: 'UnaryExpression', - operator: 'void', - argument: { - type: 'Identifier', - name: 'x', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - prefix: true, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'delete x': { - type: 'ExpressionStatement', - expression: { - type: 'UnaryExpression', - operator: 'delete', - argument: { - type: 'Identifier', - name: 'x', - range: [7, 8], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 8 } - } - }, - prefix: true, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - - 'typeof x': { - type: 'ExpressionStatement', - expression: { - type: 'UnaryExpression', - operator: 'typeof', - argument: { - type: 'Identifier', - name: 'x', - range: [7, 8], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 8 } - } - }, - prefix: true, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - } - - }, - - 'Multiplicative Operators': { - - 'x * y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '*', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - 'x / y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '/', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - 'x % y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '%', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - } - - }, - - 'Additive Operators': { - - 'x + y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '+', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - 'x - y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '-', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - } - - }, - - 'Bitwise Shift Operator': { - - 'x << y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '<<', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'x >> y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '>>', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'x >>> y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '>>>', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - } - - }, - - 'Relational Operators': { - - 'x < y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '<', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - 'x > y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '>', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - 'x <= y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '<=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'x >= y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '>=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'x in y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: 'in', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'x instanceof y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: 'instanceof', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [13, 14], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - - 'x < y < z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '<', - left: { - type: 'BinaryExpression', - operator: '<', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - } - - }, - - 'Equality Operators': { - - 'x == y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '==', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'x != y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '!=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'x === y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '===', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - 'x !== y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '!==', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - } - - }, - - 'Binary Bitwise Operators': { - - 'x & y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '&', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - 'x ^ y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '^', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - 'x | y': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '|', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - } - - }, - - 'Binary Expressions': { - - 'x + y + z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '+', - left: { - type: 'BinaryExpression', - operator: '+', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x - y + z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '+', - left: { - type: 'BinaryExpression', - operator: '-', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x + y - z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '-', - left: { - type: 'BinaryExpression', - operator: '+', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x - y - z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '-', - left: { - type: 'BinaryExpression', - operator: '-', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x + y * z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '+', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'BinaryExpression', - operator: '*', - left: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [4, 9], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x + y / z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '+', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'BinaryExpression', - operator: '/', - left: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [4, 9], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x - y % z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '-', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'BinaryExpression', - operator: '%', - left: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [4, 9], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x * y * z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '*', - left: { - type: 'BinaryExpression', - operator: '*', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x * y / z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '/', - left: { - type: 'BinaryExpression', - operator: '*', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x * y % z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '%', - left: { - type: 'BinaryExpression', - operator: '*', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x % y * z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '*', - left: { - type: 'BinaryExpression', - operator: '%', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x << y << z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '<<', - left: { - type: 'BinaryExpression', - operator: '<<', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [10, 11], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - - 'x | y | z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '|', - left: { - type: 'BinaryExpression', - operator: '|', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x & y & z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '&', - left: { - type: 'BinaryExpression', - operator: '&', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x ^ y ^ z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '^', - left: { - type: 'BinaryExpression', - operator: '^', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x & y | z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '|', - left: { - type: 'BinaryExpression', - operator: '&', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x | y ^ z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '|', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'BinaryExpression', - operator: '^', - left: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [4, 9], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x | y & z': { - type: 'ExpressionStatement', - expression: { - type: 'BinaryExpression', - operator: '|', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'BinaryExpression', - operator: '&', - left: { - type: 'Identifier', - name: 'y', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [4, 9], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - } - - }, - - 'Binary Logical Operators': { - - 'x || y': { - type: 'ExpressionStatement', - expression: { - type: 'LogicalExpression', - operator: '||', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'x && y': { - type: 'ExpressionStatement', - expression: { - type: 'LogicalExpression', - operator: '&&', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'x || y || z': { - type: 'ExpressionStatement', - expression: { - type: 'LogicalExpression', - operator: '||', - left: { - type: 'LogicalExpression', - operator: '||', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [10, 11], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - - 'x && y && z': { - type: 'ExpressionStatement', - expression: { - type: 'LogicalExpression', - operator: '&&', - left: { - type: 'LogicalExpression', - operator: '&&', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [10, 11], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - - 'x || y && z': { - type: 'ExpressionStatement', - expression: { - type: 'LogicalExpression', - operator: '||', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'LogicalExpression', - operator: '&&', - left: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [10, 11], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 11 } - } - }, - range: [5, 11], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - - 'x || y ^ z': { - type: 'ExpressionStatement', - expression: { - type: 'LogicalExpression', - operator: '||', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'BinaryExpression', - operator: '^', - left: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - right: { - type: 'Identifier', - name: 'z', - range: [9, 10], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 10 } - } - }, - range: [5, 10], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 10 } - } - }, - range: [0, 10], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 10 } - } - }, - range: [0, 10], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 10 } - } - } - - }, - - 'Conditional Operator': { - - 'y ? 1 : 2': { - type: 'ExpressionStatement', - expression: { - type: 'ConditionalExpression', - test: { - type: 'Identifier', - name: 'y', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - consequent: { - type: 'Literal', - value: 1, - raw: '1', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - alternate: { - type: 'Literal', - value: 2, - raw: '2', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x && y ? 1 : 2': { - type: 'ExpressionStatement', - expression: { - type: 'ConditionalExpression', - test: { - type: 'LogicalExpression', - operator: '&&', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - consequent: { - type: 'Literal', - value: 1, - raw: '1', - range: [9, 10], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 10 } - } - }, - alternate: { - type: 'Literal', - value: 2, - raw: '2', - range: [13, 14], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - } - - }, - - 'Assignment Operators': { - - 'x = 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [4, 6], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'eval = 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'eval', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [7, 9], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'arguments = 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'arguments', - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [12, 14], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - - 'x *= 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '*=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - 'x /= 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '/=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - 'x %= 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '%=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - 'x += 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '+=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - 'x -= 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '-=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - 'x <<= 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '<<=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [6, 8], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 8 } - } - }, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - - 'x >>= 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '>>=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [6, 8], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 8 } - } - }, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - - 'x >>>= 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '>>>=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [7, 9], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'x &= 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '&=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - 'x ^= 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '^=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - 'x |= 42': { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '|=', - left: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [5, 7], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - } - - }, - - 'Block': { - - '{ foo }': { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'foo', - range: [2, 5], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 5 } - } - }, - range: [2, 6], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 6 } - } - }], - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - '{ doThis(); doThat(); }': { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'doThis', - range: [2, 8], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 8 } - } - }, - 'arguments': [], - range: [2, 10], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 10 } - } - }, - range: [2, 11], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 11 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'doThat', - range: [12, 18], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 18 } - } - }, - 'arguments': [], - range: [12, 20], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 20 } - } - }, - range: [12, 21], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 21 } - } - }], - range: [0, 23], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 23 } - } - }, - - '{}': { - type: 'BlockStatement', - body: [], - range: [0, 2], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 2 } - } - } - - }, - - 'Variable Statement': { - - 'var x': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: null, - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }], - kind: 'var', - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - 'var x, y;': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: null, - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'y', - range: [7, 8], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 8 } - } - }, - init: null, - range: [7, 8], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 8 } - } - }], - kind: 'var', - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'var x = 42': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: { - type: 'Literal', - value: 42, - raw: '42', - range: [8, 10], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 10 } - } - }, - range: [4, 10], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 10 } - } - }], - kind: 'var', - range: [0, 10], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 10 } - } - }, - - 'var eval = 42, arguments = 42': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'eval', - range: [4, 8], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 8 } - } - }, - init: { - type: 'Literal', - value: 42, - raw: '42', - range: [11, 13], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 13 } - } - }, - range: [4, 13], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 13 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'arguments', - range: [15, 24], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 24 } - } - }, - init: { - type: 'Literal', - value: 42, - raw: '42', - range: [27, 29], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 29 } - } - }, - range: [15, 29], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 29 } - } - }], - kind: 'var', - range: [0, 29], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 29 } - } - }, - - 'var x = 14, y = 3, z = 1977': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: { - type: 'Literal', - value: 14, - raw: '14', - range: [8, 10], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 10 } - } - }, - range: [4, 10], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 10 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'y', - range: [12, 13], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 13 } - } - }, - init: { - type: 'Literal', - value: 3, - raw: '3', - range: [16, 17], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 17 } - } - }, - range: [12, 17], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 17 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'z', - range: [19, 20], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 20 } - } - }, - init: { - type: 'Literal', - value: 1977, - raw: '1977', - range: [23, 27], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 27 } - } - }, - range: [19, 27], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 27 } - } - }], - kind: 'var', - range: [0, 27], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 27 } - } - }, - - 'var implements, interface, package': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'implements', - range: [4, 14], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 14 } - } - }, - init: null, - range: [4, 14], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 14 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'interface', - range: [16, 25], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 25 } - } - }, - init: null, - range: [16, 25], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 25 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'package', - range: [27, 34], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 34 } - } - }, - init: null, - range: [27, 34], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 34 } - } - }], - kind: 'var', - range: [0, 34], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 34 } - } - }, - - 'var private, protected, public, static': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'private', - range: [4, 11], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 11 } - } - }, - init: null, - range: [4, 11], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 11 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'protected', - range: [13, 22], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 22 } - } - }, - init: null, - range: [13, 22], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 22 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'public', - range: [24, 30], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 30 } - } - }, - init: null, - range: [24, 30], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 30 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'static', - range: [32, 38], - loc: { - start: { line: 1, column: 32 }, - end: { line: 1, column: 38 } - } - }, - init: null, - range: [32, 38], - loc: { - start: { line: 1, column: 32 }, - end: { line: 1, column: 38 } - } - }], - kind: 'var', - range: [0, 38], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 38 } - } - } - - }, - - 'Let Statement': { - - 'let x': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: null, - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }], - kind: 'let', - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - - '{ let x }': { - type: 'BlockStatement', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - init: null, - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }], - kind: 'let', - range: [2, 8], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 8 } - } - }], - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - '{ let x = 42 }': { - type: 'BlockStatement', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - init: { - type: 'Literal', - value: 42, - raw: '42', - range: [10, 12], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 12 } - } - }, - range: [6, 12], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 12 } - } - }], - kind: 'let', - range: [2, 13], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 13 } - } - }], - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - }, - - '{ let x = 14, y = 3, z = 1977 }': { - type: 'BlockStatement', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - init: { - type: 'Literal', - value: 14, - raw: '14', - range: [10, 12], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 12 } - } - }, - range: [6, 12], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 12 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'y', - range: [14, 15], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 15 } - } - }, - init: { - type: 'Literal', - value: 3, - raw: '3', - range: [18, 19], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 19 } - } - }, - range: [14, 19], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 19 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'z', - range: [21, 22], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 22 } - } - }, - init: { - type: 'Literal', - value: 1977, - raw: '1977', - range: [25, 29], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 29 } - } - }, - range: [21, 29], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 29 } - } - }], - kind: 'let', - range: [2, 30], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 30 } - } - }], - range: [0, 31], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 31 } - } - } - - }, - - 'Const Statement': { - - 'const x = 42': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - init: { - type: 'Literal', - value: 42, - raw: '42', - range: [10, 12], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 12 } - } - }, - range: [6, 12], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 12 } - } - }], - kind: 'const', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - - '{ const x = 42 }': { - type: 'BlockStatement', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - init: { - type: 'Literal', - value: 42, - raw: '42', - range: [12, 14], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 14 } - } - }, - range: [8, 14], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 14 } - } - }], - kind: 'const', - range: [2, 15], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 15 } - } - }], - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - - '{ const x = 14, y = 3, z = 1977 }': { - type: 'BlockStatement', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - init: { - type: 'Literal', - value: 14, - raw: '14', - range: [12, 14], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 14 } - } - }, - range: [8, 14], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 14 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'y', - range: [16, 17], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 17 } - } - }, - init: { - type: 'Literal', - value: 3, - raw: '3', - range: [20, 21], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 21 } - } - }, - range: [16, 21], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 21 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'z', - range: [23, 24], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 24 } - } - }, - init: { - type: 'Literal', - value: 1977, - raw: '1977', - range: [27, 31], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 31 } - } - }, - range: [23, 31], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 31 } - } - }], - kind: 'const', - range: [2, 32], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 32 } - } - }], - range: [0, 33], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 33 } - } - } - - }, - - 'Empty Statement': { - - ';': { - type: 'EmptyStatement', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - } - - }, - - 'Expression Statement': { - - 'x': { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - - 'x, y': { - type: 'ExpressionStatement', - expression: { - type: 'SequenceExpression', - expressions: [{ - type: 'Identifier', - name: 'x', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, { - type: 'Identifier', - name: 'y', - range: [3, 4], - loc: { - start: { line: 1, column: 3 }, - end: { line: 1, column: 4 } - } - }], - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - - '\\u0061': { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'a', - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }, - - 'a\\u0061': { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'aa', - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 7], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 7 } - } - }, - - '\\ua': { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'ua', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - - 'a\\u': { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'au', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - } - - }, - - 'If Statement': { - - 'if (morning) goodMorning()': { - type: 'IfStatement', - test: { - type: 'Identifier', - name: 'morning', - range: [4, 11], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 11 } - } - }, - consequent: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'goodMorning', - range: [13, 24], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 24 } - } - }, - 'arguments': [], - range: [13, 26], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 26 } - } - }, - range: [13, 26], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 26 } - } - }, - alternate: null, - range: [0, 26], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 26 } - } - }, - - 'if (morning) (function(){})': { - type: 'IfStatement', - test: { - type: 'Identifier', - name: 'morning', - range: [4, 11], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 11 } - } - }, - consequent: { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [24, 26], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 26 } - } - }, - rest: null, - generator: false, - expression: false, - range: [14, 26], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 26 } - } - }, - range: [13, 27], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 27 } - } - }, - alternate: null, - range: [0, 27], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 27 } - } - }, - - 'if (morning) var x = 0;': { - type: 'IfStatement', - test: { - type: 'Identifier', - name: 'morning', - range: [4, 11], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 11 } - } - }, - consequent: { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [17, 18], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 18 } - } - }, - init: { - type: 'Literal', - value: 0, - raw: '0', - range: [21, 22], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 22 } - } - }, - range: [17, 22], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 22 } - } - }], - kind: 'var', - range: [13, 23], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 23 } - } - }, - alternate: null, - range: [0, 23], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 23 } - } - }, - - 'if (morning) function a(){}': { - type: 'IfStatement', - test: { - type: 'Identifier', - name: 'morning', - range: [4, 11], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 11 } - } - }, - consequent: { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'a', - range: [22, 23], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 23 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [25, 27], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 27 } - } - }, - rest: null, - generator: false, - expression: false, - range: [13, 27], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 27 } - } - }, - alternate: null, - range: [0, 27], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 27 } - } - }, - - 'if (morning) goodMorning(); else goodDay()': { - type: 'IfStatement', - test: { - type: 'Identifier', - name: 'morning', - range: [4, 11], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 11 } - } - }, - consequent: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'goodMorning', - range: [13, 24], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 24 } - } - }, - 'arguments': [], - range: [13, 26], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 26 } - } - }, - range: [13, 27], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 27 } - } - }, - alternate: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'goodDay', - range: [33, 40], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 40 } - } - }, - 'arguments': [], - range: [33, 42], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 42 } - } - }, - range: [33, 42], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 42 } - } - }, - range: [0, 42], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 42 } - } - } - - }, - - 'Iteration Statements': { - - 'do keep(); while (true)': { - type: 'DoWhileStatement', - body: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'keep', - range: [3, 7], - loc: { - start: { line: 1, column: 3 }, - end: { line: 1, column: 7 } - } - }, - 'arguments': [], - range: [3, 9], - loc: { - start: { line: 1, column: 3 }, - end: { line: 1, column: 9 } - } - }, - range: [3, 10], - loc: { - start: { line: 1, column: 3 }, - end: { line: 1, column: 10 } - } - }, - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [18, 22], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 22 } - } - }, - range: [0, 23], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 23 } - } - }, - - 'do keep(); while (true);': { - type: 'DoWhileStatement', - body: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'keep', - range: [3, 7], - loc: { - start: { line: 1, column: 3 }, - end: { line: 1, column: 7 } - } - }, - 'arguments': [], - range: [3, 9], - loc: { - start: { line: 1, column: 3 }, - end: { line: 1, column: 9 } - } - }, - range: [3, 10], - loc: { - start: { line: 1, column: 3 }, - end: { line: 1, column: 10 } - } - }, - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [18, 22], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 22 } - } - }, - range: [0, 24], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 24 } - } - }, - - 'do { x++; y--; } while (x < 10)': { - type: 'DoWhileStatement', - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'x', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - prefix: false, - range: [5, 8], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 8 } - } - }, - range: [5, 9], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 9 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '--', - argument: { - type: 'Identifier', - name: 'y', - range: [10, 11], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 11 } - } - }, - prefix: false, - range: [10, 13], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 13 } - } - }, - range: [10, 14], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 14 } - } - }], - range: [3, 16], - loc: { - start: { line: 1, column: 3 }, - end: { line: 1, column: 16 } - } - }, - test: { - type: 'BinaryExpression', - operator: '<', - left: { - type: 'Identifier', - name: 'x', - range: [24, 25], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 25 } - } - }, - right: { - type: 'Literal', - value: 10, - raw: '10', - range: [28, 30], - loc: { - start: { line: 1, column: 28 }, - end: { line: 1, column: 30 } - } - }, - range: [24, 30], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 30 } - } - }, - range: [0, 31], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 31 } - } - }, - - '{ do { } while (false) false }': { - type: 'BlockStatement', - body: [{ - type: 'DoWhileStatement', - body: { - type: 'BlockStatement', - body: [], - range: [5, 8], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 8 } - } - }, - test: { - type: 'Literal', - value: false, - raw: 'false', - range: [16, 21], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 21 } - } - }, - range: [2, 22], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 22 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: false, - raw: 'false', - range: [23, 28], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 28 } - } - }, - range: [23, 29], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 29 } - } - }], - range: [0, 30], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 30 } - } - }, - - 'while (true) doSomething()': { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [7, 11], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 11 } - } - }, - body: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'doSomething', - range: [13, 24], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 24 } - } - }, - 'arguments': [], - range: [13, 26], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 26 } - } - }, - range: [13, 26], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 26 } - } - }, - range: [0, 26], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 26 } - } - }, - - 'while (x < 10) { x++; y--; }': { - type: 'WhileStatement', - test: { - type: 'BinaryExpression', - operator: '<', - left: { - type: 'Identifier', - name: 'x', - range: [7, 8], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 8 } - } - }, - right: { - type: 'Literal', - value: 10, - raw: '10', - range: [11, 13], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 13 } - } - }, - range: [7, 13], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 13 } - } - }, - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'x', - range: [17, 18], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 18 } - } - }, - prefix: false, - range: [17, 20], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 20 } - } - }, - range: [17, 21], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 21 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '--', - argument: { - type: 'Identifier', - name: 'y', - range: [22, 23], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 23 } - } - }, - prefix: false, - range: [22, 25], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 25 } - } - }, - range: [22, 26], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 26 } - } - }], - range: [15, 28], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 28 } - } - }, - range: [0, 28], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 28 } - } - }, - - 'for(;;);': { - type: 'ForStatement', - init: null, - test: null, - update: null, - body: { - type: 'EmptyStatement', - range: [7, 8], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 8 } - } - }, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - - 'for(;;){}': { - type: 'ForStatement', - init: null, - test: null, - update: null, - body: { - type: 'BlockStatement', - body: [], - range: [7, 9], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 9 } - } - }, - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - }, - - 'for(x = 0;;);': { - type: 'ForStatement', - init: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Literal', - value: 0, - raw: '0', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [4, 9], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 9 } - } - }, - test: null, - update: null, - body: { - type: 'EmptyStatement', - range: [12, 13], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - - 'for(var x = 0;;);': { - type: 'ForStatement', - init: { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - init: { - type: 'Literal', - value: 0, - raw: '0', - range: [12, 13], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 13 } - } - }, - range: [8, 13], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 13 } - } - }], - kind: 'var', - range: [4, 13], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 13 } - } - }, - test: null, - update: null, - body: { - type: 'EmptyStatement', - range: [16, 17], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 17 } - } - }, - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }, - - 'for(let x = 0;;);': { - type: 'ForStatement', - init: { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - init: { - type: 'Literal', - value: 0, - raw: '0', - range: [12, 13], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 13 } - } - }, - range: [8, 13], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 13 } - } - }], - kind: 'let', - range: [4, 13], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 13 } - } - }, - test: null, - update: null, - body: { - type: 'EmptyStatement', - range: [16, 17], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 17 } - } - }, - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }, - - 'for(var x = 0, y = 1;;);': { - type: 'ForStatement', - init: { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - init: { - type: 'Literal', - value: 0, - raw: '0', - range: [12, 13], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 13 } - } - }, - range: [8, 13], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 13 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'y', - range: [15, 16], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 16 } - } - }, - init: { - type: 'Literal', - value: 1, - raw: '1', - range: [19, 20], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 20 } - } - }, - range: [15, 20], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 20 } - } - }], - kind: 'var', - range: [4, 20], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 20 } - } - }, - test: null, - update: null, - body: { - type: 'EmptyStatement', - range: [23, 24], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 24 } - } - }, - range: [0, 24], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 24 } - } - }, - - 'for(x = 0; x < 42;);': { - type: 'ForStatement', - init: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Literal', - value: 0, - raw: '0', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [4, 9], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 9 } - } - }, - test: { - type: 'BinaryExpression', - operator: '<', - left: { - type: 'Identifier', - name: 'x', - range: [11, 12], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 12 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [15, 17], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 17 } - } - }, - range: [11, 17], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 17 } - } - }, - update: null, - body: { - type: 'EmptyStatement', - range: [19, 20], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 20 } - } - }, - range: [0, 20], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 20 } - } - }, - - 'for(x = 0; x < 42; x++);': { - type: 'ForStatement', - init: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Literal', - value: 0, - raw: '0', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [4, 9], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 9 } - } - }, - test: { - type: 'BinaryExpression', - operator: '<', - left: { - type: 'Identifier', - name: 'x', - range: [11, 12], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 12 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [15, 17], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 17 } - } - }, - range: [11, 17], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 17 } - } - }, - update: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'x', - range: [19, 20], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 20 } - } - }, - prefix: false, - range: [19, 22], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 22 } - } - }, - body: { - type: 'EmptyStatement', - range: [23, 24], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 24 } - } - }, - range: [0, 24], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 24 } - } - }, - - 'for(x = 0; x < 42; x++) process(x);': { - type: 'ForStatement', - init: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Literal', - value: 0, - raw: '0', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - range: [4, 9], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 9 } - } - }, - test: { - type: 'BinaryExpression', - operator: '<', - left: { - type: 'Identifier', - name: 'x', - range: [11, 12], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 12 } - } - }, - right: { - type: 'Literal', - value: 42, - raw: '42', - range: [15, 17], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 17 } - } - }, - range: [11, 17], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 17 } - } - }, - update: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'x', - range: [19, 20], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 20 } - } - }, - prefix: false, - range: [19, 22], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 22 } - } - }, - body: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'process', - range: [24, 31], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 31 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'x', - range: [32, 33], - loc: { - start: { line: 1, column: 32 }, - end: { line: 1, column: 33 } - } - }], - range: [24, 34], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 34 } - } - }, - range: [24, 35], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 35 } - } - }, - range: [0, 35], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 35 } - } - }, - - 'for(x in list) process(x);': { - type: 'ForInStatement', - left: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - right: { - type: 'Identifier', - name: 'list', - range: [9, 13], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 13 } - } - }, - body: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'process', - range: [15, 22], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 22 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'x', - range: [23, 24], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 24 } - } - }], - range: [15, 25], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 25 } - } - }, - range: [15, 26], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 26 } - } - }, - each: false, - range: [0, 26], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 26 } - } - }, - - 'for (var x in list) process(x);': { - type: 'ForInStatement', - left: { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [9, 10], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 10 } - } - }, - init: null, - range: [9, 10], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 10 } - } - }], - kind: 'var', - range: [5, 10], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 10 } - } - }, - right: { - type: 'Identifier', - name: 'list', - range: [14, 18], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 18 } - } - }, - body: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'process', - range: [20, 27], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 27 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'x', - range: [28, 29], - loc: { - start: { line: 1, column: 28 }, - end: { line: 1, column: 29 } - } - }], - range: [20, 30], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 30 } - } - }, - range: [20, 31], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 31 } - } - }, - each: false, - range: [0, 31], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 31 } - } - }, - - 'for (var x = 42 in list) process(x);': { - type: 'ForInStatement', - left: { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [9, 10], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 10 } - } - }, - init: { - type: 'Literal', - value: 42, - raw: '42', - range: [13, 15], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 15 } - } - }, - range: [9, 15], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 15 } - } - }], - kind: 'var', - range: [5, 15], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 15 } - } - }, - right: { - type: 'Identifier', - name: 'list', - range: [19, 23], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 23 } - } - }, - body: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'process', - range: [25, 32], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 32 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'x', - range: [33, 34], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 34 } - } - }], - range: [25, 35], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 35 } - } - }, - range: [25, 36], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 36 } - } - }, - each: false, - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 36 } - } - }, - - 'for (let x in list) process(x);': { - type: 'ForInStatement', - left: { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [9, 10], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 10 } - } - }, - init: null, - range: [9, 10], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 10 } - } - }], - kind: 'let', - range: [5, 10], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 10 } - } - }, - right: { - type: 'Identifier', - name: 'list', - range: [14, 18], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 18 } - } - }, - body: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'process', - range: [20, 27], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 27 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'x', - range: [28, 29], - loc: { - start: { line: 1, column: 28 }, - end: { line: 1, column: 29 } - } - }], - range: [20, 30], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 30 } - } - }, - range: [20, 31], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 31 } - } - }, - each: false, - range: [0, 31], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 31 } - } - }, - - 'for (let x = 42 in list) process(x);': { - type: 'ForInStatement', - left: { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [9, 10], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 10 } - } - }, - init: { - type: 'Literal', - value: 42, - raw: '42', - range: [13, 15], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 15 } - } - }, - range: [9, 15], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 15 } - } - }], - kind: 'let', - range: [5, 15], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 15 } - } - }, - right: { - type: 'Identifier', - name: 'list', - range: [19, 23], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 23 } - } - }, - body: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'process', - range: [25, 32], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 32 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'x', - range: [33, 34], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 34 } - } - }], - range: [25, 35], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 35 } - } - }, - range: [25, 36], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 36 } - } - }, - each: false, - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 36 } - } - }, - - 'for (var i = function() { return 10 in [] } in list) process(x);': { - type: 'ForInStatement', - left: { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'i', - range: [9, 10], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 10 } - } - }, - init: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ReturnStatement', - argument: { - type: 'BinaryExpression', - operator: 'in', - left: { - type: 'Literal', - value: 10, - raw: '10', - range: [33, 35], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 35 } - } - }, - right: { - type: 'ArrayExpression', - elements: [], - range: [39, 41], - loc: { - start: { line: 1, column: 39 }, - end: { line: 1, column: 41 } - } - }, - range: [33, 41], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 41 } - } - }, - range: [26, 42], - loc: { - start: { line: 1, column: 26 }, - end: { line: 1, column: 42 } - } - }], - range: [24, 43], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 43 } - } - }, - rest: null, - generator: false, - expression: false, - range: [13, 43], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 43 } - } - }, - range: [9, 43], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 43 } - } - }], - kind: 'var', - range: [5, 43], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 43 } - } - }, - right: { - type: 'Identifier', - name: 'list', - range: [47, 51], - loc: { - start: { line: 1, column: 47 }, - end: { line: 1, column: 51 } - } - }, - body: { - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'process', - range: [53, 60], - loc: { - start: { line: 1, column: 53 }, - end: { line: 1, column: 60 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'x', - range: [61, 62], - loc: { - start: { line: 1, column: 61 }, - end: { line: 1, column: 62 } - } - }], - range: [53, 63], - loc: { - start: { line: 1, column: 53 }, - end: { line: 1, column: 63 } - } - }, - range: [53, 64], - loc: { - start: { line: 1, column: 53 }, - end: { line: 1, column: 64 } - } - }, - each: false, - range: [0, 64], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 64 } - } - } - - }, - - 'continue statement': { - - 'while (true) { continue; }': { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [7, 11], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 11 } - } - }, - body: { - type: 'BlockStatement', - body: [ - { - type: 'ContinueStatement', - label: null, - range: [15, 24], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 24 } - } - } - ], - range: [13, 26], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 26 } - } - }, - range: [0, 26], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 26 } - } - }, - - 'while (true) { continue }': { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [7, 11], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 11 } - } - }, - body: { - type: 'BlockStatement', - body: [ - { - type: 'ContinueStatement', - label: null, - range: [15, 24], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 24 } - } - } - ], - range: [13, 25], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 25 } - } - }, - range: [0, 25], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 25 } - } - }, - - 'done: while (true) { continue done }': { - type: 'LabeledStatement', - label: { - type: 'Identifier', - name: 'done', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - body: { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [13, 17], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 17 } - } - }, - body: { - type: 'BlockStatement', - body: [ - { - type: 'ContinueStatement', - label: { - type: 'Identifier', - name: 'done', - range: [30, 34], - loc: { - start: { line: 1, column: 30 }, - end: { line: 1, column: 34 } - } - }, - range: [21, 35], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 35 } - } - } - ], - range: [19, 36], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 36 } - } - }, - range: [6, 36], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 36 } - } - }, - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 36 } - } - }, - - 'done: while (true) { continue done; }': { - type: 'LabeledStatement', - label: { - type: 'Identifier', - name: 'done', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - body: { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [13, 17], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 17 } - } - }, - body: { - type: 'BlockStatement', - body: [ - { - type: 'ContinueStatement', - label: { - type: 'Identifier', - name: 'done', - range: [30, 34], - loc: { - start: { line: 1, column: 30 }, - end: { line: 1, column: 34 } - } - }, - range: [21, 35], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 35 } - } - } - ], - range: [19, 37], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 37 } - } - }, - range: [6, 37], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 37 } - } - }, - range: [0, 37], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 37 } - } - } - - }, - - 'break statement': { - - 'while (true) { break }': { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [7, 11], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 11 } - } - }, - body: { - type: 'BlockStatement', - body: [ - { - type: 'BreakStatement', - label: null, - range: [15, 21], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 21 } - } - } - ], - range: [13, 22], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 22 } - } - }, - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 22 } - } - }, - - 'done: while (true) { break done }': { - type: 'LabeledStatement', - label: { - type: 'Identifier', - name: 'done', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - body: { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [13, 17], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 17 } - } - }, - body: { - type: 'BlockStatement', - body: [ - { - type: 'BreakStatement', - label: { - type: 'Identifier', - name: 'done', - range: [27, 31], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 31 } - } - }, - range: [21, 32], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 32 } - } - } - ], - range: [19, 33], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 33 } - } - }, - range: [6, 33], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 33 } - } - }, - range: [0, 33], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 33 } - } - }, - - 'done: while (true) { break done; }': { - type: 'LabeledStatement', - label: { - type: 'Identifier', - name: 'done', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - body: { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [13, 17], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 17 } - } - }, - body: { - type: 'BlockStatement', - body: [ - { - type: 'BreakStatement', - label: { - type: 'Identifier', - name: 'done', - range: [27, 31], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 31 } - } - }, - range: [21, 32], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 32 } - } - } - ], - range: [19, 34], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 34 } - } - }, - range: [6, 34], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 34 } - } - }, - range: [0, 34], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 34 } - } - } - - }, - - 'return statement': { - - '(function(){ return })': { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [ - { - type: 'ReturnStatement', - argument: null, - range: [13, 20], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 20 } - } - } - ], - range: [11, 21], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 21 } - } - }, - rest: null, - generator: false, - expression: false, - range: [1, 21], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 21 } - } - }, - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 22 } - } - }, - - '(function(){ return; })': { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [ - { - type: 'ReturnStatement', - argument: null, - range: [13, 20], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 20 } - } - } - ], - range: [11, 22], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 22 } - } - }, - rest: null, - generator: false, - expression: false, - range: [1, 22], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 22 } - } - }, - range: [0, 23], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 23 } - } - }, - - '(function(){ return x; })': { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [ - { - type: 'ReturnStatement', - argument: { - type: 'Identifier', - name: 'x', - range: [20, 21], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 21 } - } - }, - range: [13, 22], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 22 } - } - } - ], - range: [11, 24], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 24 } - } - }, - rest: null, - generator: false, - expression: false, - range: [1, 24], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 24 } - } - }, - range: [0, 25], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 25 } - } - }, - - '(function(){ return x * y })': { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [ - { - type: 'ReturnStatement', - argument: { - type: 'BinaryExpression', - operator: '*', - left: { - type: 'Identifier', - name: 'x', - range: [20, 21], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 21 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [24, 25], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 25 } - } - }, - range: [20, 25], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 25 } - } - }, - range: [13, 26], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 26 } - } - } - ], - range: [11, 27], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 27 } - } - }, - rest: null, - generator: false, - expression: false, - range: [1, 27], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 27 } - } - }, - range: [0, 28], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 28 } - } - } - }, - - 'with statement': { - - 'with (x) foo = bar': { - type: 'WithStatement', - object: { - type: 'Identifier', - name: 'x', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - body: { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'foo', - range: [9, 12], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 12 } - } - }, - right: { - type: 'Identifier', - name: 'bar', - range: [15, 18], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 18 } - } - }, - range: [9, 18], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 18 } - } - }, - range: [9, 18], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 18 } - } - }, - range: [0, 18], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 18 } - } - }, - - 'with (x) foo = bar;': { - type: 'WithStatement', - object: { - type: 'Identifier', - name: 'x', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - body: { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'foo', - range: [9, 12], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 12 } - } - }, - right: { - type: 'Identifier', - name: 'bar', - range: [15, 18], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 18 } - } - }, - range: [9, 18], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 18 } - } - }, - range: [9, 19], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 19 } - } - }, - range: [0, 19], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 19 } - } - }, - - 'with (x) { foo = bar }': { - type: 'WithStatement', - object: { - type: 'Identifier', - name: 'x', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'foo', - range: [11, 14], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 14 } - } - }, - right: { - type: 'Identifier', - name: 'bar', - range: [17, 20], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 20 } - } - }, - range: [11, 20], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 20 } - } - }, - range: [11, 21], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 21 } - } - }], - range: [9, 22], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 22 } - } - }, - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 22 } - } - } - - }, - - 'switch statement': { - - 'switch (x) {}': { - type: 'SwitchStatement', - discriminant: { - type: 'Identifier', - name: 'x', - range: [8, 9], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 9 } - } - }, - cases:[], - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, - - 'switch (answer) { case 42: hi(); break; }': { - type: 'SwitchStatement', - discriminant: { - type: 'Identifier', - name: 'answer', - range: [8, 14], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 14 } - } - }, - cases: [{ - type: 'SwitchCase', - test: { - type: 'Literal', - value: 42, - raw: '42', - range: [23, 25], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 25 } - } - }, - consequent: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'hi', - range: [27, 29], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 29 } - } - }, - 'arguments': [], - range: [27, 31], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 31 } - } - }, - range: [27, 32], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 32 } - } - }, { - type: 'BreakStatement', - label: null, - range: [33, 39], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 39 } - } - }], - range: [18, 39], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 39 } - } - }], - range: [0, 41], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 41 } - } - }, - - 'switch (answer) { case 42: hi(); break; default: break }': { - type: 'SwitchStatement', - discriminant: { - type: 'Identifier', - name: 'answer', - range: [8, 14], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 14 } - } - }, - cases: [{ - type: 'SwitchCase', - test: { - type: 'Literal', - value: 42, - raw: '42', - range: [23, 25], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 25 } - } - }, - consequent: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'hi', - range: [27, 29], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 29 } - } - }, - 'arguments': [], - range: [27, 31], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 31 } - } - }, - range: [27, 32], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 32 } - } - }, { - type: 'BreakStatement', - label: null, - range: [33, 39], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 39 } - } - }], - range: [18, 39], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 39 } - } - }, { - type: 'SwitchCase', - test: null, - consequent: [{ - type: 'BreakStatement', - label: null, - range: [49, 55], - loc: { - start: { line: 1, column: 49 }, - end: { line: 1, column: 55 } - } - }], - range: [40, 55], - loc: { - start: { line: 1, column: 40 }, - end: { line: 1, column: 55 } - } - }], - range: [0, 56], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 56 } - } - } - - }, - - 'Labelled Statements': { - - 'start: for (;;) break start': { - type: 'LabeledStatement', - label: { - type: 'Identifier', - name: 'start', - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - body: { - type: 'ForStatement', - init: null, - test: null, - update: null, - body: { - type: 'BreakStatement', - label: { - type: 'Identifier', - name: 'start', - range: [22, 27], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 27 } - } - }, - range: [16, 27], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 27 } - } - }, - range: [7, 27], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 27 } - } - }, - range: [0, 27], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 27 } - } - }, - - 'start: while (true) break start': { - type: 'LabeledStatement', - label: { - type: 'Identifier', - name: 'start', - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - body: { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [14, 18], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 18 } - } - }, - body: { - type: 'BreakStatement', - label: { - type: 'Identifier', - name: 'start', - range: [26, 31], - loc: { - start: { line: 1, column: 26 }, - end: { line: 1, column: 31 } - } - }, - range: [20, 31], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 31 } - } - }, - range: [7, 31], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 31 } - } - }, - range: [0, 31], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 31 } - } - } - - }, - - 'throw statement': { - - 'throw x;': { - type: 'ThrowStatement', - argument: { - type: 'Identifier', - name: 'x', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - range: [0, 8], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 8 } - } - }, - - 'throw x * y': { - type: 'ThrowStatement', - argument: { - type: 'BinaryExpression', - operator: '*', - left: { - type: 'Identifier', - name: 'x', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - right: { - type: 'Identifier', - name: 'y', - range: [10, 11], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 11 } - } - }, - range: [6, 11], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 11 } - } - }, - range: [0, 11], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 11 } - } - }, - - 'throw { message: "Error" }': { - type: 'ThrowStatement', - argument: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'message', - range: [8, 15], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 15 } - } - }, - value: { - type: 'Literal', - value: 'Error', - raw: '"Error"', - range: [17, 24], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 24 } - } - }, - kind: 'init', - range: [8, 24], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 24 } - } - }], - range: [6, 26], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 26 } - } - }, - range: [0, 26], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 26 } - } - } - - }, - - 'try statement': { - - 'try { } catch (e) { }': { - type: 'TryStatement', - block: { - type: 'BlockStatement', - body: [], - range: [4, 7], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 7 } - } - }, - guardedHandlers: [], - handlers: [{ - type: 'CatchClause', - param: { - type: 'Identifier', - name: 'e', - range: [15, 16], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 16 } - } - }, - body: { - type: 'BlockStatement', - body: [], - range: [18, 21], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 21 } - } - }, - range: [8, 21], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 21 } - } - }], - finalizer: null, - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - } - }, - - 'try { } catch (eval) { }': { - type: 'TryStatement', - block: { - type: 'BlockStatement', - body: [], - range: [4, 7], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 7 } - } - }, - guardedHandlers: [], - handlers: [{ - type: 'CatchClause', - param: { - type: 'Identifier', - name: 'eval', - range: [15, 19], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 19 } - } - }, - body: { - type: 'BlockStatement', - body: [], - range: [21, 24], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 24 } - } - }, - range: [8, 24], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 24 } - } - }], - finalizer: null, - range: [0, 24], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 24 } - } - }, - - 'try { } catch (arguments) { }': { - type: 'TryStatement', - block: { - type: 'BlockStatement', - body: [], - range: [4, 7], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 7 } - } - }, - guardedHandlers: [], - handlers: [{ - type: 'CatchClause', - param: { - type: 'Identifier', - name: 'arguments', - range: [15, 24], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 24 } - } - }, - body: { - type: 'BlockStatement', - body: [], - range: [26, 29], - loc: { - start: { line: 1, column: 26 }, - end: { line: 1, column: 29 } - } - }, - range: [8, 29], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 29 } - } - }], - finalizer: null, - range: [0, 29], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 29 } - } - }, - - 'try { } catch (e) { say(e) }': { - type: 'TryStatement', - block: { - type: 'BlockStatement', - body: [], - range: [4, 7], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 7 } - } - }, - guardedHandlers: [], - handlers: [{ - type: 'CatchClause', - param: { - type: 'Identifier', - name: 'e', - range: [15, 16], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 16 } - } - }, - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'say', - range: [20, 23], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 23 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'e', - range: [24, 25], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 25 } - } - }], - range: [20, 26], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 26 } - } - }, - range: [20, 27], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 27 } - } - }], - range: [18, 28], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 28 } - } - }, - range: [8, 28], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 28 } - } - }], - finalizer: null, - range: [0, 28], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 28 } - } - }, - - 'try { } finally { cleanup(stuff) }': { - type: 'TryStatement', - block: { - type: 'BlockStatement', - body: [], - range: [4, 7], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 7 } - } - }, - guardedHandlers: [], - handlers: [], - finalizer: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'cleanup', - range: [18, 25], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 25 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'stuff', - range: [26, 31], - loc: { - start: { line: 1, column: 26 }, - end: { line: 1, column: 31 } - } - }], - range: [18, 32], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 32 } - } - }, - range: [18, 33], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 33 } - } - }], - range: [16, 34], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 34 } - } - }, - range: [0, 34], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 34 } - } - }, - - 'try { doThat(); } catch (e) { say(e) }': { - type: 'TryStatement', - block: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'doThat', - range: [6, 12], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 12 } - } - }, - 'arguments': [], - range: [6, 14], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 14 } - } - }, - range: [6, 15], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 15 } - } - }], - range: [4, 17], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 17 } - } - }, - guardedHandlers: [], - handlers: [{ - type: 'CatchClause', - param: { - type: 'Identifier', - name: 'e', - range: [25, 26], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 26 } - } - }, - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'say', - range: [30, 33], - loc: { - start: { line: 1, column: 30 }, - end: { line: 1, column: 33 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'e', - range: [34, 35], - loc: { - start: { line: 1, column: 34 }, - end: { line: 1, column: 35 } - } - }], - range: [30, 36], - loc: { - start: { line: 1, column: 30 }, - end: { line: 1, column: 36 } - } - }, - range: [30, 37], - loc: { - start: { line: 1, column: 30 }, - end: { line: 1, column: 37 } - } - }], - range: [28, 38], - loc: { - start: { line: 1, column: 28 }, - end: { line: 1, column: 38 } - } - }, - range: [18, 38], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 38 } - } - }], - finalizer: null, - range: [0, 38], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 38 } - } - }, - - 'try { doThat(); } catch (e) { say(e) } finally { cleanup(stuff) }': { - type: 'TryStatement', - block: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'doThat', - range: [6, 12], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 12 } - } - }, - 'arguments': [], - range: [6, 14], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 14 } - } - }, - range: [6, 15], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 15 } - } - }], - range: [4, 17], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 17 } - } - }, - guardedHandlers: [], - handlers: [{ - type: 'CatchClause', - param: { - type: 'Identifier', - name: 'e', - range: [25, 26], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 26 } - } - }, - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'say', - range: [30, 33], - loc: { - start: { line: 1, column: 30 }, - end: { line: 1, column: 33 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'e', - range: [34, 35], - loc: { - start: { line: 1, column: 34 }, - end: { line: 1, column: 35 } - } - }], - range: [30, 36], - loc: { - start: { line: 1, column: 30 }, - end: { line: 1, column: 36 } - } - }, - range: [30, 37], - loc: { - start: { line: 1, column: 30 }, - end: { line: 1, column: 37 } - } - }], - range: [28, 38], - loc: { - start: { line: 1, column: 28 }, - end: { line: 1, column: 38 } - } - }, - range: [18, 38], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 38 } - } - }], - finalizer: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'cleanup', - range: [49, 56], - loc: { - start: { line: 1, column: 49 }, - end: { line: 1, column: 56 } - } - }, - 'arguments': [{ - type: 'Identifier', - name: 'stuff', - range: [57, 62], - loc: { - start: { line: 1, column: 57 }, - end: { line: 1, column: 62 } - } - }], - range: [49, 63], - loc: { - start: { line: 1, column: 49 }, - end: { line: 1, column: 63 } - } - }, - range: [49, 64], - loc: { - start: { line: 1, column: 49 }, - end: { line: 1, column: 64 } - } - }], - range: [47, 65], - loc: { - start: { line: 1, column: 47 }, - end: { line: 1, column: 65 } - } - }, - range: [0, 65], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 65 } - } - } - - }, - - 'debugger statement': { - - 'debugger;': { - type: 'DebuggerStatement', - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 9 } - } - } - - }, - - 'Function Definition': { - - 'function hello() { sayHi(); }': { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'hello', - range: [9, 14], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 14 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'sayHi', - range: [19, 24], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 24 } - } - }, - 'arguments': [], - range: [19, 26], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 26 } - } - }, - range: [19, 27], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 27 } - } - }], - range: [17, 29], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 29 } - } - }, - rest: null, - generator: false, - expression: false, - range: [0, 29], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 29 } - } - }, - - 'function eval() { }': { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'eval', - range: [9, 13], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 13 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [16, 19], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 19 } - } - }, - rest: null, - generator: false, - expression: false, - range: [0, 19], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 19 } - } - }, - - 'function arguments() { }': { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'arguments', - range: [9, 18], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 18 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [21, 24], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 24 } - } - }, - rest: null, - generator: false, - expression: false, - range: [0, 24], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 24 } - } - }, - - 'function test(t, t) { }': { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'test', - range: [9, 13], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 13 } - } - }, - params: [{ - type: 'Identifier', - name: 't', - range: [14, 15], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 15 } - } - }, { - type: 'Identifier', - name: 't', - range: [17, 18], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 18 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [20, 23], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 23 } - } - }, - rest: null, - generator: false, - expression: false, - range: [0, 23], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 23 } - } - }, - - '(function test(t, t) { })': { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: { - type: 'Identifier', - name: 'test', - range: [10, 14], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 14 } - } - }, - params: [{ - type: 'Identifier', - name: 't', - range: [15, 16], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 16 } - } - }, { - type: 'Identifier', - name: 't', - range: [18, 19], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 19 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [21, 24], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 24 } - } - }, - rest: null, - generator: false, - expression: false, - range: [1, 24], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 24 } - } - }, - range: [0, 25], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 25 } - } - }, - - 'function eval() { function inner() { "use strict" } }': { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'eval', - range: [9, 13], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 13 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'inner', - range: [27, 32], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 32 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '\"use strict\"', - range: [37, 49], - loc: { - start: { line: 1, column: 37 }, - end: { line: 1, column: 49 } - } - }, - range: [37, 50], - loc: { - start: { line: 1, column: 37 }, - end: { line: 1, column: 50 } - } - }], - range: [35, 51], - loc: { - start: { line: 1, column: 35 }, - end: { line: 1, column: 51 } - } - }, - rest: null, - generator: false, - expression: false, - range: [18, 51], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 51 } - } - }], - range: [16, 53], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 53 } - } - }, - rest: null, - generator: false, - expression: false, - range: [0, 53], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 53 } - } - }, - - 'function hello(a) { sayHi(); }': { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'hello', - range: [9, 14], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 14 } - } - }, - params: [{ - type: 'Identifier', - name: 'a', - range: [15, 16], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 16 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'sayHi', - range: [20, 25], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 25 } - } - }, - 'arguments': [], - range: [20, 27], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 27 } - } - }, - range: [20, 28], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 28 } - } - }], - range: [18, 30], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 30 } - } - }, - rest: null, - generator: false, - expression: false, - range: [0, 30], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 30 } - } - }, - - 'function hello(a, b) { sayHi(); }': { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'hello', - range: [9, 14], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 14 } - } - }, - params: [{ - type: 'Identifier', - name: 'a', - range: [15, 16], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 16 } - } - }, { - type: 'Identifier', - name: 'b', - range: [18, 19], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 19 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'sayHi', - range: [23, 28], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 28 } - } - }, - 'arguments': [], - range: [23, 30], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 30 } - } - }, - range: [23, 31], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 31 } - } - }], - range: [21, 33], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 33 } - } - }, - rest: null, - generator: false, - expression: false, - range: [0, 33], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 33 } - } - }, - - 'var hi = function() { sayHi() };': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'hi', - range: [4, 6], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 6 } - } - }, - init: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'sayHi', - range: [22, 27], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 27 } - } - }, - 'arguments': [], - range: [22, 29], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 29 } - } - }, - range: [22, 30], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 30 } - } - }], - range: [20, 31], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 31 } - } - }, - rest: null, - generator: false, - expression: false, - range: [9, 31], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 31 } - } - }, - range: [4, 31], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 31 } - } - }], - kind: 'var', - range: [0, 32], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 32 } - } - }, - - 'var hi = function eval() { };': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'hi', - range: [4, 6], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 6 } - } - }, - init: { - type: 'FunctionExpression', - id: { - type: 'Identifier', - name: 'eval', - range: [18, 22], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 22 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [25, 28], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 28 } - } - }, - rest: null, - generator: false, - expression: false, - range: [9, 28], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 28 } - } - }, - range: [4, 28], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 28 } - } - }], - kind: 'var', - range: [0, 29], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 29 } - } - }, - - 'var hi = function arguments() { };': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'hi', - range: [4, 6], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 6 } - } - }, - init: { - type: 'FunctionExpression', - id: { - type: 'Identifier', - name: 'arguments', - range: [18, 27], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 27 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [30, 33], - loc: { - start: { line: 1, column: 30 }, - end: { line: 1, column: 33 } - } - }, - rest: null, - generator: false, - expression: false, - range: [9, 33], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 33 } - } - }, - range: [4, 33], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 33 } - } - }], - kind: 'var', - range: [0, 34], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 34 } - } - }, - - 'var hello = function hi() { sayHi() };': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'hello', - range: [4, 9], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 9 } - } - }, - init: { - type: 'FunctionExpression', - id: { - type: 'Identifier', - name: 'hi', - range: [21, 23], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 23 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'sayHi', - range: [28, 33], - loc: { - start: { line: 1, column: 28 }, - end: { line: 1, column: 33 } - } - }, - 'arguments': [], - range: [28, 35], - loc: { - start: { line: 1, column: 28 }, - end: { line: 1, column: 35 } - } - }, - range: [28, 36], - loc: { - start: { line: 1, column: 28 }, - end: { line: 1, column: 36 } - } - }], - range: [26, 37], - loc: { - start: { line: 1, column: 26 }, - end: { line: 1, column: 37 } - } - }, - rest: null, - generator: false, - expression: false, - range: [12, 37], - loc: { - start: { line: 1, column: 12 }, - end: { line: 1, column: 37 } - } - }, - range: [4, 37], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 37 } - } - }], - kind: 'var', - range: [0, 38], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 38 } - } - }, - - '(function(){})': { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [11, 13], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 13 } - } - }, - rest: null, - generator: false, - expression: false, - range: [1, 13], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 13 } - } - }, - range: [0, 14], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 14 } - } - } - - }, - - 'Automatic semicolon insertion': { - - '{ x\n++y }': { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'x', - range: [2, 3], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 3 } - } - }, - range: [2, 4], - loc: { - start: { line: 1, column: 2 }, - end: { line: 2, column: 0 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'y', - range: [6, 7], - loc: { - start: { line: 2, column: 2 }, - end: { line: 2, column: 3 } - } - }, - prefix: true, - range: [4, 7], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 3 } - } - }, - range: [4, 8], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 4 } - } - }], - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 5 } - } - }, - - '{ x\n--y }': { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'x', - range: [2, 3], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 3 } - } - }, - range: [2, 4], - loc: { - start: { line: 1, column: 2 }, - end: { line: 2, column: 0 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '--', - argument: { - type: 'Identifier', - name: 'y', - range: [6, 7], - loc: { - start: { line: 2, column: 2 }, - end: { line: 2, column: 3 } - } - }, - prefix: true, - range: [4, 7], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 3 } - } - }, - range: [4, 8], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 4 } - } - }], - range: [0, 9], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 5 } - } - }, - - 'var x /* comment */;': { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - init: null, - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }], - kind: 'var', - range: [0, 20], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 20 } - } - }, - - '{ var x = 14, y = 3\nz; }': { - type: 'BlockStatement', - body: [{ - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [6, 7], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 7 } - } - }, - init: { - type: 'Literal', - value: 14, - raw: '14', - range: [10, 12], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 12 } - } - }, - range: [6, 12], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 12 } - } - }, { - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'y', - range: [14, 15], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 15 } - } - }, - init: { - type: 'Literal', - value: 3, - raw: '3', - range: [18, 19], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 19 } - } - }, - range: [14, 19], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 19 } - } - }], - kind: 'var', - range: [2, 20], - loc: { - start: { line: 1, column: 2 }, - end: { line: 2, column: 0 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'z', - range: [20, 21], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 1 } - } - }, - range: [20, 22], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 2 } - } - }], - range: [0, 24], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 4 } - } - }, - - 'while (true) { continue\nthere; }': { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [7, 11], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 11 } - } - }, - body: { - type: 'BlockStatement', - body: [{ - type: 'ContinueStatement', - label: null, - range: [15, 23], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 23 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'there', - range: [24, 29], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 5 } - } - }, - range: [24, 30], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 6 } - } - }], - range: [13, 32], - loc: { - start: { line: 1, column: 13 }, - end: { line: 2, column: 8 } - } - }, - range: [0, 32], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 8 } - } - }, - - 'while (true) { continue // Comment\nthere; }': { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [7, 11], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 11 } - } - }, - body: { - type: 'BlockStatement', - body: [{ - type: 'ContinueStatement', - label: null, - range: [15, 23], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 23 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'there', - range: [35, 40], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 5 } - } - }, - range: [35, 41], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 6 } - } - }], - range: [13, 43], - loc: { - start: { line: 1, column: 13 }, - end: { line: 2, column: 8 } - } - }, - range: [0, 43], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 8 } - } - }, - - 'while (true) { continue /* Multiline\nComment */there; }': { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [7, 11], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 11 } - } - }, - body: { - type: 'BlockStatement', - body: [{ - type: 'ContinueStatement', - label: null, - range: [15, 23], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 23 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'there', - range: [47, 52], - loc: { - start: { line: 2, column: 10 }, - end: { line: 2, column: 15 } - } - }, - range: [47, 53], - loc: { - start: { line: 2, column: 10 }, - end: { line: 2, column: 16 } - } - }], - range: [13, 55], - loc: { - start: { line: 1, column: 13 }, - end: { line: 2, column: 18 } - } - }, - range: [0, 55], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 18 } - } - }, - - 'while (true) { break\nthere; }': { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [7, 11], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 11 } - } - }, - body: { - type: 'BlockStatement', - body: [{ - type: 'BreakStatement', - label: null, - range: [15, 20], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 20 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'there', - range: [21, 26], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 5 } - } - }, - range: [21, 27], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 6 } - } - }], - range: [13, 29], - loc: { - start: { line: 1, column: 13 }, - end: { line: 2, column: 8 } - } - }, - range: [0, 29], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 8 } - } - }, - - 'while (true) { break // Comment\nthere; }': { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [7, 11], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 11 } - } - }, - body: { - type: 'BlockStatement', - body: [{ - type: 'BreakStatement', - label: null, - range: [15, 20], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 20 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'there', - range: [32, 37], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 5 } - } - }, - range: [32, 38], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 6 } - } - }], - range: [13, 40], - loc: { - start: { line: 1, column: 13 }, - end: { line: 2, column: 8 } - } - }, - range: [0, 40], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 8 } - } - }, - - 'while (true) { break /* Multiline\nComment */there; }': { - type: 'WhileStatement', - test: { - type: 'Literal', - value: true, - raw: 'true', - range: [7, 11], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 11 } - } - }, - body: { - type: 'BlockStatement', - body: [{ - type: 'BreakStatement', - label: null, - range: [15, 20], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 20 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'there', - range: [44, 49], - loc: { - start: { line: 2, column: 10 }, - end: { line: 2, column: 15 } - } - }, - range: [44, 50], - loc: { - start: { line: 2, column: 10 }, - end: { line: 2, column: 16 } - } - }], - range: [13, 52], - loc: { - start: { line: 1, column: 13 }, - end: { line: 2, column: 18 } - } - }, - range: [0, 52], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 18 } - } - }, - - '(function(){ return\nx; })': { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [ - { - type: 'ReturnStatement', - argument: null, - range: [13, 19], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 19 } - } - }, - { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'x', - range: [20, 21], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 1 } - } - }, - range: [20, 22], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 2 } - } - } - ], - range: [11, 24], - loc: { - start: { line: 1, column: 11 }, - end: { line: 2, column: 4 } - } - }, - rest: null, - generator: false, - expression: false, - range: [1, 24], - loc: { - start: { line: 1, column: 1 }, - end: { line: 2, column: 4 } - } - }, - range: [0, 25], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 5 } - } - }, - - '(function(){ return // Comment\nx; })': { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [ - { - type: 'ReturnStatement', - argument: null, - range: [13, 19], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 19 } - } - }, - { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'x', - range: [31, 32], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 1 } - } - }, - range: [31, 33], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 2 } - } - } - ], - range: [11, 35], - loc: { - start: { line: 1, column: 11 }, - end: { line: 2, column: 4 } - } - }, - rest: null, - generator: false, - expression: false, - range: [1, 35], - loc: { - start: { line: 1, column: 1 }, - end: { line: 2, column: 4 } - } - }, - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 5 } - } - }, - - '(function(){ return/* Multiline\nComment */x; })': { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [ - { - type: 'ReturnStatement', - argument: null, - range: [13, 19], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 19 } - } - }, - { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'x', - range: [42, 43], - loc: { - start: { line: 2, column: 10 }, - end: { line: 2, column: 11 } - } - }, - range: [42, 44], - loc: { - start: { line: 2, column: 10 }, - end: { line: 2, column: 12 } - } - } - ], - range: [11, 46], - loc: { - start: { line: 1, column: 11 }, - end: { line: 2, column: 14 } - } - }, - rest: null, - generator: false, - expression: false, - range: [1, 46], - loc: { - start: { line: 1, column: 1 }, - end: { line: 2, column: 14 } - } - }, - range: [0, 47], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 15 } - } - }, - - '{ throw error\nerror; }': { - type: 'BlockStatement', - body: [{ - type: 'ThrowStatement', - argument: { - type: 'Identifier', - name: 'error', - range: [8, 13], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 13 } - } - }, - range: [2, 14], - loc: { - start: { line: 1, column: 2 }, - end: { line: 2, column: 0 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'error', - range: [14, 19], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 5 } - } - }, - range: [14, 20], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 6 } - } - }], - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 8 } - } - }, - - '{ throw error// Comment\nerror; }': { - type: 'BlockStatement', - body: [{ - type: 'ThrowStatement', - argument: { - type: 'Identifier', - name: 'error', - range: [8, 13], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 13 } - } - }, - range: [2, 24], - loc: { - start: { line: 1, column: 2 }, - end: { line: 2, column: 0 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'error', - range: [24, 29], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 5 } - } - }, - range: [24, 30], - loc: { - start: { line: 2, column: 0 }, - end: { line: 2, column: 6 } - } - }], - range: [0, 32], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 8 } - } - }, - - '{ throw error/* Multiline\nComment */error; }': { - type: 'BlockStatement', - body: [{ - type: 'ThrowStatement', - argument: { - type: 'Identifier', - name: 'error', - range: [8, 13], - loc: { - start: { line: 1, column: 8 }, - end: { line: 1, column: 13 } - } - }, - range: [2, 36], - loc: { - start: { line: 1, column: 2 }, - end: { line: 2, column: 10 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'error', - range: [36, 41], - loc: { - start: { line: 2, column: 10 }, - end: { line: 2, column: 15 } - } - }, - range: [36, 42], - loc: { - start: { line: 2, column: 10 }, - end: { line: 2, column: 16 } - } - }], - range: [0, 44], - loc: { - start: { line: 1, column: 0 }, - end: { line: 2, column: 18 } - } - } - - }, - - 'Source elements': { - - '': { - type: 'Program', - body: [], - range: [0, 0], - loc: { - start: { line: 0, column: 0 }, - end: { line: 0, column: 0 } - }, - tokens: [] - } - }, - - 'Invalid syntax': { - - '{': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Unexpected end of input' - }, - - '}': { - index: 0, - lineNumber: 1, - column: 1, - message: 'Error: Line 1: Unexpected token }' - }, - - '3ea': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '3in []': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '3e': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '3e+': { - index: 3, - lineNumber: 1, - column: 4, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '3e-': { - index: 3, - lineNumber: 1, - column: 4, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '3x': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '3x0': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '0x': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '09': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '018': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '01a': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '3in[]': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '0x3in[]': { - index: 3, - lineNumber: 1, - column: 4, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '"Hello\nWorld"': { - index: 7, - lineNumber: 1, - column: 8, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - 'x\\': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - 'x\\u005c': { - index: 7, - lineNumber: 1, - column: 8, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - 'x\\u002a': { - index: 7, - lineNumber: 1, - column: 8, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - 'var x = /(s/g': { - index: 13, - lineNumber: 1, - column: 14, - message: 'Error: Line 1: Invalid regular expression' - }, - - '/': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Invalid regular expression: missing /' - }, - - '/test': { - index: 5, - lineNumber: 1, - column: 6, - message: 'Error: Line 1: Invalid regular expression: missing /' - }, - - 'var x = /[a-z]/\\ux': { - index: 18, - lineNumber: 1, - column: 19, - message: 'Error: Line 1: Invalid regular expression' - }, - - '3 = 4': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }, - - 'func() = 4': { - index: 6, - lineNumber: 1, - column: 7, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }, - - '(1 + 1) = 10': { - index: 7, - lineNumber: 1, - column: 8, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }, - - '1++': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }, - - '1--': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }, - - '++1': { - index: 3, - lineNumber: 1, - column: 4, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }, - - '--1': { - index: 3, - lineNumber: 1, - column: 4, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }, - - 'for((1 + 1) in list) process(x);': { - index: 11, - lineNumber: 1, - column: 12, - message: 'Error: Line 1: Invalid left-hand side in for-in' - }, - - '[': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Unexpected end of input' - }, - - '[,': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected end of input' - }, - - '1 + {': { - index: 5, - lineNumber: 1, - column: 6, - message: 'Error: Line 1: Unexpected end of input' - }, - - '1 + { t:t ': { - index: 10, - lineNumber: 1, - column: 11, - message: 'Error: Line 1: Unexpected end of input' - }, - - '1 + { t:t,': { - index: 10, - lineNumber: 1, - column: 11, - message: 'Error: Line 1: Unexpected end of input' - }, - - 'var x = /\n/': { - index: 10, - lineNumber: 1, - column: 11, - message: 'Error: Line 1: Invalid regular expression: missing /' - }, - - 'var x = "\n': { - index: 10, - lineNumber: 1, - column: 11, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - 'var if = 42': { - index: 4, - lineNumber: 1, - column: 5, - message: 'Error: Line 1: Unexpected token if' - }, - - 'i + 2 = 42': { - index: 5, - lineNumber: 1, - column: 6, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }, - - '+i = 42': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }, - - '1 + (': { - index: 5, - lineNumber: 1, - column: 6, - message: 'Error: Line 1: Unexpected end of input' - }, - - '\n\n\n{': { - index: 4, - lineNumber: 4, - column: 2, - message: 'Error: Line 4: Unexpected end of input' - }, - - '\n/* Some multiline\ncomment */\n)': { - index: 30, - lineNumber: 4, - column: 1, - message: 'Error: Line 4: Unexpected token )' - }, - - '{ set 1 }': { - index: 6, - lineNumber: 1, - column: 7, - message: 'Error: Line 1: Unexpected number' - }, - - '{ get 2 }': { - index: 6, - lineNumber: 1, - column: 7, - message: 'Error: Line 1: Unexpected number' - }, - - '({ set: s(if) { } })': { - index: 10, - lineNumber: 1, - column: 11, - message: 'Error: Line 1: Unexpected token if' - }, - - '({ set s(.) { } })': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Unexpected token .' - }, - - '({ set s() { } })': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Unexpected token )' - }, - - '({ set: s() { } })': { - index: 12, - lineNumber: 1, - column: 13, - message: 'Error: Line 1: Unexpected token {' - }, - - '({ set: s(a, b) { } })': { - index: 16, - lineNumber: 1, - column: 17, - message: 'Error: Line 1: Unexpected token {' - }, - - '({ get: g(d) { } })': { - index: 13, - lineNumber: 1, - column: 14, - message: 'Error: Line 1: Unexpected token {' - }, - - '({ get i() { }, i: 42 })': { - index: 21, - lineNumber: 1, - column: 22, - message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' - }, - - '({ i: 42, get i() { } })': { - index: 21, - lineNumber: 1, - column: 22, - message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' - }, - - '({ set i(x) { }, i: 42 })': { - index: 22, - lineNumber: 1, - column: 23, - message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' - }, - - '({ i: 42, set i(x) { } })': { - index: 22, - lineNumber: 1, - column: 23, - message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' - }, - - '({ get i() { }, get i() { } })': { - index: 27, - lineNumber: 1, - column: 28, - message: 'Error: Line 1: Object literal may not have multiple get/set accessors with the same name' - }, - - '({ set i(x) { }, set i(x) { } })': { - index: 29, - lineNumber: 1, - column: 30, - message: 'Error: Line 1: Object literal may not have multiple get/set accessors with the same name' - }, - - 'function t(if) { }': { - index: 11, - lineNumber: 1, - column: 12, - message: 'Error: Line 1: Unexpected token if' - }, - - 'function t(true) { }': { - index: 11, - lineNumber: 1, - column: 12, - message: 'Error: Line 1: Unexpected token true' - }, - - 'function t(false) { }': { - index: 11, - lineNumber: 1, - column: 12, - message: 'Error: Line 1: Unexpected token false' - }, - - 'function t(null) { }': { - index: 11, - lineNumber: 1, - column: 12, - message: 'Error: Line 1: Unexpected token null' - }, - - 'function null() { }': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Unexpected token null' - }, - - 'function true() { }': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Unexpected token true' - }, - - 'function false() { }': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Unexpected token false' - }, - - 'function if() { }': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Unexpected token if' - }, - - 'a b;': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected identifier' - }, - - 'if.a;': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected token .' - }, - - 'a if;': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected token if' - }, - - 'a class;': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected reserved word' - }, - - 'break\n': { - index: 5, - lineNumber: 1, - column: 6, - message: 'Error: Line 1: Illegal break statement' - }, - - 'break 1;': { - index: 6, - lineNumber: 1, - column: 7, - message: 'Error: Line 1: Unexpected number' - }, - - 'continue\n': { - index: 8, - lineNumber: 1, - column: 9, - message: 'Error: Line 1: Illegal continue statement' - }, - - 'continue 2;': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Unexpected number' - }, - - 'throw': { - index: 5, - lineNumber: 1, - column: 6, - message: 'Error: Line 1: Unexpected end of input' - }, - - 'throw;': { - index: 5, - lineNumber: 1, - column: 6, - message: 'Error: Line 1: Unexpected token ;' - }, - - 'throw\n': { - index: 5, - lineNumber: 1, - column: 6, - message: 'Error: Line 1: Illegal newline after throw' - }, - - 'for (var i, i2 in {});': { - index: 15, - lineNumber: 1, - column: 16, - message: 'Error: Line 1: Unexpected token in' - }, - - 'for ((i in {}));': { - index: 14, - lineNumber: 1, - column: 15, - message: 'Error: Line 1: Unexpected token )' - }, - - 'for (i + 1 in {});': { - index: 10, - lineNumber: 1, - column: 11, - message: 'Error: Line 1: Invalid left-hand side in for-in' - }, - - 'for (+i in {});': { - index: 7, - lineNumber: 1, - column: 8, - message: 'Error: Line 1: Invalid left-hand side in for-in' - }, - - 'if(false)': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Unexpected end of input' - }, - - 'if(false) doThis(); else': { - index: 24, - lineNumber: 1, - column: 25, - message: 'Error: Line 1: Unexpected end of input' - }, - - 'do': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected end of input' - }, - - 'while(false)': { - index: 12, - lineNumber: 1, - column: 13, - message: 'Error: Line 1: Unexpected end of input' - }, - - 'for(;;)': { - index: 7, - lineNumber: 1, - column: 8, - message: 'Error: Line 1: Unexpected end of input' - }, - - 'with(x)': { - index: 7, - lineNumber: 1, - column: 8, - message: 'Error: Line 1: Unexpected end of input' - }, - - 'try { }': { - index: 7, - lineNumber: 1, - column: 8, - message: 'Error: Line 1: Missing catch or finally after try' - }, - - 'try {} catch (42) {} ': { - index: 14, - lineNumber: 1, - column: 15, - message: 'Error: Line 1: Unexpected number' - }, - - 'try {} catch (answer()) {} ': { - index: 20, - lineNumber: 1, - column: 21, - message: 'Error: Line 1: Unexpected token (' - }, - - 'try {} catch (-x) {} ': { - index: 14, - lineNumber: 1, - column: 15, - message: 'Error: Line 1: Unexpected token -' - }, - - - '\u203F = 10': { - index: 0, - lineNumber: 1, - column: 1, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - 'const x = 12, y;': { - index: 15, - lineNumber: 1, - column: 16, - message: 'Error: Line 1: Unexpected token ;' - }, - - 'const x, y = 12;': { - index: 7, - lineNumber: 1, - column: 8, - message: 'Error: Line 1: Unexpected token ,' - }, - - 'const x;': { - index: 7, - lineNumber: 1, - column: 8, - message: 'Error: Line 1: Unexpected token ;' - }, - - 'if(true) let a = 1;': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Unexpected token let' - }, - - 'if(true) const a = 1;': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Unexpected token const' - }, - - 'switch (c) { default: default: }': { - index: 30, - lineNumber: 1, - column: 31, - message: 'Error: Line 1: More than one default clause in switch statement' - }, - - 'new X()."s"': { - index: 8, - lineNumber: 1, - column: 9, - message: 'Error: Line 1: Unexpected string' - }, - - '/*': { - index: 2, - lineNumber: 1, - column: 3, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '/*\n\n\n': { - index: 5, - lineNumber: 4, - column: 1, - message: 'Error: Line 4: Unexpected token ILLEGAL' - }, - - '/**': { - index: 3, - lineNumber: 1, - column: 4, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '/*\n\n*': { - index: 5, - lineNumber: 3, - column: 2, - message: 'Error: Line 3: Unexpected token ILLEGAL' - }, - - '/*hello': { - index: 7, - lineNumber: 1, - column: 8, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '/*hello *': { - index: 10, - lineNumber: 1, - column: 11, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '\n]': { - index: 1, - lineNumber: 2, - column: 1, - message: 'Error: Line 2: Unexpected token ]' - }, - - '\r]': { - index: 1, - lineNumber: 2, - column: 1, - message: 'Error: Line 2: Unexpected token ]' - }, - - '\r\n]': { - index: 2, - lineNumber: 2, - column: 1, - message: 'Error: Line 2: Unexpected token ]' - }, - - '\n\r]': { - index: 2, - lineNumber: 3, - column: 1, - message: 'Error: Line 3: Unexpected token ]' - }, - - '//\r\n]': { - index: 4, - lineNumber: 2, - column: 1, - message: 'Error: Line 2: Unexpected token ]' - }, - - '//\n\r]': { - index: 4, - lineNumber: 3, - column: 1, - message: 'Error: Line 3: Unexpected token ]' - }, - - '/a\\\n/': { - index: 4, - lineNumber: 1, - column: 5, - message: 'Error: Line 1: Invalid regular expression: missing /' - }, - - '//\r \n]': { - index: 5, - lineNumber: 3, - column: 1, - message: 'Error: Line 3: Unexpected token ]' - }, - - '/*\r\n*/]': { - index: 6, - lineNumber: 2, - column: 3, - message: 'Error: Line 2: Unexpected token ]' - }, - - '/*\n\r*/]': { - index: 6, - lineNumber: 3, - column: 3, - message: 'Error: Line 3: Unexpected token ]' - }, - - '/*\r \n*/]': { - index: 7, - lineNumber: 3, - column: 3, - message: 'Error: Line 3: Unexpected token ]' - }, - - '\\\\': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '\\u005c': { - index: 6, - lineNumber: 1, - column: 7, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - - '\\x': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '\\u0000': { - index: 6, - lineNumber: 1, - column: 7, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '\u200C = []': { - index: 0, - lineNumber: 1, - column: 1, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '\u200D = []': { - index: 0, - lineNumber: 1, - column: 1, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '"\\': { - index: 3, - lineNumber: 1, - column: 4, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - '"\\u': { - index: 3, - lineNumber: 1, - column: 4, - message: 'Error: Line 1: Unexpected token ILLEGAL' - }, - - 'try { } catch() {}': { - index: 14, - lineNumber: 1, - column: 15, - message: 'Error: Line 1: Unexpected token )' - }, - - 'return': { - index: 6, - lineNumber: 1, - column: 7, - message: 'Error: Line 1: Illegal return statement' - }, - - 'break': { - index: 5, - lineNumber: 1, - column: 6, - message: 'Error: Line 1: Illegal break statement' - }, - - 'continue': { - index: 8, - lineNumber: 1, - column: 9, - message: 'Error: Line 1: Illegal continue statement' - }, - - 'switch (x) { default: continue; }': { - index: 31, - lineNumber: 1, - column: 32, - message: 'Error: Line 1: Illegal continue statement' - }, - - 'do { x } *': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Unexpected token *' - }, - - 'while (true) { break x; }': { - index: 22, - lineNumber: 1, - column: 23, - message: 'Error: Line 1: Undefined label \'x\'' - }, - - 'while (true) { continue x; }': { - index: 25, - lineNumber: 1, - column: 26, - message: 'Error: Line 1: Undefined label \'x\'' - }, - - 'x: while (true) { (function () { break x; }); }': { - index: 40, - lineNumber: 1, - column: 41, - message: 'Error: Line 1: Undefined label \'x\'' - }, - - 'x: while (true) { (function () { continue x; }); }': { - index: 43, - lineNumber: 1, - column: 44, - message: 'Error: Line 1: Undefined label \'x\'' - }, - - 'x: while (true) { (function () { break; }); }': { - index: 39, - lineNumber: 1, - column: 40, - message: 'Error: Line 1: Illegal break statement' - }, - - 'x: while (true) { (function () { continue; }); }': { - index: 42, - lineNumber: 1, - column: 43, - message: 'Error: Line 1: Illegal continue statement' - }, - - 'x: while (true) { x: while (true) { } }': { - index: 20, - lineNumber: 1, - column: 21, - message: 'Error: Line 1: Label \'x\' has already been declared' - }, - - '(function () { \'use strict\'; delete i; }())': { - index: 37, - lineNumber: 1, - column: 38, - message: 'Error: Line 1: Delete of an unqualified identifier in strict mode.' - }, - - '(function () { \'use strict\'; with (i); }())': { - index: 28, - lineNumber: 1, - column: 29, - message: 'Error: Line 1: Strict mode code may not include a with statement' - }, - - 'function hello() {\'use strict\'; ({ i: 42, i: 42 }) }': { - index: 47, - lineNumber: 1, - column: 48, - message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' - }, - - 'function hello() {\'use strict\'; ({ hasOwnProperty: 42, hasOwnProperty: 42 }) }': { - index: 73, - lineNumber: 1, - column: 74, - message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' - }, - - 'function hello() {\'use strict\'; var eval = 10; }': { - index: 40, - lineNumber: 1, - column: 41, - message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' - }, - - 'function hello() {\'use strict\'; var arguments = 10; }': { - index: 45, - lineNumber: 1, - column: 46, - message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' - }, - - 'function hello() {\'use strict\'; try { } catch (eval) { } }': { - index: 51, - lineNumber: 1, - column: 52, - message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' - }, - - 'function hello() {\'use strict\'; try { } catch (arguments) { } }': { - index: 56, - lineNumber: 1, - column: 57, - message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' - }, - - 'function hello() {\'use strict\'; eval = 10; }': { - index: 32, - lineNumber: 1, - column: 33, - message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' - }, - - 'function hello() {\'use strict\'; arguments = 10; }': { - index: 32, - lineNumber: 1, - column: 33, - message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' - }, - - 'function hello() {\'use strict\'; ++eval; }': { - index: 38, - lineNumber: 1, - column: 39, - message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' - }, - - 'function hello() {\'use strict\'; --eval; }': { - index: 38, - lineNumber: 1, - column: 39, - message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' - }, - - 'function hello() {\'use strict\'; ++arguments; }': { - index: 43, - lineNumber: 1, - column: 44, - message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' - }, - - 'function hello() {\'use strict\'; --arguments; }': { - index: 43, - lineNumber: 1, - column: 44, - message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' - }, - - 'function hello() {\'use strict\'; eval++; }': { - index: 36, - lineNumber: 1, - column: 37, - message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' - }, - - 'function hello() {\'use strict\'; eval--; }': { - index: 36, - lineNumber: 1, - column: 37, - message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' - }, - - 'function hello() {\'use strict\'; arguments++; }': { - index: 41, - lineNumber: 1, - column: 42, - message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' - }, - - 'function hello() {\'use strict\'; arguments--; }': { - index: 41, - lineNumber: 1, - column: 42, - message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' - }, - - 'function hello() {\'use strict\'; function eval() { } }': { - index: 41, - lineNumber: 1, - column: 42, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }, - - 'function hello() {\'use strict\'; function arguments() { } }': { - index: 41, - lineNumber: 1, - column: 42, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }, - - 'function eval() {\'use strict\'; }': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }, - - 'function arguments() {\'use strict\'; }': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }, - - 'function hello() {\'use strict\'; (function eval() { }()) }': { - index: 42, - lineNumber: 1, - column: 43, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }, - - 'function hello() {\'use strict\'; (function arguments() { }()) }': { - index: 42, - lineNumber: 1, - column: 43, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }, - - '(function eval() {\'use strict\'; })()': { - index: 10, - lineNumber: 1, - column: 11, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }, - - '(function arguments() {\'use strict\'; })()': { - index: 10, - lineNumber: 1, - column: 11, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }, - - 'function hello() {\'use strict\'; ({ s: function eval() { } }); }': { - index: 47, - lineNumber: 1, - column: 48, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }, - - '(function package() {\'use strict\'; })()': { - index: 10, - lineNumber: 1, - column: 11, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function hello() {\'use strict\'; ({ i: 10, set s(eval) { } }); }': { - index: 48, - lineNumber: 1, - column: 49, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }, - - 'function hello() {\'use strict\'; ({ set s(eval) { } }); }': { - index: 41, - lineNumber: 1, - column: 42, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }, - - 'function hello() {\'use strict\'; ({ s: function s(eval) { } }); }': { - index: 49, - lineNumber: 1, - column: 50, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }, - - 'function hello(eval) {\'use strict\';}': { - index: 15, - lineNumber: 1, - column: 16, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }, - - 'function hello(arguments) {\'use strict\';}': { - index: 15, - lineNumber: 1, - column: 16, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }, - - 'function hello() { \'use strict\'; function inner(eval) {} }': { - index: 48, - lineNumber: 1, - column: 49, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }, - - 'function hello() { \'use strict\'; function inner(arguments) {} }': { - index: 48, - lineNumber: 1, - column: 49, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }, - - ' "\\1"; \'use strict\';': { - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Octal literals are not allowed in strict mode.' - }, - - 'function hello() { \'use strict\'; "\\1"; }': { - index: 33, - lineNumber: 1, - column: 34, - message: 'Error: Line 1: Octal literals are not allowed in strict mode.' - }, - - 'function hello() { \'use strict\'; 021; }': { - index: 33, - lineNumber: 1, - column: 34, - message: 'Error: Line 1: Octal literals are not allowed in strict mode.' - }, - - 'function hello() { \'use strict\'; ({ "\\1": 42 }); }': { - index: 36, - lineNumber: 1, - column: 37, - message: 'Error: Line 1: Octal literals are not allowed in strict mode.' - }, - - 'function hello() { \'use strict\'; ({ 021: 42 }); }': { - index: 36, - lineNumber: 1, - column: 37, - message: 'Error: Line 1: Octal literals are not allowed in strict mode.' - }, - - 'function hello() { "octal directive\\1"; "use strict"; }': { - index: 19, - lineNumber: 1, - column: 20, - message: 'Error: Line 1: Octal literals are not allowed in strict mode.' - }, - - 'function hello() { "octal directive\\1"; "octal directive\\2"; "use strict"; }': { - index: 19, - lineNumber: 1, - column: 20, - message: 'Error: Line 1: Octal literals are not allowed in strict mode.' - }, - - 'function hello() { "use strict"; function inner() { "octal directive\\1"; } }': { - index: 52, - lineNumber: 1, - column: 53, - message: 'Error: Line 1: Octal literals are not allowed in strict mode.' - }, - - 'function hello() { "use strict"; var implements; }': { - index: 37, - lineNumber: 1, - column: 38, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function hello() { "use strict"; var interface; }': { - index: 37, - lineNumber: 1, - column: 38, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function hello() { "use strict"; var package; }': { - index: 37, - lineNumber: 1, - column: 38, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function hello() { "use strict"; var private; }': { - index: 37, - lineNumber: 1, - column: 38, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function hello() { "use strict"; var protected; }': { - index: 37, - lineNumber: 1, - column: 38, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function hello() { "use strict"; var public; }': { - index: 37, - lineNumber: 1, - column: 38, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function hello() { "use strict"; var static; }': { - index: 37, - lineNumber: 1, - column: 38, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function hello() { "use strict"; var yield; }': { - index: 37, - lineNumber: 1, - column: 38, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function hello() { "use strict"; var let; }': { - index: 37, - lineNumber: 1, - column: 38, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function hello(static) { "use strict"; }': { - index: 15, - lineNumber: 1, - column: 16, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function static() { "use strict"; }': { - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'var yield': { - index: 4, - lineNumber: 1, - column: 5, - message: 'Error: Line 1: Unexpected token yield' - }, - - 'var let': { - index: 4, - lineNumber: 1, - column: 5, - message: 'Error: Line 1: Unexpected token let' - }, - - '"use strict"; function static() { }': { - index: 23, - lineNumber: 1, - column: 24, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function a(t, t) { "use strict"; }': { - index: 14, - lineNumber: 1, - column: 15, - message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' - }, - - 'function a(eval) { "use strict"; }': { - index: 11, - lineNumber: 1, - column: 12, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }, - - 'function a(package) { "use strict"; }': { - index: 11, - lineNumber: 1, - column: 12, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'function a() { "use strict"; function b(t, t) { }; }': { - index: 43, - lineNumber: 1, - column: 44, - message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' - }, - - '(function a(t, t) { "use strict"; })': { - index: 15, - lineNumber: 1, - column: 16, - message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' - }, - - 'function a() { "use strict"; (function b(t, t) { }); }': { - index: 44, - lineNumber: 1, - column: 45, - message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' - }, - - '(function a(eval) { "use strict"; })': { - index: 12, - lineNumber: 1, - column: 13, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }, - - '(function a(package) { "use strict"; })': { - index: 12, - lineNumber: 1, - column: 13, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }, - - 'var': { - index: 3, - lineNumber: 1, - column: 4, - message: 'Error: Line 1: Unexpected end of input' - }, - - 'let': { - index: 3, - lineNumber: 1, - column: 4, - message: 'Error: Line 1: Unexpected end of input' - }, - - 'const': { - index: 5, - lineNumber: 1, - column: 6, - message: 'Error: Line 1: Unexpected end of input' - } - - }, - - 'API': { - 'parse()': { - call: 'parse', - args: [], - result: { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'undefined' - } - }] - } - }, - - 'parse(null)': { - call: 'parse', - args: [null], - result: { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: null - } - }] - } - }, - - 'parse(42)': { - call: 'parse', - args: [42], - result: { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42 - } - }] - } - }, - - 'parse(true)': { - call: 'parse', - args: [true], - result: { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: true - } - }] - } - }, - - 'parse(undefined)': { - call: 'parse', - args: [void 0], - result: { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'undefined' - } - }] - } - }, - - 'parse(new String("test"))': { - call: 'parse', - args: [new String('test')], - result: { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Identifier', - name: 'test' - } - }] - } - }, - - 'parse(new Number(42))': { - call: 'parse', - args: [new Number(42)], - result: { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 42 - } - }] - } - }, - - 'parse(new Boolean(true))': { - call: 'parse', - args: [new Boolean(true)], - result: { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: true - } - }] - } - }, - - 'Syntax': { - property: 'Syntax', - result: { - AssignmentExpression: 'AssignmentExpression', - ArrayExpression: 'ArrayExpression', - BlockStatement: 'BlockStatement', - BinaryExpression: 'BinaryExpression', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DoWhileStatement: 'DoWhileStatement', - DebuggerStatement: 'DebuggerStatement', - EmptyStatement: 'EmptyStatement', - ExpressionStatement: 'ExpressionStatement', - ForStatement: 'ForStatement', - ForInStatement: 'ForInStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - Identifier: 'Identifier', - IfStatement: 'IfStatement', - Literal: 'Literal', - LabeledStatement: 'LabeledStatement', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - Program: 'Program', - Property: 'Property', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SwitchStatement: 'SwitchStatement', - SwitchCase: 'SwitchCase', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement' - } - } - - }, - - 'Tolerant parse': { - 'return': { - type: 'Program', - body: [{ - type: 'ReturnStatement', - 'argument': null, - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - } - }], - range: [0, 6], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 6 } - }, - errors: [{ - index: 6, - lineNumber: 1, - column: 7, - message: 'Error: Line 1: Illegal return statement' - }] - }, - - '(function () { \'use strict\'; with (i); }())': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '\'use strict\'', - range: [15, 27], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 27 } - } - }, - range: [15, 28], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 28 } - } - }, { - type: 'WithStatement', - object: { - type: 'Identifier', - name: 'i', - range: [35, 36], - loc: { - start: { line: 1, column: 35 }, - end: { line: 1, column: 36 } - } - }, - body: { - type: 'EmptyStatement', - range: [37, 38], - loc: { - start: { line: 1, column: 37 }, - end: { line: 1, column: 38 } - } - }, - range: [29, 38], - loc: { - start: { line: 1, column: 29 }, - end: { line: 1, column: 38 } - } - }], - range: [13, 40], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 40 } - } - }, - rest: null, - generator: false, - expression: false, - range: [1, 40], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 40 } - } - }, - 'arguments': [], - range: [1, 42], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 42 } - } - }, - range: [0, 43], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 43 } - } - }], - range: [0, 43], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 43 } - }, - errors: [{ - index: 29, - lineNumber: 1, - column: 30, - message: 'Error: Line 1: Strict mode code may not include a with statement' - }] - }, - - '(function () { \'use strict\'; 021 }())': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'CallExpression', - callee: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '\'use strict\'', - range: [15, 27], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 27 } - } - }, - range: [15, 28], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 28 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 17, - raw: "021", - range: [29, 32], - loc: { - start: { line: 1, column: 29 }, - end: { line: 1, column: 32 } - } - }, - range: [29, 33], - loc: { - start: { line: 1, column: 29 }, - end: { line: 1, column: 33 } - } - }], - range: [13, 34], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 34 } - } - }, - rest: null, - generator: false, - expression: false, - range: [1, 34], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 34 } - } - }, - 'arguments': [], - range: [1, 36], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 36 } - } - }, - range: [0, 37], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 37 } - } - }], - range: [0, 37], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 37 } - }, - errors: [{ - index: 29, - lineNumber: 1, - column: 30, - message: 'Error: Line 1: Octal literals are not allowed in strict mode.' - }] - }, - - '"use strict"; delete x': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'UnaryExpression', - operator: 'delete', - argument: { - type: 'Identifier', - name: 'x', - range: [21, 22], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 22 } - } - }, - prefix: true, - range: [14, 22], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 22 } - } - }, - range: [14, 22], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 22 } - } - }], - range: [0, 22], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 22 } - }, - errors: [{ - index: 22, - lineNumber: 1, - column: 23, - message: 'Error: Line 1: Delete of an unqualified identifier in strict mode.' - }] - }, - - '"use strict"; try {} catch (eval) {}': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'TryStatement', - block: { - type: 'BlockStatement', - body: [], - range: [18, 20], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 20 } - } - }, - guardedHandlers: [], - handlers: [{ - type: 'CatchClause', - param: { - type: 'Identifier', - name: 'eval', - range: [28, 32], - loc: { - start: { line: 1, column: 28 }, - end: { line: 1, column: 32 } - } - }, - body: { - type: 'BlockStatement', - body: [], - range: [34, 36], - loc: { - start: { line: 1, column: 34 }, - end: { line: 1, column: 36 } - } - }, - range: [21, 36], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 36 } - } - }], - finalizer: null, - range: [14, 36], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 36 } - } - }], - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 36 } - }, - errors: [{ - index: 32, - lineNumber: 1, - column: 33, - message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' - }] - }, - - '"use strict"; try {} catch (arguments) {}': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'TryStatement', - block: { - type: 'BlockStatement', - body: [], - range: [18, 20], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 20 } - } - }, - guardedHandlers: [], - handlers: [{ - type: 'CatchClause', - param: { - type: 'Identifier', - name: 'arguments', - range: [28, 37], - loc: { - start: { line: 1, column: 28 }, - end: { line: 1, column: 37 } - } - }, - body: { - type: 'BlockStatement', - body: [], - range: [39, 41], - loc: { - start: { line: 1, column: 39 }, - end: { line: 1, column: 41 } - } - }, - range: [21, 41], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 41 } - } - }], - finalizer: null, - range: [14, 41], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 41 } - } - }], - range: [0, 41], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 41 } - }, - errors: [{ - index: 37, - lineNumber: 1, - column: 38, - message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' - }] - }, - - '"use strict"; var eval;': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'eval', - range: [18, 22], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 22 } - } - }, - init: null, - range: [18, 22], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 22 } - } - }], - kind: 'var', - range: [14, 23], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 23 } - } - }], - range: [0, 23], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 23 } - }, - errors: [{ - index: 22, - lineNumber: 1, - column: 23, - message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' - }] - }, - - '"use strict"; var arguments;': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'arguments', - range: [18, 27], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 27 } - } - }, - init: null, - range: [18, 27], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 27 } - } - }], - kind: 'var', - range: [14, 28], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 28 } - } - }], - range: [0, 28], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 28 } - }, - errors: [{ - index: 27, - lineNumber: 1, - column: 28, - message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' - }] - }, - - '"use strict"; eval = 0;': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'eval', - range: [14, 18], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 18 } - } - }, - right: { - type: 'Literal', - value: 0, - raw: '0', - range: [21, 22], - loc: { - start: { line: 1, column: 21 }, - end: { line: 1, column: 22 } - } - }, - range: [14, 22], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 22 } - } - }, - range: [14, 23], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 23 } - } - }], - range: [0, 23], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 23 } - }, - errors: [{ - index: 14, - lineNumber: 1, - column: 15, - message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' - }] - }, - - '"use strict"; eval++;': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'eval', - range: [14, 18], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 18 } - } - }, - prefix: false, - range: [14, 20], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 20 } - } - }, - range: [14, 21], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 21 } - } - }], - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - }, - errors: [{ - index: 18, - lineNumber: 1, - column: 19, - message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' - }] - }, - - '"use strict"; --eval;': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '--', - argument: { - type: 'Identifier', - name: 'eval', - range: [16, 20], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 20 } - } - }, - prefix: true, - range: [14, 20], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 20 } - } - }, - range: [14, 21], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 21 } - } - }], - range: [0, 21], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 21 } - }, - errors: [{ - index: 20, - lineNumber: 1, - column: 21, - message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' - }] - }, - - '"use strict"; arguments = 0;': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'arguments', - range: [14, 23], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 23 } - } - }, - right: { - type: 'Literal', - value: 0, - raw: '0', - range: [26, 27], - loc: { - start: { line: 1, column: 26 }, - end: { line: 1, column: 27 } - } - }, - range: [14, 27], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 27 } - } - }, - range: [14, 28], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 28 } - } - }], - range: [0, 28], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 28 } - }, - errors: [{ - index: 14, - lineNumber: 1, - column: 15, - message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' - }] - }, - - '"use strict"; arguments--;': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '--', - argument: { - type: 'Identifier', - name: 'arguments', - range: [14, 23], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 23 } - } - }, - prefix: false, - range: [14, 25], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 25 } - } - }, - range: [14, 26], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 26 } - } - }], - range: [0, 26], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 26 } - }, - errors: [{ - index: 23, - lineNumber: 1, - column: 24, - message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' - }] - }, - - '"use strict"; ++arguments;': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Identifier', - name: 'arguments', - range: [16, 25], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 25 } - } - }, - prefix: true, - range: [14, 25], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 25 } - } - }, - range: [14, 26], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 26 } - } - }], - range: [0, 26], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 26 } - }, - errors: [{ - index: 25, - lineNumber: 1, - column: 26, - message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' - }] - }, - - - '"use strict";x={y:1,y:1}': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [13, 14], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 14 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'y', - range: [16, 17], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 17 } - } - }, - value: { - type: 'Literal', - value: 1, - raw: '1', - range: [18, 19], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 19 } - } - }, - kind: 'init', - range: [16, 19], - loc: { - start: { line: 1, column: 16 }, - end: { line: 1, column: 19 } - } - }, { - type: 'Property', - key: { - type: 'Identifier', - name: 'y', - range: [20, 21], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 21 } - } - }, - value: { - type: 'Literal', - value: 1, - raw: '1', - range: [22, 23], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 23 } - } - }, - kind: 'init', - range: [20, 23], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 23 } - } - }], - range: [15, 24], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 24 } - } - }, - range: [13, 24], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 24 } - } - }, - range: [13, 24], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 24 } - } - }], - range: [0, 24], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 24 } - }, - errors: [{ - index: 23, - lineNumber: 1, - column: 24, - message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' - }] - }, - - '"use strict"; function eval() {};': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'eval', - range: [23, 27], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 27 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [30, 32], - loc: { - start: { line: 1, column: 30 }, - end: { line: 1, column: 32 } - } - }, - rest: null, - generator: false, - expression: false, - range: [14, 32], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 32 } - } - }, { - type: 'EmptyStatement', - range: [32, 33], - loc: { - start: { line: 1, column: 32 }, - end: { line: 1, column: 33 } - } - }], - range: [0, 33], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 33 } - }, - errors: [{ - index: 23, - lineNumber: 1, - column: 24, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }] - }, - - '"use strict"; function arguments() {};': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'arguments', - range: [23, 32], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 32 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [35, 37], - loc: { - start: { line: 1, column: 35 }, - end: { line: 1, column: 37 } - } - }, - rest: null, - generator: false, - expression: false, - range: [14, 37], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 37 } - } - }, { - type: 'EmptyStatement', - range: [37, 38], - loc: { - start: { line: 1, column: 37 }, - end: { line: 1, column: 38 } - } - }], - range: [0, 38], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 38 } - }, - errors: [{ - index: 23, - lineNumber: 1, - column: 24, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }] - }, - - '"use strict"; function interface() {};': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'interface', - range: [23, 32], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 32 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [35, 37], - loc: { - start: { line: 1, column: 35 }, - end: { line: 1, column: 37 } - } - }, - rest: null, - generator: false, - expression: false, - range: [14, 37], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 37 } - } - }, { - type: 'EmptyStatement', - range: [37, 38], - loc: { - start: { line: 1, column: 37 }, - end: { line: 1, column: 38 } - } - }], - range: [0, 38], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 38 } - }, - errors: [{ - index: 23, - lineNumber: 1, - column: 24, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }] - }, - - '"use strict"; (function eval() {});': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: { - type: 'Identifier', - name: 'eval', - range: [24, 28], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 28 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [31, 33], - loc: { - start: { line: 1, column: 31 }, - end: { line: 1, column: 33 } - } - }, - rest: null, - generator: false, - expression: false, - range: [15, 33], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 33 } - } - }, - range: [14, 35], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 35 } - } - }], - range: [0, 35], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 35 } - }, - errors: [{ - index: 24, - lineNumber: 1, - column: 25, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }] - }, - - '"use strict"; (function arguments() {});': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: { - type: 'Identifier', - name: 'arguments', - range: [24, 33], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 33 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [36, 38], - loc: { - start: { line: 1, column: 36 }, - end: { line: 1, column: 38 } - } - }, - rest: null, - generator: false, - expression: false, - range: [15, 38], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 38 } - } - }, - range: [14, 40], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 40 } - } - }], - range: [0, 40], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 40 } - }, - errors: [{ - index: 24, - lineNumber: 1, - column: 25, - message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' - }] - }, - - '"use strict"; (function interface() {});': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: { - type: 'Identifier', - name: 'interface', - range: [24, 33], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 33 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [36, 38], - loc: { - start: { line: 1, column: 36 }, - end: { line: 1, column: 38 } - } - }, - rest: null, - generator: false, - expression: false, - range: [15, 38], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 38 } - } - }, - range: [14, 40], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 40 } - } - }], - range: [0, 40], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 40 } - }, - errors: [{ - index: 24, - lineNumber: 1, - column: 25, - message: 'Error: Line 1: Use of future reserved word in strict mode' - }] - }, - - '"use strict"; function f(eval) {};': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'f', - range: [23, 24], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 24 } - } - }, - params: [{ - type: 'Identifier', - name: 'eval', - range: [25, 29], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 29 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [31, 33], - loc: { - start: { line: 1, column: 31 }, - end: { line: 1, column: 33 } - } - }, - rest: null, - generator: false, - expression: false, - range: [14, 33], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 33 } - } - }, { - type: 'EmptyStatement', - range: [33, 34], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 34 } - } - }], - range: [0, 34], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 34 } - }, - errors: [{ - index: 25, - lineNumber: 1, - column: 26, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }] - }, - - '"use strict"; function f(arguments) {};': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'f', - range: [23, 24], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 24 } - } - }, - params: [{ - type: 'Identifier', - name: 'arguments', - range: [25, 34], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 34 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [36, 38], - loc: { - start: { line: 1, column: 36 }, - end: { line: 1, column: 38 } - } - }, - rest: null, - generator: false, - expression: false, - range: [14, 38], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 38 } - } - }, { - type: 'EmptyStatement', - range: [38, 39], - loc: { - start: { line: 1, column: 38 }, - end: { line: 1, column: 39 } - } - }], - range: [0, 39], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 39 } - }, - errors: [{ - index: 25, - lineNumber: 1, - column: 26, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }] - }, - - '"use strict"; function f(foo, foo) {};': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'f', - range: [23, 24], - loc: { - start: { line: 1, column: 23 }, - end: { line: 1, column: 24 } - } - }, - params: [{ - type: 'Identifier', - name: 'foo', - range: [25, 28], - loc: { - start: { line: 1, column: 25 }, - end: { line: 1, column: 28 } - } - }, { - type: 'Identifier', - name: 'foo', - range: [31, 34], - loc: { - start: { line: 1, column: 31 }, - end: { line: 1, column: 34 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [36, 38], - loc: { - start: { line: 1, column: 36 }, - end: { line: 1, column: 38 } - } - }, - rest: null, - generator: false, - expression: false, - range: [14, 38], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 38 } - } - }, { - type: 'EmptyStatement', - range: [38, 39], - loc: { - start: { line: 1, column: 38 }, - end: { line: 1, column: 39 } - } - }], - range: [0, 39], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 39 } - }, - errors: [{ - index: 31, - lineNumber: 1, - column: 32, - message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' - }] - }, - - '"use strict"; (function f(eval) {});': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: { - type: 'Identifier', - name: 'f', - range: [24, 25], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 25 } - } - }, - params: [{ - type: 'Identifier', - name: 'eval', - range: [26, 30], - loc: { - start: { line: 1, column: 26 }, - end: { line: 1, column: 30 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [32, 34], - loc: { - start: { line: 1, column: 32 }, - end: { line: 1, column: 34 } - } - }, - rest: null, - generator: false, - expression: false, - range: [15, 34], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 34 } - } - }, - range: [14, 36], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 36 } - } - }], - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 36 } - }, - errors: [{ - index: 26, - lineNumber: 1, - column: 27, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }] - }, - - - '"use strict"; (function f(arguments) {});': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: { - type: 'Identifier', - name: 'f', - range: [24, 25], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 25 } - } - }, - params: [{ - type: 'Identifier', - name: 'arguments', - range: [26, 35], - loc: { - start: { line: 1, column: 26 }, - end: { line: 1, column: 35 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [37, 39], - loc: { - start: { line: 1, column: 37 }, - end: { line: 1, column: 39 } - } - }, - rest: null, - generator: false, - expression: false, - range: [15, 39], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 39 } - } - }, - range: [14, 41], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 41 } - } - }], - range: [0, 41], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 41 } - }, - errors: [{ - index: 26, - lineNumber: 1, - column: 27, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }] - }, - - '"use strict"; (function f(foo, foo) {});': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'FunctionExpression', - id: { - type: 'Identifier', - name: 'f', - range: [24, 25], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 25 } - } - }, - params: [{ - type: 'Identifier', - name: 'foo', - range: [26, 29], - loc: { - start: { line: 1, column: 26 }, - end: { line: 1, column: 29 } - } - }, { - type: 'Identifier', - name: 'foo', - range: [32, 35], - loc: { - start: { line: 1, column: 32 }, - end: { line: 1, column: 35 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [37, 39], - loc: { - start: { line: 1, column: 37 }, - end: { line: 1, column: 39 } - } - }, - rest: null, - generator: false, - expression: false, - range: [15, 39], - loc: { - start: { line: 1, column: 15 }, - end: { line: 1, column: 39 } - } - }, - range: [14, 41], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 41 } - } - }], - range: [0, 41], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 41 } - }, - errors: [{ - index: 32, - lineNumber: 1, - column: 33, - message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' - }] - }, - - '"use strict"; x = { set f(eval) {} }' : { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Identifier', - name: 'x', - range: [14, 15], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 15 } - } - }, - right: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'f', - range: [24, 25], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 25 } - } - }, - value : { - type: 'FunctionExpression', - id: null, - params: [{ - type: 'Identifier', - name: 'eval', - range: [26, 30], - loc: { - start: { line: 1, column: 26 }, - end: { line: 1, column: 30 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [32, 34], - loc: { - start: { line: 1, column: 32 }, - end: { line: 1, column: 34 } - } - }, - rest: null, - generator: false, - expression: false, - range: [32, 34], - loc: { - start: { line: 1, column: 32 }, - end: { line: 1, column: 34 } - } - }, - kind: 'set', - range: [20, 34], - loc: { - start: { line: 1, column: 20 }, - end: { line: 1, column: 34 } - } - }], - range: [18, 36], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 36 } - } - }, - range: [14, 36], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 36 } - } - }, - range: [14, 36], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 36 } - } - }], - range: [0, 36], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 36 } - }, - errors: [{ - index: 26, - lineNumber: 1, - column: 27, - message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' - }] - }, - - 'function hello() { "octal directive\\1"; "use strict"; }': { - type: 'Program', - body: [{ - type: 'FunctionDeclaration', - id: { - type: 'Identifier', - name: 'hello', - range: [9, 14], - loc: { - start: { line: 1, column: 9 }, - end: { line: 1, column: 14 } - } - }, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'octal directive\u0001', - raw: '"octal directive\\1"', - range: [19, 38], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 38 } - } - }, - range: [19, 39], - loc: { - start: { line: 1, column: 19 }, - end: { line: 1, column: 39 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [40, 52], - loc: { - start: { line: 1, column: 40 }, - end: { line: 1, column: 52 } - } - }, - range: [40, 53], - loc: { - start: { line: 1, column: 40 }, - end: { line: 1, column: 53 } - } - }], - range: [17, 55], - loc: { - start: { line: 1, column: 17 }, - end: { line: 1, column: 55 } - } - }, - rest: null, - generator: false, - expression: false, - range: [0, 55], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 55 } - } - }], - range: [0, 55], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 55 } - }, - errors: [{ - index: 19, - lineNumber: 1, - column: 20, - message: 'Error: Line 1: Octal literals are not allowed in strict mode.' - }] - }, - - '"\\1"; \'use strict\';': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: '\u0001', - raw: '"\\1"', - range: [0, 4], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 4 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, { - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '\'use strict\'', - range: [6, 18], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 18 } - } - }, - range: [6, 19], - loc: { - start: { line: 1, column: 6 }, - end: { line: 1, column: 19 } - } - }], - range: [0, 19], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 19 } - }, - errors: [{ - index: 0, - lineNumber: 1, - column: 1, - message: 'Error: Line 1: Octal literals are not allowed in strict mode.' - }] - }, - - '"use strict"; var x = { 014: 3}': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [18, 19], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 19 } - } - }, - init: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Literal', - value: 12, - raw: '014', - range: [24, 27], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 27 } - } - }, - value: { - type: 'Literal', - value: 3, - raw: '3', - range: [29, 30], - loc: { - start: { line: 1, column: 29 }, - end: { line: 1, column: 30 } - } - }, - kind: 'init', - range: [24, 30], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 30 } - } - }], - range: [22, 31], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 31 } - } - }, - range: [18, 31], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 31 } - } - }], - kind: 'var', - range: [14, 31], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 31 } - } - }], - range: [0, 31], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 31 } - }, - errors: [{ - index: 24, - lineNumber: 1, - column: 25, - message: 'Error: Line 1: Octal literals are not allowed in strict mode.' - }] - }, - - '"use strict"; var x = { get i() {}, get i() {} }': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [18, 19], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 19 } - } - }, - init: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'i', - range: [28, 29], - loc: { - start: { line: 1, column: 28 }, - end: { line: 1, column: 29 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [32, 34], - loc: { - start: { line: 1, column: 32 }, - end: { line: 1, column: 34 } - } - }, - rest: null, - generator: false, - expression: false, - range: [32, 34], - loc: { - start: { line: 1, column: 32 }, - end: { line: 1, column: 34 } - } - }, - kind: 'get', - range: [24, 34], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 34 } - } - }, { - type: 'Property', - key: { - type: 'Identifier', - name: 'i', - range: [40, 41], - loc: { - start: { line: 1, column: 40 }, - end: { line: 1, column: 41 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [44, 46], - loc: { - start: { line: 1, column: 44 }, - end: { line: 1, column: 46 } - } - }, - rest: null, - generator: false, - expression: false, - range: [44, 46], - loc: { - start: { line: 1, column: 44 }, - end: { line: 1, column: 46 } - } - }, - kind: 'get', - range: [36, 46], - loc: { - start: { line: 1, column: 36 }, - end: { line: 1, column: 46 } - } - }], - range: [22, 48], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 48 } - } - }, - range: [18, 48], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 48 } - } - }], - kind: 'var', - range: [14, 48], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 48 } - } - }], - range: [0, 48], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 48 } - }, - errors: [{ - index: 46, - lineNumber: 1, - column: 47, - message: 'Error: Line 1: Object literal may not have multiple get/set accessors with the same name' - }] - }, - - '"use strict"; var x = { i: 42, get i() {} }': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [18, 19], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 19 } - } - }, - init: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'i', - range: [24, 25], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 25 } - } - }, - value: { - type: 'Literal', - value: 42, - raw: '42', - range: [27, 29], - loc: { - start: { line: 1, column: 27 }, - end: { line: 1, column: 29 } - } - }, - kind: 'init', - range: [24, 29], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 29 } - } - }, { - type: 'Property', - key: { - type: 'Identifier', - name: 'i', - range: [35, 36], - loc: { - start: { line: 1, column: 35 }, - end: { line: 1, column: 36 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [39, 41], - loc: { - start: { line: 1, column: 39 }, - end: { line: 1, column: 41 } - } - }, - rest: null, - generator: false, - expression: false, - range: [39, 41], - loc: { - start: { line: 1, column: 39 }, - end: { line: 1, column: 41 } - } - }, - kind: 'get', - range: [31, 41], - loc: { - start: { line: 1, column: 31 }, - end: { line: 1, column: 41 } - } - }], - range: [22, 43], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 43 } - } - }, - range: [18, 43], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 43 } - } - }], - kind: 'var', - range: [14, 43], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 43 } - } - }], - range: [0, 43], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 43 } - }, - errors: [{ - index: 41, - lineNumber: 1, - column: 42, - message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' - }] - }, - - '"use strict"; var x = { set i(x) {}, i: 42 }': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'Literal', - value: 'use strict', - raw: '"use strict"', - range: [0, 12], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 12 } - } - }, - range: [0, 13], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 13 } - } - }, { - type: 'VariableDeclaration', - declarations: [{ - type: 'VariableDeclarator', - id: { - type: 'Identifier', - name: 'x', - range: [18, 19], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 19 } - } - }, - init: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 'i', - range: [28, 29], - loc: { - start: { line: 1, column: 28 }, - end: { line: 1, column: 29 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [{ - type: 'Identifier', - name: 'x', - range: [30, 31], - loc: { - start: { line: 1, column: 30 }, - end: { line: 1, column: 31 } - } - }], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [33, 35], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 35 } - } - }, - rest: null, - generator: false, - expression: false, - range: [33, 35], - loc: { - start: { line: 1, column: 33 }, - end: { line: 1, column: 35 } - } - }, - kind: 'set', - range: [24, 35], - loc: { - start: { line: 1, column: 24 }, - end: { line: 1, column: 35 } - } - }, { - type: 'Property', - key: { - type: 'Identifier', - name: 'i', - range: [37, 38], - loc: { - start: { line: 1, column: 37 }, - end: { line: 1, column: 38 } - } - }, - value: { - type: 'Literal', - value: 42, - raw: '42', - range: [40, 42], - loc: { - start: { line: 1, column: 40 }, - end: { line: 1, column: 42 } - } - }, - kind: 'init', - range: [37, 42], - loc: { - start: { line: 1, column: 37 }, - end: { line: 1, column: 42 } - } - }], - range: [22, 44], - loc: { - start: { line: 1, column: 22 }, - end: { line: 1, column: 44 } - } - }, - range: [18, 44], - loc: { - start: { line: 1, column: 18 }, - end: { line: 1, column: 44 } - } - }], - kind: 'var', - range: [14, 44], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 44 } - } - }], - range: [0, 44], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 44 } - }, - errors: [{ - index: 42, - lineNumber: 1, - column: 43, - message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' - }] - - - }, - - '({ set s() { } })': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'ObjectExpression', - properties: [{ - type: 'Property', - key: { - type: 'Identifier', - name: 's', - range: [7, 8], - loc: { - start: { line: 1, column: 7 }, - end: { line: 1, column: 8 } - } - }, - value: { - type: 'FunctionExpression', - id: null, - params: [], - defaults: [], - body: { - type: 'BlockStatement', - body: [], - range: [11, 14], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 14 } - } - }, - rest: null, - generator: false, - expression: false, - range: [11, 14], - loc: { - start: { line: 1, column: 11 }, - end: { line: 1, column: 14 } - } - }, - kind: 'set', - range: [3, 14], - loc: { - start: { line: 1, column: 3 }, - end: { line: 1, column: 14 } - } - }], - range: [1, 16], - loc: { - start: { line: 1, column: 1 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - } - }], - range: [0, 17], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 17 } - }, - errors: [{ - index: 9, - lineNumber: 1, - column: 10, - message: 'Error: Line 1: Unexpected token )' - }] - }, - - 'foo("bar") = baz': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'CallExpression', - callee: { - type: 'Identifier', - name: 'foo', - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - 'arguments': [{ - type: 'Literal', - value: 'bar', - raw: '"bar"', - range: [4, 9], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 9 } - } - }], - range: [0, 10], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 10 } - } - }, - right: { - type: 'Identifier', - name: 'baz', - range: [13, 16], - loc: { - start: { line: 1, column: 13 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }], - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - }, - errors: [{ - index: 10, - lineNumber: 1, - column: 11, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }] - }, - - '1 = 2': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'AssignmentExpression', - operator: '=', - left: { - type: 'Literal', - value: 1, - raw: '1', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - right: { - type: 'Literal', - value: 2, - raw: '2', - range: [4, 5], - loc: { - start: { line: 1, column: 4 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }, - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - } - }], - range: [0, 5], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 5 } - }, - errors: [{ - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }] - }, - - '3++': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '++', - argument: { - type: 'Literal', - value: 3, - raw: '3', - range: [0, 1], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 1 } - } - }, - prefix: false, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }], - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - }, - errors: [{ - index: 1, - lineNumber: 1, - column: 2, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }] - }, - - '--4': { - type: 'Program', - body: [{ - type: 'ExpressionStatement', - expression: { - type: 'UpdateExpression', - operator: '--', - argument: { - type: 'Literal', - value: 4, - raw: '4', - range: [2, 3], - loc: { - start: { line: 1, column: 2 }, - end: { line: 1, column: 3 } - } - }, - prefix: true, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }, - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - } - }], - range: [0, 3], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 3 } - }, - errors: [{ - index: 3, - lineNumber: 1, - column: 4, - message: 'Error: Line 1: Invalid left-hand side in assignment' - }] - }, - - 'for (5 in []) {}': { - type: 'Program', - body: [{ - type: 'ForInStatement', - left: { - type: 'Literal', - value: 5, - raw: '5', - range: [5, 6], - loc: { - start: { line: 1, column: 5 }, - end: { line: 1, column: 6 } - } - }, - right: { - type: 'ArrayExpression', - elements: [], - range: [10, 12], - loc: { - start: { line: 1, column: 10 }, - end: { line: 1, column: 12 } - } - }, - body: { - type: 'BlockStatement', - body: [], - range: [14, 16], - loc: { - start: { line: 1, column: 14 }, - end: { line: 1, column: 16 } - } - }, - each: false, - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - } - }], - range: [0, 16], - loc: { - start: { line: 1, column: 0 }, - end: { line: 1, column: 16 } - }, - errors: [{ - index: 6, - lineNumber: 1, - column: 7, - message: 'Error: Line 1: Invalid left-hand side in for-in' - }] - } - - - } -}; - diff --git a/node_modules/grunt/node_modules/js-yaml/package.json b/node_modules/grunt/node_modules/js-yaml/package.json deleted file mode 100644 index 43b050a56a9f..000000000000 --- a/node_modules/grunt/node_modules/js-yaml/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "js-yaml", - "version": "2.0.5", - "description": "YAML 1.2 parser and serializer", - "keywords": [ - "yaml", - "parser", - "serializer", - "pyyaml" - ], - "homepage": "https://github.com/nodeca/js-yaml", - "author": { - "name": "Dervus Grim", - "email": "dervus@lavabit.com" - }, - "contributors": [ - { - "name": "Aleksey V Zapparov", - "email": "ixti@member.fsf.org", - "url": "http://www.ixti.net/" - }, - { - "name": "Martin Grenfell", - "email": "martin.grenfell@gmail.com", - "url": "http://got-ravings.blogspot.com" - } - ], - "bugs": { - "url": "https://github.com/nodeca/js-yaml/issues" - }, - "license": { - "type": "MIT", - "url": "https://github.com/nodeca/js-yaml/blob/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodeca/js-yaml.git" - }, - "main": "./index.js", - "bin": { - "js-yaml": "bin/js-yaml.js" - }, - "scripts": { - "test": "make test" - }, - "dependencies": { - "argparse": "~ 0.1.11", - "esprima": "~ 1.0.2" - }, - "devDependencies": { - "mocha": "*" - }, - "engines": { - "node": ">= 0.6.0" - }, - "readme": "JS-YAML - YAML 1.2 parser and serializer for JavaScript\n=======================================================\n\n[![Build Status](https://secure.travis-ci.org/nodeca/js-yaml.png)](http://travis-ci.org/nodeca/js-yaml)\n\n[Online Demo](http://nodeca.github.com/js-yaml/)\n\n\nThis is an implementation of [YAML](http://yaml.org/), a human friendly data\nserialization language. Started as [PyYAML](http://pyyaml.org/) port, it was\ncompletely rewritten from scratch. Now it's very fast, and supports 1.2 spec.\n\n\nBreaking changes in 1.x.x -> 2.0.x\n----------------------------------\n\nIf your have not used __custom__ tags or loader classes - no changes needed. Just\nupgrade library and enjoy high parse speed.\n\nIn other case, you should rewrite your tag constructors and custom loader\nclasses, to conform new schema-based API. See\n[examples](https://github.com/nodeca/js-yaml/tree/master/examples) and\n[wiki](https://github.com/nodeca/js-yaml/wiki) for details.\nNote, that parser internals were completely rewritten.\n\n\nInstallation\n------------\n\n### YAML module for node.js\n\n```\nnpm install js-yaml\n```\n\n\n### CLI executable\n\nIf you want to inspect your YAML files from CLI, install js-yaml globally:\n\n```\nnpm install js-yaml -g\n```\n\n#### Usage\n\n```\nusage: js-yaml [-h] [-v] [-c] [-j] [-t] file\n\nPositional arguments:\n file File with YAML document(s)\n\nOptional arguments:\n -h, --help Show this help message and exit.\n -v, --version Show program's version number and exit.\n -c, --compact Display errors in compact mode\n -j, --to-json Output a non-funky boring JSON\n -t, --trace Show stack trace on error\n```\n\n\n### Bundled YAML library for browsers\n\n``` html\n\n\n```\n\nBrowser support was done mostly for online demo. If you find any errors - feel\nfree to send pull requests with fixes. Also note, that IE and other old browsers\nneeds [es5-shims](https://github.com/kriskowal/es5-shim) to operate.\n\n\nAPI\n---\n\nHere we cover the most 'useful' methods. If you need advanced details (creating\nyour own tags), see [wiki](https://github.com/nodeca/js-yaml/wiki) and\n[examples](https://github.com/nodeca/js-yaml/tree/master/examples) for more\ninfo.\n\nIn node.js JS-YAML automatically registers handlers for `.yml` and `.yaml`\nfiles. You can load them just with `require`. That's mostly equivalent to\ncalling `load()` on fetched content of a file. Just with one string!\n\n``` javascript\nrequire('js-yaml');\n\n// Get document, or throw exception on error\ntry {\n var doc = require('/home/ixti/example.yml');\n console.log(doc);\n} catch (e) {\n console.log(e);\n}\n```\n\n\n### load (string [ , options ])\n\nParses `string` as single YAML document. Returns a JavaScript object or throws\n`YAMLException` on error.\n\nNOTE: This function **does not** understands multi-document sources, it throws\nexception on those.\n\noptions:\n\n- `filename` _(default: null)_ - string to be used as a file path in\n error/warning messages.\n- `strict` _(default - false)_ makes the loader to throw errors instead of\n warnings.\n- `schema` _(default: `DEFAULT_SCHEMA`)_ - specifies a schema to use.\n\n\n### loadAll (string, iterator [ , options ])\n\nSame as `load()`, but understands multi-document sources and apply `iterator` to\neach document.\n\n``` javascript\nvar yaml = require('js-yaml');\n\nyaml.loadAll(data, function (doc) {\n console.log(doc);\n});\n```\n\n\n### safeLoad (string [ , options ])\n\nSame as `load()` but uses `SAFE_SCHEMA` by default - only recommended tags of\nYAML specification (no JavaScript-specific tags, e.g. `!!js/regexp`).\n\n\n### safeLoadAll (string, iterator [ , options ])\n\nSame as `loadAll()` but uses `SAFE_SCHEMA` by default - only recommended tags of\nYAML specification (no JavaScript-specific tags, e.g. `!!js/regexp`).\n\n\n### dump (object [ , options ])\n\nSerializes `object` as YAML document.\n\noptions:\n\n- `indent` _(default: 2)_ - indentation width to use (in spaces).\n- `flowLevel` (default: -1) - specifies level of nesting, when to switch from\n block to flow style for collections. -1 means block style everwhere\n- `styles` - \"tag\" => \"style\" map. Each tag may have own set of styles.\n- `schema` _(default: `DEFAULT_SCHEMA`)_ specifies a schema to use.\n\nstyles:\n\n``` none\n!!null\n \"canonical\" => \"~\"\n\n!!int\n \"binary\" => \"0b1\", \"0b101010\", \"0b1110001111010\"\n \"octal\" => \"01\", \"052\", \"016172\"\n \"decimal\" => \"1\", \"42\", \"7290\"\n \"hexadecimal\" => \"0x1\", \"0x2A\", \"0x1C7A\"\n\n!!null, !!bool, !!float\n \"lowercase\" => \"null\", \"true\", \"false\", \".nan\", '.inf'\n \"uppercase\" => \"NULL\", \"TRUE\", \"FALSE\", \".NAN\", '.INF'\n \"camelcase\" => \"Null\", \"True\", \"False\", \".NaN\", '.Inf'\n```\n\nBy default, !!int uses `decimal`, and !!null, !!bool, !!float use `lowercase`.\n\n\n### safeDump (object [ , options ])\n\nSame as `dump()` but uses `SAFE_SCHEMA` by default - only recommended tags of\nYAML specification (no JavaScript-specific tags, e.g. `!!js/regexp`).\n\n\nSupported YAML types\n--------------------\n\nThe list of standard YAML tags and corresponding JavaScipt types. See also\n[YAML tag discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and\n[YAML types repository](http://yaml.org/type/).\n\n```\n!!null '' # null\n!!bool 'yes' # bool\n!!int '3...' # number\n!!float '3.14...' # number\n!!binary '...base64...' # buffer\n!!timestamp 'YYYY-...' # date\n!!omap [ ... ] # array of key-value pairs\n!!pairs [ ... ] # array or array pairs\n!!set { ... } # array of objects with given keys and null values\n!!str '...' # string\n!!seq [ ... ] # array\n!!map { ... } # object\n```\n\n**JavaScript-specific tags**\n\n```\n!!js/regexp /pattern/gim # RegExp\n!!js/undefined '' # Undefined\n!!js/function 'function () {...}' # Function\n```\n\n\n\n\n## Caveats\n\nNote, that you use arrays or objects as key in JS-YAML. JS do not allows objects\nor array as keys, and stringifies (by calling .toString method) them at the\nmoment of adding them.\n\n``` yaml\n---\n? [ foo, bar ]\n: - baz\n? { foo: bar }\n: - baz\n - baz\n```\n\n``` javascript\n{ \"foo,bar\": [\"baz\"], \"[object Object]\": [\"baz\", \"baz\"] }\n```\n\nAlso, reading of properties on implicit block mapping keys is not supported yet.\nSo, the following YAML document cannot be loaded.\n\n``` yaml\n&anchor foo:\n foo: bar\n *anchor: duplicate key\n baz: bat\n *anchor: duplicate key\n```\n\n## License\n\nView the [LICENSE](https://github.com/nodeca/js-yaml/blob/master/LICENSE) file\n(MIT).\n", - "readmeFilename": "README.md", - "_id": "js-yaml@2.0.5", - "_from": "js-yaml@~2.0.5" -} diff --git a/node_modules/grunt/node_modules/lodash/README.md b/node_modules/grunt/node_modules/lodash/README.md deleted file mode 100644 index 55dae80fe275..000000000000 --- a/node_modules/grunt/node_modules/lodash/README.md +++ /dev/null @@ -1,140 +0,0 @@ -# Lo-Dash v0.9.2 - -A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features). - -## Download - - * [Development build](https://raw.github.com/lodash/lodash/0.9.2/lodash.js) - * [Production build](https://raw.github.com/lodash/lodash/0.9.2/lodash.min.js) - * [Underscore build](https://raw.github.com/lodash/lodash/0.9.2/lodash.underscore.min.js) tailored for projects already using Underscore - * CDN copies of ≤ v0.9.2’s [Production](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.9.2/lodash.min.js), [Underscore](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.9.2/lodash.underscore.min.js), and [Development](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.9.2/lodash.js) builds are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/) - * For optimal file size, [create a custom build](http://lodash.com/custom-builds) with only the features you need - -## Dive in - -We’ve got [API docs](http://lodash.com/docs), [benchmarks](http://lodash.com/benchmarks), and [unit tests](http://lodash.com/tests). - -Create your own benchmarks at [jsPerf](http://jsperf.com), or [search](http://jsperf.com/search?q=lodash) for existing ones. - -For a list of upcoming features, check out our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap). - -## Screencasts - -For more information check out these screencasts over Lo-Dash: - - * [Introducing Lo-Dash](https://vimeo.com/44154599) - * [Lo-Dash optimizations and custom builds](https://vimeo.com/44154601) - * [Lo-Dash’s origin and why it’s a better utility belt](https://vimeo.com/44154600) - * [Unit testing in Lo-Dash](https://vimeo.com/45865290) - * [Lo-Dash’s approach to native method use](https://vimeo.com/48576012) - -## Features - - * AMD loader support ([RequireJS](http://requirejs.org/), [curl.js](https://github.com/cujojs/curl), etc.) - * [_.clone](http://lodash.com/docs#clone) supports *“deepâ€* cloning - * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` argument - * [_.forEach](http://lodash.com/docs#forEach) is chainable and supports exiting iteration early - * [_.forIn](http://lodash.com/docs#forIn) for iterating over an object’s own and inherited properties - * [_.forOwn](http://lodash.com/docs#forOwn) for iterating over an object’s own properties - * [_.isPlainObject](http://lodash.com/docs#isPlainObject) checks if values are created by the `Object` constructor - * [_.lateBind](http://lodash.com/docs#lateBind) for late binding - * [_.merge](http://lodash.com/docs#merge) for a *“deepâ€* [_.extend](http://lodash.com/docs#extend) - * [_.partial](http://lodash.com/docs#partial) for partial application without `this` binding - * [_.pick](http://lodash.com/docs#pick) and [_.omit](http://lodash.com/docs#omit) accepts `callback` and `thisArg` arguments - * [_.template](http://lodash.com/docs#template) supports [ES6 delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6) and utilizes [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier debugging - * [_.contains](http://lodash.com/docs#contains), [_.size](http://lodash.com/docs#size), [_.toArray](http://lodash.com/docs#toArray), - [and more…](http://lodash.com/docs "_.countBy, _.every, _.filter, _.find, _.forEach, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.some, _.sortBy, _.where") accept strings - -## Support - -Lo-Dash has been tested in at least Chrome 5~23, Firefox 1~16, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.8.14, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC5. - -## Installation and usage - -In browsers: - -```html - -``` - -Using [npm](http://npmjs.org/): - -```bash -npm install lodash - -npm install -g lodash -npm link lodash -``` - -In [Node.js](http://nodejs.org/) and [RingoJS v0.8.0+](http://ringojs.org/): - -```js -var _ = require('lodash'); -``` - -**Note:** If Lo-Dash is installed globally, [run `npm link lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory before requiring it. - -In [RingoJS v0.7.0-](http://ringojs.org/): - -```js -var _ = require('lodash')._; -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('lodash.js'); -``` - -In an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require({ - 'paths': { - 'underscore': 'path/to/lodash' - } -}, -['underscore'], function(_) { - console.log(_.VERSION); -}); -``` - -## Resolved Underscore.js issues - - * Allow iteration of objects with a `length` property [[#799](https://github.com/documentcloud/underscore/pull/799), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L545-551)] - * Fix cross-browser object iteration bugs [[#60](https://github.com/documentcloud/underscore/issues/60), [#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L558-582)] - * Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [#742](https://github.com/documentcloud/underscore/issues/742), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L140-146)] - * `_.isEmpty` should support jQuery/MooTools DOM query collections [[#690](https://github.com/documentcloud/underscore/pull/690), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L747-752)] - * `_.isObject` should avoid V8 bug [#2291](http://code.google.com/p/8/issues/detail?id=2291) [[#605](https://github.com/documentcloud/underscore/issues/605), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L828-840)] - * `_.keys` should work with `arguments` objects cross-browser [[#396](https://github.com/documentcloud/underscore/issues/396), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L921-923)] - * `_.range` should coerce arguments to numbers [[#634](https://github.com/documentcloud/underscore/issues/634), [#683](https://github.com/documentcloud/underscore/issues/683), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L1337-1340)] - -## Release Notes - -### v0.9.2 - - * Added `fromIndex` argument to `_.contains` - * Added `moduleId` build option - * Added Closure Compiler *“simpleâ€* optimizations to the build process - * Added support for strings in `_.max` and `_.min` - * Added support for ES6 template delimiters to `_.template` - * Ensured re-minification of Lo-Dash by third parties avoids Closure Compiler bugs - * Optimized `_.every`, `_.find`, `_.some`, and `_.uniq` - -The full changelog is available [here](https://github.com/lodash/lodash/wiki/Changelog). - -## BestieJS - -Lo-Dash is part of the [BestieJS](https://github.com/bestiejs) *“Best in Classâ€* module collection. This means we promote solid browser/environment support, ES5 precedents, unit testing, and plenty of documentation. - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](http://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://iceddev.com/) | [Kit Cambridge](http://kitcambridge.github.io/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/grunt/node_modules/lodash/lodash.js b/node_modules/grunt/node_modules/lodash/lodash.js deleted file mode 100644 index 9eae931c2731..000000000000 --- a/node_modules/grunt/node_modules/lodash/lodash.js +++ /dev/null @@ -1,4258 +0,0 @@ -/*! - * Lo-Dash v0.9.2 - * (c) 2012 John-David Dalton - * Based on Underscore.js 1.4.2 - * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. - * Available under MIT license - */ -;(function(window, undefined) { - - /** Detect free variable `exports` */ - var freeExports = typeof exports == 'object' && exports; - - /** Detect free variable `global` and use it as `window` */ - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal) { - window = freeGlobal; - } - - /** Used for array and object method references */ - var arrayRef = [], - // avoid a Closure Compiler bug by creatively creating an object - objectRef = new function(){}; - - /** Used to generate unique IDs */ - var idCounter = 0; - - /** Used internally to indicate various things */ - var indicatorObject = objectRef; - - /** Used by `cachedContains` as the default size when optimizations are enabled for large arrays */ - var largeArraySize = 30; - - /** Used to restore the original `_` reference in `noConflict` */ - var oldDash = window._; - - /** Used to detect template delimiter values that require a with-statement */ - var reComplexDelimiter = /[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/; - - /** Used to match HTML entities */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#x27);/g; - - /** Used to match empty string literals in compiled template source */ - var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - - /** Used to match regexp flags from their coerced string values */ - var reFlags = /\w*$/; - - /** Used to insert the data object variable into compiled template source */ - var reInsertVariable = /(?:__e|__t = )\(\s*(?![\d\s"']|this\.)/g; - - /** Used to detect if a method is native */ - var reNative = RegExp('^' + - (objectRef.valueOf + '') - .replace(/[.*+?^=!:${}()|[\]\/\\]/g, '\\$&') - .replace(/valueOf|for [^\]]+/g, '.+?') + '$' - ); - - /** - * Used to match ES6 template delimiters - * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6 - */ - var reEsTemplate = /\$\{((?:(?=\\?)\\?[\s\S])*?)}/g; - - /** Used to match "interpolate" template delimiters */ - var reInterpolate = /<%=([\s\S]+?)%>/g; - - /** Used to ensure capturing order of template delimiters */ - var reNoMatch = /($^)/; - - /** Used to match HTML characters */ - var reUnescapedHtml = /[&<>"']/g; - - /** Used to match unescaped characters in compiled string literals */ - var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; - - /** Used to fix the JScript [[DontEnum]] bug */ - var shadowed = [ - 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', - 'toLocaleString', 'toString', 'valueOf' - ]; - - /** Used to make template sourceURLs easier to identify */ - var templateCounter = 0; - - /** Native method shortcuts */ - var ceil = Math.ceil, - concat = arrayRef.concat, - floor = Math.floor, - getPrototypeOf = reNative.test(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf, - hasOwnProperty = objectRef.hasOwnProperty, - push = arrayRef.push, - propertyIsEnumerable = objectRef.propertyIsEnumerable, - slice = arrayRef.slice, - toString = objectRef.toString; - - /* Native method shortcuts for methods with the same name as other `lodash` methods */ - var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind, - nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray, - nativeIsFinite = window.isFinite, - nativeIsNaN = window.isNaN, - nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys, - nativeMax = Math.max, - nativeMin = Math.min, - nativeRandom = Math.random; - - /** `Object#toString` result shortcuts */ - var argsClass = '[object Arguments]', - arrayClass = '[object Array]', - boolClass = '[object Boolean]', - dateClass = '[object Date]', - funcClass = '[object Function]', - numberClass = '[object Number]', - objectClass = '[object Object]', - regexpClass = '[object RegExp]', - stringClass = '[object String]'; - - /** - * Detect the JScript [[DontEnum]] bug: - * - * In IE < 9 an objects own properties, shadowing non-enumerable ones, are - * made non-enumerable as well. - */ - var hasDontEnumBug; - - /** Detect if own properties are iterated after inherited properties (IE < 9) */ - var iteratesOwnLast; - - /** - * Detect if `Array#shift` and `Array#splice` augment array-like objects - * incorrectly: - * - * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()` - * and `splice()` functions that fail to remove the last element, `value[0]`, - * of array-like objects even though the `length` property is set to `0`. - * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()` - * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. - */ - var hasObjectSpliceBug = (hasObjectSpliceBug = { '0': 1, 'length': 1 }, - arrayRef.splice.call(hasObjectSpliceBug, 0, 1), hasObjectSpliceBug[0]); - - /** Detect if an `arguments` object's indexes are non-enumerable (IE < 9) */ - var noArgsEnum = true; - - (function() { - var props = []; - function ctor() { this.x = 1; } - ctor.prototype = { 'valueOf': 1, 'y': 1 }; - for (var prop in new ctor) { props.push(prop); } - for (prop in arguments) { noArgsEnum = !prop; } - - hasDontEnumBug = !/valueOf/.test(props); - iteratesOwnLast = props[0] != 'x'; - }(1)); - - /** Detect if an `arguments` object's [[Class]] is unresolvable (Firefox < 4, IE < 9) */ - var noArgsClass = !isArguments(arguments); - - /** Detect if `Array#slice` cannot be used to convert strings to arrays (Opera < 10.52) */ - var noArraySliceOnStrings = slice.call('x')[0] != 'x'; - - /** - * Detect lack of support for accessing string characters by index: - * - * IE < 8 can't access characters by index and IE 8 can only access - * characters by index on string literals. - */ - var noCharByIndex = ('x'[0] + Object('x')[0]) != 'xx'; - - /** - * Detect if a node's [[Class]] is unresolvable (IE < 9) - * and that the JS engine won't error when attempting to coerce an object to - * a string without a `toString` property value of `typeof` "function". - */ - try { - var noNodeClass = ({ 'toString': 0 } + '', toString.call(window.document || 0) == objectClass); - } catch(e) { } - - /* Detect if `Function#bind` exists and is inferred to be fast (all but V8) */ - var isBindFast = nativeBind && /\n|Opera/.test(nativeBind + toString.call(window.opera)); - - /* Detect if `Object.keys` exists and is inferred to be fast (IE, Opera, V8) */ - var isKeysFast = nativeKeys && /^.+$|true/.test(nativeKeys + !!window.attachEvent); - - /** - * Detect if sourceURL syntax is usable without erroring: - * - * The JS engine in Adobe products, like InDesign, will throw a syntax error - * when it encounters a single line comment beginning with the `@` symbol. - * - * The JS engine in Narwhal will generate the function `function anonymous(){//}` - * and throw a syntax error. - * - * Avoid comments beginning `@` symbols in IE because they are part of its - * non-standard conditional compilation support. - * http://msdn.microsoft.com/en-us/library/121hztk3(v=vs.94).aspx - */ - try { - var useSourceURL = (Function('//@')(), !window.attachEvent); - } catch(e) { } - - /** Used to identify object classifications that `_.clone` supports */ - var cloneableClasses = {}; - cloneableClasses[argsClass] = cloneableClasses[funcClass] = false; - cloneableClasses[arrayClass] = cloneableClasses[boolClass] = cloneableClasses[dateClass] = - cloneableClasses[numberClass] = cloneableClasses[objectClass] = cloneableClasses[regexpClass] = - cloneableClasses[stringClass] = true; - - /** Used to determine if values are of the language type Object */ - var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false - }; - - /** Used to escape characters for inclusion in compiled string literals */ - var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - /*--------------------------------------------------------------------------*/ - - /** - * The `lodash` function. - * - * @name _ - * @constructor - * @category Chaining - * @param {Mixed} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns a `lodash` instance. - */ - function lodash(value) { - // exit early if already wrapped - if (value && value.__wrapped__) { - return value; - } - // allow invoking `lodash` without the `new` operator - if (!(this instanceof lodash)) { - return new lodash(value); - } - this.__wrapped__ = value; - } - - /** - * By default, the template delimiters used by Lo-Dash are similar to those in - * embedded Ruby (ERB). Change the following template settings to use alternative - * delimiters. - * - * @static - * @memberOf _ - * @type Object - */ - lodash.templateSettings = { - - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @static - * @memberOf _.templateSettings - * @type RegExp - */ - 'escape': /<%-([\s\S]+?)%>/g, - - /** - * Used to detect code to be evaluated. - * - * @static - * @memberOf _.templateSettings - * @type RegExp - */ - 'evaluate': /<%([\s\S]+?)%>/g, - - /** - * Used to detect `data` property values to inject. - * - * @static - * @memberOf _.templateSettings - * @type RegExp - */ - 'interpolate': reInterpolate, - - /** - * Used to reference the data object in the template text. - * - * @static - * @memberOf _.templateSettings - * @type String - */ - 'variable': '' - }; - - /*--------------------------------------------------------------------------*/ - - /** - * The template used to create iterator functions. - * - * @private - * @param {Obect} data The data object used to populate the text. - * @returns {String} Returns the interpolated text. - */ - var iteratorTemplate = template( - // conditional strict mode - '<% if (obj.useStrict) { %>\'use strict\';\n<% } %>' + - - // the `iteratee` may be reassigned by the `top` snippet - 'var index, value, iteratee = <%= firstArg %>, ' + - // assign the `result` variable an initial value - 'result = <%= firstArg %>;\n' + - // exit early if the first argument is falsey - 'if (!<%= firstArg %>) return result;\n' + - // add code before the iteration branches - '<%= top %>;\n' + - - // array-like iteration: - '<% if (arrayLoop) { %>' + - 'var length = iteratee.length; index = -1;\n' + - 'if (typeof length == \'number\') {' + - - // add support for accessing string characters by index if needed - ' <% if (noCharByIndex) { %>\n' + - ' if (isString(iteratee)) {\n' + - ' iteratee = iteratee.split(\'\')\n' + - ' }' + - ' <% } %>\n' + - - // iterate over the array-like value - ' while (++index < length) {\n' + - ' value = iteratee[index];\n' + - ' <%= arrayLoop %>\n' + - ' }\n' + - '}\n' + - 'else {' + - - // object iteration: - // add support for iterating over `arguments` objects if needed - ' <% } else if (noArgsEnum) { %>\n' + - ' var length = iteratee.length; index = -1;\n' + - ' if (length && isArguments(iteratee)) {\n' + - ' while (++index < length) {\n' + - ' value = iteratee[index += \'\'];\n' + - ' <%= objectLoop %>\n' + - ' }\n' + - ' } else {' + - ' <% } %>' + - - // Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 - // (if the prototype or a property on the prototype has been set) - // incorrectly sets a function's `prototype` property [[Enumerable]] - // value to `true`. Because of this Lo-Dash standardizes on skipping - // the the `prototype` property of functions regardless of its - // [[Enumerable]] value. - ' <% if (!hasDontEnumBug) { %>\n' + - ' var skipProto = typeof iteratee == \'function\' && \n' + - ' propertyIsEnumerable.call(iteratee, \'prototype\');\n' + - ' <% } %>' + - - // iterate own properties using `Object.keys` if it's fast - ' <% if (isKeysFast && useHas) { %>\n' + - ' var ownIndex = -1,\n' + - ' ownProps = objectTypes[typeof iteratee] ? nativeKeys(iteratee) : [],\n' + - ' length = ownProps.length;\n\n' + - ' while (++ownIndex < length) {\n' + - ' index = ownProps[ownIndex];\n' + - ' <% if (!hasDontEnumBug) { %>if (!(skipProto && index == \'prototype\')) {\n <% } %>' + - ' value = iteratee[index];\n' + - ' <%= objectLoop %>\n' + - ' <% if (!hasDontEnumBug) { %>}\n<% } %>' + - ' }' + - - // else using a for-in loop - ' <% } else { %>\n' + - ' for (index in iteratee) {<%' + - ' if (!hasDontEnumBug || useHas) { %>\n if (<%' + - ' if (!hasDontEnumBug) { %>!(skipProto && index == \'prototype\')<% }' + - ' if (!hasDontEnumBug && useHas) { %> && <% }' + - ' if (useHas) { %>hasOwnProperty.call(iteratee, index)<% }' + - ' %>) {' + - ' <% } %>\n' + - ' value = iteratee[index];\n' + - ' <%= objectLoop %>;' + - ' <% if (!hasDontEnumBug || useHas) { %>\n }<% } %>\n' + - ' }' + - ' <% } %>' + - - // Because IE < 9 can't set the `[[Enumerable]]` attribute of an - // existing property and the `constructor` property of a prototype - // defaults to non-enumerable, Lo-Dash skips the `constructor` - // property when it infers it's iterating over a `prototype` object. - ' <% if (hasDontEnumBug) { %>\n\n' + - ' var ctor = iteratee.constructor;\n' + - ' <% for (var k = 0; k < 7; k++) { %>\n' + - ' index = \'<%= shadowed[k] %>\';\n' + - ' if (<%' + - ' if (shadowed[k] == \'constructor\') {' + - ' %>!(ctor && ctor.prototype === iteratee) && <%' + - ' } %>hasOwnProperty.call(iteratee, index)) {\n' + - ' value = iteratee[index];\n' + - ' <%= objectLoop %>\n' + - ' }' + - ' <% } %>' + - ' <% } %>' + - ' <% if (arrayLoop || noArgsEnum) { %>\n}<% } %>\n' + - - // add code to the bottom of the iteration function - '<%= bottom %>;\n' + - // finally, return the `result` - 'return result' - ); - - /** - * Reusable iterator options shared by `forEach`, `forIn`, and `forOwn`. - */ - var forEachIteratorOptions = { - 'args': 'collection, callback, thisArg', - 'top': 'callback = createCallback(callback, thisArg)', - 'arrayLoop': 'if (callback(value, index, collection) === false) return result', - 'objectLoop': 'if (callback(value, index, collection) === false) return result' - }; - - /** Reusable iterator options for `defaults`, and `extend` */ - var extendIteratorOptions = { - 'useHas': false, - 'args': 'object', - 'top': - 'for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) {\n' + - ' if (iteratee = arguments[argsIndex]) {', - 'objectLoop': 'result[index] = value', - 'bottom': ' }\n}' - }; - - /** Reusable iterator options for `forIn` and `forOwn` */ - var forOwnIteratorOptions = { - 'arrayLoop': null - }; - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a function optimized to search large arrays for a given `value`, - * starting at `fromIndex`, using strict equality for comparisons, i.e. `===`. - * - * @private - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=0] The index to search from. - * @param {Number} [largeSize=30] The length at which an array is considered large. - * @returns {Boolean} Returns `true` if `value` is found, else `false`. - */ - function cachedContains(array, fromIndex, largeSize) { - fromIndex || (fromIndex = 0); - - var length = array.length, - isLarge = (length - fromIndex) >= (largeSize || largeArraySize); - - if (isLarge) { - var cache = {}, - index = fromIndex - 1; - - while (++index < length) { - // manually coerce `value` to a string because `hasOwnProperty`, in some - // older versions of Firefox, coerces objects incorrectly - var key = array[index] + ''; - (hasOwnProperty.call(cache, key) ? cache[key] : (cache[key] = [])).push(array[index]); - } - } - return function(value) { - if (isLarge) { - var key = value + ''; - return hasOwnProperty.call(cache, key) && indexOf(cache[key], value) > -1; - } - return indexOf(array, value, fromIndex) > -1; - } - } - - /** - * Used by `_.max` and `_.min` as the default `callback` when a given - * `collection` is a string value. - * - * @private - * @param {String} value The character to inspect. - * @returns {Number} Returns the code unit of given character. - */ - function charAtCallback(value) { - return value.charCodeAt(0); - } - - /** - * Used by `sortBy` to compare transformed `collection` values, stable sorting - * them in ascending order. - * - * @private - * @param {Object} a The object to compare to `b`. - * @param {Object} b The object to compare to `a`. - * @returns {Number} Returns the sort order indicator of `1` or `-1`. - */ - function compareAscending(a, b) { - var ai = a.index, - bi = b.index; - - a = a.criteria; - b = b.criteria; - - // ensure a stable sort in V8 and other engines - // http://code.google.com/p/v8/issues/detail?id=90 - if (a !== b) { - if (a > b || a === undefined) { - return 1; - } - if (a < b || b === undefined) { - return -1; - } - } - return ai < bi ? -1 : 1; - } - - /** - * Creates a function that, when called, invokes `func` with the `this` - * binding of `thisArg` and prepends any `partailArgs` to the arguments passed - * to the bound function. - * - * @private - * @param {Function|String} func The function to bind or the method name. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Array} partialArgs An array of arguments to be partially applied. - * @returns {Function} Returns the new bound function. - */ - function createBound(func, thisArg, partialArgs) { - var isFunc = isFunction(func), - isPartial = !partialArgs, - methodName = func; - - // juggle arguments - if (isPartial) { - partialArgs = thisArg; - } - - function bound() { - // `Function#bind` spec - // http://es5.github.com/#x15.3.4.5 - var args = arguments, - thisBinding = isPartial ? this : thisArg; - - if (!isFunc) { - func = thisArg[methodName]; - } - if (partialArgs.length) { - args = args.length - ? partialArgs.concat(slice.call(args)) - : partialArgs; - } - if (this instanceof bound) { - // get `func` instance if `bound` is invoked in a `new` expression - noop.prototype = func.prototype; - thisBinding = new noop; - - // mimic the constructor's `return` behavior - // http://es5.github.com/#x13.2.2 - var result = func.apply(thisBinding, args); - return isObject(result) - ? result - : thisBinding - } - return func.apply(thisBinding, args); - } - return bound; - } - - /** - * Produces an iteration callback bound to an optional `thisArg`. If `func` is - * a property name, the callback will return the property value for a given element. - * - * @private - * @param {Function|String} [func=identity|property] The function called per - * iteration or property name to query. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Function} Returns a callback function. - */ - function createCallback(func, thisArg) { - if (!func) { - return identity; - } - if (typeof func != 'function') { - return function(object) { - return object[func]; - }; - } - if (thisArg !== undefined) { - return function(value, index, object) { - return func.call(thisArg, value, index, object); - }; - } - return func; - } - - /** - * Creates compiled iteration functions. - * - * @private - * @param {Object} [options1, options2, ...] The compile options object(s). - * useHas - A boolean to specify using `hasOwnProperty` checks in the object loop. - * args - A string of comma separated arguments the iteration function will accept. - * top - A string of code to execute before the iteration branches. - * arrayLoop - A string of code to execute in the array loop. - * objectLoop - A string of code to execute in the object loop. - * bottom - A string of code to execute after the iteration branches. - * - * @returns {Function} Returns the compiled function. - */ - function createIterator() { - var data = { - 'arrayLoop': '', - 'bottom': '', - 'hasDontEnumBug': hasDontEnumBug, - 'isKeysFast': isKeysFast, - 'objectLoop': '', - 'noArgsEnum': noArgsEnum, - 'noCharByIndex': noCharByIndex, - 'shadowed': shadowed, - 'top': '', - 'useHas': true - }; - - // merge options into a template data object - for (var object, index = 0; object = arguments[index]; index++) { - for (var key in object) { - data[key] = object[key]; - } - } - var args = data.args; - data.firstArg = /^[^,]+/.exec(args)[0]; - - // create the function factory - var factory = Function( - 'createCallback, hasOwnProperty, isArguments, isString, objectTypes, ' + - 'nativeKeys, propertyIsEnumerable', - 'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}' - ); - // return the compiled function - return factory( - createCallback, hasOwnProperty, isArguments, isString, objectTypes, - nativeKeys, propertyIsEnumerable - ); - } - - /** - * Used by `template` to escape characters for inclusion in compiled - * string literals. - * - * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. - */ - function escapeStringChar(match) { - return '\\' + stringEscapes[match]; - } - - /** - * Used by `escape` to convert characters to HTML entities. - * - * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. - */ - function escapeHtmlChar(match) { - return htmlEscapes[match]; - } - - /** - * A no-operation function. - * - * @private - */ - function noop() { - // no operation performed - } - - /** - * Used by `unescape` to convert HTML entities to characters. - * - * @private - * @param {String} match The matched character to unescape. - * @returns {String} Returns the unescaped character. - */ - function unescapeHtmlChar(match) { - return htmlUnescapes[match]; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Checks if `value` is an `arguments` object. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an `arguments` object, else `false`. - * @example - * - * (function() { return _.isArguments(arguments); })(1, 2, 3); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - function isArguments(value) { - return toString.call(value) == argsClass; - } - // fallback for browsers that can't detect `arguments` objects by [[Class]] - if (noArgsClass) { - isArguments = function(value) { - return value ? hasOwnProperty.call(value, 'callee') : false; - }; - } - - /** - * Iterates over `object`'s own and inherited enumerable properties, executing - * the `callback` for each property. The `callback` is bound to `thisArg` and - * invoked with three arguments; (value, key, object). Callbacks may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} callback The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. - * @example - * - * function Dog(name) { - * this.name = name; - * } - * - * Dog.prototype.bark = function() { - * alert('Woof, woof!'); - * }; - * - * _.forIn(new Dog('Dagny'), function(value, key) { - * alert(key); - * }); - * // => alerts 'name' and 'bark' (order is not guaranteed) - */ - var forIn = createIterator(forEachIteratorOptions, forOwnIteratorOptions, { - 'useHas': false - }); - - /** - * Iterates over `object`'s own enumerable properties, executing the `callback` - * for each property. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, key, object). Callbacks may exit iteration early by explicitly - * returning `false`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} callback The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. - * @example - * - * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { - * alert(key); - * }); - * // => alerts '0', '1', and 'length' (order is not guaranteed) - */ - var forOwn = createIterator(forEachIteratorOptions, forOwnIteratorOptions); - - /** - * A fallback implementation of `isPlainObject` that checks if a given `value` - * is an object created by the `Object` constructor, assuming objects created - * by the `Object` constructor have no inherited enumerable properties and that - * there are no `Object.prototype` extensions. - * - * @private - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if `value` is a plain object, else `false`. - */ - function shimIsPlainObject(value) { - // avoid non-objects and false positives for `arguments` objects - var result = false; - if (!(value && typeof value == 'object') || isArguments(value)) { - return result; - } - // IE < 9 presents DOM nodes as `Object` objects except they have `toString` - // methods that are `typeof` "string" and still can coerce nodes to strings. - // Also check that the constructor is `Object` (i.e. `Object instanceof Object`) - var ctor = value.constructor; - if ((!noNodeClass || !(typeof value.toString != 'function' && typeof (value + '') == 'string')) && - (!isFunction(ctor) || ctor instanceof ctor)) { - // IE < 9 iterates inherited properties before own properties. If the first - // iterated property is an object's own property then there are no inherited - // enumerable properties. - if (iteratesOwnLast) { - forIn(value, function(value, key, object) { - result = !hasOwnProperty.call(object, key); - return false; - }); - return result === false; - } - // In most environments an object's own properties are iterated before - // its inherited properties. If the last iterated property is an object's - // own property then there are no inherited enumerable properties. - forIn(value, function(value, key) { - result = key; - }); - return result === false || hasOwnProperty.call(value, result); - } - return result; - } - - /** - * A fallback implementation of `Object.keys` that produces an array of the - * given object's own enumerable property names. - * - * @private - * @param {Object} object The object to inspect. - * @returns {Array} Returns a new array of property names. - */ - function shimKeys(object) { - var result = []; - forOwn(object, function(value, key) { - result.push(key); - }); - return result; - } - - /** - * Used to convert characters to HTML entities: - * - * Though the `>` character is escaped for symmetry, characters like `>` and `/` - * don't require escaping in HTML and have no special meaning unless they're part - * of a tag or an unquoted attribute value. - * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") - */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; - - /** Used to convert HTML entities to characters */ - var htmlUnescapes = invert(htmlEscapes); - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a clone of `value`. If `deep` is `true`, all nested objects will - * also be cloned otherwise they will be assigned by reference. Functions, DOM - * nodes, `arguments` objects, and objects created by constructors other than - * `Object` are **not** cloned. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to clone. - * @param {Boolean} deep A flag to indicate a deep clone. - * @param- {Object} [guard] Internally used to allow this method to work with - * others like `_.map` without using their callback `index` argument for `deep`. - * @param- {Array} [stackA=[]] Internally used to track traversed source objects. - * @param- {Array} [stackB=[]] Internally used to associate clones with their - * source counterparts. - * @returns {Mixed} Returns the cloned `value`. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 }, - * { 'name': 'curly', 'age': 60 } - * ]; - * - * _.clone({ 'name': 'moe' }); - * // => { 'name': 'moe' } - * - * var shallow = _.clone(stooges); - * shallow[0] === stooges[0]; - * // => true - * - * var deep = _.clone(stooges, true); - * shallow[0] === stooges[0]; - * // => false - */ - function clone(value, deep, guard, stackA, stackB) { - if (value == null) { - return value; - } - if (guard) { - deep = false; - } - // inspect [[Class]] - var isObj = isObject(value); - if (isObj) { - // don't clone `arguments` objects, functions, or non-object Objects - var className = toString.call(value); - if (!cloneableClasses[className] || (noArgsClass && isArguments(value))) { - return value; - } - var isArr = className == arrayClass; - isObj = isArr || (className == objectClass ? isPlainObject(value) : isObj); - } - // shallow clone - if (!isObj || !deep) { - // don't clone functions - return isObj - ? (isArr ? slice.call(value) : extend({}, value)) - : value; - } - - var ctor = value.constructor; - switch (className) { - case boolClass: - case dateClass: - return new ctor(+value); - - case numberClass: - case stringClass: - return new ctor(value); - - case regexpClass: - return ctor(value.source, reFlags.exec(value)); - } - // check for circular references and return corresponding clone - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == value) { - return stackB[length]; - } - } - // init cloned object - var result = isArr ? ctor(value.length) : {}; - - // add the source value to the stack of traversed objects - // and associate it with its clone - stackA.push(value); - stackB.push(result); - - // recursively populate clone (susceptible to call stack limits) - (isArr ? forEach : forOwn)(value, function(objValue, key) { - result[key] = clone(objValue, deep, null, stackA, stackB); - }); - - return result; - } - - /** - * Assigns enumerable properties of the default object(s) to the `destination` - * object for all `destination` properties that resolve to `null`/`undefined`. - * Once a property is set, additional defaults of the same property will be - * ignored. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The destination object. - * @param {Object} [default1, default2, ...] The default objects. - * @returns {Object} Returns the destination object. - * @example - * - * var iceCream = { 'flavor': 'chocolate' }; - * _.defaults(iceCream, { 'flavor': 'vanilla', 'sprinkles': 'rainbow' }); - * // => { 'flavor': 'chocolate', 'sprinkles': 'rainbow' } - */ - var defaults = createIterator(extendIteratorOptions, { - 'objectLoop': 'if (result[index] == null) ' + extendIteratorOptions.objectLoop - }); - - /** - * Assigns enumerable properties of the source object(s) to the `destination` - * object. Subsequent sources will overwrite propery assignments of previous - * sources. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @returns {Object} Returns the destination object. - * @example - * - * _.extend({ 'name': 'moe' }, { 'age': 40 }); - * // => { 'name': 'moe', 'age': 40 } - */ - var extend = createIterator(extendIteratorOptions); - - /** - * Creates a sorted array of all enumerable properties, own and inherited, - * of `object` that have function values. - * - * @static - * @memberOf _ - * @alias methods - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns a new array of property names that have function values. - * @example - * - * _.functions(_); - * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] - */ - function functions(object) { - var result = []; - forIn(object, function(value, key) { - if (isFunction(value)) { - result.push(key); - } - }); - return result.sort(); - } - - /** - * Checks if the specified object `property` exists and is a direct property, - * instead of an inherited property. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to check. - * @param {String} property The property to check for. - * @returns {Boolean} Returns `true` if key is a direct property, else `false`. - * @example - * - * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); - * // => true - */ - function has(object, property) { - return object ? hasOwnProperty.call(object, property) : false; - } - - /** - * Creates an object composed of the inverted keys and values of the given `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to invert. - * @returns {Object} Returns the created inverted object. - * @example - * - * _.invert({ 'first': 'Moe', 'second': 'Larry', 'third': 'Curly' }); - * // => { 'Moe': 'first', 'Larry': 'second', 'Curly': 'third' } (order is not guaranteed) - */ - function invert(object) { - var result = {}; - forOwn(object, function(value, key) { - result[value] = key; - }); - return result; - } - - /** - * Checks if `value` is an array. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an array, else `false`. - * @example - * - * (function() { return _.isArray(arguments); })(); - * // => false - * - * _.isArray([1, 2, 3]); - * // => true - */ - var isArray = nativeIsArray || function(value) { - return toString.call(value) == arrayClass; - }; - - /** - * Checks if `value` is a boolean (`true` or `false`) value. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a boolean value, else `false`. - * @example - * - * _.isBoolean(null); - * // => false - */ - function isBoolean(value) { - return value === true || value === false || toString.call(value) == boolClass; - } - - /** - * Checks if `value` is a date. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a date, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - */ - function isDate(value) { - return toString.call(value) == dateClass; - } - - /** - * Checks if `value` is a DOM element. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a DOM element, else `false`. - * @example - * - * _.isElement(document.body); - * // => true - */ - function isElement(value) { - return value ? value.nodeType === 1 : false; - } - - /** - * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a - * length of `0` and objects with no own enumerable properties are considered - * "empty". - * - * @static - * @memberOf _ - * @category Objects - * @param {Array|Object|String} value The value to inspect. - * @returns {Boolean} Returns `true` if the `value` is empty, else `false`. - * @example - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({}); - * // => true - * - * _.isEmpty(''); - * // => true - */ - function isEmpty(value) { - var result = true; - if (!value) { - return result; - } - var className = toString.call(value), - length = value.length; - - if ((className == arrayClass || className == stringClass || - className == argsClass || (noArgsClass && isArguments(value))) || - (className == objectClass && typeof length == 'number' && isFunction(value.splice))) { - return !length; - } - forOwn(value, function() { - return (result = false); - }); - return result; - } - - /** - * Performs a deep comparison between two values to determine if they are - * equivalent to each other. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} a The value to compare. - * @param {Mixed} b The other value to compare. - * @param- {Object} [stackA=[]] Internally used track traversed `a` objects. - * @param- {Object} [stackB=[]] Internally used track traversed `b` objects. - * @returns {Boolean} Returns `true` if the values are equvalent, else `false`. - * @example - * - * var moe = { 'name': 'moe', 'luckyNumbers': [13, 27, 34] }; - * var clone = { 'name': 'moe', 'luckyNumbers': [13, 27, 34] }; - * - * moe == clone; - * // => false - * - * _.isEqual(moe, clone); - * // => true - */ - function isEqual(a, b, stackA, stackB) { - // exit early for identical values - if (a === b) { - // treat `+0` vs. `-0` as not equal - return a !== 0 || (1 / a == 1 / b); - } - // a strict comparison is necessary because `null == undefined` - if (a == null || b == null) { - return a === b; - } - // compare [[Class]] names - var className = toString.call(a); - if (className != toString.call(b)) { - return false; - } - switch (className) { - case boolClass: - case dateClass: - // coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0`, treating invalid dates coerced to `NaN` as not equal - return +a == +b; - - case numberClass: - // treat `NaN` vs. `NaN` as equal - return a != +a - ? b != +b - // but treat `+0` vs. `-0` as not equal - : (a == 0 ? (1 / a == 1 / b) : a == +b); - - case regexpClass: - case stringClass: - // coerce regexes to strings (http://es5.github.com/#x15.10.6.4) - // treat string primitives and their corresponding object instances as equal - return a == b + ''; - } - // exit early, in older browsers, if `a` is array-like but not `b` - var isArr = className == arrayClass || className == argsClass; - if (noArgsClass && !isArr && (isArr = isArguments(a)) && !isArguments(b)) { - return false; - } - if (!isArr) { - // unwrap any `lodash` wrapped values - if (a.__wrapped__ || b.__wrapped__) { - return isEqual(a.__wrapped__ || a, b.__wrapped__ || b); - } - // exit for functions and DOM nodes - if (className != objectClass || (noNodeClass && ( - (typeof a.toString != 'function' && typeof (a + '') == 'string') || - (typeof b.toString != 'function' && typeof (b + '') == 'string')))) { - return false; - } - var ctorA = a.constructor, - ctorB = b.constructor; - - // non `Object` object instances with different constructors are not equal - if (ctorA != ctorB && !( - isFunction(ctorA) && ctorA instanceof ctorA && - isFunction(ctorB) && ctorB instanceof ctorB - )) { - return false; - } - } - // assume cyclic structures are equal - // the algorithm for detecting cyclic structures is adapted from ES 5.1 - // section 15.12.3, abstract operation `JO` (http://es5.github.com/#x15.12.3) - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == a) { - return stackB[length] == b; - } - } - - var index = -1, - result = true, - size = 0; - - // add `a` and `b` to the stack of traversed objects - stackA.push(a); - stackB.push(b); - - // recursively compare objects and arrays (susceptible to call stack limits) - if (isArr) { - // compare lengths to determine if a deep comparison is necessary - size = a.length; - result = size == b.length; - - if (result) { - // deep compare the contents, ignoring non-numeric properties - while (size--) { - if (!(result = isEqual(a[size], b[size], stackA, stackB))) { - break; - } - } - } - return result; - } - // deep compare objects - for (var key in a) { - if (hasOwnProperty.call(a, key)) { - // count the number of properties. - size++; - // deep compare each property value. - if (!(hasOwnProperty.call(b, key) && isEqual(a[key], b[key], stackA, stackB))) { - return false; - } - } - } - // ensure both objects have the same number of properties - for (key in b) { - // The JS engine in Adobe products, like InDesign, has a bug that causes - // `!size--` to throw an error so it must be wrapped in parentheses. - // https://github.com/documentcloud/underscore/issues/355 - if (hasOwnProperty.call(b, key) && !(size--)) { - // `size` will be `-1` if `b` has more properties than `a` - return false; - } - } - // handle JScript [[DontEnum]] bug - if (hasDontEnumBug) { - while (++index < 7) { - key = shadowed[index]; - if (hasOwnProperty.call(a, key) && - !(hasOwnProperty.call(b, key) && isEqual(a[key], b[key], stackA, stackB))) { - return false; - } - } - } - return true; - } - - /** - * Checks if `value` is, or can be coerced to, a finite number. - * - * Note: This is not the same as native `isFinite`, which will return true for - * booleans and empty strings. See http://es5.github.com/#x15.1.2.5. - * - * @deprecated - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a finite number, else `false`. - * @example - * - * _.isFinite(-101); - * // => true - * - * _.isFinite('10'); - * // => true - * - * _.isFinite(true); - * // => false - * - * _.isFinite(''); - * // => false - * - * _.isFinite(Infinity); - * // => false - */ - function isFinite(value) { - return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); - } - - /** - * Checks if `value` is a function. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - */ - function isFunction(value) { - return typeof value == 'function'; - } - // fallback for older versions of Chrome and Safari - if (isFunction(/x/)) { - isFunction = function(value) { - return toString.call(value) == funcClass; - }; - } - - /** - * Checks if `value` is the language type of Object. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ - function isObject(value) { - // check if the value is the ECMAScript language type of Object - // http://es5.github.com/#x8 - // and avoid a V8 bug - // http://code.google.com/p/v8/issues/detail?id=2291 - return value ? objectTypes[typeof value] : false; - } - - /** - * Checks if `value` is `NaN`. - * - * Note: This is not the same as native `isNaN`, which will return true for - * `undefined` and other values. See http://es5.github.com/#x15.1.2.4. - * - * @deprecated - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ - function isNaN(value) { - // `NaN` as a primitive is the only value that is not equal to itself - // (perform the [[Class]] check first to avoid errors with some host objects in IE) - return toString.call(value) == numberClass && value != +value - } - - /** - * Checks if `value` is `null`. - * - * @deprecated - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(undefined); - * // => false - */ - function isNull(value) { - return value === null; - } - - /** - * Checks if `value` is a number. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a number, else `false`. - * @example - * - * _.isNumber(8.4 * 5); - * // => true - */ - function isNumber(value) { - return toString.call(value) == numberClass; - } - - /** - * Checks if a given `value` is an object created by the `Object` constructor. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Stooge(name, age) { - * this.name = name; - * this.age = age; - * } - * - * _.isPlainObject(new Stooge('moe', 40)); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'name': 'moe', 'age': 40 }); - * // => true - */ - var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { - if (!(value && typeof value == 'object')) { - return false; - } - var valueOf = value.valueOf, - objProto = typeof valueOf == 'function' && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); - - return objProto - ? value == objProto || (getPrototypeOf(value) == objProto && !isArguments(value)) - : shimIsPlainObject(value); - }; - - /** - * Checks if `value` is a regular expression. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a regular expression, else `false`. - * @example - * - * _.isRegExp(/moe/); - * // => true - */ - function isRegExp(value) { - return toString.call(value) == regexpClass; - } - - /** - * Checks if `value` is a string. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a string, else `false`. - * @example - * - * _.isString('moe'); - * // => true - */ - function isString(value) { - return toString.call(value) == stringClass; - } - - /** - * Checks if `value` is `undefined`. - * - * @deprecated - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - */ - function isUndefined(value) { - return value === undefined; - } - - /** - * Creates an array composed of the own enumerable property names of `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns a new array of property names. - * @example - * - * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); - * // => ['one', 'two', 'three'] (order is not guaranteed) - */ - var keys = !nativeKeys ? shimKeys : function(object) { - // avoid iterating over the `prototype` property - return typeof object == 'function' && propertyIsEnumerable.call(object, 'prototype') - ? shimKeys(object) - : (isObject(object) ? nativeKeys(object) : []); - }; - - /** - * Merges enumerable properties of the source object(s) into the `destination` - * object. Subsequent sources will overwrite propery assignments of previous - * sources. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param- {Object} [indicator] Internally used to indicate that the `stack` - * argument is an array of traversed objects instead of another source object. - * @param- {Array} [stackA=[]] Internally used to track traversed source objects. - * @param- {Array} [stackB=[]] Internally used to associate values with their - * source counterparts. - * @returns {Object} Returns the destination object. - * @example - * - * var stooges = [ - * { 'name': 'moe' }, - * { 'name': 'larry' } - * ]; - * - * var ages = [ - * { 'age': 40 }, - * { 'age': 50 } - * ]; - * - * _.merge(stooges, ages); - * // => [{ 'name': 'moe', 'age': 40 }, { 'name': 'larry', 'age': 50 }] - */ - function merge(object, source, indicator) { - var args = arguments, - index = 0, - length = 2, - stackA = args[3], - stackB = args[4]; - - if (indicator !== objectRef) { - stackA = []; - stackB = []; - length = args.length; - } - while (++index < length) { - forOwn(args[index], function(source, key) { - var found, isArr, value; - if (source && ((isArr = isArray(source)) || isPlainObject(source))) { - // avoid merging previously merged cyclic sources - var stackLength = stackA.length; - while (stackLength--) { - found = stackA[stackLength] == source; - if (found) { - break; - } - } - if (found) { - object[key] = stackB[stackLength]; - } - else { - // add `source` and associated `value` to the stack of traversed objects - stackA.push(source); - stackB.push(value = (value = object[key], isArr) - ? (isArray(value) ? value : []) - : (isPlainObject(value) ? value : {}) - ); - // recursively merge objects and arrays (susceptible to call stack limits) - object[key] = merge(value, source, objectRef, stackA, stackB); - } - } else if (source != null) { - object[key] = source; - } - }); - } - return object; - } - - /** - * Creates a shallow clone of `object` excluding the specified properties. - * Property names may be specified as individual arguments or as arrays of - * property names. If `callback` is passed, it will be executed for each property - * in the `object`, omitting the properties `callback` returns truthy for. The - * `callback` is bound to `thisArg` and invoked with three arguments; (value, key, object). - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The source object. - * @param {Function|String} callback|[prop1, prop2, ...] The properties to omit - * or the function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object without the omitted properties. - * @example - * - * _.omit({ 'name': 'moe', 'age': 40, 'userid': 'moe1' }, 'userid'); - * // => { 'name': 'moe', 'age': 40 } - * - * _.omit({ 'name': 'moe', '_hint': 'knucklehead', '_seed': '96c4eb' }, function(value, key) { - * return key.charAt(0) == '_'; - * }); - * // => { 'name': 'moe' } - */ - function omit(object, callback, thisArg) { - var isFunc = typeof callback == 'function', - result = {}; - - if (isFunc) { - callback = createCallback(callback, thisArg); - } else { - var props = concat.apply(arrayRef, arguments); - } - forIn(object, function(value, key, object) { - if (isFunc - ? !callback(value, key, object) - : indexOf(props, key, 1) < 0 - ) { - result[key] = value; - } - }); - return result; - } - - /** - * Creates a two dimensional array of the given object's key-value pairs, - * i.e. `[[key1, value1], [key2, value2]]`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns new array of key-value pairs. - * @example - * - * _.pairs({ 'moe': 30, 'larry': 40, 'curly': 50 }); - * // => [['moe', 30], ['larry', 40], ['curly', 50]] (order is not guaranteed) - */ - function pairs(object) { - var result = []; - forOwn(object, function(value, key) { - result.push([key, value]); - }); - return result; - } - - /** - * Creates a shallow clone of `object` composed of the specified properties. - * Property names may be specified as individual arguments or as arrays of - * property names. If `callback` is passed, it will be executed for each property - * in the `object`, picking the properties `callback` returns truthy for. The - * `callback` is bound to `thisArg` and invoked with three arguments; (value, key, object). - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The source object. - * @param {Function|String} callback|[prop1, prop2, ...] The properties to pick - * or the function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object composed of the picked properties. - * @example - * - * _.pick({ 'name': 'moe', 'age': 40, 'userid': 'moe1' }, 'name', 'age'); - * // => { 'name': 'moe', 'age': 40 } - * - * _.pick({ 'name': 'moe', '_hint': 'knucklehead', '_seed': '96c4eb' }, function(value, key) { - * return key.charAt(0) != '_'; - * }); - * // => { 'name': 'moe' } - */ - function pick(object, callback, thisArg) { - var result = {}; - if (typeof callback != 'function') { - var index = 0, - props = concat.apply(arrayRef, arguments), - length = props.length; - - while (++index < length) { - var key = props[index]; - if (key in object) { - result[key] = object[key]; - } - } - } else { - callback = createCallback(callback, thisArg); - forIn(object, function(value, key, object) { - if (callback(value, key, object)) { - result[key] = value; - } - }); - } - return result; - } - - /** - * Creates an array composed of the own enumerable property values of `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns a new array of property values. - * @example - * - * _.values({ 'one': 1, 'two': 2, 'three': 3 }); - * // => [1, 2, 3] - */ - function values(object) { - var result = []; - forOwn(object, function(value) { - result.push(value); - }); - return result; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Checks if a given `target` element is present in a `collection` using strict - * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used - * as the offset from the end of the collection. - * - * @static - * @memberOf _ - * @alias include - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Mixed} target The value to check for. - * @param {Number} [fromIndex=0] The index to search from. - * @returns {Boolean} Returns `true` if the `target` element is found, else `false`. - * @example - * - * _.contains([1, 2, 3], 1); - * // => true - * - * _.contains([1, 2, 3], 1, 2); - * // => false - * - * _.contains({ 'name': 'moe', 'age': 40 }, 'moe'); - * // => true - * - * _.contains('curly', 'ur'); - * // => true - */ - function contains(collection, target, fromIndex) { - var index = -1, - length = collection ? collection.length : 0; - - fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; - if (typeof length == 'number') { - return (isString(collection) - ? collection.indexOf(target, fromIndex) - : indexOf(collection, target, fromIndex) - ) > -1; - } - return some(collection, function(value) { - return ++index >= fromIndex && value === target; - }); - } - - /** - * Creates an object composed of keys returned from running each element of - * `collection` through a `callback`. The corresponding value of each key is - * the number of times the key was returned by `callback`. The `callback` is - * bound to `thisArg` and invoked with three arguments; (value, index|key, collection). - * The `callback` argument may also be the name of a property to count by (e.g. 'length'). - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|String} callback|property The function called per iteration - * or property name to count by. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); - * // => { '4': 1, '6': 2 } - * - * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math); - * // => { '4': 1, '6': 2 } - * - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } - */ - function countBy(collection, callback, thisArg) { - var result = {}; - callback = createCallback(callback, thisArg); - forEach(collection, function(value, key, collection) { - key = callback(value, key, collection); - (hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1); - }); - return result; - } - - /** - * Checks if the `callback` returns a truthy value for **all** elements of a - * `collection`. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index|key, collection). - * - * @static - * @memberOf _ - * @alias all - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if all elements pass the callback check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - */ - function every(collection, callback, thisArg) { - var result = true; - callback = createCallback(callback, thisArg); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - if (!(result = !!callback(collection[index], index, collection))) { - break; - } - } - } else { - forEach(collection, function(value, index, collection) { - return (result = !!callback(value, index, collection)); - }); - } - return result; - } - - /** - * Examines each element in a `collection`, returning an array of all elements - * the `callback` returns truthy for. The `callback` is bound to `thisArg` and - * invoked with three arguments; (value, index|key, collection). - * - * @static - * @memberOf _ - * @alias select - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that passed the callback check. - * @example - * - * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); - * // => [2, 4, 6] - */ - function filter(collection, callback, thisArg) { - var result = []; - callback = createCallback(callback, thisArg); - forEach(collection, function(value, index, collection) { - if (callback(value, index, collection)) { - result.push(value); - } - }); - return result; - } - - /** - * Examines each element in a `collection`, returning the first one the `callback` - * returns truthy for. The function returns as soon as it finds an acceptable - * element, and does not iterate over the entire `collection`. The `callback` is - * bound to `thisArg` and invoked with three arguments; (value, index|key, collection). - * - * @static - * @memberOf _ - * @alias detect - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} callback The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the element that passed the callback check, - * else `undefined`. - * @example - * - * var even = _.find([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); - * // => 2 - */ - function find(collection, callback, thisArg) { - var result; - callback = createCallback(callback, thisArg); - forEach(collection, function(value, index, collection) { - if (callback(value, index, collection)) { - result = value; - return false; - } - }); - return result; - } - - /** - * Iterates over a `collection`, executing the `callback` for each element in - * the `collection`. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index|key, collection). Callbacks may exit iteration early - * by explicitly returning `false`. - * - * @static - * @memberOf _ - * @alias each - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} callback The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. - * @example - * - * _([1, 2, 3]).forEach(alert).join(','); - * // => alerts each number and returns '1,2,3' - * - * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert); - * // => alerts each number (order is not guaranteed) - */ - var forEach = createIterator(forEachIteratorOptions); - - /** - * Creates an object composed of keys returned from running each element of - * `collection` through a `callback`. The corresponding value of each key is an - * array of elements passed to `callback` that returned the key. The `callback` - * is bound to `thisArg` and invoked with three arguments; (value, index|key, collection). - * The `callback` argument may also be the name of a property to group by (e.g. 'length'). - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|String} callback|property The function called per iteration - * or property name to group by. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } - */ - function groupBy(collection, callback, thisArg) { - var result = {}; - callback = createCallback(callback, thisArg); - forEach(collection, function(value, key, collection) { - key = callback(value, key, collection); - (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value); - }); - return result; - } - - /** - * Invokes the method named by `methodName` on each element in the `collection`, - * returning an array of the results of each invoked method. Additional arguments - * will be passed to each invoked method. If `methodName` is a function it will - * be invoked for, and `this` bound to, each element in the `collection`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|String} methodName The name of the method to invoke or - * the function invoked per iteration. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with. - * @returns {Array} Returns a new array of the results of each invoked method. - * @example - * - * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invoke([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ - function invoke(collection, methodName) { - var args = slice.call(arguments, 2), - isFunc = typeof methodName == 'function', - result = []; - - forEach(collection, function(value) { - result.push((isFunc ? methodName : value[methodName]).apply(value, args)); - }); - return result; - } - - /** - * Creates an array of values by running each element in the `collection` - * through a `callback`. The `callback` is bound to `thisArg` and invoked with - * three arguments; (value, index|key, collection). - * - * @static - * @memberOf _ - * @alias collect - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of the results of each `callback` execution. - * @example - * - * _.map([1, 2, 3], function(num) { return num * 3; }); - * // => [3, 6, 9] - * - * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; }); - * // => [3, 6, 9] (order is not guaranteed) - */ - function map(collection, callback, thisArg) { - var index = -1, - length = collection ? collection.length : 0, - result = Array(typeof length == 'number' ? length : 0); - - callback = createCallback(callback, thisArg); - if (isArray(collection)) { - while (++index < length) { - result[index] = callback(collection[index], index, collection); - } - } else { - forEach(collection, function(value, key, collection) { - result[++index] = callback(value, key, collection); - }); - } - return result; - } - - /** - * Retrieves the maximum value of an `array`. If `callback` is passed, - * it will be executed for each value in the `array` to generate the - * criterion by which the value is ranked. The `callback` is bound to - * `thisArg` and invoked with three arguments; (value, index, collection). - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the maximum value. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 }, - * { 'name': 'curly', 'age': 60 } - * ]; - * - * _.max(stooges, function(stooge) { return stooge.age; }); - * // => { 'name': 'curly', 'age': 60 }; - */ - function max(collection, callback, thisArg) { - var computed = -Infinity, - index = -1, - length = collection ? collection.length : 0, - result = computed; - - if (callback || !isArray(collection)) { - callback = !callback && isString(collection) - ? charAtCallback - : createCallback(callback, thisArg); - - forEach(collection, function(value, index, collection) { - var current = callback(value, index, collection); - if (current > computed) { - computed = current; - result = value; - } - }); - } else { - while (++index < length) { - if (collection[index] > result) { - result = collection[index]; - } - } - } - return result; - } - - /** - * Retrieves the minimum value of an `array`. If `callback` is passed, - * it will be executed for each value in the `array` to generate the - * criterion by which the value is ranked. The `callback` is bound to `thisArg` - * and invoked with three arguments; (value, index, collection). - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the minimum value. - * @example - * - * _.min([10, 5, 100, 2, 1000]); - * // => 2 - */ - function min(collection, callback, thisArg) { - var computed = Infinity, - index = -1, - length = collection ? collection.length : 0, - result = computed; - - if (callback || !isArray(collection)) { - callback = !callback && isString(collection) - ? charAtCallback - : createCallback(callback, thisArg); - - forEach(collection, function(value, index, collection) { - var current = callback(value, index, collection); - if (current < computed) { - computed = current; - result = value; - } - }); - } else { - while (++index < length) { - if (collection[index] < result) { - result = collection[index]; - } - } - } - return result; - } - - /** - * Retrieves the value of a specified property from all elements in - * the `collection`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {String} property The property to pluck. - * @returns {Array} Returns a new array of property values. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 }, - * { 'name': 'curly', 'age': 60 } - * ]; - * - * _.pluck(stooges, 'name'); - * // => ['moe', 'larry', 'curly'] - */ - function pluck(collection, property) { - var result = []; - forEach(collection, function(value) { - result.push(value[property]); - }); - return result; - } - - /** - * Boils down a `collection` to a single value. The initial state of the - * reduction is `accumulator` and each successive step of it should be returned - * by the `callback`. The `callback` is bound to `thisArg` and invoked with 4 - * arguments; for arrays they are (accumulator, value, index|key, collection). - * - * @static - * @memberOf _ - * @alias foldl, inject - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} callback The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. - * @example - * - * var sum = _.reduce([1, 2, 3], function(memo, num) { return memo + num; }); - * // => 6 - */ - function reduce(collection, callback, accumulator, thisArg) { - var noaccum = arguments.length < 3; - callback = createCallback(callback, thisArg); - forEach(collection, function(value, index, collection) { - accumulator = noaccum - ? (noaccum = false, value) - : callback(accumulator, value, index, collection) - }); - return accumulator; - } - - /** - * The right-associative version of `_.reduce`. - * - * @static - * @memberOf _ - * @alias foldr - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} callback The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. - * @example - * - * var list = [[0, 1], [2, 3], [4, 5]]; - * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); - * // => [4, 5, 2, 3, 0, 1] - */ - function reduceRight(collection, callback, accumulator, thisArg) { - var iteratee = collection, - length = collection ? collection.length : 0, - noaccum = arguments.length < 3; - - if (typeof length != 'number') { - var props = keys(collection); - length = props.length; - } else if (noCharByIndex && isString(collection)) { - iteratee = collection.split(''); - } - forEach(collection, function(value, index, collection) { - index = props ? props[--length] : --length; - accumulator = noaccum - ? (noaccum = false, iteratee[index]) - : callback.call(thisArg, accumulator, iteratee[index], index, collection); - }); - return accumulator; - } - - /** - * The opposite of `_.filter`, this method returns the values of a - * `collection` that `callback` does **not** return truthy for. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that did **not** pass the - * callback check. - * @example - * - * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); - * // => [1, 3, 5] - */ - function reject(collection, callback, thisArg) { - callback = createCallback(callback, thisArg); - return filter(collection, function(value, index, collection) { - return !callback(value, index, collection); - }); - } - - /** - * Creates an array of shuffled `array` values, using a version of the - * Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to shuffle. - * @returns {Array} Returns a new shuffled collection. - * @example - * - * _.shuffle([1, 2, 3, 4, 5, 6]); - * // => [4, 1, 6, 3, 5, 2] - */ - function shuffle(collection) { - var index = -1, - result = Array(collection ? collection.length : 0); - - forEach(collection, function(value) { - var rand = floor(nativeRandom() * (++index + 1)); - result[index] = result[rand]; - result[rand] = value; - }); - return result; - } - - /** - * Gets the size of the `collection` by returning `collection.length` for arrays - * and array-like objects or the number of own enumerable properties for objects. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to inspect. - * @returns {Number} Returns `collection.length` or number of own enumerable properties. - * @example - * - * _.size([1, 2]); - * // => 2 - * - * _.size({ 'one': 1, 'two': 2, 'three': 3 }); - * // => 3 - * - * _.size('curly'); - * // => 5 - */ - function size(collection) { - var length = collection ? collection.length : 0; - return typeof length == 'number' ? length : keys(collection).length; - } - - /** - * Checks if the `callback` returns a truthy value for **any** element of a - * `collection`. The function returns as soon as it finds passing value, and - * does not iterate over the entire `collection`. The `callback` is bound to - * `thisArg` and invoked with three arguments; (value, index|key, collection). - * - * @static - * @memberOf _ - * @alias any - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if any element passes the callback check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false]); - * // => true - */ - function some(collection, callback, thisArg) { - var result; - callback = createCallback(callback, thisArg); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - if (result = callback(collection[index], index, collection)) { - break; - } - } - } else { - forEach(collection, function(value, index, collection) { - return !(result = callback(value, index, collection)); - }); - } - return !!result; - } - - /** - * Creates an array, stable sorted in ascending order by the results of - * running each element of `collection` through a `callback`. The `callback` - * is bound to `thisArg` and invoked with three arguments; (value, index|key, collection). - * The `callback` argument may also be the name of a property to sort by (e.g. 'length'). - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|String} callback|property The function called per iteration - * or property name to sort by. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of sorted elements. - * @example - * - * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); - * // => [3, 1, 2] - * - * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math); - * // => [3, 1, 2] - * - * _.sortBy(['larry', 'brendan', 'moe'], 'length'); - * // => ['moe', 'larry', 'brendan'] - */ - function sortBy(collection, callback, thisArg) { - var result = []; - callback = createCallback(callback, thisArg); - forEach(collection, function(value, index, collection) { - result.push({ - 'criteria': callback(value, index, collection), - 'index': index, - 'value': value - }); - }); - - var length = result.length; - result.sort(compareAscending); - while (length--) { - result[length] = result[length].value; - } - return result; - } - - /** - * Converts the `collection`, to an array. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to convert. - * @returns {Array} Returns the new converted array. - * @example - * - * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); - * // => [2, 3, 4] - */ - function toArray(collection) { - if (collection && typeof collection.length == 'number') { - return (noArraySliceOnStrings ? isString(collection) : typeof collection == 'string') - ? collection.split('') - : slice.call(collection); - } - return values(collection); - } - - /** - * Examines each element in a `collection`, returning an array of all elements - * that contain the given `properties`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Object} properties The object of property values to filter by. - * @returns {Array} Returns a new array of elements that contain the given `properties`. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 }, - * { 'name': 'curly', 'age': 60 } - * ]; - * - * _.where(stooges, { 'age': 40 }); - * // => [{ 'name': 'moe', 'age': 40 }] - */ - function where(collection, properties) { - var props = []; - forIn(properties, function(value, prop) { - props.push(prop); - }); - return filter(collection, function(object) { - var length = props.length; - while (length--) { - var result = object[props[length]] === properties[props[length]]; - if (!result) { - break; - } - } - return !!result; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Creates an array with all falsey values of `array` removed. The values - * `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to compact. - * @returns {Array} Returns a new filtered array. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ - function compact(array) { - var index = -1, - length = array ? array.length : 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value) { - result.push(value); - } - } - return result; - } - - /** - * Creates an array of `array` elements not present in the other arrays - * using strict equality for comparisons, i.e. `===`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to process. - * @param {Array} [array1, array2, ...] Arrays to check. - * @returns {Array} Returns a new array of `array` elements not present in the - * other arrays. - * @example - * - * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); - * // => [1, 3, 4] - */ - function difference(array) { - var index = -1, - length = array ? array.length : 0, - flattened = concat.apply(arrayRef, arguments), - contains = cachedContains(flattened, length), - result = []; - - while (++index < length) { - var value = array[index]; - if (!contains(value)) { - result.push(value); - } - } - return result; - } - - /** - * Gets the first element of the `array`. Pass `n` to return the first `n` - * elements of the `array`. - * - * @static - * @memberOf _ - * @alias head, take - * @category Arrays - * @param {Array} array The array to query. - * @param {Number} [n] The number of elements to return. - * @param- {Object} [guard] Internally used to allow this method to work with - * others like `_.map` without using their callback `index` argument for `n`. - * @returns {Mixed} Returns the first element or an array of the first `n` - * elements of `array`. - * @example - * - * _.first([5, 4, 3, 2, 1]); - * // => 5 - */ - function first(array, n, guard) { - if (array) { - return (n == null || guard) ? array[0] : slice.call(array, 0, n); - } - } - - /** - * Flattens a nested array (the nesting can be to any depth). If `shallow` is - * truthy, `array` will only be flattened a single level. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to compact. - * @param {Boolean} shallow A flag to indicate only flattening a single level. - * @returns {Array} Returns a new flattened array. - * @example - * - * _.flatten([1, [2], [3, [[4]]]]); - * // => [1, 2, 3, 4]; - * - * _.flatten([1, [2], [3, [[4]]]], true); - * // => [1, 2, 3, [[4]]]; - */ - function flatten(array, shallow) { - var index = -1, - length = array ? array.length : 0, - result = []; - - while (++index < length) { - var value = array[index]; - - // recursively flatten arrays (susceptible to call stack limits) - if (isArray(value)) { - push.apply(result, shallow ? value : flatten(value)); - } else { - result.push(value); - } - } - return result; - } - - /** - * Gets the index at which the first occurrence of `value` is found using - * strict equality for comparisons, i.e. `===`. If the `array` is already - * sorted, passing `true` for `fromIndex` will run a faster binary search. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Boolean|Number} [fromIndex=0] The index to search from or `true` to - * perform a binary search on a sorted `array`. - * @returns {Number} Returns the index of the matched value or `-1`. - * @example - * - * _.indexOf([1, 2, 3, 1, 2, 3], 2); - * // => 1 - * - * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); - * // => 4 - * - * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); - * // => 2 - */ - function indexOf(array, value, fromIndex) { - var index = -1, - length = array ? array.length : 0; - - if (typeof fromIndex == 'number') { - index = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0) - 1; - } else if (fromIndex) { - index = sortedIndex(array, value); - return array[index] === value ? index : -1; - } - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } - - /** - * Gets all but the last element of `array`. Pass `n` to exclude the last `n` - * elements from the result. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to query. - * @param {Number} [n=1] The number of elements to exclude. - * @param- {Object} [guard] Internally used to allow this method to work with - * others like `_.map` without using their callback `index` argument for `n`. - * @returns {Array} Returns all but the last element or `n` elements of `array`. - * @example - * - * _.initial([3, 2, 1]); - * // => [3, 2] - */ - function initial(array, n, guard) { - return array - ? slice.call(array, 0, -((n == null || guard) ? 1 : n)) - : []; - } - - /** - * Computes the intersection of all the passed-in arrays using strict equality - * for comparisons, i.e. `===`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of unique elements, in order, that are - * present in **all** of the arrays. - * @example - * - * _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); - * // => [1, 2] - */ - function intersection(array) { - var args = arguments, - argsLength = args.length, - cache = {}, - result = []; - - forEach(array, function(value) { - if (indexOf(result, value) < 0) { - var length = argsLength; - while (--length) { - if (!(cache[length] || (cache[length] = cachedContains(args[length])))(value)) { - return; - } - } - result.push(value); - } - }); - return result; - } - - /** - * Gets the last element of the `array`. Pass `n` to return the last `n` - * elements of the `array`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to query. - * @param {Number} [n] The number of elements to return. - * @param- {Object} [guard] Internally used to allow this method to work with - * others like `_.map` without using their callback `index` argument for `n`. - * @returns {Mixed} Returns the last element or an array of the last `n` - * elements of `array`. - * @example - * - * _.last([3, 2, 1]); - * // => 1 - */ - function last(array, n, guard) { - if (array) { - var length = array.length; - return (n == null || guard) ? array[length - 1] : slice.call(array, -n || length); - } - } - - /** - * Gets the index at which the last occurrence of `value` is found using strict - * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used - * as the offset from the end of the collection. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=array.length-1] The index to search from. - * @returns {Number} Returns the index of the matched value or `-1`. - * @example - * - * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); - * // => 4 - * - * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); - * // => 1 - */ - function lastIndexOf(array, value, fromIndex) { - var index = array ? array.length : 0; - if (typeof fromIndex == 'number') { - index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1; - } - while (index--) { - if (array[index] === value) { - return index; - } - } - return -1; - } - - /** - * Creates an object composed from arrays of `keys` and `values`. Pass either - * a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or - * two arrays, one of `keys` and one of corresponding `values`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} keys The array of keys. - * @param {Array} [values=[]] The array of values. - * @returns {Object} Returns an object composed of the given keys and - * corresponding values. - * @example - * - * _.object(['moe', 'larry', 'curly'], [30, 40, 50]); - * // => { 'moe': 30, 'larry': 40, 'curly': 50 } - */ - function object(keys, values) { - var index = -1, - length = keys ? keys.length : 0, - result = {}; - - while (++index < length) { - var key = keys[index]; - if (values) { - result[key] = values[index]; - } else { - result[key[0]] = key[1]; - } - } - return result; - } - - /** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to but not including `stop`. This method is a port of Python's - * `range()` function. See http://docs.python.org/library/functions.html#range. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Number} [start=0] The start of the range. - * @param {Number} end The end of the range. - * @param {Number} [step=1] The value to increment or descrement by. - * @returns {Array} Returns a new range array. - * @example - * - * _.range(10); - * // => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - * - * _.range(1, 11); - * // => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - * - * _.range(0, 30, 5); - * // => [0, 5, 10, 15, 20, 25] - * - * _.range(0, -10, -1); - * // => [0, -1, -2, -3, -4, -5, -6, -7, -8, -9] - * - * _.range(0); - * // => [] - */ - function range(start, end, step) { - start = +start || 0; - step = +step || 1; - - if (end == null) { - end = start; - start = 0; - } - // use `Array(length)` so V8 will avoid the slower "dictionary" mode - // http://www.youtube.com/watch?v=XAqIpGU8ZZk#t=16m27s - var index = -1, - length = nativeMax(0, ceil((end - start) / step)), - result = Array(length); - - while (++index < length) { - result[index] = start; - start += step; - } - return result; - } - - /** - * The opposite of `_.initial`, this method gets all but the first value of - * `array`. Pass `n` to exclude the first `n` values from the result. - * - * @static - * @memberOf _ - * @alias drop, tail - * @category Arrays - * @param {Array} array The array to query. - * @param {Number} [n=1] The number of elements to exclude. - * @param- {Object} [guard] Internally used to allow this method to work with - * others like `_.map` without using their callback `index` argument for `n`. - * @returns {Array} Returns all but the first value or `n` values of `array`. - * @example - * - * _.rest([3, 2, 1]); - * // => [2, 1] - */ - function rest(array, n, guard) { - return array - ? slice.call(array, (n == null || guard) ? 1 : n) - : []; - } - - /** - * Uses a binary search to determine the smallest index at which the `value` - * should be inserted into `array` in order to maintain the sort order of the - * sorted `array`. If `callback` is passed, it will be executed for `value` and - * each element in `array` to compute their sort ranking. The `callback` is - * bound to `thisArg` and invoked with one argument; (value). The `callback` - * argument may also be the name of a property to order by. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to iterate over. - * @param {Mixed} value The value to evaluate. - * @param {Function|String} [callback=identity|property] The function called - * per iteration or property name to order by. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Number} Returns the index at which the value should be inserted - * into `array`. - * @example - * - * _.sortedIndex([20, 30, 50], 40); - * // => 2 - * - * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); - * // => 2 - * - * var dict = { - * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } - * }; - * - * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { - * return dict.wordToNumber[word]; - * }); - * // => 2 - * - * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { - * return this.wordToNumber[word]; - * }, dict); - * // => 2 - */ - function sortedIndex(array, value, callback, thisArg) { - var low = 0, - high = array ? array.length : low; - - // explicitly reference `identity` for better engine inlining - callback = callback ? createCallback(callback, thisArg) : identity; - value = callback(value); - while (low < high) { - var mid = (low + high) >>> 1; - callback(array[mid]) < value - ? low = mid + 1 - : high = mid; - } - return low; - } - - /** - * Computes the union of the passed-in arrays using strict equality for - * comparisons, i.e. `===`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of unique values, in order, that are - * present in one or more of the arrays. - * @example - * - * _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); - * // => [1, 2, 3, 101, 10] - */ - function union() { - return uniq(concat.apply(arrayRef, arguments)); - } - - /** - * Creates a duplicate-value-free version of the `array` using strict equality - * for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` - * for `isSorted` will run a faster algorithm. If `callback` is passed, each - * element of `array` is passed through a callback` before uniqueness is computed. - * The `callback` is bound to `thisArg` and invoked with three arguments; (value, index, array). - * - * @static - * @memberOf _ - * @alias unique - * @category Arrays - * @param {Array} array The array to process. - * @param {Boolean} [isSorted=false] A flag to indicate that the `array` is already sorted. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a duplicate-value-free array. - * @example - * - * _.uniq([1, 2, 1, 3, 1]); - * // => [1, 2, 3] - * - * _.uniq([1, 1, 2, 2, 3], true); - * // => [1, 2, 3] - * - * _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return Math.floor(num); }); - * // => [1, 2, 3] - * - * _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math); - * // => [1, 2, 3] - */ - function uniq(array, isSorted, callback, thisArg) { - var index = -1, - length = array ? array.length : 0, - result = [], - seen = result; - - // juggle arguments - if (typeof isSorted == 'function') { - thisArg = callback; - callback = isSorted; - isSorted = false; - } - // init value cache for large arrays - var isLarge = !isSorted && length > 74; - if (isLarge) { - var cache = {}; - } - if (callback) { - seen = []; - callback = createCallback(callback, thisArg); - } - while (++index < length) { - var value = array[index], - computed = callback ? callback(value, index, array) : value; - - if (isLarge) { - // manually coerce `computed` to a string because `hasOwnProperty`, in - // some older versions of Firefox, coerces objects incorrectly - seen = hasOwnProperty.call(cache, computed + '') ? cache[computed] : (cache[computed] = []); - } - if (isSorted - ? !index || seen[seen.length - 1] !== computed - : indexOf(seen, computed) < 0 - ) { - if (callback || isLarge) { - seen.push(computed); - } - result.push(value); - } - } - return result; - } - - /** - * Creates an array with all occurrences of the passed values removed using - * strict equality for comparisons, i.e. `===`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to filter. - * @param {Mixed} [value1, value2, ...] Values to remove. - * @returns {Array} Returns a new filtered array. - * @example - * - * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); - * // => [2, 3, 4] - */ - function without(array) { - var index = -1, - length = array ? array.length : 0, - contains = cachedContains(arguments, 1, 20), - result = []; - - while (++index < length) { - var value = array[index]; - if (!contains(value)) { - result.push(value); - } - } - return result; - } - - /** - * Groups the elements of each array at their corresponding indexes. Useful for - * separate data sources that are coordinated through matching array indexes. - * For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix - * in a similar fashion. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of grouped elements. - * @example - * - * _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); - * // => [['moe', 30, true], ['larry', 40, false], ['curly', 50, false]] - */ - function zip(array) { - var index = -1, - length = array ? max(pluck(arguments, 'length')) : 0, - result = Array(length); - - while (++index < length) { - result[index] = pluck(arguments, index); - } - return result; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a function that is restricted to executing `func` only after it is - * called `n` times. The `func` is executed with the `this` binding of the - * created function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Number} n The number of times the function must be called before - * it is executed. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var renderNotes = _.after(notes.length, render); - * _.forEach(notes, function(note) { - * note.asyncSave({ 'success': renderNotes }); - * }); - * // `renderNotes` is run once, after all notes have saved - */ - function after(n, func) { - if (n < 1) { - return func(); - } - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; - } - - /** - * Creates a function that, when called, invokes `func` with the `this` - * binding of `thisArg` and prepends any additional `bind` arguments to those - * passed to the bound function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to bind. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var func = function(greeting) { - * return greeting + ' ' + this.name; - * }; - * - * func = _.bind(func, { 'name': 'moe' }, 'hi'); - * func(); - * // => 'hi moe' - */ - function bind(func, thisArg) { - // use `Function#bind` if it exists and is fast - // (in V8 `Function#bind` is slower except when partially applied) - return isBindFast || (nativeBind && arguments.length > 2) - ? nativeBind.call.apply(nativeBind, arguments) - : createBound(func, thisArg, slice.call(arguments, 2)); - } - - /** - * Binds methods on `object` to `object`, overwriting the existing method. - * If no method names are provided, all the function properties of `object` - * will be bound. - * - * @static - * @memberOf _ - * @category Functions - * @param {Object} object The object to bind and assign the bound methods to. - * @param {String} [methodName1, methodName2, ...] Method names on the object to bind. - * @returns {Object} Returns `object`. - * @example - * - * var buttonView = { - * 'label': 'lodash', - * 'onClick': function() { alert('clicked: ' + this.label); } - * }; - * - * _.bindAll(buttonView); - * jQuery('#lodash_button').on('click', buttonView.onClick); - * // => When the button is clicked, `this.label` will have the correct value - */ - function bindAll(object) { - var funcs = arguments, - index = funcs.length > 1 ? 0 : (funcs = functions(object), -1), - length = funcs.length; - - while (++index < length) { - var key = funcs[index]; - object[key] = bind(object[key], object); - } - return object; - } - - /** - * Creates a function that is the composition of the passed functions, - * where each function consumes the return value of the function that follows. - * In math terms, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. - * Each function is executed with the `this` binding of the composed function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} [func1, func2, ...] Functions to compose. - * @returns {Function} Returns the new composed function. - * @example - * - * var greet = function(name) { return 'hi: ' + name; }; - * var exclaim = function(statement) { return statement + '!'; }; - * var welcome = _.compose(exclaim, greet); - * welcome('moe'); - * // => 'hi: moe!' - */ - function compose() { - var funcs = arguments; - return function() { - var args = arguments, - length = funcs.length; - - while (length--) { - args = [funcs[length].apply(this, args)]; - } - return args[0]; - }; - } - - /** - * Creates a function that will delay the execution of `func` until after - * `wait` milliseconds have elapsed since the last time it was invoked. Pass - * `true` for `immediate` to cause debounce to invoke `func` on the leading, - * instead of the trailing, edge of the `wait` timeout. Subsequent calls to - * the debounced function will return the result of the last `func` call. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to debounce. - * @param {Number} wait The number of milliseconds to delay. - * @param {Boolean} immediate A flag to indicate execution is on the leading - * edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * var lazyLayout = _.debounce(calculateLayout, 300); - * jQuery(window).on('resize', lazyLayout); - */ - function debounce(func, wait, immediate) { - var args, - result, - thisArg, - timeoutId; - - function delayed() { - timeoutId = null; - if (!immediate) { - result = func.apply(thisArg, args); - } - } - return function() { - var isImmediate = immediate && !timeoutId; - args = arguments; - thisArg = this; - - clearTimeout(timeoutId); - timeoutId = setTimeout(delayed, wait); - - if (isImmediate) { - result = func.apply(thisArg, args); - } - return result; - }; - } - - /** - * Executes the `func` function after `wait` milliseconds. Additional arguments - * will be passed to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to delay. - * @param {Number} wait The number of milliseconds to delay execution. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the `setTimeout` timeout id. - * @example - * - * var log = _.bind(console.log, console); - * _.delay(log, 1000, 'logged later'); - * // => 'logged later' (Appears after one second.) - */ - function delay(func, wait) { - var args = slice.call(arguments, 2); - return setTimeout(function() { func.apply(undefined, args); }, wait); - } - - /** - * Defers executing the `func` function until the current call stack has cleared. - * Additional arguments will be passed to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to defer. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the `setTimeout` timeout id. - * @example - * - * _.defer(function() { alert('deferred'); }); - * // returns from the function before `alert` is called - */ - function defer(func) { - var args = slice.call(arguments, 1); - return setTimeout(function() { func.apply(undefined, args); }, 1); - } - - /** - * Creates a function that, when called, invokes `object[methodName]` and - * prepends any additional `lateBind` arguments to those passed to the bound - * function. This method differs from `_.bind` by allowing bound functions to - * reference methods that will be redefined or don't yet exist. - * - * @static - * @memberOf _ - * @category Functions - * @param {Object} object The object the method belongs to. - * @param {String} methodName The method name. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var object = { - * 'name': 'moe', - * 'greet': function(greeting) { - * return greeting + ' ' + this.name; - * } - * }; - * - * var func = _.lateBind(object, 'greet', 'hi'); - * func(); - * // => 'hi moe' - * - * object.greet = function(greeting) { - * return greeting + ', ' + this.name + '!'; - * }; - * - * func(); - * // => 'hi, moe!' - */ - function lateBind(object, methodName) { - return createBound(methodName, object, slice.call(arguments, 2)); - } - - /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * passed, it will be used to determine the cache key for storing the result - * based on the arguments passed to the memoized function. By default, the first - * argument passed to the memoized function is used as the cache key. The `func` - * is executed with the `this` binding of the memoized function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] A function used to resolve the cache key. - * @returns {Function} Returns the new memoizing function. - * @example - * - * var fibonacci = _.memoize(function(n) { - * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); - * }); - */ - function memoize(func, resolver) { - var cache = {}; - return function() { - var key = resolver ? resolver.apply(this, arguments) : arguments[0]; - return hasOwnProperty.call(cache, key) - ? cache[key] - : (cache[key] = func.apply(this, arguments)); - }; - } - - /** - * Creates a function that is restricted to execute `func` once. Repeat calls to - * the function will return the value of the first call. The `func` is executed - * with the `this` binding of the created function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // Application is only created once. - */ - function once(func) { - var result, - ran = false; - - return function() { - if (ran) { - return result; - } - ran = true; - result = func.apply(this, arguments); - - // clear the `func` variable so the function may be garbage collected - func = null; - return result; - }; - } - - /** - * Creates a function that, when called, invokes `func` with any additional - * `partial` arguments prepended to those passed to the new function. This - * method is similar to `bind`, except it does **not** alter the `this` binding. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to partially apply arguments to. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * var greet = function(greeting, name) { return greeting + ': ' + name; }; - * var hi = _.partial(greet, 'hi'); - * hi('moe'); - * // => 'hi: moe' - */ - function partial(func) { - return createBound(func, slice.call(arguments, 1)); - } - - /** - * Creates a function that, when executed, will only call the `func` - * function at most once per every `wait` milliseconds. If the throttled - * function is invoked more than once during the `wait` timeout, `func` will - * also be called on the trailing edge of the timeout. Subsequent calls to the - * throttled function will return the result of the last `func` call. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to throttle. - * @param {Number} wait The number of milliseconds to throttle executions to. - * @returns {Function} Returns the new throttled function. - * @example - * - * var throttled = _.throttle(updatePosition, 100); - * jQuery(window).on('scroll', throttled); - */ - function throttle(func, wait) { - var args, - result, - thisArg, - timeoutId, - lastCalled = 0; - - function trailingCall() { - lastCalled = new Date; - timeoutId = null; - result = func.apply(thisArg, args); - } - return function() { - var now = new Date, - remaining = wait - (now - lastCalled); - - args = arguments; - thisArg = this; - - if (remaining <= 0) { - clearTimeout(timeoutId); - lastCalled = now; - result = func.apply(thisArg, args); - } - else if (!timeoutId) { - timeoutId = setTimeout(trailingCall, remaining); - } - return result; - }; - } - - /** - * Creates a function that passes `value` to the `wrapper` function as its - * first argument. Additional arguments passed to the function are appended - * to those passed to the `wrapper` function. The `wrapper` is executed with - * the `this` binding of the created function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Mixed} value The value to wrap. - * @param {Function} wrapper The wrapper function. - * @returns {Function} Returns the new function. - * @example - * - * var hello = function(name) { return 'hello ' + name; }; - * hello = _.wrap(hello, function(func) { - * return 'before, ' + func('moe') + ', after'; - * }); - * hello(); - * // => 'before, hello moe, after' - */ - function wrap(value, wrapper) { - return function() { - var args = [value]; - push.apply(args, arguments); - return wrapper.apply(this, args); - }; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their - * corresponding HTML entities. - * - * @static - * @memberOf _ - * @category Utilities - * @param {String} string The string to escape. - * @returns {String} Returns the escaped string. - * @example - * - * _.escape('Moe, Larry & Curly'); - * // => "Moe, Larry & Curly" - */ - function escape(string) { - return string == null ? '' : (string + '').replace(reUnescapedHtml, escapeHtmlChar); - } - - /** - * This function returns the first argument passed to it. - * - * Note: It is used throughout Lo-Dash as a default callback. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Mixed} value Any value. - * @returns {Mixed} Returns `value`. - * @example - * - * var moe = { 'name': 'moe' }; - * moe === _.identity(moe); - * // => true - */ - function identity(value) { - return value; - } - - /** - * Adds functions properties of `object` to the `lodash` function and chainable - * wrapper. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Object} object The object of function properties to add to `lodash`. - * @example - * - * _.mixin({ - * 'capitalize': function(string) { - * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); - * } - * }); - * - * _.capitalize('larry'); - * // => 'Larry' - * - * _('curly').capitalize(); - * // => 'Curly' - */ - function mixin(object) { - forEach(functions(object), function(methodName) { - var func = lodash[methodName] = object[methodName]; - - lodash.prototype[methodName] = function() { - var args = [this.__wrapped__]; - push.apply(args, arguments); - - var result = func.apply(lodash, args); - if (this.__chain__) { - result = new lodash(result); - result.__chain__ = true; - } - return result; - }; - }); - } - - /** - * Reverts the '_' variable to its previous value and returns a reference to - * the `lodash` function. - * - * @static - * @memberOf _ - * @category Utilities - * @returns {Function} Returns the `lodash` function. - * @example - * - * var lodash = _.noConflict(); - */ - function noConflict() { - window._ = oldDash; - return this; - } - - /** - * Produces a random number between `min` and `max` (inclusive). If only one - * argument is passed, a number between `0` and the given number will be returned. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Number} [min=0] The minimum possible value. - * @param {Number} [max=1] The maximum possible value. - * @returns {Number} Returns a random number. - * @example - * - * _.random(0, 5); - * // => a number between 1 and 5 - * - * _.random(5); - * // => also a number between 1 and 5 - */ - function random(min, max) { - if (min == null && max == null) { - max = 1; - } - min = +min || 0; - if (max == null) { - max = min; - min = 0; - } - return min + floor(nativeRandom() * ((+max || 0) - min + 1)); - } - - /** - * Resolves the value of `property` on `object`. If `property` is a function - * it will be invoked and its result returned, else the property value is - * returned. If `object` is falsey, then `null` is returned. - * - * @deprecated - * @static - * @memberOf _ - * @category Utilities - * @param {Object} object The object to inspect. - * @param {String} property The property to get the value of. - * @returns {Mixed} Returns the resolved value. - * @example - * - * var object = { - * 'cheese': 'crumpets', - * 'stuff': function() { - * return 'nonsense'; - * } - * }; - * - * _.result(object, 'cheese'); - * // => 'crumpets' - * - * _.result(object, 'stuff'); - * // => 'nonsense' - */ - function result(object, property) { - // based on Backbone's private `getValue` function - // https://github.com/documentcloud/backbone/blob/0.9.2/backbone.js#L1419-1424 - var value = object ? object[property] : null; - return isFunction(value) ? object[property]() : value; - } - - /** - * A micro-templating method that handles arbitrary delimiters, preserves - * whitespace, and correctly escapes quotes within interpolated code. - * - * Note: In the development build `_.template` utilizes sourceURLs for easier - * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl - * - * Note: Lo-Dash may be used in Chrome extensions by either creating a `lodash csp` - * build and avoiding `_.template` use, or loading Lo-Dash in a sandboxed page. - * See http://developer.chrome.com/trunk/extensions/sandboxingEval.html - * - * @static - * @memberOf _ - * @category Utilities - * @param {String} text The template text. - * @param {Obect} data The data object used to populate the text. - * @param {Object} options The options object. - * escape - The "escape" delimiter regexp. - * evaluate - The "evaluate" delimiter regexp. - * interpolate - The "interpolate" delimiter regexp. - * sourceURL - The sourceURL of the template's compiled source. - * variable - The data object variable name. - * - * @returns {Function|String} Returns a compiled function when no `data` object - * is given, else it returns the interpolated text. - * @example - * - * // using a compiled template - * var compiled = _.template('hello <%= name %>'); - * compiled({ 'name': 'moe' }); - * // => 'hello moe' - * - * var list = '<% _.forEach(people, function(name) { %>
      1. <%= name %>
      2. <% }); %>'; - * _.template(list, { 'people': ['moe', 'larry', 'curly'] }); - * // => '
      3. moe
      4. larry
      5. curly
      6. ' - * - * // using the "escape" delimiter to escape HTML in data property values - * _.template('<%- value %>', { 'value': '\n```\n\nUsing [npm](http://npmjs.org/):\n\n```bash\nnpm install lodash\n\nnpm install -g lodash\nnpm link lodash\n```\n\nIn [Node.js](http://nodejs.org/) and [RingoJS v0.8.0+](http://ringojs.org/):\n\n```js\nvar _ = require('lodash');\n```\n\n**Note:** If Lo-Dash is installed globally, [run `npm link lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory before requiring it.\n\nIn [RingoJS v0.7.0-](http://ringojs.org/):\n\n```js\nvar _ = require('lodash')._;\n```\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('lodash.js');\n```\n\nIn an AMD loader like [RequireJS](http://requirejs.org/):\n\n```js\nrequire({\n 'paths': {\n 'underscore': 'path/to/lodash'\n }\n},\n['underscore'], function(_) {\n console.log(_.VERSION);\n});\n```\n\n## Resolved Underscore.js issues\n\n * Allow iteration of objects with a `length` property [[#799](https://github.com/documentcloud/underscore/pull/799), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L545-551)]\n * Fix cross-browser object iteration bugs [[#60](https://github.com/documentcloud/underscore/issues/60), [#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L558-582)]\n * Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [#742](https://github.com/documentcloud/underscore/issues/742), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L140-146)]\n * `_.isEmpty` should support jQuery/MooTools DOM query collections [[#690](https://github.com/documentcloud/underscore/pull/690), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L747-752)]\n * `_.isObject` should avoid V8 bug [#2291](http://code.google.com/p/8/issues/detail?id=2291) [[#605](https://github.com/documentcloud/underscore/issues/605), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L828-840)]\n * `_.keys` should work with `arguments` objects cross-browser [[#396](https://github.com/documentcloud/underscore/issues/396), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L921-923)]\n * `_.range` should coerce arguments to numbers [[#634](https://github.com/documentcloud/underscore/issues/634), [#683](https://github.com/documentcloud/underscore/issues/683), [test](https://github.com/lodash/lodash/blob/0.9.2/test/test.js#L1337-1340)]\n\n## Release Notes\n\n### v0.9.2\n\n * Added `fromIndex` argument to `_.contains`\n * Added `moduleId` build option\n * Added Closure Compiler *“simpleâ€* optimizations to the build process\n * Added support for strings in `_.max` and `_.min`\n * Added support for ES6 template delimiters to `_.template`\n * Ensured re-minification of Lo-Dash by third parties avoids Closure Compiler bugs\n * Optimized `_.every`, `_.find`, `_.some`, and `_.uniq`\n\nThe full changelog is available [here](https://github.com/lodash/lodash/wiki/Changelog).\n\n## BestieJS\n\nLo-Dash is part of the [BestieJS](https://github.com/bestiejs) *“Best in Classâ€* module collection. This means we promote solid browser/environment support, ES5 precedents, unit testing, and plenty of documentation.\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](http://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://iceddev.com/) | [Kit Cambridge](http://kitcambridge.github.io/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash@0.9.2", - "_from": "lodash@~0.9.2" -} diff --git a/node_modules/grunt/node_modules/minimatch/.npmignore b/node_modules/grunt/node_modules/minimatch/.npmignore deleted file mode 100644 index 3c3629e647f5..000000000000 --- a/node_modules/grunt/node_modules/minimatch/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/grunt/node_modules/minimatch/LICENSE b/node_modules/grunt/node_modules/minimatch/LICENSE deleted file mode 100644 index 05a4010949ca..000000000000 --- a/node_modules/grunt/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/grunt/node_modules/minimatch/README.md b/node_modules/grunt/node_modules/minimatch/README.md deleted file mode 100644 index 978268e275e8..000000000000 --- a/node_modules/grunt/node_modules/minimatch/README.md +++ /dev/null @@ -1,218 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -Eventually, it will replace the C binding in node-glob. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instanting the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -## Functions - -The top-level exported function has a `cache` property, which is an LRU -cache set to store 100 items. So, calling these methods repeatedly -with the same pattern and options will use the same Minimatch object, -saving the cost of parsing it multiple times. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself. When set, an empty list is returned if there are -no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/node_modules/grunt/node_modules/minimatch/minimatch.js b/node_modules/grunt/node_modules/minimatch/minimatch.js deleted file mode 100644 index c633f89fabc3..000000000000 --- a/node_modules/grunt/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,1055 +0,0 @@ -;(function (require, exports, module, platform) { - -if (module) module.exports = minimatch -else exports.minimatch = minimatch - -if (!require) { - require = function (id) { - switch (id) { - case "sigmund": return function sigmund (obj) { - return JSON.stringify(obj) - } - case "path": return { basename: function (f) { - f = f.split(/[\/\\]/) - var e = f.pop() - if (!e) e = f.pop() - return e - }} - case "lru-cache": return function LRUCache () { - // not quite an LRU, but still space-limited. - var cache = {} - var cnt = 0 - this.set = function (k, v) { - cnt ++ - if (cnt >= 100) cache = {} - cache[k] = v - } - this.get = function (k) { return cache[k] } - } - } - } -} - -minimatch.Minimatch = Minimatch - -var LRU = require("lru-cache") - , cache = minimatch.cache = new LRU({max: 100}) - , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} - , sigmund = require("sigmund") - -var path = require("path") - // any single thing other than / - // don't need to escape / when using new RegExp() - , qmark = "[^/]" - - // * => any number of characters - , star = qmark + "*?" - - // ** when dots are allowed. Anything goes, except .. and . - // not (^ or / followed by one or two dots followed by $ or /), - // followed by anything, any number of times. - , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" - - // not a ^ or / followed by a dot, - // followed by anything, any number of times. - , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" - - // characters that need to be escaped in RegExp. - , reSpecials = charSet("().*{}+?[]^$\\!") - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split("").reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - - -function minimatch (p, pattern, options) { - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - return false - } - - // "" only matches "" - if (pattern.trim() === "") return p === "" - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options, cache) - } - - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows: need to use /, not \ - // On other platforms, \ is a valid (albeit bad) filename char. - if (platform === "win32") { - pattern = pattern.split("\\").join("/") - } - - // lru storage. - // these things aren't particularly big, but walking down the string - // and turning it into a regexp can get pretty costly. - var cacheKey = pattern + "\n" + sigmund(options) - var cached = minimatch.cache.get(cacheKey) - if (cached) return cached - minimatch.cache.set(cacheKey, this) - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function() {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return -1 === s.indexOf(false) - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - , negate = false - , options = this.options - , negateOffset = 0 - - if (options.nonegate) return - - for ( var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === "!" - ; i ++) { - negate = !negate - negateOffset ++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return new Minimatch(pattern, options).braceExpand() -} - -Minimatch.prototype.braceExpand = braceExpand -function braceExpand (pattern, options) { - options = options || this.options - pattern = typeof pattern === "undefined" - ? this.pattern : pattern - - if (typeof pattern === "undefined") { - throw new Error("undefined pattern") - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - var escaping = false - - // examples and comments refer to this crazy pattern: - // a{b,c{d,e},{f,g}h}x{y,z} - // expected: - // abxy - // abxz - // acdxy - // acdxz - // acexy - // acexz - // afhxy - // afhxz - // aghxy - // aghxz - - // everything before the first \{ is just a prefix. - // So, we pluck that off, and work with the rest, - // and then prepend it to everything we find. - if (pattern.charAt(0) !== "{") { - this.debug(pattern) - var prefix = null - for (var i = 0, l = pattern.length; i < l; i ++) { - var c = pattern.charAt(i) - this.debug(i, c) - if (c === "\\") { - escaping = !escaping - } else if (c === "{" && !escaping) { - prefix = pattern.substr(0, i) - break - } - } - - // actually no sets, all { were escaped. - if (prefix === null) { - this.debug("no sets") - return [pattern] - } - - var tail = braceExpand.call(this, pattern.substr(i), options) - return tail.map(function (t) { - return prefix + t - }) - } - - // now we have something like: - // {b,c{d,e},{f,g}h}x{y,z} - // walk through the set, expanding each part, until - // the set ends. then, we'll expand the suffix. - // If the set only has a single member, then'll put the {} back - - // first, handle numeric sets, since they're easier - var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) - if (numset) { - this.debug("numset", numset[1], numset[2]) - var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) - , start = +numset[1] - , end = +numset[2] - , inc = start > end ? -1 : 1 - , set = [] - for (var i = start; i != (end + inc); i += inc) { - // append all the suffixes - for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - set.push(i + suf[ii]) - } - } - return set - } - - // ok, walk through the set - // We hope, somewhat optimistically, that there - // will be a } at the end. - // If the closing brace isn't found, then the pattern is - // interpreted as braceExpand("\\" + pattern) so that - // the leading \{ will be interpreted literally. - var i = 1 // skip the \{ - , depth = 1 - , set = [] - , member = "" - , sawEnd = false - , escaping = false - - function addMember () { - set.push(member) - member = "" - } - - this.debug("Entering for") - FOR: for (i = 1, l = pattern.length; i < l; i ++) { - var c = pattern.charAt(i) - this.debug("", i, c) - - if (escaping) { - escaping = false - member += "\\" + c - } else { - switch (c) { - case "\\": - escaping = true - continue - - case "{": - depth ++ - member += "{" - continue - - case "}": - depth -- - // if this closes the actual set, then we're done - if (depth === 0) { - addMember() - // pluck off the close-brace - i ++ - break FOR - } else { - member += c - continue - } - - case ",": - if (depth === 1) { - addMember() - } else { - member += c - } - continue - - default: - member += c - continue - } // switch - } // else - } // for - - // now we've either finished the set, and the suffix is - // pattern.substr(i), or we have *not* closed the set, - // and need to escape the leading brace - if (depth !== 0) { - this.debug("didn't close", pattern) - return braceExpand.call(this, "\\" + pattern, options) - } - - // x{y,z} -> ["xy", "xz"] - this.debug("set", set) - this.debug("suffix", pattern.substr(i)) - var suf = braceExpand.call(this, pattern.substr(i), options) - // ["b", "c{d,e}","{f,g}h"] -> - // [["b"], ["cd", "ce"], ["fh", "gh"]] - var addBraces = set.length === 1 - this.debug("set pre-expanded", set) - set = set.map(function (p) { - return braceExpand.call(this, p, options) - }, this) - this.debug("set expanded", set) - - - // [["b"], ["cd", "ce"], ["fh", "gh"]] -> - // ["b", "cd", "ce", "fh", "gh"] - set = set.reduce(function (l, r) { - return l.concat(r) - }) - - if (addBraces) { - set = set.map(function (s) { - return "{" + s + "}" - }) - } - - // now attach the suffixes. - var ret = [] - for (var i = 0, l = set.length; i < l; i ++) { - for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - ret.push(set[i] + suf[ii]) - } - } - return ret -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === "**") return GLOBSTAR - if (pattern === "") return "" - - var re = "" - , hasMagic = !!options.nocase - , escaping = false - // ? => one single character - , patternListStack = [] - , plType - , stateChar - , inClass = false - , reClassStart = -1 - , classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - , patternStart = pattern.charAt(0) === "." ? "" // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" - : "(?!\\.)" - , self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case "*": - re += star - hasMagic = true - break - case "?": - re += qmark - hasMagic = true - break - default: - re += "\\"+stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for ( var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i ++ ) { - - this.debug("%s\t%s %s %j", pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += "\\" + c - escaping = false - continue - } - - SWITCH: switch (c) { - case "/": - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case "\\": - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === "!" && i === classStart + 1) c = "^" - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case "(": - if (inClass) { - re += "(" - continue - } - - if (!stateChar) { - re += "\\(" - continue - } - - plType = stateChar - patternListStack.push({ type: plType - , start: i - 1 - , reStart: re.length }) - // negation is (?:(?!js)[^/]*) - re += stateChar === "!" ? "(?:(?!" : "(?:" - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ")": - if (inClass || !patternListStack.length) { - re += "\\)" - continue - } - - clearStateChar() - hasMagic = true - re += ")" - plType = patternListStack.pop().type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case "!": - re += "[^/]*?)" - break - case "?": - case "+": - case "*": re += plType - case "@": break // the default anyway - } - continue - - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|" - escaping = false - continue - } - - clearStateChar() - re += "|" - continue - - // these are mostly the same in regexp and glob - case "[": - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += "\\" + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case "]": - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += "\\" + c - escaping = false - continue - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === "^" && inClass)) { - re += "\\" - } - - re += c - - } // switch - } // for - - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - var cs = pattern.substr(classStart + 1) - , sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - var pl - while (pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = "\\" - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + "|" - }) - - this.debug("tail=%j\n %s", tail, tail) - var t = pl.type === "*" ? star - : pl.type === "?" ? qmark - : "\\" + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) - + t + "\\(" - + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += "\\\\" - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case ".": - case "[": - case "(": addPatternStart = true - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== "" && hasMagic) re = "(?=.)" + re - - if (addPatternStart) re = patternStart + re - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [ re, hasMagic ] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? "i" : "" - , regExp = new RegExp("^" + re + "$", flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) return this.regexp = false - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - , flags = options.nocase ? "i" : "" - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === "string") ? regExpEscape(p) - : p._src - }).join("\\\/") - }).join("|") - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = "^(?:" + re + ")$" - - // can match anything, as long as it's not this. - if (this.negate) re = "^(?!" + re + ").*$" - - try { - return this.regexp = new RegExp(re, flags) - } catch (ex) { - return this.regexp = false - } -} - -minimatch.match = function (list, pattern, options) { - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug("match", f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === "" - - if (f === "/" && partial) return true - - var options = this.options - - // windows: need to use /, not \ - // On other platforms, \ is a valid (albeit bad) filename char. - if (platform === "win32") { - f = f.split("\\").join("/") - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, "split", f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, "set", set) - - var splitFile = path.basename(f.join("/")).split("/") - - for (var i = 0, l = set.length; i < l; i ++) { - var pattern = set[i], file = f - if (options.matchBase && pattern.length === 1) { - file = splitFile - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug("matchOne", - { "this": this - , file: file - , pattern: pattern }) - - this.debug("matchOne", file.length, pattern.length) - - for ( var fi = 0 - , pi = 0 - , fl = file.length - , pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi ++, pi ++ ) { - - this.debug("matchOne loop") - var p = pattern[pi] - , f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - , pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for ( ; fi < fl; fi ++) { - if (file[fi] === "." || file[fi] === ".." || - (!options.dot && file[fi].charAt(0) === ".")) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - WHILE: while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', - file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === "." || swallowee === ".." || - (!options.dot && swallowee.charAt(0) === ".")) { - this.debug("dot detected!", file, fr, pattern, pr) - break WHILE - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr ++ - } - } - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug("\n>>> no match, partial?", file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === "string") { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug("string match", p, f, hit) - } else { - hit = f.match(p) - this.debug("pattern match", p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") - return emptyFileEnd - } - - // should be unreachable. - throw new Error("wtf?") -} - - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, "$1") -} - - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") -} - -})( typeof require === "function" ? require : null, - this, - typeof module === "object" ? module : null, - typeof process === "object" ? process.platform : "win32" - ) diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/.npmignore b/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/.npmignore deleted file mode 100644 index 07e6e472cc75..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS b/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS deleted file mode 100644 index 4a0bc5033a06..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +++ /dev/null @@ -1,14 +0,0 @@ -# Authors, sorted by whether or not they are me -Isaac Z. Schlueter -Brian Cottingham -Carlos Brito Lage -Jesse Dailey -Kevin O'Hara -Marco Rogers -Mark Cavage -Marko Mikulicic -Nathan Rajlich -Satheesh Natesan -Trent Mick -ashleybrener -n4kz diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/LICENSE b/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/LICENSE deleted file mode 100644 index 05a4010949ca..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/README.md b/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/README.md deleted file mode 100644 index 03ee0f985023..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# lru cache - -A cache object that deletes the least-recently-used items. - -## Usage: - -```javascript -var LRU = require("lru-cache") - , options = { max: 500 - , length: function (n) { return n * 2 } - , dispose: function (key, n) { n.close() } - , maxAge: 1000 * 60 * 60 } - , cache = LRU(options) - , otherCache = LRU(50) // sets just the max size - -cache.set("key", "value") -cache.get("key") // "value" - -cache.reset() // empty the cache -``` - -If you put more stuff in it, then items will fall out. - -If you try to put an oversized thing in it, then it'll fall out right -away. - -## Options - -* `max` The maximum size of the cache, checked by applying the length - function to all values in the cache. Not setting this is kind of - silly, since that's the whole purpose of this lib, but it defaults - to `Infinity`. -* `maxAge` Maximum age in ms. Items are not pro-actively pruned out - as they age, but if you try to get an item that is too old, it'll - drop it and return undefined instead of giving it to you. -* `length` Function that is used to calculate the length of stored - items. If you're storing strings or buffers, then you probably want - to do something like `function(n){return n.length}`. The default is - `function(n){return 1}`, which is fine if you want to store `n` - like-sized things. -* `dispose` Function that is called on items when they are dropped - from the cache. This can be handy if you want to close file - descriptors or do other cleanup tasks when items are no longer - accessible. Called with `key, value`. It's called *before* - actually removing the item from the internal cache, so if you want - to immediately put it back in, you'll have to do that in a - `nextTick` or `setTimeout` callback or it won't do anything. -* `stale` By default, if you set a `maxAge`, it'll only actually pull - stale items out of the cache when you `get(key)`. (That is, it's - not pre-emptively doing a `setTimeout` or anything.) If you set - `stale:true`, it'll return the stale value before deleting it. If - you don't set this, then it'll return `undefined` when you try to - get a stale entry, as if it had already been deleted. - -## API - -* `set(key, value)` -* `get(key) => value` - - Both of these will update the "recently used"-ness of the key. - They do what you think. - -* `peek(key)` - - Returns the key value (or `undefined` if not found) without - updating the "recently used"-ness of the key. - - (If you find yourself using this a lot, you *might* be using the - wrong sort of data structure, but there are some use cases where - it's handy.) - -* `del(key)` - - Deletes a key out of the cache. - -* `reset()` - - Clear the cache entirely, throwing away all values. - -* `has(key)` - - Check if a key is in the cache, without updating the recent-ness - or deleting it for being stale. - -* `forEach(function(value,key,cache), [thisp])` - - Just like `Array.prototype.forEach`. Iterates over all the keys - in the cache, in order of recent-ness. (Ie, more recently used - items are iterated over first.) - -* `keys()` - - Return an array of the keys in the cache. - -* `values()` - - Return an array of the values in the cache. diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js deleted file mode 100644 index d1d1381720cd..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +++ /dev/null @@ -1,252 +0,0 @@ -;(function () { // closure for web browsers - -if (typeof module === 'object' && module.exports) { - module.exports = LRUCache -} else { - // just set the global for non-node platforms. - this.LRUCache = LRUCache -} - -function hOP (obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key) -} - -function naiveLength () { return 1 } - -function LRUCache (options) { - if (!(this instanceof LRUCache)) - return new LRUCache(options) - - if (typeof options === 'number') - options = { max: options } - - if (!options) - options = {} - - this._max = options.max - // Kind of weird to have a default max of Infinity, but oh well. - if (!this._max || !(typeof this._max === "number") || this._max <= 0 ) - this._max = Infinity - - this._lengthCalculator = options.length || naiveLength - if (typeof this._lengthCalculator !== "function") - this._lengthCalculator = naiveLength - - this._allowStale = options.stale || false - this._maxAge = options.maxAge || null - this._dispose = options.dispose - this.reset() -} - -// resize the cache when the max changes. -Object.defineProperty(LRUCache.prototype, "max", - { set : function (mL) { - if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity - this._max = mL - if (this._length > this._max) trim(this) - } - , get : function () { return this._max } - , enumerable : true - }) - -// resize the cache when the lengthCalculator changes. -Object.defineProperty(LRUCache.prototype, "lengthCalculator", - { set : function (lC) { - if (typeof lC !== "function") { - this._lengthCalculator = naiveLength - this._length = this._itemCount - for (var key in this._cache) { - this._cache[key].length = 1 - } - } else { - this._lengthCalculator = lC - this._length = 0 - for (var key in this._cache) { - this._cache[key].length = this._lengthCalculator(this._cache[key].value) - this._length += this._cache[key].length - } - } - - if (this._length > this._max) trim(this) - } - , get : function () { return this._lengthCalculator } - , enumerable : true - }) - -Object.defineProperty(LRUCache.prototype, "length", - { get : function () { return this._length } - , enumerable : true - }) - - -Object.defineProperty(LRUCache.prototype, "itemCount", - { get : function () { return this._itemCount } - , enumerable : true - }) - -LRUCache.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - var i = 0; - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - i++ - var hit = this._lruList[k] - if (this._maxAge && (Date.now() - hit.now > this._maxAge)) { - del(this, hit) - if (!this._allowStale) hit = undefined - } - if (hit) { - fn.call(thisp, hit.value, hit.key, this) - } - } -} - -LRUCache.prototype.keys = function () { - var keys = new Array(this._itemCount) - var i = 0 - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] - keys[i++] = hit.key - } - return keys -} - -LRUCache.prototype.values = function () { - var values = new Array(this._itemCount) - var i = 0 - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] - values[i++] = hit.value - } - return values -} - -LRUCache.prototype.reset = function () { - if (this._dispose && this._cache) { - for (var k in this._cache) { - this._dispose(k, this._cache[k].value) - } - } - - this._cache = Object.create(null) // hash of items by key - this._lruList = Object.create(null) // list of items in order of use recency - this._mru = 0 // most recently used - this._lru = 0 // least recently used - this._length = 0 // number of items in the list - this._itemCount = 0 -} - -// Provided for debugging/dev purposes only. No promises whatsoever that -// this API stays stable. -LRUCache.prototype.dump = function () { - return this._cache -} - -LRUCache.prototype.dumpLru = function () { - return this._lruList -} - -LRUCache.prototype.set = function (key, value) { - if (hOP(this._cache, key)) { - // dispose of the old one before overwriting - if (this._dispose) this._dispose(key, this._cache[key].value) - if (this._maxAge) this._cache[key].now = Date.now() - this._cache[key].value = value - this.get(key) - return true - } - - var len = this._lengthCalculator(value) - var age = this._maxAge ? Date.now() : 0 - var hit = new Entry(key, value, this._mru++, len, age) - - // oversized objects fall out of cache automatically. - if (hit.length > this._max) { - if (this._dispose) this._dispose(key, value) - return false - } - - this._length += hit.length - this._lruList[hit.lu] = this._cache[key] = hit - this._itemCount ++ - - if (this._length > this._max) trim(this) - return true -} - -LRUCache.prototype.has = function (key) { - if (!hOP(this._cache, key)) return false - var hit = this._cache[key] - if (this._maxAge && (Date.now() - hit.now > this._maxAge)) { - return false - } - return true -} - -LRUCache.prototype.get = function (key) { - return get(this, key, true) -} - -LRUCache.prototype.peek = function (key) { - return get(this, key, false) -} - -LRUCache.prototype.pop = function () { - var hit = this._lruList[this._lru] - del(this, hit) - return hit || null -} - -LRUCache.prototype.del = function (key) { - del(this, this._cache[key]) -} - -function get (self, key, doUse) { - var hit = self._cache[key] - if (hit) { - if (self._maxAge && (Date.now() - hit.now > self._maxAge)) { - del(self, hit) - if (!self._allowStale) hit = undefined - } else { - if (doUse) use(self, hit) - } - if (hit) hit = hit.value - } - return hit -} - -function use (self, hit) { - shiftLU(self, hit) - hit.lu = self._mru ++ - self._lruList[hit.lu] = hit -} - -function trim (self) { - while (self._lru < self._mru && self._length > self._max) - del(self, self._lruList[self._lru]) -} - -function shiftLU (self, hit) { - delete self._lruList[ hit.lu ] - while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++ -} - -function del (self, hit) { - if (hit) { - if (self._dispose) self._dispose(hit.key, hit.value) - self._length -= hit.length - self._itemCount -- - delete self._cache[ hit.key ] - shiftLU(self, hit) - } -} - -// classy, since V8 prefers predictable objects. -function Entry (key, value, lu, length, now) { - this.key = key - this.value = value - this.lu = lu - this.length = length - this.now = now -} - -})() diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json b/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json deleted file mode 100644 index 4472725df94f..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "lru-cache", - "description": "A cache object that deletes the least-recently-used items.", - "version": "2.5.0", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - "scripts": { - "test": "tap test --gc" - }, - "main": "lib/lru-cache.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-lru-cache.git" - }, - "devDependencies": { - "tap": "", - "weak": "" - }, - "license": { - "type": "MIT", - "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE" - }, - "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-lru-cache/issues" - }, - "homepage": "https://github.com/isaacs/node-lru-cache", - "_id": "lru-cache@2.5.0", - "_from": "lru-cache@2" -} diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/basic.js deleted file mode 100644 index f72697c4611a..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/basic.js +++ /dev/null @@ -1,369 +0,0 @@ -var test = require("tap").test - , LRU = require("../") - -test("basic", function (t) { - var cache = new LRU({max: 10}) - cache.set("key", "value") - t.equal(cache.get("key"), "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.length, 1) - t.equal(cache.max, 10) - t.end() -}) - -test("least recently set", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.get("a") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), "A") - t.end() -}) - -test("del", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.del("a") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("max", function (t) { - var cache = new LRU(3) - - // test changing the max, verify that the LRU items get dropped. - cache.max = 100 - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - - // now remove the max restriction, and try again. - cache.max = "hello" - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - // should trigger an immediate resize - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - t.end() -}) - -test("reset", function (t) { - var cache = new LRU(10) - cache.set("a", "A") - cache.set("b", "B") - cache.reset() - t.equal(cache.length, 0) - t.equal(cache.max, 10) - t.equal(cache.get("a"), undefined) - t.equal(cache.get("b"), undefined) - t.end() -}) - - -// Note: `.dump()` is a debugging tool only. No guarantees are made -// about the format/layout of the response. -test("dump", function (t) { - var cache = new LRU(10) - var d = cache.dump(); - t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache") - cache.set("a", "A") - var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } } - t.ok(d.a) - t.equal(d.a.key, "a") - t.equal(d.a.value, "A") - t.equal(d.a.lu, 0) - - cache.set("b", "B") - cache.get("b") - d = cache.dump() - t.ok(d.b) - t.equal(d.b.key, "b") - t.equal(d.b.value, "B") - t.equal(d.b.lu, 2) - - t.end() -}) - - -test("basic with weighed length", function (t) { - var cache = new LRU({ - max: 100, - length: function (item) { return item.size } - }) - cache.set("key", {val: "value", size: 50}) - t.equal(cache.get("key").val, "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.lengthCalculator(cache.get("key")), 50) - t.equal(cache.length, 50) - t.equal(cache.max, 100) - t.end() -}) - - -test("weighed length item too large", function (t) { - var cache = new LRU({ - max: 10, - length: function (item) { return item.size } - }) - t.equal(cache.max, 10) - - // should fall out immediately - cache.set("key", {val: "value", size: 50}) - - t.equal(cache.length, 0) - t.equal(cache.get("key"), undefined) - t.end() -}) - -test("least recently set with weighed length", function (t) { - var cache = new LRU({ - max:8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.set("d", "DDDD") - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("c"), "CCC") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten with weighed length", function (t) { - var cache = new LRU({ - max: 8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.get("a") - cache.get("b") - cache.set("d", "DDDD") - t.equal(cache.get("c"), undefined) - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("b"), "BB") - t.equal(cache.get("a"), "A") - t.end() -}) - -test("set returns proper booleans", function(t) { - var cache = new LRU({ - max: 5, - length: function (item) { return item.length } - }) - - t.equal(cache.set("a", "A"), true) - - // should return false for max exceeded - t.equal(cache.set("b", "donuts"), false) - - t.equal(cache.set("b", "B"), true) - t.equal(cache.set("c", "CCCC"), true) - t.end() -}) - -test("drop the old items", function(t) { - var cache = new LRU({ - max: 5, - maxAge: 50 - }) - - cache.set("a", "A") - - setTimeout(function () { - cache.set("b", "b") - t.equal(cache.get("a"), "A") - }, 25) - - setTimeout(function () { - cache.set("c", "C") - // timed out - t.notOk(cache.get("a")) - }, 60) - - setTimeout(function () { - t.notOk(cache.get("b")) - t.equal(cache.get("c"), "C") - }, 90) - - setTimeout(function () { - t.notOk(cache.get("c")) - t.end() - }, 155) -}) - -test("disposal function", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - dispose: function (k, n) { - disposed = n - } - }) - - cache.set(1, 1) - cache.set(2, 2) - t.equal(disposed, 1) - cache.set(3, 3) - t.equal(disposed, 2) - cache.reset() - t.equal(disposed, 3) - t.end() -}) - -test("disposal function on too big of item", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - length: function (k) { - return k.length - }, - dispose: function (k, n) { - disposed = n - } - }) - var obj = [ 1, 2 ] - - t.equal(disposed, false) - cache.set("obj", obj) - t.equal(disposed, obj) - t.end() -}) - -test("has()", function(t) { - var cache = new LRU({ - max: 1, - maxAge: 10 - }) - - cache.set('foo', 'bar') - t.equal(cache.has('foo'), true) - cache.set('blu', 'baz') - t.equal(cache.has('foo'), false) - t.equal(cache.has('blu'), true) - setTimeout(function() { - t.equal(cache.has('blu'), false) - t.end() - }, 15) -}) - -test("stale", function(t) { - var cache = new LRU({ - maxAge: 10, - stale: true - }) - - cache.set('foo', 'bar') - t.equal(cache.get('foo'), 'bar') - t.equal(cache.has('foo'), true) - setTimeout(function() { - t.equal(cache.has('foo'), false) - t.equal(cache.get('foo'), 'bar') - t.equal(cache.get('foo'), undefined) - t.end() - }, 15) -}) - -test("lru update via set", function(t) { - var cache = LRU({ max: 2 }); - - cache.set('foo', 1); - cache.set('bar', 2); - cache.del('bar'); - cache.set('baz', 3); - cache.set('qux', 4); - - t.equal(cache.get('foo'), undefined) - t.equal(cache.get('bar'), undefined) - t.equal(cache.get('baz'), 3) - t.equal(cache.get('qux'), 4) - t.end() -}) - -test("least recently set w/ peek", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - t.equal(cache.peek("a"), "A") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("pop the least used item", function (t) { - var cache = new LRU(3) - , last - - cache.set("a", "A") - cache.set("b", "B") - cache.set("c", "C") - - t.equal(cache.length, 3) - t.equal(cache.max, 3) - - // Ensure we pop a, c, b - cache.get("b", "B") - - last = cache.pop() - t.equal(last.key, "a") - t.equal(last.value, "A") - t.equal(cache.length, 2) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last.key, "c") - t.equal(last.value, "C") - t.equal(cache.length, 1) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last.key, "b") - t.equal(last.value, "B") - t.equal(cache.length, 0) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last, null) - t.equal(cache.length, 0) - t.equal(cache.max, 3) - - t.end() -}) diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/foreach.js deleted file mode 100644 index eefb80d9d156..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +++ /dev/null @@ -1,52 +0,0 @@ -var test = require('tap').test -var LRU = require('../') - -test('forEach', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - var i = 9 - l.forEach(function (val, key, cache) { - t.equal(cache, l) - t.equal(key, i.toString()) - t.equal(val, i.toString(2)) - i -= 1 - }) - - // get in order of most recently used - l.get(6) - l.get(8) - - var order = [ 8, 6, 9, 7, 5 ] - var i = 0 - - l.forEach(function (val, key, cache) { - var j = order[i ++] - t.equal(cache, l) - t.equal(key, j.toString()) - t.equal(val, j.toString(2)) - }) - - t.end() -}) - -test('keys() and values()', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - t.similar(l.keys(), ['9', '8', '7', '6', '5']) - t.similar(l.values(), ['1001', '1000', '111', '110', '101']) - - // get in order of most recently used - l.get(6) - l.get(8) - - t.similar(l.keys(), ['8', '6', '9', '7', '5']) - t.similar(l.values(), ['1000', '110', '1001', '111', '101']) - - t.end() -}) diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js deleted file mode 100644 index 7af45b0221c1..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env node --expose_gc - -var weak = require('weak'); -var test = require('tap').test -var LRU = require('../') -var l = new LRU({ max: 10 }) -var refs = 0 -function X() { - refs ++ - weak(this, deref) -} - -function deref() { - refs -- -} - -test('no leaks', function (t) { - // fill up the cache - for (var i = 0; i < 100; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var start = process.memoryUsage() - - // capture the memory - var startRefs = refs - - // do it again, but more - for (var i = 0; i < 10000; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var end = process.memoryUsage() - t.equal(refs, startRefs, 'no leaky refs') - - console.error('start: %j\n' + - 'end: %j', start, end); - t.pass(); - t.end(); -}) diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/LICENSE b/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/LICENSE deleted file mode 100644 index 0c44ae716db8..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/README.md b/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/README.md deleted file mode 100644 index 7e365129e41b..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# sigmund - -Quick and dirty signatures for Objects. - -This is like a much faster `deepEquals` comparison, which returns a -string key suitable for caches and the like. - -## Usage - -```javascript -function doSomething (someObj) { - var key = sigmund(someObj, maxDepth) // max depth defaults to 10 - var cached = cache.get(key) - if (cached) return cached) - - var result = expensiveCalculation(someObj) - cache.set(key, result) - return result -} -``` - -The resulting key will be as unique and reproducible as calling -`JSON.stringify` or `util.inspect` on the object, but is much faster. -In order to achieve this speed, some differences are glossed over. -For example, the object `{0:'foo'}` will be treated identically to the -array `['foo']`. - -Also, just as there is no way to summon the soul from the scribblings -of a cocain-addled psychoanalyst, there is no way to revive the object -from the signature string that sigmund gives you. In fact, it's -barely even readable. - -As with `sys.inspect` and `JSON.stringify`, larger objects will -produce larger signature strings. - -Because sigmund is a bit less strict than the more thorough -alternatives, the strings will be shorter, and also there is a -slightly higher chance for collisions. For example, these objects -have the same signature: - - var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} - var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -Like a good Freudian, sigmund is most effective when you already have -some understanding of what you're looking for. It can help you help -yourself, but you must be willing to do some work as well. - -Cycles are handled, and cyclical objects are silently omitted (though -the key is included in the signature output.) - -The second argument is the maximum depth, which defaults to 10, -because that is the maximum object traversal depth covered by most -insurance carriers. diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/bench.js b/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/bench.js deleted file mode 100644 index 5acfd6d90de3..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/bench.js +++ /dev/null @@ -1,283 +0,0 @@ -// different ways to id objects -// use a req/res pair, since it's crazy deep and cyclical - -// sparseFE10 and sigmund are usually pretty close, which is to be expected, -// since they are essentially the same algorithm, except that sigmund handles -// regular expression objects properly. - - -var http = require('http') -var util = require('util') -var sigmund = require('./sigmund.js') -var sreq, sres, creq, cres, test - -http.createServer(function (q, s) { - sreq = q - sres = s - sres.end('ok') - this.close(function () { setTimeout(function () { - start() - }, 200) }) -}).listen(1337, function () { - creq = http.get({ port: 1337 }) - creq.on('response', function (s) { cres = s }) -}) - -function start () { - test = [sreq, sres, creq, cres] - // test = sreq - // sreq.sres = sres - // sreq.creq = creq - // sreq.cres = cres - - for (var i in exports.compare) { - console.log(i) - var hash = exports.compare[i]() - console.log(hash) - console.log(hash.length) - console.log('') - } - - require('bench').runMain() -} - -function customWs (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '') - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return customWs(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + customWs(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function custom (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return '' + obj - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return custom(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + custom(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function sparseFE2 (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k + ':' - ch(v[k], depth + 1) - }) - soFar += '}' - } - ch(obj, 0) - return soFar -} - -function sparseFE (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k - ch(v[k], depth + 1) - }) - } - ch(obj, 0) - return soFar -} - -function sparse (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k - ch(v[k], depth + 1) - } - } - ch(obj, 0) - return soFar -} - -function noCommas (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - - -function flatten (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - soFar += ',' - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - -exports.compare = -{ - // 'custom 2': function () { - // return custom(test, 2, 0) - // }, - // 'customWs 2': function () { - // return customWs(test, 2, 0) - // }, - 'JSON.stringify (guarded)': function () { - var seen = [] - return JSON.stringify(test, function (k, v) { - if (typeof v !== 'object' || !v) return v - if (seen.indexOf(v) !== -1) return undefined - seen.push(v) - return v - }) - }, - - 'flatten 10': function () { - return flatten(test, 10) - }, - - // 'flattenFE 10': function () { - // return flattenFE(test, 10) - // }, - - 'noCommas 10': function () { - return noCommas(test, 10) - }, - - 'sparse 10': function () { - return sparse(test, 10) - }, - - 'sparseFE 10': function () { - return sparseFE(test, 10) - }, - - 'sparseFE2 10': function () { - return sparseFE2(test, 10) - }, - - sigmund: function() { - return sigmund(test, 10) - }, - - - // 'util.inspect 1': function () { - // return util.inspect(test, false, 1, false) - // }, - // 'util.inspect undefined': function () { - // util.inspect(test) - // }, - // 'util.inspect 2': function () { - // util.inspect(test, false, 2, false) - // }, - // 'util.inspect 3': function () { - // util.inspect(test, false, 3, false) - // }, - // 'util.inspect 4': function () { - // util.inspect(test, false, 4, false) - // }, - // 'util.inspect Infinity': function () { - // util.inspect(test, false, Infinity, false) - // } -} - -/** results -**/ diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/package.json b/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/package.json deleted file mode 100644 index cb7e2bd4b751..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "sigmund", - "version": "1.0.0", - "description": "Quick and dirty signatures for Objects.", - "main": "sigmund.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.3.0" - }, - "scripts": { - "test": "tap test/*.js", - "bench": "node bench.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/sigmund" - }, - "keywords": [ - "object", - "signature", - "key", - "data", - "psychoanalysis" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached)\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocain-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even readable.\n\nAs with `sys.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/sigmund/issues" - }, - "homepage": "https://github.com/isaacs/sigmund", - "_id": "sigmund@1.0.0", - "_from": "sigmund@~1.0.0" -} diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/sigmund.js b/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/sigmund.js deleted file mode 100644 index 82c7ab8ce995..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/sigmund.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = sigmund -function sigmund (subject, maxSessions) { - maxSessions = maxSessions || 10; - var notes = []; - var analysis = ''; - var RE = RegExp; - - function psychoAnalyze (subject, session) { - if (session > maxSessions) return; - - if (typeof subject === 'function' || - typeof subject === 'undefined') { - return; - } - - if (typeof subject !== 'object' || !subject || - (subject instanceof RE)) { - analysis += subject; - return; - } - - if (notes.indexOf(subject) !== -1 || session === maxSessions) return; - - notes.push(subject); - analysis += '{'; - Object.keys(subject).forEach(function (issue, _, __) { - // pseudo-private values. skip those. - if (issue.charAt(0) === '_') return; - var to = typeof subject[issue]; - if (to === 'function' || to === 'undefined') return; - analysis += issue; - psychoAnalyze(subject[issue], session + 1); - }); - } - psychoAnalyze(subject, 0); - return analysis; -} - -// vim: set softtabstop=4 shiftwidth=4: diff --git a/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/test/basic.js b/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/test/basic.js deleted file mode 100644 index 50c53a13e98d..000000000000 --- a/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/test/basic.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tap').test -var sigmund = require('../sigmund.js') - - -// occasionally there are duplicates -// that's an acceptable edge-case. JSON.stringify and util.inspect -// have some collision potential as well, though less, and collision -// detection is expensive. -var hash = '{abc/def/g{0h1i2{jkl' -var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} -var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -var obj3 = JSON.parse(JSON.stringify(obj1)) -obj3.c = /def/ -obj3.g[2].cycle = obj3 -var cycleHash = '{abc/def/g{0h1i2{jklcycle' - -test('basic', function (t) { - t.equal(sigmund(obj1), hash) - t.equal(sigmund(obj2), hash) - t.equal(sigmund(obj3), cycleHash) - t.end() -}) - diff --git a/node_modules/grunt/node_modules/minimatch/package.json b/node_modules/grunt/node_modules/minimatch/package.json deleted file mode 100644 index de0704b6bd58..000000000000 --- a/node_modules/grunt/node_modules/minimatch/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "minimatch", - "description": "a glob matcher in javascript", - "version": "0.2.14", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "main": "minimatch.js", - "scripts": { - "test": "tap test/*.js" - }, - "engines": { - "node": "*" - }, - "dependencies": { - "lru-cache": "2", - "sigmund": "~1.0.0" - }, - "devDependencies": { - "tap": "" - }, - "license": { - "type": "MIT", - "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" - }, - "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "homepage": "https://github.com/isaacs/minimatch", - "_id": "minimatch@0.2.14", - "_from": "minimatch@~0.2.12" -} diff --git a/node_modules/grunt/node_modules/minimatch/test/basic.js b/node_modules/grunt/node_modules/minimatch/test/basic.js deleted file mode 100644 index ae7ac73c775e..000000000000 --- a/node_modules/grunt/node_modules/minimatch/test/basic.js +++ /dev/null @@ -1,399 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test -// -// TODO: Some of these tests do very bad things with backslashes, and will -// most likely fail badly on windows. They should probably be skipped. - -var tap = require("tap") - , globalBefore = Object.keys(global) - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - - -var patterns = - [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"], {nonull: true}] - - // allow null glob expansion - , ["X*", []] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"], {nonull: true}] - , ["\\**", ["\\**"], {nonull: true}] - , ["\\*\\*", ["\\*\\*"], {nonull: true}] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] - , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] - - , "legendary larry crashes bashes" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] - - , "character classes" - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and\n" + - "represent itself in a bracket expression if it occurs\n" + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - // [ pattern, [matches], MM opts, files, TAP opts] - , "onestar/twostar" - , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] - , ["{/?,*}", ["/a", "bb"], {null: true} - , ["/a", "/b/b", "/a/b/c", "bb"]] - - , "dots should not match unless requested" - , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] - - // .. and . can only match patterns starting with ., - // even when options.dot is set. - , function () { - files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] - } - , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] - , ["a/*/b", ["a/c/b"], {dot:false}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] - - - // this also tests that changing the options needs - // to change the cache key, even if the pattern is - // the same! - , ["**", ["a/b","a/.d",".a/.d"], { dot: true } - , [ ".a/.d", "a/.d", "a/b"]] - - , "paren sets cannot contain slashes" - , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] - - // brace sets trump all else. - // - // invalid glob pattern. fails on bash4 and bsdglob. - // however, in this implementation, it's easier just - // to do the intuitive thing, and let brace-expansion - // actually come before parsing any extglob patterns, - // like the documentation seems to say. - // - // XXX: if anyone complains about this, either fix it - // or tell them to grow up and stop complaining. - // - // bash/bsdglob says this: - // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] - // but we do this instead: - , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] - - // test partial parsing in the presence of comment/negation chars - , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] - , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] - - // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. - , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] - , {} - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] - - - // crazy nested {,,} and *(||) tests. - , function () { - files = [ "a", "b", "c", "d" - , "ab", "ac", "ad" - , "bc", "cb" - , "bc,d", "c,db", "c,d" - , "d)", "(b|c", "*(b|c" - , "b|c", "b|cc", "cb|c" - , "x(a|b|c)", "x(a|c)" - , "(a|b|c)", "(a|c)"] - } - , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] - , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] - // a - // *(b|c) - // *(b|d) - , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] - , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] - - - // test various flag settings. - , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] - , { noext: true } ] - , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} - , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] - , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] - - - // begin channelling Boole and deMorgan... - , "negation tests" - , function () { - files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] - } - - // anything that is NOT a* matches. - , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] - - // anything that IS !a* matches. - , ["!a*", ["!ab", "!abc"], {nonegate: true}] - - // anything that IS a* matches - , ["!!a*", ["a!b"]] - - // anything that is NOT !a* matches - , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] - - // negation nestled within a pattern - , function () { - files = [ "foo.js" - , "foo.bar" - // can't match this one without negative lookbehind. - , "foo.js.js" - , "blar.js" - , "foo." - , "boo.js.boo" ] - } - , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] - - // https://github.com/isaacs/minimatch/issues/5 - , function () { - files = [ 'a/b/.x/c' - , 'a/b/.x/c/d' - , 'a/b/.x/c/d/e' - , 'a/b/.x' - , 'a/b/.x/' - , 'a/.x/b' - , '.x' - , '.x/' - , '.x/a' - , '.x/a/b' - , 'a/.x/b/.x/c' - , '.x/.x' ] - } - , ["**/.x/**", [ '.x/' - , '.x/a' - , '.x/a/b' - , 'a/.x/b' - , 'a/b/.x/' - , 'a/b/.x/c' - , 'a/b/.x/c/d' - , 'a/b/.x/c/d/e' ] ] - - ] - -var regexps = - [ '/^(?:(?=.)a[^/]*?)$/', - '/^(?:(?=.)X[^/]*?)$/', - '/^(?:(?=.)X[^/]*?)$/', - '/^(?:\\*)$/', - '/^(?:(?=.)\\*[^/]*?)$/', - '/^(?:\\*\\*)$/', - '/^(?:(?=.)b[^/]*?\\/)$/', - '/^(?:(?=.)c[^/]*?)$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', - '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/', - '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/', - '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/', - '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/', - '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/', - '/^(?:(?=.)a[^/]*?[^c])$/', - '/^(?:(?=.)a[X-]b)$/', - '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/', - '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/', - '/^(?:(?=.)a[b]c)$/', - '/^(?:(?=.)a[b]c)$/', - '/^(?:(?=.)a[^/]c)$/', - '/^(?:a\\*c)$/', - 'false', - '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/', - '/^(?:man\\/man1\\/bash\\.1)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?=.)a[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k[^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[-abc])$/', - '/^(?:(?!\\.)(?=.)[abc-])$/', - '/^(?:\\\\)$/', - '/^(?:(?!\\.)(?=.)[\\\\])$/', - '/^(?:(?!\\.)(?=.)[\\[])$/', - '/^(?:\\[)$/', - '/^(?:(?=.)\\[(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[\\]])$/', - '/^(?:(?!\\.)(?=.)[\\]-])$/', - '/^(?:(?!\\.)(?=.)[a-z])$/', - '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:\\[\\])$/', - '/^(?:\\[abc)$/', - '/^(?:(?=.)XYZ)$/i', - '/^(?:(?=.)ab[^/]*?)$/i', - '/^(?:(?!\\.)(?=.)[ia][^/][ck])$/i', - '/^(?:\\/(?!\\.)(?=.)[^/]*?|(?!\\.)(?=.)[^/]*?)$/', - '/^(?:\\/(?!\\.)(?=.)[^/]|(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', - '/^(?:a\\/(?!(?:^|\\/)\\.{1,2}(?:$|\\/))(?=.)[^/]*?\\/b)$/', - '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', - '/^(?:a\\/(?!\\.)(?=.)[^/]*?\\/b)$/', - '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', - '/^(?:(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/', - '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/', - '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/', - '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/', - '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/', - '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/', - '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/', - '/^(?:(?=.)a[^/]b)$/', - '/^(?:(?=.)#[^/]*?)$/', - '/^(?!^(?:(?=.)a[^/]*?)$).*$/', - '/^(?:(?=.)\\!a[^/]*?)$/', - '/^(?:(?=.)a[^/]*?)$/', - '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ] -var re = 0; - -tap.test("basic tests", function (t) { - var start = Date.now() - - // [ pattern, [matches], MM opts, files, TAP opts] - patterns.forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] || {} - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var m = new mm.Minimatch(pattern, options) - var r = m.makeRe() - var expectRe = regexps[re++] - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - tapOpts.set = m.set - tapOpts.negated = m.negate - - var actual = mm.match(f, pattern, options) - actual.sort(alpha) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , tapOpts ) - - t.equal(tapOpts.re, expectRe, tapOpts) - }) - - t.comment("time=" + (Date.now() - start) + "ms") - t.end() -}) - -tap.test("global leak test", function (t) { - var globalAfter = Object.keys(global) - t.equivalent(globalAfter, globalBefore, "no new globals, please") - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/node_modules/grunt/node_modules/minimatch/test/brace-expand.js b/node_modules/grunt/node_modules/minimatch/test/brace-expand.js deleted file mode 100644 index 7ee278a274d3..000000000000 --- a/node_modules/grunt/node_modules/minimatch/test/brace-expand.js +++ /dev/null @@ -1,33 +0,0 @@ -var tap = require("tap") - , minimatch = require("../") - -tap.test("brace expansion", function (t) { - // [ pattern, [expanded] ] - ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}" - , [ "abxy" - , "abxz" - , "acdxy" - , "acdxz" - , "acexy" - , "acexz" - , "afhxy" - , "afhxz" - , "aghxy" - , "aghxz" ] ] - , [ "a{1..5}b" - , [ "a1b" - , "a2b" - , "a3b" - , "a4b" - , "a5b" ] ] - , [ "a{b}c", ["a{b}c"] ] - ].forEach(function (tc) { - var p = tc[0] - , expect = tc[1] - t.equivalent(minimatch.braceExpand(p), expect, p) - }) - console.error("ending") - t.end() -}) - - diff --git a/node_modules/grunt/node_modules/minimatch/test/caching.js b/node_modules/grunt/node_modules/minimatch/test/caching.js deleted file mode 100644 index 0fec4b0fad0b..000000000000 --- a/node_modules/grunt/node_modules/minimatch/test/caching.js +++ /dev/null @@ -1,14 +0,0 @@ -var Minimatch = require("../minimatch.js").Minimatch -var tap = require("tap") -tap.test("cache test", function (t) { - var mm1 = new Minimatch("a?b") - var mm2 = new Minimatch("a?b") - t.equal(mm1, mm2, "should get the same object") - // the lru should drop it after 100 entries - for (var i = 0; i < 100; i ++) { - new Minimatch("a"+i) - } - mm2 = new Minimatch("a?b") - t.notEqual(mm1, mm2, "cache should have dropped") - t.end() -}) diff --git a/node_modules/grunt/node_modules/minimatch/test/defaults.js b/node_modules/grunt/node_modules/minimatch/test/defaults.js deleted file mode 100644 index 25f1f601cd48..000000000000 --- a/node_modules/grunt/node_modules/minimatch/test/defaults.js +++ /dev/null @@ -1,274 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test -// -// TODO: Some of these tests do very bad things with backslashes, and will -// most likely fail badly on windows. They should probably be skipped. - -var tap = require("tap") - , globalBefore = Object.keys(global) - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - -tap.test("basic tests", function (t) { - var start = Date.now() - - // [ pattern, [matches], MM opts, files, TAP opts] - ; [ "http://www.bashcookbook.com/bashinfo" + - "/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"], {nonull: true}] - - // allow null glob expansion - , ["X*", []] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"], {nonull: true}] - , ["\\**", ["\\**"], {nonull: true}] - , ["\\*\\*", ["\\*\\*"], {nonull: true}] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] - , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] - - , "legendary larry crashes bashes" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] - - , "character classes" - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and\n" + - "represent itself in a bracket expression if it occurs\n" + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - // [ pattern, [matches], MM opts, files, TAP opts] - , "onestar/twostar" - , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] - , ["{/?,*}", ["/a", "bb"], {null: true} - , ["/a", "/b/b", "/a/b/c", "bb"]] - - , "dots should not match unless requested" - , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] - - // .. and . can only match patterns starting with ., - // even when options.dot is set. - , function () { - files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] - } - , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] - , ["a/*/b", ["a/c/b"], {dot:false}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] - - - // this also tests that changing the options needs - // to change the cache key, even if the pattern is - // the same! - , ["**", ["a/b","a/.d",".a/.d"], { dot: true } - , [ ".a/.d", "a/.d", "a/b"]] - - , "paren sets cannot contain slashes" - , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] - - // brace sets trump all else. - // - // invalid glob pattern. fails on bash4 and bsdglob. - // however, in this implementation, it's easier just - // to do the intuitive thing, and let brace-expansion - // actually come before parsing any extglob patterns, - // like the documentation seems to say. - // - // XXX: if anyone complains about this, either fix it - // or tell them to grow up and stop complaining. - // - // bash/bsdglob says this: - // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] - // but we do this instead: - , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] - - // test partial parsing in the presence of comment/negation chars - , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] - , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] - - // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. - , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] - , {} - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] - - - // crazy nested {,,} and *(||) tests. - , function () { - files = [ "a", "b", "c", "d" - , "ab", "ac", "ad" - , "bc", "cb" - , "bc,d", "c,db", "c,d" - , "d)", "(b|c", "*(b|c" - , "b|c", "b|cc", "cb|c" - , "x(a|b|c)", "x(a|c)" - , "(a|b|c)", "(a|c)"] - } - , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] - , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] - // a - // *(b|c) - // *(b|d) - , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] - , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] - - - // test various flag settings. - , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] - , { noext: true } ] - , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} - , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] - , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] - - - // begin channelling Boole and deMorgan... - , "negation tests" - , function () { - files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] - } - - // anything that is NOT a* matches. - , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] - - // anything that IS !a* matches. - , ["!a*", ["!ab", "!abc"], {nonegate: true}] - - // anything that IS a* matches - , ["!!a*", ["a!b"]] - - // anything that is NOT !a* matches - , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] - - // negation nestled within a pattern - , function () { - files = [ "foo.js" - , "foo.bar" - // can't match this one without negative lookbehind. - , "foo.js.js" - , "blar.js" - , "foo." - , "boo.js.boo" ] - } - , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] - - ].forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] || {} - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var Class = mm.defaults(options).Minimatch - var m = new Class(pattern, {}) - var r = m.makeRe() - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - tapOpts.set = m.set - tapOpts.negated = m.negate - - var actual = mm.match(f, pattern, options) - actual.sort(alpha) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , tapOpts ) - }) - - t.comment("time=" + (Date.now() - start) + "ms") - t.end() -}) - -tap.test("global leak test", function (t) { - var globalAfter = Object.keys(global) - t.equivalent(globalAfter, globalBefore, "no new globals, please") - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/node_modules/grunt/node_modules/minimatch/test/extglob-ending-with-state-char.js b/node_modules/grunt/node_modules/minimatch/test/extglob-ending-with-state-char.js deleted file mode 100644 index 6676e2629a7e..000000000000 --- a/node_modules/grunt/node_modules/minimatch/test/extglob-ending-with-state-char.js +++ /dev/null @@ -1,8 +0,0 @@ -var test = require('tap').test -var minimatch = require('../') - -test('extglob ending with statechar', function(t) { - t.notOk(minimatch('ax', 'a?(b*)')) - t.ok(minimatch('ax', '?(a*|b)')) - t.end() -}) diff --git a/node_modules/grunt/node_modules/nopt/.npmignore b/node_modules/grunt/node_modules/nopt/.npmignore deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/node_modules/grunt/node_modules/nopt/LICENSE b/node_modules/grunt/node_modules/nopt/LICENSE deleted file mode 100644 index 05a4010949ca..000000000000 --- a/node_modules/grunt/node_modules/nopt/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/grunt/node_modules/nopt/README.md b/node_modules/grunt/node_modules/nopt/README.md deleted file mode 100644 index 6e5e95c03321..000000000000 --- a/node_modules/grunt/node_modules/nopt/README.md +++ /dev/null @@ -1,276 +0,0 @@ -If you want to write an option parser, and have it be good, there are -two ways to do it. The Right Way, and the Wrong Way. - -The Wrong Way is to sit down and write an option parser. We've all done -that. - -The Right Way is to write some complex configurable program with so many -options that you go half-insane just trying to manage them all, and put -it off with duct-tape solutions until you see exactly to the core of the -problem, and finally snap and write an awesome option parser. - -If you want to write an option parser, don't write an option parser. -Write a package manager, or a source control system, or a service -restarter, or an operating system. You probably won't end up with a -good one of those, but if you don't give up, and you are relentless and -diligent enough in your procrastination, you may just end up with a very -nice option parser. - -## USAGE - - // my-program.js - var nopt = require("nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - , "many" : [String, Array] - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag"] - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) - console.log(parsed) - -This would give you support for any of the following: - -```bash -$ node my-program.js --foo "blerp" --no-flag -{ "foo" : "blerp", "flag" : false } - -$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag -{ bar: 7, foo: "Mr. Hand", flag: true } - -$ node my-program.js --foo "blerp" -f -----p -{ foo: "blerp", flag: true, pick: true } - -$ node my-program.js -fp --foofoo -{ foo: "Mr. Foo", flag: true, pick: true } - -$ node my-program.js --foofoo -- -fp # -- stops the flag parsing. -{ foo: "Mr. Foo", argv: { remain: ["-fp"] } } - -$ node my-program.js --blatzk 1000 -fp # unknown opts are ok. -{ blatzk: 1000, flag: true, pick: true } - -$ node my-program.js --blatzk true -fp # but they need a value -{ blatzk: true, flag: true, pick: true } - -$ node my-program.js --no-blatzk -fp # unless they start with "no-" -{ blatzk: false, flag: true, pick: true } - -$ node my-program.js --baz b/a/z # known paths are resolved. -{ baz: "/Users/isaacs/b/a/z" } - -# if Array is one of the types, then it can take many -# values, and will always be an array. The other types provided -# specify what types are allowed in the list. - -$ node my-program.js --many 1 --many null --many foo -{ many: ["1", "null", "foo"] } - -$ node my-program.js --many foo -{ many: ["foo"] } -``` - -Read the tests at the bottom of `lib/nopt.js` for more examples of -what this puppy can do. - -## Types - -The following types are supported, and defined on `nopt.typeDefs` - -* String: A normal string. No parsing is done. -* path: A file system path. Gets resolved against cwd if not absolute. -* url: A url. If it doesn't parse, it isn't accepted. -* Number: Must be numeric. -* Date: Must parse as a date. If it does, and `Date` is one of the options, - then it will return a Date object, not a string. -* Boolean: Must be either `true` or `false`. If an option is a boolean, - then it does not need a value, and its presence will imply `true` as - the value. To negate boolean flags, do `--no-whatever` or `--whatever - false` -* NaN: Means that the option is strictly not allowed. Any value will - fail. -* Stream: An object matching the "Stream" class in node. Valuable - for use when validating programmatically. (npm uses this to let you - supply any WriteStream on the `outfd` and `logfd` config options.) -* Array: If `Array` is specified as one of the types, then the value - will be parsed as a list of options. This means that multiple values - can be specified, and that the value will always be an array. - -If a type is an array of values not on this list, then those are -considered valid values. For instance, in the example above, the -`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`, -and any other value will be rejected. - -When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be -interpreted as their JavaScript equivalents, and numeric values will be -interpreted as a number. - -You can also mix types and values, or multiple types, in a list. For -instance `{ blah: [Number, null] }` would allow a value to be set to -either a Number or null. When types are ordered, this implies a -preference, and the first type that can be used to properly interpret -the value will be used. - -To define a new type, add it to `nopt.typeDefs`. Each item in that -hash is an object with a `type` member and a `validate` method. The -`type` member is an object that matches what goes in the type list. The -`validate` method is a function that gets called with `validate(data, -key, val)`. Validate methods should assign `data[key]` to the valid -value of `val` if it can be handled properly, or return boolean -`false` if it cannot. - -You can also call `nopt.clean(data, types, typeDefs)` to clean up a -config object and remove its invalid properties. - -## Error Handling - -By default, nopt outputs a warning to standard error when invalid -options are found. You can change this behavior by assigning a method -to `nopt.invalidHandler`. This method will be called with -the offending `nopt.invalidHandler(key, val, types)`. - -If no `nopt.invalidHandler` is assigned, then it will console.error -its whining. If it is assigned to boolean `false` then the warning is -suppressed. - -## Abbreviations - -Yes, they are supported. If you define options like this: - -```javascript -{ "foolhardyelephants" : Boolean -, "pileofmonkeys" : Boolean } -``` - -Then this will work: - -```bash -node program.js --foolhar --pil -node program.js --no-f --pileofmon -# etc. -``` - -## Shorthands - -Shorthands are a hash of shorter option names to a snippet of args that -they expand to. - -If multiple one-character shorthands are all combined, and the -combination does not unambiguously match any other option or shorthand, -then they will be broken up into their constituent parts. For example: - -```json -{ "s" : ["--loglevel", "silent"] -, "g" : "--global" -, "f" : "--force" -, "p" : "--parseable" -, "l" : "--long" -} -``` - -```bash -npm ls -sgflp -# just like doing this: -npm ls --loglevel silent --global --force --long --parseable -``` - -## The Rest of the args - -The config object returned by nopt is given a special member called -`argv`, which is an object with the following fields: - -* `remain`: The remaining args after all the parsing has occurred. -* `original`: The args as they originally appeared. -* `cooked`: The args after flags and shorthands are expanded. - -## Slicing - -Node programs are called with more or less the exact argv as it appears -in C land, after the v8 and node-specific options have been plucked off. -As such, `argv[0]` is always `node` and `argv[1]` is always the -JavaScript program being run. - -That's usually not very useful to you. So they're sliced off by -default. If you want them, then you can pass in `0` as the last -argument, or any other number that you'd like to slice off the start of -the list. - -## Show usage - -An option parser is great, but it's even better if it generate the -showUSage message for you. - -Everything is done by calling `nopt.usage` - - var nopt = require('nopt'); - nopt.usage(knownOpts, shortHands, description1, description2, ...) - -You could pass as many description objects as you want. Take a look at the following example to understand how it could be used. - - - #!/usr/bin/env node - - var nopt = require("../lib/nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag", "true"] - , "g" : ["--flag"] - , "s" : "--flag" - } - , description = { "foo" : "Something really foooooooo" - , "bar" : "A bar thing" - , "baz" : "More or less baz" - , "flag" : "Flag it as well" - , "pick" : "Or pick something" - } - , defaults = { "foo" : null - , "bar" : 42 - , "baz" : "/etc/passwd" - , "bloo" : "small" - , "pick" : false - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) - , usage = nopt.usage(knownOpts, shortHands, description, defaults) - - console.log('Usage: ') - console.log(usage) - -The output is: - - Usage: - --foo, -foofoo Something really foooooooo null - --bar, -b7 A bar thing 42 - --baz More or less baz /etc/passwd - --bloo, -m small - --flag, -f, -g, -s Flag it as well - --pick, -p Or pick something false - diff --git a/node_modules/grunt/node_modules/nopt/bin/nopt.js b/node_modules/grunt/node_modules/nopt/bin/nopt.js deleted file mode 100755 index df90c729af69..000000000000 --- a/node_modules/grunt/node_modules/nopt/bin/nopt.js +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env node -var nopt = require("../lib/nopt") - , types = { num: Number - , bool: Boolean - , help: Boolean - , list: Array - , "num-list": [Number, Array] - , "str-list": [String, Array] - , "bool-list": [Boolean, Array] - , str: String } - , shorthands = { s: [ "--str", "astring" ] - , b: [ "--bool" ] - , nb: [ "--no-bool" ] - , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ] - , "?": ["--help"] - , h: ["--help"] - , H: ["--help"] - , n: [ "--num", "125" ] } - , parsed = nopt( types - , shorthands - , process.argv - , 2 ) - -console.log("parsed", parsed) - -if (parsed.help) { - console.log("") - console.log("nopt cli tester") - console.log("") - console.log("types") - console.log(Object.keys(types).map(function M (t) { - var type = types[t] - if (Array.isArray(type)) { - return [t, type.map(function (type) { return type.name })] - } - return [t, type && type.name] - }).reduce(function (s, i) { - s[i[0]] = i[1] - return s - }, {})) - console.log("") - console.log("shorthands") - console.log(shorthands) -} diff --git a/node_modules/grunt/node_modules/nopt/examples/my-program.js b/node_modules/grunt/node_modules/nopt/examples/my-program.js deleted file mode 100755 index c12d5cc7d7e6..000000000000 --- a/node_modules/grunt/node_modules/nopt/examples/my-program.js +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env node - -//process.env.DEBUG_NOPT = 1 - -// my-program.js -var nopt = require("../lib/nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag", "true"] - , "g" : ["--flag"] - , "s" : "--flag" - } - , description = { "foo" : "Something really foooooooo" - , "bar" : "A bar thing" - , "baz" : "More or less baz" - , "flag" : "Flag it as well" - , "pick" : "Or pick something" - } - , defaults = { "foo" : null - , "bar" : 42 - , "baz" : "/etc/passwd" - , "bloo" : "small" - , "pick" : false - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) - , usage = nopt.usage(knownOpts, shortHands, description, defaults) - -console.log("parsed =\n"+ require("util").inspect(parsed)) - -console.log('\nUsage: ') -console.log(usage) diff --git a/node_modules/grunt/node_modules/nopt/lib/nopt.js b/node_modules/grunt/node_modules/nopt/lib/nopt.js deleted file mode 100644 index b81dc4795398..000000000000 --- a/node_modules/grunt/node_modules/nopt/lib/nopt.js +++ /dev/null @@ -1,554 +0,0 @@ -// info about each config option. - -var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG - ? function () { console.error.apply(console, arguments) } - : function () {} - -var url = require("url") - , path = require("path") - , Stream = require("stream").Stream - , abbrev = require("abbrev") - , usage = require("./usage") - -module.exports = exports = nopt -exports.clean = clean -exports.usage = usage - -exports.typeDefs = - { String : { type: String, validate: validateString } - , Boolean : { type: Boolean, validate: validateBoolean } - , url : { type: url, validate: validateUrl } - , Number : { type: Number, validate: validateNumber } - , path : { type: path, validate: validatePath } - , Stream : { type: Stream, validate: validateStream } - , Date : { type: Date, validate: validateDate } - } - -function nopt (types, shorthands, args, slice) { - args = args || process.argv - types = types || {} - shorthands = shorthands || {} - if (typeof slice !== "number") slice = 2 - - debug(types, shorthands, args, slice) - - args = args.slice(slice) - var data = {} - , key - , remain = [] - , cooked = args - , original = args.slice(0) - - parse(args, data, remain, types, shorthands) - // now data is full - clean(data, types, exports.typeDefs) - data.argv = {remain:remain,cooked:cooked,original:original} - data.argv.toString = function () { - return this.original.map(JSON.stringify).join(" ") - } - return data -} - -function clean (data, types, typeDefs) { - typeDefs = typeDefs || exports.typeDefs - var remove = {} - , typeDefault = [false, true, null, String, Number] - - Object.keys(data).forEach(function (k) { - if (k === "argv") return - var val = data[k] - , isArray = Array.isArray(val) - , type = types[k] - if (!isArray) val = [val] - if (!type) type = typeDefault - if (type === Array) type = typeDefault.concat(Array) - if (!Array.isArray(type)) type = [type] - - debug("val=%j", val) - debug("types=", type) - val = val.map(function (val) { - // if it's an unknown value, then parse false/true/null/numbers/dates - if (typeof val === "string") { - debug("string %j", val) - val = val.trim() - if ((val === "null" && ~type.indexOf(null)) - || (val === "true" && - (~type.indexOf(true) || ~type.indexOf(Boolean))) - || (val === "false" && - (~type.indexOf(false) || ~type.indexOf(Boolean)))) { - val = JSON.parse(val) - debug("jsonable %j", val) - } else if (~type.indexOf(Number) && !isNaN(val)) { - debug("convert to number", val) - val = +val - } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) { - debug("convert to date", val) - val = new Date(val) - } - } - - if (!types.hasOwnProperty(k)) { - return val - } - - // allow `--no-blah` to set 'blah' to null if null is allowed - if (val === false && ~type.indexOf(null) && - !(~type.indexOf(false) || ~type.indexOf(Boolean))) { - val = null - } - - var d = {} - d[k] = val - debug("prevalidated val", d, val, types[k]) - if (!validate(d, k, val, types[k], typeDefs)) { - if (exports.invalidHandler) { - exports.invalidHandler(k, val, types[k], data) - } else if (exports.invalidHandler !== false) { - debug("invalid: "+k+"="+val, types[k]) - } - return remove - } - debug("validated val", d, val, types[k]) - return d[k] - }).filter(function (val) { return val !== remove }) - - if (!val.length) delete data[k] - else if (isArray) { - debug(isArray, data[k], val) - data[k] = val - } else data[k] = val[0] - - debug("k=%s val=%j", k, val, data[k]) - }) -} - -function validateString (data, k, val) { - data[k] = String(val) -} - -function validatePath (data, k, val) { - data[k] = path.resolve(String(val)) - return true -} - -function validateNumber (data, k, val) { - debug("validate Number %j %j %j", k, val, isNaN(val)) - if (isNaN(val)) return false - data[k] = +val -} - -function validateDate (data, k, val) { - debug("validate Date %j %j %j", k, val, Date.parse(val)) - var s = Date.parse(val) - if (isNaN(s)) return false - data[k] = new Date(val) -} - -function validateBoolean (data, k, val) { - if (val instanceof Boolean) val = val.valueOf() - else if (typeof val === "string") { - if (!isNaN(val)) val = !!(+val) - else if (val === "null" || val === "false") val = false - else val = true - } else val = !!val - data[k] = val -} - -function validateUrl (data, k, val) { - val = url.parse(String(val)) - if (!val.host) return false - data[k] = val.href -} - -function validateStream (data, k, val) { - if (!(val instanceof Stream)) return false - data[k] = val -} - -function validate (data, k, val, type, typeDefs) { - // arrays are lists of types. - if (Array.isArray(type)) { - for (var i = 0, l = type.length; i < l; i ++) { - if (type[i] === Array) continue - if (validate(data, k, val, type[i], typeDefs)) return true - } - delete data[k] - return false - } - - // an array of anything? - if (type === Array) return true - - // NaN is poisonous. Means that something is not allowed. - if (type !== type) { - debug("Poison NaN", k, val, type) - delete data[k] - return false - } - - // explicit list of values - if (val === type) { - debug("Explicitly allowed %j", val) - // if (isArray) (data[k] = data[k] || []).push(val) - // else data[k] = val - data[k] = val - return true - } - - // now go through the list of typeDefs, validate against each one. - var ok = false - , types = Object.keys(typeDefs) - for (var i = 0, l = types.length; i < l; i ++) { - debug("test type %j %j %j", k, val, types[i]) - var t = typeDefs[types[i]] - if (t && type === t.type) { - var d = {} - ok = false !== t.validate(d, k, val) - val = d[k] - if (ok) { - // if (isArray) (data[k] = data[k] || []).push(val) - // else data[k] = val - data[k] = val - break - } - } - } - debug("OK? %j (%j %j %j)", ok, k, val, types[i]) - - if (!ok) delete data[k] - return ok -} - -function parse (args, data, remain, types, shorthands) { - debug("parse", args, data, remain) - - var key = null - , abbrevs = abbrev(Object.keys(types)) - , shortAbbr = abbrev(Object.keys(shorthands)) - - for (var i = 0; i < args.length; i ++) { - var arg = args[i] - debug("arg", arg) - - if (arg.match(/^-{2,}$/)) { - // done with keys. - // the rest are args. - remain.push.apply(remain, args.slice(i + 1)) - args[i] = "--" - break - } - if (arg.charAt(0) === "-") { - if (arg.indexOf("=") !== -1) { - var v = arg.split("=") - arg = v.shift() - v = v.join("=") - args.splice.apply(args, [i, 1].concat([arg, v])) - } - // see if it's a shorthand - // if so, splice and back up to re-parse it. - var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs) - debug("arg=%j shRes=%j", arg, shRes) - if (shRes) { - debug(arg, shRes) - args.splice.apply(args, [i, 1].concat(shRes)) - if (arg !== shRes[0]) { - i -- - continue - } - } - arg = arg.replace(/^-+/, "") - var no = false - while (arg.toLowerCase().indexOf("no-") === 0) { - no = !no - arg = arg.substr(3) - } - - if (abbrevs[arg]) arg = abbrevs[arg] - - var isArray = types[arg] === Array || - Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1 - - var val - , la = args[i + 1] - - var isBool = no || - types[arg] === Boolean || - Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 || - (la === "false" && - (types[arg] === null || - Array.isArray(types[arg]) && ~types[arg].indexOf(null))) - - if (isBool) { - // just set and move along - val = !no - // however, also support --bool true or --bool false - if (la === "true" || la === "false") { - val = JSON.parse(la) - la = null - if (no) val = !val - i ++ - } - - // also support "foo":[Boolean, "bar"] and "--foo bar" - if (Array.isArray(types[arg]) && la) { - if (~types[arg].indexOf(la)) { - // an explicit type - val = la - i ++ - } else if ( la === "null" && ~types[arg].indexOf(null) ) { - // null allowed - val = null - i ++ - } else if ( !la.match(/^-{2,}[^-]/) && - !isNaN(la) && - ~types[arg].indexOf(Number) ) { - // number - val = +la - i ++ - } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) { - // string - val = la - i ++ - } - } - - if (isArray) (data[arg] = data[arg] || []).push(val) - else data[arg] = val - - continue - } - - if (la && la.match(/^-{2,}$/)) { - la = undefined - i -- - } - - val = la === undefined ? true : la - if (isArray) (data[arg] = data[arg] || []).push(val) - else data[arg] = val - - i ++ - continue - } - remain.push(arg) - } -} - -function resolveShort (arg, shorthands, shortAbbr, abbrevs) { - // handle single-char shorthands glommed together, like - // npm ls -glp, but only if there is one dash, and only if - // all of the chars are single-char shorthands, and it's - // not a match to some other abbrev. - arg = arg.replace(/^-+/, '') - if (abbrevs[arg] && !shorthands[arg]) { - return null - } - if (shortAbbr[arg]) { - arg = shortAbbr[arg] - } else { - var singles = shorthands.___singles - if (!singles) { - singles = Object.keys(shorthands).filter(function (s) { - return s.length === 1 - }).reduce(function (l,r) { l[r] = true ; return l }, {}) - shorthands.___singles = singles - } - var chrs = arg.split("").filter(function (c) { - return singles[c] - }) - if (chrs.join("") === arg) return chrs.map(function (c) { - return shorthands[c] - }).reduce(function (l, r) { - return l.concat(r) - }, []) - } - - if (shorthands[arg] && !Array.isArray(shorthands[arg])) { - shorthands[arg] = shorthands[arg].split(/\s+/) - } - return shorthands[arg] -} - -if (module === require.main) { -var assert = require("assert") - , util = require("util") - - , shorthands = - { s : ["--loglevel", "silent"] - , d : ["--loglevel", "info"] - , dd : ["--loglevel", "verbose"] - , ddd : ["--loglevel", "silly"] - , noreg : ["--no-registry"] - , reg : ["--registry"] - , "no-reg" : ["--no-registry"] - , silent : ["--loglevel", "silent"] - , verbose : ["--loglevel", "verbose"] - , h : ["--usage"] - , H : ["--usage"] - , "?" : ["--usage"] - , help : ["--usage"] - , v : ["--version"] - , f : ["--force"] - , desc : ["--description"] - , "no-desc" : ["--no-description"] - , "local" : ["--no-global"] - , l : ["--long"] - , p : ["--parseable"] - , porcelain : ["--parseable"] - , g : ["--global"] - } - - , types = - { aoa: Array - , nullstream: [null, Stream] - , date: Date - , str: String - , browser : String - , cache : path - , color : ["always", Boolean] - , depth : Number - , description : Boolean - , dev : Boolean - , editor : path - , force : Boolean - , global : Boolean - , globalconfig : path - , group : [String, Number] - , gzipbin : String - , logfd : [Number, Stream] - , loglevel : ["silent","win","error","warn","info","verbose","silly"] - , long : Boolean - , "node-version" : [false, String] - , npaturl : url - , npat : Boolean - , "onload-script" : [false, String] - , outfd : [Number, Stream] - , parseable : Boolean - , pre: Boolean - , prefix: path - , proxy : url - , "rebuild-bundle" : Boolean - , registry : url - , searchopts : String - , searchexclude: [null, String] - , shell : path - , t: [Array, String] - , tag : String - , tar : String - , tmp : path - , "unsafe-perm" : Boolean - , usage : Boolean - , user : String - , username : String - , userconfig : path - , version : Boolean - , viewer: path - , _exit : Boolean - } - -; [["-v", {version:true}, []] - ,["---v", {version:true}, []] - ,["ls -s --no-reg connect -d", - {loglevel:"info",registry:null},["ls","connect"]] - ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]] - ,["ls --registry blargle", {}, ["ls"]] - ,["--no-registry", {registry:null}, []] - ,["--no-color true", {color:false}, []] - ,["--no-color false", {color:true}, []] - ,["--no-color", {color:false}, []] - ,["--color false", {color:false}, []] - ,["--color --logfd 7", {logfd:7,color:true}, []] - ,["--color=true", {color:true}, []] - ,["--logfd=10", {logfd:10}, []] - ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] - ,["--tmp=tmp -tar=gtar", - {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] - ,["--logfd x", {}, []] - ,["a -true -- -no-false", {true:true},["a","-no-false"]] - ,["a -no-false", {false:false},["a"]] - ,["a -no-no-true", {true:true}, ["a"]] - ,["a -no-no-no-false", {false:false}, ["a"]] - ,["---NO-no-No-no-no-no-nO-no-no"+ - "-No-no-no-no-no-no-no-no-no"+ - "-no-no-no-no-NO-NO-no-no-no-no-no-no"+ - "-no-body-can-do-the-boogaloo-like-I-do" - ,{"body-can-do-the-boogaloo-like-I-do":false}, []] - ,["we are -no-strangers-to-love "+ - "--you-know the-rules --and so-do-i "+ - "---im-thinking-of=a-full-commitment "+ - "--no-you-would-get-this-from-any-other-guy "+ - "--no-gonna-give-you-up "+ - "-no-gonna-let-you-down=true "+ - "--no-no-gonna-run-around false "+ - "--desert-you=false "+ - "--make-you-cry false "+ - "--no-tell-a-lie "+ - "--no-no-and-hurt-you false" - ,{"strangers-to-love":false - ,"you-know":"the-rules" - ,"and":"so-do-i" - ,"you-would-get-this-from-any-other-guy":false - ,"gonna-give-you-up":false - ,"gonna-let-you-down":false - ,"gonna-run-around":false - ,"desert-you":false - ,"make-you-cry":false - ,"tell-a-lie":false - ,"and-hurt-you":false - },["we", "are"]] - ,["-t one -t two -t three" - ,{t: ["one", "two", "three"]} - ,[]] - ,["-t one -t null -t three four five null" - ,{t: ["one", "null", "three"]} - ,["four", "five", "null"]] - ,["-t foo" - ,{t:["foo"]} - ,[]] - ,["--no-t" - ,{t:["false"]} - ,[]] - ,["-no-no-t" - ,{t:["true"]} - ,[]] - ,["-aoa one -aoa null -aoa 100" - ,{aoa:["one", null, 100]} - ,[]] - ,["-str 100" - ,{str:"100"} - ,[]] - ,["--color always" - ,{color:"always"} - ,[]] - ,["--no-nullstream" - ,{nullstream:null} - ,[]] - ,["--nullstream false" - ,{nullstream:null} - ,[]] - ,["--notadate 2011-01-25" - ,{notadate: "2011-01-25"} - ,[]] - ,["--date 2011-01-25" - ,{date: new Date("2011-01-25")} - ,[]] - ].forEach(function (test) { - var argv = test[0].split(/\s+/) - , opts = test[1] - , rem = test[2] - , actual = nopt(types, shorthands, argv, 0) - , parsed = actual.argv - delete actual.argv - console.log(util.inspect(actual, false, 2, true), parsed.remain) - for (var i in opts) { - var e = JSON.stringify(opts[i]) - , a = JSON.stringify(actual[i] === undefined ? null : actual[i]) - if (e && typeof e === "object") { - assert.deepEqual(e, a) - } else { - assert.equal(e, a) - } - } - assert.deepEqual(rem, parsed.remain) - }) -} diff --git a/node_modules/grunt/node_modules/nopt/lib/usage.js b/node_modules/grunt/node_modules/nopt/lib/usage.js deleted file mode 100644 index af4829702878..000000000000 --- a/node_modules/grunt/node_modules/nopt/lib/usage.js +++ /dev/null @@ -1,61 +0,0 @@ -module.exports = function showUsage(knownOpts, shortHands /*, description1, description2, ... */){ - var descriptions = Array.prototype.slice.call(arguments, 2, arguments.length), - knownOptsMaxLen = maxLength(Object.keys(knownOpts)), - shortHands2 = {}, - SPACE = 4; - - // create a shortHands object with the long name as key. - Object.keys(shortHands).forEach(function(key){ - var value = Array.isArray(shortHands[key]) ? shortHands[key][0] : shortHands[key]; - var option = value.replace('--', ''); - shortHands2[option] = shortHands2[option] || []; - shortHands2[option].push(key); - }); - - // we can have severals shorthands for one option - var shortHandsMaxLength = values(shortHands2).reduce(function(a, b){ - a = Array.isArray(a) ? a.join(', -').length : a; - b = Array.isArray(b) ? b.join(', -').length : b; - return ( a > b) ? a : b; - }); - - // start by writing all known options - var out = {}; - Object.keys(knownOpts).forEach(function(key){ - var shorts = shortHands2[key] ? ', -' + shortHands2[key].join(', -') : ''; - var cmd = rpad('', SPACE) + '--' + key + shorts; - out[key] = rpad(cmd, knownOptsMaxLen + shortHandsMaxLength + 5 + 2 * SPACE); - }); - - // then write all the descriptions - descriptions.forEach(function(description){ - var descriptionMaxLen = maxLength(values(description)); - Object.keys(knownOpts).forEach(function(key){ - var value = '' + (description[key] !== undefined ? description[key] : ''); - out[key] += rpad(value, descriptionMaxLen + SPACE); - }); - }); - - return values(out).join('\n'); -}; - -// string right padding helper -function rpad(str, length) { - while (str.length < length) - str = str + ' '; - return str; -} - -// Object.values -function values(o){ - return Object.keys(o).map(function(k){ return o[k]; }); -} - -// Return the max length of an array of string. -function maxLength(arr){ - return arr.map(function(str){ - return ('' + str).length; - }).reduce(function(a,b){ - return ( a > b ) ? a : b; - }); -} diff --git a/node_modules/grunt/node_modules/nopt/node_modules/abbrev/CONTRIBUTING.md b/node_modules/grunt/node_modules/nopt/node_modules/abbrev/CONTRIBUTING.md deleted file mode 100644 index 2f302612f816..000000000000 --- a/node_modules/grunt/node_modules/nopt/node_modules/abbrev/CONTRIBUTING.md +++ /dev/null @@ -1,3 +0,0 @@ - To get started, sign the - Contributor License Agreement. diff --git a/node_modules/grunt/node_modules/nopt/node_modules/abbrev/LICENSE b/node_modules/grunt/node_modules/nopt/node_modules/abbrev/LICENSE deleted file mode 100644 index 05a4010949ca..000000000000 --- a/node_modules/grunt/node_modules/nopt/node_modules/abbrev/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/grunt/node_modules/nopt/node_modules/abbrev/README.md b/node_modules/grunt/node_modules/nopt/node_modules/abbrev/README.md deleted file mode 100644 index 99746fe67c46..000000000000 --- a/node_modules/grunt/node_modules/nopt/node_modules/abbrev/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# abbrev-js - -Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). - -Usage: - - var abbrev = require("abbrev"); - abbrev("foo", "fool", "folding", "flop"); - - // returns: - { fl: 'flop' - , flo: 'flop' - , flop: 'flop' - , fol: 'folding' - , fold: 'folding' - , foldi: 'folding' - , foldin: 'folding' - , folding: 'folding' - , foo: 'foo' - , fool: 'fool' - } - -This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. diff --git a/node_modules/grunt/node_modules/nopt/node_modules/abbrev/abbrev.js b/node_modules/grunt/node_modules/nopt/node_modules/abbrev/abbrev.js deleted file mode 100644 index 69cfeac5218b..000000000000 --- a/node_modules/grunt/node_modules/nopt/node_modules/abbrev/abbrev.js +++ /dev/null @@ -1,62 +0,0 @@ - -module.exports = exports = abbrev.abbrev = abbrev - -abbrev.monkeyPatch = monkeyPatch - -function monkeyPatch () { - Object.defineProperty(Array.prototype, 'abbrev', { - value: function () { return abbrev(this) }, - enumerable: false, configurable: true, writable: true - }) - - Object.defineProperty(Object.prototype, 'abbrev', { - value: function () { return abbrev(Object.keys(this)) }, - enumerable: false, configurable: true, writable: true - }) -} - -function abbrev (list) { - if (arguments.length !== 1 || !Array.isArray(list)) { - list = Array.prototype.slice.call(arguments, 0) - } - for (var i = 0, l = list.length, args = [] ; i < l ; i ++) { - args[i] = typeof list[i] === "string" ? list[i] : String(list[i]) - } - - // sort them lexicographically, so that they're next to their nearest kin - args = args.sort(lexSort) - - // walk through each, seeing how much it has in common with the next and previous - var abbrevs = {} - , prev = "" - for (var i = 0, l = args.length ; i < l ; i ++) { - var current = args[i] - , next = args[i + 1] || "" - , nextMatches = true - , prevMatches = true - if (current === next) continue - for (var j = 0, cl = current.length ; j < cl ; j ++) { - var curChar = current.charAt(j) - nextMatches = nextMatches && curChar === next.charAt(j) - prevMatches = prevMatches && curChar === prev.charAt(j) - if (!nextMatches && !prevMatches) { - j ++ - break - } - } - prev = current - if (j === cl) { - abbrevs[current] = current - continue - } - for (var a = current.substr(0, j) ; j <= cl ; j ++) { - abbrevs[a] = current - a += current.charAt(j) - } - } - return abbrevs -} - -function lexSort (a, b) { - return a === b ? 0 : a > b ? 1 : -1 -} diff --git a/node_modules/grunt/node_modules/nopt/node_modules/abbrev/package.json b/node_modules/grunt/node_modules/nopt/node_modules/abbrev/package.json deleted file mode 100644 index 25fcc64f6623..000000000000 --- a/node_modules/grunt/node_modules/nopt/node_modules/abbrev/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "abbrev", - "version": "1.0.5", - "description": "Like ruby's abbrev module, but in js", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - "main": "abbrev.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "http://github.com/isaacs/abbrev-js" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/abbrev-js/raw/master/LICENSE" - }, - "readme": "# abbrev-js\n\nJust like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).\n\nUsage:\n\n var abbrev = require(\"abbrev\");\n abbrev(\"foo\", \"fool\", \"folding\", \"flop\");\n \n // returns:\n { fl: 'flop'\n , flo: 'flop'\n , flop: 'flop'\n , fol: 'folding'\n , fold: 'folding'\n , foldi: 'folding'\n , foldin: 'folding'\n , folding: 'folding'\n , foo: 'foo'\n , fool: 'fool'\n }\n\nThis is handy for command-line scripts, or other cases where you want to be able to accept shorthands.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/abbrev-js/issues" - }, - "homepage": "https://github.com/isaacs/abbrev-js", - "_id": "abbrev@1.0.5", - "dist": { - "shasum": "2f7cba0baff5d830ba52d8dd13477b1c12cb551c" - }, - "_from": "abbrev@1", - "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.5.tgz" -} diff --git a/node_modules/grunt/node_modules/nopt/node_modules/abbrev/test.js b/node_modules/grunt/node_modules/nopt/node_modules/abbrev/test.js deleted file mode 100644 index d5a7303ed69c..000000000000 --- a/node_modules/grunt/node_modules/nopt/node_modules/abbrev/test.js +++ /dev/null @@ -1,47 +0,0 @@ -var abbrev = require('./abbrev.js') -var assert = require("assert") -var util = require("util") - -console.log("TAP Version 13") -var count = 0 - -function test (list, expect) { - count++ - var actual = abbrev(list) - assert.deepEqual(actual, expect, - "abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+ - "actual: "+util.inspect(actual)) - actual = abbrev.apply(exports, list) - assert.deepEqual(abbrev.apply(exports, list), expect, - "abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+ - "actual: "+util.inspect(actual)) - console.log('ok - ' + list.join(' ')) -} - -test([ "ruby", "ruby", "rules", "rules", "rules" ], -{ rub: 'ruby' -, ruby: 'ruby' -, rul: 'rules' -, rule: 'rules' -, rules: 'rules' -}) -test(["fool", "foom", "pool", "pope"], -{ fool: 'fool' -, foom: 'foom' -, poo: 'pool' -, pool: 'pool' -, pop: 'pope' -, pope: 'pope' -}) -test(["a", "ab", "abc", "abcd", "abcde", "acde"], -{ a: 'a' -, ab: 'ab' -, abc: 'abc' -, abcd: 'abcd' -, abcde: 'abcde' -, ac: 'acde' -, acd: 'acde' -, acde: 'acde' -}) - -console.log("0..%d", count) diff --git a/node_modules/grunt/node_modules/nopt/package.json b/node_modules/grunt/node_modules/nopt/package.json deleted file mode 100644 index ca46053314e7..000000000000 --- a/node_modules/grunt/node_modules/nopt/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "nopt", - "version": "1.0.10", - "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "main": "lib/nopt.js", - "scripts": { - "test": "node lib/nopt.js" - }, - "repository": { - "type": "git", - "url": "http://github.com/isaacs/nopt" - }, - "bin": { - "nopt": "./bin/nopt.js" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/nopt/raw/master/LICENSE" - }, - "dependencies": { - "abbrev": "1" - }, - "readme": "If you want to write an option parser, and have it be good, there are\ntwo ways to do it. The Right Way, and the Wrong Way.\n\nThe Wrong Way is to sit down and write an option parser. We've all done\nthat.\n\nThe Right Way is to write some complex configurable program with so many\noptions that you go half-insane just trying to manage them all, and put\nit off with duct-tape solutions until you see exactly to the core of the\nproblem, and finally snap and write an awesome option parser.\n\nIf you want to write an option parser, don't write an option parser.\nWrite a package manager, or a source control system, or a service\nrestarter, or an operating system. You probably won't end up with a\ngood one of those, but if you don't give up, and you are relentless and\ndiligent enough in your procrastination, you may just end up with a very\nnice option parser.\n\n## USAGE\n\n // my-program.js\n var nopt = require(\"nopt\")\n , Stream = require(\"stream\").Stream\n , path = require(\"path\")\n , knownOpts = { \"foo\" : [String, null]\n , \"bar\" : [Stream, Number]\n , \"baz\" : path\n , \"bloo\" : [ \"big\", \"medium\", \"small\" ]\n , \"flag\" : Boolean\n , \"pick\" : Boolean\n , \"many\" : [String, Array]\n }\n , shortHands = { \"foofoo\" : [\"--foo\", \"Mr. Foo\"]\n , \"b7\" : [\"--bar\", \"7\"]\n , \"m\" : [\"--bloo\", \"medium\"]\n , \"p\" : [\"--pick\"]\n , \"f\" : [\"--flag\"]\n }\n // everything is optional.\n // knownOpts and shorthands default to {}\n // arg list defaults to process.argv\n // slice defaults to 2\n , parsed = nopt(knownOpts, shortHands, process.argv, 2)\n console.log(parsed)\n\nThis would give you support for any of the following:\n\n```bash\n$ node my-program.js --foo \"blerp\" --no-flag\n{ \"foo\" : \"blerp\", \"flag\" : false }\n\n$ node my-program.js ---bar 7 --foo \"Mr. Hand\" --flag\n{ bar: 7, foo: \"Mr. Hand\", flag: true }\n\n$ node my-program.js --foo \"blerp\" -f -----p\n{ foo: \"blerp\", flag: true, pick: true }\n\n$ node my-program.js -fp --foofoo\n{ foo: \"Mr. Foo\", flag: true, pick: true }\n\n$ node my-program.js --foofoo -- -fp # -- stops the flag parsing.\n{ foo: \"Mr. Foo\", argv: { remain: [\"-fp\"] } }\n\n$ node my-program.js --blatzk 1000 -fp # unknown opts are ok.\n{ blatzk: 1000, flag: true, pick: true }\n\n$ node my-program.js --blatzk true -fp # but they need a value\n{ blatzk: true, flag: true, pick: true }\n\n$ node my-program.js --no-blatzk -fp # unless they start with \"no-\"\n{ blatzk: false, flag: true, pick: true }\n\n$ node my-program.js --baz b/a/z # known paths are resolved.\n{ baz: \"/Users/isaacs/b/a/z\" }\n\n# if Array is one of the types, then it can take many\n# values, and will always be an array. The other types provided\n# specify what types are allowed in the list.\n\n$ node my-program.js --many 1 --many null --many foo\n{ many: [\"1\", \"null\", \"foo\"] }\n\n$ node my-program.js --many foo\n{ many: [\"foo\"] }\n```\n\nRead the tests at the bottom of `lib/nopt.js` for more examples of\nwhat this puppy can do.\n\n## Types\n\nThe following types are supported, and defined on `nopt.typeDefs`\n\n* String: A normal string. No parsing is done.\n* path: A file system path. Gets resolved against cwd if not absolute.\n* url: A url. If it doesn't parse, it isn't accepted.\n* Number: Must be numeric.\n* Date: Must parse as a date. If it does, and `Date` is one of the options,\n then it will return a Date object, not a string.\n* Boolean: Must be either `true` or `false`. If an option is a boolean,\n then it does not need a value, and its presence will imply `true` as\n the value. To negate boolean flags, do `--no-whatever` or `--whatever\n false`\n* NaN: Means that the option is strictly not allowed. Any value will\n fail.\n* Stream: An object matching the \"Stream\" class in node. Valuable\n for use when validating programmatically. (npm uses this to let you\n supply any WriteStream on the `outfd` and `logfd` config options.)\n* Array: If `Array` is specified as one of the types, then the value\n will be parsed as a list of options. This means that multiple values\n can be specified, and that the value will always be an array.\n\nIf a type is an array of values not on this list, then those are\nconsidered valid values. For instance, in the example above, the\n`--bloo` option can only be one of `\"big\"`, `\"medium\"`, or `\"small\"`,\nand any other value will be rejected.\n\nWhen parsing unknown fields, `\"true\"`, `\"false\"`, and `\"null\"` will be\ninterpreted as their JavaScript equivalents, and numeric values will be\ninterpreted as a number.\n\nYou can also mix types and values, or multiple types, in a list. For\ninstance `{ blah: [Number, null] }` would allow a value to be set to\neither a Number or null. When types are ordered, this implies a\npreference, and the first type that can be used to properly interpret\nthe value will be used.\n\nTo define a new type, add it to `nopt.typeDefs`. Each item in that\nhash is an object with a `type` member and a `validate` method. The\n`type` member is an object that matches what goes in the type list. The\n`validate` method is a function that gets called with `validate(data,\nkey, val)`. Validate methods should assign `data[key]` to the valid\nvalue of `val` if it can be handled properly, or return boolean\n`false` if it cannot.\n\nYou can also call `nopt.clean(data, types, typeDefs)` to clean up a\nconfig object and remove its invalid properties.\n\n## Error Handling\n\nBy default, nopt outputs a warning to standard error when invalid\noptions are found. You can change this behavior by assigning a method\nto `nopt.invalidHandler`. This method will be called with\nthe offending `nopt.invalidHandler(key, val, types)`.\n\nIf no `nopt.invalidHandler` is assigned, then it will console.error\nits whining. If it is assigned to boolean `false` then the warning is\nsuppressed.\n\n## Abbreviations\n\nYes, they are supported. If you define options like this:\n\n```javascript\n{ \"foolhardyelephants\" : Boolean\n, \"pileofmonkeys\" : Boolean }\n```\n\nThen this will work:\n\n```bash\nnode program.js --foolhar --pil\nnode program.js --no-f --pileofmon\n# etc.\n```\n\n## Shorthands\n\nShorthands are a hash of shorter option names to a snippet of args that\nthey expand to.\n\nIf multiple one-character shorthands are all combined, and the\ncombination does not unambiguously match any other option or shorthand,\nthen they will be broken up into their constituent parts. For example:\n\n```json\n{ \"s\" : [\"--loglevel\", \"silent\"]\n, \"g\" : \"--global\"\n, \"f\" : \"--force\"\n, \"p\" : \"--parseable\"\n, \"l\" : \"--long\"\n}\n```\n\n```bash\nnpm ls -sgflp\n# just like doing this:\nnpm ls --loglevel silent --global --force --long --parseable\n```\n\n## The Rest of the args\n\nThe config object returned by nopt is given a special member called\n`argv`, which is an object with the following fields:\n\n* `remain`: The remaining args after all the parsing has occurred.\n* `original`: The args as they originally appeared.\n* `cooked`: The args after flags and shorthands are expanded.\n\n## Slicing\n\nNode programs are called with more or less the exact argv as it appears\nin C land, after the v8 and node-specific options have been plucked off.\nAs such, `argv[0]` is always `node` and `argv[1]` is always the\nJavaScript program being run.\n\nThat's usually not very useful to you. So they're sliced off by\ndefault. If you want them, then you can pass in `0` as the last\nargument, or any other number that you'd like to slice off the start of\nthe list.\n\n## Show usage\n\nAn option parser is great, but it's even better if it generate the\nshowUSage message for you.\n\nEverything is done by calling `nopt.usage`\n\n var nopt = require('nopt');\n nopt.usage(knownOpts, shortHands, description1, description2, ...)\n\nYou could pass as many description objects as you want. Take a look at the following example to understand how it could be used.\n\n\n #!/usr/bin/env node\n\n var nopt = require(\"../lib/nopt\")\n , Stream = require(\"stream\").Stream\n , path = require(\"path\")\n , knownOpts = { \"foo\" : [String, null]\n , \"bar\" : [Stream, Number]\n , \"baz\" : path\n , \"bloo\" : [ \"big\", \"medium\", \"small\" ]\n , \"flag\" : Boolean\n , \"pick\" : Boolean\n }\n , shortHands = { \"foofoo\" : [\"--foo\", \"Mr. Foo\"]\n , \"b7\" : [\"--bar\", \"7\"]\n , \"m\" : [\"--bloo\", \"medium\"]\n , \"p\" : [\"--pick\"]\n , \"f\" : [\"--flag\", \"true\"]\n , \"g\" : [\"--flag\"]\n , \"s\" : \"--flag\"\n }\n , description = { \"foo\" : \"Something really foooooooo\"\n , \"bar\" : \"A bar thing\"\n , \"baz\" : \"More or less baz\"\n , \"flag\" : \"Flag it as well\"\n , \"pick\" : \"Or pick something\"\n }\n , defaults = { \"foo\" : null\n , \"bar\" : 42\n , \"baz\" : \"/etc/passwd\"\n , \"bloo\" : \"small\"\n , \"pick\" : false\n }\n // everything is optional.\n // knownOpts and shorthands default to {}\n // arg list defaults to process.argv\n // slice defaults to 2\n , parsed = nopt(knownOpts, shortHands, process.argv, 2)\n , usage = nopt.usage(knownOpts, shortHands, description, defaults)\n\n console.log('Usage: ')\n console.log(usage)\n\nThe output is:\n\n Usage:\n --foo, -foofoo Something really foooooooo null \n --bar, -b7 A bar thing 42 \n --baz More or less baz /etc/passwd \n --bloo, -m small \n --flag, -f, -g, -s Flag it as well \n --pick, -p Or pick something false \n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/nopt/issues" - }, - "homepage": "https://github.com/isaacs/nopt", - "_id": "nopt@1.0.10", - "_from": "nopt@~1.0.10" -} diff --git a/node_modules/grunt/node_modules/rimraf/AUTHORS b/node_modules/grunt/node_modules/rimraf/AUTHORS deleted file mode 100644 index 247b75437378..000000000000 --- a/node_modules/grunt/node_modules/rimraf/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -# Authors sorted by whether or not they're me. -Isaac Z. Schlueter (http://blog.izs.me) -Wayne Larsen (http://github.com/wvl) -ritch -Marcel Laverdet -Yosef Dinerstein diff --git a/node_modules/grunt/node_modules/rimraf/LICENSE b/node_modules/grunt/node_modules/rimraf/LICENSE deleted file mode 100644 index 05a4010949ca..000000000000 --- a/node_modules/grunt/node_modules/rimraf/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/grunt/node_modules/rimraf/README.md b/node_modules/grunt/node_modules/rimraf/README.md deleted file mode 100644 index cd123b65248e..000000000000 --- a/node_modules/grunt/node_modules/rimraf/README.md +++ /dev/null @@ -1,30 +0,0 @@ -`rm -rf` for node. - -Install with `npm install rimraf`, or just drop rimraf.js somewhere. - -## API - -`rimraf(f, callback)` - -The callback will be called with an error if there is one. Certain -errors are handled for you: - -* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of - `opts.maxBusyTries` times before giving up. -* `ENOENT` - If the file doesn't exist, rimraf will return - successfully, since your desired outcome is already the case. - -## rimraf.sync - -It can remove stuff synchronously, too. But that's not so good. Use -the async API. It's better. - -## CLI - -If installed with `npm install rimraf -g` it can be used as a global -command `rimraf ` which is useful for cross platform support. - -## mkdirp - -If you need to create a directory recursively, check out -[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/node_modules/grunt/node_modules/rimraf/bin.js b/node_modules/grunt/node_modules/rimraf/bin.js deleted file mode 100755 index 29bfa8a63288..000000000000 --- a/node_modules/grunt/node_modules/rimraf/bin.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var rimraf = require('./') - -var help = false -var dashdash = false -var args = process.argv.slice(2).filter(function(arg) { - if (dashdash) - return !!arg - else if (arg === '--') - dashdash = true - else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) - help = true - else - return !!arg -}); - -if (help || args.length === 0) { - // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error - log('Usage: rimraf ') - log('') - log(' Deletes all files and folders at "path" recursively.') - log('') - log('Options:') - log('') - log(' -h, --help Display this usage info') - process.exit(help ? 0 : 1) -} else { - args.forEach(function(arg) { - rimraf.sync(arg) - }) -} diff --git a/node_modules/grunt/node_modules/rimraf/package.json b/node_modules/grunt/node_modules/rimraf/package.json deleted file mode 100644 index c99995c9600b..000000000000 --- a/node_modules/grunt/node_modules/rimraf/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "rimraf", - "version": "2.2.6", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/rimraf.git" - }, - "scripts": { - "test": "cd test && bash run.sh" - }, - "bin": { - "rimraf": "./bin.js" - }, - "contributors": [ - { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - { - "name": "Wayne Larsen", - "email": "wayne@larsen.st", - "url": "http://github.com/wvl" - }, - { - "name": "ritch", - "email": "skawful@gmail.com" - }, - { - "name": "Marcel Laverdet" - }, - { - "name": "Yosef Dinerstein", - "email": "yosefd@microsoft.com" - } - ], - "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf ` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/rimraf/issues" - }, - "homepage": "https://github.com/isaacs/rimraf", - "_id": "rimraf@2.2.6", - "_from": "rimraf@~2.2.6" -} diff --git a/node_modules/grunt/node_modules/rimraf/rimraf.js b/node_modules/grunt/node_modules/rimraf/rimraf.js deleted file mode 100644 index ce62051fc599..000000000000 --- a/node_modules/grunt/node_modules/rimraf/rimraf.js +++ /dev/null @@ -1,178 +0,0 @@ -module.exports = rimraf -rimraf.sync = rimrafSync - -var path = require("path") -var fs = require("fs") - -// for EMFILE handling -var timeout = 0 -exports.EMFILE_MAX = 1000 -exports.BUSYTRIES_MAX = 3 - -var isWindows = (process.platform === "win32") - -function rimraf (p, cb) { - if (!cb) throw new Error("No callback passed to rimraf()") - - var busyTries = 0 - rimraf_(p, function CB (er) { - if (er) { - if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && - busyTries < exports.BUSYTRIES_MAX) { - busyTries ++ - var time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, CB) - }, time) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < exports.EMFILE_MAX) { - return setTimeout(function () { - rimraf_(p, CB) - }, timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - cb(er) - }) -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, cb) { - fs.unlink(p, function (er) { - if (er) { - if (er.code === "ENOENT") - return cb(null) - if (er.code === "EPERM") - return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) - if (er.code === "EISDIR") - return rmdir(p, er, cb) - } - return cb(er) - }) -} - -function fixWinEPERM (p, er, cb) { - fs.chmod(p, 666, function (er2) { - if (er2) - cb(er2.code === "ENOENT" ? null : er) - else - fs.stat(p, function(er3, stats) { - if (er3) - cb(er3.code === "ENOENT" ? null : er) - else if (stats.isDirectory()) - rmdir(p, er, cb) - else - fs.unlink(p, cb) - }) - }) -} - -function fixWinEPERMSync (p, er, cb) { - try { - fs.chmodSync(p, 666) - } catch (er2) { - if (er2.code !== "ENOENT") - throw er - } - - try { - var stats = fs.statSync(p) - } catch (er3) { - if (er3 !== "ENOENT") - throw er - } - - if (stats.isDirectory()) - rmdirSync(p, er) - else - fs.unlinkSync(p) -} - -function rmdir (p, originalEr, cb) { - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - fs.rmdir(p, function (er) { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, cb) - else if (er && er.code === "ENOTDIR") - cb(originalEr) - else - cb(er) - }) -} - -function rmkids(p, cb) { - fs.readdir(p, function (er, files) { - if (er) - return cb(er) - var n = files.length - if (n === 0) - return fs.rmdir(p, cb) - var errState - files.forEach(function (f) { - rimraf(path.join(p, f), function (er) { - if (errState) - return - if (er) - return cb(errState = er) - if (--n === 0) - fs.rmdir(p, cb) - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p) { - try { - fs.unlinkSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) - if (er.code !== "EISDIR") - throw er - rmdirSync(p, er) - } -} - -function rmdirSync (p, originalEr) { - try { - fs.rmdirSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "ENOTDIR") - throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p) - } -} - -function rmkidsSync (p) { - fs.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f)) - }) - fs.rmdirSync(p) -} diff --git a/node_modules/grunt/node_modules/rimraf/test/run.sh b/node_modules/grunt/node_modules/rimraf/test/run.sh deleted file mode 100644 index 598f0163b231..000000000000 --- a/node_modules/grunt/node_modules/rimraf/test/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -e -for i in test-*.js; do - echo -n $i ... - bash setup.sh - node $i - ! [ -d target ] - echo "pass" -done -rm -rf target diff --git a/node_modules/grunt/node_modules/rimraf/test/setup.sh b/node_modules/grunt/node_modules/rimraf/test/setup.sh deleted file mode 100644 index 2602e631602d..000000000000 --- a/node_modules/grunt/node_modules/rimraf/test/setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -e - -files=10 -folders=2 -depth=4 -target="$PWD/target" - -rm -rf target - -fill () { - local depth=$1 - local files=$2 - local folders=$3 - local target=$4 - - if ! [ -d $target ]; then - mkdir -p $target - fi - - local f - - f=$files - while [ $f -gt 0 ]; do - touch "$target/f-$depth-$f" - let f-- - done - - let depth-- - - if [ $depth -le 0 ]; then - return 0 - fi - - f=$folders - while [ $f -gt 0 ]; do - mkdir "$target/folder-$depth-$f" - fill $depth $files $folders "$target/d-$depth-$f" - let f-- - done -} - -fill $depth $files $folders $target - -# sanity assert -[ -d $target ] diff --git a/node_modules/grunt/node_modules/rimraf/test/test-async.js b/node_modules/grunt/node_modules/rimraf/test/test-async.js deleted file mode 100644 index 9c2e0b7be0ef..000000000000 --- a/node_modules/grunt/node_modules/rimraf/test/test-async.js +++ /dev/null @@ -1,5 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf(path.join(__dirname, "target"), function (er) { - if (er) throw er -}) diff --git a/node_modules/grunt/node_modules/rimraf/test/test-sync.js b/node_modules/grunt/node_modules/rimraf/test/test-sync.js deleted file mode 100644 index eb71f10476e8..000000000000 --- a/node_modules/grunt/node_modules/rimraf/test/test-sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf.sync(path.join(__dirname, "target")) diff --git a/node_modules/grunt/node_modules/underscore.string/.travis.yml b/node_modules/grunt/node_modules/underscore.string/.travis.yml deleted file mode 100644 index ab27b29b7188..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: ruby -rvm: - - 1.9.3 - -before_script: - - "export DISPLAY=:99.0" - - "sh -e /etc/init.d/xvfb start" - - sleep 2 \ No newline at end of file diff --git a/node_modules/grunt/node_modules/underscore.string/Gemfile b/node_modules/grunt/node_modules/underscore.string/Gemfile deleted file mode 100644 index f0248273969a..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/Gemfile +++ /dev/null @@ -1,5 +0,0 @@ -source :rubygems - -gem 'serve' -gem 'uglifier' -gem 'rake' \ No newline at end of file diff --git a/node_modules/grunt/node_modules/underscore.string/Gemfile.lock b/node_modules/grunt/node_modules/underscore.string/Gemfile.lock deleted file mode 100644 index a6bb1e73a1e5..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/Gemfile.lock +++ /dev/null @@ -1,34 +0,0 @@ -GEM - remote: http://rubygems.org/ - specs: - activesupport (3.2.3) - i18n (~> 0.6) - multi_json (~> 1.0) - execjs (1.3.0) - multi_json (~> 1.0) - i18n (0.6.0) - multi_json (1.2.0) - rack (1.4.1) - rack-test (0.6.1) - rack (>= 1.0) - rake (0.9.2.2) - serve (1.5.1) - activesupport (~> 3.0) - i18n - rack (~> 1.2) - rack-test (~> 0.5) - tilt (~> 1.3) - tzinfo - tilt (1.3.3) - tzinfo (0.3.33) - uglifier (1.2.4) - execjs (>= 0.3.0) - multi_json (>= 1.0.2) - -PLATFORMS - ruby - -DEPENDENCIES - rake - serve - uglifier diff --git a/node_modules/grunt/node_modules/underscore.string/README.markdown b/node_modules/grunt/node_modules/underscore.string/README.markdown deleted file mode 100644 index d2244b578150..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/README.markdown +++ /dev/null @@ -1,668 +0,0 @@ -# Underscore.string [![Build Status](https://secure.travis-ci.org/epeli/underscore.string.png?branch=master)](http://travis-ci.org/epeli/underscore.string) # - - - -Javascript lacks complete string manipulation operations. -This an attempt to fill that gap. List of build-in methods can be found -for example from [Dive Into JavaScript][d]. - -[d]: http://www.diveintojavascript.com/core-javascript-reference/the-string-object - - -As name states this an extension for [Underscore.js][u], but it can be used -independently from **_s**-global variable. But with Underscore.js you can -use Object-Oriented style and chaining: - -[u]: http://documentcloud.github.com/underscore/ - -```javascript -_(" epeli ").chain().trim().capitalize().value() -=> "Epeli" -``` - -## Download ## - - * [Development version](https://raw.github.com/epeli/underscore.string/master/lib/underscore.string.js) *Uncompressed with Comments 18kb* - * [Production version](https://github.com/epeli/underscore.string/raw/master/dist/underscore.string.min.js) *Minified 7kb* - - -## Node.js installation ## - -**npm package** - - npm install underscore.string - -**Standalone usage**: - -```javascript -var _s = require('underscore.string'); -``` - -**Integrate with Underscore.js**: - -```javascript -var _ = require('underscore'); - -// Import Underscore.string to separate object, because there are conflict functions (include, reverse, contains) -_.str = require('underscore.string'); - -// Mix in non-conflict functions to Underscore namespace if you want -_.mixin(_.str.exports()); - -// All functions, include conflict, will be available through _.str object -_.str.include('Underscore.string', 'string'); // => true -``` - -## String Functions ## - -For availability of functions in this way you need to mix in Underscore.string functions: - -```javascript -_.mixin(_.string.exports()); -``` - -otherwise functions from examples will be available through _.string or _.str objects: - -```javascript -_.str.capitalize('epeli') -=> "Epeli" -``` - -**capitalize** _.capitalize(string) - -Converts first letter of the string to uppercase. - -```javascript -_.capitalize("foo Bar") -=> "Foo Bar" -``` - -**chop** _.chop(string, step) - -```javascript -_.chop('whitespace', 3) -=> ['whi','tes','pac','e'] -``` - -**clean** _.clean(str) - -Compress some whitespaces to one. - -```javascript -_.clean(" foo bar ") -=> 'foo bar' -``` - -**chars** _.chars(str) - -```javascript -_.chars('Hello') -=> ['H','e','l','l','o'] -``` - -**includes** _.includes(string, substring) - -Tests if string contains a substring. - -```javascript -_.includes("foobar", "ob") -=> true -``` - -**include** available only through _.str object, because Underscore has function with the same name. - -```javascript -_.str.include("foobar", "ob") -=> true -``` - -**includes** function was removed - -But you can create it in this way, for compatibility with previous versions: - -```javascript -_.includes = _.str.include -``` - -**count** _.count(string, substring) - -```javascript -_('Hello world').count('l') -=> 3 -``` - -**escapeHTML** _.escapeHTML(string) - -Converts HTML special characters to their entity equivalents. - -```javascript -_('
        Blah blah blah
        ').escapeHTML(); -=> '<div>Blah blah blah</div>' -``` - -**unescapeHTML** _.unescapeHTML(string) - -Converts entity characters to HTML equivalents. - -```javascript -_('<div>Blah blah blah</div>').unescapeHTML(); -=> '
        Blah blah blah
        ' -``` - -**insert** _.insert(string, index, substing) - -```javascript -_('Hello ').insert(6, 'world') -=> 'Hello world' -``` - -**isBlank** _.isBlank(string) - -```javascript -_('').isBlank(); // => true -_('\n').isBlank(); // => true -_(' ').isBlank(); // => true -_('a').isBlank(); // => false -``` - -**join** _.join(separator, *strings) - -Joins strings together with given separator - -```javascript -_.join(" ", "foo", "bar") -=> "foo bar" -``` - -**lines** _.lines(str) - -```javascript -_.lines("Hello\nWorld") -=> ["Hello", "World"] -``` - -**reverse** available only through _.str object, because Underscore has function with the same name. - -Return reversed string: - -```javascript -_.str.reverse("foobar") -=> 'raboof' -``` - -**splice** _.splice(string, index, howmany, substring) - -Like a array splice. - -```javascript -_('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli') -=> 'https://edtsech@bitbucket.org/epeli/underscore.strings' -``` - -**startsWith** _.startsWith(string, starts) - -This method checks whether string starts with starts. - -```javascript -_("image.gif").startsWith("image") -=> true -``` - -**endsWith** _.endsWith(string, ends) - -This method checks whether string ends with ends. - -```javascript -_("image.gif").endsWith("gif") -=> true -``` - -**succ** _.succ(str) - -Returns the successor to str. - -```javascript -_('a').succ() -=> 'b' - -_('A').succ() -=> 'B' -``` - -**supplant** - -Supplant function was removed, use Underscore.js [template function][p]. - -[p]: http://documentcloud.github.com/underscore/#template - -**strip** alias for *trim* - -**lstrip** alias for *ltrim* - -**rstrip** alias for *rtrim* - -**titleize** _.titleize(string) - -```javascript -_('my name is epeli').titleize() -=> 'My Name Is Epeli' -``` - -**camelize** _.camelize(string) - -Converts underscored or dasherized string to a camelized one - -```javascript -_('-moz-transform').camelize() -=> 'MozTransform' -``` - -**classify** _.classify(string) - -Converts string to camelized class name - -```javascript -_('some_class_name').classify() -=> 'SomeClassName' -``` - -**underscored** _.underscored(string) - -Converts a camelized or dasherized string into an underscored one - -```javascript -_('MozTransform').underscored() -=> 'moz_transform' -``` - -**dasherize** _.dasherize(string) - -Converts a underscored or camelized string into an dasherized one - -```javascript -_('MozTransform').dasherize() -=> '-moz-transform' -``` - -**humanize** _.humanize(string) - -Converts an underscored, camelized, or dasherized string into a humanized one. -Also removes beginning and ending whitespace, and removes the postfix '_id'. - -```javascript -_(' capitalize dash-CamelCase_underscore trim ').humanize() -=> 'Capitalize dash camel case underscore trim' -``` - -**trim** _.trim(string, [characters]) - -trims defined characters from begining and ending of the string. -Defaults to whitespace characters. - -```javascript -_.trim(" foobar ") -=> "foobar" - -_.trim("_-foobar-_", "_-") -=> "foobar" -``` - - -**ltrim** _.ltrim(string, [characters]) - -Left trim. Similar to trim, but only for left side. - - -**rtrim** _.rtrim(string, [characters]) - -Right trim. Similar to trim, but only for right side. - -**truncate** _.truncate(string, length, truncateString) - -```javascript -_('Hello world').truncate(5) -=> 'Hello...' - -_('Hello').truncate(10) -=> 'Hello' -``` - -**prune** _.prune(string, length, pruneString) - -Elegant version of truncate. -Makes sure the pruned string does not exceed the original length. -Avoid half-chopped words when truncating. - -```javascript -_('Hello, world').prune(5) -=> 'Hello...' - -_('Hello, world').prune(8) -=> 'Hello...' - -_('Hello, world').prune(5, ' (read a lot more)') -=> 'Hello, world' (as adding "(read a lot more)" would be longer than the original string) - -_('Hello, cruel world').prune(15) -=> 'Hello, cruel...' - -_('Hello').prune(10) -=> 'Hello' -``` - -**words** _.words(str, delimiter=" ") - -Split string by delimiter (String or RegExp), ' ' by default. - -```javascript -_.words("I love you") -=> ["I","love","you"] - -_.words("I_love_you", "_") -=> ["I","love","you"] - -_.words("I-love-you", /-/) -=> ["I","love","you"] -``` - -**sprintf** _.sprintf(string format, *arguments) - -C like string formatting. -Credits goes to [Alexandru Marasteanu][o]. -For more detailed documentation, see the [original page][o]. - -[o]: http://www.diveintojavascript.com/projects/sprintf-for-javascript - -```javascript -_.sprintf("%.1f", 1.17) -"1.2" -``` - -**pad** _.pad(str, length, [padStr, type]) - -pads the `str` with characters until the total string length is equal to the passed `length` parameter. By default, pads on the **left** with the space char (`" "`). `padStr` is truncated to a single character if necessary. - -```javascript -_.pad("1", 8) --> " 1"; - -_.pad("1", 8, '0') --> "00000001"; - -_.pad("1", 8, '0', 'right') --> "10000000"; - -_.pad("1", 8, '0', 'both') --> "00001000"; - -_.pad("1", 8, 'bleepblorp', 'both') --> "bbbb1bbb"; -``` - -**lpad** _.lpad(str, length, [padStr]) - -left-pad a string. Alias for `pad(str, length, padStr, 'left')` - -```javascript -_.lpad("1", 8, '0') --> "00000001"; -``` - -**rpad** _.rpad(str, length, [padStr]) - -right-pad a string. Alias for `pad(str, length, padStr, 'right')` - -```javascript -_.rpad("1", 8, '0') --> "10000000"; -``` - -**lrpad** _.lrpad(str, length, [padStr]) - -left/right-pad a string. Alias for `pad(str, length, padStr, 'both')` - -```javascript -_.lrpad("1", 8, '0') --> "00001000"; -``` - -**center** alias for **lrpad** - -**ljust** alias for *rpad* - -**rjust** alias for *lpad* - -**toNumber** _.toNumber(string, [decimals]) - -Parse string to number. Returns NaN if string can't be parsed to number. - -```javascript -_('2.556').toNumber() -=> 3 - -_('2.556').toNumber(1) -=> 2.6 -``` - -**strRight** _.strRight(string, pattern) - -Searches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found. - -```javascript -_('This_is_a_test_string').strRight('_') -=> "is_a_test_string"; -``` - -**strRightBack** _.strRightBack(string, pattern) - -Searches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found. - -```javascript -_('This_is_a_test_string').strRightBack('_') -=> "string"; -``` - -**strLeft** _.strLeft(string, pattern) - -Searches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found. - -```javascript -_('This_is_a_test_string').strLeft('_') -=> "This"; -``` - -**strLeftBack** _.strLeftBack(string, pattern) - -Searches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found. - -```javascript -_('This_is_a_test_string').strLeftBack('_') -=> "This_is_a_test"; -``` - -**stripTags** - -Removes all html tags from string. - -```javascript -_('a link').stripTags() -=> 'a link' - -_('a link').stripTags() -=> 'a linkalert("hello world!")' -``` - -**toSentence** _.toSentence(array, [delimiter, lastDelimiter]) - -Join an array into a human readable sentence. - -```javascript -_.toSentence(['jQuery', 'Mootools', 'Prototype']) -=> 'jQuery, Mootools and Prototype'; - -_.toSentence(['jQuery', 'Mootools', 'Prototype'], ', ', ' unt ') -=> 'jQuery, Mootools unt Prototype'; -``` - -**repeat** _.repeat(string, count, [separator]) - -Repeats a string count times. - -```javascript -_.repeat("foo", 3) -=> 'foofoofoo'; - -_.repeat("foo", 3, "bar") -=> 'foobarfoobarfoo' -``` - -**slugify** _.slugify(string) - -Transform text into a URL slug. Replaces whitespaces, accentuated, and special characters with a dash. - -```javascript -_.slugify("Un éléphant à l'orée du bois") -=> 'un-elephant-a-loree-du-bois'; -``` - -***Caution: this function is charset dependent*** - -## Roadmap ## - -Any suggestions or bug reports are welcome. Just email me or more preferably open an issue. - -## Changelog ## - -### 2.0.0 ### - -* Added prune, humanize functions -* Added _.string (_.str) namespace for Underscore.string library -* Removed includes function - -#### Problems - -We lose two things for `include` and `reverse` methods from `_.string`: - -* Calls like `_('foobar').include('bar')` aren't available; -* Chaining isn't available too. - -But if you need this functionality you can create aliases for conflict functions which will be convenient for you: - -```javascript -_.mixin({ - includeString: _.str.include, - reverseString: _.str.reverse -}) - -// Now wrapper calls and chaining are available. -_('foobar').chain().reverseString().includeString('rab').value() -``` - -#### Standalone Usage - -If you are using Underscore.string without Underscore. You also have `_.string` namespace for it and `_.str` alias -But of course you can just reassign `_` variable with `_.string` - -```javascript -_ = _.string -``` -### 2.2.0 ### - -* Capitalize method behavior changed -* Various perfomance tweaks - -### 2.1.1### - -* Fixed words method bug -* Added classify method - -### 2.1.0 ### - -* AMD support -* Added toSentence method -* Added slugify method -* Lots of speed optimizations - -### 2.0.0 ### - -For upgrading to this version you need to mix in Underscore.string library to Underscore object: - -```javascript -_.mixin(_.string.exports()); -``` - -and all non-conflict Underscore.string functions will be available through Underscore object. -Also function `includes` has been removed, you should replace this function by `_.str.include` -or create alias `_.includes = _.str.include` and all your code will work fine. - -### 1.1.6 ### - -* Fixed reverse and truncate -* Added isBlank, stripTags, inlude(alias for includes) -* Added uglifier compression - -### 1.1.5 ### - -* Added strRight, strRightBack, strLeft, strLeftBack - -### 1.1.4 ### - -* Added pad, lpad, rpad, lrpad methods and aliases center, ljust, rjust -* Integration with Underscore 1.1.6 - -### 1.1.3 ### - -* Added methods: underscored, camelize, dasherize -* Support newer version of npm - -### 1.1.2 ### - -* Created functions: lines, chars, words functions - -### 1.0.2 ### - -* Created integration test suite with underscore.js 1.1.4 (now it's absolutely compatible) -* Removed 'reverse' function, because this function override underscore.js 'reverse' - -## Contribute ## - -* Fork & pull request. Don't forget about tests. -* If you planning add some feature please create issue before. - -Otherwise changes will be rejected. - -## Contributors list ## - -* Esa-Matti Suuronen (), -* Edward Tsech , -* Sasha Koss (), -* Vladimir Dronnikov , -* Pete Kruckenberg (), -* Paul Chavard (), -* Ed Finkler () -* Pavel Pravosud -* Anton Lindqvist () - -## Licence ## - -The MIT License - -Copyright (c) 2011 Esa-Matti Suuronen esa-matti@suuronen.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/grunt/node_modules/underscore.string/Rakefile b/node_modules/grunt/node_modules/underscore.string/Rakefile deleted file mode 100644 index baa164cd934f..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/Rakefile +++ /dev/null @@ -1,28 +0,0 @@ -# encoding: utf-8 -task default: :test - -desc 'Use UglifyJS to compress Underscore.string' -task :build do - require 'uglifier' - source = File.read('lib/underscore.string.js') - compressed = Uglifier.compile(source, copyright: false) - File.open('dist/underscore.string.min.js', 'w'){ |f| f.write compressed } - compression_rate = compressed.length.to_f/source.length - puts "compressed dist/underscore.string.min.js: #{compressed.length}/#{source.length} #{(compression_rate * 100).round}%" -end - -desc 'Run tests' -task :test do - pid = spawn('bundle exec serve', err: '/dev/null') - sleep 2 - - puts "Running underscore.string test suite." - result1 = system %{phantomjs ./test/run-qunit.js "http://localhost:4000/test/test.html"} - - puts "Running Underscore test suite." - result2 = system %{phantomjs ./test/run-qunit.js "http://localhost:4000/test/test_underscore/test.html"} - - Process.kill 'INT', pid - - exit(result1 && result2 ? 0 : 1) -end \ No newline at end of file diff --git a/node_modules/grunt/node_modules/underscore.string/dist/underscore.string.min.js b/node_modules/grunt/node_modules/underscore.string/dist/underscore.string.min.js deleted file mode 100644 index cd436e192d8e..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/dist/underscore.string.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(a){"use strict";var b=String.prototype.trim,c=String.prototype.trimRight,d=String.prototype.trimLeft,e=function(a){return a*1||0},f=function(a,b,c){a+="",b=~~b;for(var d=[];b>0;d[--b]=a);return d.join(c==null?"":c)},g=function(a){return Array.prototype.slice.call(a)},h=function(a){return a!=null?"["+m.escapeRegExp(""+a)+"]":"\\s"},i={lt:"<",gt:">",quot:'"',apos:"'",amp:"&"},j={};for(var k in i)j[i[k]]=k;var l=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}var b=f,c=function(){return c.cache.hasOwnProperty(arguments[0])||(c.cache[arguments[0]]=c.parse(arguments[0])),c.format.call(null,c.cache[arguments[0]],arguments)};return c.format=function(c,d){var e=1,f=c.length,g="",h,i=[],j,k,m,n,o,p;for(j=0;j=0?"+"+h:h,o=m[4]?m[4]=="0"?"0":m[4].charAt(1):" ",p=m[6]-String(h).length,n=m[6]?b(o,p):"",i.push(m[5]?h+n:n+h)}}return i.join("")},c.cache={},c.parse=function(a){var b=a,c=[],d=[],e=0;while(b){if((c=/^[^\x25]+/.exec(b))!==null)d.push(c[0]);else if((c=/^\x25{2}/.exec(b))!==null)d.push("%");else{if((c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(b))===null)throw new Error("[_.sprintf] huh?");if(c[2]){e|=1;var f=[],g=c[2],h=[];if((h=/^([a-z_][a-z_\d]*)/i.exec(g))===null)throw new Error("[_.sprintf] huh?");f.push(h[1]);while((g=g.substring(h[0].length))!=="")if((h=/^\.([a-z_][a-z_\d]*)/i.exec(g))!==null)f.push(h[1]);else{if((h=/^\[(\d+)\]/.exec(g))===null)throw new Error("[_.sprintf] huh?");f.push(h[1])}c[2]=f}else e|=2;if(e===3)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");d.push(c)}b=b.substring(c[0].length)}return d},c}(),m={VERSION:"2.1.1",isBlank:function(a){return/^\s*$/.test(a)},stripTags:function(a){return(""+a).replace(/<\/?[^>]+>/g,"")},capitalize:function(a){return a+="",a.charAt(0).toUpperCase()+a.substring(1)},chop:function(a,b){a+="",b=~~b||a.length;var c=[];for(var d=0;d"']/g,function(a){return"&"+j[a]+";"})},unescapeHTML:function(a){return(""+a).replace(/\&([^;]+);/g,function(a,b){var c;return b in i?i[b]:(c=b.match(/^#x([\da-fA-F]+)$/))?String.fromCharCode(parseInt(c[1],16)):(c=b.match(/^#(\d+)$/))?String.fromCharCode(~~c[1]):a})},escapeRegExp:function(a){return a.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},insert:function(a,b,c){var d=m.chars(a);return d.splice(~~b,0,""+c),d.join("")},include:function(a,b){return!!~(""+a).indexOf(b)},join:function(){var a=g(arguments);return a.join(a.shift())},lines:function(a){return(""+a).split("\n")},reverse:function(a){return m.chars(a).reverse().join("")},splice:function(a,b,c,d){var e=m.chars(a);return e.splice(~~b,~~c,d),e.join("")},startsWith:function(a,b){return a+="",b+="",a.length>=b.length&&a.substring(0,b.length)===b},endsWith:function(a,b){return a+="",b+="",a.length>=b.length&&a.substring(a.length-b.length)===b},succ:function(a){a+="";var b=m.chars(a);return b.splice(a.length-1,1,String.fromCharCode(a.charCodeAt(a.length-1)+1)),b.join("")},titleize:function(a){return(""+a).replace(/\b./g,function(a){return a.toUpperCase()})},camelize:function(a){return m.trim(a).replace(/[-_\s]+(.)?/g,function(a,b){return b&&b.toUpperCase()})},underscored:function(a){return m.trim(a).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(a){return m.trim(a).replace(/[_\s]+/g,"-").replace(/([A-Z])/g,"-$1").replace(/-+/g,"-").toLowerCase()},classify:function(a){return a+="",m.titleize(a.replace(/_/g," ")).replace(/\s/g,"")},humanize:function(a){return m.capitalize(this.underscored(a).replace(/_id$/,"").replace(/_/g," "))},trim:function(a,c){return a+="",!c&&b?b.call(a):(c=h(c),a.replace(new RegExp("^"+c+"+|"+c+"+$","g"),""))},ltrim:function(a,b){return a+="",!b&&d?d.call(a):(b=h(b),a.replace(new RegExp("^"+b+"+"),""))},rtrim:function(a,b){return a+="",!b&&c?c.call(a):(b=h(b),a.replace(new RegExp(b+"+$"),""))},truncate:function(a,b,c){return a+="",c=c||"...",b=~~b,a.length>b?a.slice(0,b)+c:a},prune:function(a,b,c){a+="",b=~~b,c=c!=null?""+c:"...";var d,e,f=a.replace(/\W/g,function(a){return a.toUpperCase()!==a.toLowerCase()?"A":" "});return e=f.charAt(b),d=f.slice(0,b),e&&e.match(/\S/)&&(d=d.replace(/\s\S+$/,"")),d=m.rtrim(d),(d+c).length>a.length?a:a.substring(0,d.length)+c},words:function(a,b){return m.trim(a,b).split(b||/\s+/)},pad:function(a,b,c,d){a+="";var e=0;b=~~b,c?c.length>1&&(c=c.charAt(0)):c=" ";switch(d){case"right":return e=b-a.length,a+f(c,e);case"both":return e=b-a.length,f(c,Math.ceil(e/2))+a+f(c,Math.floor(e/2));default:return e=b-a.length,f(c,e)+a}},lpad:function(a,b,c){return m.pad(a,b,c)},rpad:function(a,b,c){return m.pad(a,b,c,"right")},lrpad:function(a,b,c){return m.pad(a,b,c,"both")},sprintf:l,vsprintf:function(a,b){return b.unshift(a),l.apply(null,b)},toNumber:function(a,b){a+="";var c=e(e(a).toFixed(~~b));return c===0&&!a.match(/^0+$/)?Number.NaN:c},strRight:function(a,b){a+="",b=b!=null?""+b:b;var c=b?a.indexOf(b):-1;return~c?a.slice(c+b.length,a.length):a},strRightBack:function(a,b){a+="",b=b!=null?""+b:b;var c=b?a.lastIndexOf(b):-1;return~c?a.slice(c+b.length,a.length):a},strLeft:function(a,b){a+="",b=b!=null?""+b:b;var c=b?a.indexOf(b):-1;return~c?a.slice(0,c):a},strLeftBack:function(a,b){a+="",b=b!=null?""+b:b;var c=a.lastIndexOf(b);return~c?a.slice(0,c):a},toSentence:function(a,b,c){b||(b=", "),c||(c=" and ");var d=a.length,e="";for(var f=0;f -// Underscore.strings is freely distributable under the terms of the MIT license. -// Documentation: https://github.com/epeli/underscore.string -// Some code is borrowed from MooTools and Alexandru Marasteanu. - -// Version 2.2.0rc - -(function(root){ - 'use strict'; - - // Defining helper functions. - - var nativeTrim = String.prototype.trim; - var nativeTrimRight = String.prototype.trimRight; - var nativeTrimLeft = String.prototype.trimLeft; - - var parseNumber = function(source) { return source * 1 || 0; }; - - var strRepeat = function(str, qty, separator){ - // ~~var — is the fastest available way to convert anything to Integer in javascript. - // We'll use it extensively in this lib. - str += ''; qty = ~~qty; - for (var repeat = []; qty > 0; repeat[--qty] = str) {} - return repeat.join(separator == null ? '' : separator); - }; - - var slice = function(a){ - return Array.prototype.slice.call(a); - }; - - var defaultToWhiteSpace = function(characters){ - if (characters != null) { - return '[' + _s.escapeRegExp(''+characters) + ']'; - } - return '\\s'; - }; - - var escapeChars = { - lt: '<', - gt: '>', - quot: '"', - apos: "'", - amp: '&' - }; - - var reversedEscapeChars = {}; - for(var key in escapeChars){ reversedEscapeChars[escapeChars[key]] = key; } - - // sprintf() for JavaScript 0.7-beta1 - // http://www.diveintojavascript.com/projects/javascript-sprintf - // - // Copyright (c) Alexandru Marasteanu - // All rights reserved. - - var sprintf = (function() { - function get_type(variable) { - return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase(); - } - - var str_repeat = strRepeat; - - var str_format = function() { - if (!str_format.cache.hasOwnProperty(arguments[0])) { - str_format.cache[arguments[0]] = str_format.parse(arguments[0]); - } - return str_format.format.call(null, str_format.cache[arguments[0]], arguments); - }; - - str_format.format = function(parse_tree, argv) { - var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length; - for (i = 0; i < tree_length; i++) { - node_type = get_type(parse_tree[i]); - if (node_type === 'string') { - output.push(parse_tree[i]); - } - else if (node_type === 'array') { - match = parse_tree[i]; // convenience purposes only - if (match[2]) { // keyword argument - arg = argv[cursor]; - for (k = 0; k < match[2].length; k++) { - if (!arg.hasOwnProperty(match[2][k])) { - throw new Error(sprintf('[_.sprintf] property "%s" does not exist', match[2][k])); - } - arg = arg[match[2][k]]; - } - } else if (match[1]) { // positional argument (explicit) - arg = argv[match[1]]; - } - else { // positional argument (implicit) - arg = argv[cursor++]; - } - - if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) { - throw new Error(sprintf('[_.sprintf] expecting number but found %s', get_type(arg))); - } - switch (match[8]) { - case 'b': arg = arg.toString(2); break; - case 'c': arg = String.fromCharCode(arg); break; - case 'd': arg = parseInt(arg, 10); break; - case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break; - case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break; - case 'o': arg = arg.toString(8); break; - case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break; - case 'u': arg = Math.abs(arg); break; - case 'x': arg = arg.toString(16); break; - case 'X': arg = arg.toString(16).toUpperCase(); break; - } - arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg); - pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' '; - pad_length = match[6] - String(arg).length; - pad = match[6] ? str_repeat(pad_character, pad_length) : ''; - output.push(match[5] ? arg + pad : pad + arg); - } - } - return output.join(''); - }; - - str_format.cache = {}; - - str_format.parse = function(fmt) { - var _fmt = fmt, match = [], parse_tree = [], arg_names = 0; - while (_fmt) { - if ((match = /^[^\x25]+/.exec(_fmt)) !== null) { - parse_tree.push(match[0]); - } - else if ((match = /^\x25{2}/.exec(_fmt)) !== null) { - parse_tree.push('%'); - } - else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) { - if (match[2]) { - arg_names |= 1; - var field_list = [], replacement_field = match[2], field_match = []; - if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') { - if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - } - else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - } - else { - throw new Error('[_.sprintf] huh?'); - } - } - } - else { - throw new Error('[_.sprintf] huh?'); - } - match[2] = field_list; - } - else { - arg_names |= 2; - } - if (arg_names === 3) { - throw new Error('[_.sprintf] mixing positional and named placeholders is not (yet) supported'); - } - parse_tree.push(match); - } - else { - throw new Error('[_.sprintf] huh?'); - } - _fmt = _fmt.substring(match[0].length); - } - return parse_tree; - }; - - return str_format; - })(); - - - - // Defining underscore.string - - var _s = { - - VERSION: '2.2.0rc', - - isBlank: function(str){ - return (/^\s*$/).test(str); - }, - - stripTags: function(str){ - return (''+str).replace(/<\/?[^>]+>/g, ''); - }, - - capitalize : function(str) { - str += ''; - return str.charAt(0).toUpperCase() + str.substring(1); - }, - - chop: function(str, step){ - str = str+''; - step = ~~step || str.length; - var arr = []; - for (var i = 0; i < str.length; i += step) - arr.push(str.slice(i,i + step)); - return arr; - }, - - clean: function(str){ - return _s.strip(str).replace(/\s+/g, ' '); - }, - - count: function(str, substr){ - str += ''; substr += ''; - return str.split(substr).length - 1; - }, - - chars: function(str) { - return (''+str).split(''); - }, - - escapeHTML: function(str) { - return (''+str).replace(/[&<>"']/g, function(match){ return '&' + reversedEscapeChars[match] + ';'; }); - }, - - unescapeHTML: function(str) { - return (''+str).replace(/\&([^;]+);/g, function(entity, entityCode){ - var match; - - if (entityCode in escapeChars) { - return escapeChars[entityCode]; - } else if (match = entityCode.match(/^#x([\da-fA-F]+)$/)) { - return String.fromCharCode(parseInt(match[1], 16)); - } else if (match = entityCode.match(/^#(\d+)$/)) { - return String.fromCharCode(~~match[1]); - } else { - return entity; - } - }); - }, - - escapeRegExp: function(str){ - // From MooTools core 1.2.4 - return str.replace(/([-.*+?^${}()|[\]\/\\])/g, '\\$1'); - }, - - insert: function(str, i, substr){ - var arr = _s.chars(str); - arr.splice(~~i, 0, ''+substr); - return arr.join(''); - }, - - include: function(str, needle){ - return !!~(''+str).indexOf(needle); - }, - - join: function() { - var args = slice(arguments); - return args.join(args.shift()); - }, - - lines: function(str) { - return (''+str).split("\n"); - }, - - reverse: function(str){ - return _s.chars(str).reverse().join(''); - }, - - splice: function(str, i, howmany, substr){ - var arr = _s.chars(str); - arr.splice(~~i, ~~howmany, substr); - return arr.join(''); - }, - - startsWith: function(str, starts){ - str += ''; starts += ''; - return str.length >= starts.length && str.substring(0, starts.length) === starts; - }, - - endsWith: function(str, ends){ - str += ''; ends += ''; - return str.length >= ends.length && str.substring(str.length - ends.length) === ends; - }, - - succ: function(str){ - str += ''; - var arr = _s.chars(str); - arr.splice(str.length-1, 1, String.fromCharCode(str.charCodeAt(str.length-1) + 1)); - return arr.join(''); - }, - - titleize: function(str){ - return (''+str).replace(/\b./g, function(ch){ return ch.toUpperCase(); }); - }, - - camelize: function(str){ - return _s.trim(str).replace(/[-_\s]+(.)?/g, function(match, chr){ - return chr && chr.toUpperCase(); - }); - }, - - underscored: function(str){ - return _s.trim(str).replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/[-\s]+/g, '_').toLowerCase(); - }, - - dasherize: function(str){ - return _s.trim(str).replace(/[_\s]+/g, '-').replace(/([A-Z])/g, '-$1').replace(/-+/g, '-').toLowerCase(); - }, - - classify: function(str){ - str += ''; - return _s.titleize(str.replace(/_/g, ' ')).replace(/\s/g, '') - }, - - humanize: function(str){ - return _s.capitalize(this.underscored(str).replace(/_id$/,'').replace(/_/g, ' ')); - }, - - trim: function(str, characters){ - str += ''; - if (!characters && nativeTrim) { return nativeTrim.call(str); } - characters = defaultToWhiteSpace(characters); - return str.replace(new RegExp('\^' + characters + '+|' + characters + '+$', 'g'), ''); - }, - - ltrim: function(str, characters){ - str+=''; - if (!characters && nativeTrimLeft) { - return nativeTrimLeft.call(str); - } - characters = defaultToWhiteSpace(characters); - return str.replace(new RegExp('^' + characters + '+'), ''); - }, - - rtrim: function(str, characters){ - str+=''; - if (!characters && nativeTrimRight) { - return nativeTrimRight.call(str); - } - characters = defaultToWhiteSpace(characters); - return str.replace(new RegExp(characters + '+$'), ''); - }, - - truncate: function(str, length, truncateStr){ - str += ''; truncateStr = truncateStr || '...'; - length = ~~length; - return str.length > length ? str.slice(0, length) + truncateStr : str; - }, - - /** - * _s.prune: a more elegant version of truncate - * prune extra chars, never leaving a half-chopped word. - * @author github.com/sergiokas - */ - prune: function(str, length, pruneStr){ - str += ''; length = ~~length; - pruneStr = pruneStr != null ? ''+pruneStr : '...'; - - var pruned, borderChar, template = str.replace(/\W/g, function(ch){ - return (ch.toUpperCase() !== ch.toLowerCase()) ? 'A' : ' '; - }); - - borderChar = template.charAt(length); - - pruned = template.slice(0, length); - - // Check if we're in the middle of a word - if (borderChar && borderChar.match(/\S/)) - pruned = pruned.replace(/\s\S+$/, ''); - - pruned = _s.rtrim(pruned); - - return (pruned+pruneStr).length > str.length ? str : str.substring(0, pruned.length)+pruneStr; - }, - - words: function(str, delimiter) { - return _s.trim(str, delimiter).split(delimiter || /\s+/); - }, - - pad: function(str, length, padStr, type) { - str += ''; - - var padlen = 0; - - length = ~~length; - - if (!padStr) { - padStr = ' '; - } else if (padStr.length > 1) { - padStr = padStr.charAt(0); - } - - switch(type) { - case 'right': - padlen = (length - str.length); - return str + strRepeat(padStr, padlen); - case 'both': - padlen = (length - str.length); - return strRepeat(padStr, Math.ceil(padlen/2)) + - str + - strRepeat(padStr, Math.floor(padlen/2)); - default: // 'left' - padlen = (length - str.length); - return strRepeat(padStr, padlen) + str; - } - }, - - lpad: function(str, length, padStr) { - return _s.pad(str, length, padStr); - }, - - rpad: function(str, length, padStr) { - return _s.pad(str, length, padStr, 'right'); - }, - - lrpad: function(str, length, padStr) { - return _s.pad(str, length, padStr, 'both'); - }, - - sprintf: sprintf, - - vsprintf: function(fmt, argv){ - argv.unshift(fmt); - return sprintf.apply(null, argv); - }, - - toNumber: function(str, decimals) { - str += ''; - var num = parseNumber(parseNumber(str).toFixed(~~decimals)); - return num === 0 && !str.match(/^0+$/) ? Number.NaN : num; - }, - - strRight: function(str, sep){ - str += ''; sep = sep != null ? ''+sep : sep; - var pos = !sep ? -1 : str.indexOf(sep); - return ~pos ? str.slice(pos+sep.length, str.length) : str; - }, - - strRightBack: function(str, sep){ - str += ''; sep = sep != null ? ''+sep : sep; - var pos = !sep ? -1 : str.lastIndexOf(sep); - return ~pos ? str.slice(pos+sep.length, str.length) : str; - }, - - strLeft: function(str, sep){ - str += ''; sep = sep != null ? ''+sep : sep; - var pos = !sep ? -1 : str.indexOf(sep); - return ~pos ? str.slice(0, pos) : str; - }, - - strLeftBack: function(str, sep){ - str += ''; sep = sep != null ? ''+sep : sep; - var pos = str.lastIndexOf(sep); - return ~pos ? str.slice(0, pos) : str; - }, - - toSentence: function(array, separator, lastSeparator) { - separator || (separator = ', '); - lastSeparator || (lastSeparator = ' and '); - var length = array.length, str = ''; - - for (var i = 0; i < length; i++) { - str += array[i]; - if (i === (length - 2)) { str += lastSeparator; } - else if (i < (length - 1)) { str += separator; } - } - - return str; - }, - - slugify: function(str) { - var from = "ąàáäâãćęèéëêìíïîłńòóöôõùúüûñçżź", - to = "aaaaaaceeeeeiiiilnooooouuuunczz", - regex = new RegExp(defaultToWhiteSpace(from), 'g'); - - str = (''+str).toLowerCase(); - - str = str.replace(regex, function(ch){ - var index = from.indexOf(ch); - return to.charAt(index) || '-'; - }); - - return _s.trim(str.replace(/[^\w\s-]/g, '').replace(/[-\s]+/g, '-'), '-'); - }, - - exports: function() { - var result = {}; - - for (var prop in this) { - if (!this.hasOwnProperty(prop) || ~_s.words('include contains reverse').indexOf(prop)) continue; - result[prop] = this[prop]; - } - - return result; - }, - - repeat: strRepeat - }; - - // Aliases - - _s.strip = _s.trim; - _s.lstrip = _s.ltrim; - _s.rstrip = _s.rtrim; - _s.center = _s.lrpad; - _s.rjust = _s.lpad; - _s.ljust = _s.rpad; - _s.contains = _s.include; - - // CommonJS module is defined - if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) { - // Export module - module.exports = _s; - } - exports._s = _s; - - } else if (typeof define === 'function' && define.amd) { - // Register as a named module with AMD. - define('underscore.string', function() { - return _s; - }); - - } else { - // Integrate with Underscore.js if defined - // or create our own underscore object. - root._ = root._ || {}; - root._.string = root._.str = _s; - } - -}(this || window)); diff --git a/node_modules/grunt/node_modules/underscore.string/package.json b/node_modules/grunt/node_modules/underscore.string/package.json deleted file mode 100644 index 6711c0a88a96..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "underscore.string", - "version": "2.2.1", - "description": "String manipulation extensions for Underscore.js javascript library.", - "homepage": "http://epeli.github.com/underscore.string/", - "contributors": [ - { - "name": "Esa-Matti Suuronen", - "email": "esa-matti@suuronen.org", - "url": "http://esa-matti.suuronen.org/" - }, - { - "name": "Edward Tsech", - "email": "edtsech@gmail.com" - }, - { - "name": "Sasha Koss", - "email": "kossnocorp@gmail.com", - "url": "http://koss.nocorp.me/" - }, - { - "name": "Vladimir Dronnikov", - "email": "dronnikov@gmail.com" - }, - { - "name": "Pete Kruckenberg", - "email": "https://github.com/kruckenb", - "url": "" - }, - { - "name": "Paul Chavard", - "email": "paul@chavard.net", - "url": "" - }, - { - "name": "Ed Finkler", - "email": "coj@funkatron.com", - "url": "" - }, - { - "name": "Pavel Pravosud", - "email": "rwz@duckroll.ru" - } - ], - "keywords": [ - "underscore", - "string" - ], - "main": "./lib/underscore.string", - "directories": { - "lib": "./lib" - }, - "engines": { - "node": "*" - }, - "repository": { - "type": "git", - "url": "https://github.com/epeli/underscore.string.git" - }, - "bugs": { - "url": "https://github.com/epeli/underscore.string/issues" - }, - "licenses": [ - { - "type": "MIT" - } - ], - "readme": "# Underscore.string [![Build Status](https://secure.travis-ci.org/epeli/underscore.string.png?branch=master)](http://travis-ci.org/epeli/underscore.string) #\n\n\n\nJavascript lacks complete string manipulation operations.\nThis an attempt to fill that gap. List of build-in methods can be found\nfor example from [Dive Into JavaScript][d].\n\n[d]: http://www.diveintojavascript.com/core-javascript-reference/the-string-object\n\n\nAs name states this an extension for [Underscore.js][u], but it can be used\nindependently from **_s**-global variable. But with Underscore.js you can\nuse Object-Oriented style and chaining:\n\n[u]: http://documentcloud.github.com/underscore/\n\n```javascript\n_(\" epeli \").chain().trim().capitalize().value()\n=> \"Epeli\"\n```\n\n## Download ##\n\n * [Development version](https://raw.github.com/epeli/underscore.string/master/lib/underscore.string.js) *Uncompressed with Comments 18kb*\n * [Production version](https://github.com/epeli/underscore.string/raw/master/dist/underscore.string.min.js) *Minified 7kb*\n\n\n## Node.js installation ##\n\n**npm package**\n\n npm install underscore.string\n\n**Standalone usage**:\n\n```javascript\nvar _s = require('underscore.string');\n```\n\n**Integrate with Underscore.js**:\n\n```javascript\nvar _ = require('underscore');\n\n// Import Underscore.string to separate object, because there are conflict functions (include, reverse, contains)\n_.str = require('underscore.string');\n\n// Mix in non-conflict functions to Underscore namespace if you want\n_.mixin(_.str.exports());\n\n// All functions, include conflict, will be available through _.str object\n_.str.include('Underscore.string', 'string'); // => true\n```\n\n## String Functions ##\n\nFor availability of functions in this way you need to mix in Underscore.string functions:\n\n```javascript\n_.mixin(_.string.exports());\n```\n\notherwise functions from examples will be available through _.string or _.str objects:\n\n```javascript\n_.str.capitalize('epeli')\n=> \"Epeli\"\n```\n\n**capitalize** _.capitalize(string)\n\nConverts first letter of the string to uppercase.\n\n```javascript\n_.capitalize(\"foo Bar\")\n=> \"Foo Bar\"\n```\n\n**chop** _.chop(string, step)\n\n```javascript\n_.chop('whitespace', 3)\n=> ['whi','tes','pac','e']\n```\n\n**clean** _.clean(str)\n\nCompress some whitespaces to one.\n\n```javascript\n_.clean(\" foo bar \")\n=> 'foo bar'\n```\n\n**chars** _.chars(str)\n\n```javascript\n_.chars('Hello')\n=> ['H','e','l','l','o']\n```\n\n**includes** _.includes(string, substring)\n\nTests if string contains a substring.\n\n```javascript\n_.includes(\"foobar\", \"ob\")\n=> true\n```\n\n**include** available only through _.str object, because Underscore has function with the same name.\n\n```javascript\n_.str.include(\"foobar\", \"ob\")\n=> true\n```\n\n**includes** function was removed\n\nBut you can create it in this way, for compatibility with previous versions:\n\n```javascript\n_.includes = _.str.include\n```\n\n**count** _.count(string, substring)\n\n```javascript\n_('Hello world').count('l')\n=> 3\n```\n\n**escapeHTML** _.escapeHTML(string)\n\nConverts HTML special characters to their entity equivalents.\n\n```javascript\n_('
        Blah blah blah
        ').escapeHTML();\n=> '<div>Blah blah blah</div>'\n```\n\n**unescapeHTML** _.unescapeHTML(string)\n\nConverts entity characters to HTML equivalents.\n\n```javascript\n_('<div>Blah blah blah</div>').unescapeHTML();\n=> '
        Blah blah blah
        '\n```\n\n**insert** _.insert(string, index, substing)\n\n```javascript\n_('Hello ').insert(6, 'world')\n=> 'Hello world'\n```\n\n**isBlank** _.isBlank(string)\n\n```javascript\n_('').isBlank(); // => true\n_('\\n').isBlank(); // => true\n_(' ').isBlank(); // => true\n_('a').isBlank(); // => false\n```\n\n**join** _.join(separator, *strings)\n\nJoins strings together with given separator\n\n```javascript\n_.join(\" \", \"foo\", \"bar\")\n=> \"foo bar\"\n```\n\n**lines** _.lines(str)\n\n```javascript\n_.lines(\"Hello\\nWorld\")\n=> [\"Hello\", \"World\"]\n```\n\n**reverse** available only through _.str object, because Underscore has function with the same name.\n\nReturn reversed string:\n\n```javascript\n_.str.reverse(\"foobar\")\n=> 'raboof'\n```\n\n**splice** _.splice(string, index, howmany, substring)\n\nLike a array splice.\n\n```javascript\n_('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli')\n=> 'https://edtsech@bitbucket.org/epeli/underscore.strings'\n```\n\n**startsWith** _.startsWith(string, starts)\n\nThis method checks whether string starts with starts.\n\n```javascript\n_(\"image.gif\").startsWith(\"image\")\n=> true\n```\n\n**endsWith** _.endsWith(string, ends)\n\nThis method checks whether string ends with ends.\n\n```javascript\n_(\"image.gif\").endsWith(\"gif\")\n=> true\n```\n\n**succ** _.succ(str)\n\nReturns the successor to str.\n\n```javascript\n_('a').succ()\n=> 'b'\n\n_('A').succ()\n=> 'B'\n```\n\n**supplant**\n\nSupplant function was removed, use Underscore.js [template function][p].\n\n[p]: http://documentcloud.github.com/underscore/#template\n\n**strip** alias for *trim*\n\n**lstrip** alias for *ltrim*\n\n**rstrip** alias for *rtrim*\n\n**titleize** _.titleize(string)\n\n```javascript\n_('my name is epeli').titleize()\n=> 'My Name Is Epeli'\n```\n\n**camelize** _.camelize(string)\n\nConverts underscored or dasherized string to a camelized one\n\n```javascript\n_('-moz-transform').camelize()\n=> 'MozTransform'\n```\n\n**classify** _.classify(string)\n\nConverts string to camelized class name\n\n```javascript\n_('some_class_name').classify()\n=> 'SomeClassName'\n```\n\n**underscored** _.underscored(string)\n\nConverts a camelized or dasherized string into an underscored one\n\n```javascript\n_('MozTransform').underscored()\n=> 'moz_transform'\n```\n\n**dasherize** _.dasherize(string)\n\nConverts a underscored or camelized string into an dasherized one\n\n```javascript\n_('MozTransform').dasherize()\n=> '-moz-transform'\n```\n\n**humanize** _.humanize(string)\n\nConverts an underscored, camelized, or dasherized string into a humanized one.\nAlso removes beginning and ending whitespace, and removes the postfix '_id'.\n\n```javascript\n_(' capitalize dash-CamelCase_underscore trim ').humanize()\n=> 'Capitalize dash camel case underscore trim'\n```\n\n**trim** _.trim(string, [characters])\n\ntrims defined characters from begining and ending of the string.\nDefaults to whitespace characters.\n\n```javascript\n_.trim(\" foobar \")\n=> \"foobar\"\n\n_.trim(\"_-foobar-_\", \"_-\")\n=> \"foobar\"\n```\n\n\n**ltrim** _.ltrim(string, [characters])\n\nLeft trim. Similar to trim, but only for left side.\n\n\n**rtrim** _.rtrim(string, [characters])\n\nRight trim. Similar to trim, but only for right side.\n\n**truncate** _.truncate(string, length, truncateString)\n\n```javascript\n_('Hello world').truncate(5)\n=> 'Hello...'\n\n_('Hello').truncate(10)\n=> 'Hello'\n```\n\n**prune** _.prune(string, length, pruneString)\n\nElegant version of truncate.\nMakes sure the pruned string does not exceed the original length.\nAvoid half-chopped words when truncating.\n\n```javascript\n_('Hello, world').prune(5)\n=> 'Hello...'\n\n_('Hello, world').prune(8)\n=> 'Hello...'\n\n_('Hello, world').prune(5, ' (read a lot more)')\n=> 'Hello, world' (as adding \"(read a lot more)\" would be longer than the original string)\n\n_('Hello, cruel world').prune(15)\n=> 'Hello, cruel...'\n\n_('Hello').prune(10)\n=> 'Hello'\n```\n\n**words** _.words(str, delimiter=\" \")\n\nSplit string by delimiter (String or RegExp), ' ' by default.\n\n```javascript\n_.words(\"I love you\")\n=> [\"I\",\"love\",\"you\"]\n\n_.words(\"I_love_you\", \"_\")\n=> [\"I\",\"love\",\"you\"]\n\n_.words(\"I-love-you\", /-/)\n=> [\"I\",\"love\",\"you\"]\n```\n\n**sprintf** _.sprintf(string format, *arguments)\n\nC like string formatting.\nCredits goes to [Alexandru Marasteanu][o].\nFor more detailed documentation, see the [original page][o].\n\n[o]: http://www.diveintojavascript.com/projects/sprintf-for-javascript\n\n```javascript\n_.sprintf(\"%.1f\", 1.17)\n\"1.2\"\n```\n\n**pad** _.pad(str, length, [padStr, type])\n\npads the `str` with characters until the total string length is equal to the passed `length` parameter. By default, pads on the **left** with the space char (`\" \"`). `padStr` is truncated to a single character if necessary.\n\n```javascript\n_.pad(\"1\", 8)\n-> \" 1\";\n\n_.pad(\"1\", 8, '0')\n-> \"00000001\";\n\n_.pad(\"1\", 8, '0', 'right')\n-> \"10000000\";\n\n_.pad(\"1\", 8, '0', 'both')\n-> \"00001000\";\n\n_.pad(\"1\", 8, 'bleepblorp', 'both')\n-> \"bbbb1bbb\";\n```\n\n**lpad** _.lpad(str, length, [padStr])\n\nleft-pad a string. Alias for `pad(str, length, padStr, 'left')`\n\n```javascript\n_.lpad(\"1\", 8, '0')\n-> \"00000001\";\n```\n\n**rpad** _.rpad(str, length, [padStr])\n\nright-pad a string. Alias for `pad(str, length, padStr, 'right')`\n\n```javascript\n_.rpad(\"1\", 8, '0')\n-> \"10000000\";\n```\n\n**lrpad** _.lrpad(str, length, [padStr])\n\nleft/right-pad a string. Alias for `pad(str, length, padStr, 'both')`\n\n```javascript\n_.lrpad(\"1\", 8, '0')\n-> \"00001000\";\n```\n\n**center** alias for **lrpad**\n\n**ljust** alias for *rpad*\n\n**rjust** alias for *lpad*\n\n**toNumber** _.toNumber(string, [decimals])\n\nParse string to number. Returns NaN if string can't be parsed to number.\n\n```javascript\n_('2.556').toNumber()\n=> 3\n\n_('2.556').toNumber(1)\n=> 2.6\n```\n\n**strRight** _.strRight(string, pattern)\n\nSearches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strRight('_')\n=> \"is_a_test_string\";\n```\n\n**strRightBack** _.strRightBack(string, pattern)\n\nSearches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strRightBack('_')\n=> \"string\";\n```\n\n**strLeft** _.strLeft(string, pattern)\n\nSearches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strLeft('_')\n=> \"This\";\n```\n\n**strLeftBack** _.strLeftBack(string, pattern)\n\nSearches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strLeftBack('_')\n=> \"This_is_a_test\";\n```\n\n**stripTags**\n\nRemoves all html tags from string.\n\n```javascript\n_('a link').stripTags()\n=> 'a link'\n\n_('a link').stripTags()\n=> 'a linkalert(\"hello world!\")'\n```\n\n**toSentence** _.toSentence(array, [delimiter, lastDelimiter])\n\nJoin an array into a human readable sentence.\n\n```javascript\n_.toSentence(['jQuery', 'Mootools', 'Prototype'])\n=> 'jQuery, Mootools and Prototype';\n\n_.toSentence(['jQuery', 'Mootools', 'Prototype'], ', ', ' unt ')\n=> 'jQuery, Mootools unt Prototype';\n```\n\n**repeat** _.repeat(string, count, [separator])\n\nRepeats a string count times.\n\n```javascript\n_.repeat(\"foo\", 3)\n=> 'foofoofoo';\n\n_.repeat(\"foo\", 3, \"bar\")\n=> 'foobarfoobarfoo'\n```\n\n**slugify** _.slugify(string)\n\nTransform text into a URL slug. Replaces whitespaces, accentuated, and special characters with a dash.\n\n```javascript\n_.slugify(\"Un éléphant à l'orée du bois\")\n=> 'un-elephant-a-loree-du-bois';\n```\n\n***Caution: this function is charset dependent***\n\n## Roadmap ##\n\nAny suggestions or bug reports are welcome. Just email me or more preferably open an issue.\n\n## Changelog ##\n\n### 2.0.0 ###\n\n* Added prune, humanize functions\n* Added _.string (_.str) namespace for Underscore.string library\n* Removed includes function\n\n#### Problems\n\nWe lose two things for `include` and `reverse` methods from `_.string`:\n\n* Calls like `_('foobar').include('bar')` aren't available;\n* Chaining isn't available too.\n\nBut if you need this functionality you can create aliases for conflict functions which will be convenient for you:\n\n```javascript\n_.mixin({\n includeString: _.str.include,\n reverseString: _.str.reverse\n})\n\n// Now wrapper calls and chaining are available.\n_('foobar').chain().reverseString().includeString('rab').value()\n```\n\n#### Standalone Usage\n\nIf you are using Underscore.string without Underscore. You also have `_.string` namespace for it and `_.str` alias\nBut of course you can just reassign `_` variable with `_.string`\n\n```javascript\n_ = _.string\n```\n### 2.2.0 ###\n\n* Capitalize method behavior changed\n* Various perfomance tweaks\n\n### 2.1.1###\n\n* Fixed words method bug\n* Added classify method\n\n### 2.1.0 ###\n\n* AMD support\n* Added toSentence method\n* Added slugify method\n* Lots of speed optimizations\n\n### 2.0.0 ###\n\nFor upgrading to this version you need to mix in Underscore.string library to Underscore object:\n\n```javascript\n_.mixin(_.string.exports());\n```\n\nand all non-conflict Underscore.string functions will be available through Underscore object.\nAlso function `includes` has been removed, you should replace this function by `_.str.include`\nor create alias `_.includes = _.str.include` and all your code will work fine.\n\n### 1.1.6 ###\n\n* Fixed reverse and truncate\n* Added isBlank, stripTags, inlude(alias for includes)\n* Added uglifier compression\n\n### 1.1.5 ###\n\n* Added strRight, strRightBack, strLeft, strLeftBack\n\n### 1.1.4 ###\n\n* Added pad, lpad, rpad, lrpad methods and aliases center, ljust, rjust\n* Integration with Underscore 1.1.6\n\n### 1.1.3 ###\n\n* Added methods: underscored, camelize, dasherize\n* Support newer version of npm\n\n### 1.1.2 ###\n\n* Created functions: lines, chars, words functions\n\n### 1.0.2 ###\n\n* Created integration test suite with underscore.js 1.1.4 (now it's absolutely compatible)\n* Removed 'reverse' function, because this function override underscore.js 'reverse'\n\n## Contribute ##\n\n* Fork & pull request. Don't forget about tests.\n* If you planning add some feature please create issue before.\n\nOtherwise changes will be rejected.\n\n## Contributors list ##\n\n* Esa-Matti Suuronen (),\n* Edward Tsech ,\n* Sasha Koss (),\n* Vladimir Dronnikov ,\n* Pete Kruckenberg (),\n* Paul Chavard (),\n* Ed Finkler ()\n* Pavel Pravosud \n* Anton Lindqvist ()\n\n## Licence ##\n\nThe MIT License\n\nCopyright (c) 2011 Esa-Matti Suuronen esa-matti@suuronen.org\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "readmeFilename": "README.markdown", - "_id": "underscore.string@2.2.1", - "_from": "underscore.string@~2.2.1" -} diff --git a/node_modules/grunt/node_modules/underscore.string/test/run-qunit.js b/node_modules/grunt/node_modules/underscore.string/test/run-qunit.js deleted file mode 100644 index 326658ed740d..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/run-qunit.js +++ /dev/null @@ -1,44 +0,0 @@ -function waitFor(test, complete, timeout) { - var result, start = new Date().getTime() - setInterval(function interval() { - if ((new Date().getTime() - start < timeout) && !result) { - result = test() - } else { - if (!result) { - phantom.exit(1) - } else { - complete() - clearInterval(interval) - } - } - }, 100) -} - - -var page = new WebPage() - -page.onConsoleMessage = function(msg) { - console.log(msg) -} - -page.open(phantom.args[0], function(status) { - waitFor(function() { - return page.evaluate(function(){ - var el = document.getElementById('qunit-testresult') - return el && el.innerText.match('completed') - }) - }, function() { - var failures = page.evaluate(function() { - var el = document.getElementById('qunit-testresult'), - fails = document.getElementsByClassName('fail') - - for (var i = 0; i < fails.length; i++) - console.log(fails[i].innerText) - - console.log(el.innerText) - - return parseInt(el.getElementsByClassName('failed')[0].innerHTML) - }) - phantom.exit(failures > 0 ? 1 : 0) - }, 10000) -}) \ No newline at end of file diff --git a/node_modules/grunt/node_modules/underscore.string/test/speed.js b/node_modules/grunt/node_modules/underscore.string/test/speed.js deleted file mode 100644 index 43464147d9f9..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/speed.js +++ /dev/null @@ -1,138 +0,0 @@ -(function() { - - JSLitmus.test('trimNoNative', function() { - return _.trim(" foobar ", " "); - }); - - JSLitmus.test('trim', function() { - return _.trim(" foobar "); - }); - - JSLitmus.test('trim object-oriented', function() { - return _(" foobar ").trim(); - }); - - JSLitmus.test('trim jQuery', function() { - return jQuery.trim(" foobar "); - }); - - JSLitmus.test('ltrimp', function() { - return _.ltrim(" foobar ", " "); - }); - - JSLitmus.test('rtrimp', function() { - return _.rtrim(" foobar ", " "); - }); - - JSLitmus.test('startsWith', function() { - return _.startsWith("foobar", "foo"); - }); - - JSLitmus.test('endsWith', function() { - return _.endsWith("foobar", "xx"); - }); - - JSLitmus.test('chop', function(){ - return _('whitespace').chop(2); - }); - - JSLitmus.test('count', function(){ - return _('Hello worls').count('l'); - }); - - JSLitmus.test('insert', function() { - return _('Hello ').insert(6, 'world'); - }); - - JSLitmus.test('splice', function() { - return _('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli'); - }); - - JSLitmus.test('succ', function(){ - var let = 'a', alphabet = []; - - for (var i=0; i < 26; i++) { - alphabet.push(let); - let = _(let).succ(); - } - - return alphabet; - }); - - JSLitmus.test('titleize', function(){ - return _('the titleize string method').titleize(); - }); - - JSLitmus.test('truncate', function(){ - return _('Hello world').truncate(5); - }); - - JSLitmus.test('prune', function(){ - return _('Hello world').prune(5); - }); - - JSLitmus.test('isBlank', function(){ - return _('').isBlank(); - }); - - JSLitmus.test('escapeHTML', function(){ - _('
        Blah blah blah
        ').escapeHTML(); - }); - - JSLitmus.test('unescapeHTML', function(){ - _('<div>Blah blah blah</div>').unescapeHTML(); - }); - - JSLitmus.test('reverse', function(){ - _('Hello World').reverse(); - }); - - JSLitmus.test('pad default', function(){ - _('foo').pad(12); - }); - - JSLitmus.test('pad hash left', function(){ - _('foo').pad(12, '#'); - }); - - JSLitmus.test('pad hash right', function(){ - _('foo').pad(12, '#', 'right'); - }); - - JSLitmus.test('pad hash both', function(){ - _('foo').pad(12, '#', 'both'); - }); - - JSLitmus.test('pad hash both longPad', function(){ - _('foo').pad(12, 'f00f00f00', 'both'); - }); - - JSLitmus.test('toNumber', function(){ - _('10.232323').toNumber(2); - }); - - JSLitmus.test('strRight', function(){ - _('aaa_bbb_ccc').strRight('_'); - }); - - JSLitmus.test('strRightBack', function(){ - _('aaa_bbb_ccc').strRightBack('_'); - }); - - JSLitmus.test('strLeft', function(){ - _('aaa_bbb_ccc').strLeft('_'); - }); - - JSLitmus.test('strLeftBack', function(){ - _('aaa_bbb_ccc').strLeftBack('_'); - }); - - JSLitmus.test('join', function(){ - _('separator').join(1, 2, 3, 4, 5, 6, 7, 8, 'foo', 'bar', 'lol', 'wut'); - }); - - JSLitmus.test('slugify', function(){ - _("Un éléphant à l'orée du bois").slugify(); - }); - -})(); diff --git a/node_modules/grunt/node_modules/underscore.string/test/strings.js b/node_modules/grunt/node_modules/underscore.string/test/strings.js deleted file mode 100644 index f700abf1071a..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/strings.js +++ /dev/null @@ -1,438 +0,0 @@ -$(document).ready(function() { - - // Include Underscore.string methods to Underscore namespace - _.mixin(_.str.exports()); - - module("String extensions"); - - test("Strings: trim", function() { - equals(_.trim(123), "123", "Non string"); - equals(_(" foo").trim(), "foo"); - equals(_("foo ").trim(), "foo"); - equals(_(" foo ").trim(), "foo"); - equals(_(" foo ").trim(), "foo"); - equals(_(" foo ", " ").trim(), "foo", "Manually set whitespace"); - - equals(_("ffoo").trim("f"), "oo"); - equals(_("ooff").trim("f"), "oo"); - equals(_("ffooff").trim("f"), "oo"); - - - equals(_("_-foobar-_").trim("_-"), "foobar"); - - equals(_("http://foo/").trim("/"), "http://foo"); - equals(_("c:\\").trim('\\'), "c:"); - - equals(_(123).trim(), '123'); - equals(_(123).trim(3), '12'); - }); - - test("Strings: ltrim", function() { - equals(_(" foo").ltrim(), "foo"); - equals(_(" foo").ltrim(), "foo"); - equals(_("foo ").ltrim(), "foo "); - equals(_(" foo ").ltrim(), "foo "); - - - equals(_("ffoo").ltrim("f"), "oo"); - equals(_("ooff").ltrim("f"), "ooff"); - equals(_("ffooff").ltrim("f"), "ooff"); - - equals(_("_-foobar-_").ltrim("_-"), "foobar-_"); - - equals(_(123).ltrim(1), '23'); - }); - - test("Strings: rtrim", function() { - equals(_("http://foo/").rtrim("/"), "http://foo", 'clean trailing slash'); - equals(_(" foo").rtrim(), " foo"); - equals(_("foo ").rtrim(), "foo"); - equals(_("foo ").rtrim(), "foo"); - equals(_("foo bar ").rtrim(), "foo bar"); - equals(_(" foo ").rtrim(), " foo"); - - equals(_("ffoo").rtrim("f"), "ffoo"); - equals(_("ooff").rtrim("f"), "oo"); - equals(_("ffooff").rtrim("f"), "ffoo"); - - equals(_("_-foobar-_").rtrim("_-"), "_-foobar"); - - equals(_(123).rtrim(3), '12'); - }); - - test("Strings: capitalize", function() { - equals(_("fabio").capitalize(), "Fabio", 'First letter is upper case'); - equals(_.capitalize("fabio"), "Fabio", 'First letter is upper case'); - equals(_.capitalize('FOO'), 'FOO', 'Other letters unchanged'); - equals(_(123).capitalize(), "123", "Non string"); - }); - - test("Strings: join", function() { - equals(_.join("", "foo", "bar"), "foobar", 'basic join'); - equals(_.join("", 1, "foo", 2), "1foo2", 'join numbers and strings'); - equals(_.join(" ","foo", "bar"), "foo bar", 'join with spaces'); - equals(_.join("1", "2", "2"), "212", 'join number strings'); - equals(_.join(1, 2, 2), "212", 'join numbers'); - equals(_(" ").join("foo", "bar"), "foo bar", 'join object oriented'); - }); - - test("Strings: reverse", function() { - equals(_.str.reverse("foo"), "oof" ); - equals(_.str.reverse("foobar"), "raboof" ); - equals(_.str.reverse("foo bar"), "rab oof" ); - equals(_.str.reverse("saippuakauppias"), "saippuakauppias" ); - equals(_.str.reverse(123), "321", "Non string"); - equals(_.str.reverse(123.45), "54.321", "Non string"); - }); - - test("Strings: clean", function() { - equals(_(" foo bar ").clean(), "foo bar"); - equals(_(123).clean(), "123"); - }); - - test("Strings: sprintf", function() { - // Should be very tested function already. Thanks to - // http://www.diveintojavascript.com/projects/sprintf-for-javascript - equals(_.sprintf("Hello %s", "me"), "Hello me", 'basic'); - equals(_("Hello %s").sprintf("me"), "Hello me", 'object'); - equals(_("hello %s").chain().sprintf("me").capitalize().value(), "Hello me", 'Chaining works'); - equals(_.sprintf("%.1f", 1.22222), "1.2", 'round'); - equals(_.sprintf("%.1f", 1.17), "1.2", 'round 2'); - equals(_.sprintf("%(id)d - %(name)s", {id: 824, name: "Hello World"}), "824 - Hello World", 'Named replacements work'); - equals(_.sprintf("%(args[0].id)d - %(args[1].name)s", {args: [{id: 824}, {name: "Hello World"}]}), "824 - Hello World", 'Named replacements with arrays work'); - }); - - - test("Strings: vsprintf", function() { - equals(_.vsprintf("Hello %s", ["me"]), "Hello me", 'basic'); - equals(_("Hello %s").vsprintf(["me"]), "Hello me", 'object'); - equals(_("hello %s").chain().vsprintf(["me"]).capitalize().value(), "Hello me", 'Chaining works'); - equals(_.vsprintf("%.1f", [1.22222]), "1.2", 'round'); - equals(_.vsprintf("%.1f", [1.17]), "1.2", 'round 2'); - equals(_.vsprintf("%(id)d - %(name)s", [{id: 824, name: "Hello World"}]), "824 - Hello World", 'Named replacement works'); - equals(_.vsprintf("%(args[0].id)d - %(args[1].name)s", [{args: [{id: 824}, {name: "Hello World"}]}]), "824 - Hello World", 'Named replacement with arrays works'); - }); - - test("Strings: startsWith", function() { - ok(_("foobar").startsWith("foo"), 'foobar starts with foo'); - ok(!_("oobar").startsWith("foo"), 'oobar does not start with foo'); - ok(_(12345).startsWith(123), '12345 starts with 123'); - ok(!_(2345).startsWith(123), '2345 does not start with 123'); - }); - - test("Strings: endsWith", function() { - ok(_("foobar").endsWith("bar"), 'foobar ends with bar'); - ok(_.endsWith("foobar", "bar"), 'foobar ends with bar'); - ok(_.endsWith("00018-0000062.Plone.sdh264.1a7264e6912a91aa4a81b64dc5517df7b8875994.mp4", "mp4"), 'endsWith .mp4'); - ok(!_("fooba").endsWith("bar"), 'fooba does not end with bar'); - ok(_.endsWith(12345, 45), '12345 ends with 45'); - ok(!_.endsWith(12345, 6), '12345 does not end with 6'); - }); - - test("Strings: include", function() { - ok(_.str.include("foobar", "bar"), 'foobar includes bar'); - ok(!_.str.include("foobar", "buzz"), 'foobar does not includes buzz'); - ok(_.str.include(12345, 34), '12345 includes 34'); - ok(!_.str.contains(12345, 6), '12345 does not includes 6'); - }); - - test('String: chop', function(){ - ok(_('whitespace').chop(2).length === 5, "output ['wh','it','es','pa','ce']"); - ok(_('whitespace').chop(3).length === 4, "output ['whi','tes','pac','e']"); - ok(_('whitespace').chop()[0].length === 10, "output ['whitespace']"); - ok(_(12345).chop(1).length === 5, "output ['1','2','3','4','5']"); - }); - - test('String: clean', function(){ - equals(_.clean(' foo bar '), 'foo bar'); - equals(_.clean(1), '1'); - }); - - test('String: count', function(){ - equals(_('Hello world').count('l'), 3); - equals(_('Hello world').count('Hello'), 1); - equals(_('Hello world').count('foo'), 0); - equals(_('x.xx....x.x').count('x'), 5); - equals(_(12345).count(1), 1); - equals(_(11345).count(1), 2); - }); - - test('String: insert', function(){ - equals(_('Hello ').insert(6, 'Jessy'), 'Hello Jessy'); - equals(_('Hello ').insert(100, 'Jessy'), 'Hello Jessy'); - equals(_(12345).insert(6, 'Jessy'), '12345Jessy'); - }); - - test('String: splice', function(){ - equals(_('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli'), - 'https://edtsech@bitbucket.org/epeli/underscore.strings'); - equals(_.splice(12345, 1, 2, 321), '132145', 'Non strings'); - }); - - test('String: succ', function(){ - equals(_('a').succ(), 'b'); - equals(_('A').succ(), 'B'); - equals(_('+').succ(), ','); - equals(_(1).succ(), '2'); - }); - - test('String: titleize', function(){ - equals(_('the titleize string method').titleize(), 'The Titleize String Method'); - equals(_('the titleize string method').titleize(), 'The Titleize String Method'); - equals(_(123).titleize(), '123'); - }); - - test('String: camelize', function(){ - equals(_('the_camelize_string_method').camelize(), 'theCamelizeStringMethod'); - equals(_('-the-camelize-string-method').camelize(), 'TheCamelizeStringMethod'); - equals(_('the camelize string method').camelize(), 'theCamelizeStringMethod'); - equals(_(' the camelize string method').camelize(), 'theCamelizeStringMethod'); - equals(_('the camelize string method').camelize(), 'theCamelizeStringMethod'); - equals(_(123).camelize(), '123'); - }); - - test('String: underscored', function(){ - equals(_('the-underscored-string-method').underscored(), 'the_underscored_string_method'); - equals(_('theUnderscoredStringMethod').underscored(), 'the_underscored_string_method'); - equals(_('TheUnderscoredStringMethod').underscored(), 'the_underscored_string_method'); - equals(_(' the underscored string method').underscored(), 'the_underscored_string_method'); - equals(_(123).underscored(), '123'); - }); - - test('String: dasherize', function(){ - equals(_('the_dasherize_string_method').dasherize(), 'the-dasherize-string-method'); - equals(_('TheDasherizeStringMethod').dasherize(), '-the-dasherize-string-method'); - equals(_('thisIsATest').dasherize(), 'this-is-a-test'); - equals(_('this Is A Test').dasherize(), 'this-is-a-test'); - equals(_('thisIsATest123').dasherize(), 'this-is-a-test123'); - equals(_('123thisIsATest').dasherize(), '123this-is-a-test'); - equals(_('the dasherize string method').dasherize(), 'the-dasherize-string-method'); - equals(_('the dasherize string method ').dasherize(), 'the-dasherize-string-method'); - equals(_('téléphone').dasherize(), 'téléphone'); - equals(_('foo$bar').dasherize(), 'foo$bar'); - equals(_(123).dasherize(), '123'); - }); - - test('String: camelize', function(){ - equals(_.camelize('-moz-transform'), 'MozTransform'); - equals(_.camelize('webkit-transform'), 'webkitTransform'); - equals(_.camelize('under_scored'), 'underScored'); - equals(_.camelize(' with spaces'), 'withSpaces'); - }); - - test('String: join', function(){ - equals(_.join(1, 2, 3, 4), '21314'); - equals(_.join('|', 'foo', 'bar', 'baz'), 'foo|bar|baz'); - }); - - test('String: classify', function(){ - equals(_.classify(1), '1'); - equals(_('some_class_name').classify(), 'SomeClassName'); - }); - - test('String: humanize', function(){ - equals(_('the_humanize_string_method').humanize(), 'The humanize string method'); - equals(_('ThehumanizeStringMethod').humanize(), 'Thehumanize string method'); - equals(_('the humanize string method').humanize(), 'The humanize string method'); - equals(_('the humanize_id string method_id').humanize(), 'The humanize id string method'); - equals(_('the humanize string method ').humanize(), 'The humanize string method'); - equals(_(' capitalize dash-CamelCase_underscore trim ').humanize(), 'Capitalize dash camel case underscore trim'); - equals(_(123).humanize(), '123'); - }); - - test('String: truncate', function(){ - equals(_('Hello world').truncate(6, 'read more'), 'Hello read more'); - equals(_('Hello world').truncate(5), 'Hello...'); - equals(_('Hello').truncate(10), 'Hello'); - equals(_(1234567890).truncate(5), '12345...'); - }); - - test('String: prune', function(){ - equals(_('Hello, cruel world').prune(6, ' read more'), 'Hello read more'); - equals(_('Hello, world').prune(5, 'read a lot more'), 'Hello, world'); - equals(_('Hello, world').prune(5), 'Hello...'); - equals(_('Hello, world').prune(8), 'Hello...'); - equals(_('Hello, cruel world').prune(15), 'Hello, cruel...'); - equals(_('Hello world').prune(22), 'Hello world'); - equals(_('Привет, жеÑтокий мир').prune(6, ' read more'), 'Привет read more'); - equals(_('Привет, мир').prune(6, 'read a lot more'), 'Привет, мир'); - equals(_('Привет, мир').prune(6), 'Привет...'); - equals(_('Привет, мир').prune(8), 'Привет...'); - equals(_('Привет, жеÑтокий мир').prune(16), 'Привет, жеÑтокий...'); - equals(_('Привет, мир').prune(22), 'Привет, мир'); - equals(_(123).prune(10), '123'); - equals(_(123).prune(1,1), '11'); - }); - - test('String: isBlank', function(){ - ok(_('').isBlank()); - ok(_(' ').isBlank()); - ok(_('\n').isBlank()); - ok(!_('a').isBlank()); - ok(!_('0').isBlank()); - ok(!_(0).isBlank()); - }); - - test('String: escapeHTML', function(){ - equals(_('
        Blah & "blah" & \'blah\'
        ').escapeHTML(), - '<div>Blah & "blah" & 'blah'</div>'); - equals(_('<').escapeHTML(), '&lt;'); - equals(_(5).escapeHTML(), '5'); - // equals(_(undefined).escapeHTML(), ''); - }); - - test('String: unescapeHTML', function(){ - equals(_('<div>Blah & "blah" & 'blah'</div>').unescapeHTML(), - '
        Blah & "blah" & \'blah\'
        '); - equals(_('&lt;').unescapeHTML(), '<'); - equals(_(''').unescapeHTML(), "'"); - equals(_(''').unescapeHTML(), "'"); - equals(_('J').unescapeHTML(), "J"); - equals(_('J').unescapeHTML(), "J"); - equals(_('J').unescapeHTML(), "J"); - equals(_('&_#39;').unescapeHTML(), "&_#39;"); - equals(_(''_;').unescapeHTML(), "'_;"); - equals(_('&#38;').unescapeHTML(), "&"); - equals(_('&amp;').unescapeHTML(), "&"); - equals(_(5).unescapeHTML(), '5'); - // equals(_(undefined).unescapeHTML(), ''); - }); - - test('String: words', function() { - equals(_("I love you!").words().length, 3); - equals(_(" I love you! ").words().length, 3); - equals(_("I_love_you!").words('_').length, 3); - equals(_("I-love-you!").words(/-/).length, 3); - equals(_(123).words().length, 1); - }); - - test('String: chars', function() { - equals(_("Hello").chars().length, 5); - equals(_(123).chars().length, 3); - }); - - test('String: lines', function() { - equals(_("Hello\nWorld").lines().length, 2); - equals(_("Hello World").lines().length, 1); - equals(_(123).lines().length, 1); - }); - - test('String: pad', function() { - equals(_("1").pad(8), ' 1'); - equals(_(1).pad(8), ' 1'); - equals(_("1").pad(8, '0'), '00000001'); - equals(_("1").pad(8, '0', 'left'), '00000001'); - equals(_("1").pad(8, '0', 'right'), '10000000'); - equals(_("1").pad(8, '0', 'both'), '00001000'); - equals(_("foo").pad(8, '0', 'both'), '000foo00'); - equals(_("foo").pad(7, '0', 'both'), '00foo00'); - equals(_("foo").pad(7, '!@$%dofjrofj', 'both'), '!!foo!!'); - }); - - test('String: lpad', function() { - equals(_("1").lpad(8), ' 1'); - equals(_(1).lpad(8), ' 1'); - equals(_("1").lpad(8, '0'), '00000001'); - equals(_("1").lpad(8, '0', 'left'), '00000001'); - }); - - test('String: rpad', function() { - equals(_("1").rpad(8), '1 '); - equals(_(1).lpad(8), ' 1'); - equals(_("1").rpad(8, '0'), '10000000'); - equals(_("foo").rpad(8, '0'), 'foo00000'); - equals(_("foo").rpad(7, '0'), 'foo0000'); - }); - - test('String: lrpad', function() { - equals(_("1").lrpad(8), ' 1 '); - equals(_(1).lrpad(8), ' 1 '); - equals(_("1").lrpad(8, '0'), '00001000'); - equals(_("foo").lrpad(8, '0'), '000foo00'); - equals(_("foo").lrpad(7, '0'), '00foo00'); - equals(_("foo").lrpad(7, '!@$%dofjrofj'), '!!foo!!'); - }); - - test('String: toNumber', function() { - deepEqual(_("not a number").toNumber(), Number.NaN); - equals(_(0).toNumber(), 0); - equals(_("0").toNumber(), 0); - equals(_("0000").toNumber(), 0); - equals(_("2.345").toNumber(), 2); - equals(_("2.345").toNumber(NaN), 2); - equals(_("2.345").toNumber(2), 2.35); - equals(_("2.344").toNumber(2), 2.34); - equals(_("2").toNumber(2), 2.00); - equals(_(2).toNumber(2), 2.00); - equals(_(-2).toNumber(), -2); - equals(_("-2").toNumber(), -2); - }); - - test('String: strRight', function() { - equals(_("This_is_a_test_string").strRight("_"), "is_a_test_string"); - equals(_("This_is_a_test_string").strRight("string"), ""); - equals(_("This_is_a_test_string").strRight(), "This_is_a_test_string"); - equals(_("This_is_a_test_string").strRight(""), "This_is_a_test_string"); - equals(_("This_is_a_test_string").strRight("-"), "This_is_a_test_string"); - equals(_(12345).strRight(2), "345"); - }); - - test('String: strRightBack', function() { - equals(_("This_is_a_test_string").strRightBack("_"), "string"); - equals(_("This_is_a_test_string").strRightBack("string"), ""); - equals(_("This_is_a_test_string").strRightBack(), "This_is_a_test_string"); - equals(_("This_is_a_test_string").strRightBack(""), "This_is_a_test_string"); - equals(_("This_is_a_test_string").strRightBack("-"), "This_is_a_test_string"); - equals(_(12345).strRightBack(2), "345"); - }); - - test('String: strLeft', function() { - equals(_("This_is_a_test_string").strLeft("_"), "This"); - equals(_("This_is_a_test_string").strLeft("This"), ""); - equals(_("This_is_a_test_string").strLeft(), "This_is_a_test_string"); - equals(_("This_is_a_test_string").strLeft(""), "This_is_a_test_string"); - equals(_("This_is_a_test_string").strLeft("-"), "This_is_a_test_string"); - equals(_(123454321).strLeft(3), "12"); - }); - - test('String: strLeftBack', function() { - equals(_("This_is_a_test_string").strLeftBack("_"), "This_is_a_test"); - equals(_("This_is_a_test_string").strLeftBack("This"), ""); - equals(_("This_is_a_test_string").strLeftBack(), "This_is_a_test_string"); - equals(_("This_is_a_test_string").strLeftBack(""), "This_is_a_test_string"); - equals(_("This_is_a_test_string").strLeftBack("-"), "This_is_a_test_string"); - equals(_(123454321).strLeftBack(3), "123454"); - }); - - test('Strings: stripTags', function() { - equals(_('a link').stripTags(), 'a link'); - equals(_('a link - - - - - - - - -

        Underscore.string Test Suite

        -

        -

        -
          -
          -

          Underscore.string Speed Suite

          - -
          - - diff --git a/node_modules/grunt/node_modules/underscore.string/test/test_standalone.html b/node_modules/grunt/node_modules/underscore.string/test/test_standalone.html deleted file mode 100644 index 9854c17115c4..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/test_standalone.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - Underscore.strings Test Suite - - - - - - - - -

          Underscore.string Test Suite

          -

          -

          -
            - - diff --git a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/arrays.js b/node_modules/grunt/node_modules/underscore.string/test/test_underscore/arrays.js deleted file mode 100644 index b3b1ce15e7bb..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/arrays.js +++ /dev/null @@ -1,166 +0,0 @@ -$(document).ready(function() { - - module("Arrays"); - - test("arrays: first", function() { - equals(_.first([1,2,3]), 1, 'can pull out the first element of an array'); - equals(_([1, 2, 3]).first(), 1, 'can perform OO-style "first()"'); - equals(_.first([1,2,3], 0).join(', '), "", 'can pass an index to first'); - equals(_.first([1,2,3], 2).join(', '), '1, 2', 'can pass an index to first'); - equals(_.first([1,2,3], 5).join(', '), '1, 2, 3', 'can pass an index to first'); - var result = (function(){ return _.first(arguments); })(4, 3, 2, 1); - equals(result, 4, 'works on an arguments object.'); - result = _.map([[1,2,3],[1,2,3]], _.first); - equals(result.join(','), '1,1', 'works well with _.map'); - }); - - test("arrays: rest", function() { - var numbers = [1, 2, 3, 4]; - equals(_.rest(numbers).join(", "), "2, 3, 4", 'working rest()'); - equals(_.rest(numbers, 0).join(", "), "1, 2, 3, 4", 'working rest(0)'); - equals(_.rest(numbers, 2).join(', '), '3, 4', 'rest can take an index'); - var result = (function(){ return _(arguments).tail(); })(1, 2, 3, 4); - equals(result.join(', '), '2, 3, 4', 'aliased as tail and works on arguments object'); - result = _.map([[1,2,3],[1,2,3]], _.rest); - equals(_.flatten(result).join(','), '2,3,2,3', 'works well with _.map'); - }); - - test("arrays: initial", function() { - equals(_.initial([1,2,3,4,5]).join(", "), "1, 2, 3, 4", 'working initial()'); - equals(_.initial([1,2,3,4],2).join(", "), "1, 2", 'initial can take an index'); - var result = (function(){ return _(arguments).initial(); })(1, 2, 3, 4); - equals(result.join(", "), "1, 2, 3", 'initial works on arguments object'); - result = _.map([[1,2,3],[1,2,3]], _.initial); - equals(_.flatten(result).join(','), '1,2,1,2', 'initial works with _.map'); - }); - - test("arrays: last", function() { - equals(_.last([1,2,3]), 3, 'can pull out the last element of an array'); - equals(_.last([1,2,3], 0).join(', '), "", 'can pass an index to last'); - equals(_.last([1,2,3], 2).join(', '), '2, 3', 'can pass an index to last'); - equals(_.last([1,2,3], 5).join(', '), '1, 2, 3', 'can pass an index to last'); - var result = (function(){ return _(arguments).last(); })(1, 2, 3, 4); - equals(result, 4, 'works on an arguments object'); - result = _.map([[1,2,3],[1,2,3]], _.last); - equals(result.join(','), '3,3', 'works well with _.map'); - }); - - test("arrays: compact", function() { - equals(_.compact([0, 1, false, 2, false, 3]).length, 3, 'can trim out all falsy values'); - var result = (function(){ return _(arguments).compact().length; })(0, 1, false, 2, false, 3); - equals(result, 3, 'works on an arguments object'); - }); - - test("arrays: flatten", function() { - if (window.JSON) { - var list = [1, [2], [3, [[[4]]]]]; - equals(JSON.stringify(_.flatten(list)), '[1,2,3,4]', 'can flatten nested arrays'); - equals(JSON.stringify(_.flatten(list, true)), '[1,2,3,[[[4]]]]', 'can shallowly flatten nested arrays'); - var result = (function(){ return _.flatten(arguments); })(1, [2], [3, [[[4]]]]); - equals(JSON.stringify(result), '[1,2,3,4]', 'works on an arguments object'); - } - }); - - test("arrays: without", function() { - var list = [1, 2, 1, 0, 3, 1, 4]; - equals(_.without(list, 0, 1).join(', '), '2, 3, 4', 'can remove all instances of an object'); - var result = (function(){ return _.without(arguments, 0, 1); })(1, 2, 1, 0, 3, 1, 4); - equals(result.join(', '), '2, 3, 4', 'works on an arguments object'); - - var list = [{one : 1}, {two : 2}]; - ok(_.without(list, {one : 1}).length == 2, 'uses real object identity for comparisons.'); - ok(_.without(list, list[0]).length == 1, 'ditto.'); - }); - - test("arrays: uniq", function() { - var list = [1, 2, 1, 3, 1, 4]; - equals(_.uniq(list).join(', '), '1, 2, 3, 4', 'can find the unique values of an unsorted array'); - - var list = [1, 1, 1, 2, 2, 3]; - equals(_.uniq(list, true).join(', '), '1, 2, 3', 'can find the unique values of a sorted array faster'); - - var list = [{name:'moe'}, {name:'curly'}, {name:'larry'}, {name:'curly'}]; - var iterator = function(value) { return value.name; }; - equals(_.map(_.uniq(list, false, iterator), iterator).join(', '), 'moe, curly, larry', 'can find the unique values of an array using a custom iterator'); - - var iterator = function(value) { return value +1; }; - var list = [1, 2, 2, 3, 4, 4]; - equals(_.uniq(list, true, iterator).join(', '), '1, 2, 3, 4', 'iterator works with sorted array'); - - var result = (function(){ return _.uniq(arguments); })(1, 2, 1, 3, 1, 4); - equals(result.join(', '), '1, 2, 3, 4', 'works on an arguments object'); - }); - - test("arrays: intersection", function() { - var stooges = ['moe', 'curly', 'larry'], leaders = ['moe', 'groucho']; - equals(_.intersection(stooges, leaders).join(''), 'moe', 'can take the set intersection of two arrays'); - equals(_(stooges).intersection(leaders).join(''), 'moe', 'can perform an OO-style intersection'); - var result = (function(){ return _.intersection(arguments, leaders); })('moe', 'curly', 'larry'); - equals(result.join(''), 'moe', 'works on an arguments object'); - }); - - test("arrays: union", function() { - var result = _.union([1, 2, 3], [2, 30, 1], [1, 40]); - equals(result.join(' '), '1 2 3 30 40', 'takes the union of a list of arrays'); - - var result = _.union([1, 2, 3], [2, 30, 1], [1, 40, [1]]); - equals(result.join(' '), '1 2 3 30 40 1', 'takes the union of a list of nested arrays'); - }); - - test("arrays: difference", function() { - var result = _.difference([1, 2, 3], [2, 30, 40]); - equals(result.join(' '), '1 3', 'takes the difference of two arrays'); - - var result = _.difference([1, 2, 3, 4], [2, 30, 40], [1, 11, 111]); - equals(result.join(' '), '3 4', 'takes the difference of three arrays'); - }); - - test('arrays: zip', function() { - var names = ['moe', 'larry', 'curly'], ages = [30, 40, 50], leaders = [true]; - var stooges = _.zip(names, ages, leaders); - equals(String(stooges), 'moe,30,true,larry,40,,curly,50,', 'zipped together arrays of different lengths'); - }); - - test("arrays: indexOf", function() { - var numbers = [1, 2, 3]; - numbers.indexOf = null; - equals(_.indexOf(numbers, 2), 1, 'can compute indexOf, even without the native function'); - var result = (function(){ return _.indexOf(arguments, 2); })(1, 2, 3); - equals(result, 1, 'works on an arguments object'); - equals(_.indexOf(null, 2), -1, 'handles nulls properly'); - - var numbers = [10, 20, 30, 40, 50], num = 35; - var index = _.indexOf(numbers, num, true); - equals(index, -1, '35 is not in the list'); - - numbers = [10, 20, 30, 40, 50]; num = 40; - index = _.indexOf(numbers, num, true); - equals(index, 3, '40 is in the list'); - - numbers = [1, 40, 40, 40, 40, 40, 40, 40, 50, 60, 70]; num = 40; - index = _.indexOf(numbers, num, true); - equals(index, 1, '40 is in the list'); - }); - - test("arrays: lastIndexOf", function() { - var numbers = [1, 0, 1, 0, 0, 1, 0, 0, 0]; - numbers.lastIndexOf = null; - equals(_.lastIndexOf(numbers, 1), 5, 'can compute lastIndexOf, even without the native function'); - equals(_.lastIndexOf(numbers, 0), 8, 'lastIndexOf the other element'); - var result = (function(){ return _.lastIndexOf(arguments, 1); })(1, 0, 1, 0, 0, 1, 0, 0, 0); - equals(result, 5, 'works on an arguments object'); - equals(_.indexOf(null, 2), -1, 'handles nulls properly'); - }); - - test("arrays: range", function() { - equals(_.range(0).join(''), '', 'range with 0 as a first argument generates an empty array'); - equals(_.range(4).join(' '), '0 1 2 3', 'range with a single positive argument generates an array of elements 0,1,2,...,n-1'); - equals(_.range(5, 8).join(' '), '5 6 7', 'range with two arguments a & b, a<b generates an array of elements a,a+1,a+2,...,b-2,b-1'); - equals(_.range(8, 5).join(''), '', 'range with two arguments a & b, b<a generates an empty array'); - equals(_.range(3, 10, 3).join(' '), '3 6 9', 'range with three arguments a & b & c, c < b-a, a < b generates an array of elements a,a+c,a+2c,...,b - (multiplier of a) < c'); - equals(_.range(3, 10, 15).join(''), '3', 'range with three arguments a & b & c, c > b-a, a < b generates an array with a single element, equal to a'); - equals(_.range(12, 7, -2).join(' '), '12 10 8', 'range with three arguments a & b & c, a > b, c < 0 generates an array of elements a,a-c,a-2c and ends with the number not less than b'); - equals(_.range(0, -10, -1).join(' '), '0 -1 -2 -3 -4 -5 -6 -7 -8 -9', 'final example in the Python docs'); - }); - -}); diff --git a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/chaining.js b/node_modules/grunt/node_modules/underscore.string/test/test_underscore/chaining.js deleted file mode 100644 index 0e3d5f38534e..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/chaining.js +++ /dev/null @@ -1,59 +0,0 @@ -$(document).ready(function() { - - module("Chaining"); - - test("chaining: map/flatten/reduce", function() { - var lyrics = [ - "I'm a lumberjack and I'm okay", - "I sleep all night and I work all day", - "He's a lumberjack and he's okay", - "He sleeps all night and he works all day" - ]; - var counts = _(lyrics).chain() - .map(function(line) { return line.split(''); }) - .flatten() - .reduce(function(hash, l) { - hash[l] = hash[l] || 0; - hash[l]++; - return hash; - }, {}).value(); - ok(counts['a'] == 16 && counts['e'] == 10, 'counted all the letters in the song'); - }); - - test("chaining: select/reject/sortBy", function() { - var numbers = [1,2,3,4,5,6,7,8,9,10]; - numbers = _(numbers).chain().select(function(n) { - return n % 2 == 0; - }).reject(function(n) { - return n % 4 == 0; - }).sortBy(function(n) { - return -n; - }).value(); - equals(numbers.join(', '), "10, 6, 2", "filtered and reversed the numbers"); - }); - - test("chaining: select/reject/sortBy in functional style", function() { - var numbers = [1,2,3,4,5,6,7,8,9,10]; - numbers = _.chain(numbers).select(function(n) { - return n % 2 == 0; - }).reject(function(n) { - return n % 4 == 0; - }).sortBy(function(n) { - return -n; - }).value(); - equals(numbers.join(', '), "10, 6, 2", "filtered and reversed the numbers"); - }); - - test("chaining: reverse/concat/unshift/pop/map", function() { - var numbers = [1,2,3,4,5]; - numbers = _(numbers).chain() - .reverse() - .concat([5, 5, 5]) - .unshift(17) - .pop() - .map(function(n){ return n * 2; }) - .value(); - equals(numbers.join(', '), "34, 10, 8, 6, 4, 2, 10, 10", 'can chain together array functions.'); - }); - -}); diff --git a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/collections.js b/node_modules/grunt/node_modules/underscore.string/test/test_underscore/collections.js deleted file mode 100644 index cff9763ce1a9..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/collections.js +++ /dev/null @@ -1,270 +0,0 @@ -$(document).ready(function() { - - module("Collections"); - - test("collections: each", function() { - _.each([1, 2, 3], function(num, i) { - equals(num, i + 1, 'each iterators provide value and iteration count'); - }); - - var answers = []; - _.each([1, 2, 3], function(num){ answers.push(num * this.multiplier);}, {multiplier : 5}); - equals(answers.join(', '), '5, 10, 15', 'context object property accessed'); - - answers = []; - _.forEach([1, 2, 3], function(num){ answers.push(num); }); - equals(answers.join(', '), '1, 2, 3', 'aliased as "forEach"'); - - answers = []; - var obj = {one : 1, two : 2, three : 3}; - obj.constructor.prototype.four = 4; - _.each(obj, function(value, key){ answers.push(key); }); - equals(answers.join(", "), 'one, two, three', 'iterating over objects works, and ignores the object prototype.'); - delete obj.constructor.prototype.four; - - answer = null; - _.each([1, 2, 3], function(num, index, arr){ if (_.include(arr, num)) answer = true; }); - ok(answer, 'can reference the original collection from inside the iterator'); - - answers = 0; - _.each(null, function(){ ++answers; }); - equals(answers, 0, 'handles a null properly'); - }); - - test('collections: map', function() { - var doubled = _.map([1, 2, 3], function(num){ return num * 2; }); - equals(doubled.join(', '), '2, 4, 6', 'doubled numbers'); - - doubled = _.collect([1, 2, 3], function(num){ return num * 2; }); - equals(doubled.join(', '), '2, 4, 6', 'aliased as "collect"'); - - var tripled = _.map([1, 2, 3], function(num){ return num * this.multiplier; }, {multiplier : 3}); - equals(tripled.join(', '), '3, 6, 9', 'tripled numbers with context'); - - var doubled = _([1, 2, 3]).map(function(num){ return num * 2; }); - equals(doubled.join(', '), '2, 4, 6', 'OO-style doubled numbers'); - - var ids = _.map($('div.underscore-test').children(), function(n){ return n.id; }); - ok(_.include(ids, 'qunit-header'), 'can use collection methods on NodeLists'); - - var ids = _.map(document.images, function(n){ return n.id; }); - ok(ids[0] == 'chart_image', 'can use collection methods on HTMLCollections'); - - var ifnull = _.map(null, function(){}); - ok(_.isArray(ifnull) && ifnull.length === 0, 'handles a null properly'); - - var length = _.map(Array(2), function(v) { return v; }).length; - equals(length, 2, "can preserve a sparse array's length"); - }); - - test('collections: reduce', function() { - var sum = _.reduce([1, 2, 3], function(sum, num){ return sum + num; }, 0); - equals(sum, 6, 'can sum up an array'); - - var context = {multiplier : 3}; - sum = _.reduce([1, 2, 3], function(sum, num){ return sum + num * this.multiplier; }, 0, context); - equals(sum, 18, 'can reduce with a context object'); - - sum = _.inject([1, 2, 3], function(sum, num){ return sum + num; }, 0); - equals(sum, 6, 'aliased as "inject"'); - - sum = _([1, 2, 3]).reduce(function(sum, num){ return sum + num; }, 0); - equals(sum, 6, 'OO-style reduce'); - - var sum = _.reduce([1, 2, 3], function(sum, num){ return sum + num; }); - equals(sum, 6, 'default initial value'); - - var ifnull; - try { - _.reduce(null, function(){}); - } catch (ex) { - ifnull = ex; - } - ok(ifnull instanceof TypeError, 'handles a null (without inital value) properly'); - - ok(_.reduce(null, function(){}, 138) === 138, 'handles a null (with initial value) properly'); - equals(_.reduce([], function(){}, undefined), undefined, 'undefined can be passed as a special case'); - raises(function() { _.reduce([], function(){}); }, TypeError, 'throws an error for empty arrays with no initial value'); - - var sparseArray = []; - sparseArray[0] = 20; - sparseArray[2] = -5; - equals(_.reduce(sparseArray, function(a, b){ return a - b; }), 25, 'initially-sparse arrays with no memo'); - }); - - test('collections: reduceRight', function() { - var list = _.reduceRight(["foo", "bar", "baz"], function(memo, str){ return memo + str; }, ''); - equals(list, 'bazbarfoo', 'can perform right folds'); - - var list = _.foldr(["foo", "bar", "baz"], function(memo, str){ return memo + str; }, ''); - equals(list, 'bazbarfoo', 'aliased as "foldr"'); - - var list = _.foldr(["foo", "bar", "baz"], function(memo, str){ return memo + str; }); - equals(list, 'bazbarfoo', 'default initial value'); - - var ifnull; - try { - _.reduceRight(null, function(){}); - } catch (ex) { - ifnull = ex; - } - ok(ifnull instanceof TypeError, 'handles a null (without inital value) properly'); - - ok(_.reduceRight(null, function(){}, 138) === 138, 'handles a null (with initial value) properly'); - - equals(_.reduceRight([], function(){}, undefined), undefined, 'undefined can be passed as a special case'); - raises(function() { _.reduceRight([], function(){}); }, TypeError, 'throws an error for empty arrays with no initial value'); - - var sparseArray = []; - sparseArray[0] = 20; - sparseArray[2] = -5; - equals(_.reduceRight(sparseArray, function(a, b){ return a - b; }), -25, 'initially-sparse arrays with no memo'); - }); - - test('collections: detect', function() { - var result = _.detect([1, 2, 3], function(num){ return num * 2 == 4; }); - equals(result, 2, 'found the first "2" and broke the loop'); - }); - - test('collections: select', function() { - var evens = _.select([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }); - equals(evens.join(', '), '2, 4, 6', 'selected each even number'); - - evens = _.filter([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }); - equals(evens.join(', '), '2, 4, 6', 'aliased as "filter"'); - }); - - test('collections: reject', function() { - var odds = _.reject([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }); - equals(odds.join(', '), '1, 3, 5', 'rejected each even number'); - }); - - test('collections: all', function() { - ok(_.all([], _.identity), 'the empty set'); - ok(_.all([true, true, true], _.identity), 'all true values'); - ok(!_.all([true, false, true], _.identity), 'one false value'); - ok(_.all([0, 10, 28], function(num){ return num % 2 == 0; }), 'even numbers'); - ok(!_.all([0, 11, 28], function(num){ return num % 2 == 0; }), 'an odd number'); - ok(_.every([true, true, true], _.identity), 'aliased as "every"'); - }); - - test('collections: any', function() { - var nativeSome = Array.prototype.some; - Array.prototype.some = null; - ok(!_.any([]), 'the empty set'); - ok(!_.any([false, false, false]), 'all false values'); - ok(_.any([false, false, true]), 'one true value'); - ok(_.any([null, 0, 'yes', false]), 'a string'); - ok(!_.any([null, 0, '', false]), 'falsy values'); - ok(!_.any([1, 11, 29], function(num){ return num % 2 == 0; }), 'all odd numbers'); - ok(_.any([1, 10, 29], function(num){ return num % 2 == 0; }), 'an even number'); - ok(_.some([false, false, true]), 'aliased as "some"'); - Array.prototype.some = nativeSome; - }); - - test('collections: include', function() { - ok(_.include([1,2,3], 2), 'two is in the array'); - ok(!_.include([1,3,9], 2), 'two is not in the array'); - ok(_.contains({moe:1, larry:3, curly:9}, 3) === true, '_.include on objects checks their values'); - ok(_([1,2,3]).include(2), 'OO-style include'); - }); - - test('collections: invoke', function() { - var list = [[5, 1, 7], [3, 2, 1]]; - var result = _.invoke(list, 'sort'); - equals(result[0].join(', '), '1, 5, 7', 'first array sorted'); - equals(result[1].join(', '), '1, 2, 3', 'second array sorted'); - }); - - test('collections: invoke w/ function reference', function() { - var list = [[5, 1, 7], [3, 2, 1]]; - var result = _.invoke(list, Array.prototype.sort); - equals(result[0].join(', '), '1, 5, 7', 'first array sorted'); - equals(result[1].join(', '), '1, 2, 3', 'second array sorted'); - }); - - // Relevant when using ClojureScript - test('collections: invoke when strings have a call method', function() { - String.prototype.call = function(){return 42;} - var list = [[5, 1, 7], [3, 2, 1]]; - var s = "foo"; - equals(s.call(), 42, "call function exists"); - var result = _.invoke(list, 'sort'); - equals(result[0].join(', '), '1, 5, 7', 'first array sorted'); - equals(result[1].join(', '), '1, 2, 3', 'second array sorted'); - delete String.prototype.call; - equals(s.call, undefined, "call function removed"); - }); - - test('collections: pluck', function() { - var people = [{name : 'moe', age : 30}, {name : 'curly', age : 50}]; - equals(_.pluck(people, 'name').join(', '), 'moe, curly', 'pulls names out of objects'); - }); - - test('collections: max', function() { - equals(3, _.max([1, 2, 3]), 'can perform a regular Math.max'); - - var neg = _.max([1, 2, 3], function(num){ return -num; }); - equals(neg, 1, 'can perform a computation-based max'); - - equals(-Infinity, _.max({}), 'Maximum value of an empty object'); - equals(-Infinity, _.max([]), 'Maximum value of an empty array'); - }); - - test('collections: min', function() { - equals(1, _.min([1, 2, 3]), 'can perform a regular Math.min'); - - var neg = _.min([1, 2, 3], function(num){ return -num; }); - equals(neg, 3, 'can perform a computation-based min'); - - equals(Infinity, _.min({}), 'Minimum value of an empty object'); - equals(Infinity, _.min([]), 'Minimum value of an empty array'); - }); - - test('collections: sortBy', function() { - var people = [{name : 'curly', age : 50}, {name : 'moe', age : 30}]; - people = _.sortBy(people, function(person){ return person.age; }); - equals(_.pluck(people, 'name').join(', '), 'moe, curly', 'stooges sorted by age'); - }); - - test('collections: groupBy', function() { - var parity = _.groupBy([1, 2, 3, 4, 5, 6], function(num){ return num % 2; }); - ok('0' in parity && '1' in parity, 'created a group for each value'); - equals(parity[0].join(', '), '2, 4, 6', 'put each even number in the right group'); - - var list = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"]; - var grouped = _.groupBy(list, 'length'); - equals(grouped['3'].join(' '), 'one two six ten'); - equals(grouped['4'].join(' '), 'four five nine'); - equals(grouped['5'].join(' '), 'three seven eight'); - }); - - test('collections: sortedIndex', function() { - var numbers = [10, 20, 30, 40, 50], num = 35; - var index = _.sortedIndex(numbers, num); - equals(index, 3, '35 should be inserted at index 3'); - }); - - test('collections: shuffle', function() { - var numbers = _.range(10); - var shuffled = _.shuffle(numbers).sort(); - notStrictEqual(numbers, shuffled, 'original object is unmodified'); - equals(shuffled.join(','), numbers.join(','), 'contains the same members before and after shuffle'); - }); - - test('collections: toArray', function() { - ok(!_.isArray(arguments), 'arguments object is not an array'); - ok(_.isArray(_.toArray(arguments)), 'arguments object converted into array'); - var a = [1,2,3]; - ok(_.toArray(a) !== a, 'array is cloned'); - equals(_.toArray(a).join(', '), '1, 2, 3', 'cloned array contains same elements'); - - var numbers = _.toArray({one : 1, two : 2, three : 3}); - equals(numbers.join(', '), '1, 2, 3', 'object flattened into array'); - }); - - test('collections: size', function() { - equals(_.size({one : 1, two : 2, three : 3}), 3, 'can compute the size of an object'); - }); - -}); diff --git a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/functions.js b/node_modules/grunt/node_modules/underscore.string/test/test_underscore/functions.js deleted file mode 100644 index 78721af16350..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/functions.js +++ /dev/null @@ -1,198 +0,0 @@ -$(document).ready(function() { - - module("Functions"); - - test("functions: bind", function() { - var context = {name : 'moe'}; - var func = function(arg) { return "name: " + (this.name || arg); }; - var bound = _.bind(func, context); - equals(bound(), 'name: moe', 'can bind a function to a context'); - - bound = _(func).bind(context); - equals(bound(), 'name: moe', 'can do OO-style binding'); - - bound = _.bind(func, null, 'curly'); - equals(bound(), 'name: curly', 'can bind without specifying a context'); - - func = function(salutation, name) { return salutation + ': ' + name; }; - func = _.bind(func, this, 'hello'); - equals(func('moe'), 'hello: moe', 'the function was partially applied in advance'); - - var func = _.bind(func, this, 'curly'); - equals(func(), 'hello: curly', 'the function was completely applied in advance'); - - var func = function(salutation, firstname, lastname) { return salutation + ': ' + firstname + ' ' + lastname; }; - func = _.bind(func, this, 'hello', 'moe', 'curly'); - equals(func(), 'hello: moe curly', 'the function was partially applied in advance and can accept multiple arguments'); - - func = function(context, message) { equals(this, context, message); }; - _.bind(func, 0, 0, 'can bind a function to `0`')(); - _.bind(func, '', '', 'can bind a function to an empty string')(); - _.bind(func, false, false, 'can bind a function to `false`')(); - - // These tests are only meaningful when using a browser without a native bind function - // To test this with a modern browser, set underscore's nativeBind to undefined - var F = function () { return this; }; - var Boundf = _.bind(F, {hello: "moe curly"}); - equal(new Boundf().hello, undefined, "function should not be bound to the context, to comply with ECMAScript 5"); - equal(Boundf().hello, "moe curly", "When called without the new operator, it's OK to be bound to the context"); - }); - - test("functions: bindAll", function() { - var curly = {name : 'curly'}, moe = { - name : 'moe', - getName : function() { return 'name: ' + this.name; }, - sayHi : function() { return 'hi: ' + this.name; } - }; - curly.getName = moe.getName; - _.bindAll(moe, 'getName', 'sayHi'); - curly.sayHi = moe.sayHi; - equals(curly.getName(), 'name: curly', 'unbound function is bound to current object'); - equals(curly.sayHi(), 'hi: moe', 'bound function is still bound to original object'); - - curly = {name : 'curly'}; - moe = { - name : 'moe', - getName : function() { return 'name: ' + this.name; }, - sayHi : function() { return 'hi: ' + this.name; } - }; - _.bindAll(moe); - curly.sayHi = moe.sayHi; - equals(curly.sayHi(), 'hi: moe', 'calling bindAll with no arguments binds all functions to the object'); - }); - - test("functions: memoize", function() { - var fib = function(n) { - return n < 2 ? n : fib(n - 1) + fib(n - 2); - }; - var fastFib = _.memoize(fib); - equals(fib(10), 55, 'a memoized version of fibonacci produces identical results'); - equals(fastFib(10), 55, 'a memoized version of fibonacci produces identical results'); - - var o = function(str) { - return str; - }; - var fastO = _.memoize(o); - equals(o('toString'), 'toString', 'checks hasOwnProperty'); - equals(fastO('toString'), 'toString', 'checks hasOwnProperty'); - }); - - asyncTest("functions: delay", 2, function() { - var delayed = false; - _.delay(function(){ delayed = true; }, 100); - setTimeout(function(){ ok(!delayed, "didn't delay the function quite yet"); }, 50); - setTimeout(function(){ ok(delayed, 'delayed the function'); start(); }, 150); - }); - - asyncTest("functions: defer", 1, function() { - var deferred = false; - _.defer(function(bool){ deferred = bool; }, true); - _.delay(function(){ ok(deferred, "deferred the function"); start(); }, 50); - }); - - asyncTest("functions: throttle", 2, function() { - var counter = 0; - var incr = function(){ counter++; }; - var throttledIncr = _.throttle(incr, 100); - throttledIncr(); throttledIncr(); throttledIncr(); - setTimeout(throttledIncr, 70); - setTimeout(throttledIncr, 120); - setTimeout(throttledIncr, 140); - setTimeout(throttledIncr, 190); - setTimeout(throttledIncr, 220); - setTimeout(throttledIncr, 240); - _.delay(function(){ ok(counter == 1, "incr was called immediately"); }, 30); - _.delay(function(){ ok(counter == 4, "incr was throttled"); start(); }, 400); - }); - - asyncTest("functions: throttle arguments", 2, function() { - var value = 0; - var update = function(val){ value = val; }; - var throttledUpdate = _.throttle(update, 100); - throttledUpdate(1); throttledUpdate(2); throttledUpdate(3); - setTimeout(function(){ throttledUpdate(4); }, 120); - setTimeout(function(){ throttledUpdate(5); }, 140); - setTimeout(function(){ throttledUpdate(6); }, 250); - _.delay(function(){ equals(value, 1, "updated to latest value"); }, 40); - _.delay(function(){ equals(value, 6, "updated to latest value"); start(); }, 400); - }); - - asyncTest("functions: throttle once", 1, function() { - var counter = 0; - var incr = function(){ counter++; }; - var throttledIncr = _.throttle(incr, 100); - throttledIncr(); - _.delay(function(){ ok(counter == 1, "incr was called once"); start(); }, 220); - }); - - asyncTest("functions: throttle twice", 1, function() { - var counter = 0; - var incr = function(){ counter++; }; - var throttledIncr = _.throttle(incr, 100); - throttledIncr(); throttledIncr(); - _.delay(function(){ ok(counter == 2, "incr was called twice"); start(); }, 220); - }); - - asyncTest("functions: debounce", 1, function() { - var counter = 0; - var incr = function(){ counter++; }; - var debouncedIncr = _.debounce(incr, 50); - debouncedIncr(); debouncedIncr(); debouncedIncr(); - setTimeout(debouncedIncr, 30); - setTimeout(debouncedIncr, 60); - setTimeout(debouncedIncr, 90); - setTimeout(debouncedIncr, 120); - setTimeout(debouncedIncr, 150); - _.delay(function(){ ok(counter == 1, "incr was debounced"); start(); }, 220); - }); - - test("functions: once", function() { - var num = 0; - var increment = _.once(function(){ num++; }); - increment(); - increment(); - equals(num, 1); - }); - - test("functions: wrap", function() { - var greet = function(name){ return "hi: " + name; }; - var backwards = _.wrap(greet, function(func, name){ return func(name) + ' ' + name.split('').reverse().join(''); }); - equals(backwards('moe'), 'hi: moe eom', 'wrapped the saluation function'); - - var inner = function(){ return "Hello "; }; - var obj = {name : "Moe"}; - obj.hi = _.wrap(inner, function(fn){ return fn() + this.name; }); - equals(obj.hi(), "Hello Moe"); - - var noop = function(){}; - var wrapped = _.wrap(noop, function(fn){ return Array.prototype.slice.call(arguments, 0); }); - var ret = wrapped(['whats', 'your'], 'vector', 'victor'); - same(ret, [noop, ['whats', 'your'], 'vector', 'victor']); - }); - - test("functions: compose", function() { - var greet = function(name){ return "hi: " + name; }; - var exclaim = function(sentence){ return sentence + '!'; }; - var composed = _.compose(exclaim, greet); - equals(composed('moe'), 'hi: moe!', 'can compose a function that takes another'); - - composed = _.compose(greet, exclaim); - equals(composed('moe'), 'hi: moe!', 'in this case, the functions are also commutative'); - }); - - test("functions: after", function() { - var testAfter = function(afterAmount, timesCalled) { - var afterCalled = 0; - var after = _.after(afterAmount, function() { - afterCalled++; - }); - while (timesCalled--) after(); - return afterCalled; - }; - - equals(testAfter(5, 5), 1, "after(N) should fire after being called N times"); - equals(testAfter(5, 4), 0, "after(N) should not fire unless called N times"); - equals(testAfter(0, 0), 1, "after(0) should fire immediately"); - }); - -}); diff --git a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/objects.js b/node_modules/grunt/node_modules/underscore.string/test/test_underscore/objects.js deleted file mode 100644 index 0105d608a98f..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/objects.js +++ /dev/null @@ -1,535 +0,0 @@ -$(document).ready(function() { - - module("Objects"); - - test("objects: keys", function() { - var exception = /object/; - equals(_.keys({one : 1, two : 2}).join(', '), 'one, two', 'can extract the keys from an object'); - // the test above is not safe because it relies on for-in enumeration order - var a = []; a[1] = 0; - equals(_.keys(a).join(', '), '1', 'is not fooled by sparse arrays; see issue #95'); - raises(function() { _.keys(null); }, exception, 'throws an error for `null` values'); - raises(function() { _.keys(void 0); }, exception, 'throws an error for `undefined` values'); - raises(function() { _.keys(1); }, exception, 'throws an error for number primitives'); - raises(function() { _.keys('a'); }, exception, 'throws an error for string primitives'); - raises(function() { _.keys(true); }, exception, 'throws an error for boolean primitives'); - }); - - test("objects: values", function() { - equals(_.values({one : 1, two : 2}).join(', '), '1, 2', 'can extract the values from an object'); - }); - - test("objects: functions", function() { - var obj = {a : 'dash', b : _.map, c : (/yo/), d : _.reduce}; - ok(_.isEqual(['b', 'd'], _.functions(obj)), 'can grab the function names of any passed-in object'); - - var Animal = function(){}; - Animal.prototype.run = function(){}; - equals(_.functions(new Animal).join(''), 'run', 'also looks up functions on the prototype'); - }); - - test("objects: extend", function() { - var result; - equals(_.extend({}, {a:'b'}).a, 'b', 'can extend an object with the attributes of another'); - equals(_.extend({a:'x'}, {a:'b'}).a, 'b', 'properties in source override destination'); - equals(_.extend({x:'x'}, {a:'b'}).x, 'x', 'properties not in source dont get overriden'); - result = _.extend({x:'x'}, {a:'a'}, {b:'b'}); - ok(_.isEqual(result, {x:'x', a:'a', b:'b'}), 'can extend from multiple source objects'); - result = _.extend({x:'x'}, {a:'a', x:2}, {a:'b'}); - ok(_.isEqual(result, {x:2, a:'b'}), 'extending from multiple source objects last property trumps'); - result = _.extend({}, {a: void 0, b: null}); - equals(_.keys(result).join(''), 'ab', 'extend does not copy undefined values'); - }); - - test("objects: defaults", function() { - var result; - var options = {zero: 0, one: 1, empty: "", nan: NaN, string: "string"}; - - _.defaults(options, {zero: 1, one: 10, twenty: 20}); - equals(options.zero, 0, 'value exists'); - equals(options.one, 1, 'value exists'); - equals(options.twenty, 20, 'default applied'); - - _.defaults(options, {empty: "full"}, {nan: "nan"}, {word: "word"}, {word: "dog"}); - equals(options.empty, "", 'value exists'); - ok(_.isNaN(options.nan), "NaN isn't overridden"); - equals(options.word, "word", 'new value is added, first one wins'); - }); - - test("objects: clone", function() { - var moe = {name : 'moe', lucky : [13, 27, 34]}; - var clone = _.clone(moe); - equals(clone.name, 'moe', 'the clone as the attributes of the original'); - - clone.name = 'curly'; - ok(clone.name == 'curly' && moe.name == 'moe', 'clones can change shallow attributes without affecting the original'); - - clone.lucky.push(101); - equals(_.last(moe.lucky), 101, 'changes to deep attributes are shared with the original'); - - equals(_.clone(undefined), void 0, 'non objects should not be changed by clone'); - equals(_.clone(1), 1, 'non objects should not be changed by clone'); - equals(_.clone(null), null, 'non objects should not be changed by clone'); - }); - - test("objects: isEqual", function() { - function First() { - this.value = 1; - } - First.prototype.value = 1; - function Second() { - this.value = 1; - } - Second.prototype.value = 2; - - // Basic equality and identity comparisons. - ok(_.isEqual(null, null), "`null` is equal to `null`"); - ok(_.isEqual(), "`undefined` is equal to `undefined`"); - - ok(!_.isEqual(0, -0), "`0` is not equal to `-0`"); - ok(!_.isEqual(-0, 0), "Commutative equality is implemented for `0` and `-0`"); - ok(!_.isEqual(null, undefined), "`null` is not equal to `undefined`"); - ok(!_.isEqual(undefined, null), "Commutative equality is implemented for `null` and `undefined`"); - - // String object and primitive comparisons. - ok(_.isEqual("Curly", "Curly"), "Identical string primitives are equal"); - ok(_.isEqual(new String("Curly"), new String("Curly")), "String objects with identical primitive values are equal"); - ok(_.isEqual(new String("Curly"), "Curly"), "String primitives and their corresponding object wrappers are equal"); - ok(_.isEqual("Curly", new String("Curly")), "Commutative equality is implemented for string objects and primitives"); - - ok(!_.isEqual("Curly", "Larry"), "String primitives with different values are not equal"); - ok(!_.isEqual(new String("Curly"), new String("Larry")), "String objects with different primitive values are not equal"); - ok(!_.isEqual(new String("Curly"), {toString: function(){ return "Curly"; }}), "String objects and objects with a custom `toString` method are not equal"); - - // Number object and primitive comparisons. - ok(_.isEqual(75, 75), "Identical number primitives are equal"); - ok(_.isEqual(new Number(75), new Number(75)), "Number objects with identical primitive values are equal"); - ok(_.isEqual(75, new Number(75)), "Number primitives and their corresponding object wrappers are equal"); - ok(_.isEqual(new Number(75), 75), "Commutative equality is implemented for number objects and primitives"); - ok(!_.isEqual(new Number(0), -0), "`new Number(0)` and `-0` are not equal"); - ok(!_.isEqual(0, new Number(-0)), "Commutative equality is implemented for `new Number(0)` and `-0`"); - - ok(!_.isEqual(new Number(75), new Number(63)), "Number objects with different primitive values are not equal"); - ok(!_.isEqual(new Number(63), {valueOf: function(){ return 63; }}), "Number objects and objects with a `valueOf` method are not equal"); - - // Comparisons involving `NaN`. - ok(_.isEqual(NaN, NaN), "`NaN` is equal to `NaN`"); - ok(!_.isEqual(61, NaN), "A number primitive is not equal to `NaN`"); - ok(!_.isEqual(new Number(79), NaN), "A number object is not equal to `NaN`"); - ok(!_.isEqual(Infinity, NaN), "`Infinity` is not equal to `NaN`"); - - // Boolean object and primitive comparisons. - ok(_.isEqual(true, true), "Identical boolean primitives are equal"); - ok(_.isEqual(new Boolean, new Boolean), "Boolean objects with identical primitive values are equal"); - ok(_.isEqual(true, new Boolean(true)), "Boolean primitives and their corresponding object wrappers are equal"); - ok(_.isEqual(new Boolean(true), true), "Commutative equality is implemented for booleans"); - ok(!_.isEqual(new Boolean(true), new Boolean), "Boolean objects with different primitive values are not equal"); - - // Common type coercions. - ok(!_.isEqual(true, new Boolean(false)), "Boolean objects are not equal to the boolean primitive `true`"); - ok(!_.isEqual("75", 75), "String and number primitives with like values are not equal"); - ok(!_.isEqual(new Number(63), new String(63)), "String and number objects with like values are not equal"); - ok(!_.isEqual(75, "75"), "Commutative equality is implemented for like string and number values"); - ok(!_.isEqual(0, ""), "Number and string primitives with like values are not equal"); - ok(!_.isEqual(1, true), "Number and boolean primitives with like values are not equal"); - ok(!_.isEqual(new Boolean(false), new Number(0)), "Boolean and number objects with like values are not equal"); - ok(!_.isEqual(false, new String("")), "Boolean primitives and string objects with like values are not equal"); - ok(!_.isEqual(12564504e5, new Date(2009, 9, 25)), "Dates and their corresponding numeric primitive values are not equal"); - - // Dates. - ok(_.isEqual(new Date(2009, 9, 25), new Date(2009, 9, 25)), "Date objects referencing identical times are equal"); - ok(!_.isEqual(new Date(2009, 9, 25), new Date(2009, 11, 13)), "Date objects referencing different times are not equal"); - ok(!_.isEqual(new Date(2009, 11, 13), { - getTime: function(){ - return 12606876e5; - } - }), "Date objects and objects with a `getTime` method are not equal"); - ok(!_.isEqual(new Date("Curly"), new Date("Curly")), "Invalid dates are not equal"); - - // Functions. - ok(!_.isEqual(First, Second), "Different functions with identical bodies and source code representations are not equal"); - - // RegExps. - ok(_.isEqual(/(?:)/gim, /(?:)/gim), "RegExps with equivalent patterns and flags are equal"); - ok(!_.isEqual(/(?:)/g, /(?:)/gi), "RegExps with equivalent patterns and different flags are not equal"); - ok(!_.isEqual(/Moe/gim, /Curly/gim), "RegExps with different patterns and equivalent flags are not equal"); - ok(!_.isEqual(/(?:)/gi, /(?:)/g), "Commutative equality is implemented for RegExps"); - ok(!_.isEqual(/Curly/g, {source: "Larry", global: true, ignoreCase: false, multiline: false}), "RegExps and RegExp-like objects are not equal"); - - // Empty arrays, array-like objects, and object literals. - ok(_.isEqual({}, {}), "Empty object literals are equal"); - ok(_.isEqual([], []), "Empty array literals are equal"); - ok(_.isEqual([{}], [{}]), "Empty nested arrays and objects are equal"); - ok(!_.isEqual({length: 0}, []), "Array-like objects and arrays are not equal."); - ok(!_.isEqual([], {length: 0}), "Commutative equality is implemented for array-like objects"); - - ok(!_.isEqual({}, []), "Object literals and array literals are not equal"); - ok(!_.isEqual([], {}), "Commutative equality is implemented for objects and arrays"); - - // Arrays with primitive and object values. - ok(_.isEqual([1, "Larry", true], [1, "Larry", true]), "Arrays containing identical primitives are equal"); - ok(_.isEqual([/Moe/g, new Date(2009, 9, 25)], [/Moe/g, new Date(2009, 9, 25)]), "Arrays containing equivalent elements are equal"); - - // Multi-dimensional arrays. - var a = [new Number(47), false, "Larry", /Moe/, new Date(2009, 11, 13), ['running', 'biking', new String('programming')], {a: 47}]; - var b = [new Number(47), false, "Larry", /Moe/, new Date(2009, 11, 13), ['running', 'biking', new String('programming')], {a: 47}]; - ok(_.isEqual(a, b), "Arrays containing nested arrays and objects are recursively compared"); - - // Overwrite the methods defined in ES 5.1 section 15.4.4. - a.forEach = a.map = a.filter = a.every = a.indexOf = a.lastIndexOf = a.some = a.reduce = a.reduceRight = null; - b.join = b.pop = b.reverse = b.shift = b.slice = b.splice = b.concat = b.sort = b.unshift = null; - - // Array elements and properties. - ok(_.isEqual(a, b), "Arrays containing equivalent elements and different non-numeric properties are equal"); - a.push("White Rocks"); - ok(!_.isEqual(a, b), "Arrays of different lengths are not equal"); - a.push("East Boulder"); - b.push("Gunbarrel Ranch", "Teller Farm"); - ok(!_.isEqual(a, b), "Arrays of identical lengths containing different elements are not equal"); - - // Sparse arrays. - ok(_.isEqual(Array(3), Array(3)), "Sparse arrays of identical lengths are equal"); - ok(!_.isEqual(Array(3), Array(6)), "Sparse arrays of different lengths are not equal when both are empty"); - - // According to the Microsoft deviations spec, section 2.1.26, JScript 5.x treats `undefined` - // elements in arrays as elisions. Thus, sparse arrays and dense arrays containing `undefined` - // values are equivalent. - if (0 in [undefined]) { - ok(!_.isEqual(Array(3), [undefined, undefined, undefined]), "Sparse and dense arrays are not equal"); - ok(!_.isEqual([undefined, undefined, undefined], Array(3)), "Commutative equality is implemented for sparse and dense arrays"); - } - - // Simple objects. - ok(_.isEqual({a: "Curly", b: 1, c: true}, {a: "Curly", b: 1, c: true}), "Objects containing identical primitives are equal"); - ok(_.isEqual({a: /Curly/g, b: new Date(2009, 11, 13)}, {a: /Curly/g, b: new Date(2009, 11, 13)}), "Objects containing equivalent members are equal"); - ok(!_.isEqual({a: 63, b: 75}, {a: 61, b: 55}), "Objects of identical sizes with different values are not equal"); - ok(!_.isEqual({a: 63, b: 75}, {a: 61, c: 55}), "Objects of identical sizes with different property names are not equal"); - ok(!_.isEqual({a: 1, b: 2}, {a: 1}), "Objects of different sizes are not equal"); - ok(!_.isEqual({a: 1}, {a: 1, b: 2}), "Commutative equality is implemented for objects"); - ok(!_.isEqual({x: 1, y: undefined}, {x: 1, z: 2}), "Objects with identical keys and different values are not equivalent"); - - // `A` contains nested objects and arrays. - a = { - name: new String("Moe Howard"), - age: new Number(77), - stooge: true, - hobbies: ["acting"], - film: { - name: "Sing a Song of Six Pants", - release: new Date(1947, 9, 30), - stars: [new String("Larry Fine"), "Shemp Howard"], - minutes: new Number(16), - seconds: 54 - } - }; - - // `B` contains equivalent nested objects and arrays. - b = { - name: new String("Moe Howard"), - age: new Number(77), - stooge: true, - hobbies: ["acting"], - film: { - name: "Sing a Song of Six Pants", - release: new Date(1947, 9, 30), - stars: [new String("Larry Fine"), "Shemp Howard"], - minutes: new Number(16), - seconds: 54 - } - }; - ok(_.isEqual(a, b), "Objects with nested equivalent members are recursively compared"); - - // Instances. - ok(_.isEqual(new First, new First), "Object instances are equal"); - ok(!_.isEqual(new First, new Second), "Objects with different constructors and identical own properties are not equal"); - ok(!_.isEqual({value: 1}, new First), "Object instances and objects sharing equivalent properties are not equal"); - ok(!_.isEqual({value: 2}, new Second), "The prototype chain of objects should not be examined"); - - // Circular Arrays. - (a = []).push(a); - (b = []).push(b); - ok(_.isEqual(a, b), "Arrays containing circular references are equal"); - a.push(new String("Larry")); - b.push(new String("Larry")); - ok(_.isEqual(a, b), "Arrays containing circular references and equivalent properties are equal"); - a.push("Shemp"); - b.push("Curly"); - ok(!_.isEqual(a, b), "Arrays containing circular references and different properties are not equal"); - - // Circular Objects. - a = {abc: null}; - b = {abc: null}; - a.abc = a; - b.abc = b; - ok(_.isEqual(a, b), "Objects containing circular references are equal"); - a.def = 75; - b.def = 75; - ok(_.isEqual(a, b), "Objects containing circular references and equivalent properties are equal"); - a.def = new Number(75); - b.def = new Number(63); - ok(!_.isEqual(a, b), "Objects containing circular references and different properties are not equal"); - - // Cyclic Structures. - a = [{abc: null}]; - b = [{abc: null}]; - (a[0].abc = a).push(a); - (b[0].abc = b).push(b); - ok(_.isEqual(a, b), "Cyclic structures are equal"); - a[0].def = "Larry"; - b[0].def = "Larry"; - ok(_.isEqual(a, b), "Cyclic structures containing equivalent properties are equal"); - a[0].def = new String("Larry"); - b[0].def = new String("Curly"); - ok(!_.isEqual(a, b), "Cyclic structures containing different properties are not equal"); - - // Complex Circular References. - a = {foo: {b: {foo: {c: {foo: null}}}}}; - b = {foo: {b: {foo: {c: {foo: null}}}}}; - a.foo.b.foo.c.foo = a; - b.foo.b.foo.c.foo = b; - ok(_.isEqual(a, b), "Cyclic structures with nested and identically-named properties are equal"); - - // Chaining. - ok(!_.isEqual(_({x: 1, y: undefined}).chain(), _({x: 1, z: 2}).chain()), 'Chained objects containing different values are not equal'); - equals(_({x: 1, y: 2}).chain().isEqual(_({x: 1, y: 2}).chain()).value(), true, '`isEqual` can be chained'); - - // Custom `isEqual` methods. - var isEqualObj = {isEqual: function (o) { return o.isEqual == this.isEqual; }, unique: {}}; - var isEqualObjClone = {isEqual: isEqualObj.isEqual, unique: {}}; - - ok(_.isEqual(isEqualObj, isEqualObjClone), 'Both objects implement identical `isEqual` methods'); - ok(_.isEqual(isEqualObjClone, isEqualObj), 'Commutative equality is implemented for objects with custom `isEqual` methods'); - ok(!_.isEqual(isEqualObj, {}), 'Objects that do not implement equivalent `isEqual` methods are not equal'); - ok(!_.isEqual({}, isEqualObj), 'Commutative equality is implemented for objects with different `isEqual` methods'); - - // Custom `isEqual` methods - comparing different types - LocalizedString = (function() { - function LocalizedString(id) { this.id = id; this.string = (this.id===10)? 'Bonjour': ''; } - LocalizedString.prototype.isEqual = function(that) { - if (_.isString(that)) return this.string == that; - else if (that instanceof LocalizedString) return this.id == that.id; - return false; - }; - return LocalizedString; - })(); - var localized_string1 = new LocalizedString(10), localized_string2 = new LocalizedString(10), localized_string3 = new LocalizedString(11); - ok(_.isEqual(localized_string1, localized_string2), 'comparing same typed instances with same ids'); - ok(!_.isEqual(localized_string1, localized_string3), 'comparing same typed instances with different ids'); - ok(_.isEqual(localized_string1, 'Bonjour'), 'comparing different typed instances with same values'); - ok(_.isEqual('Bonjour', localized_string1), 'comparing different typed instances with same values'); - ok(!_.isEqual('Bonjour', localized_string3), 'comparing two localized strings with different ids'); - ok(!_.isEqual(localized_string1, 'Au revoir'), 'comparing different typed instances with different values'); - ok(!_.isEqual('Au revoir', localized_string1), 'comparing different typed instances with different values'); - - // Custom `isEqual` methods - comparing with serialized data - Date.prototype.toJSON = function() { - return { - _type:'Date', - year:this.getUTCFullYear(), - month:this.getUTCMonth(), - day:this.getUTCDate(), - hours:this.getUTCHours(), - minutes:this.getUTCMinutes(), - seconds:this.getUTCSeconds() - }; - }; - Date.prototype.isEqual = function(that) { - var this_date_components = this.toJSON(); - var that_date_components = (that instanceof Date) ? that.toJSON() : that; - delete this_date_components['_type']; delete that_date_components['_type'] - return _.isEqual(this_date_components, that_date_components); - }; - - var date = new Date(); - var date_json = { - _type:'Date', - year:date.getUTCFullYear(), - month:date.getUTCMonth(), - day:date.getUTCDate(), - hours:date.getUTCHours(), - minutes:date.getUTCMinutes(), - seconds:date.getUTCSeconds() - }; - - ok(_.isEqual(date_json, date), 'serialized date matches date'); - ok(_.isEqual(date, date_json), 'date matches serialized date'); - }); - - test("objects: isEmpty", function() { - ok(!_([1]).isEmpty(), '[1] is not empty'); - ok(_.isEmpty([]), '[] is empty'); - ok(!_.isEmpty({one : 1}), '{one : 1} is not empty'); - ok(_.isEmpty({}), '{} is empty'); - ok(_.isEmpty(new RegExp('')), 'objects with prototype properties are empty'); - ok(_.isEmpty(null), 'null is empty'); - ok(_.isEmpty(), 'undefined is empty'); - ok(_.isEmpty(''), 'the empty string is empty'); - ok(!_.isEmpty('moe'), 'but other strings are not'); - - var obj = {one : 1}; - delete obj.one; - ok(_.isEmpty(obj), 'deleting all the keys from an object empties it'); - }); - - // Setup remote variables for iFrame tests. - var iframe = document.createElement('iframe'); - jQuery(iframe).appendTo(document.body); - var iDoc = iframe.contentDocument || iframe.contentWindow.document; - iDoc.write( - "" - ); - iDoc.close(); - - test("objects: isElement", function() { - ok(!_.isElement('div'), 'strings are not dom elements'); - ok(_.isElement($('html')[0]), 'the html tag is a DOM element'); - ok(_.isElement(iElement), 'even from another frame'); - }); - - test("objects: isArguments", function() { - var args = (function(){ return arguments; })(1, 2, 3); - ok(!_.isArguments('string'), 'a string is not an arguments object'); - ok(!_.isArguments(_.isArguments), 'a function is not an arguments object'); - ok(_.isArguments(args), 'but the arguments object is an arguments object'); - ok(!_.isArguments(_.toArray(args)), 'but not when it\'s converted into an array'); - ok(!_.isArguments([1,2,3]), 'and not vanilla arrays.'); - ok(_.isArguments(iArguments), 'even from another frame'); - }); - - test("objects: isObject", function() { - ok(_.isObject(arguments), 'the arguments object is object'); - ok(_.isObject([1, 2, 3]), 'and arrays'); - ok(_.isObject($('html')[0]), 'and DOM element'); - ok(_.isObject(iElement), 'even from another frame'); - ok(_.isObject(function () {}), 'and functions'); - ok(_.isObject(iFunction), 'even from another frame'); - ok(!_.isObject(null), 'but not null'); - ok(!_.isObject(undefined), 'and not undefined'); - ok(!_.isObject('string'), 'and not string'); - ok(!_.isObject(12), 'and not number'); - ok(!_.isObject(true), 'and not boolean'); - ok(_.isObject(new String('string')), 'but new String()'); - }); - - test("objects: isArray", function() { - ok(!_.isArray(arguments), 'the arguments object is not an array'); - ok(_.isArray([1, 2, 3]), 'but arrays are'); - ok(_.isArray(iArray), 'even from another frame'); - }); - - test("objects: isString", function() { - ok(!_.isString(document.body), 'the document body is not a string'); - ok(_.isString([1, 2, 3].join(', ')), 'but strings are'); - ok(_.isString(iString), 'even from another frame'); - }); - - test("objects: isNumber", function() { - ok(!_.isNumber('string'), 'a string is not a number'); - ok(!_.isNumber(arguments), 'the arguments object is not a number'); - ok(!_.isNumber(undefined), 'undefined is not a number'); - ok(_.isNumber(3 * 4 - 7 / 10), 'but numbers are'); - ok(_.isNumber(NaN), 'NaN *is* a number'); - ok(_.isNumber(Infinity), 'Infinity is a number'); - ok(_.isNumber(iNumber), 'even from another frame'); - ok(!_.isNumber('1'), 'numeric strings are not numbers'); - }); - - test("objects: isBoolean", function() { - ok(!_.isBoolean(2), 'a number is not a boolean'); - ok(!_.isBoolean("string"), 'a string is not a boolean'); - ok(!_.isBoolean("false"), 'the string "false" is not a boolean'); - ok(!_.isBoolean("true"), 'the string "true" is not a boolean'); - ok(!_.isBoolean(arguments), 'the arguments object is not a boolean'); - ok(!_.isBoolean(undefined), 'undefined is not a boolean'); - ok(!_.isBoolean(NaN), 'NaN is not a boolean'); - ok(!_.isBoolean(null), 'null is not a boolean'); - ok(_.isBoolean(true), 'but true is'); - ok(_.isBoolean(false), 'and so is false'); - ok(_.isBoolean(iBoolean), 'even from another frame'); - }); - - test("objects: isFunction", function() { - ok(!_.isFunction([1, 2, 3]), 'arrays are not functions'); - ok(!_.isFunction('moe'), 'strings are not functions'); - ok(_.isFunction(_.isFunction), 'but functions are'); - ok(_.isFunction(iFunction), 'even from another frame'); - }); - - test("objects: isDate", function() { - ok(!_.isDate(100), 'numbers are not dates'); - ok(!_.isDate({}), 'objects are not dates'); - ok(_.isDate(new Date()), 'but dates are'); - ok(_.isDate(iDate), 'even from another frame'); - }); - - test("objects: isRegExp", function() { - ok(!_.isRegExp(_.identity), 'functions are not RegExps'); - ok(_.isRegExp(/identity/), 'but RegExps are'); - ok(_.isRegExp(iRegExp), 'even from another frame'); - }); - - test("objects: isNaN", function() { - ok(!_.isNaN(undefined), 'undefined is not NaN'); - ok(!_.isNaN(null), 'null is not NaN'); - ok(!_.isNaN(0), '0 is not NaN'); - ok(_.isNaN(NaN), 'but NaN is'); - ok(_.isNaN(iNaN), 'even from another frame'); - }); - - test("objects: isNull", function() { - ok(!_.isNull(undefined), 'undefined is not null'); - ok(!_.isNull(NaN), 'NaN is not null'); - ok(_.isNull(null), 'but null is'); - ok(_.isNull(iNull), 'even from another frame'); - }); - - test("objects: isUndefined", function() { - ok(!_.isUndefined(1), 'numbers are defined'); - ok(!_.isUndefined(null), 'null is defined'); - ok(!_.isUndefined(false), 'false is defined'); - ok(!_.isUndefined(NaN), 'NaN is defined'); - ok(_.isUndefined(), 'nothing is undefined'); - ok(_.isUndefined(undefined), 'undefined is undefined'); - ok(_.isUndefined(iUndefined), 'even from another frame'); - }); - - if (window.ActiveXObject) { - test("objects: IE host objects", function() { - var xml = new ActiveXObject("Msxml2.DOMDocument.3.0"); - ok(!_.isNumber(xml)); - ok(!_.isBoolean(xml)); - ok(!_.isNaN(xml)); - ok(!_.isFunction(xml)); - ok(!_.isNull(xml)); - ok(!_.isUndefined(xml)); - }); - } - - test("objects: tap", function() { - var intercepted = null; - var interceptor = function(obj) { intercepted = obj; }; - var returned = _.tap(1, interceptor); - equals(intercepted, 1, "passes tapped object to interceptor"); - equals(returned, 1, "returns tapped object"); - - returned = _([1,2,3]).chain(). - map(function(n){ return n * 2; }). - max(). - tap(interceptor). - value(); - ok(returned == 6 && intercepted == 6, 'can use tapped objects in a chain'); - }); -}); diff --git a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/speed.js b/node_modules/grunt/node_modules/underscore.string/test/test_underscore/speed.js deleted file mode 100644 index 86663a23782a..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/speed.js +++ /dev/null @@ -1,70 +0,0 @@ -(function() { - - var numbers = []; - for (var i=0; i<1000; i++) numbers.push(i); - var objects = _.map(numbers, function(n){ return {num : n}; }); - var randomized = _.sortBy(numbers, function(){ return Math.random(); }); - - JSLitmus.test('_.each()', function() { - var timesTwo = []; - _.each(numbers, function(num){ timesTwo.push(num * 2); }); - return timesTwo; - }); - - JSLitmus.test('_(list).each()', function() { - var timesTwo = []; - _(numbers).each(function(num){ timesTwo.push(num * 2); }); - return timesTwo; - }); - - JSLitmus.test('jQuery.each()', function() { - var timesTwo = []; - jQuery.each(numbers, function(){ timesTwo.push(this * 2); }); - return timesTwo; - }); - - JSLitmus.test('_.map()', function() { - return _.map(objects, function(obj){ return obj.num; }); - }); - - JSLitmus.test('jQuery.map()', function() { - return jQuery.map(objects, function(obj){ return obj.num; }); - }); - - JSLitmus.test('_.pluck()', function() { - return _.pluck(objects, 'num'); - }); - - JSLitmus.test('_.uniq()', function() { - return _.uniq(randomized); - }); - - JSLitmus.test('_.uniq() (sorted)', function() { - return _.uniq(numbers, true); - }); - - JSLitmus.test('_.sortBy()', function() { - return _.sortBy(numbers, function(num){ return -num; }); - }); - - JSLitmus.test('_.isEqual()', function() { - return _.isEqual(numbers, randomized); - }); - - JSLitmus.test('_.keys()', function() { - return _.keys(objects); - }); - - JSLitmus.test('_.values()', function() { - return _.values(objects); - }); - - JSLitmus.test('_.intersect()', function() { - return _.intersect(numbers, randomized); - }); - - JSLitmus.test('_.range()', function() { - return _.range(1000); - }); - -})(); \ No newline at end of file diff --git a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp.js b/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp.js deleted file mode 100644 index 68c39dc57a96..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp.js +++ /dev/null @@ -1,27 +0,0 @@ -(function() { - - var func = function(){}; - var date = new Date(); - var str = "a string"; - var numbers = []; - for (var i=0; i<1000; i++) numbers.push(i); - var objects = _.map(numbers, function(n){ return {num : n}; }); - var randomized = _.sortBy(numbers, function(){ return Math.random(); }); - - JSLitmus.test('_.isNumber', function() { - return _.isNumber(1000) - }); - - JSLitmus.test('_.newIsNumber', function() { - return _.newIsNumber(1000) - }); - - JSLitmus.test('_.isNumber(NaN)', function() { - return _.isNumber(NaN) - }); - - JSLitmus.test('_.newIsNumber(NaN)', function() { - return _.newIsNumber(NaN) - }); - -})(); \ No newline at end of file diff --git a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp_tests.html b/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp_tests.html deleted file mode 100644 index bd34f9dd7c10..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp_tests.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - Underscore Temporary Tests - - - - - - - -

            Underscore Temporary Tests

            -

            - A page for temporary speed tests, used for developing faster implementations - of existing Underscore methods. -

            -
            - - diff --git a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/test.html b/node_modules/grunt/node_modules/underscore.string/test/test_underscore/test.html deleted file mode 100644 index 77f2f3a22e47..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/test.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - Underscore Test Suite - - - - - - - - - - - - - - - -
            -

            Underscore Test Suite

            -

            -

            -
              -
              -

              Underscore Speed Suite

              -

              - A representative sample of the functions are benchmarked here, to provide - a sense of how fast they might run in different browsers. - Each iteration runs on an array of 1000 elements.

              - For example, the 'intersect' test measures the number of times you can - find the intersection of two thousand-element arrays in one second. -

              -
              - - -
              - - diff --git a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/utility.js b/node_modules/grunt/node_modules/underscore.string/test/test_underscore/utility.js deleted file mode 100644 index 7bc5cb44b232..000000000000 --- a/node_modules/grunt/node_modules/underscore.string/test/test_underscore/utility.js +++ /dev/null @@ -1,155 +0,0 @@ -$(document).ready(function() { - - module("Utility"); - - test("utility: noConflict", function() { - var underscore = _.noConflict(); - ok(underscore.isUndefined(_), "The '_' variable has been returned to its previous state."); - var intersection = underscore.intersect([-1, 0, 1, 2], [1, 2, 3, 4]); - equals(intersection.join(', '), '1, 2', 'but the intersection function still works'); - window._ = underscore; - }); - - test("utility: identity", function() { - var moe = {name : 'moe'}; - equals(_.identity(moe), moe, 'moe is the same as his identity'); - }); - - test("utility: uniqueId", function() { - var ids = [], i = 0; - while(i++ < 100) ids.push(_.uniqueId()); - equals(_.uniq(ids).length, ids.length, 'can generate a globally-unique stream of ids'); - }); - - test("utility: times", function() { - var vals = []; - _.times(3, function (i) { vals.push(i); }); - ok(_.isEqual(vals, [0,1,2]), "is 0 indexed"); - // - vals = []; - _(3).times(function (i) { vals.push(i); }); - ok(_.isEqual(vals, [0,1,2]), "works as a wrapper"); - }); - - test("utility: mixin", function() { - _.mixin({ - myReverse: function(string) { - return string.split('').reverse().join(''); - } - }); - equals(_.myReverse('panacea'), 'aecanap', 'mixed in a function to _'); - equals(_('champ').myReverse(), 'pmahc', 'mixed in a function to the OOP wrapper'); - }); - - test("utility: _.escape", function() { - equals(_.escape("Curly & Moe"), "Curly & Moe"); - equals(_.escape("Curly & Moe"), "Curly &amp; Moe"); - }); - - test("utility: template", function() { - var basicTemplate = _.template("<%= thing %> is gettin' on my noives!"); - var result = basicTemplate({thing : 'This'}); - equals(result, "This is gettin' on my noives!", 'can do basic attribute interpolation'); - - var sansSemicolonTemplate = _.template("A <% this %> B"); - equals(sansSemicolonTemplate(), "A B"); - - var backslashTemplate = _.template("<%= thing %> is \\ridanculous"); - equals(backslashTemplate({thing: 'This'}), "This is \\ridanculous"); - - var escapeTemplate = _.template('<%= a ? "checked=\\"checked\\"" : "" %>'); - equals(escapeTemplate({a: true}), 'checked="checked"', 'can handle slash escapes in interpolations.'); - - var fancyTemplate = _.template("
                <% \ - for (key in people) { \ - %>
              • <%= people[key] %>
              • <% } %>
              "); - result = fancyTemplate({people : {moe : "Moe", larry : "Larry", curly : "Curly"}}); - equals(result, "
              • Moe
              • Larry
              • Curly
              ", 'can run arbitrary javascript in templates'); - - var escapedCharsInJavascriptTemplate = _.template("
                <% _.each(numbers.split('\\n'), function(item) { %>
              • <%= item %>
              • <% }) %>
              "); - result = escapedCharsInJavascriptTemplate({numbers: "one\ntwo\nthree\nfour"}); - equals(result, "
              • one
              • two
              • three
              • four
              ", 'Can use escaped characters (e.g. \\n) in Javascript'); - - var namespaceCollisionTemplate = _.template("<%= pageCount %> <%= thumbnails[pageCount] %> <% _.each(thumbnails, function(p) { %>
              \">
              <% }); %>"); - result = namespaceCollisionTemplate({ - pageCount: 3, - thumbnails: { - 1: "p1-thumbnail.gif", - 2: "p2-thumbnail.gif", - 3: "p3-thumbnail.gif" - } - }); - equals(result, "3 p3-thumbnail.gif
              "); - - var noInterpolateTemplate = _.template("

              Just some text. Hey, I know this is silly but it aids consistency.

              "); - result = noInterpolateTemplate(); - equals(result, "

              Just some text. Hey, I know this is silly but it aids consistency.

              "); - - var quoteTemplate = _.template("It's its, not it's"); - equals(quoteTemplate({}), "It's its, not it's"); - - var quoteInStatementAndBody = _.template("<%\ - if(foo == 'bar'){ \ - %>Statement quotes and 'quotes'.<% } %>"); - equals(quoteInStatementAndBody({foo: "bar"}), "Statement quotes and 'quotes'."); - - var withNewlinesAndTabs = _.template('This\n\t\tis: <%= x %>.\n\tok.\nend.'); - equals(withNewlinesAndTabs({x: 'that'}), 'This\n\t\tis: that.\n\tok.\nend.'); - - var template = _.template("<%- value %>"); - var result = template({value: " - - - "; - } } else { - $data .= "
              \"Checkout\"server_url."buttons/checkout.gif?merchant_id=" . - "".$this->merchant_id."&w=".$width. "&h=".$height."&style=".$style. - "&variant=".$this->variant."&loc=".$loc."\" height=\"".$height."\"". - " width=\"".$width. "\" />
              "; - - } - $data .= "
              "; - return $data; - } - - /** - * Get the Google Checkout button's html. - * - * {@link http://code.google.com/apis/checkout/developer/index.html#google_checkout_buttons} - * - * @param string $size the size of the button, one of 'large', 'medium' or - * 'small'. - * defaults to 'large' - * @param bool $variant true for an enabled button, false for a - * disabled one. defaults to true. will be ignored if - * SetButtonVariant() was used before. - * @param string $loc the locale of the button's text, the only valid value - * is 'en_US' (used as default) - * @param bool $showtext whether to show Google Checkout text or not, - * defaults to true. - * @param string $style the background style of the button, one of 'white' - * or 'trans'. defaults to "trans" - * - * @return string the button's html - */ - function CheckoutButtonCode($size="large", $variant=true, $loc="en_US", - $showtext=true, $style="trans") { - - switch (strtolower($size)) { - case "medium": - $width = "168"; - $height = "44"; - break; - - case "small": - $width = "160"; - $height = "43"; - break; - case "large": - default: - $width = "180"; - $height = "46"; - break; - } - - if($this->variant == false) { - switch ($variant) { - case false: - $this->variant = "disabled"; - break; - case true: - default: - $this->variant = "text"; - break; - } - } - - - $data = "
              "; - if ($this->variant == "text") { - $data .= "
              checkout_url . "\"" . ($this->googleAnalytics_id? - " onsubmit=\"setUrchinInputCode();\"":"") . "> - GetXML()) ."\"> - CalcHmacSha1($this->GetXML())). "\"> - server_url."buttons/checkout.gif?merchant_id=" . - $this->merchant_id."&w=".$width. "&h=".$height."&style=". - $style."&variant=".$this->variant."&loc=".$loc."\" - style=\"height:".$height."px;width:".$width. "px\" />"; - - if($this->googleAnalytics_id) { - $data .= ""; - } - $data .= "
              "; - if($this->googleAnalytics_id) { - $data .= " - - - - "; - } - } else { - $data .= "
              \"Checkout\"server_url."buttons/checkout.gif?merchant_id=" . - "".$this->merchant_id."&w=".$width. "&h=".$height."&style=".$style. - "&variant=".$this->variant."&loc=".$loc."\" height=\"".$height."\"". - " width=\"".$width. "\" />
              "; - } - if($showtext) { - $data .=""; - } - $data .= "
              "; - return $data; - } - //Code for generating Checkout button - //@param $variant will be ignored if SetButtonVariant() was used before - function CheckoutButtonNowCode($size="large", $variant=true, $loc="en_US", - $showtext=true, $style="trans") { - - switch (strtolower($size)) { - case "small": - $width = "121"; - $height = "44"; - break; - case "large": - default: - $width = "117"; - $height = "48"; - break; - } - - if($this->variant == false) { - switch ($variant) { - case false: - $this->variant = "disabled"; - break; - case true: - default: - $this->variant = "text"; - break; - } - } - - - - $data = "
              "; - if ($this->variant == "text") { - $data .= "
              checkout_url . "\"" . ($this->googleAnalytics_id? - " onsubmit=\"setUrchinInputCode();\"":"") . "> - GetXML()) ."//separator//" . - base64_encode($this->CalcHmacSha1($this->GetXML())) . "\"> - server_url."buttons/buy.gif?merchant_id=" . - $this->merchant_id."&w=".$width. "&h=".$height."&style=". - $style."&variant=".$this->variant."&loc=".$loc."\" - style=\"height:".$height."px;width:".$width. "px\" />"; - - if($this->googleAnalytics_id) { - $data .= ""; - } - $data .= "
              "; - if($this->googleAnalytics_id) { - $data .= " - - - - "; - } -// ask for link to BuyNow disable button - } else { - $data .= "
              \"Checkout\"server_url."buttons/buy.gif?merchant_id=" . - "".$this->merchant_id."&w=".$width. "&h=".$height."&style=".$style. - "&variant=".$this->variant."&loc=".$loc."\" height=\"".$height."\"". - " width=\"".$width. "\" />
              "; - } - if($showtext) { - $data .=""; - } - $data .= "
              "; - return $data; - } - - - /** - * Get the Google Checkout button's html to be used with the html api. - * - * {@link http://code.google.com/apis/checkout/developer/index.html#google_checkout_buttons} - * - * @param string $size the size of the button, one of 'large', 'medium' or - * 'small'. - * defaults to 'large' - * @param bool $variant true for an enabled button, false for a - * disabled one. defaults to true. will be ignored if - * SetButtonVariant() was used before. - * @param string $loc the locale of the button's text, the only valid value - * is 'en_US' (used as default) - * @param bool $showtext whether to show Google Checkout text or not, - * defaults to true. - * @param string $style the background style of the button, one of 'white' - * or 'trans'. defaults to "trans" - * - * @return string the button's html - */ - function CheckoutHTMLButtonCode($size="large", $variant=true, $loc="en_US", - $showtext=true, $style="trans") { - - switch (strtolower($size)) { - case "medium": - $width = "168"; - $height = "44"; - break; - - case "small": - $width = "160"; - $height = "43"; - break; - case "large": - default: - $width = "180"; - $height = "46"; - break; - } - - if($this->variant == false) { - switch ($variant) { - case false: - $this->variant = "disabled"; - break; - case true: - default: - $this->variant = "text"; - break; - } - } - - - $data = "
              "; - if ($this->variant == "text") { - $data .= "
              checkoutForm_url . "\"" . ($this->googleAnalytics_id? - " onsubmit=\"setUrchinInputCode();\"":"") . ">"; - - $request = $this->GetXML(); - require_once(dirname(__FILE__).'/xml-processing/gc_xmlparser.php'); - $xml_parser = new gc_xmlparser($request); - $root = $xml_parser->GetRoot(); - $XMLdata = $xml_parser->GetData(); - $this->xml2html($XMLdata[$root], '', $data); - $data .= "server_url."buttons/checkout.gif?merchant_id=". - $this->merchant_id."&w=".$width. "&h=".$height."&style=". - $style."&variant=".$this->variant."&loc=".$loc."\" - height=\"".$height."\" width=\"".$width. "\" />"; - - if($this->googleAnalytics_id) { - $data .= ""; - } - $data .= "
              "; - if($this->googleAnalytics_id) { - $data .= " - - - - "; - } - } else { - $data .= "
              \"Checkout\"server_url."buttons/checkout.gif?merchant_id=" . - "".$this->merchant_id."&w=".$width. "&h=".$height."&style=".$style. - "&variant=".$this->variant."&loc=".$loc."\" height=\"".$height."\"". - " width=\"".$width. "\" />
              "; - } - if($showtext){ - $data .= ""; - } - $data .= "
              "; - - - return $data; - - } - - /** - * @access private - */ - function xml2html($data, $path = '', &$rta){ -// global $multiple_tags,$ignore_tags; - // $arr = gc_get_arr_result($data); - foreach($data as $tag_name => $tag) { - if(isset($this->ignore_tags[$tag_name])){ - continue; - } - if(is_array($tag)){ - // echo print_r($tag, true) . $tag_name . "<- tag name\n"; - if(!$this->is_associative_array($data)) { - $new_path = $path . '-' . ($tag_name +1); - } else { - if(isset($this->multiple_tags[$tag_name]) - && $this->is_associative_array($tag) - && !$this->isChildOf($path, $this->multiple_tags[$tag_name])){ - $tag_name .= '-1'; - } - $new_path = $path . (empty($path)?'':'.') . $tag_name; - } - $this->xml2html($tag, $new_path, $rta); - } - else { - $new_path = $path; - if($tag_name != 'VALUE'){ - $new_path = $path . "." . $tag_name; - } - $rta .= ''."\n"; - } - } - } - - // Returns true if a given variable represents an associative array - /** - * @access private - */ - function is_associative_array($var) { - return is_array($var) && !is_numeric(implode('', array_keys($var))); - } - - /** - * @access private - */ - function isChildOf($path='', $parents=array()){ - $intersect =array_intersect(explode('.',$path), $parents); - return !empty($intersect); - } - - /** - * Get the Google Checkout acceptance logos html - * - * {@link http://checkout.google.com/seller/acceptance_logos.html} - * - * @param integer $type the acceptance logo type, valid values: 1, 2, 3 - * - * @return string the logo's html - */ - function CheckoutAcceptanceLogo($type=1) { - switch ($type) { - case 2: - return ''; - break; - case 3: - return ''; - break; - case 1: - default: - return ''; - break; - } - } - - /** - * Calculates the cart's hmac-sha1 signature, this allows google to verify - * that the cart hasn't been tampered by a third-party. - * - * {@link http://code.google.com/apis/checkout/developer/index.html#create_signature} - * - * @param string $data the cart's xml - * @return string the cart's signature (in binary format) - */ - function CalcHmacSha1($data) { - $key = $this->merchant_key; - $blocksize = 64; - $hashfunc = 'sha1'; - if (strlen($key) > $blocksize) { - $key = pack('H*', $hashfunc($key)); - } - $key = str_pad($key, $blocksize, chr(0x00)); - $ipad = str_repeat(chr(0x36), $blocksize); - $opad = str_repeat(chr(0x5c), $blocksize); - $hmac = pack( - 'H*', $hashfunc( - ($key^$opad).pack( - 'H*', $hashfunc( - ($key^$ipad).$data - ) - ) - ) - ); - return $hmac; - } - - //Method used internally to set true/false cart variables - /** - * @access private - */ - function _GetBooleanValue($value, $default) { - switch(strtolower($value)){ - case "true": - return "true"; - break; - case "false": - return"false"; - break; - default: - return $default; - break; - } - } - //Method used internally to set true/false cart variables - // Deprecated, must NOT use eval, bug-prune function - /** - * @access private - */ - function _SetBooleanValue($string, $value, $default) { - $value = strtolower($value); - if($value == "true" || $value == "false") - eval('$this->'.$string.'="'.$value.'";'); - else - eval('$this->'.$string.'="'.$default.'";'); - } - } - - /** - * @abstract - * Abstract class that represents the merchant-private-data. - * - * See {@link MerchantPrivateData} and {@link MerchantPrivateItemData} - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_merchant-private-data } - */ - class MerchantPrivate { - var $data; - var $type = "Abstract"; - function MerchantPrivate() { - } - - function AddMerchantPrivateToXML(&$xml_data) { - if(is_array($this->data)) { - $xml_data->Push($this->type); - $this->_recursiveAdd($xml_data, $this->data); - $xml_data->Pop($this->type); - } - else { - $xml_data->Element($this->type, (string)$this->data); - } - } - - /** - * @access private - */ - function _recursiveAdd(&$xml_data, $data){ - foreach($data as $name => $value) { - if(is_array($value)) { - $xml_data->Push($name); - $this->_recursiveAdd($xml_data, $name); - $xml_data->Pop($name); - } - else { - $xml_data->Element($name, (string)$value); - } - } - } - } - - /** - * Class that represents the merchant-private-data. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_merchant-private-data } - */ - class MerchantPrivateData extends MerchantPrivate { - /** - * @param mixed $data a string with the data that will go in the - * merchant-private-data tag or an array that will - * be mapped to xml, formatted like (e.g.): - * array('my-order-id' => 34234, - * 'stuff' => array('registered' => 'yes', - * 'category' => 'hip stuff')) - * this will map to: - * - * - * yes - * hip stuff - * - * - */ - function MerchantPrivateData($data = array()) { - $this->data = $data; - $this->type = 'merchant-private-data'; - } - } - - /** - * Class that represents a merchant-private-item-data. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_merchant-private-item-data } - */ - class MerchantPrivateItemData extends MerchantPrivate { - /** - * @param mixed $data a string with the data that will go in the - * merchant-private-item-data tag or an array that will - * be mapped to xml, formatted like: - * array('my-item-id' => 34234, - * 'stuff' => array('label' => 'cool', - * 'category' => 'hip stuff')) - * this will map to: - * - * - * - * hip stuff - * - * - */ - function MerchantPrivateItemData($data = array()) { - $this->data = $data; - $this->type = 'merchant-private-item-data'; - } - } -?> diff --git a/vendor/php-payments/vendor/google_checkout/library/googleitem.php b/vendor/php-payments/vendor/google_checkout/library/googleitem.php deleted file mode 100755 index 4c5d3d68890c..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/googleitem.php +++ /dev/null @@ -1,245 +0,0 @@ -} - * - * @param string $name the name of the item -- required - * @param string $desc the description of the item -- required - * @param integer $qty the number of units of this item the customer has - * in its shopping cart -- required - * @param double $price the unit price of the item -- required - * @param string $item_weight the weight unit used to specify the item's - * weight, - * one of 'LB' (pounds) or 'KG' (kilograms) - * @param double $numeric_weight the weight of the item - * - */ - function GoogleItem($name, $desc, $qty, $price, $item_weight='', $numeric_weight='') { - $this->item_name = $name; - $this->item_description= $desc; - $this->unit_price = $price; - $this->quantity = $qty; - - if($item_weight != '' && $numeric_weight !== '') { - switch(strtoupper($item_weight)){ - case 'KG': - $this->item_weight = strtoupper($item_weight); - break; - case 'LB': - default: - $this->item_weight = 'LB'; - } - $this->numeric_weight = (double)$numeric_weight; - } - } - - function SetMerchantPrivateItemData($private_data) { - $this->merchant_private_item_data = $private_data; - } - - /** - * Set the merchant item id that the merchant uses to uniquely identify an - * item. Google Checkout will include this value in the - * merchant calculation callbacks - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_merchant-item-id } - * - * @param mixed $item_id the value that identifies this item on the - * merchant's side - * - * @return void - */ - function SetMerchantItemId($item_id) { - $this->merchant_item_id = $item_id; - } - - /** - * Sets the tax table selector which identifies an alternate tax table that - * should be used to calculate tax for a particular item. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_tax-table-selector } - * - * @param string $tax_selector this value should correspond to the name - * of an alternate-tax-table. - * - * @return void - */ - function SetTaxTableSelector($tax_selector) { - $this->tax_table_selector = $tax_selector; - } - - /** - * Used when the item's content is digital, sets whether the merchant will - * send an email to the buyer explaining how to access the digital content. - * Email delivery allows the merchant to charge the buyer for an order - * before allowing the buyer to access the digital content. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_email-delivery } - * - * @param bool $email_delivery true if email_delivery applies, defaults to - * false - * - * @return void - */ - function SetEmailDigitalDelivery($email_delivery='false') { - $this->digital_url = ''; - $this->digital_key = ''; - $this->digital_description = ''; - $this->email_delivery = $email_delivery; - $this->digital_content=true; - } - - /** - * Sets the information related to the digital delivery of the item. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_digital-content } - * - * @param string $digital_url the url the customer must go to download the - * item. --optional - * @param string $digital_key the key which allows to download or unlock the - * digital content item -- optional - * @param string $digital_description instructions for downloading adigital - * content item, 1024 characters max, can - * contain xml-escaped HTML -- optional - * - * @return void - */ - function SetURLDigitalContent($digital_url, $digital_key, $digital_description) { - $this->digital_url = $digital_url; - $this->digital_key = $digital_key; - $this->digital_description = $digital_description; - $this->email_delivery = 'false'; - $this->digital_content = true; - } - - /** - * Sets the subscription item for the cart - * - * @param googlesubscription $sub the subscription item - * @return void - */ - - function SetSubscription($sub) { - $this->subscription = $sub; - } - - /** - * Sets the currency for the item - * - * @param string $currency currency USD or GBP - * @return void - */ - function SetCurrency($currency){ - $this->currency = $currency; - } - - /** - * Returns the generated XMl from item specifications - * To use this function, you need to specify the item currency - * @param void - * @return string XML cart - */ - function GetXML(){ - require_once('xml-processing/gc_xmlbuilder.php'); - - $xml_data = new gc_XmlBuilder(); - $xml_data->Push('item'); - $xml_data->Element('item-name', $this->item_name); - $xml_data->Element('item-description', $this->item_description); - $xml_data->Element('unit-price', $this->unit_price, - array('currency' => $this->currency)); - $xml_data->Element('quantity', $this->quantity); - if($this->merchant_private_item_data != '') { - // echo get_class($item->merchant_private_item_data); - if(is_a($this->merchant_private_item_data, - 'merchantprivate')) { - $this->merchant_private_item_data->AddMerchantPrivateToXML($xml_data); - } - else { - $xml_data->Element('merchant-private-item-data', - $this->merchant_private_item_data); - } - } - if($this->merchant_item_id != '') - $xml_data->Element('merchant-item-id', $this->merchant_item_id); - if($this->tax_table_selector != '') - $xml_data->Element('tax-table-selector', $this->tax_table_selector); - // recurring Carrier calculation - if($this->item_weight != '' && $this->numeric_weight !== '') { - $xml_data->EmptyElement('item-weight', array( 'unit' => $this->item_weight, - 'value' => $this->numeric_weight - )); - } - // recurring Digital Delivery Tags - if($this->digital_content) { - $xml_data->Push('digital-content'); - if(!empty($this->digital_url)) { - $xml_data->Element('description', substr($this->digital_description, - 0, MAX_DIGITAL_DESC)); - $xml_data->Element('url', $this->digital_url); - // To avoid NULL key message in GC confirmation Page - if(!empty($this->digital_key)) { - $xml_data->Element('key', $this->digital_key); - } - } - else if(!empty($item->digital_description)) { - $xml_data->element('description', substr($item->digital_description, 0,MAX_DIGITAL_DESC)); - } - else { - $xml_data->Element('email-delivery', - $this->_GetBooleanValue($this->email_delivery, "true")); - } - $xml_data->pop('digital-content'); - } - $xml_data->Pop('item'); - return $xml_data->GetXML(); - } - } -?> diff --git a/vendor/php-payments/vendor/google_checkout/library/googlelog.php b/vendor/php-payments/vendor/google_checkout/library/googlelog.php deleted file mode 100755 index 9cc7db5a2975..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/googlelog.php +++ /dev/null @@ -1,96 +0,0 @@ -logLevel = $logLevel; - if($logLevel == L_OFF) { - $this->logLevel = L_OFF; - } else { - if (!$this->errorLogFile = @fopen($errorLogFile, "a")) { - header('HTTP/1.0 500 Internal Server Error'); - $log = "Cannot open " . $errorLogFile . " file.\n" . - "Logs are not writable, set them to 777"; - error_log($log, 0); - if($die) { - die($log); - }else { - echo $log; - $this->logLevel = L_OFF; - } - } - if (!$this->messageLogFile = @fopen($messageLogFile, "a")) { - fclose($this->errorLogFile); - header('HTTP/1.0 500 Internal Server Error'); - $log = "Cannot open " . $messageLogFile . " file.\n" . - "Logs are not writable, set them to 777"; - error_log($log, 0); - if($die) { - die($log); - }else { - echo $log; - $this->logLevel = L_OFF; - } - } - } - $this->logLevel = $logLevel;; - } - - function LogError($log){ - if($this->logLevel & L_ERR){ - fwrite($this->errorLogFile, - sprintf("\n%s:- %s\n",date("D M j G:i:s T Y"),$log)); - return true; - } - return false; - } - - function LogRequest($log){ - if($this->logLevel & L_RQST){ - fwrite($this->messageLogFile, - sprintf("\n%s:- %s\n",date("D M j G:i:s T Y"),$log)); - return true; - } - return false; - } - - function LogResponse($log) { - if($this->logLevel & L_RESP){ - $this->LogRequest($log); - return true; - } - return false; - } -} -?> diff --git a/vendor/php-payments/vendor/google_checkout/library/googlemerchantcalculations.php b/vendor/php-payments/vendor/google_checkout/library/googlemerchantcalculations.php deleted file mode 100755 index f7fa0c957ec8..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/googlemerchantcalculations.php +++ /dev/null @@ -1,115 +0,0 @@ -results_arr = array(); - $this->currency = $currency; - } - - /** - * Add a result of a merchant calculation to the response to be sent. - * - * @param GoogleResult $results the result of a particular merchant - * calculation - * @return void - */ - function AddResult($results) { - $this->results_arr[] = $results; - } - - /** - * Builds the merchant calculation response xml to be sent to - * Google Checkout. - * - * @return string the response xml - */ - function GetXML() { - require_once(dirname(__FILE__).'/xml-processing/gc_xmlbuilder.php'); - - $xml_data = new gc_XmlBuilder(); - $xml_data->Push('merchant-calculation-results', - array('xmlns' => $this->schema_url)); - $xml_data->Push('results'); - - foreach($this->results_arr as $result) { - if($result->shipping_name != "") { - $xml_data->Push('result', array('shipping-name' => - $result->shipping_name, 'address-id' => $result->address_id)); - $xml_data->Element('shipping-rate', $result->ship_price, - array('currency' => $this->currency)); - $xml_data->Element('shippable', $result->shippable); - } else - $xml_data->Push('result', array('address-id' => $result->address_id)); - - if($result->tax_amount != "") - $xml_data->Element('total-tax', $result->tax_amount, - array('currency' => $this->currency)); - - if((count($result->coupon_arr) != 0) || - (count($result->giftcert_arr) != 0) ) { - $xml_data->Push('merchant-code-results'); - - foreach($result->coupon_arr as $curr_coupon) { - $xml_data->Push('coupon-result'); - $xml_data->Element('valid', $curr_coupon->coupon_valid); - $xml_data->Element('code', $curr_coupon->coupon_code); - $xml_data->Element('calculated-amount', $curr_coupon->coupon_amount, - array('currency'=> $this->currency)); - $xml_data->Element('message', $curr_coupon->coupon_message); - $xml_data->Pop('coupon-result'); - } - foreach($result->giftcert_arr as $curr_gift) { - $xml_data->Push('gift-certificate-result'); - $xml_data->Element('valid', $curr_gift->gift_valid); - $xml_data->Element('code', $curr_gift->gift_code); - $xml_data->Element('calculated-amount', $curr_gift->gift_amount, - array('currency'=> $this->currency)); - $xml_data->Element('message', $curr_gift->gift_message); - $xml_data->Pop('gift-certificate-result'); - } - $xml_data->Pop('merchant-code-results'); - } - $xml_data->Pop('result'); - } - $xml_data->Pop('results'); - $xml_data->Pop('merchant-calculation-results'); - return $xml_data->GetXML(); - } - } -?> diff --git a/vendor/php-payments/vendor/google_checkout/library/googlenotification.php b/vendor/php-payments/vendor/google_checkout/library/googlenotification.php deleted file mode 100755 index 9ae9d2b66267..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/googlenotification.php +++ /dev/null @@ -1,178 +0,0 @@ -merchant_id = $id; - $this->merchant_key = $key; - $this->proxy = $proxy; - - $this->schema_url = "http://checkout.google.com/schema/2"; - if(strtolower($server_type) == "sandbox"){ - $this->server_url = "https://sandbox.google.com/checkout/"; - } - else { - $this->server_url= "https://checkout.google.com/"; - } - - $this->base_url = $this->server_url . "api/checkout/v2/"; - $this->reports_url = $this->base_url . "reports/Merchant/" . - $this->merchant_id; - - $this->log = new GoogleLog('', '', L_OFF); - } - - function setLogFiles($errorLogFile, $messageLogFile, $logLevel=L_ERR_RQST) { - $this->log = new GoogleLog($errorLogFile, $messageLogFile, $logLevel); - } - - function getNotifications($start_date='', $end_date='', $orders=array(), - $notification_types=array(), - $continue_token='') { - require_once('xml-processing/gc_xmlparser.php'); - require_once('xml-processing/gc_xmlbuilder.php'); - - $this->start_date = $start_date; - $this->end_date = $end_date; - $this->orders = $orders; - $this->notification_types = $notification_types; - $this->continue_token = $continue_token; - - $notifications = array(); - $invalid_order_numbers = array(); - - do { - list($status, $response) = $this->_doReportsRequest(); - if($status != '200') { - $this->error = array($status, $response); - return null; - } - //echo ''; print_r($response); echo ''; - $xml_parser = new gc_XmlParser($response); - $data = $xml_parser->GetData(); - $root = $xml_parser->GetRoot(); - - $this->continue_token = $data[$root]['continue-token']['VALUE']; - $notifications = $data[$root]['notifications']; - $invalid_order_numbers = $data[$root]['invalid-order-numbers']; - } while($data[$root]['has-more-notifications']['VALUE'] == 'true'); - - return array($notifications, $invalid_order_numbers); - } - - function _doReportsRequest() { - $xml_data = new gc_XmlBuilder(); - $xml_data->Push('notification-history-request', - array('xmlns' => $this->schema_url)); - - if(!empty($this->continue_token)) { - $xml_data->Element('continue-token', trim($this->continue_token)); - } else { - if(!empty($this->start_date)) { - $xml_data->Element('start-time', trim($this->start_date)); - } - if(!empty($this->end_date)) { - $xml_data->Element('end-time', trim($this->end_date)); - } - if(is_array($this->orders) && !empty($this->orders)) { - $xml_data->Push('order-numbers'); - foreach($this->orders as $order) { - if(trim($order) != ''){ - $xml_data->Element('google-order-number', trim($order)); - } - } - $xml_data->Pop('order-numbers'); - } - if(is_array($this->notification_types) && !empty($this->notification_types)) { - $xml_data->Push('notification-types'); - foreach($this->notification_types as $notification_type) { - $xml_data->Element('notification-type', trim($notification_type)); - } - $xml_data->Pop('notification-types'); - } - } - $xml_data->Pop('notification-history-request'); - return $this->sendRequest($this->reports_url, - $this->getAuthenticationHeaders(), - $xml_data->GetXML()); - } - - function getError() { - if($this->error[0] != 'CURLERR') { - $xml_parser = new gc_XmlParser($this->error[1]); - $data = $xml_parser->GetData(); - $error = $data['error']['error-message']['VALUE']; - } else { - $error = $this->error[1]; - } - return array('status_code'=>$this->error[0], 'message'=>$error); - } - - function getAuthenticationHeaders() { - $headers = array( - "Authorization: Basic " . - base64_encode($this->merchant_id.':'.$this->merchant_key), - "Content-Type: application/xml; charset=UTF-8", - "Accept: application/xml; charset=UTF-8", - "User-Agent: gc-php4-sample-code v1.2.5b"); - return $headers; - } - - function setProxy($proxy) { - $this->proxy = $proxy; - } - - function sendRequest($url, $header_arr, $postargs) { - $ch = curl_init($url); - $this->log->LogRequest($postargs); - - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_HTTPHEADER, $header_arr); - curl_setopt($ch, CURLOPT_POSTFIELDS, $postargs); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - if($this->proxy) { - curl_setopt($ch, CURLOPT_PROXY, $this->proxy); - } - - $body = curl_exec($ch); - - if (curl_errno($ch)) { - $this->log->LogError($body); - return array('CURLERR', curl_error($ch)); - } else { - $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); - curl_close($ch); - } - - // Check for errors - if($status_code == '200') { - $this->log->LogResponse($body); - } else { - $this->log->LogError($body); - } - return array($status_code, $body); - } -} -?> \ No newline at end of file diff --git a/vendor/php-payments/vendor/google_checkout/library/googlenotificationhistory.php b/vendor/php-payments/vendor/google_checkout/library/googlenotificationhistory.php deleted file mode 100755 index d9cd6109599f..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/googlenotificationhistory.php +++ /dev/null @@ -1,95 +0,0 @@ -merchant_id = $id; - $this->merchant_key = $key; - $this->server_type = $server_type; - $this->schema_url = "http://checkout.google.com/schema/2"; - } - - /** - * Send a request to Google Checkout - * - * info: {@link http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Notification_History_API.html} - * - * @param string $sn serial number - * @param string $npt next page token - * @param array $orders array of string google order numbers - * @param array $nt array of string notification types - * @param array $st array of tracking data where tracking code => carrier - * @param string @st string of start time in format YYYY-MM-DD[T]HH:MM:SS[Timezone] ie - * 2010-05-01T05:00:00Z - * @param string @et string of end time in format YYYY-MM-DD[T]HH:MM:SS[Timezone] ie - * 2010-05-02T05:00:00Z - */ - function SendNotificationHistoryRequest($sn = null, $npt = null, $orders = array(), $nt = array(), $st = null, $et = null){ - $postargs = ""; - $postargs .= "schema_url."\">"; - if(isset($sn)){ - $postargs .= "".$sn.""; - } elseif(isset($npt)) { - $postargs .= "".$npt.""; - } - else{ - if(isset($orders) && count($orders) > 0){ - $postargs .= ""; - foreach ($orders as $order){ - $postargs .= "".$order.""; - } - $postargs .= ""; - } - if(isset($nt) && count($nt) > 0){ - $postargs .= ""; - foreach ($nt as $notification_type){ - $postargs .= "".$notification_type.""; - $postargs .= ""; - } - } - $postargs .= ""; - - $Grequest = new GoogleRequest($this->merchant_id, $this->merchant_key, $this->server_type); - return $Grequest->SendReq($Grequest->GetReportUrl(), $Grequest->GetAuthenticationHeaders(), $postargs); - } - } -?> diff --git a/vendor/php-payments/vendor/google_checkout/library/googlepoll.php b/vendor/php-payments/vendor/google_checkout/library/googlepoll.php deleted file mode 100755 index 6fb5d535ac5b..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/googlepoll.php +++ /dev/null @@ -1,220 +0,0 @@ -merchant_id = $id; - $this->merchant_key = $key; - $this->environment = $env; - $this->continue_token = $contToken; - switch ($env) { - case "production": - $this->server_url = $this->prod_base_server_url .$id; - break; - default: - $this->server_url = $this->sandbox_base_server_url .$id; - } - } - /* - * Set whether polling should continue until there are no more - * appropriate notifications to fetch. Default = true, value false - * will stop after one request. - */ - function GetAllNotifications ( $get_all) { - switch ($get_more) { - case false: - $this->get_all_notifications = false; - break; - case true: - $this->get_all_notifications = true; - break; - default: - true; - } - } - /* - * Polls for notifications as defined - */ - function RequestData () { - - //create GRequest object + post xml (googlecart.php line: 962) - require_once('library/googlerequest.php'); - $GRequest = new GoogleRequest($this->merchant_id, $this->merchant_key); - - while($this->has_more_notifications == "true") { - $this->poll_request_xml = $this->GetPollRequestXML(); - $this->poll_result = $GRequest->SendReq($this->server_url, - $GRequest->GetAuthenticationHeaders(), $this->poll_request_xml); - - //Check response code - if($this->poll_result[0] == "200") { - $this->ExtractNotifications(); - } - else return false; - - if($this->get_all_notifications == false) { - $this->has_more_notifications == "false"; - } - } - return true; - } - /* - * Returns an array containing all notifications from poll. - * This includes notifications from multiple requests - */ - function GetNotifications () { - return $this->notifications; - } - /* - * Extracts data from poll response xml. - * This includes, individual notifications, new continue token - * and more notifications value - */ - function ExtractNotifications () { - require_once('xml-processing/gc_XmlParser.php'); - $GXmlParser = new gc_XmlParser($this->poll_result[1]); - $data = $GXmlParser->GetData(); - //Get the actual notifications - foreach($data['notification-data-response']['notifications'] as $notification) { - $this->notifications[] = $notification; - } - //Get other useful info - $this->has_more_notifications = $data['notification-data-response']['has-more-notifications']['VALUE']; - $this->continue_token = $data['notification-data-response']['continue-token']['VALUE']; - } - /* - * Builds poll request XML - */ - function GetPollRequestXML() { - require_once('xml-processing/gc_xmlbuilder.php'); - $xml_data = new gc_XmlBuilder(); - - $xml_data->Push('notification-data-request', - array('xmlns' => $this->schema_url)); - $xml_data->Element('continue-token', $this->continue_token); - $xml_data->Pop('notification-data-request'); - - return $xml_data->GetXML(); - } - } - - /** - * Requests a continue token for polling - */ - class ContinueTokenRequest { - var $start_time; - var $continue_token; - - var $merchant_id; - var $merchant_key; - var $environment; - var $request_token_xml; - var $token_response_xml; - - var $schema_url = "http://checkout.google.com/schema/2"; - var $prod_base_server_url = "https://checkout.google.com/api/checkout/v2/reports/Merchant/"; - var $sandbox_base_server_url = "https://sandbox.google.com/checkout/api/checkout/v2/reports/Merchant/"; - var $server_url; - var $xml_data; - - function ContinueTokenRequest ($id, $key, $env) { - $this->merchant_id = $id; - $this->merchant_key = $key; - $this->environment = $env; - switch ($env) { - case "production": - $this->server_url = $this->prod_base_server_url .$id; - break; - default: - $this->server_url = $this->sandbox_base_server_url .$id; - } - } - function SetStartTime ($poll_start_time) { - $this->start_time = $poll_start_time; - } - function GetContinueToken () { - if($this->continue_token !="") { - return $this->continue_token; - } - else return false; - } - function RequestToken () { - $this->request_token_xml = $this->GetTokenRequestXML(); - - //create GRequest object + post xml (googlecart.php line: 962) - require_once('library/googlerequest.php'); - $GRequest = new GoogleRequest($this->merchant_id, $this->merchant_key); - /*---------------------------------------------------------------------------------------------------*/$GRequest->SetCertificatePath("/etc/ssl/certs/ca-certificates.crt"); - - $this->token_response_xml = $GRequest->SendReq($this->server_url, - $GRequest->GetAuthenticationHeaders(), $this->request_token_xml); - - //Check response code - if($this->token_response_xml[0] == "200") { - require_once('xml-processing/gc_XmlParser.php'); - $GXmlParser = new gc_XmlParser($this->token_response_xml[1]); - $data = $GXmlParser->GetData(); - - $this->continue_token = $data['notification-data-token-response']['continue-token']['VALUE']; - return $this->continue_token; - } - //else return $token_result; - else return false; - } - function GetTokenRequestXML() { - require_once('xml-processing/gc_xmlbuilder.php'); - $xml_data = new gc_XmlBuilder(); - - $xml_data->Push('notification-data-token-request', - array('xmlns' => $this->schema_url)); - $xml_data->Element('start-time', $this->start_time); - $xml_data->Pop('notification-data-token-request'); - - return $xml_data->GetXML(); - } -} -?> \ No newline at end of file diff --git a/vendor/php-payments/vendor/google_checkout/library/googlerequest.php b/vendor/php-payments/vendor/google_checkout/library/googlerequest.php deleted file mode 100755 index add9e5961b72..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/googlerequest.php +++ /dev/null @@ -1,837 +0,0 @@ -merchant_id = $id; - $this->merchant_key = $key; - $this->currency = $currency; - - if(strtolower($server_type) == "sandbox") { - $this->server_url = "https://sandbox.google.com/checkout/"; - } else { - $this->server_url = "https://checkout.google.com/"; - } - - $this->schema_url = "http://checkout.google.com/schema/2"; - $this->base_url = $this->server_url . "api/checkout/v2/"; - $this->request_url = $this->base_url . "request/Merchant/" . $this->merchant_id; - $this->report_url = $this->base_url . "reports/Merchant/" . $this->merchant_id; - $this->merchant_checkout = $this->base_url . "merchantCheckout/Merchant/" . $this->merchant_id; - - ini_set('include_path', ini_get('include_path').PATH_SEPARATOR.'.'); - require_once(dirname(__FILE__).'/googlelog.php'); - $this->log = new GoogleLog('', '', L_OFF); - - } - - function SetLogFiles($errorLogFile, $messageLogFile, $logLevel=L_ERR_RQST) { - $this->log = new GoogleLog($errorLogFile, $messageLogFile, $logLevel); - } - /** - * Submit a SetCertificatePath request. - * - * GC Accepted SSL Certs: - * {@link http://googlecheckoutapi.blogspot.com/2007/07/accepting-50-additional-ssl-root-cas.html} - * - * @param string $certPath The name of a file holding one or more certificates - * to verify the peer with - */ - - function SetCertificatePath($certPath) { - $this->certPath = $certPath; - } - - /** - * Submit a server-to-server request. - * - * more info: - * {@link http://code.google.com/apis/checkout/developer/index.html#alternate_technique} - * - * @param string $xml_cart the cart's xml - * @param bool $die whether to die() or not after performing the request, - * defaults to true - * - * @return array with the returned http status code (200 if OK) in index 0 - * and the redirect url returned by the server in index 1 - */ - function SendServer2ServerCart($xml_cart, $die=true) { - list($status, $body) = $this->SendReq($this->merchant_checkout, - $this->GetAuthenticationHeaders(), $xml_cart); - if($status != 200 ){ - return array($status, $body); - } else { - require_once(dirname(__FILE__).'/xml-processing/gc_xmlparser.php'); - - $xml_parser = new gc_xmlparser($body); - $root = $xml_parser->GetRoot(); - $data = $xml_parser->GetData(); - - $redirect_url = $data[$root]['redirect-url']['VALUE']; - $this->log->logRequest("Redirecting to: ". - $redirect_url); - if (strpos($redirect_url, "shoppingcartshoppingcart") != false) { - $redirect_url = str_replace("shoppingcartshoppingcart","shoppingcart&shoppingcart", $redirect_url); - } - header('Location: ' . $redirect_url); - if($die) { - die($redirect_url); - } - else { - return array(200, $redirect_url); - } - } - } - - /** - * Send a command to the Google Checkout server - * - * info: {@link http://code.google.com/apis/checkout/developer/index.html#charge_order_example} - * - * @param string $google_order the google id of the order - * @param double $amount the amount to be charged, if empty the whole - * amount of the order will be charged - * - * @return array the status code and body of the response - */ - function SendChargeOrder($google_order, $amount='') { - $postargs = " - schema_url. - "\" google-order-number=\"". $google_order. "\">"; - if ($amount != '') { - $postargs .= "currency . "\">" . - $amount . ""; - } - $postargs .= ""; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - - /** - * Send a command to the Google Checkout server - * - * info: {@link http://http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Financial_Commands.html#Charge_And_Ship_Order} - * - * @param string $google_order the google id of the order - * @param double $amount the amount to be charged, if empty the whole - * amount of the order will be charged - * @param array $tracking_data an array of tracking data where the tracking data maps to the carrier - * @return array the status code and body of the response - */ - function SendChargeAndShipOrder ($google_order, $tracking_data=null, $amount=null){ - $postargs = " - schema_url. - "\" google-order-number=\"". $google_order. "\">"; - if (isset($amount)) { - $postargs .= "currency . "\">" . - $amount . ""; - } - if (isset($tracking_data)){ - $postargs .= ""; - foreach($tracking_data as $tracking_code => $carrier){ - $postargs .= "". - "".$carrier."". - "".$tracking_code."". - ""; - } - $postargs .= ""; - } - $postargs .= ""; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - /** - * Send a command to the Google Checkout server - * - * info: {@link http://code.google.com/apis/checkout/developer/index.html#refund_order_example} - * - * @param string $google_order the google id of the order - * @param double $amount the amount to be refunded, if empty the whole - * amount of the order will be refunded - * @param string $reason the reason why the refund is taking place - * @param string $comment a comment about the refund - * - * @return array the status code and body of the response - */ - function SendRefundOrder($google_order, $amount, $reason, - $comment='') { - $postargs = " - schema_url. - "\" google-order-number=\"". $google_order. "\">" . - "". $reason . ""; - if($amount!=0) { - $postargs .= "currency . "\">". - htmlentities($amount).""; - } - $postargs .= "". htmlentities($comment) . " - "; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - - /** - * Send a command to the Google Checkout server - * - * info: {@link http://code.google.com/apis/checkout/developer/index.html#refund_order_example} - * - * @param string $google_order the google id of the order - * @param string $reason the reason why the order is being cancelled - * @param string $comment a comment about the cancellation - * - * @return array the status code and body of the response - */ - function SendCancelOrder($google_order, $reason, $comment) { - $postargs = " - schema_url. - "\" google-order-number=\"". $google_order. "\"> - ". - (substr(htmlentities(strip_tags($reason)),0,GOOGLE_REASON_LENGTH)) . - " - ". - (substr(htmlentities(strip_tags($comment)),0,GOOGLE_REASON_LENGTH)) . - " - "; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - - /** - * - *Send create-order-recurrence-request to Google CHeckout - * - * @param array $item_arr array of googleitem recurrence items - * @param string $google_order google id of the order - * @return array the status code and body of the response - */ - function SendRecurrenceRequest ($google_order, $item_arr){ - $postargs = " - schema_url. - "\" google-order-number=\"". $google_order. "\"> - - "; - - foreach($item_arr as $item) { - $postargs .= str_replace("","", $item->GetXML()); - } - - $postargs .= " - - "; - return $this->SendReq($this->request_url, $this->GetAuthenticationHeaders(), $postargs); - } - - - /** - * Send an command to the Google Checkout server, which - * will associate a shipper's tracking number with an order. - * - * info: {@link http://code.google.com/apis/checkout/developer/index.html#add_tracking_data_example} - * - * @param string $google_order the google id of the order - * @param string $carrier the carrier, valid values are "DHL", "FedEx", - * "UPS", "USPS" and "Other" - * @param string $tracking_no the shipper's tracking number - * - * @return array the status code and body of the response - */ - function SendTrackingData($google_order, $carrier, - $tracking_no) { - $postargs = " - schema_url . - "\" google-order-number=\"". $google_order . "\"> - - ". htmlentities($carrier) . " - ". $tracking_no . " - - "; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - - /** - * Send an command to the Google Checkout - * server, which will associate a merchant order number with an order - * - * info: {@link http://code.google.com/apis/checkout/developer/index.html#add_merchant_order_number_example} - * - * @param string $google_order the google id of the order - * @param string $merchant_order the merchant id of the order - * - * @return array the status code and body of the response - */ - function SendMerchantOrderNumber($google_order, - $merchant_order, $timeout=false) { - $postargs = " - schema_url . - "\" google-order-number=\"". $google_order . "\"> - " . $merchant_order . - " - "; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs, $timeout); - } - - /** - * Send a command to the Google Checkout - * server, which will place a message in the customer's Google Checkout - * account - * - * info: {@link http://code.google.com/apis/checkout/developer/index.html#send_buyer_message_example} - * - * @param string $google_order the google id of the order - * @param string $message the message to be sent to the customer - * @param string $send_email whether Google should send an email to - * the buyer, use "true" or"false", - * defaults to "true" - * - * @return array the status code and body of the response - */ - function SendBuyerMessage($google_order, $message, - $send_mail="true", $timeout=false) { - $postargs = " - schema_url . - "\" google-order-number=\"". $google_order . "\"> - " . - (substr(htmlentities(strip_tags($message)),0,GOOGLE_MESSAGE_LENGTH)) - . " - " . strtolower($send_mail) . " - "; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs, $timeout); - } - - /** - * Send a command to the Google Checkout - * server, which will update an order's fulfillment state from NEW to - * PROCESSING - * - * info: {@link http://code.google.com/apis/checkout/developer/index.html#process_order_example} - * - * @param string $google_order the google id of the order - * - * @return array the status code and body of the response - */ - function SendProcessOrder($google_order) { - $postargs = " - schema_url . - "\" google-order-number=\"". $google_order. "\"/> "; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - - /** - * Send a command to the Google Checkout server, which - * will update an order's fulfillment state from either NEW or PROCESSING - * to DELIVERED - * - * info: {@link http://code.google.com/apis/checkout/developer/index.html#deliver_order_example} - * - * @param string $google_order the google id of the order - * @param string $carrier the carrier, valid values are "DHL", "FedEx", - * "UPS", "USPS" and "Other" - * @param string $tracking_no the shipper's tracking number - * @param string $send_email whether Google should send an email to - * the buyer, use "true" or"false", - * defaults to "true" - * - * @return array the status code and body of the response - */ - function SendDeliverOrder($google_order, $carrier="", - $tracking_no="", $send_mail = "true") { - $postargs = " - schema_url . - "\" google-order-number=\"". $google_order . "\">"; - if($carrier != "" && $tracking_no != "") { - $postargs .= " - ". htmlentities($carrier) . " - ". htmlentities($tracking_no) . " - "; - } - $postargs .= "". strtolower($send_mail) . " - "; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - - /** - * Send a command to the Google Checkout - * server, which removes an order from the merchant's Merchant Center Inbox - * - * info: {@link http://code.google.com/apis/checkout/developer/index.html#archive_order_example} - * - * @param string $google_order the google id of the order - * - * @return array the status code and body of the response - */ - function SendArchiveOrder($google_order) { - $postargs = " - schema_url. - "\" google-order-number=\"". $google_order. "\"/>"; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - - /** - * Send a command to the Google Checkout - * server, which returns a previously archived order to the merchant's - * Merchant Center Inbox - * - * info: {@link http://code.google.com/apis/checkout/developer/index.html#unarchive_order_example} - * - * @param string $google_order the google id of the order - * - * @return array the status code and body of the response - */ - function SendUnarchiveOrder($google_order) { - $postargs = " - schema_url."\" google-order-number=\"". - $google_order. "\"/>"; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - -/** - * Ship items API Commands - * info: {@link http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Line_Item_Shipping.html} - * - * - */ - - /** - * Send a command to the Google Checkout - * server, - * - * info: {@link http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Line_Item_Shipping.html#tag_ship-items} - * - * @param string $google_order the google id of the order - * @param array $items_list a list of GoogleShipItem classes. - * @param string $send_email whether Google should send an email to - * the buyer, use "true" or"false", - * defaults to "true" - * - * @return array the status code and body of the response - */ - - function SendShipItems($google_order, $items_list=array(), $send_mail="true") { - $postargs = " - schema_url . - "\" google-order-number=\"". $google_order . "\">" . - "\n"; - foreach($items_list as $item) { - $postargs .= " - - " . $item->merchant_item_id . " - \n"; - - if(count($item->tracking_data_list)) { - $postargs .= "\n"; - foreach($item->tracking_data_list as $tracking_data) { - $postargs .= " - ". htmlentities($tracking_data['carrier']) . " - ". $tracking_data['tracking-number'] . " - \n"; - } - $postargs .= "\n"; - } - $postargs .= "\n"; - } - $postargs .= "\n" . - "". strtolower($send_mail) . " - "; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - - } - - /** - * Send a command to the Google Checkout - * - * info: {@link http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Line_Item_Shipping.html#tag_backorder-items} - * - * @param string $google_order the google id of the order - * @param array $items_list a list of GoogleShipItem classes. - * @param string $send_email whether Google should send an email to - * the buyer, use "true" or"false", - * defaults to "true" - * - * @return array the status code and body of the response - */ - function SendBackorderItems($google_order, $items_list=array(), $send_mail="true") { - $postargs = " - schema_url."\" google-order-number=\"". - $google_order. "\">"; - $postargs .= ""; - foreach($items_list as $item) { - $postargs .= " - " . $item->merchant_item_id . " - "; - } - $postargs .= ""; - $postargs .= "". strtolower($send_mail) . " - "; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - - /** - * Send a command to the Google Checkout - * - * info: {@link http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Line_Item_Shipping.html#tag_cancel-items} - * - * @param string $google_order the google id of the order - * @param array $items_list a list of GoogleShipItem classes. - * @param string $reason the reason why the refund is taking place - * @param string $comment a comment about the refund - * @param string $send_email whether Google should send an email to - * the buyer, use "true" or"false", - * defaults to "true" - * - * @return array the status code and body of the response - */ - function SendCancelItems($google_order, $items_list=array(), $reason, - $comment='', $send_mail="true") { - $postargs = " - schema_url."\" google-order-number=\"". - $google_order. "\">"; - $postargs .= ""; - foreach($items_list as $item) { - $postargs .= " - " . $item->merchant_item_id . " - "; - } - $postargs .= ""; - $postargs .= "". strtolower($send_mail) . " - ". - (substr(htmlentities(strip_tags($reason)),0,GOOGLE_REASON_LENGTH)) . - " - ". - (substr(htmlentities(strip_tags($comment)),0,GOOGLE_REASON_LENGTH)) . - " - "; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - - /** - * Send a command to the Google Checkout - * - * info: {@link http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Line_Item_Shipping.html#tag_return-items} - * - * @param string $google_order the google id of the order - * @param array $items_list a list of GoogleShipItem classes. - * @param string $send_email whether Google should send an email to - * the buyer, use "true" or"false", - * defaults to "true" - * - * @return array the status code and body of the response - */ - function SendReturnItems($google_order, $items_list=array(), $send_mail="true") { - $postargs = " - schema_url."\" google-order-number=\"". - $google_order. "\">"; - $postargs .= ""; - foreach($items_list as $item) { - $postargs .= " - " . $item->merchant_item_id . " - "; - } - $postargs .= ""; - $postargs .= "". strtolower($send_mail) . " - "; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - - /** - * Send a command to the Google Checkout - * - * info: {@link http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Line_Item_Shipping.html#tag_reset-items-shipping-information} - * - * @param string $google_order the google id of the order - * @param array $items_list a list of GoogleShipItem classes. - * @param string $send_email whether Google should send an email to - * the buyer, use "true" or"false", - * defaults to "true" - * - * @return array the status code and body of the response - */ - function SendResetItemsShippingInformation($google_order, $items_list=array(), $send_mail="true") { - $postargs = " - schema_url."\" google-order-number=\"". - $google_order. "\">"; - $postargs .= ""; - foreach($items_list as $item) { - $postargs .= " - " . $item->merchant_item_id . " - "; - } - $postargs .= ""; - $postargs .= "". strtolower($send_mail) . " - "; - return $this->SendReq($this->request_url, - $this->GetAuthenticationHeaders(), $postargs); - } - - function GetRequestUrl(){ - return $this->request_url; - } - - function GetReportUrl(){ - return $this->report_url; - } - /** - * @access private - */ - function GetAuthenticationHeaders() { - $headers = array(); - $headers[] = "Authorization: Basic ".base64_encode( - $this->merchant_id.':'.$this->merchant_key); - $headers[] = "Content-Type: application/xml; charset=UTF-8"; - $headers[] = "Accept: application/xml; charset=UTF-8"; - $headers[] = "User-Agent: GC-PHP-Sample_code (" . PHP_SAMPLE_CODE_VERSION . "/ropu)"; - return $headers; - } - /** - * Set the proxy to be used by the connections to the outside - * - * @param array $proxy Array('host' => 'proxy-host', 'port' => 'proxy-port') - * - */ - function SetProxy($proxy=array()) { - if(is_array($proxy) && count($proxy)) { - $this->proxy['host'] = $proxy['host']; - $this->proxy['port'] = $proxy['port']; - } - } - - /** - * @access private - */ - function SendReq($url, $header_arr, $postargs, $timeout=false) { - // Get the curl session object - $session = curl_init($url); - $this->log->LogRequest($postargs); - // Set the POST options. - curl_setopt($session, CURLOPT_POST, true); - curl_setopt($session, CURLOPT_HTTPHEADER, $header_arr); - curl_setopt($session, CURLOPT_POSTFIELDS, $postargs); - curl_setopt($session, CURLOPT_HEADER, true); - curl_setopt($session, CURLOPT_RETURNTRANSFER, true); - - if(!empty($this->certPath) && file_exists($this->certPath)) { - curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true); - curl_setopt($session, CURLOPT_CAINFO, $this->certPath); - } - else { - curl_setopt($session, CURLOPT_SSL_VERIFYPEER, false); - } - - if(is_array($this->proxy) && count($this->proxy)) { - curl_setopt($session, CURLOPT_PROXY, - $this->proxy['host'] . ":" . $this->proxy['port']); - } - if($timeout != false){ - curl_setopt($session, CURLOPT_TIMEOUT, $timeout); - - } - // Do the POST and then close the session - $response = curl_exec($session); - if (curl_errno($session)) { - $this->log->LogError(curl_error($session)); - return array("CURL_ERR", curl_error($session)); - } else { - curl_close($session); - } - $heads = $this->parse_headers($response); - $body_xml = $this->get_body_x($response); - - try { - $b_e = new SimpleXMLElement($body_xml); - if ($b_e and !empty($b_e->{'error-message'})) { - $body = implode(",\n", $b_e->{'error-message'}->getChildren()); - } - } catch (Exception $e) { - //$body = htmlentities($b_x); - } -// // Get HTTP Status code from the response - $status_code = array(); - preg_match('/\d\d\d/', $heads[0], $status_code); - - - // Check for errors - switch( $status_code[0] ) { - case 200: - // Success - $this->log->LogResponse($response); - return array(200, $body); - break; - case 503: - $this->log->LogError($response); - return array(503, htmlentities($body)); - break; - case 403: - $this->log->LogError($response); - return array(403, htmlentities($body)); - break; - case 400: - $this->log->LogError($response); - return array(400, htmlentities($body)); - break; - default: - $this->log->LogError($response); - return array("ERR", htmlentities($body)); - break; - } - } - -// Private functions -// Function to get HTTP headers, -// will also work with HTTP 200 status added by some proxy servers - /** - * @access private - */ - function parse_headers($message) { - $head_end = strpos($message, DOUBLE_ENTER); - $headers = $this->get_headers_x(substr($message,0, - $head_end + strlen(DOUBLE_ENTER))); - if(!is_array($headers) || empty($headers)){ - return null; - } - if(!preg_match('%[HTTP/\d\.\d] (\d\d\d)%', $headers[0], $status_code)) { - return null; - } - switch( $status_code[1] ) { - case '200': - $parsed = $this->parse_headers(substr($message, - $head_end + strlen(DOUBLE_ENTER))); - return is_null($parsed)?$headers:$parsed; - break; - default: - return $headers; - break; - } - } - - /** - * @access private - */ - function get_headers_x($heads, $format=0) { - $fp = explode(ENTER, $heads); - foreach($fp as $header){ - if($header == "") { - $eoheader = true; - break; - } else { - $header = trim($header); - } - - if($format == 1) { - $key = array_shift(explode(':',$header)); - if($key == $header) { - $headers[] = $header; - } else { - $headers[$key]=substr($header,strlen($key)+2); - } - unset($key); - } else { - $headers[] = $header; - } - } - return $headers; - } - - /** - * @access private - */ - function get_body_x($heads){ - $fp = explode(DOUBLE_ENTER, $heads, 2); - return $fp[1]; - } - } - -class GoogleShipItem { - var $merchant_item_id; - var $tracking_data_list; - var $tracking_no; - - function GoogleShipItem($merchant_item_id, $tracking_data_list=array()) { - $this->merchant_item_id = $merchant_item_id; - $this->tracking_data_list = $tracking_data_list; - } - - function AddTrackingData($carrier, $tracking_no) { - if($carrier != "" && $tracking_no != "") { - $this->tracking_data_list[] = array('carrier' => $carrier, - 'tracking-number' => $tracking_no); - } - } -} -?> diff --git a/vendor/php-payments/vendor/google_checkout/library/googleresponse.php b/vendor/php-payments/vendor/google_checkout/library/googleresponse.php deleted file mode 100755 index ce81b6e68186..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/googleresponse.php +++ /dev/null @@ -1,225 +0,0 @@ -merchant_id = $id; - $this->merchant_key = $key; - $this->schema_url = "http://checkout.google.com/schema/2"; - require_once(dirname(__FILE__).'/googlelog.php'); - $this->log = new GoogleLog('', '', L_OFF); - } - - /** - * @param string $id the merchant id - * @param string $key the merchant key - */ - function SetMerchantAuthentication($id, $key){ - $this->merchant_id = $id; - $this->merchant_key = $key; - } - - function SetLogFiles($errorLogFile, $messageLogFile, $logLevel=L_ERR_RQST) { - $this->log = new GoogleLog($errorLogFile, $messageLogFile, $logLevel); - } - - /** - * Verifies that the authentication sent by Google Checkout matches the - * merchant id and key - * - * @param string $headers the headers from the request - */ - function HttpAuthentication($headers=null, $die=true) { - if(!is_null($headers)) { - $_SERVER = $headers; - } - if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { - $compare_mer_id = $_SERVER['PHP_AUTH_USER']; - $compare_mer_key = $_SERVER['PHP_AUTH_PW']; - } - // IIS Note:: For HTTP Authentication to work with IIS, - // the PHP directive cgi.rfc2616_headers must be set to 0 (the default value). - else if(isset($_SERVER['HTTP_AUTHORIZATION'])){ - list($compare_mer_id, $compare_mer_key) = explode(':', - base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], - strpos($_SERVER['HTTP_AUTHORIZATION'], " ") + 1))); - } else if(isset($_SERVER['Authorization'])) { - list($compare_mer_id, $compare_mer_key) = explode(':', - base64_decode(substr($_SERVER['Authorization'], - strpos($_SERVER['Authorization'], " ") + 1))); - } else { - $this->SendFailAuthenticationStatus( - "Failed to Get Basic Authentication Headers",$die); - return false; - } - if($compare_mer_id != $this->merchant_id - || $compare_mer_key != $this->merchant_key) { - $this->SendFailAuthenticationStatus("Invalid Merchant Id/Key Pair",$die); - return false; - } - return true; - } - - function ProcessMerchantCalculations($merchant_calc) { - $this->SendOKStatus(); - $result = $merchant_calc->GetXML(); - echo $result; - } - -// Notification API - function ProcessNewOrderNotification() { - $this->SendAck(); - } - function ProcessRiskInformationNotification() { - $this->SendAck(); - } - function ProcessOrderStateChangeNotification() { - $this->SendAck(); - } -// Amount Notifications - function ProcessChargeAmountNotification() { - $this->SendAck(); - } - function ProcessRefundAmountNotification() { - $this->SendAck(); - } - function ProcessChargebackAmountNotification() { - $this->SendAck(); - } - function ProcessAuthorizationAmountNotification() { - $this->SendAck(); - } - - function SendOKStatus() { - header('HTTP/1.0 200 OK'); - } - - /** - * Set the response header indicating an erroneous authentication from - * Google Checkout - * - * @param string $msg the message to log - */ - function SendFailAuthenticationStatus($msg="401 Unauthorized Access", - $die=true) { - $this->log->logError($msg); - header('WWW-Authenticate: Basic realm="GoogleCheckout PHPSample Code"'); - header('HTTP/1.0 401 Unauthorized'); - if($die) { - die($msg); - } else { - echo $msg; - } - } - - /** - * Set the response header indicating a malformed request from Google - * Checkout - * - * @param string $msg the message to log - */ - function SendBadRequestStatus($msg="400 Bad Request", $die=true) { - $this->log->logError($msg); - header('HTTP/1.0 400 Bad Request'); - if($die) { - die($msg); - } else { - echo $msg; - } - } - - /** - * Set the response header indicating that an internal error ocurred and - * the notification sent by Google Checkout can't be processed right now - * - * @param string $msg the message to log - */ - function SendServerErrorStatus($msg="500 Internal Server Error", - $die=true) { - $this->log->logError($msg); - header('HTTP/1.0 500 Internal Server Error'); - if($die) { - die($msg); - } else { - echo $msg; - } - } - - /** - * Send an acknowledgement in response to Google Checkout's request - * @param string $serial serial number of notification for acknowledgement - */ - function SendAck($serial=null, $die=true) { - $this->SendOKStatus(); - $acknowledgment = "" . - "schema_url . "\""; - if(isset($serial)) { - $acknowledgment .=" serial-number=\"" . $serial."\""; - } - $acknowledgment .= " />"; - $this->log->LogResponse($acknowledgment); - if($die) { - die($acknowledgment); - } else { - echo $acknowledgment; - } - } - - /** - * @access private - */ - function GetParsedXML($request=null){ - if(!is_null($request)) { - $this->log->LogRequest($request); - $this->response = $request; - require_once(dirname(__FILE__).'/xml-processing/gc_xmlparser.php'); - - $this->xml_parser = new gc_XmlParser($request); - $this->root = $this->xml_parser->GetRoot(); - $this->data = $this->xml_parser->GetData(); - } - return array($this->root, $this->data); - } - } -?> diff --git a/vendor/php-payments/vendor/google_checkout/library/googleresult.php b/vendor/php-payments/vendor/google_checkout/library/googleresult.php deleted file mode 100755 index cbb1315cdfab..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/googleresult.php +++ /dev/null @@ -1,105 +0,0 @@ -} - */ - // refer to demo/responsehandlerdemo.php for usage of this code - class GoogleResult { - var $shipping_name; - var $address_id; - var $shippable; - var $ship_price; - - var $tax_amount; - - var $coupon_arr = array(); - var $giftcert_arr = array(); - - /** - * @param integer $address_id the id of the anonymous address sent by - * Google Checkout. - */ - function GoogleResult($address_id) { - $this->address_id = $address_id; - } - - function SetShippingDetails($name, $price, $shippable = "true") { - $this->shipping_name = $name; - $this->ship_price = $price; - $this->shippable = $shippable; - } - - function SetTaxDetails($amount) { - $this->tax_amount = $amount; - } - - function AddCoupons($coupon) { - $this->coupon_arr[] = $coupon; - } - - function AddGiftCertificates($gift) { - $this->giftcert_arr[] = $gift; - } - } - - /** - * This is a class used to return the results of coupons the buyer supplied in - * the order page. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_coupon-result } - */ - class GoogleCoupons { - var $coupon_valid; - var $coupon_code; - var $coupon_amount; - var $coupon_message; - - function googlecoupons($valid, $code, $amount, $message) { - $this->coupon_valid = $valid; - $this->coupon_code = $code; - $this->coupon_amount = $amount; - $this->coupon_message = $message; - } - } - - /** - * This is a class used to return the results of gift certificates - * supplied by the buyer on the place order page - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_gift-certificate-result} - */ - - class GoogleGiftcerts { - var $gift_valid; - var $gift_code; - var $gift_amount; - var $gift_message; - - function googlegiftcerts($valid, $code, $amount, $message) { - $this->gift_valid = $valid; - $this->gift_code = $code; - $this->gift_amount = $amount; - $this->gift_message = $message; - } - } -?> diff --git a/vendor/php-payments/vendor/google_checkout/library/googleshipping.php b/vendor/php-payments/vendor/google_checkout/library/googleshipping.php deleted file mode 100755 index 00a1d68a141f..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/googleshipping.php +++ /dev/null @@ -1,532 +0,0 @@ -name = $name; - $this->price = $price; - } - - /** - * Adds a restriction to this shipping. - * - * @param GoogleShippingFilters $restrictions the shipping restrictions - */ - function AddShippingRestrictions($restrictions) { - $this->shipping_restrictions = $restrictions; - } - } - - /** - * Represents a merchant calculated shipping - * - * info: - * {@link http://code.google.com/apis/checkout/developer/index.html#shipping_xsd} - * {@link http://code.google.com/apis/checkout/developer/index.html#merchant_calculations_specifying} - */ - class GoogleMerchantCalculatedShipping { - - var $price; - var $name; - var $type = "merchant-calculated-shipping"; - var $shipping_restrictions; - var $address_filters; - - /** - * @param string $name a name for the shipping - * @param double $price the default price for this shipping, used if the - * calculation can't be made for some reason. - */ - function GoogleMerchantCalculatedShipping($name, $price) { - $this->price = $price; - $this->name = $name; - } - - /** - * Adds a restriction to this shipping. - * - * @param GoogleShippingFilters $restrictions the shipping restrictions - */ - function AddShippingRestrictions($restrictions) { - $this->shipping_restrictions = $restrictions; - } - - /** - * Adds an address filter to this shipping. - * - * @param GoogleShippingFilters $filters the address filters - */ - function AddAddressFilters($filters) { - $this->address_filters = $filters; - } - } - - /** - * Represents carrier calculated shipping - */ - class GoogleCarrierCalculatedShipping { - - var $name; - var $type = "carrier-calculated-shipping"; - - var $CarrierCalculatedShippingOptions = array(); -// var $ShippingPackages = array(); - var $ShippingPackage; - - /** - * @param string $name the name of this shipping - */ - function GoogleCarrierCalculatedShipping($name) { - $this->name = $name; - } - - /** - * @param GoogleCarrierCalculatedShippingOption $option the option to be - * added to the carrier calculated shipping - */ - function addCarrierCalculatedShippingOptions($option){ - $this->CarrierCalculatedShippingOptions[] = $option; - } - - /** - * @param GoogleShippingPackage $package - */ - function addShippingPackage($package){ -// $this->ShippingPackages[] = $package; - $this->ShippingPackage = $package; - } - } - - /** - * Represents a shipping method for which Google Checkout will obtain - * shipping costs for the order. - */ - class GoogleCarrierCalculatedShippingOption { - - var $price; - var $shipping_company; - var $shipping_type; - var $carrier_pickup; - var $additional_fixed_charge; - var $additional_variable_charge_percent; -// var $shipping_restrictions; -// var $address_filters; - - /** - * @param double $price the default shipping cost to be used if Google is - * unable to obtain the shipping_company's shipping rate for - * the option - * @param string $shipping_company the name of the shipping_company - * @param string $shipping_type the shipping option, valid values are here: - * http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Carrier_Calculated_Shipping.html#tag_shipping-type - * @param double $additional_fixed_charge a handling charge that will be - * added to the total cost of the order if this shipping option is selected. - * defaults to 0 - * @param double $additional_variable_charge_percent A percentage by which - * the shipping rate will be adjusted. The value may be positive or - * negative. defaults to 0. - * @param string $carrier_pickup Specifies how the package will be - * transfered from the merchand to the shipper. Valid values are - * "REGULAR_PICKUP", "SPECIAL_PICKUP", "DROP_OFF". Defaults to "DROP_OFF". - * - */ - function GoogleCarrierCalculatedShippingOption($price, $shipping_company, - $shipping_type, $additional_fixed_charge=0, - $additional_variable_charge_percent=0, $carrier_pickup='DROP_OFF') { - $this->price = (double)$price; - $this->shipping_company = $shipping_company; - $this->shipping_type = trim($shipping_type); - switch(strtoupper($carrier_pickup)){ - case 'DROP_OFF': - case 'REGULAR_PICKUP': - case 'SPECIAL_PICKUP': - $this->carrier_pickup = $carrier_pickup;; - break; - default: - $this->carrier_pickup = 'DROP_OFF'; - } - if($additional_fixed_charge){ - $this->additional_fixed_charge = (double)$additional_fixed_charge; - } - if($additional_variable_charge_percent){ - $this->additional_variable_charge_percent = (double)$additional_variable_charge_percent; - } - } - -// function AddShippingRestrictions($restrictions) { -// $this->shipping_restrictions = $restrictions; -// } -// -// function AddAddressFilters($filters) { -// $this->address_filters = $filters; -// } - } - - /** - * Represents an individual package that will be shipped to the buyer. - */ - class GoogleShippingPackage { - - var $width; - var $length; - var $height; - var $unit; - var $ship_from; - var $delivery_address_category; - - /** - * @param GoogleShipFrom $ship_from where the package ships from - * @param double $width the width of the package - * @param double $length the length of the package - * @param double $height the height of the package - * @param string $unit the unit used to measure the width/length/height - * of the package, valid values "IN", "CM" - * @param string $delivery_address_category indicates whether the shipping - * method should be applied to a residential or commercial address, valid - * values are "RESIDENTIAL", "COMMERCIAL" - */ - function GoogleShippingPackage($ship_from, $width, $length, $height, $unit, - $delivery_address_category='RESIDENTIAL') { - $this->width = (double)$width; - $this->length = (double)$length; - $this->height = (double)$height; - switch(strtoupper($unit)){ - case 'CM': - $this->unit = strtoupper($unit); - break; - case 'IN': - default: - $this->unit = 'IN'; - } - - $this->ship_from = $ship_from; - switch(strtoupper($delivery_address_category)){ - case 'COMMERCIAL': - $this->delivery_address_category = strtoupper($delivery_address_category); - break; - case 'RESIDENTIAL': - default: - $this->delivery_address_category = 'RESIDENTIAL'; - } - } - } - - /** - * Represents the location from where packages will be shipped from. - * Used with {@link GoogleShippingPackage}. - */ - class GoogleShipFrom { - var $id; - var $city; - var $country_code; - var $postal_code; - var $region; - - /** - * @param string $id an id for this address - * @param string $city the city - * @param string $country_code a 2-letter iso country code - * @param string $postal_code the zip - * @param string $region the region - */ - function GoogleShipFrom($id, $city, $country_code, - $postal_code, $region) { - $this->id = $id; - $this->city = $city; - $this->country_code = $country_code; - $this->postal_code = $postal_code; - $this->region = $region; - } - } - - /** - * - * Shipping restrictions contain information about particular areas where - * items can (or cannot) be shipped. - * - * More info: - * {@link http://code.google.com/apis/checkout/developer/index.html#tag_shipping-restrictions} - * - * Address filters identify areas where a particular merchant-calculated - * shipping method is available or unavailable. Address filters are applied - * before Google Checkout sends a to the - * merchant. Google Checkout will not ask you to calculate the cost of a - * particular shipping method for an address if the address filters in the - * Checkout API request indicate that the method is not available for the - * address. - * - * More info: - * {@link http://code.google.com/apis/checkout/developer/index.html#tag_address-filters} - */ - class GoogleShippingFilters { - - var $allow_us_po_box = true; - - var $allowed_restrictions = false; - var $excluded_restrictions = false; - - var $allowed_world_area = false; - var $allowed_country_codes_arr; - var $allowed_postal_patterns_arr; - var $allowed_country_area; - var $allowed_state_areas_arr; - var $allowed_zip_patterns_arr; - - var $excluded_country_codes_arr; - var $excluded_postal_patterns_arr; - var $excluded_country_area; - var $excluded_state_areas_arr; - var $excluded_zip_patterns_arr; - - function GoogleShippingFilters() { - $this->allowed_country_codes_arr = array(); - $this->allowed_postal_patterns_arr = array(); - $this->allowed_state_areas_arr = array(); - $this->allowed_zip_patterns_arr = array(); - - $this->excluded_country_codes_arr = array(); - $this->excluded_postal_patterns_arr = array(); - $this->excluded_state_areas_arr = array(); - $this->excluded_zip_patterns_arr = array(); - } - - /** - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_allow-us-po-box } - * - * @param bool $allow_us_po_box whether to allow delivery to PO boxes in US, - * defaults to true - */ - function SetAllowUsPoBox($allow_us_po_box = true) { - $this->allow_us_po_box = $allow_us_po_box; - } - - /** - * Set the world as allowed delivery area. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_world-area } - * - * @param bool $world_area Set worldwide allowed shipping, defaults to true - */ - function SetAllowedWorldArea($world_area = true) { - $this->allowed_restrictions = true; - $this->allowed_world_area = $world_area; - } - - // Allows - /** - * Add a postal area to be allowed for delivery. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_postal-area } - * - * @param string $country_code 2-letter iso country code - * @param string $postal_pattern Pattern that matches the postal areas to - * be allowed, as defined in {@link http://code.google.com/apis/checkout/developer/index.html#tag_postal-code-pattern} - */ - function AddAllowedPostalArea($country_code, $postal_pattern = "") { - $this->allowed_restrictions = true; - $this->allowed_country_codes_arr[] = $country_code; - $this->allowed_postal_patterns_arr[]= $postal_pattern; - } - - /** - * Add a us country area to be allowed for delivery. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_us-country-area } - * - * @param string $country_area the area to allow, one of "CONTINENTAL", - * "FULL_50_STATES" or "ALL" - * - */ - function SetAllowedCountryArea($country_area) { - switch ($country_area) { - case "CONTINENTAL_48": - case "FULL_50_STATES": - case "ALL": - $this->allowed_country_area = $country_area; - $this->allowed_restrictions = true; - break; - default: - $this->allowed_country_area = ""; - break; - } - } - - /** - * Allow shipping to areas specified by state. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_us-state-area } - * - * @param array $areas Areas to be allowed - */ - function SetAllowedStateAreas($areas) { - $this->allowed_restrictions = true; - $this->allowed_state_areas_arr = $areas; - } - - /** - * Allow shipping to areas specified by state. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_us-state-area } - * - * @param string $area Area to be allowed - */ - function AddAllowedStateArea($area) { - $this->allowed_restrictions = true; - $this->allowed_state_areas_arr[] = $area; - } - - /** - * Allow shipping to areas specified by zip patterns. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_us-zip-area } - * - * @param array $zips - */ - function SetAllowedZipPatterns($zips) { - $this->allowed_restrictions = true; - $this->allowed_zip_patterns_arr = $zips; - } - - /** - * Allow shipping to area specified by zip pattern. - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_us-zip-area } - * - * @param string - */ - function AddAllowedZipPattern($zip) { - $this->allowed_restrictions = true; - $this->allowed_zip_patterns_arr[] = $zip; - } - - /** - * Exclude postal areas from shipping. - * - * @see AddAllowedPostalArea - */ - function AddExcludedPostalArea($country_code, $postal_pattern = "") { - $this->excluded_restrictions = true; - $this->excluded_country_codes_arr[] = $country_code; - $this->excluded_postal_patterns_arr[]= $postal_pattern; - } - - /** - * Exclude state areas from shipping. - * - * @see SetAllowedStateAreas - */ - function SetExcludedStateAreas($areas) { - $this->excluded_restrictions = true; - $this->excluded_state_areas_arr = $areas; - } - - /** - * Exclude state area from shipping. - * - * @see AddAllowedStateArea - */ - function AddExcludedStateArea($area) { - $this->excluded_restrictions = true; - $this->excluded_state_areas_arr[] = $area; - } - - /** - * Exclude shipping to area specified by zip pattern. - * - * @see SetAllowedZipPatterns - */ - function SetExcludedZipPatternsStateAreas($zips) { - $this->excluded_restrictions = true; - $this->excluded_zip_patterns_arr = $zips; - } - - /** - * Exclude shipping to area specified by zip pattern. - * - * @see AddExcludedZipPattern - */ - function SetAllowedZipPatternsStateArea($zip) { - $this->excluded_restrictions = true; - $this->excluded_zip_patterns_arr[] = $zip; - } - - /** - * Exclude shipping to country area - * - * @see SetAllowedCountryArea - */ - function SetExcludedCountryArea($country_area) { - switch ($country_area) { - case "CONTINENTAL_48": - case "FULL_50_STATES": - case "ALL": - $this->excluded_country_area = $country_area; - $this->excluded_restrictions = true; - break; - - default: - $this->excluded_country_area = ""; - break; - } - } - } - - /** - * Used as a shipping option in which neither a carrier nor a ship-to - * address is specified - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_pickup} - */ - class GooglePickUp { - - var $price; - var $name; - var $type = "pickup"; - - /** - * @param string $name the name of this shipping option - * @param double $price the handling cost (if there is one) - */ - function GooglePickUp($name, $price) { - $this->price = $price; - $this->name = $name; - } - } -?> diff --git a/vendor/php-payments/vendor/google_checkout/library/googlesubscription.php b/vendor/php-payments/vendor/google_checkout/library/googlesubscription.php deleted file mode 100755 index 3a4908ca71e3..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/googlesubscription.php +++ /dev/null @@ -1,91 +0,0 @@ -} - * @param string $type type of subscription google or merchant handled -- required - * @param string $period period to charge for subscriptions --required - * subscriptions - * @param int $times number of times the customer will be charged -- optional - * @param double $maximum maximum possible total for subscription period -- required - * @param googleitem $item recurrent-item to charge --optional for merchant handled - */ - function GoogleSubscription($type, $period, $maximum, $times='', $item='') { - $this->subscription_type = $type; - $this->subscription_period = $period; - $this->maximum_charge = $maximum; - if($times != '') - $this->subscription_payment_times = $times; - if($item != '') - $this->recurrent_item = $item; - } - - /** - * Sets the start date of the subscription - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/Google_Checkout_Beta_Subscriptions.html#tag_subscription} - * - * @param date start date of subscription - */ - function SetStartDate($startdate){ - $this->subscription_start_date = $startdate; - } - - /** - * Sets the end date of the subscription - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/Google_Checkout_Beta_Subscriptions.html#tag_subscription} - * - * @param date end date of subscription - */ - function SetNoChargeAfter($nocharge){ - $this->subscription_no_charge_after = $nocharge; - } - - /** - * Sets the recurring item for Google - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/Google_Checkout_Beta_Subscriptions.html#tag_recurrent-item} - * - * @param item googleitem recurring item to charge - */ - function SetItem($item){ - $this->recurrent_item = $item; - } - } -?> - - diff --git a/vendor/php-payments/vendor/google_checkout/library/googletax.php b/vendor/php-payments/vendor/google_checkout/library/googletax.php deleted file mode 100755 index ce508ee7eaa1..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/googletax.php +++ /dev/null @@ -1,146 +0,0 @@ -world_area = $world_area; - } - - function AddPostalArea($country_code, $postal_pattern = "") { - $this->country_codes_arr[] = $country_code; - $this->postal_patterns_arr[]= $postal_pattern; - } - - function SetStateAreas($areas) { - if(is_array($areas)) - $this->state_areas_arr = $areas; - else - $this->state_areas_arr = array($areas); - } - - function SetZipPatterns($zips) { - if(is_array($zips)) - $this->zip_patterns_arr = $zips; - else - $this->zip_patterns_arr = array($zips); - } - - function SetCountryArea($country_area) { - switch ($country_area) { - case "CONTINENTAL_48": - case "FULL_50_STATES": - case "ALL": - $this->country_area = $country_area; - break; - default: - $this->country_area = ""; - break; - } - } - } - - /** - * Represents a default tax rule - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_default-tax-rule } - */ - class GoogleDefaultTaxRule extends GoogleTaxRule { - - var $shipping_taxed = false; - - function GoogleDefaultTaxRule($tax_rate, $shipping_taxed = "false") { - $this->tax_rate = $tax_rate; - $this->shipping_taxed= $shipping_taxed; - - $this->country_codes_arr = array(); - $this->postal_patterns_arr = array(); - $this->state_areas_arr = array(); - $this->zip_patterns_arr = array(); - } - } - - /** - * Represents an alternate tax rule - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_alternate-tax-rule } - */ - class GoogleAlternateTaxRule extends GoogleTaxRule { - - function GoogleAlternateTaxRule($tax_rate) { - $this->tax_rate = $tax_rate; - - $this->country_codes_arr = array(); - $this->postal_patterns_arr = array(); - $this->state_areas_arr = array(); - $this->zip_patterns_arr = array(); - } - - } - - - /** - * Represents an alternate tax table - * - * GC tag: {@link http://code.google.com/apis/checkout/developer/index.html#tag_alternate-tax-table } - */ - class GoogleAlternateTaxTable { - - var $name; - var $tax_rules_arr; - var $standalone; - - function GoogleAlternateTaxTable($name = "", $standalone = "false") { - if($name != "") { - $this->name = $name; - $this->tax_rules_arr = array(); - $this->standalone = $standalone; - } - } - - function AddAlternateTaxRules($rules) { - $this->tax_rules_arr[] = $rules; - } - } - - -?> diff --git a/vendor/php-payments/vendor/google_checkout/library/htmlSignatureGen.php b/vendor/php-payments/vendor/google_checkout/library/htmlSignatureGen.php deleted file mode 100755 index d939e1a78d11..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/htmlSignatureGen.php +++ /dev/null @@ -1,92 +0,0 @@ -excluded_param_names) == TRUE) { - //Ignore this excluded parameter - } - else { - //$this->html_params[] = array('name' => $param_name, 'value' => $param_value); - $this->html_param_names[] = $param_name; - $this->html_param_values[] = $param_value; - } - } - - private function CalcHmacSha1($data) { - $key = $this->merchant_key; - $blocksize = 64; - $hashfunc = 'sha1'; - if (strlen($key) > $blocksize) { - $key = pack('H*', $hashfunc($key)); - } - $key = str_pad($key, $blocksize, chr(0x00)); - $ipad = str_repeat(chr(0x36), $blocksize); - $opad = str_repeat(chr(0x5c), $blocksize); - $hmac = pack( - 'H*', $hashfunc( - ($key^$opad).pack( - 'H*', $hashfunc( - ($key^$ipad).$data - ) - ) - ) - ); - echo $hmac; - echo("\n"); - return $hmac; - } - - //This function generates and returns the signature - function GetSignature() { - //Sort parameters in ascending alphabetical order (first by name, then by value) - array_multisort($this->html_param_names, $this->html_param_values); - //Create parameter string - for($i=0; $ihtml_param_names); $i++) { - $param_string .= urlencode($this->html_param_names[$i]).'='.urlencode($this->html_param_values[$i]); - if($i+1 < sizeof($this->html_param_names)){ - $param_string .='&'; - } - } - echo($param_string); - echo("\n"); - $signature = base64_encode($this->CalcHmacSha1($param_string)); - return $signature; - } - } -?> \ No newline at end of file diff --git a/vendor/php-payments/vendor/google_checkout/library/xml-processing/gc_xmlbuilder.php b/vendor/php-payments/vendor/google_checkout/library/xml-processing/gc_xmlbuilder.php deleted file mode 100755 index 92f8ae4e8f7f..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/xml-processing/gc_xmlbuilder.php +++ /dev/null @@ -1,95 +0,0 @@ -indent = $indent; - $this->xml = ''."\n"; - } - - function _indent() { - for ($i = 0, $j = count($this->stack); $i < $j; $i++) { - $this->xml .= $this->indent; - } - } - - //Used when an element has sub-elements - // This function adds an open tag to the output - function Push($element, $attributes = array()) { - $this->_indent(); - $this->xml .= '<'.$element; - foreach ($attributes as $key => $value) { - if(!empty($value)) - $this->xml .= ' '.$key.'="'.htmlentities($value).'"'; - } - $this->xml .= ">\n"; - $this->stack[] = $element; - } - - //Used when an element has no subelements. - //Data within the open and close tags are provided with the - //contents variable - function Element($element, $content, $attributes = array()) { - $this->_indent(); - $this->xml .= '<'.$element; - foreach ($attributes as $key => $value) { - $this->xml .= ' '.$key.'="'.htmlentities($value).'"'; - } - $this->xml .= '>'.htmlentities($content).''."\n"; - } - - function EmptyElement($element, $attributes = array()) { - $this->_indent(); - $this->xml .= '<'.$element; - foreach ($attributes as $key => $value) { - $this->xml .= ' '.$key.'="'.htmlentities($value).'"'; - } - $this->xml .= " />\n"; - } - - //Used to close an open tag - function Pop($pop_element) { - $element = array_pop($this->stack); - $this->_indent(); - if($element !== $pop_element) - die('XML Error: Tag Mismatch when trying to close "'. $pop_element. '"'); - else - $this->xml .= "\n"; - } - - function GetXML() { - if(count($this->stack) != 0) - die ('XML Error: No matching closing tag found for " '. array_pop($this->stack). '"'); - else - return $this->xml; - } - } -?> diff --git a/vendor/php-payments/vendor/google_checkout/library/xml-processing/gc_xmlparser.php b/vendor/php-payments/vendor/google_checkout/library/xml-processing/gc_xmlparser.php deleted file mode 100755 index cc76423797c8..000000000000 --- a/vendor/php-payments/vendor/google_checkout/library/xml-processing/gc_xmlparser.php +++ /dev/null @@ -1,205 +0,0 @@ -) - Accept multiple options in a second parameter -* -**/ - -/* This uses SAX parser to convert XML data into PHP associative arrays - * When invoking the constructor with the input data, strip out the first XML line - * - * Member field Description: - * $params: This stores the XML data. The attributes and contents of XML tags - * can be accessed as follows - * - * - * data 1 - * - * data 2 - * - * - * - * print_r($this->params) will return - Array -( - [addresses] => Array - ( - [anonymous-address] => Array - ( - [0] => Array - ( - [id] => 123 - [test] => Array - ( - [VALUE] => data 1 - ) - - ) - - [1] => Array - ( - [id] => 456 - [test] => Array - ( - [VALUE] => data 2 - ) - - ) - - ) - - ) - -) - * gc_xmlparser returns an empty params array if it encounters - * any error during parsing - */ - // XML to Array - class gc_XmlParser { - - var $params = array(); //Stores the object representation of XML data - var $root = NULL; - var $global_index = -1; - var $fold = false; - - /* Constructor for the class - * Takes in XML data as input( do not include the tag - */ - function gc_XmlParser($input, $xmlParams=array(XML_OPTION_CASE_FOLDING => 0)) { - $xmlp = xml_parser_create(); - - //trim xml definition if it's defined - $input = trim(str_replace("", '', $input)); - foreach($xmlParams as $opt => $optVal) { - switch( $opt ) { - case XML_OPTION_CASE_FOLDING: - $this->fold = $optVal; - break; - default: - break; - } - xml_parser_set_option($xmlp, $opt, $optVal); - } - - if(xml_parse_into_struct($xmlp, $input, $vals, $index)) { - $this->root = $this->_foldCase($vals[0]['tag']); - $this->params = $this->xml2ary($vals); - } - xml_parser_free($xmlp); - } - - function _foldCase($arg) { - return( $this->fold ? strtoupper($arg) : $arg); - } - -/* - * Credits for the structure of this function - * http://mysrc.blogspot.com/2007/02/php-xml-to-array-and-backwards.html - * - * Adapted by Ropu - 05/23/2007 - * - */ - function xml2ary($vals) { - - $mnary=array(); - $ary=&$mnary; - foreach ($vals as $r) { - $t=$r['tag']; - if ($r['type']=='open') { - if (isset($ary[$t]) && !empty($ary[$t])) { - if (isset($ary[$t][0])){ - $ary[$t][]=array(); - } - else { - $ary[$t]=array($ary[$t], array()); - } - $cv=&$ary[$t][count($ary[$t])-1]; - } - else { - $cv=&$ary[$t]; - } - $cv=array(); - if (isset($r['attributes'])) { - foreach ($r['attributes'] as $k=>$v) { - $cv[$k]=$v; - } - } - - $cv['_p']=&$ary; - $ary=&$cv; - - } else if ($r['type']=='complete') { - if (isset($ary[$t]) && !empty($ary[$t])) { // same as open - if (isset($ary[$t][0])) { - $ary[$t][]=array(); - } - else { - $ary[$t]=array($ary[$t], array()); - } - $cv=&$ary[$t][count($ary[$t])-1]; - } - else { - $cv=&$ary[$t]; - } - if (isset($r['attributes'])) { - foreach ($r['attributes'] as $k=>$v) { - $cv[$k]=$v; - } - } - $cv['VALUE'] = (isset($r['value']) ? $r['value'] : ''); - - } elseif ($r['type']=='close') { - $ary=&$ary['_p']; - } - } - - $this->_del_p($mnary); - return $mnary; - } - - // _Internal: Remove recursion in result array - function _del_p(&$ary) { - foreach ($ary as $k=>$v) { - if ($k==='_p') { - unset($ary[$k]); - } - else if(is_array($ary[$k])) { - $this->_del_p($ary[$k]); - } - } - } - - /* Returns the root of the XML data */ - function GetRoot() { - return $this->root; - } - - /* Returns the array representing the XML data */ - function GetData() { - return $this->params; - } - } -?> diff --git a/vendor/php-payments/vendor/google_checkout/unitTest/classes/README b/vendor/php-payments/vendor/google_checkout/unitTest/classes/README deleted file mode 100755 index 4d915ee7e14d..000000000000 --- a/vendor/php-payments/vendor/google_checkout/unitTest/classes/README +++ /dev/null @@ -1,24 +0,0 @@ -DEPENDENCIES - -phpUnit runs on PHP3 or PHP4. - -phpUnit uses PCRE (Perl Compatible Regular Expressions). PCRE is -normally compiled into PHP, but it might be missing from custom builds -of PHP. - - -INSTALLATION - -Place the phpunit.php file so that it is in the PHP include_path for -the PHP code to be tested. Installing it in the same directory as the -code-under-test should work. - -The same phpunit.php file can be shared by any number of test suites. -You may wish to install phpunit.php in just one place and adjust the -PHP include_path to include that place. - - -EXAMPLES - -The self-test suite for phpUnit itself is currently the best (only) -example distributed with phpUnit. See phpunit_test.php. diff --git a/vendor/php-payments/vendor/google_checkout/unitTest/classes/phpunit.php b/vendor/php-payments/vendor/google_checkout/unitTest/classes/phpunit.php deleted file mode 100755 index a28759599e67..000000000000 --- a/vendor/php-payments/vendor/google_checkout/unitTest/classes/phpunit.php +++ /dev/null @@ -1,632 +0,0 @@ - -// OntoSys, Inc -// -// $Id: phpunit.php,v 1.11 2002/10/31 18:44:12 fredy Exp $ - -// Copyright (c) 2000 Fred Yankowski - -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, copy, -// modify, merge, publish, distribute, sublicense, and/or sell copies -// of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE | - E_CORE_ERROR | E_CORE_WARNING); - -/* -interface Test { - function run(&$aTestResult); - function countTestCases(); -} -*/ - -function trace($msg) { - return; - print($msg); - flush(); -} - -if (phpversion() >= '4') { - function PHPUnit_error_handler($errno, $errstr, $errfile, $errline) { - global $PHPUnit_testRunning; - $PHPUnit_testRunning[0]->fail("PHP ERROR: ".$errstr." in ".$errfile." at line ".$errline); - } -} - -class Exception { - /* Emulate a Java exception, sort of... */ - var $message; - var $type; - function Exception($message, $type = 'FAILURE') { - $this->message = $message; - $this->type = $type; - } - function getMessage() { - return $this->message; - } - function getType() { - return $this->type; - } -} - -class Assert { - function assert($boolean, $message=0) { - if (! $boolean) - $this->fail($message); - } - - function assertEquals($expected, $actual, $message=0) { - if (gettype($expected) != gettype($actual)) { - $this->failNotEquals($expected, $actual, "expected", $message); - return; - } - if (phpversion() < '4') { - if (is_object($expected) or is_object($actual) - or is_array($expected) or is_array($actual)) { - $this->error("INVALID TEST: cannot compare arrays or objects in PHP3"); - return; - } - } - if (phpversion() >= '4' && is_object($expected)) { - if (get_class($expected) != get_class($actual)) { - $this->failNotEquals($expected, $actual, "expected", $message); - return; - } - if (method_exists($expected, "equals")) { - if (! $expected->equals($actual)) { - $this->failNotEquals($expected, $actual, "expected", $message); - } - return; // no further tests after equals() - - } - } - if (phpversion() >= '4.0.4') { - if (is_null($expected) != is_null($actual)) { - $this->failNotEquals($expected, $actual, "expected", $message); - return; - } - } - if ($expected != $actual) { - $this->failNotEquals($expected, $actual, "expected", $message); - } - } - - function assertRegexp($regexp, $actual, $message=false) { - if (! preg_match($regexp, $actual)) { - $this->failNotEquals($regexp, $actual, "pattern", $message); - } - } - - function assertEqualsMultilineStrings($string0, $string1, - $message="") { - $lines0 = split("\n",$string0); - $lines1 = split("\n",$string1); - if (sizeof($lines0) != sizeof($lines1)) { - $this->failNotEquals(sizeof($lines0)." line(s)", - sizeof($lines1)." line(s)", "expected", $message); - } - for($i=0; $i< sizeof($lines0); $i++) { - $this->assertEquals(trim($lines0[$i]), - trim($lines1[$i]), - "line ".($i+1)." of multiline strings differ. ".$message); - } - } - - function _formatValue($value, $class="") { - $translateValue = $value; - if (phpversion() >= '4.0.0') { - if (is_object($value)) { - if (method_exists($value, "toString") ) { - $translateValue = $value->toString(); - } - else { - $translateValue = serialize($value); - } - } - else if (is_array($value)) { - $translateValue = serialize($value); - } - } - $htmlValue = "" - . htmlspecialchars($translateValue) . ""; - if (phpversion() >= '4.0.0') { - if (is_bool($value)) { - $htmlValue = $value ? "true" : "false"; - } - elseif (phpversion() >= '4.0.4' && is_null($value)) { - $htmlValue = "null"; - } - $htmlValue .= "   "; - $htmlValue .= "type:" . gettype($value); - $htmlValue .= is_object($value) ? ", class:" . get_class($value) : ""; - $htmlValue .= ""; - } - return $htmlValue; - } - - function failNotEquals($expected, $actual, $expected_label, $message=0) { - // Private function for reporting failure to match. - $str = $message ? ($message . ' ') : ''; - //$str .= "($expected_label/actual)
              "; - $str .= "
              "; - $str .= sprintf("%s
              %s", - $this->_formatValue($expected, "expected"), - $this->_formatValue($actual, "actual")); - $this->fail($str); - } -} - -class TestCase extends Assert /* implements Test */ { - /* Defines context for running tests. Specific context -- such as - instance variables, global variables, global state -- is defined - by creating a subclass that specializes the setUp() and - tearDown() methods. A specific test is defined by a subclass - that specializes the runTest() method. */ - var $fName; - var $fClassName; - var $fResult; - var $fExceptions = array(); - - function TestCase($name) { - $this->fName = $name; - } - - function run($testResult=0) { - /* Run this single test, by calling the run() method of the - TestResult object which will in turn call the runBare() method - of this object. That complication allows the TestResult object - to do various kinds of progress reporting as it invokes each - test. Create/obtain a TestResult object if none was passed in. - Note that if a TestResult object was passed in, it must be by - reference. */ - if (! $testResult) - $testResult = $this->_createResult(); - $this->fResult = $testResult; - $testResult->run(&$this); - $this->fResult = 0; - return $testResult; - } - - function classname() { - if (isset($this->fClassName)) { - return $this->fClassName; - } else { - return get_class($this); - } - } - - function countTestCases() { - return 1; - } - - function runTest() { - if (phpversion() >= '4') { - global $PHPUnit_testRunning; - eval('$PHPUnit_testRunning[0] = & $this;'); - // Saved ref to current TestCase, so that the error handler - // can access it. This code won't even parse in PHP3, so we - // hide it in an eval. - - $old_handler = set_error_handler("PHPUnit_error_handler"); - // errors will now be handled by our error handler - } - - $name = $this->name(); - if (phpversion() >= '4' && ! method_exists($this, $name)) { - $this->error("Method '$name' does not exist"); - } - else - $this->$name(); - -// if (phpversion() >= '4') { -// set_error_handler($old_handler); // revert to prior error handler -// $PHPUnit_testRunning = null; -// } - } - - function setUp() /* expect override */ { - //print("TestCase::setUp()
              \n"); - } - - function tearDown() /* possible override */ { - //print("TestCase::tearDown()
              \n"); - } - - //////////////////////////////////////////////////////////////// - - - function _createResult() /* protected */ { - /* override this to use specialized subclass of TestResult */ - return new TestResult; - } - - function fail($message=0) { - //printf("TestCase::fail(%s)
              \n", ($message) ? $message : ''); - /* JUnit throws AssertionFailedError here. We just record the - failure and carry on */ - $this->fExceptions[] = new Exception(&$message, 'FAILURE'); - } - - function error($message) { - /* report error that requires correction in the test script - itself, or (heaven forbid) in this testing infrastructure */ - $this->fExceptions[] = new Exception(&$message, 'ERROR'); - $this->fResult->stop(); // [does not work] - } - - function failed() { - reset($this->fExceptions); - while (list($key, $exception) = each($this->fExceptions)) { - if ($exception->type == 'FAILURE') - return true; - } - return false; - } - function errored() { - reset($this->fExceptions); - while (list($key, $exception) = each($this->fExceptions)) { - if ($exception->type == 'ERROR') - return true; - } - return false; - } - - function getExceptions() { - return $this->fExceptions; - } - - function name() { - return $this->fName; - } - - function runBare() { - $this->setup(); - $this->runTest(); - $this->tearDown(); - } -} - - -class TestSuite /* implements Test */ { - /* Compose a set of Tests (instances of TestCase or TestSuite), and - run them all. */ - var $fTests = array(); - var $fClassname; - - function TestSuite($classname=false) { - // Find all methods of the given class whose name starts with - // "test" and add them to the test suite. - - // PHP3: We are just _barely_ able to do this with PHP's limited - // introspection... Note that PHP seems to store method names in - // lower case, and we have to avoid the constructor function for - // the TestCase class superclass. Names of subclasses of TestCase - // must not start with "Test" since such a class will have a - // constructor method name also starting with "test" and we can't - // distinquish such a construtor from the real test method names. - // So don't name any TestCase subclasses as "Test..."! - - // PHP4: Never mind all that. We can now ignore constructor - // methods, so a test class may be named "Test...". - - if (empty($classname)) - return; - $this->fClassname = $classname; - - if (floor(phpversion()) >= 4) { - // PHP4 introspection, submitted by Dylan Kuhn - - $names = get_class_methods($classname); - while (list($key, $method) = each($names)) { - if (preg_match('/^test/', $method)) { - $test = new $classname($method); - if (strcasecmp($method, $classname) == 0 || is_subclass_of($test, $method)) { - // Ignore the given method name since it is a constructor: - // it's the name of our test class or it is the name of a - // superclass of our test class. (This code smells funny. - // Anyone got a better way?) - - //print "skipping $method
              "; - } - else { - $this->addTest($test); - } - } - } - } - else { // PHP3 - $dummy = new $classname("dummy"); - $names = (array) $dummy; - while (list($key, $value) = each($names)) { - $type = gettype($value); - if ($type == "user function" && preg_match('/^test/', $key) - && $key != "testcase") { - $this->addTest(new $classname($key)); - } - } - } - } - - function addTest($test) { - /* Add TestCase or TestSuite to this TestSuite */ - $this->fTests[] = $test; - } - - function run(&$testResult) { - /* Run all TestCases and TestSuites comprising this TestSuite, - accumulating results in the given TestResult object. */ - reset($this->fTests); - while (list($na, $test) = each($this->fTests)) { - if ($testResult->shouldStop()) - break; - $test->run(&$testResult); - } - } - - function countTestCases() { - /* Number of TestCases comprising this TestSuite (including those - in any constituent TestSuites) */ - $count = 0; - reset($fTests); - while (list($na, $test_case) = each($this->fTests)) { - $count += $test_case->countTestCases(); - } - return $count; - } -} - - -class TestFailure { - /* Record failure of a single TestCase, associating it with the - exception that occurred */ - var $fFailedTestName; - var $fException; - - function TestFailure(&$test, &$exception) { - $this->fFailedTestName = $test->name(); - $this->fException = $exception; - } - - function getExceptions() { - // deprecated - return array($this->fException); - } - function getException() { - return $this->fException; - } - - function getTestName() { - return $this->fFailedTestName; - } -} - - -class TestResult { - /* Collect the results of running a set of TestCases. */ - var $fFailures = array(); - var $fErrors = array(); - var $fRunTests = 0; - var $fStop = false; - - function TestResult() { } - - function _endTest($test) /* protected */ { - /* specialize this for end-of-test action, such as progress - reports */ - } - - function addError($test, $exception) { - $this->fErrors[] = new TestFailure(&$test, &$exception); - } - - function addFailure($test, $exception) { - $this->fFailures[] = new TestFailure(&$test, &$exception); - } - - function getFailures() { - return $this->fFailures; - } - - function run($test) { - /* Run a single TestCase in the context of this TestResult */ - $this->_startTest($test); - $this->fRunTests++; - - $test->runBare(); - - /* this is where JUnit would catch AssertionFailedError */ - $exceptions = $test->getExceptions(); - reset($exceptions); - while (list($key, $exception) = each($exceptions)) { - if ($exception->type == 'ERROR') - $this->addError($test, $exception); - else if ($exception->type == 'FAILURE') - $this->addFailure($test, $exception); - } - // if ($exceptions) - // $this->fFailures[] = new TestFailure(&$test, &$exceptions); - $this->_endTest($test); - } - - function countTests() { - return $this->fRunTests; - } - - function shouldStop() { - return $this->fStop; - } - - function _startTest($test) /* protected */ { - /* specialize this for start-of-test actions */ - } - - function stop() { - /* set indication that the test sequence should halt */ - $fStop = true; - } - - function errorCount() { - return count($this->fErrors); - } - function failureCount() { - return count($this->fFailures); - } - function countFailures() { - // deprecated - return $this->failureCount(); - } -} - - -class TextTestResult extends TestResult { - /* Specialize TestResult to produce text/html report */ - function TextTestResult() { - $this->TestResult(); // call superclass constructor - } - - function report() { - /* report result of test run */ - $nRun = $this->countTests(); - $nFailures = $this->failureCount(); - $nErrors = $this->errorCount(); - printf("

              %s test%s run
              ", $nRun, ($nRun == 1) ? '' : 's'); - printf("%s failure%s
              \n", $nFailures, ($nFailures == 1) ? '' : 's'); - printf("%s error%s.
              \n", $nErrors, ($nErrors == 1) ? '' : 's'); - - if ($nFailures > 0) { - print("

              Failures

              "); - print("
                \n"); - $failures = $this->getFailures(); - while (list($i, $failure) = each($failures)) { - $failedTestName = $failure->getTestName(); - printf("
              1. %s\n", $failedTestName); - - $exceptions = $failure->getExceptions(); - print("
                  "); - while (list($na, $exception) = each($exceptions)) - printf("
                • %s\n", $exception->getMessage()); - print("
                "); - } - print("
              \n"); - } - - if ($nErrors > 0) { - print("

              Errors

              "); - print("
                \n"); - reset($this->fErrors); - while (list($i, $error) = each($this->fErrors)) { - $erroredTestName = $error->getTestName(); - printf("
              1. %s\n", $failedTestName); - - $exception = $error->getException(); - print("
                  "); - printf("
                • %s\n", $exception->getMessage()); - print("
                "); - } - print("
              \n"); - - } - } - - function _startTest($test) { - if (phpversion() > '4') { - printf("%s - %s ", get_class($test), $test->name()); - } else { - printf("%s ", $test->name()); - } - flush(); - } - - function _endTest($test) { - $outcome = $test->failed() - ? "FAIL" - : "ok"; - printf("$outcome
              \n"); - flush(); - } -} - -// PrettyTestResult created by BJG 17/11/01 -// beacuse the standard test result provided looks -// rubbish. -class PrettyTestResult extends TestResult { - /* Specialize TestResult to produce text/html report */ - function PrettyTestResult() { - $this->TestResult(); // call superclass constructor - echo "

              Tests

              "; - - echo ""; - echo ""; - } - - function report() { - echo "
              ClassFunctionSuccess?
              "; - /* report result of test run */ - $nRun = $this->countTests(); - $nFailures = $this->countFailures(); - echo "

              Summary

              "; - - printf("

              %s test%s run
              ", $nRun, ($nRun == 1) ? '' : 's'); - printf("%s failure%s.
              \n", $nFailures, ($nFailures == 1) ? '' : 's'); - if ($nFailures == 0) - return; - - echo "

              Failure Details

              "; - print("
                \n"); - $failures = $this->getFailures(); - while (list($i, $failure) = each($failures)) { - $failedTestName = $failure->getTestName(); - printf("
              1. %s\n", $failedTestName); - - $exceptions = $failure->getExceptions(); - print("
                  "); - while (list($na, $exception) = each($exceptions)) - printf("
                • %s\n", $exception->getMessage()); - print("
                "); - } - print("
              \n"); - } - - function _startTest($test) { - printf("%s %s ", $test->classname(),$test->name()); - flush(); - } - - function _endTest($test) { - $outcome = $test->failed() - ? " class=\"Failure\">FAIL" - : " class=\"Pass\">OK"; - printf(""); - flush(); - } -} - -class TestRunner { - /* Run a suite of tests and report results. */ - function run($suite) { - $result = new TextTestResult; - $suite->run($result); - $result->report(); - } -} - -?> \ No newline at end of file diff --git a/vendor/php-payments/vendor/google_checkout/unitTest/error.log b/vendor/php-payments/vendor/google_checkout/unitTest/error.log deleted file mode 100755 index e69de29bb2d1..000000000000 diff --git a/vendor/php-payments/vendor/google_checkout/unitTest/message.log b/vendor/php-payments/vendor/google_checkout/unitTest/message.log deleted file mode 100755 index e69de29bb2d1..000000000000 diff --git a/vendor/php-payments/vendor/google_checkout/unitTest/stylesheet.css b/vendor/php-payments/vendor/google_checkout/unitTest/stylesheet.css deleted file mode 100755 index b2448252c436..000000000000 --- a/vendor/php-payments/vendor/google_checkout/unitTest/stylesheet.css +++ /dev/null @@ -1,64 +0,0 @@ - -body { - font:normal 68% verdana,arial,helvetica; - color:#000000; -} -table tr td, table tr th { - font-size: 68%; -} -table.details tr th{ - font-weight: bold; - text-align:left; - background:#a6caf0; -} -table.details tr{ - background:#eeeee0; -} - -p { - line-height:1.5em; - margin-top:0.5em; margin-bottom:1.0em; -} -h1 { - margin: 0px 0px 5px; font: 165% verdana,arial,helvetica -} -h2 { - margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica -} -h3 { - margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica -} -h4 { - margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica -} -h5 { - margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica -} -h6 { - margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica -} -.Error { - font-weight:bold; color:red; -} -.Failure, .Unexpected { - background:#ff0000; font-weight:bold; color:black; -} -.Unknown { - background:#ffff00; font-weight:bold; color:black; -} -.Pass, .Expected { - background:#00ff00; font-weight:bold; color:black; -} -.Properties { - text-align:right; -} - -CODE.expected { - color: green; background: none; font-weight: normal; -} -CODE.actual { - color: red; background: none; font-weight: normal; -} -.typeinfo { - color: gray; -} diff --git a/vendor/php-payments/vendor/google_checkout/unitTest/testGoogleCart.php b/vendor/php-payments/vendor/google_checkout/unitTest/testGoogleCart.php deleted file mode 100755 index 78a2137229d9..000000000000 --- a/vendor/php-payments/vendor/google_checkout/unitTest/testGoogleCart.php +++ /dev/null @@ -1,64 +0,0 @@ -TestCase($name); - } - - function setUp() { - /* put any common setup here */ - } - - function tearDown() { - /* put any common endup here */ - } - - function TestGoogleCartSimple(){ - $Gcart = new googlecart('123', 'abc', "sandbox", 'GBP'); - $Gitem = new GoogleItem('Name', - 'description', - '3', - '12.34'); - $Gitem->SetMerchantPrivateItemData( - new MerchantPrivateItemData('PrivateItemData')); - $Gitem->SetMerchantItemId('123-4321'); -// $Gitem->SetTaxTableSelector('TaxableGood'); - $Gcart->AddItem($Gitem); - $this->assertEquals(trim($Gcart->getXML()), - trim(' - - - - - Name - description - 12.34 - 3 - PrivateItemData - 123-4321 - - - - - - - -')); - - } - -} - -if(!isset($suite)) { - $suite = new TestSuite(); -} - -$suite->addTest(new TestGoogleCart("TestGoogleCartSimple")); - -?> \ No newline at end of file diff --git a/vendor/php-payments/vendor/google_checkout/unitTest/testGoogleLog.php b/vendor/php-payments/vendor/google_checkout/unitTest/testGoogleLog.php deleted file mode 100755 index 06ec0d294792..000000000000 --- a/vendor/php-payments/vendor/google_checkout/unitTest/testGoogleLog.php +++ /dev/null @@ -1,53 +0,0 @@ -TestCase($name); - } - - function setUp() { - /* put any common setup here */ - } - - function tearDown() { - /* put any common endup here */ - } - - function testGoogleLogFilesExist(){ - $Glog = new GoogleLog(API_CALLBACK_ERROR_LOG, API_CALLBACK_MESSAGE_LOG, L_ALL, false); - $this->assertEquals($Glog->logLevel, L_ALL, "This Should Pass"); - } - - function testGoogleLogError(){ - $Glog = new GoogleLog(API_CALLBACK_ERROR_LOG, API_CALLBACK_MESSAGE_LOG, L_ERR, false); - $this->assert($Glog->LogError("error")); - } - - function testGoogleLogRequest(){ - $Glog = new GoogleLog(API_CALLBACK_ERROR_LOG, API_CALLBACK_MESSAGE_LOG, L_RQST, false); - $this->assert($Glog->LogRequest("request")); - } - - function testGoogleLogResponse(){ - $Glog = new GoogleLog(API_CALLBACK_ERROR_LOG, API_CALLBACK_MESSAGE_LOG, L_RESP, false); - $this->assert($Glog->LogResponse("response")); - } -} - -if(!isset($suite)) { - $suite = new TestSuite(); -} - -$suite->addTest(new TestGoogleLog("testGoogleLogFilesExist")); -$suite->addTest(new TestGoogleLog("testGoogleLogError")); -$suite->addTest(new TestGoogleLog("testGoogleLogRequest")); -$suite->addTest(new TestGoogleLog("testGoogleLogResponse")); - -?> \ No newline at end of file diff --git a/vendor/php-payments/vendor/google_checkout/unitTest/testGoogleXMLParser.php b/vendor/php-payments/vendor/google_checkout/unitTest/testGoogleXMLParser.php deleted file mode 100755 index f843bc9cf842..000000000000 --- a/vendor/php-payments/vendor/google_checkout/unitTest/testGoogleXMLParser.php +++ /dev/null @@ -1,379 +0,0 @@ -TestCase($name); - } - - function setUp() { - /* put any common setup here */ - } - - function tearDown() { - /* put any common endup here */ - } - - function testGoogleXMLParserGetRoot(){ - $xml = ' - - data 1 - - - data 2 - - '; - - $xml_parsed = new xmlParser($xml); - $this->assertEquals($xml_parsed->getRoot(), 'addresses'); - } - - function testGoogleXMLParserGetDataSimpleXML(){ - $xml = ' - - data 1 - - - data 2 - - '; - - $xml_parsed = new xmlParser($xml); - $data = $xml_parsed->getData(); - - $this->assertEquals(serialize($data), 'a:1:{s:9:"addresses";a:1:{s:17:"anonymous-address";a:2:{i:0;a:2:{s:2:"id";s:3:"123";s:4:"test";a:1:{s:5:"VALUE";s:7:"data 1 ";}}i:1;a:2:{s:2:"id";s:3:"456";s:4:"test";a:1:{s:5:"VALUE";s:7:"data 2 ";}}}}}'); - } - - function testGoogleXMLParserGetDataMediumXML(){ - $xml = ' - - - - canada - Theres Something About Mary Linked - 1 - 49.99 - 19 - - YToxNzp7czoyOiJpZCI7aToxOTtzOjg6ImNhdGVnb3J5IjtzOjI6IjEyIjtzOjQ6Im5hbWUiO3M6MzU6IlRoZXJlJ3MgU29tZXRoaW5nIEFib3V0IE1hcnkgTGlua2VkIjtzOjU6Im1vZGVsIjtzOjg6IkRWRC1UU0FCIjtzOjU6ImltYWdlIjtzOjM1OiJkdmQvdGhlcmVzX3NvbWV0aGluZ19hYm91dF9tYXJ5LmdpZiI7czo1OiJwcmljZSI7czo3OiI0OS45OTAwIjtzOjg6InF1YW50aXR5IjtpOjE7czo2OiJ3ZWlnaHQiO2k6NztzOjExOiJmaW5hbF9wcmljZSI7ZDo0OS45OTAwMDAwMDAwMDAwMDE5ODk1MTk2NjAxMjgyODA1MjA0MzkxNDc5NDkyMTg3NTtzOjE1OiJvbmV0aW1lX2NoYXJnZXMiO2k6MDtzOjEyOiJ0YXhfY2xhc3NfaWQiO3M6MToiMyI7czoxMDoiYXR0cmlidXRlcyI7czowOiIiO3M6MTc6ImF0dHJpYnV0ZXNfdmFsdWVzIjtzOjA6IiI7czoyODoicHJvZHVjdHNfcHJpY2VkX2J5X2F0dHJpYnV0ZSI7czoxOiIwIjtzOjE1OiJwcm9kdWN0X2lzX2ZyZWUiO3M6MToiMCI7czoyMjoicHJvZHVjdHNfZGlzY291bnRfdHlwZSI7czoxOiIwIjtzOjI3OiJwcm9kdWN0c19kaXNjb3VudF90eXBlX2Zyb20iO3M6MToiMCI7fQ== - - - - - - f2f7a0b668ff17095fb996420b8f428c;zenid - - - 192.168.128.150 - - - - - 672088952143679 - - - - - - - - US - miami - FL - 33013 - - - - - - false - - en_US - -'; - - $xml_parsed = new xmlParser($xml); - $data = $xml_parsed->getData(); - $this->assertEquals(serialize($data), - 'a:1:{s:29:"merchant-calculation-callback";a:6:{s:5:"xmlns";s:35:"http:' . - '//checkout.google.com/schema/2";s:13:"serial-number";s:36:"f1554537-ae' . - 'eb-4317-9f34-9a88c104d8ae";s:13:"shopping-cart";a:2:{s:5:"items";a:1:' . - '{s:4:"item";a:7:{s:18:"tax-table-selector";a:1:{s:5:"VALUE";s:6:"canad' . - 'a";}s:9:"item-name";a:1:{s:5:"VALUE";s:34:"Theres Something About Mary' . - ' Linked";}s:8:"quantity";a:1:{s:5:"VALUE";s:1:"1";}s:10:"unit-price";a' . - ':2:{s:8:"currency";s:3:"USD";s:5:"VALUE";s:5:"49.99";}s:16:"merchant-i' . - 'tem-id";a:1:{s:5:"VALUE";s:2:"19";}s:16:"item-description";a:1:{s:5:"V' . - 'ALUE";s:0:"";}s:26:"merchant-private-item-data";a:1:{s:5:"VALUE";s:780' . - ':"YToxNzp7czoyOiJpZCI7aToxOTtzOjg6ImNhdGVnb3J5IjtzOjI6IjEyIjtzOjQ6Im5h' . - 'bWUiO3M6MzU6IlRoZXJlJ3MgU29tZXRoaW5nIEFib3V0IE1hcnkgTGlua2VkIjtzOjU6Im' . - '1vZGVsIjtzOjg6IkRWRC1UU0FCIjtzOjU6ImltYWdlIjtzOjM1OiJkdmQvdGhlcmVzX3Nv' . - 'bWV0aGluZ19hYm91dF9tYXJ5LmdpZiI7czo1OiJwcmljZSI7czo3OiI0OS45OTAwIjtzOj' . - 'g6InF1YW50aXR5IjtpOjE7czo2OiJ3ZWlnaHQiO2k6NztzOjExOiJmaW5hbF9wcmljZSI7' . - 'ZDo0OS45OTAwMDAwMDAwMDAwMDE5ODk1MTk2NjAxMjgyODA1MjA0MzkxNDc5NDkyMTg3NT' . - 'tzOjE1OiJvbmV0aW1lX2NoYXJnZXMiO2k6MDtzOjEyOiJ0YXhfY2xhc3NfaWQiO3M6MToi' . - 'MyI7czoxMDoiYXR0cmlidXRlcyI7czowOiIiO3M6MTc6ImF0dHJpYnV0ZXNfdmFsdWVzIj' . - 'tzOjA6IiI7czoyODoicHJvZHVjdHNfcHJpY2VkX2J5X2F0dHJpYnV0ZSI7czoxOiIwIjtz' . - 'OjE1OiJwcm9kdWN0X2lzX2ZyZWUiO3M6MToiMCI7czoyMjoicHJvZHVjdHNfZGlzY291bn' . - 'RfdHlwZSI7czoxOiIwIjtzOjI3OiJwcm9kdWN0c19kaXNjb3VudF90eXBlX2Zyb20iO3M6' . - 'MToiMCI7fQ==";}}}s:21:"merchant-private-data";a:2:{s:12:"session-data"' . - ';a:1:{s:5:"VALUE";s:38:"f2f7a0b668ff17095fb996420b8f428c;zenid";}s:10:' . - '"ip-address";a:1:{s:5:"VALUE";s:15:"192.168.128.150";}}}s:8:"buyer-id"' . - ';a:1:{s:5:"VALUE";s:15:"672088952143679";}s:9:"calculate";a:4:{s:8:"sh' . - 'ipping";a:1:{s:6:"method";a:2:{i:0;a:2:{s:4:"name";s:32:"Per Item Nati' . - 'onal: Item National";s:5:"VALUE";s:0:"";}i:1;a:2:{s:4:"name";s:18:"Zon' . - 'es: Zones Rates";s:5:"VALUE";s:0:"";}}}s:9:"addresses";a:1:{s:17:"anon' . - 'ymous-address";a:5:{s:2:"id";s:15:"562553315477382";s:12:"country-code' . - '";a:1:{s:5:"VALUE";s:2:"US";}s:4:"city";a:1:{s:5:"VALUE";s:5:"miami";}' . - 's:6:"region";a:1:{s:5:"VALUE";s:2:"FL";}s:11:"postal-code";a:1:{s:5:"V' . - 'ALUE";s:5:"33013";}}}s:21:"merchant-code-strings";a:1:{s:20:"merchant-' . - 'code-string";a:2:{s:4:"code";s:3:"123";s:5:"VALUE";s:0:"";}}s:3:"tax";' . - 'a:1:{s:5:"VALUE";s:5:"false";}}s:14:"buyer-language";a:1:{s:5:"VALUE";' . - 's:5:"en_US";}}}'); - } - - function testGoogleXMLParserGetDataComplexXML(){ - $xml = ' - - - - - Microsoft IntelliMouse Explorer - [Model:USB] - 70.95 - 1 - YToxODp7czoyOiJpZCI7czozNToiMjY6NDYxNDc2NmQ3OGIyNmZiNzFiZmQyMWQwOWY5ZWI5OGMiO3M6ODoiY2F0ZWdvcnkiO3M6MToiOSI7czo0OiJuYW1lIjtzOjMxOiJNaWNyb3NvZnQgSW50ZWxsaU1vdXNlIEV4cGxvcmVyIjtzOjU6Im1vZGVsIjtzOjc6Ik1TSU1FWFAiO3M6NToiaW1hZ2UiO3M6MjQ6Im1pY3Jvc29mdC9pbWV4cGxvcmVyLmdpZiI7czo1OiJwcmljZSI7czo3OiI2NC45NTAwIjtzOjg6InF1YW50aXR5IjtpOjE7czo2OiJ3ZWlnaHQiO2k6ODtzOjExOiJmaW5hbF9wcmljZSI7ZDo3MC45NTAwMDAwMDAwMDAwMDI4NDIxNzA5NDMwNDA0MDA3NDM0ODQ0OTcwNzAzMTI1O3M6MTU6Im9uZXRpbWVfY2hhcmdlcyI7aTowO3M6MTI6InRheF9jbGFzc19pZCI7czoxOiIxIjtzOjEwOiJhdHRyaWJ1dGVzIjthOjE6e2k6MztzOjE6IjkiO31zOjE3OiJhdHRyaWJ1dGVzX3ZhbHVlcyI7czowOiIiO3M6Mjg6InByb2R1Y3RzX3ByaWNlZF9ieV9hdHRyaWJ1dGUiO3M6MToiMCI7czoxNToicHJvZHVjdF9pc19mcmVlIjtzOjE6IjAiO3M6MjI6InByb2R1Y3RzX2Rpc2NvdW50X3R5cGUiO3M6MToiMCI7czoyNzoicHJvZHVjdHNfZGlzY291bnRfdHlwZV9mcm9tIjtzOjE6IjAiO2k6MzthOjU6e3M6MjE6InByb2R1Y3RzX29wdGlvbnNfbmFtZSI7czo1OiJNb2RlbCI7czoxNzoib3B0aW9uc192YWx1ZXNfaWQiO3M6MToiOSI7czoyODoicHJvZHVjdHNfb3B0aW9uc192YWx1ZXNfbmFtZSI7czozOiJVU0IiO3M6MjA6Im9wdGlvbnNfdmFsdWVzX3ByaWNlIjtzOjY6IjYuMDAwMCI7czoxMjoicHJpY2VfcHJlZml4IjtzOjE6IisiO319 - 26:4614766d78b26fb71bfd21d09f9eb98c - Taxable Goods - - - - f2f7a0b668ff17095fb996420b8f428c;zenid - 192.168.128.150 - - - - - http://200.69.205.154/~brovagnati/zen_demo2/index.php?main_page=shopping_cart - http://200.69.205.154/~brovagnati/zen_demo2/index.php?main_page=shopping_cart - - - 10 - - true - - - - - - US - - - - - true - - - - - - US - - - - - - 5 - - true - - - - - - true - - - - - - - 1 - - true - - - - - - true - - - - - - - 2 - - true - - - - - - US - - - - - true - - - - - - US - - - - - - true - - http://200.69.205.154/~brovagnati/zen_demo2/googlecheckout/responsehandler.php - true - false - - - - - - - 0.07 - - - - - - - - - - HALF_EVEN - PER_LINE - - - -'; - - $xml_parsed = new xmlParser($xml); - $data = $xml_parsed->getData(); - $this->assertEquals(serialize($data), - 'a:1:{s:22:"checkout-shopping-cart";a:3:{s:5:"xmlns";s:35:"http://checkou' . - 't.google.com/schema/2";s:13:"shopping-cart";a:2:{s:5:"items";a:1:{s:4:"i' . - 'tem";a:7:{s:9:"item-name";a:1:{s:5:"VALUE";s:31:"Microsoft IntelliMouse ' . - 'Explorer";}s:16:"item-description";a:1:{s:5:"VALUE";s:12:"[Model:USB] ";' . - '}s:10:"unit-price";a:2:{s:8:"currency";s:3:"USD";s:5:"VALUE";s:5:"70.95"' . - ';}s:8:"quantity";a:1:{s:5:"VALUE";s:1:"1";}s:26:"merchant-private-item-d' . - 'ata";a:1:{s:5:"VALUE";s:1084:"YToxODp7czoyOiJpZCI7czozNToiMjY6NDYxNDc2Nm' . - 'Q3OGIyNmZiNzFiZmQyMWQwOWY5ZWI5OGMiO3M6ODoiY2F0ZWdvcnkiO3M6MToiOSI7czo0Oi' . - 'JuYW1lIjtzOjMxOiJNaWNyb3NvZnQgSW50ZWxsaU1vdXNlIEV4cGxvcmVyIjtzOjU6Im1vZG' . - 'VsIjtzOjc6Ik1TSU1FWFAiO3M6NToiaW1hZ2UiO3M6MjQ6Im1pY3Jvc29mdC9pbWV4cGxvcm' . - 'VyLmdpZiI7czo1OiJwcmljZSI7czo3OiI2NC45NTAwIjtzOjg6InF1YW50aXR5IjtpOjE7cz' . - 'o2OiJ3ZWlnaHQiO2k6ODtzOjExOiJmaW5hbF9wcmljZSI7ZDo3MC45NTAwMDAwMDAwMDAwMD' . - 'I4NDIxNzA5NDMwNDA0MDA3NDM0ODQ0OTcwNzAzMTI1O3M6MTU6Im9uZXRpbWVfY2hhcmdlcy' . - 'I7aTowO3M6MTI6InRheF9jbGFzc19pZCI7czoxOiIxIjtzOjEwOiJhdHRyaWJ1dGVzIjthOj' . - 'E6e2k6MztzOjE6IjkiO31zOjE3OiJhdHRyaWJ1dGVzX3ZhbHVlcyI7czowOiIiO3M6Mjg6In' . - 'Byb2R1Y3RzX3ByaWNlZF9ieV9hdHRyaWJ1dGUiO3M6MToiMCI7czoxNToicHJvZHVjdF9pc1' . - '9mcmVlIjtzOjE6IjAiO3M6MjI6InByb2R1Y3RzX2Rpc2NvdW50X3R5cGUiO3M6MToiMCI7cz' . - 'oyNzoicHJvZHVjdHNfZGlzY291bnRfdHlwZV9mcm9tIjtzOjE6IjAiO2k6MzthOjU6e3M6Mj' . - 'E6InByb2R1Y3RzX29wdGlvbnNfbmFtZSI7czo1OiJNb2RlbCI7czoxNzoib3B0aW9uc192YW' . - 'x1ZXNfaWQiO3M6MToiOSI7czoyODoicHJvZHVjdHNfb3B0aW9uc192YWx1ZXNfbmFtZSI7cz' . - 'ozOiJVU0IiO3M6MjA6Im9wdGlvbnNfdmFsdWVzX3ByaWNlIjtzOjY6IjYuMDAwMCI7czoxMj' . - 'oicHJpY2VfcHJlZml4IjtzOjE6IisiO319";}s:16:"merchant-item-id";a:1:{s:5:"V' . - 'ALUE";s:35:"26:4614766d78b26fb71bfd21d09f9eb98c";}s:18:"tax-table-select' . - 'or";a:1:{s:5:"VALUE";s:13:"Taxable Goods";}}}s:21:"merchant-private-data' . - '";a:2:{s:12:"session-data";a:1:{s:5:"VALUE";s:38:"f2f7a0b668ff17095fb996' . - '420b8f428c;zenid";}s:10:"ip-address";a:1:{s:5:"VALUE";s:15:"192.168.128.' . - '150";}}}s:21:"checkout-flow-support";a:1:{s:30:"merchant-checkout-flow-s' . - 'upport";a:7:{s:13:"edit-cart-url";a:1:{s:5:"VALUE";s:77:"http://200.69.2' . - '05.154/~brovagnati/zen_demo2/index.php?main_page=shopping_cart";}s:21:"c' . - 'ontinue-shopping-url";a:1:{s:5:"VALUE";s:77:"http://200.69.205.154/~brov' . - 'agnati/zen_demo2/index.php?main_page=shopping_cart";}s:16:"shipping-meth' . - 'ods";a:1:{s:28:"merchant-calculated-shipping";a:4:{i:0;a:4:{s:4:"name";s' . - ':42:"Per Item International: Item International";s:5:"price";a:2:{s:8:"c' . - 'urrency";s:3:"USD";s:5:"VALUE";s:2:"10";}s:21:"shipping-restrictions";a:' . - '3:{s:15:"allow-us-po-box";a:1:{s:5:"VALUE";s:4:"true";}s:13:"allowed-are' . - 'as";a:1:{s:10:"world-area";a:1:{s:5:"VALUE";s:0:"";}}s:14:"excluded-area' . - 's";a:1:{s:11:"postal-area";a:1:{s:12:"country-code";a:1:{s:5:"VALUE";s:2' . - ':"US";}}}}s:15:"address-filters";a:3:{s:15:"allow-us-po-box";a:1:{s:5:"V' . - 'ALUE";s:4:"true";}s:13:"allowed-areas";a:1:{s:10:"world-area";a:1:{s:5:"' . - 'VALUE";s:0:"";}}s:14:"excluded-areas";a:1:{s:11:"postal-area";a:1:{s:12:' . - '"country-code";a:1:{s:5:"VALUE";s:2:"US";}}}}}i:1;a:4:{s:4:"name";s:32:"' . - 'Per Item National: Item National";s:5:"price";a:2:{s:8:"currency";s:3:"U' . - 'SD";s:5:"VALUE";s:1:"5";}s:21:"shipping-restrictions";a:2:{s:15:"allow-u' . - 's-po-box";a:1:{s:5:"VALUE";s:4:"true";}s:13:"allowed-areas";a:1:{s:15:"u' . - 's-country-area";a:2:{s:12:"country-area";s:3:"ALL";s:5:"VALUE";s:0:"";}}' . - '}s:15:"address-filters";a:2:{s:15:"allow-us-po-box";a:1:{s:5:"VALUE";s:4' . - ':"true";}s:13:"allowed-areas";a:1:{s:15:"us-country-area";a:2:{s:12:"cou' . - 'ntry-area";s:3:"ALL";s:5:"VALUE";s:0:"";}}}}i:2;a:4:{s:4:"name";s:18:"Zo' . - 'nes: Zones Rates";s:5:"price";a:2:{s:8:"currency";s:3:"USD";s:5:"VALUE";' . - 's:1:"1";}s:21:"shipping-restrictions";a:2:{s:15:"allow-us-po-box";a:1:{s' . - ':5:"VALUE";s:4:"true";}s:13:"allowed-areas";a:1:{s:15:"us-country-area";' . - 'a:2:{s:12:"country-area";s:3:"ALL";s:5:"VALUE";s:0:"";}}}s:15:"address-f' . - 'ilters";a:2:{s:15:"allow-us-po-box";a:1:{s:5:"VALUE";s:4:"true";}s:13:"a' . - 'llowed-areas";a:1:{s:15:"us-country-area";a:2:{s:12:"country-area";s:3:"' . - 'ALL";s:5:"VALUE";s:0:"";}}}}i:3;a:4:{s:4:"name";s:23:"Zones: Zones Rates' . - ' intl";s:5:"price";a:2:{s:8:"currency";s:3:"USD";s:5:"VALUE";s:1:"2";}s:' . - '21:"shipping-restrictions";a:3:{s:15:"allow-us-po-box";a:1:{s:5:"VALUE";' . - 's:4:"true";}s:13:"allowed-areas";a:1:{s:10:"world-area";a:1:{s:5:"VALUE"' . - ';s:0:"";}}s:14:"excluded-areas";a:1:{s:11:"postal-area";a:1:{s:12:"count' . - 'ry-code";a:1:{s:5:"VALUE";s:2:"US";}}}}s:15:"address-filters";a:3:{s:15:' . - '"allow-us-po-box";a:1:{s:5:"VALUE";s:4:"true";}s:13:"allowed-areas";a:1:' . - '{s:10:"world-area";a:1:{s:5:"VALUE";s:0:"";}}s:14:"excluded-areas";a:1:' . - '{s:11:"postal-area";a:1:{s:12:"country-code";a:1:{s:5:"VALUE";s:2:"US";}' . - '}}}}}}s:26:"request-buyer-phone-number";a:1:{s:5:"VALUE";s:4:"true";}s:2' . - '1:"merchant-calculations";a:3:{s:25:"merchant-calculations-url";a:1:{s:5' . - ':"VALUE";s:78:"http://200.69.205.154/~brovagnati/zen_demo2/googlecheckou' . - 't/responsehandler.php";}s:23:"accept-merchant-coupons";a:1:{s:5:"VALUE";' . - 's:4:"true";}s:24:"accept-gift-certificates";a:1:{s:5:"VALUE";s:5:"false"' . - ';}}s:10:"tax-tables";a:2:{s:19:"merchant-calculated";s:5:"false";s:20:"a' . - 'lternate-tax-tables";a:1:{s:19:"alternate-tax-table";a:3:{s:10:"standalo' . - 'ne";s:5:"false";s:4:"name";s:13:"Taxable Goods";s:19:"alternate-tax-rule' . - 's";a:1:{s:18:"alternate-tax-rule";a:2:{s:4:"rate";a:1:{s:5:"VALUE";s:4:"' . - '0.07";}s:8:"tax-area";a:1:{s:15:"us-country-area";a:2:{s:12:"country-are' . - 'a";s:3:"ALL";s:5:"VALUE";s:0:"";}}}}}}}s:15:"rounding-policy";a:2:{s:4:"' . - 'mode";a:1:{s:5:"VALUE";s:9:"HALF_EVEN";}s:4:"rule";a:1:{s:5:"VALUE";s:8:' . - '"PER_LINE";}}}}}}'); - } - - function testGoogleXMLParserGetRootXMLNotFolding(){ - $xml = ' - - data 1 - - - data 2 - - '; - - $xml_parsed = new xmlParser($xml, array()); - - $this->assertEquals($xml_parsed->getRoot(), 'ADDRESSES', - 'Should be root in UpperCase'); - } -} - -if(!isset($suite)) { - $suite = new TestSuite(); -} - -$suite->addTest(new testGoogleXMLParser("testGoogleXMLParserGetRoot")); -$suite->addTest(new testGoogleXMLParser("testGoogleXMLParserGetDataSimpleXML")); -$suite->addTest(new testGoogleXMLParser("testGoogleXMLParserGetDataMediumXML")); -$suite->addTest(new testGoogleXMLParser("testGoogleXMLParserGetDataComplexXML")); -$suite->addTest(new testGoogleXMLParser("testGoogleXMLParserGetRootXMLNotFolding")); - - -?> \ No newline at end of file