aleph_analytics 0.0.0.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +0 -0
- data/Gemfile +70 -0
- data/Gemfile.lock +489 -0
- data/LICENSE +21 -0
- data/Procfile +2 -0
- data/README.md +1 -0
- data/ROADMAP.md +7 -0
- data/Rakefile +9 -0
- data/app/assets/fonts/octicons-local.ttf +0 -0
- data/app/assets/fonts/octicons.eot +0 -0
- data/app/assets/fonts/octicons.svg +183 -0
- data/app/assets/fonts/octicons.ttf +0 -0
- data/app/assets/fonts/octicons.woff +0 -0
- data/app/assets/javascripts/angular/aleph.js.es6 +90 -0
- data/app/assets/javascripts/angular/config/schema_completer_config.js.es6 +71 -0
- data/app/assets/javascripts/angular/controllers/alerts/alert_index_controller.js.es6 +16 -0
- data/app/assets/javascripts/angular/controllers/alerts/alert_show_controller.js.es6 +99 -0
- data/app/assets/javascripts/angular/controllers/controllers.js.es6 +65 -0
- data/app/assets/javascripts/angular/controllers/query/query_index_controller.js.es6 +80 -0
- data/app/assets/javascripts/angular/controllers/query/query_repl_controller.js.es6 +147 -0
- data/app/assets/javascripts/angular/controllers/query/query_show_controller.js.es6 +43 -0
- data/app/assets/javascripts/angular/controllers/schema/schema_index_controller.js.es6 +61 -0
- data/app/assets/javascripts/angular/controllers/snippet/snippet_index_controller.js.es6 +80 -0
- data/app/assets/javascripts/angular/directives/directives.js.es6 +30 -0
- data/app/assets/javascripts/angular/directives/query/query_details_directive.js.es6 +87 -0
- data/app/assets/javascripts/angular/directives/query/query_version_sidebar_directive.js.es6 +65 -0
- data/app/assets/javascripts/angular/directives/result/result_directive.js.es6 +59 -0
- data/app/assets/javascripts/angular/directives/result/results_directive.js.es6 +30 -0
- data/app/assets/javascripts/angular/directives/visualization_directive.js.es6 +101 -0
- data/app/assets/javascripts/angular/filters/filters.js.es6 +27 -0
- data/app/assets/javascripts/angular/services/alert/alert.js.es6 +51 -0
- data/app/assets/javascripts/angular/services/alert/alert_resource.js.es6 +10 -0
- data/app/assets/javascripts/angular/services/lib/ace_completers.js.es6 +29 -0
- data/app/assets/javascripts/angular/services/lib/ace_sql_parse.js.es6 +156 -0
- data/app/assets/javascripts/angular/services/lib/action_handler.js.es6 +73 -0
- data/app/assets/javascripts/angular/services/lib/alert_flash.js.es6 +30 -0
- data/app/assets/javascripts/angular/services/lib/default_ace_configurator_service.js.es6 +74 -0
- data/app/assets/javascripts/angular/services/lib/github_url_service.js.es6 +53 -0
- data/app/assets/javascripts/angular/services/lib/keyword_completer.js.es6 +36 -0
- data/app/assets/javascripts/angular/services/lib/local_resource.js.es6 +20 -0
- data/app/assets/javascripts/angular/services/lib/lock_service.js.es6 +48 -0
- data/app/assets/javascripts/angular/services/lib/locking_poll_service.js.es6 +42 -0
- data/app/assets/javascripts/angular/services/lib/matcher_runner.js.es6 +65 -0
- data/app/assets/javascripts/angular/services/lib/navigation_guard.js.es6 +45 -0
- data/app/assets/javascripts/angular/services/lib/open_repl_service.js.es6 +56 -0
- data/app/assets/javascripts/angular/services/lib/page_title_manager.js.es6 +38 -0
- data/app/assets/javascripts/angular/services/lib/pagination.js.es6 +114 -0
- data/app/assets/javascripts/angular/services/lib/pagination_components.js.es6 +91 -0
- data/app/assets/javascripts/angular/services/lib/parameter_methods.js.es6 +35 -0
- data/app/assets/javascripts/angular/services/lib/role_model.js.es6 +21 -0
- data/app/assets/javascripts/angular/services/lib/schema_completer.js.es6 +56 -0
- data/app/assets/javascripts/angular/services/lib/selection_tag_input.js.es6 +42 -0
- data/app/assets/javascripts/angular/services/lib/server_configurations.js.es6 +15 -0
- data/app/assets/javascripts/angular/services/lib/spinner_state.js.es6 +45 -0
- data/app/assets/javascripts/angular/services/lib/tag_resource.js.es6 +14 -0
- data/app/assets/javascripts/angular/services/model/collection_dirty_awareness.js.es6 +33 -0
- data/app/assets/javascripts/angular/services/model/collection_model_base.js.es6 +75 -0
- data/app/assets/javascripts/angular/services/model/dirty_aware_collection_model.js.es6 +31 -0
- data/app/assets/javascripts/angular/services/model/dirty_aware_model.js.es6 +50 -0
- data/app/assets/javascripts/angular/services/model/model_base.js.es6 +80 -0
- data/app/assets/javascripts/angular/services/model/model_state.js.es6 +51 -0
- data/app/assets/javascripts/angular/services/model/models.js.es6 +15 -0
- data/app/assets/javascripts/angular/services/model/unpersisted_model.js.es6 +20 -0
- data/app/assets/javascripts/angular/services/model_generation/model_factory.js.es6 +28 -0
- data/app/assets/javascripts/angular/services/model_generation/model_generation.js.es6 +13 -0
- data/app/assets/javascripts/angular/services/model_generation/model_manager.js.es6 +86 -0
- data/app/assets/javascripts/angular/services/model_generation/resource_factory.js.es6 +38 -0
- data/app/assets/javascripts/angular/services/model_generation/standard_collection_model.js.es6 +25 -0
- data/app/assets/javascripts/angular/services/model_generation/standard_model.js.es6 +38 -0
- data/app/assets/javascripts/angular/services/query/query.js.es6 +55 -0
- data/app/assets/javascripts/angular/services/query/query_handler.js.es6 +40 -0
- data/app/assets/javascripts/angular/services/query/query_loader.js.es6 +54 -0
- data/app/assets/javascripts/angular/services/query/query_request_transformers.js.es6 +26 -0
- data/app/assets/javascripts/angular/services/query/query_resource.js.es6 +21 -0
- data/app/assets/javascripts/angular/services/query/query_tab.js.es6 +63 -0
- data/app/assets/javascripts/angular/services/query/query_versions.js.es6 +21 -0
- data/app/assets/javascripts/angular/services/result/result.js.es6 +26 -0
- data/app/assets/javascripts/angular/services/result/result_poller.js.es6 +30 -0
- data/app/assets/javascripts/angular/services/result/result_runner.js.es6 +48 -0
- data/app/assets/javascripts/angular/services/result/results.js.es6 +10 -0
- data/app/assets/javascripts/angular/services/schema/schema_column.js.es6 +93 -0
- data/app/assets/javascripts/angular/services/schema/schema_column_resource.js.es6 +12 -0
- data/app/assets/javascripts/angular/services/schema/schema_columns.js.es6 +57 -0
- data/app/assets/javascripts/angular/services/schema/schema_comment_resource.js.es6 +12 -0
- data/app/assets/javascripts/angular/services/services.js.es6 +140 -0
- data/app/assets/javascripts/angular/services/snippet/ace_snippet_manager.js.es6 +44 -0
- data/app/assets/javascripts/angular/services/visualization/source_renderer.js.es6 +70 -0
- data/app/assets/javascripts/angular/services/visualization/visualization.js.es6 +47 -0
- data/app/assets/javascripts/angular/services/visualization/visualization_service.js.es6 +67 -0
- data/app/assets/javascripts/angular/services/visualization/visualizations.js.es6 +11 -0
- data/app/assets/javascripts/application.js +22 -0
- data/app/assets/javascripts/lib/key_binding.js +24 -0
- data/app/assets/javascripts/lib/serialized_storage.js +11 -0
- data/app/assets/javascripts/lib/underscore_contrib/array_builders.js +190 -0
- data/app/assets/javascripts/lib/underscore_contrib/function_predicates.js +95 -0
- data/app/assets/javascripts/lib/underscore_contrib/object_builders.js +111 -0
- data/app/assets/javascripts/lib/underscore_contrib/object_selectors.js +112 -0
- data/app/assets/javascripts/lib/underscore_contrib/util_existential.js +15 -0
- data/app/assets/javascripts/lib/utils.js +29 -0
- data/app/assets/stylesheets/alert_bar.css.sass +13 -0
- data/app/assets/stylesheets/alerts.css.sass +66 -0
- data/app/assets/stylesheets/application.css.sass +35 -0
- data/app/assets/stylesheets/comments.css.sass +7 -0
- data/app/assets/stylesheets/index_components.css.sass +105 -0
- data/app/assets/stylesheets/queries.css.sass +110 -0
- data/app/assets/stylesheets/repl.css.sass +59 -0
- data/app/assets/stylesheets/results.css.sass +25 -0
- data/app/assets/stylesheets/schemas.css.sass +56 -0
- data/app/assets/stylesheets/sessions.css.sass +9 -0
- data/app/assets/stylesheets/shared.css.sass +157 -0
- data/app/assets/stylesheets/sidebar.css.sass +85 -0
- data/app/assets/stylesheets/snippets.css.sass +15 -0
- data/app/assets/stylesheets/sort_bar.css.sass +10 -0
- data/app/assets/stylesheets/spinners.css.sass +67 -0
- data/app/assets/stylesheets/summary.css.sass +16 -0
- data/app/assets/stylesheets/variables.css.sass +110 -0
- data/app/assets/stylesheets/visualizations.css.sass +15 -0
- data/app/controllers/alerts_controller.rb +72 -0
- data/app/controllers/application_controller.rb +38 -0
- data/app/controllers/columns_controller.rb +21 -0
- data/app/controllers/queries_controller.rb +85 -0
- data/app/controllers/query_versions_controller.rb +38 -0
- data/app/controllers/result_csvs_controller.rb +29 -0
- data/app/controllers/results_controller.rb +53 -0
- data/app/controllers/roles_controller.rb +9 -0
- data/app/controllers/schema_comments_controller.rb +47 -0
- data/app/controllers/snippets_controller.rb +67 -0
- data/app/controllers/tags_controller.rb +19 -0
- data/app/controllers/visualizations_controller.rb +61 -0
- data/app/mailers/alert_mailer.rb +8 -0
- data/app/models/ability.rb +31 -0
- data/app/models/alert.rb +139 -0
- data/app/models/alert_execution.rb +25 -0
- data/app/models/query.rb +85 -0
- data/app/models/query_execution.rb +39 -0
- data/app/models/query_role.rb +3 -0
- data/app/models/query_version.rb +61 -0
- data/app/models/result.rb +67 -0
- data/app/models/schema_comment.rb +3 -0
- data/app/models/snippet.rb +3 -0
- data/app/models/user.rb +19 -0
- data/app/models/visualization.rb +7 -0
- data/app/serializers/alert_serializer.rb +10 -0
- data/app/serializers/query_index_serializer.rb +7 -0
- data/app/serializers/query_serializer.rb +8 -0
- data/app/serializers/query_version_serializer.rb +3 -0
- data/app/serializers/result_serializer.rb +3 -0
- data/app/views/alert_mailer/alert_failing_email.html.haml +17 -0
- data/app/views/alerts/_index.html.haml +10 -0
- data/app/views/alerts/_index_item.html.haml +25 -0
- data/app/views/alerts/_index_sidebar.html.haml +20 -0
- data/app/views/alerts/_index_sort_bar.html.haml +22 -0
- data/app/views/alerts/_show.html.haml +90 -0
- data/app/views/application/_rollbar.html.erb +9 -0
- data/app/views/application/index.html.haml +1 -0
- data/app/views/application/unauthorized.html.haml +5 -0
- data/app/views/application/unauthorized.json +3 -0
- data/app/views/devise/sessions/new.html.haml +22 -0
- data/app/views/layouts/application.html.haml +78 -0
- data/app/views/queries/_alert.html.haml +6 -0
- data/app/views/queries/_comments.html.haml +5 -0
- data/app/views/queries/_index.html.haml +15 -0
- data/app/views/queries/_index_item.html.haml +37 -0
- data/app/views/queries/_index_sidebar.html.haml +58 -0
- data/app/views/queries/_index_sort_bar.html.haml +29 -0
- data/app/views/queries/_query_details.html.haml +81 -0
- data/app/views/queries/_query_version_sidebar.html.haml +46 -0
- data/app/views/queries/_repl.html.haml +79 -0
- data/app/views/queries/_results.html.haml +29 -0
- data/app/views/queries/_role_template.html.haml +3 -0
- data/app/views/queries/_show.html.haml +28 -0
- data/app/views/queries/_tag_template.html.haml +3 -0
- data/app/views/results/_show.html.haml +45 -0
- data/app/views/schemas/_index.html.haml +47 -0
- data/app/views/snippets/_index.html.haml +30 -0
- data/app/views/snippets/_index_item.html.haml +20 -0
- data/app/views/visualizations/_show.html.haml +83 -0
- data/bin/aleph +71 -0
- data/bin/bundle +3 -0
- data/bin/executables/bundle_runner.rb +12 -0
- data/bin/executables/clock.rb +7 -0
- data/bin/executables/deps.rb +10 -0
- data/bin/executables/import_env_variables.rb +17 -0
- data/bin/executables/init_db.rb +7 -0
- data/bin/executables/lib/config_generator.rb +51 -0
- data/bin/executables/lib/env_writer.rb +25 -0
- data/bin/executables/lib/import_env_file.rb +19 -0
- data/bin/executables/lib/seeder.rb +14 -0
- data/bin/executables/lib/utils.rb +30 -0
- data/bin/executables/playground.rb +130 -0
- data/bin/executables/seed_playground_db.rb +9 -0
- data/bin/executables/update_db.rb +7 -0
- data/bin/executables/web_server.rb +12 -0
- data/bin/executables/worker.rb +7 -0
- data/bin/rails +4 -0
- data/bin/rake +4 -0
- data/config/application.rb +59 -0
- data/config/attribute-map.yml +4 -0
- data/config/boot.rb +4 -0
- data/config/database.yml +40 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +37 -0
- data/config/environments/playground.rb +55 -0
- data/config/environments/production.rb +68 -0
- data/config/environments/staging.rb +75 -0
- data/config/environments/test.rb +46 -0
- data/config/initializers/01_internalize_configurations.rb +70 -0
- data/config/initializers/action_controller_renderers.rb +15 -0
- data/config/initializers/active_model_serializer.rb +7 -0
- data/config/initializers/assets.rb +8 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/cookies_serializer.rb +3 -0
- data/config/initializers/default_enviorment_variables.rb +8 -0
- data/config/initializers/devise.rb +297 -0
- data/config/initializers/filter_parameter_logging.rb +4 -0
- data/config/initializers/haml.rb +1 -0
- data/config/initializers/inflections.rb +16 -0
- data/config/initializers/mime_types.rb +4 -0
- data/config/initializers/net_http.rb +1 -0
- data/config/initializers/pester.rb +15 -0
- data/config/initializers/rails_admin.rb +27 -0
- data/config/initializers/redis.rb +14 -0
- data/config/initializers/rollbar.rb +45 -0
- data/config/initializers/session_store.rb +3 -0
- data/config/initializers/sql_logging_patch.rb +7 -0
- data/config/initializers/to_bool.rb +29 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/locales/devise.en.yml +62 -0
- data/config/locales/en.yml +23 -0
- data/config/puma.rb +10 -0
- data/config/resque-pool.yml +15 -0
- data/config/resque.yml +10 -0
- data/config/routes.rb +33 -0
- data/config/secrets.yml +26 -0
- data/config.ru +4 -0
- data/db/migrate/20140710204753_database_begin.rb +150 -0
- data/lib/aleph_log_formatter.rb +5 -0
- data/lib/authentication.rb +17 -0
- data/lib/aws_s3.rb +7 -0
- data/lib/clock.rb +7 -0
- data/lib/compilable_parameter.rb +50 -0
- data/lib/count_publisher.rb +26 -0
- data/lib/csv_helper/aws.rb +30 -0
- data/lib/csv_helper/base.rb +20 -0
- data/lib/csv_helper/local.rb +18 -0
- data/lib/csv_serializer.rb +23 -0
- data/lib/csv_service.rb +12 -0
- data/lib/github/blob.rb +23 -0
- data/lib/github/commit.rb +37 -0
- data/lib/github/pusher.rb +94 -0
- data/lib/github/refs.rb +39 -0
- data/lib/github/tree.rb +29 -0
- data/lib/github.rb +64 -0
- data/lib/interaction/query_creation.rb +27 -0
- data/lib/interaction/query_interaction.rb +35 -0
- data/lib/interaction/query_update.rb +62 -0
- data/lib/interaction/result_creation.rb +48 -0
- data/lib/pagination_search/attribute_set.rb +61 -0
- data/lib/pagination_search/base_relation.rb +80 -0
- data/lib/pagination_search/hash_paginate.rb +74 -0
- data/lib/pagination_search/paginated_records.rb +16 -0
- data/lib/pagination_search/pagination.rb +12 -0
- data/lib/pagination_search/search_conditions.rb +59 -0
- data/lib/query_version_support.rb +14 -0
- data/lib/redis_result_row_count.rb +26 -0
- data/lib/redshift_connection_pool.rb +8 -0
- data/lib/redshift_pg/connection.rb +44 -0
- data/lib/redshift_pg/redshift_pg.rb +15 -0
- data/lib/result_csv_generator.rb +40 -0
- data/lib/role.rb +40 -0
- data/lib/sample_skimmer.rb +30 -0
- data/lib/schema_comment_matcher.rb +27 -0
- data/lib/schemas/descriptor.rb +85 -0
- data/lib/schemas/descriptors.rb +10 -0
- data/lib/schemas/paginate.rb +21 -0
- data/lib/schemas/redis_store.rb +22 -0
- data/lib/simple_cache.rb +13 -0
- data/lib/sql_compiler.rb +33 -0
- data/lib/summarizer.rb +18 -0
- data/lib/tasks/karma.rake +32 -0
- data/lib/tasks/resque_setup.rake +18 -0
- data/playground_data/1.csv +13 -0
- data/playground_data/aleph.playground.sqlite3 +0 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +25 -0
- data/public/aleph.png +0 -0
- data/public/assets/.sprockets-manifest-24b5998edb20c5b4d6edf39d44cd3ff7.json +1 -0
- data/public/assets/FontAwesome-9ccfa32dd4cd1b8e83f68899d85bd5e6.otf +0 -0
- data/public/assets/ZeroClipboard-8b5c117b88fe37e32fd34a70fdf60026.swf +0 -0
- data/public/assets/angular/aleph.js-19b4df67407de5dab249abfc391c0eaf.es6 +90 -0
- data/public/assets/angular/config/schema_completer_config.js-1b696920b5e04f75620630d75117b201.es6 +71 -0
- data/public/assets/angular/controllers/alerts/alert_index_controller.js-4344581b1e9b456c3f991f96bb4d403d.es6 +16 -0
- data/public/assets/angular/controllers/alerts/alert_show_controller.js-a984dc82fbcac380cdc8682bf8986933.es6 +99 -0
- data/public/assets/angular/controllers/controllers.js-7431ae468ea2f0d392661448a61cfdf3.es6 +65 -0
- data/public/assets/angular/controllers/query/query_index_controller.js-828eadeee6a971b11b5c07f65f0c6def.es6 +80 -0
- data/public/assets/angular/controllers/query/query_repl_controller.js-3c4bac22e41766e2e83e720d53acade3.es6 +147 -0
- data/public/assets/angular/controllers/query/query_show_controller.js-020c83fd94ece7d55bd94b9981a40083.es6 +43 -0
- data/public/assets/angular/controllers/schema/schema_index_controller.js-d0d790d168b49caefa4b8f7993c928f1.es6 +61 -0
- data/public/assets/angular/controllers/snippet/snippet_index_controller.js-9191ee2e37d16d5807b8a7f45530a6c2.es6 +80 -0
- data/public/assets/angular/directives/directives.js-44fda752585bddc5d026feaab8b14108.es6 +30 -0
- data/public/assets/angular/directives/query/query_details_directive.js-2dd979e2463826558f166d9dc9e2c8a9.es6 +87 -0
- data/public/assets/angular/directives/query/query_version_sidebar_directive.js-b19ba8a9bf4e66c5740e9b9f9495cee1.es6 +65 -0
- data/public/assets/angular/directives/result/result_directive.js-76c151e9277e35578f92b076c2fa5b06.es6 +59 -0
- data/public/assets/angular/directives/result/results_directive.js-fcbf9750790823a11ca313e630bd2b0f.es6 +30 -0
- data/public/assets/angular/directives/visualization_directive.js-82cb45a52eba62deb283a3699add1b33.es6 +101 -0
- data/public/assets/angular/filters/filters.js-48cdb16fc89337e861c9f18ad57fd9bf.es6 +27 -0
- data/public/assets/angular/services/alert/alert.js-a76ea96e948de324fcc00f3ef3ecae4e.es6 +51 -0
- data/public/assets/angular/services/alert/alert_resource.js-ac68ea99936eb213c0fb37d4fbb1511a.es6 +10 -0
- data/public/assets/angular/services/lib/ace_completers.js-5353182bc538210dad12865ad6a060fd.es6 +29 -0
- data/public/assets/angular/services/lib/ace_sql_parse.js-4114a8ad4fe4dbf4f72c0ab7fca22e83.es6 +156 -0
- data/public/assets/angular/services/lib/action_handler.js-85a8f75f507efcf2fe950fa7717b6976.es6 +73 -0
- data/public/assets/angular/services/lib/alert_flash.js-7a4fe7ef5510a224677a12ecf2fe973b.es6 +30 -0
- data/public/assets/angular/services/lib/default_ace_configurator_service.js-9b83d6b53495dafe10bfed5074c3ec01.es6 +74 -0
- data/public/assets/angular/services/lib/github_url_service.js-719084a625f60d20c24097f00813b481.es6 +53 -0
- data/public/assets/angular/services/lib/keyword_completer.js-560b51694457619401c72431dd7b647e.es6 +36 -0
- data/public/assets/angular/services/lib/local_resource.js-9b57357ed203c783708e48154721242a.es6 +20 -0
- data/public/assets/angular/services/lib/lock_service.js-32eb33fda9c27fb5643b25c63099b52c.es6 +48 -0
- data/public/assets/angular/services/lib/locking_poll_service.js-d0271cc07d20ec73291e7175e1714d42.es6 +42 -0
- data/public/assets/angular/services/lib/matcher_runner.js-bd63f4c6ad965716c5b793d3c4602563.es6 +65 -0
- data/public/assets/angular/services/lib/navigation_guard.js-5c7497900f99319f3ef76b83662c20cd.es6 +45 -0
- data/public/assets/angular/services/lib/open_repl_service.js-2332490470ea58f3e5ce7f6fe5dd2659.es6 +56 -0
- data/public/assets/angular/services/lib/page_title_manager.js-227f9ddb49d23bfa934bf216ef96ccbd.es6 +38 -0
- data/public/assets/angular/services/lib/pagination.js-baa9a496d01b87f90c588c51864d1533.es6 +114 -0
- data/public/assets/angular/services/lib/pagination_components.js-4fcc03120d1299713347b487f1e8fd44.es6 +91 -0
- data/public/assets/angular/services/lib/parameter_methods.js-16ecb25ffb24d5870dfc17f9f408fa5b.es6 +35 -0
- data/public/assets/angular/services/lib/role_model.js-3d5072f279676294e7d17cbb4bb3adb5.es6 +21 -0
- data/public/assets/angular/services/lib/schema_completer.js-d04d49642967fd9f8e2c95e0df81f2ae.es6 +56 -0
- data/public/assets/angular/services/lib/selection_tag_input.js-86cc6d564c108d722951b6fcd2b51221.es6 +42 -0
- data/public/assets/angular/services/lib/server_configurations.js-fd8c16a3d02926e7597240566808c141.es6 +15 -0
- data/public/assets/angular/services/lib/spinner_state.js-315bb62df18f9370a89f8b865eb1766a.es6 +45 -0
- data/public/assets/angular/services/lib/tag_resource.js-8849bbdd579bd38b36a362bed926c2f2.es6 +14 -0
- data/public/assets/angular/services/model/collection_dirty_awareness.js-8a78450bd8b565fb03633ab735893508.es6 +33 -0
- data/public/assets/angular/services/model/collection_model_base.js-8092335acde425d28718c1a9fc677d39.es6 +75 -0
- data/public/assets/angular/services/model/dirty_aware_collection_model.js-6f4d2b409a033f5ffc6bd5a747df2046.es6 +31 -0
- data/public/assets/angular/services/model/dirty_aware_model.js-ec1a086f3ec459827dbd5381bd970975.es6 +50 -0
- data/public/assets/angular/services/model/model_base.js-9fd807dfdf4f26afe60d8e282ca08e6c.es6 +80 -0
- data/public/assets/angular/services/model/model_state.js-3e96e381ea7a9eff857081ffbf3a8bab.es6 +51 -0
- data/public/assets/angular/services/model/models.js-6798762a6e263be75c7c4e9f8a19da66.es6 +15 -0
- data/public/assets/angular/services/model/unpersisted_model.js-49597959c989e68c713fd826743bb7b5.es6 +20 -0
- data/public/assets/angular/services/model_generation/model_factory.js-0bccc6a2e9b4738c67230fc68d9780ae.es6 +28 -0
- data/public/assets/angular/services/model_generation/model_generation.js-f08c6eff199b5ad02b2e2bdf866d69ff.es6 +13 -0
- data/public/assets/angular/services/model_generation/model_manager.js-b05d8f00bc4499c50098ae31013de88c.es6 +86 -0
- data/public/assets/angular/services/model_generation/resource_factory.js-e8ce2f4be9383d885dbb965c8e425bab.es6 +38 -0
- data/public/assets/angular/services/model_generation/standard_collection_model.js-19c44dc3a937a85d825c5a2f020a6769.es6 +25 -0
- data/public/assets/angular/services/model_generation/standard_model.js-74439b041eebfc7e0fad454cf6e32192.es6 +38 -0
- data/public/assets/angular/services/query/query.js-7b6228d0a5c1a6ea76242f4aa49aafd0.es6 +55 -0
- data/public/assets/angular/services/query/query_handler.js-d8cb3c66bcf6d16cd13bb5bcd0921496.es6 +40 -0
- data/public/assets/angular/services/query/query_loader.js-1fbc8b859778d46b73b9adc300984851.es6 +54 -0
- data/public/assets/angular/services/query/query_request_transformers.js-522901477c7848324cd5c014005a85c8.es6 +26 -0
- data/public/assets/angular/services/query/query_resource.js-b809fbfd1c379619fa07ef8e52509810.es6 +21 -0
- data/public/assets/angular/services/query/query_tab.js-fe34f5e6d0c813d2d92838be14cd6783.es6 +63 -0
- data/public/assets/angular/services/query/query_versions.js-aa3aec9021354a7394797101ea500887.es6 +21 -0
- data/public/assets/angular/services/result/result.js-be8178c80c767a651a97537b2b0149d5.es6 +26 -0
- data/public/assets/angular/services/result/result_poller.js-b15617d53f164cbe5636bb5573a70504.es6 +30 -0
- data/public/assets/angular/services/result/result_runner.js-ce2c5b3121c8e67903c302e600749c14.es6 +48 -0
- data/public/assets/angular/services/result/results.js-53088d6088f6b4783b274a64322d361c.es6 +10 -0
- data/public/assets/angular/services/schema/schema_column.js-3908faecc9874fa08484d7490701a7d4.es6 +93 -0
- data/public/assets/angular/services/schema/schema_column_resource.js-a6982ce9698b104192c4e455300df455.es6 +12 -0
- data/public/assets/angular/services/schema/schema_columns.js-c63a16e2e0778a885bd27c7cf2ed7d88.es6 +57 -0
- data/public/assets/angular/services/schema/schema_comment_resource.js-20254ea1a4e7b4850c9f21f9619130ce.es6 +12 -0
- data/public/assets/angular/services/services.js-6225c5ea24a9082506d1932d7884b53b.es6 +140 -0
- data/public/assets/angular/services/snippet/ace_snippet_manager.js-dbbba5d8ad5040042b469b294c4d7228.es6 +44 -0
- data/public/assets/angular/services/visualization/source_renderer.js-d7274c88b067a35f2e91bf7f39be7d47.es6 +70 -0
- data/public/assets/angular/services/visualization/visualization.js-23e36c87721aa263dd3f99769027cabb.es6 +47 -0
- data/public/assets/angular/services/visualization/visualization_service.js-25de86b5ceef60cf2b1dfde5fb0e9216.es6 +67 -0
- data/public/assets/angular/services/visualization/visualizations.js-1227bc3dcd67e85c8050d82360a26d53.es6 +11 -0
- data/public/assets/application-9153e0bf570016651e5eb8c67e037d3a.css +10 -0
- data/public/assets/application-ef5c2ae95804ac9785f190a9aea7ad8b.js +149 -0
- data/public/assets/bootstrap/glyphicons-halflings-regular-448c34a56d699c29117adc64c43affeb.woff2 +0 -0
- data/public/assets/bootstrap/glyphicons-halflings-regular-89889688147bd7575d6327160d64e760.svg +288 -0
- data/public/assets/bootstrap/glyphicons-halflings-regular-e18bbf611f2a2e43afc071aa2f4e1512.ttf +0 -0
- data/public/assets/bootstrap/glyphicons-halflings-regular-f4769f9bdb7466be65088239c12046d1.eot +0 -0
- data/public/assets/bootstrap/glyphicons-halflings-regular-fa2772327f55d8198301fdb8bcfc8158.woff +0 -0
- data/public/assets/fontawesome-webfont-4f0022f25672c7f501c339cbf98d9117.ttf +0 -0
- data/public/assets/fontawesome-webfont-776d58f453c8fe5d6a89e9c31ee223ff.svg +504 -0
- data/public/assets/fontawesome-webfont-90186830c9c50a0fed932494581761d9.eot +0 -0
- data/public/assets/fontawesome-webfont-926c93d201fe51c8f351e858468980c3.woff2 +0 -0
- data/public/assets/fontawesome-webfont-fdf491ce5ff5b2da02708cd0e9864719.woff +0 -0
- data/public/assets/glyphicons-halflings-regular-0a5c48c69a25a93e37ed62db813387fa.svg +229 -0
- data/public/assets/glyphicons-halflings-regular-47da44498fc073d9fff9ab0cdb0bef8e.ttf +0 -0
- data/public/assets/glyphicons-halflings-regular-5eae1f7217b606d3580dd70ac840fea1.woff +0 -0
- data/public/assets/glyphicons-halflings-regular-aa16cd35628e6dddf56e766c9aa4ae63.eot +0 -0
- data/public/assets/jquery-ui/ui-bg_flat_0_aaaaaa_40x100-2a44fbdb7360c60122bcf6dcef0387d8.png +0 -0
- data/public/assets/jquery-ui/ui-bg_flat_75_ffffff_40x100-8692e6efddf882acbff144c38ea7dfdf.png +0 -0
- data/public/assets/jquery-ui/ui-bg_glass_55_fbf9ee_1x400-f8f4558e0b92ff2cd6136781533902ec.png +0 -0
- data/public/assets/jquery-ui/ui-bg_glass_65_ffffff_1x400-e5a8f32e28fd5c27bf0fed33c8a8b9b5.png +0 -0
- data/public/assets/jquery-ui/ui-bg_glass_75_dadada_1x400-c12c6510dad3ebfa64c8a30e959a2469.png +0 -0
- data/public/assets/jquery-ui/ui-bg_glass_75_e6e6e6_1x400-f4254356c2a8c9a383205ef2c4de22c4.png +0 -0
- data/public/assets/jquery-ui/ui-bg_glass_95_fef1ec_1x400-5a3be2d8fff8324d59aec3df7b0a0c83.png +0 -0
- data/public/assets/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100-72c593d16e998952cd8d798fee33c6f3.png +0 -0
- data/public/assets/jquery-ui/ui-icons_222222_256x240-9129e086dc488d8bcaf808510bc646ba.png +0 -0
- data/public/assets/jquery-ui/ui-icons_2e83ff_256x240-25162bf857a8eb83ea932a58436e1049.png +0 -0
- data/public/assets/jquery-ui/ui-icons_454545_256x240-771099482bdc1571ece41073b1752596.png +0 -0
- data/public/assets/jquery-ui/ui-icons_888888_256x240-faf6f5dc44e713178784c1fb053990aa.png +0 -0
- data/public/assets/jquery-ui/ui-icons_cd0a0a_256x240-5d8808d43cefca6f6781a5316d176632.png +0 -0
- data/public/assets/octicons-0a82c1edade24862533bbe96ebeaea47.eot +0 -0
- data/public/assets/octicons-103abd6cc0199e2519ef6f1aac4bb0e0.ttf +0 -0
- data/public/assets/octicons-adc17600a2b7a648eba306c2e1426b85.svg +183 -0
- data/public/assets/octicons-be82065223a03ba577de159d97a5d63d.woff +0 -0
- data/public/assets/octicons-local-72e4167c13648cb89e9e96cdd212cb82.ttf +0 -0
- data/public/assets/rails_admin/aristo/images/bg_fallback-a7547e71656b1e538b93ddb49dfc98d3.png +0 -0
- data/public/assets/rails_admin/aristo/images/icon_sprite-415c1eec8a2d31d217d4d1d5a1d44345.png +0 -0
- data/public/assets/rails_admin/aristo/images/progress_bar-449b2fab5cf4122c17a416f6e26569fe.gif +0 -0
- data/public/assets/rails_admin/aristo/images/slider_handles-ba57b6efb64ca6263f77ce2624ad71ee.png +0 -0
- data/public/assets/rails_admin/aristo/images/ui-icons_222222_256x240-a2c05c5e967f9cf4dae51c1243b3b93c.png +0 -0
- data/public/assets/rails_admin/aristo/images/ui-icons_454545_256x240-a7a7eff72c4f562524dc472824aab656.png +0 -0
- data/public/assets/rails_admin/base/README-f7dd742c2237cb1959438b94c7503a41.txt +2 -0
- data/public/assets/rails_admin/bootstrap/glyphicons-halflings-d4fef5262f29f592560fb59918a1c052.png +0 -0
- data/public/assets/rails_admin/bootstrap/glyphicons-halflings-white-9bbc6e9602998a385c2ea13df56470fd.png +0 -0
- data/public/assets/rails_admin/bullet_black-06d345566cf9e0f97a23bb07ab3d50d9.png +0 -0
- data/public/assets/rails_admin/bullet_white-469b537fa21b7143f719578f7426825d.png +0 -0
- data/public/assets/rails_admin/calendar-697f5a44753da70028cfd04b98ac45d2.png +0 -0
- data/public/assets/rails_admin/clock-0cc82b549af3df4f730a02335f54b0df.png +0 -0
- data/public/assets/rails_admin/colorpicker/colorpicker_background-7aaa2a726200c0ac3ba43c01f073a93d.png +0 -0
- data/public/assets/rails_admin/colorpicker/colorpicker_hex-cbc06f4015cbb276a3dd966e1be37c25.png +0 -0
- data/public/assets/rails_admin/colorpicker/colorpicker_hsb_b-2315aba3c2fbbcfcc22869b21836c31d.png +0 -0
- data/public/assets/rails_admin/colorpicker/colorpicker_hsb_h-3120023551e3601467cf52e1c8aaae9e.png +0 -0
- data/public/assets/rails_admin/colorpicker/colorpicker_hsb_s-77a77892bdef0906fdfc3426d06108fd.png +0 -0
- data/public/assets/rails_admin/colorpicker/colorpicker_indic-f485d07540a89502e36dc1a55cec05d0.gif +0 -0
- data/public/assets/rails_admin/colorpicker/colorpicker_overlay-4b2dd6f78c4aac5cc932e845698b2db5.png +0 -0
- data/public/assets/rails_admin/colorpicker/colorpicker_rgb_b-2315aba3c2fbbcfcc22869b21836c31d.png +0 -0
- data/public/assets/rails_admin/colorpicker/colorpicker_rgb_g-475afe3f4f69e59ff30a445384a8d961.png +0 -0
- data/public/assets/rails_admin/colorpicker/colorpicker_rgb_r-02de28945293fe2fd026c9be3b89955a.png +0 -0
- data/public/assets/rails_admin/colorpicker/colorpicker_select-cdf55197d05f18c552dc35bdb858fa2a.gif +0 -0
- data/public/assets/rails_admin/colorpicker/colorpicker_submit-9912e5cf348e0be359ff9b1078fbb7da.png +0 -0
- data/public/assets/rails_admin/colorpicker/custom_background-a0ab8ff3e2b85b1f8ed5a4d86967471b.png +0 -0
- data/public/assets/rails_admin/colorpicker/custom_hex-065e780d7b89f7dda63a472caa7c2bdd.png +0 -0
- data/public/assets/rails_admin/colorpicker/custom_hsb_b-66f5963cf1a0a2680acbcac2bb77f40d.png +0 -0
- data/public/assets/rails_admin/colorpicker/custom_hsb_h-cd1f2e27122aeca17af416f328b758cd.png +0 -0
- data/public/assets/rails_admin/colorpicker/custom_hsb_s-ca6f3e4f0c1fc2cb110c788018369e07.png +0 -0
- data/public/assets/rails_admin/colorpicker/custom_indic-04660eb352eb259581a36a0fe8da2d4d.gif +0 -0
- data/public/assets/rails_admin/colorpicker/custom_rgb_b-64bc0c5110f84efe32e82c58d50660f6.png +0 -0
- data/public/assets/rails_admin/colorpicker/custom_rgb_g-33fe011475956750a457b1f93f1b9075.png +0 -0
- data/public/assets/rails_admin/colorpicker/custom_rgb_r-18f2ee37089d850c52b212d8a31aac92.png +0 -0
- data/public/assets/rails_admin/colorpicker/custom_submit-9d0a14eebb9ae04edfb8099827a42968.png +0 -0
- data/public/assets/rails_admin/colorpicker/select-76bd5c10f34de24b73ff4454735d3e18.png +0 -0
- data/public/assets/rails_admin/colorpicker/select2-d3fea9a451ac2c29bcd4a82b6e4f326a.png +0 -0
- data/public/assets/rails_admin/colorpicker/slider-db040ce7280fc74269e330a862e738e6.png +0 -0
- data/public/assets/rails_admin/jquery.colorpicker-7c36c2fac54a031f6e0dfe6ad137cfb1.js +1 -0
- data/public/assets/rails_admin/jquery.colorpicker-e402a30af31a4ba5957fec816dc9239c.css +1 -0
- data/public/assets/rails_admin/logo-9b479a57b493ee824767163101a5409f.png +0 -0
- data/public/assets/rails_admin/magnifier-4fcdfd820ff2e951458af3d1309ab20c.png +0 -0
- data/public/assets/rails_admin/multiselect/icon_sprite-415c1eec8a2d31d217d4d1d5a1d44345.png +0 -0
- data/public/assets/rails_admin/multiselect/ui-icon-circle-triangle-n-dark-32c1cfdd900379bf62658e475fb2ba38.png +0 -0
- data/public/assets/rails_admin/multiselect/ui-icon-circle-triangle-n-light-73160d919a189ba13bd4387e3623b7e9.png +0 -0
- data/public/assets/rails_admin/multiselect/ui-icon-circle-triangle-s-dark-c15e6bff59c80c5473236cf77870f31d.png +0 -0
- data/public/assets/rails_admin/multiselect/ui-icon-circle-triangle-s-light-fbf43811420f67d49d4dc64c7817f72c.png +0 -0
- data/public/assets/rails_admin/rails_admin-d25a684b9f690652469ceb212fbe7b95.js +328 -0
- data/public/assets/rails_admin/rails_admin-d85fb3c8bbff377491ed5af5239cf185.css +8 -0
- data/public/assets/resque_web/application-b29b34115c3ad5c539f26114fc91e584.css +4 -0
- data/public/assets/resque_web/application-d2bc6e68cf7c6215e804fe9e3f46f1d0.js +111 -0
- data/public/assets/resque_web/idle-53474088772d9917bd463b19efa32fc3.png +0 -0
- data/public/assets/resque_web/lifebuoy-0281230b31ba4078685f4df3e8169534.png +0 -0
- data/public/assets/resque_web/poll-af53f85832c41a9cde68b08cb09711f1.png +0 -0
- data/public/assets/resque_web/rails-9c0a079bdd7701d7e729bd956823d153.png +0 -0
- data/public/assets/resque_web/working-26a36c5119cbdcc64ebade2c5f8c389d.png +0 -0
- data/public/assets/twitter/bootstrap/glyphicons-halflings-2516339970d710819585f90773aebe0a.png +0 -0
- data/public/assets/twitter/bootstrap/glyphicons-halflings-white-9bbc6e9602998a385c2ea13df56470fd.png +0 -0
- data/public/bg_big.svg +2 -0
- data/public/bg_new.svg +2 -0
- data/public/favicon.ico +0 -0
- data/public/resources/keyword_config.json +51 -0
- data/public/resources/visualization/area.html +17 -0
- data/public/resources/visualization/area_step.html +17 -0
- data/public/resources/visualization/bar.html +17 -0
- data/public/resources/visualization/custom.html +6 -0
- data/public/resources/visualization/line.html +16 -0
- data/public/resources/visualization/presets.json +13 -0
- data/public/resources/visualization/scatter.html +17 -0
- data/public/resources/visualization/spline.html +17 -0
- data/public/resources/visualization/spline_area.html +17 -0
- data/public/resources/visualization/stacked_area.html +18 -0
- data/public/resources/visualization/stacked_bar.html +18 -0
- data/public/resources/visualization/stacked_spline_area.html +18 -0
- data/public/resources/visualization/template.json +12 -0
- data/public/robots.txt +2 -0
- data/vendor/assets/javascripts/ace/ace.js +18655 -0
- data/vendor/assets/javascripts/ace/ext-language_tools.js +1937 -0
- data/vendor/assets/javascripts/ace/mode-html.js +2794 -0
- data/vendor/assets/javascripts/ace/mode-pgsql.js +1503 -0
- data/vendor/assets/javascripts/ace/snippets/coffee.js +102 -0
- data/vendor/assets/javascripts/ace/snippets/css.js +974 -0
- data/vendor/assets/javascripts/ace/snippets/haml.js +27 -0
- data/vendor/assets/javascripts/ace/snippets/html.js +835 -0
- data/vendor/assets/javascripts/ace/snippets/html_elixir.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/html_ruby.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/javascript.js +202 -0
- data/vendor/assets/javascripts/ace/snippets/json.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/jsp.js +106 -0
- data/vendor/assets/javascripts/ace/snippets/jsx.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/less.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/mysql.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/pgsql.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/plain_text.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/rhtml.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/sass.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/scss.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/snippets.js +16 -0
- data/vendor/assets/javascripts/ace/snippets/sql.js +33 -0
- data/vendor/assets/javascripts/ace/snippets/sqlserver.js +76 -0
- data/vendor/assets/javascripts/ace/snippets/svg.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/text.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/textile.js +37 -0
- data/vendor/assets/javascripts/ace/theme-monokai.js +105 -0
- data/vendor/assets/javascripts/angular-filter/angular-filter.js +2271 -0
- data/vendor/assets/javascripts/angular-hotkeys/hotkeys.js +1523 -0
- data/vendor/assets/javascripts/angular-selection-model/selection-model.js +563 -0
- data/vendor/assets/javascripts/angular-spinner/treasure-overlay-spinner.js +53 -0
- data/vendor/assets/javascripts/angular-ui-ace/ui-ace.js +298 -0
- data/vendor/assets/javascripts/angular-ui-bootstrap/ui-bootstrap-tpls-0.14.3.js +8503 -0
- data/vendor/assets/javascripts/d3/c3.min.js +5 -0
- data/vendor/assets/javascripts/d3/d3.v3.min.js +5 -0
- data/vendor/assets/javascripts/infinite-scroll/infinite-scroll.js +186 -0
- data/vendor/assets/javascripts/ng-clip/ngClip.js +84 -0
- data/vendor/assets/javascripts/ng-tags-input/ng-tags-input.min.js +1 -0
- data/vendor/assets/javascripts/pluralize/pluralize.js +453 -0
- data/vendor/assets/javascripts/underscore-js/underscore.js +1548 -0
- data/vendor/assets/stylesheets/angular-hotkeys/hotkeys.css +110 -0
- data/vendor/assets/stylesheets/angular-spinner/treasure-overlay-spinner.css +136 -0
- data/vendor/assets/stylesheets/c3/c3.min.css +1 -0
- data/vendor/assets/stylesheets/ng-tags-input/ng-tags-input.bootstrap.min.css +1 -0
- data/vendor/assets/stylesheets/ng-tags-input/ng-tags-input.min.css +1 -0
- data/vendor/assets/stylesheets/octicons/README.md +1 -0
- data/vendor/assets/stylesheets/octicons/sprockets-octicons.scss +217 -0
- metadata +600 -0
@@ -0,0 +1,149 @@
|
|
1
|
+
/*!
|
2
|
+
* jQuery JavaScript Library v1.11.3
|
3
|
+
* http://jquery.com/
|
4
|
+
*
|
5
|
+
* Includes Sizzle.js
|
6
|
+
* http://sizzlejs.com/
|
7
|
+
*
|
8
|
+
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
|
9
|
+
* Released under the MIT license
|
10
|
+
* http://jquery.org/license
|
11
|
+
*
|
12
|
+
* Date: 2015-04-28T16:19Z
|
13
|
+
*/
|
14
|
+
function KeyBinding(e,t){this.name=e,this.bindKey=t}function keysFromPath(e){for(var t,n=/\[("|')(.+)\1\]|([^.\[\]]+)/g,i=[];null!==(t=n.exec(e));)i.push(t[2]||t[3]);return i}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t="length"in e&&e.length,n=re.type(e);return"function"===n||re.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(re.isFunction(t))return re.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return re.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(he.test(t))return re.filter(t,e,n);t=re.filter(t,e)}return re.grep(e,function(e){return re.inArray(e,t)>=0!==n})}function r(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t=be[e]={};return re.each(e.match(_e)||[],function(e,n){t[n]=!0}),t}function a(){fe.addEventListener?(fe.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(fe.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(fe.addEventListener||"load"===event.type||"complete"===fe.readyState)&&(a(),re.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(Ce,"-$1").toLowerCase();if(n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:ke.test(n)?re.parseJSON(n):n}catch(r){}re.data(e,t,n)}else n=void 0}return n}function u(e){var t;for(t in e)if(("data"!==t||!re.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,i){if(re.acceptData(e)){var r,o,a=re.expando,s=e.nodeType,l=s?re.cache:e,u=s?e[a]:e[a]&&a;if(u&&l[u]&&(i||l[u].data)||void 0!==n||"string"!=typeof t)return u||(u=s?e[a]=X.pop()||re.guid++:a),l[u]||(l[u]=s?{}:{toJSON:re.noop}),("object"==typeof t||"function"==typeof t)&&(i?l[u]=re.extend(l[u],t):l[u].data=re.extend(l[u].data,t)),o=l[u],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[re.camelCase(t)]=n),"string"==typeof t?(r=o[t],null==r&&(r=o[re.camelCase(t)])):r=o,r}}function d(e,t,n){if(re.acceptData(e)){var i,r,o=e.nodeType,a=o?re.cache:e,s=o?e[re.expando]:re.expando;if(a[s]){if(t&&(i=n?a[s]:a[s].data)){re.isArray(t)?t=t.concat(re.map(t,re.camelCase)):t in i?t=[t]:(t=re.camelCase(t),t=t in i?[t]:t.split(" ")),r=t.length;for(;r--;)delete i[t[r]];if(n?!u(i):!re.isEmptyObject(i))return}(n||(delete a[s].data,u(a[s])))&&(o?re.cleanData([e],!0):ne.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function h(){return!0}function p(){return!1}function f(){try{return fe.activeElement}catch(e){}}function m(e){var t=Be.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,i,r=0,o=typeof e.getElementsByTagName!==$e?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==$e?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(i=n[r]);r++)!t||re.nodeName(i,t)?o.push(i):re.merge(o,g(i,t));return void 0===t||t&&re.nodeName(e,t)?re.merge([e],o):o}function v(e){De.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return re.nodeName(e,"table")&&re.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function _(e){return e.type=(null!==re.find.attr(e,"type"))+"/"+e.type,e}function b(e){var t=Ve.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function x(e,t){for(var n,i=0;null!=(n=e[i]);i++)re._data(n,"globalEval",!t||re._data(t[i],"globalEval"))}function w(e,t){if(1===t.nodeType&&re.hasData(e)){var n,i,r,o=re._data(e),a=re._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(i=0,r=s[n].length;r>i;i++)re.event.add(t,n,s[n][i])}a.data&&(a.data=re.extend({},a.data))}}function $(e,t){var n,i,r;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ne.noCloneEvent&&t[re.expando]){r=re._data(t);for(i in r.events)re.removeEvent(t,i,r.handle);t.removeAttribute(re.expando)}"script"===n&&t.text!==e.text?(_(t).text=e.text,b(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ne.html5Clone&&e.innerHTML&&!re.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&De.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function k(t,n){var i,r=re(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(r[0]))?i.display:re.css(r[0],"display");return r.detach(),o}function C(e){var t=fe,n=Ze[e];return n||(n=k(e,t),"none"!==n&&n||(Qe=(Qe||re("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(Qe[0].contentWindow||Qe[0].contentDocument).document,t.write(),t.close(),n=k(e,t),Qe.detach()),Ze[e]=n),n}function A(e,t){return{get:function(){var n=e();if(null!=n)return n?void delete this.get:(this.get=t).apply(this,arguments)}}}function M(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),i=t,r=ht.length;r--;)if(t=ht[r]+n,t in e)return t;return i}function T(e,t){for(var n,i,r,o=[],a=0,s=e.length;s>a;a++)i=e[a],i.style&&(o[a]=re._data(i,"olddisplay"),n=i.style.display,t?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&Te(i)&&(o[a]=re._data(i,"olddisplay",C(i.nodeName)))):(r=Te(i),(n&&"none"!==n||!r)&&re._data(i,"olddisplay",r?n:re.css(i,"display"))));for(a=0;s>a;a++)i=e[a],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[a]||"":"none"));return e}function S(e,t,n){var i=lt.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function D(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=re.css(e,n+Me[o],!0,r)),i?("content"===n&&(a-=re.css(e,"padding"+Me[o],!0,r)),"margin"!==n&&(a-=re.css(e,"border"+Me[o]+"Width",!0,r))):(a+=re.css(e,"padding"+Me[o],!0,r),"padding"!==n&&(a+=re.css(e,"border"+Me[o]+"Width",!0,r)));return a}function E(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=et(e),a=ne.boxSizing&&"border-box"===re.css(e,"boxSizing",!1,o);if(0>=r||null==r){if(r=tt(e,t,o),(0>r||null==r)&&(r=e.style[t]),it.test(r))return r;i=a&&(ne.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+D(e,t,n||(a?"border":"content"),i,o)+"px"}function L(e,t,n,i,r){return new L.prototype.init(e,t,n,i,r)}function F(){return setTimeout(function(){pt=void 0}),pt=re.now()}function O(e,t){var n,i={height:e},r=0;for(t=t?1:0;4>r;r+=2-t)n=Me[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function R(e,t,n){for(var i,r=(_t[t]||[]).concat(_t["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,t,e))return i}function B(e,t,n){var i,r,o,a,s,l,u,c,d=this,h={},p=e.style,f=e.nodeType&&Te(e),m=re._data(e,"fxshow");n.queue||(s=re._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,re.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],u=re.css(e,"display"),c="none"===u?re._data(e,"olddisplay")||C(e.nodeName):u,"inline"===c&&"none"===re.css(e,"float")&&(ne.inlineBlockNeedsLayout&&"inline"!==C(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",ne.shrinkWrapBlocks()||d.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(i in t)if(r=t[i],mt.exec(r)){if(delete t[i],o=o||"toggle"===r,r===(f?"hide":"show")){if("show"!==r||!m||void 0===m[i])continue;f=!0}h[i]=m&&m[i]||re.style(e,i)}else u=void 0;if(re.isEmptyObject(h))"inline"===("none"===u?C(e.nodeName):u)&&(p.display=u);else{m?"hidden"in m&&(f=m.hidden):m=re._data(e,"fxshow",{}),o&&(m.hidden=!f),f?re(e).show():d.done(function(){re(e).hide()}),d.done(function(){var t;re._removeData(e,"fxshow");for(t in h)re.style(e,t,h[t])});for(i in h)a=R(f?m[i]:0,i,d),i in m||(m[i]=a.start,f&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function P(e,t){var n,i,r,o,a;for(n in e)if(i=re.camelCase(n),r=t[i],o=e[n],re.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=re.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function I(e,t,n){var i,r,o=0,a=yt.length,s=re.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=pt||F(),n=Math.max(0,u.startTime+u.duration-t),i=n/u.duration||0,o=1-i,a=0,l=u.tweens.length;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:re.extend({},t),opts:re.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:pt||F(),duration:n.duration,tweens:[],createTween:function(t,n){var i=re.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(i),i},stop:function(t){var n=0,i=t?u.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(P(c,u.opts.specialEasing);a>o;o++)if(i=yt[o].call(u,e,c,u.opts))return i;return re.map(c,R,u),re.isFunction(u.opts.start)&&u.opts.start.call(e,u),re.fx.timer(re.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function Y(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(_e)||[];if(re.isFunction(n))for(;i=o[r++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function j(e,t,n,i){function r(s){var l;return o[s]=!0,re.each(e[s]||[],function(e,s){var u=s(t,n,i);return"string"!=typeof u||a||o[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),r(u),!1)}),l}var o={},a=e===zt;return r(t.dataTypes[0])||!o["*"]&&r("*")}function N(e,t){var n,i,r=re.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&re.extend(!0,e,n),e}function H(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){l.unshift(a);break}if(l[0]in n)o=l[0];else{for(a in n){if(!l[0]||e.converters[a+" "+l[0]]){o=a;break}i||(i=a)}o=o||i}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function z(e,t,n,i){var r,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(r in u)if(s=r.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[r]:u[r]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function q(e,t,n,i){var r;if(re.isArray(t))re.each(t,function(t,r){n||Vt.test(e)?i(e,r):q(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==re.type(t))i(e,t);else for(r in t)q(e+"["+r+"]",t[r],n,i)}function W(){try{return new e.XMLHttpRequest}catch(t){}}function U(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function V(e){return re.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var X=[],G=X.slice,K=X.concat,J=X.push,Q=X.indexOf,Z={},ee=Z.toString,te=Z.hasOwnProperty,ne={},ie="1.11.3",re=function(e,t){return new re.fn.init(e,t)},oe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ae=/^-ms-/,se=/-([\da-z])/gi,le=function(e,t){return t.toUpperCase()};re.fn=re.prototype={jquery:ie,constructor:re,selector:"",length:0,toArray:function(){return G.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:G.call(this)},pushStack:function(e){var t=re.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return re.each(this,e,t)},map:function(e){return this.pushStack(re.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(G.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:J,sort:X.sort,splice:X.splice},re.extend=re.fn.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||re.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(r=arguments[s]))for(i in r)e=a[i],n=r[i],a!==n&&(u&&n&&(re.isPlainObject(n)||(t=re.isArray(n)))?(t?(t=!1,o=e&&re.isArray(e)?e:[]):o=e&&re.isPlainObject(e)?e:{},a[i]=re.extend(u,o,n)):void 0!==n&&(a[i]=n));return a},re.extend({expando:"jQuery"+(ie+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===re.type(e)},isArray:Array.isArray||function(e){return"array"===re.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!re.isArray(e)&&e-parseFloat(e)+1>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==re.type(e)||e.nodeType||re.isWindow(e))return!1;try{if(e.constructor&&!te.call(e,"constructor")&&!te.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(ne.ownLast)for(t in e)return te.call(e,t);for(t in e);return void 0===t||te.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Z[ee.call(e)]||"object":typeof e},globalEval:function(t){t&&re.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ae,"ms-").replace(se,le)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var r,o=0,a=e.length,s=n(e);if(i){if(s)for(;a>o&&(r=t.apply(e[o],i),r!==!1);o++);else for(o in e)if(r=t.apply(e[o],i),r===!1)break}else if(s)for(;a>o&&(r=t.call(e[o],o,e[o]),r!==!1);o++);else for(o in e)if(r=t.call(e[o],o,e[o]),r===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(oe,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?re.merge(i,"string"==typeof e?[e]:e):J.call(i,e)),i},inArray:function(e,t,n){var i;if(t){if(Q)return Q.call(t,e,n);for(i=t.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;n>i;)e[r++]=t[i++];if(n!==n)for(;void 0!==t[i];)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,a=e.length,s=!n;a>o;o++)i=!t(e[o],o),i!==s&&r.push(e[o]);return r},map:function(e,t,i){var r,o=0,a=e.length,s=n(e),l=[];if(s)for(;a>o;o++)r=t(e[o],o,i),null!=r&&l.push(r);else for(o in e)r=t(e[o],o,i),null!=r&&l.push(r);return K.apply([],l)},guid:1,proxy:function(e,t){var n,i,r;return"string"==typeof t&&(r=e[t],t=e,e=r),re.isFunction(e)?(n=G.call(arguments,2),i=function(){return e.apply(t||this,n.concat(G.call(arguments)))},i.guid=e.guid=e.guid||re.guid++,i):void 0},now:function(){return+new Date},support:ne}),re.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Z["[object "+t+"]"]=t.toLowerCase()});var ue=/*!
|
15
|
+
* Sizzle CSS Selector Engine v2.2.0-pre
|
16
|
+
* http://sizzlejs.com/
|
17
|
+
*
|
18
|
+
* Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
|
19
|
+
* Released under the MIT license
|
20
|
+
* http://jquery.org/license
|
21
|
+
*
|
22
|
+
* Date: 2014-12-16
|
23
|
+
*/
|
24
|
+
function(e){function t(e,t,n,i){var r,o,a,s,l,u,d,p,f,m;if((t?t.ownerDocument||t:j)!==L&&E(t),t=t||L,n=n||[],s=t.nodeType,"string"!=typeof e||!e||1!==s&&9!==s&&11!==s)return n;if(!i&&O){if(11!==s&&(r=ye.exec(e)))if(a=r[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&I(t,o)&&o.id===a)return n.push(o),n}else{if(r[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((a=r[3])&&x.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(a)),n}if(x.qsa&&(!R||!R.test(e))){if(p=d=Y,f=t,m=1!==s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(u=C(e),(d=t.getAttribute("id"))?p=d.replace(be,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",l=u.length;l--;)u[l]=p+h(u[l]);f=_e.test(e)&&c(t.parentNode)||t,m=u.join(",")}if(m)try{return Q.apply(n,f.querySelectorAll(m)),n}catch(g){}finally{d||t.removeAttribute("id")}}}return M(e.replace(le,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[Y]=!0,e}function r(e){var t=L.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=e.length;i--;)w.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function h(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function p(e,t,n){var i=t.dir,r=n&&"parentNode"===i,o=H++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o)}:function(t,n,a){var s,l,u=[N,o];if(a){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||r){if(l=t[Y]||(t[Y]={}),(s=l[i])&&s[0]===N&&s[1]===o)return u[2]=s[2];if(l[i]=u,u[2]=e(t,n,a))return!0}}}function f(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function m(e,n,i){for(var r=0,o=n.length;o>r;r++)t(e,n[r],i);return i}function g(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,u=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,i,r))&&(a.push(o),u&&t.push(s));return a}function v(e,t,n,r,o,a){return r&&!r[Y]&&(r=v(r)),o&&!o[Y]&&(o=v(o,a)),i(function(i,a,s,l){var u,c,d,h=[],p=[],f=a.length,v=i||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?v:g(v,h,e,s,l),_=n?o||(i?e:f||r)?[]:a:y;if(n&&n(y,_,s,l),r)for(u=g(_,p),r(u,[],s,l),c=u.length;c--;)(d=u[c])&&(_[p[c]]=!(y[p[c]]=d));if(i){if(o||e){if(o){for(u=[],c=_.length;c--;)(d=_[c])&&u.push(y[c]=d);o(null,_=[],u,l)}for(c=_.length;c--;)(d=_[c])&&(u=o?ee(i,d):h[c])>-1&&(i[u]=!(a[u]=d))}}else _=g(_===a?_.splice(f,_.length):_),o?o(null,a,_,l):Q.apply(a,_)})}function y(e){for(var t,n,i,r=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=p(function(e){return e===t},a,!0),u=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,i){var r=!o&&(i||n!==T)||((t=n).nodeType?l(e,n,i):u(e,n,i));return t=null,r}];r>s;s++)if(n=w.relative[e[s].type])c=[p(f(c),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[Y]){for(i=++s;r>i&&!w.relative[e[i].type];i++);return v(s>1&&f(c),s>1&&h(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(le,"$1"),n,i>s&&y(e.slice(s,i)),r>i&&y(e=e.slice(i)),r>i&&h(e))}c.push(n)}return f(c)}function _(e,n){var r=n.length>0,o=e.length>0,a=function(i,a,s,l,u){var c,d,h,p=0,f="0",m=i&&[],v=[],y=T,_=i||o&&w.find.TAG("*",u),b=N+=null==y?1:Math.random()||.1,x=_.length;for(u&&(T=a!==L&&a);f!==x&&null!=(c=_[f]);f++){if(o&&c){for(d=0;h=e[d++];)if(h(c,a,s)){l.push(c);break}u&&(N=b)}r&&((c=!h&&c)&&p--,i&&m.push(c))}if(p+=f,r&&f!==p){for(d=0;h=n[d++];)h(m,v,a,s);if(i){if(p>0)for(;f--;)m[f]||v[f]||(v[f]=K.call(l));v=g(v)}Q.apply(l,v),u&&!i&&v.length>0&&p+n.length>1&&t.uniqueSort(l)}return u&&(N=b,T=y),m};return r?i(a):a}var b,x,w,$,k,C,A,M,T,S,D,E,L,F,O,R,B,P,I,Y="sizzle"+1*new Date,j=e.document,N=0,H=0,z=n(),q=n(),W=n(),U=function(e,t){return e===t&&(D=!0),0},V=1<<31,X={}.hasOwnProperty,G=[],K=G.pop,J=G.push,Q=G.push,Z=G.slice,ee=function(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",re=ie.replace("w","w#"),oe="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp(ne+"+","g"),le=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),de=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),he=new RegExp(ae),pe=new RegExp("^"+re+"$"),fe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie.replace("w","w*")+")"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},me=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_e=/[+~]/,be=/'|\\/g,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},$e=function(){E()};try{Q.apply(G=Z.call(j.childNodes),j.childNodes),G[j.childNodes.length].nodeType}catch(ke){Q={apply:G.length?function(e,t){J.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}x=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},E=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:j;return i!==L&&9===i.nodeType&&i.documentElement?(L=i,F=i.documentElement,n=i.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",$e,!1):n.attachEvent&&n.attachEvent("onunload",$e)),O=!k(i),x.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=r(function(e){return e.appendChild(i.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ve.test(i.getElementsByClassName),x.getById=r(function(e){return F.appendChild(e).id=Y,!i.getElementsByName||!i.getElementsByName(Y).length}),x.getById?(w.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&O){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(xe,we);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(xe,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},w.find.CLASS=x.getElementsByClassName&&function(e,t){return O?t.getElementsByClassName(e):void 0},B=[],R=[],(x.qsa=ve.test(i.querySelectorAll))&&(r(function(e){F.appendChild(e).innerHTML="<a id='"+Y+"'></a><select id='"+Y+"-\f]' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||R.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+Y+"-]").length||R.push("~="),e.querySelectorAll(":checked").length||R.push(":checked"),e.querySelectorAll("a#"+Y+"+*").length||R.push(".#.+[+~]")}),r(function(e){var t=i.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&R.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||R.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),R.push(",.*:")})),(x.matchesSelector=ve.test(P=F.matches||F.webkitMatchesSelector||F.mozMatchesSelector||F.oMatchesSelector||F.msMatchesSelector))&&r(function(e){x.disconnectedMatch=P.call(e,"div"),P.call(e,"[s!='']:x"),B.push("!=",ae)}),R=R.length&&new RegExp(R.join("|")),B=B.length&&new RegExp(B.join("|")),t=ve.test(F.compareDocumentPosition),I=t||ve.test(F.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===i||e.ownerDocument===j&&I(j,e)?-1:t===i||t.ownerDocument===j&&I(j,t)?1:S?ee(S,e)-ee(S,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,o=e.parentNode,s=t.parentNode,l=[e],u=[t];if(!o||!s)return e===i?-1:t===i?1:o?-1:s?1:S?ee(S,e)-ee(S,t):0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;l[r]===u[r];)r++;return r?a(l[r],u[r]):l[r]===j?-1:u[r]===j?1:0},i):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&E(e),n=n.replace(de,"='$1']"),x.matchesSelector&&O&&(!B||!B.test(n))&&(!R||!R.test(n)))try{var i=P.call(e,n);if(i||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&E(e),I(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&E(e);var n=w.attrHandle[t.toLowerCase()],i=n&&X.call(w.attrHandle,t.toLowerCase())?n(e,t,!O):void 0;return void 0!==i?i:x.attributes||!O?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(D=!x.detectDuplicates,S=!x.sortStable&&e.slice(0),e.sort(U),D){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return S=null,e},$=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=$(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=$(t);return n},w=t.selectors={cacheLength:50,createPseudo:i,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,we),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&he.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(se," ")+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,h,p,f,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[a?g.firstChild:g.lastChild],a&&y){for(c=g[Y]||(g[Y]={}),u=c[e]||[],p=u[0]===N&&u[1],h=u[0]===N&&u[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(h=p=0)||f.pop();)if(1===d.nodeType&&++h&&d===t){c[e]=[N,p,h];break}}else if(y&&(u=(t[Y]||(t[Y]={}))[e])&&u[0]===N)h=u[1];else for(;(d=++p&&d&&d[m]||(h=p=0)||f.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++h||(y&&((d[Y]||(d[Y]={}))[e]=[N,h]),d!==t)););return h-=r,h===i||h%i===0&&h/i>=0}}},PSEUDO:function(e,n){var r,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[Y]?o(n):o.length>1?(r=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=ee(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=A(e.replace(le,"$1"));return r[Y]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(xe,we),function(t){return(t.textContent||t.innerText||$(t)).indexOf(e)>-1}}),lang:i(function(e){return pe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,we).toLowerCase(),function(t){var n;do if(n=O?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===F},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return me.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=0>n?n+t:n;++i<t;)e.push(i);return e})}},w.pseudos.nth=w.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[b]=s(b);for(b in{submit:!0,reset:!0})w.pseudos[b]=l(b);return d.prototype=w.filters=w.pseudos,w.setFilters=new d,C=t.tokenize=function(e,n){var i,r,o,a,s,l,u,c=q[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=w.preFilter;s;){(!i||(r=ue.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),i=!1,(r=ce.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(le," ")}),s=s.slice(i.length));for(a in w.filter)!(r=fe[a].exec(s))||u[a]&&!(r=u[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):q(e,l).slice(0)},A=t.compile=function(e,t){var n,i=[],r=[],o=W[e+" "];if(!o){for(t||(t=C(e)),n=t.length;n--;)o=y(t[n]),o[Y]?i.push(o):r.push(o);o=W(e,_(r,i)),o.selector=e}return o},M=t.select=function(e,t,n,i){var r,o,a,s,l,u="function"==typeof e&&e,d=!i&&C(e=u.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&O&&w.relative[o[1].type]){if(t=(w.find.ID(a.matches[0].replace(xe,we),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=fe.needsContext.test(e)?0:o.length;r--&&(a=o[r],!w.relative[s=a.type]);)if((l=w.find[s])&&(i=l(a.matches[0].replace(xe,we),_e.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(r,1),e=i.length&&h(o),!e)return Q.apply(n,i),n;break}}return(u||A(e,d))(i,t,!O,n,_e.test(e)&&c(t.parentNode)||t),n},x.sortStable=Y.split("").sort(U).join("")===Y,x.detectDuplicates=!!D,E(),x.sortDetached=r(function(e){return 1&e.compareDocumentPosition(L.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var i;return n?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);re.find=ue,re.expr=ue.selectors,re.expr[":"]=re.expr.pseudos,re.unique=ue.uniqueSort,re.text=ue.getText,re.isXMLDoc=ue.isXML,re.contains=ue.contains;var ce=re.expr.match.needsContext,de=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,he=/^.[^:#\[\.,]*$/;re.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?re.find.matchesSelector(i,e)?[i]:[]:re.find.matches(e,re.grep(t,function(e){return 1===e.nodeType}))},re.fn.extend({find:function(e){var t,n=[],i=this,r=i.length;if("string"!=typeof e)return this.pushStack(re(e).filter(function(){for(t=0;r>t;t++)if(re.contains(i[t],this))return!0}));for(t=0;r>t;t++)re.find(e,i[t],n);return n=this.pushStack(r>1?re.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&ce.test(e)?re(e):e||[],!1).length}});var pe,fe=e.document,me=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ge=re.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:me.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||pe).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof re?t[0]:t,re.merge(this,re.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:fe,!0)),de.test(n[1])&&re.isPlainObject(t))for(n in t)re.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if(i=fe.getElementById(n[2]),i&&i.parentNode){if(i.id!==n[2])return pe.find(e);this.length=1,this[0]=i}return this.context=fe,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):re.isFunction(e)?"undefined"!=typeof pe.ready?pe.ready(e):e(re):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),re.makeArray(e,this))};ge.prototype=re.fn,pe=re(fe);var ve=/^(?:parents|prev(?:Until|All))/,ye={children:!0,contents:!0,next:!0,prev:!0};re.extend({dir:function(e,t,n){for(var i=[],r=e[t];r&&9!==r.nodeType&&(void 0===n||1!==r.nodeType||!re(r).is(n));)1===r.nodeType&&i.push(r),r=r[t];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),re.fn.extend({has:function(e){var t,n=re(e,this),i=n.length;return this.filter(function(){for(t=0;i>t;t++)if(re.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=ce.test(e)||"string"!=typeof e?re(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&re.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?re.unique(o):o)},index:function(e){return e?"string"==typeof e?re.inArray(this[0],re(e)):re.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(re.unique(re.merge(this.get(),re(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),re.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return re.dir(e,"parentNode")},parentsUntil:function(e,t,n){return re.dir(e,"parentNode",n)},next:function(e){return r(e,"nextSibling")},prev:function(e){return r(e,"previousSibling")},nextAll:function(e){return re.dir(e,"nextSibling")},prevAll:function(e){return re.dir(e,"previousSibling")},nextUntil:function(e,t,n){return re.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return re.dir(e,"previousSibling",n)},siblings:function(e){return re.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return re.sibling(e.firstChild)},contents:function(e){return re.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:re.merge([],e.childNodes)}},function(e,t){re.fn[e]=function(n,i){var r=re.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=re.filter(i,r)),this.length>1&&(ye[e]||(r=re.unique(r)),ve.test(e)&&(r=r.reverse())),this.pushStack(r)}});var _e=/\S+/g,be={};re.Callbacks=function(e){e="string"==typeof e?be[e]||o(e):re.extend({},e);var t,n,i,r,a,s,l=[],u=!e.once&&[],c=function(o){for(n=e.memory&&o,i=!0,a=s||0,s=0,r=l.length,t=!0;l&&r>a;a++)if(l[a].apply(o[0],o[1])===!1&&e.stopOnFalse){n=!1;break}t=!1,l&&(u?u.length&&c(u.shift()):n?l=[]:d.disable())},d={add:function(){if(l){var i=l.length;!function o(t){re.each(t,function(t,n){var i=re.type(n);"function"===i?e.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!==i&&o(n)})}(arguments),t?r=l.length:n&&(s=i,c(n))}return this},remove:function(){return l&&re.each(arguments,function(e,n){for(var i;(i=re.inArray(n,l,i))>-1;)l.splice(i,1),t&&(r>=i&&r--,a>=i&&a--)}),this},has:function(e){return e?re.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],r=0,this},disable:function(){return l=u=n=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,n||d.disable(),this},locked:function(){return!u},fireWith:function(e,n){return!l||i&&!u||(n=n||[],n=[e,n.slice?n.slice():n],t?u.push(n):c(n)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d},re.extend({Deferred:function(e){var t=[["resolve","done",re.Callbacks("once memory"),"resolved"],["reject","fail",re.Callbacks("once memory"),"rejected"],["notify","progress",re.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return re.Deferred(function(n){re.each(t,function(t,o){var a=re.isFunction(e[t])&&e[t];r[o[1]](function(){var e=a&&a.apply(this,arguments);e&&re.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?re.extend(e,i):i}},r={};return i.pipe=i.then,re.each(t,function(e,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,o=G.call(arguments),a=o.length,s=1!==a||e&&re.isFunction(e.promise)?a:0,l=1===s?e:re.Deferred(),u=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?G.call(arguments):r,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);a>r;r++)o[r]&&re.isFunction(o[r].promise)?o[r].promise().done(u(r,i,o)).fail(l.reject).progress(u(r,n,t)):--s;return s||l.resolveWith(i,o),l.promise()}});var xe;re.fn.ready=function(e){return re.ready.promise().done(e),this},re.extend({isReady:!1,readyWait:1,holdReady:function(e){e?re.readyWait++:re.ready(!0)},ready:function(e){if(e===!0?!--re.readyWait:!re.isReady){if(!fe.body)return setTimeout(re.ready);re.isReady=!0,e!==!0&&--re.readyWait>0||(xe.resolveWith(fe,[re]),re.fn.triggerHandler&&(re(fe).triggerHandler("ready"),re(fe).off("ready")))}}}),re.ready.promise=function(t){if(!xe)if(xe=re.Deferred(),"complete"===fe.readyState)setTimeout(re.ready);else if(fe.addEventListener)fe.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1);else{fe.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&fe.documentElement}catch(i){}n&&n.doScroll&&!function r(){if(!re.isReady){try{n.doScroll("left")}catch(e){return setTimeout(r,50)}a(),re.ready()}}()}return xe.promise(t)};var we,$e="undefined";for(we in re(ne))break;ne.ownLast="0"!==we,ne.inlineBlockNeedsLayout=!1,re(function(){var e,t,n,i;n=fe.getElementsByTagName("body")[0],n&&n.style&&(t=fe.createElement("div"),i=fe.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==$e&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ne.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(i))}),function(){var e=fe.createElement("div");if(null==ne.deleteExpando){ne.deleteExpando=!0;try{delete e.test}catch(t){ne.deleteExpando=!1}}e=null}(),re.acceptData=function(e){var t=re.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return 1!==n&&9!==n?!1:!t||t!==!0&&e.getAttribute("classid")===t};var ke=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ce=/([A-Z])/g;re.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?re.cache[e[re.expando]]:e[re.expando],!!e&&!u(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return d(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return d(e,t,!0)}}),re.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(r=re.data(o),1===o.nodeType&&!re._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=re.camelCase(i.slice(5)),l(o,i,r[i])));re._data(o,"parsedAttrs",!0)}return r}return"object"==typeof e?this.each(function(){re.data(this,e)}):arguments.length>1?this.each(function(){re.data(this,e,t)}):o?l(o,e,re.data(o,e)):void 0},removeData:function(e){return this.each(function(){re.removeData(this,e)})}}),re.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=re._data(e,t),n&&(!i||re.isArray(n)?i=re._data(e,t,re.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=re.queue(e,t),i=n.length,r=n.shift(),o=re._queueHooks(e,t),a=function(){re.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return re._data(e,n)||re._data(e,n,{empty:re.Callbacks("once memory").add(function(){re._removeData(e,t+"queue"),re._removeData(e,n)})})}}),re.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?re.queue(this[0],e):void 0===t?this:this.each(function(){var n=re.queue(this,e,t);re._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&re.dequeue(this,e)})},dequeue:function(e){return this.each(function(){re.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=re.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=re._data(o[a],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}});var Ae=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Me=["Top","Right","Bottom","Left"],Te=function(e,t){return e=t||e,"none"===re.css(e,"display")||!re.contains(e.ownerDocument,e)},Se=re.access=function(e,t,n,i,r,o,a){var s=0,l=e.length,u=null==n;if("object"===re.type(n)){r=!0;for(s in n)re.access(e,t,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,re.isFunction(i)||(a=!0),u&&(a?(t.call(e,i),t=null):(u=t,t=function(e,t,n){return u.call(re(e),n)})),t))for(;l>s;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:u?t.call(e):l?t(e[0],n):o},De=/^(?:checkbox|radio)$/i;!function(){var e=fe.createElement("input"),t=fe.createElement("div"),n=fe.createDocumentFragment();if(t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ne.leadingWhitespace=3===t.firstChild.nodeType,ne.tbody=!t.getElementsByTagName("tbody").length,ne.htmlSerialize=!!t.getElementsByTagName("link").length,ne.html5Clone="<:nav></:nav>"!==fe.createElement("nav").cloneNode(!0).outerHTML,e.type="checkbox",e.checked=!0,n.appendChild(e),ne.appendChecked=e.checked,t.innerHTML="<textarea>x</textarea>",ne.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,n.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",ne.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,ne.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",function(){ne.noCloneEvent=!1}),t.cloneNode(!0).click()),null==ne.deleteExpando){ne.deleteExpando=!0;try{delete t.test}catch(i){ne.deleteExpando=!1}}}(),function(){var t,n,i=fe.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(ne[t+"Bubbles"]=n in e)||(i.setAttribute(n,"t"),ne[t+"Bubbles"]=i.attributes[n].expando===!1);i=null}();var Ee=/^(?:input|select|textarea)$/i,Le=/^key/,Fe=/^(?:mouse|pointer|contextmenu)|click/,Oe=/^(?:focusinfocus|focusoutblur)$/,Re=/^([^.]*)(?:\.(.+)|)$/;re.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,u,c,d,h,p,f,m,g=re._data(e);if(g){for(n.handler&&(l=n,n=l.handler,r=l.selector),n.guid||(n.guid=re.guid++),(a=g.events)||(a=g.events={}),(c=g.handle)||(c=g.handle=function(e){return typeof re===$e||e&&re.event.triggered===e.type?void 0:re.event.dispatch.apply(c.elem,arguments)},c.elem=e),t=(t||"").match(_e)||[""],s=t.length;s--;)o=Re.exec(t[s])||[],p=m=o[1],f=(o[2]||"").split(".").sort(),p&&(u=re.event.special[p]||{},p=(r?u.delegateType:u.bindType)||p,u=re.event.special[p]||{},d=re.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&re.expr.match.needsContext.test(r),namespace:f.join(".")},l),(h=a[p])||(h=a[p]=[],h.delegateCount=0,u.setup&&u.setup.call(e,i,f,c)!==!1||(e.addEventListener?e.addEventListener(p,c,!1):e.attachEvent&&e.attachEvent("on"+p,c))),u.add&&(u.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,d):h.push(d),re.event.global[p]=!0);e=null}},remove:function(e,t,n,i,r){var o,a,s,l,u,c,d,h,p,f,m,g=re.hasData(e)&&re._data(e);if(g&&(c=g.events)){for(t=(t||"").match(_e)||[""],u=t.length;u--;)if(s=Re.exec(t[u])||[],p=m=s[1],f=(s[2]||"").split(".").sort(),p){for(d=re.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,h=c[p]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=h.length;o--;)a=h[o],!r&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||i&&i!==a.selector&&("**"!==i||!a.selector)||(h.splice(o,1),a.selector&&h.delegateCount--,d.remove&&d.remove.call(e,a));l&&!h.length&&(d.teardown&&d.teardown.call(e,f,g.handle)!==!1||re.removeEvent(e,p,g.handle),delete c[p])}else for(p in c)re.event.remove(e,p+t[u],n,i,!0);re.isEmptyObject(c)&&(delete g.handle,re._removeData(e,"events"))}},trigger:function(t,n,i,r){var o,a,s,l,u,c,d,h=[i||fe],p=te.call(t,"type")?t.type:t,f=te.call(t,"namespace")?t.namespace.split("."):[];if(s=c=i=i||fe,3!==i.nodeType&&8!==i.nodeType&&!Oe.test(p+re.event.triggered)&&(p.indexOf(".")>=0&&(f=p.split("."),p=f.shift(),f.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[re.expando]?t:new re.Event(p,"object"==typeof t&&t),
|
25
|
+
t.isTrigger=r?2:3,t.namespace=f.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:re.makeArray(n,[t]),u=re.event.special[p]||{},r||!u.trigger||u.trigger.apply(i,n)!==!1)){if(!r&&!u.noBubble&&!re.isWindow(i)){for(l=u.delegateType||p,Oe.test(l+p)||(s=s.parentNode);s;s=s.parentNode)h.push(s),c=s;c===(i.ownerDocument||fe)&&h.push(c.defaultView||c.parentWindow||e)}for(d=0;(s=h[d++])&&!t.isPropagationStopped();)t.type=d>1?l:u.bindType||p,o=(re._data(s,"events")||{})[t.type]&&re._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&re.acceptData(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!r&&!t.isDefaultPrevented()&&(!u._default||u._default.apply(h.pop(),n)===!1)&&re.acceptData(i)&&a&&i[p]&&!re.isWindow(i)){c=i[a],c&&(i[a]=null),re.event.triggered=p;try{i[p]()}catch(m){}re.event.triggered=void 0,c&&(i[a]=c)}return t.result}},dispatch:function(e){e=re.event.fix(e);var t,n,i,r,o,a=[],s=G.call(arguments),l=(re._data(this,"events")||{})[e.type]||[],u=re.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(a=re.event.handlers.call(this,e,l),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,o=0;(i=r.handlers[o++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,n=((re.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,s),void 0!==n&&(e.result=n)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(r=[],o=0;s>o;o++)i=t[o],n=i.selector+" ",void 0===r[n]&&(r[n]=i.needsContext?re(n,this).index(l)>=0:re.find(n,this,null,[l]).length),r[n]&&r.push(i);r.length&&a.push({elem:l,handlers:r})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[re.expando])return e;var t,n,i,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=Fe.test(r)?this.mouseHooks:Le.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new re.Event(o),t=i.length;t--;)n=i[t],e[n]=o[n];return e.target||(e.target=o.srcElement||fe),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,r,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=e.target.ownerDocument||fe,r=i.documentElement,n=i.body,e.pageX=t.clientX+(r&&r.scrollLeft||n&&n.scrollLeft||0)-(r&&r.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||n&&n.scrollTop||0)-(r&&r.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==f()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===f()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return re.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return re.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var r=re.extend(new re.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?re.event.trigger(r,null,t):re.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},re.removeEvent=fe.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var i="on"+t;e.detachEvent&&(typeof e[i]===$e&&(e[i]=null),e.detachEvent(i,n))},re.Event=function(e,t){return this instanceof re.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?h:p):this.type=e,t&&re.extend(this,t),this.timeStamp=e&&e.timeStamp||re.now(),void(this[re.expando]=!0)):new re.Event(e,t)},re.Event.prototype={isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=h,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=h,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=h,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},re.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){re.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return(!r||r!==i&&!re.contains(i,r))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),ne.submitBubbles||(re.event.special.submit={setup:function(){return re.nodeName(this,"form")?!1:void re.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=re.nodeName(t,"input")||re.nodeName(t,"button")?t.form:void 0;n&&!re._data(n,"submitBubbles")&&(re.event.add(n,"submit._submit",function(e){e._submit_bubble=!0}),re._data(n,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&re.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return re.nodeName(this,"form")?!1:void re.event.remove(this,"._submit")}}),ne.changeBubbles||(re.event.special.change={setup:function(){return Ee.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(re.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),re.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),re.event.simulate("change",this,e,!0)})),!1):void re.event.add(this,"beforeactivate._change",function(e){var t=e.target;Ee.test(t.nodeName)&&!re._data(t,"changeBubbles")&&(re.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||re.event.simulate("change",this.parentNode,e,!0)}),re._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return re.event.remove(this,"._change"),!Ee.test(this.nodeName)}}),ne.focusinBubbles||re.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){re.event.simulate(t,e.target,re.event.fix(e),!0)};re.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=re._data(i,t);r||i.addEventListener(e,n,!0),re._data(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=re._data(i,t)-1;r?re._data(i,t,r):(i.removeEventListener(e,n,!0),re._removeData(i,t))}}}),re.fn.extend({on:function(e,t,n,i,r){var o,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(o in e)this.on(o,t,n,e[o],r);return this}if(null==n&&null==i?(i=t,n=t=void 0):null==i&&("string"==typeof t?(i=n,n=void 0):(i=n,n=t,t=void 0)),i===!1)i=p;else if(!i)return this;return 1===r&&(a=i,i=function(e){return re().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=re.guid++)),this.each(function(){re.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,re(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=p),this.each(function(){re.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){re.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?re.event.trigger(e,t,n,!0):void 0}});var Be="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Pe=/ jQuery\d+="(?:null|\d+)"/g,Ie=new RegExp("<(?:"+Be+")[\\s/>]","i"),Ye=/^\s+/,je=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ne=/<([\w:]+)/,He=/<tbody/i,ze=/<|&#?\w+;/,qe=/<(?:script|style|link)/i,We=/checked\s*(?:[^=]|=\s*.checked.)/i,Ue=/^$|\/(?:java|ecma)script/i,Ve=/^true\/(.*)/,Xe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ge={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ne.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Ke=m(fe),Je=Ke.appendChild(fe.createElement("div"));Ge.optgroup=Ge.option,Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,Ge.th=Ge.td,re.extend({clone:function(e,t,n){var i,r,o,a,s,l=re.contains(e.ownerDocument,e);if(ne.html5Clone||re.isXMLDoc(e)||!Ie.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Je.innerHTML=e.outerHTML,Je.removeChild(o=Je.firstChild)),!(ne.noCloneEvent&&ne.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||re.isXMLDoc(e)))for(i=g(o),s=g(e),a=0;null!=(r=s[a]);++a)i[a]&&$(r,i[a]);if(t)if(n)for(s=s||g(e),i=i||g(o),a=0;null!=(r=s[a]);a++)w(r,i[a]);else w(e,o);return i=g(o,"script"),i.length>0&&x(i,!l&&g(e,"script")),i=s=r=null,o},buildFragment:function(e,t,n,i){for(var r,o,a,s,l,u,c,d=e.length,h=m(t),p=[],f=0;d>f;f++)if(o=e[f],o||0===o)if("object"===re.type(o))re.merge(p,o.nodeType?[o]:o);else if(ze.test(o)){for(s=s||h.appendChild(t.createElement("div")),l=(Ne.exec(o)||["",""])[1].toLowerCase(),c=Ge[l]||Ge._default,s.innerHTML=c[1]+o.replace(je,"<$1></$2>")+c[2],r=c[0];r--;)s=s.lastChild;if(!ne.leadingWhitespace&&Ye.test(o)&&p.push(t.createTextNode(Ye.exec(o)[0])),!ne.tbody)for(o="table"!==l||He.test(o)?"<table>"!==c[1]||He.test(o)?0:s:s.firstChild,r=o&&o.childNodes.length;r--;)re.nodeName(u=o.childNodes[r],"tbody")&&!u.childNodes.length&&o.removeChild(u);for(re.merge(p,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=h.lastChild}else p.push(t.createTextNode(o));for(s&&h.removeChild(s),ne.appendChecked||re.grep(g(p,"input"),v),f=0;o=p[f++];)if((!i||-1===re.inArray(o,i))&&(a=re.contains(o.ownerDocument,o),s=g(h.appendChild(o),"script"),a&&x(s),n))for(r=0;o=s[r++];)Ue.test(o.type||"")&&n.push(o);return s=null,h},cleanData:function(e,t){for(var n,i,r,o,a=0,s=re.expando,l=re.cache,u=ne.deleteExpando,c=re.event.special;null!=(n=e[a]);a++)if((t||re.acceptData(n))&&(r=n[s],o=r&&l[r])){if(o.events)for(i in o.events)c[i]?re.event.remove(n,i):re.removeEvent(n,i,o.handle);l[r]&&(delete l[r],u?delete n[s]:typeof n.removeAttribute!==$e?n.removeAttribute(s):n[s]=null,X.push(r))}}}),re.fn.extend({text:function(e){return Se(this,function(e){return void 0===e?re.text(this):this.empty().append((this[0]&&this[0].ownerDocument||fe).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?re.filter(e,this):this,r=0;null!=(n=i[r]);r++)t||1!==n.nodeType||re.cleanData(g(n)),n.parentNode&&(t&&re.contains(n.ownerDocument,n)&&x(g(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&re.cleanData(g(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&re.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return re.clone(this,e,t)})},html:function(e){return Se(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Pe,""):void 0;if("string"==typeof e&&!qe.test(e)&&(ne.htmlSerialize||!Ie.test(e))&&(ne.leadingWhitespace||!Ye.test(e))&&!Ge[(Ne.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(je,"<$1></$2>");try{for(;i>n;n++)t=this[n]||{},1===t.nodeType&&(re.cleanData(g(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,re.cleanData(g(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=K.apply([],e);var n,i,r,o,a,s,l=0,u=this.length,c=this,d=u-1,h=e[0],p=re.isFunction(h);if(p||u>1&&"string"==typeof h&&!ne.checkClone&&We.test(h))return this.each(function(n){var i=c.eq(n);p&&(e[0]=h.call(this,n,i.html())),i.domManip(e,t)});if(u&&(s=re.buildFragment(e,this[0].ownerDocument,!1,this),n=s.firstChild,1===s.childNodes.length&&(s=n),n)){for(o=re.map(g(s,"script"),_),r=o.length;u>l;l++)i=s,l!==d&&(i=re.clone(i,!0,!0),r&&re.merge(o,g(i,"script"))),t.call(this[l],i,l);if(r)for(a=o[o.length-1].ownerDocument,re.map(o,b),l=0;r>l;l++)i=o[l],Ue.test(i.type||"")&&!re._data(i,"globalEval")&&re.contains(a,i)&&(i.src?re._evalUrl&&re._evalUrl(i.src):re.globalEval((i.text||i.textContent||i.innerHTML||"").replace(Xe,"")));s=n=null}return this}}),re.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){re.fn[e]=function(e){for(var n,i=0,r=[],o=re(e),a=o.length-1;a>=i;i++)n=i===a?this:this.clone(!0),re(o[i])[t](n),J.apply(r,n.get());return this.pushStack(r)}});var Qe,Ze={};!function(){var e;ne.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,i;return n=fe.getElementsByTagName("body")[0],n&&n.style?(t=fe.createElement("div"),i=fe.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==$e&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(fe.createElement("div")).style.width="5px",e=3!==t.offsetWidth),n.removeChild(i),e):void 0}}();var et,tt,nt=/^margin/,it=new RegExp("^("+Ae+")(?!px)[a-z%]+$","i"),rt=/^(top|right|bottom|left)$/;e.getComputedStyle?(et=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):e.getComputedStyle(t,null)},tt=function(e,t,n){var i,r,o,a,s=e.style;return n=n||et(e),a=n?n.getPropertyValue(t)||n[t]:void 0,n&&(""!==a||re.contains(e.ownerDocument,e)||(a=re.style(e,t)),it.test(a)&&nt.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0===a?a:a+""}):fe.documentElement.currentStyle&&(et=function(e){return e.currentStyle},tt=function(e,t,n){var i,r,o,a,s=e.style;return n=n||et(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),it.test(a)&&!rt.test(t)&&(i=s.left,r=e.runtimeStyle,o=r&&r.left,o&&(r.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=i,o&&(r.left=o)),void 0===a?a:a+""||"auto"}),function(){function t(){var t,n,i,r;n=fe.getElementsByTagName("body")[0],n&&n.style&&(t=fe.createElement("div"),i=fe.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=a=!1,l=!0,e.getComputedStyle&&(o="1%"!==(e.getComputedStyle(t,null)||{}).top,a="4px"===(e.getComputedStyle(t,null)||{width:"4px"}).width,r=t.appendChild(fe.createElement("div")),r.style.cssText=t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",r.style.marginRight=r.style.width="0",t.style.width="1px",l=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight),t.removeChild(r)),t.innerHTML="<table><tr><td></td><td>t</td></tr></table>",r=t.getElementsByTagName("td"),r[0].style.cssText="margin:0;border:0;padding:0;display:none",s=0===r[0].offsetHeight,s&&(r[0].style.display="",r[1].style.display="none",s=0===r[0].offsetHeight),n.removeChild(i))}var n,i,r,o,a,s,l;n=fe.createElement("div"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=n.getElementsByTagName("a")[0],i=r&&r.style,i&&(i.cssText="float:left;opacity:.5",ne.opacity="0.5"===i.opacity,ne.cssFloat=!!i.cssFloat,n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",ne.clearCloneStyle="content-box"===n.style.backgroundClip,ne.boxSizing=""===i.boxSizing||""===i.MozBoxSizing||""===i.WebkitBoxSizing,re.extend(ne,{reliableHiddenOffsets:function(){return null==s&&t(),s},boxSizingReliable:function(){return null==a&&t(),a},pixelPosition:function(){return null==o&&t(),o},reliableMarginRight:function(){return null==l&&t(),l}}))}(),re.swap=function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r};var ot=/alpha\([^)]*\)/i,at=/opacity\s*=\s*([^)]*)/,st=/^(none|table(?!-c[ea]).+)/,lt=new RegExp("^("+Ae+")(.*)$","i"),ut=new RegExp("^([+-])=("+Ae+")","i"),ct={position:"absolute",visibility:"hidden",display:"block"},dt={letterSpacing:"0",fontWeight:"400"},ht=["Webkit","O","Moz","ms"];re.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=tt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ne.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=re.camelCase(t),l=e.style;if(t=re.cssProps[s]||(re.cssProps[s]=M(l,s)),a=re.cssHooks[t]||re.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:l[t];if(o=typeof n,"string"===o&&(r=ut.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(re.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||re.cssNumber[s]||(n+="px"),ne.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,i)))))try{l[t]=n}catch(u){}}},css:function(e,t,n,i){var r,o,a,s=re.camelCase(t);return t=re.cssProps[s]||(re.cssProps[s]=M(e.style,s)),a=re.cssHooks[t]||re.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=tt(e,t,i)),"normal"===o&&t in dt&&(o=dt[t]),""===n||n?(r=parseFloat(o),n===!0||re.isNumeric(r)?r||0:o):o}}),re.each(["height","width"],function(e,t){re.cssHooks[t]={get:function(e,n,i){return n?st.test(re.css(e,"display"))&&0===e.offsetWidth?re.swap(e,ct,function(){return E(e,t,i)}):E(e,t,i):void 0},set:function(e,n,i){var r=i&&et(e);return S(e,n,i?D(e,t,i,ne.boxSizing&&"border-box"===re.css(e,"boxSizing",!1,r),r):0)}}}),ne.opacity||(re.cssHooks.opacity={get:function(e,t){return at.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,r=re.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=i&&i.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===re.trim(o.replace(ot,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=ot.test(o)?o.replace(ot,r):o+" "+r)}}),re.cssHooks.marginRight=A(ne.reliableMarginRight,function(e,t){return t?re.swap(e,{display:"inline-block"},tt,[e,"marginRight"]):void 0}),re.each({margin:"",padding:"",border:"Width"},function(e,t){re.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[e+Me[i]+t]=o[i]||o[i-2]||o[0];return r}},nt.test(e)||(re.cssHooks[e+t].set=S)}),re.fn.extend({css:function(e,t){return Se(this,function(e,t,n){var i,r,o={},a=0;if(re.isArray(t)){for(i=et(e),r=t.length;r>a;a++)o[t[a]]=re.css(e,t[a],!1,i);return o}return void 0!==n?re.style(e,t,n):re.css(e,t)},e,t,arguments.length>1)},show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Te(this)?re(this).show():re(this).hide()})}}),re.Tween=L,L.prototype={constructor:L,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(re.cssNumber[n]?"":"px")},cur:function(){var e=L.propHooks[this.prop];return e&&e.get?e.get(this):L.propHooks._default.get(this)},run:function(e){var t,n=L.propHooks[this.prop];return this.options.duration?this.pos=t=re.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):L.propHooks._default.set(this),this}},L.prototype.init.prototype=L.prototype,L.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=re.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){re.fx.step[e.prop]?re.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[re.cssProps[e.prop]]||re.cssHooks[e.prop])?re.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},L.propHooks.scrollTop=L.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},re.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},re.fx=L.prototype.init,re.fx.step={};var pt,ft,mt=/^(?:toggle|show|hide)$/,gt=new RegExp("^(?:([+-])=|)("+Ae+")([a-z%]*)$","i"),vt=/queueHooks$/,yt=[B],_t={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),r=gt.exec(t),o=r&&r[3]||(re.cssNumber[e]?"":"px"),a=(re.cssNumber[e]||"px"!==o&&+i)&>.exec(re.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],r=r||[],a=+i||1;do s=s||".5",a/=s,re.style(n.elem,e,a+o);while(s!==(s=n.cur()/i)&&1!==s&&--l)}return r&&(a=n.start=+a||+i||0,n.unit=o,n.end=r[1]?a+(r[1]+1)*r[2]:+r[2]),n}]};re.Animation=re.extend(I,{tweener:function(e,t){re.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,r=e.length;r>i;i++)n=e[i],_t[n]=_t[n]||[],_t[n].unshift(t)},prefilter:function(e,t){t?yt.unshift(e):yt.push(e)}}),re.speed=function(e,t,n){var i=e&&"object"==typeof e?re.extend({},e):{complete:n||!n&&t||re.isFunction(e)&&e,duration:e,easing:n&&t||t&&!re.isFunction(t)&&t};return i.duration=re.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in re.fx.speeds?re.fx.speeds[i.duration]:re.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){re.isFunction(i.old)&&i.old.call(this),i.queue&&re.dequeue(this,i.queue)},i},re.fn.extend({fadeTo:function(e,t,n,i){return this.filter(Te).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=re.isEmptyObject(e),o=re.speed(t,n,i),a=function(){var t=I(this,re.extend({},e),o);(r||re._data(this,"finish"))&&t.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=re.timers,a=re._data(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&vt.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));(t||!n)&&re.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=re._data(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=re.timers,a=i?i.length:0;for(n.finish=!0,re.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),re.each(["toggle","show","hide"],function(e,t){var n=re.fn[t];re.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(O(t,!0),e,i,r)}}),re.each({slideDown:O("show"),slideUp:O("hide"),slideToggle:O("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){re.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),re.timers=[],re.fx.tick=function(){var e,t=re.timers,n=0;for(pt=re.now();n<t.length;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||re.fx.stop(),pt=void 0},re.fx.timer=function(e){re.timers.push(e),e()?re.fx.start():re.timers.pop()},re.fx.interval=13,re.fx.start=function(){ft||(ft=setInterval(re.fx.tick,re.fx.interval))},re.fx.stop=function(){clearInterval(ft),ft=null},re.fx.speeds={slow:600,fast:200,_default:400},re.fn.delay=function(e,t){return e=re.fx?re.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},function(){var e,t,n,i,r;t=fe.createElement("div"),t.setAttribute("className","t"),t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=t.getElementsByTagName("a")[0],n=fe.createElement("select"),r=n.appendChild(fe.createElement("option")),e=t.getElementsByTagName("input")[0],i.style.cssText="top:1px",ne.getSetAttribute="t"!==t.className,ne.style=/top/.test(i.getAttribute("style")),ne.hrefNormalized="/a"===i.getAttribute("href"),ne.checkOn=!!e.value,ne.optSelected=r.selected,ne.enctype=!!fe.createElement("form").enctype,n.disabled=!0,ne.optDisabled=!r.disabled,e=fe.createElement("input"),e.setAttribute("value",""),ne.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),ne.radioValue="t"===e.value}();var bt=/\r/g;re.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=re.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,re(this).val()):e,null==r?r="":"number"==typeof r?r+="":re.isArray(r)&&(r=re.map(r,function(e){return null==e?"":e+""})),t=re.valHooks[this.type]||re.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return t=re.valHooks[r.type]||re.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(bt,""):null==n?"":n)}}}),re.extend({valHooks:{option:{get:function(e){var t=re.find.attr(e,"value");return null!=t?t:re.trim(re.text(e))}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||0>r,a=o?null:[],s=o?r+1:i.length,l=0>r?s:o?r:0;s>l;l++)if(n=i[l],(n.selected||l===r)&&(ne.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!re.nodeName(n.parentNode,"optgroup"))){if(t=re(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=re.makeArray(t),a=r.length;a--;)if(i=r[a],re.inArray(re.valHooks.option.get(i),o)>=0)try{i.selected=n=!0}catch(s){i.scrollHeight}else i.selected=!1;return n||(e.selectedIndex=-1),r}}}}),re.each(["radio","checkbox"],function(){re.valHooks[this]={set:function(e,t){return re.isArray(t)?e.checked=re.inArray(re(e).val(),t)>=0:void 0}},ne.checkOn||(re.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var xt,wt,$t=re.expr.attrHandle,kt=/^(?:checked|selected)$/i,Ct=ne.getSetAttribute,At=ne.input;re.fn.extend({attr:function(e,t){return Se(this,re.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){re.removeAttr(this,e)})}}),re.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===$e?re.prop(e,t,n):(1===o&&re.isXMLDoc(e)||(t=t.toLowerCase(),i=re.attrHooks[t]||(re.expr.match.bool.test(t)?wt:xt)),void 0===n?i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=re.find.attr(e,t),null==r?void 0:r):null!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):void re.removeAttr(e,t))},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(_e);if(o&&1===e.nodeType)for(;n=o[r++];)i=re.propFix[n]||n,re.expr.match.bool.test(n)?At&&Ct||!kt.test(n)?e[i]=!1:e[re.camelCase("default-"+n)]=e[i]=!1:re.attr(e,n,""),e.removeAttribute(Ct?n:i)},attrHooks:{type:{set:function(e,t){if(!ne.radioValue&&"radio"===t&&re.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),wt={set:function(e,t,n){return t===!1?re.removeAttr(e,n):At&&Ct||!kt.test(n)?e.setAttribute(!Ct&&re.propFix[n]||n,n):e[re.camelCase("default-"+n)]=e[n]=!0,n}},re.each(re.expr.match.bool.source.match(/\w+/g),function(e,t){var n=$t[t]||re.find.attr;$t[t]=At&&Ct||!kt.test(t)?function(e,t,i){var r,o;return i||(o=$t[t],$t[t]=r,r=null!=n(e,t,i)?t.toLowerCase():null,$t[t]=o),r}:function(e,t,n){return n?void 0:e[re.camelCase("default-"+t)]?t.toLowerCase():null}}),At&&Ct||(re.attrHooks.value={set:function(e,t,n){return re.nodeName(e,"input")?void(e.defaultValue=t):xt&&xt.set(e,t,n)}}),Ct||(xt={set:function(e,t,n){var i=e.getAttributeNode(n);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(n)),i.value=t+="","value"===n||t===e.getAttribute(n)?t:void 0}},$t.id=$t.name=$t.coords=function(e,t,n){var i;return n?void 0:(i=e.getAttributeNode(t))&&""!==i.value?i.value:null},re.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:void 0},set:xt.set},re.attrHooks.contenteditable={set:function(e,t,n){xt.set(e,""===t?!1:t,n)}},re.each(["width","height"],function(e,t){re.attrHooks[t]={set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}}})),ne.style||(re.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Mt=/^(?:input|select|textarea|button|object)$/i,Tt=/^(?:a|area)$/i;re.fn.extend({prop:function(e,t){return Se(this,re.prop,e,t,arguments.length>1)},removeProp:function(e){return e=re.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),re.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var i,r,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!re.isXMLDoc(e),o&&(t=re.propFix[t]||t,r=re.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=re.find.attr(e,"tabindex");return t?parseInt(t,10):Mt.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:-1}}}}),ne.hrefNormalized||re.each(["href","src"],function(e,t){re.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ne.optSelected||(re.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),re.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){re.propFix[this.toLowerCase()]=this}),ne.enctype||(re.propFix.enctype="encoding");var St=/[\t\r\n\f]/g;re.fn.extend({addClass:function(e){var t,n,i,r,o,a,s=0,l=this.length,u="string"==typeof e&&e;if(re.isFunction(e))return this.each(function(t){re(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(_e)||[];l>s;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(St," "):" ")){for(o=0;r=t[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=re.trim(i),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,i,r,o,a,s=0,l=this.length,u=0===arguments.length||"string"==typeof e&&e;if(re.isFunction(e))return this.each(function(t){re(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(_e)||[];l>s;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(St," "):"")){
|
26
|
+
for(o=0;r=t[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");a=e?re.trim(i):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):re.isFunction(e)?this.each(function(n){re(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,i=0,r=re(this),o=e.match(_e)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else(n===$e||"boolean"===n)&&(this.className&&re._data(this,"__className__",this.className),this.className=this.className||e===!1?"":re._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(St," ").indexOf(t)>=0)return!0;return!1}}),re.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){re.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),re.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Dt=re.now(),Et=/\?/,Lt=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;re.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,i=null,r=re.trim(t+"");return r&&!re.trim(r.replace(Lt,function(e,t,r,o){return n&&t&&(i=0),0===i?e:(n=r||t,i+=!o-!r,"")}))?Function("return "+r)():re.error("Invalid JSON: "+t)},re.parseXML=function(t){var n,i;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(i=new DOMParser,n=i.parseFromString(t,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(r){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||re.error("Invalid XML: "+t),n};var Ft,Ot,Rt=/#.*$/,Bt=/([?&])_=[^&]*/,Pt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,It=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,jt=/^\/\//,Nt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ht={},zt={},qt="*/".concat("*");try{Ot=location.href}catch(Wt){Ot=fe.createElement("a"),Ot.href="",Ot=Ot.href}Ft=Nt.exec(Ot.toLowerCase())||[],re.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ot,type:"GET",isLocal:It.test(Ft[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":re.parseJSON,"text xml":re.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?N(N(e,re.ajaxSettings),t):N(re.ajaxSettings,e)},ajaxPrefilter:Y(Ht),ajaxTransport:Y(zt),ajax:function(e,t){function n(e,t,n,i){var r,c,v,y,b,w=t;2!==_&&(_=2,s&&clearTimeout(s),u=void 0,a=i||"",x.readyState=e>0?4:0,r=e>=200&&300>e||304===e,n&&(y=H(d,x,n)),y=z(d,y,x,r),r?(d.ifModified&&(b=x.getResponseHeader("Last-Modified"),b&&(re.lastModified[o]=b),b=x.getResponseHeader("etag"),b&&(re.etag[o]=b)),204===e||"HEAD"===d.type?w="nocontent":304===e?w="notmodified":(w=y.state,c=y.data,v=y.error,r=!v)):(v=w,(e||!w)&&(w="error",0>e&&(e=0))),x.status=e,x.statusText=(t||w)+"",r?f.resolveWith(h,[c,w,x]):f.rejectWith(h,[x,w,v]),x.statusCode(g),g=void 0,l&&p.trigger(r?"ajaxSuccess":"ajaxError",[x,d,r?c:v]),m.fireWith(h,[x,w]),l&&(p.trigger("ajaxComplete",[x,d]),--re.active||re.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,a,s,l,u,c,d=re.ajaxSetup({},t),h=d.context||d,p=d.context&&(h.nodeType||h.jquery)?re(h):re.event,f=re.Deferred(),m=re.Callbacks("once memory"),g=d.statusCode||{},v={},y={},_=0,b="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===_){if(!c)for(c={};t=Pt.exec(a);)c[t[1].toLowerCase()]=t[2];t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===_?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return _||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return _||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>_)for(t in e)g[t]=[g[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||b;return u&&u.abort(t),n(0,t),this}};if(f.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,d.url=((e||d.url||Ot)+"").replace(Rt,"").replace(jt,Ft[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=re.trim(d.dataType||"*").toLowerCase().match(_e)||[""],null==d.crossDomain&&(i=Nt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===Ft[1]&&i[2]===Ft[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(Ft[3]||("http:"===Ft[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=re.param(d.data,d.traditional)),j(Ht,d,t,x),2===_)return x;l=re.event&&d.global,l&&0===re.active++&&re.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),o=d.url,d.hasContent||(d.data&&(o=d.url+=(Et.test(o)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Bt.test(o)?o.replace(Bt,"$1_="+Dt++):o+(Et.test(o)?"&":"?")+"_="+Dt++)),d.ifModified&&(re.lastModified[o]&&x.setRequestHeader("If-Modified-Since",re.lastModified[o]),re.etag[o]&&x.setRequestHeader("If-None-Match",re.etag[o])),(d.data&&d.hasContent&&d.contentType!==!1||t.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+qt+"; q=0.01":""):d.accepts["*"]);for(r in d.headers)x.setRequestHeader(r,d.headers[r]);if(d.beforeSend&&(d.beforeSend.call(h,x,d)===!1||2===_))return x.abort();b="abort";for(r in{success:1,error:1,complete:1})x[r](d[r]);if(u=j(zt,d,t,x)){x.readyState=1,l&&p.trigger("ajaxSend",[x,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){x.abort("timeout")},d.timeout));try{_=1,u.send(v,n)}catch(w){if(!(2>_))throw w;n(-1,w)}}else n(-1,"No Transport");return x},getJSON:function(e,t,n){return re.get(e,t,n,"json")},getScript:function(e,t){return re.get(e,void 0,t,"script")}}),re.each(["get","post"],function(e,t){re[t]=function(e,n,i,r){return re.isFunction(n)&&(r=r||i,i=n,n=void 0),re.ajax({url:e,type:t,dataType:r,data:n,success:i})}}),re._evalUrl=function(e){return re.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},re.fn.extend({wrapAll:function(e){if(re.isFunction(e))return this.each(function(t){re(this).wrapAll(e.call(this,t))});if(this[0]){var t=re(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return re.isFunction(e)?this.each(function(t){re(this).wrapInner(e.call(this,t))}):this.each(function(){var t=re(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=re.isFunction(e);return this.each(function(n){re(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){re.nodeName(this,"body")||re(this).replaceWith(this.childNodes)}).end()}}),re.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!ne.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||re.css(e,"display"))},re.expr.filters.visible=function(e){return!re.expr.filters.hidden(e)};var Ut=/%20/g,Vt=/\[\]$/,Xt=/\r?\n/g,Gt=/^(?:submit|button|image|reset|file)$/i,Kt=/^(?:input|select|textarea|keygen)/i;re.param=function(e,t){var n,i=[],r=function(e,t){t=re.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=re.ajaxSettings&&re.ajaxSettings.traditional),re.isArray(e)||e.jquery&&!re.isPlainObject(e))re.each(e,function(){r(this.name,this.value)});else for(n in e)q(n,e[n],t,r);return i.join("&").replace(Ut,"+")},re.fn.extend({serialize:function(){return re.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=re.prop(this,"elements");return e?re.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!re(this).is(":disabled")&&Kt.test(this.nodeName)&&!Gt.test(e)&&(this.checked||!De.test(e))}).map(function(e,t){var n=re(this).val();return null==n?null:re.isArray(n)?re.map(n,function(e){return{name:t.name,value:e.replace(Xt,"\r\n")}}):{name:t.name,value:n.replace(Xt,"\r\n")}}).get()}}),re.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&W()||U()}:W;var Jt=0,Qt={},Zt=re.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in Qt)Qt[e](void 0,!0)}),ne.cors=!!Zt&&"withCredentials"in Zt,Zt=ne.ajax=!!Zt,Zt&&re.ajaxTransport(function(e){if(!e.crossDomain||ne.cors){var t;return{send:function(n,i){var r,o=e.xhr(),a=++Jt;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)o[r]=e.xhrFields[r];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)void 0!==n[r]&&o.setRequestHeader(r,n[r]+"");o.send(e.hasContent&&e.data||null),t=function(n,r){var s,l,u;if(t&&(r||4===o.readyState))if(delete Qt[a],t=void 0,o.onreadystatechange=re.noop,r)4!==o.readyState&&o.abort();else{u={},s=o.status,"string"==typeof o.responseText&&(u.text=o.responseText);try{l=o.statusText}catch(c){l=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=u.text?200:404}u&&i(s,l,u,o.getAllResponseHeaders())},e.async?4===o.readyState?setTimeout(t):o.onreadystatechange=Qt[a]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),re.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return re.globalEval(e),e}}}),re.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),re.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=fe.head||re("head")[0]||fe.documentElement;return{send:function(i,r){t=fe.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||r(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var en=[],tn=/(=)\?(?=&|$)|\?\?/;re.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=en.pop()||re.expando+"_"+Dt++;return this[e]=!0,e}}),re.ajaxPrefilter("json jsonp",function(t,n,i){var r,o,a,s=t.jsonp!==!1&&(tn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&tn.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(r=t.jsonpCallback=re.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(tn,"$1"+r):t.jsonp!==!1&&(t.url+=(Et.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return a||re.error(r+" was not called"),a[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){a=arguments},i.always(function(){e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,en.push(r)),a&&re.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),re.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||fe;var i=de.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=re.buildFragment([e],t,r),r&&r.length&&re(r).remove(),re.merge([],i.childNodes))};var nn=re.fn.load;re.fn.load=function(e,t,n){if("string"!=typeof e&&nn)return nn.apply(this,arguments);var i,r,o,a=this,s=e.indexOf(" ");return s>=0&&(i=re.trim(e.slice(s,e.length)),e=e.slice(0,s)),re.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&re.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){r=arguments,a.html(i?re("<div>").append(re.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){a.each(n,r||[e.responseText,t,e])}),this},re.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){re.fn[t]=function(e){return this.on(t,e)}}),re.expr.filters.animated=function(e){return re.grep(re.timers,function(t){return e===t.elem}).length};var rn=e.document.documentElement;re.offset={setOffset:function(e,t,n){var i,r,o,a,s,l,u,c=re.css(e,"position"),d=re(e),h={};"static"===c&&(e.style.position="relative"),s=d.offset(),o=re.css(e,"top"),l=re.css(e,"left"),u=("absolute"===c||"fixed"===c)&&re.inArray("auto",[o,l])>-1,u?(i=d.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),re.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(h.top=t.top-s.top+a),null!=t.left&&(h.left=t.left-s.left+r),"using"in t?t.using.call(e,h):d.css(h)}},re.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){re.offset.setOffset(this,e,t)});var t,n,i={top:0,left:0},r=this[0],o=r&&r.ownerDocument;if(o)return t=o.documentElement,re.contains(t,r)?(typeof r.getBoundingClientRect!==$e&&(i=r.getBoundingClientRect()),n=V(o),{top:i.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):i},position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===re.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),re.nodeName(e[0],"html")||(n=e.offset()),n.top+=re.css(e[0],"borderTopWidth",!0),n.left+=re.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-re.css(i,"marginTop",!0),left:t.left-n.left-re.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||rn;e&&!re.nodeName(e,"html")&&"static"===re.css(e,"position");)e=e.offsetParent;return e||rn})}}),re.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);re.fn[e]=function(i){return Se(this,function(e,i,r){var o=V(e);return void 0===r?o?t in o?o[t]:o.document.documentElement[i]:e[i]:void(o?o.scrollTo(n?re(o).scrollLeft():r,n?r:re(o).scrollTop()):e[i]=r)},e,i,arguments.length,null)}}),re.each(["top","left"],function(e,t){re.cssHooks[t]=A(ne.pixelPosition,function(e,n){return n?(n=tt(e,t),it.test(n)?re(e).position()[t]+"px":n):void 0})}),re.each({Height:"height",Width:"width"},function(e,t){re.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){re.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(i===!0||r===!0?"margin":"border");return Se(this,function(t,n,i){var r;return re.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===i?re.css(t,n,a):re.style(t,n,i,a)},t,o?i:void 0,o,null)}})}),re.fn.size=function(){return this.length},re.fn.andSelf=re.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return re});var on=e.jQuery,an=e.$;return re.noConflict=function(t){return e.$===re&&(e.$=an),t&&e.jQuery===re&&(e.jQuery=on),re},typeof t===$e&&(e.jQuery=e.$=re),re}),function(e,t){"use strict";e.rails!==t&&e.error("jquery-ujs has already been loaded!");var n,i=e(document);e.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not(form button), button[data-confirm]:not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return e("meta[name=csrf-token]").attr("content")},csrfParam:function(){return e("meta[name=csrf-param]").attr("content")},CSRFProtection:function(e){var t=n.csrfToken();t&&e.setRequestHeader("X-CSRF-Token",t)},refreshCSRFTokens:function(){e('form input[name="'+n.csrfParam()+'"]').val(n.csrfToken())},fire:function(t,n,i){var r=e.Event(n);return t.trigger(r,i),r.result!==!1},confirm:function(e){return confirm(e)},ajax:function(t){return e.ajax(t)},href:function(e){return e[0].href},isRemote:function(e){return e.data("remote")!==t&&e.data("remote")!==!1},handleRemote:function(i){var r,o,a,s,l,u;if(n.fire(i,"ajax:before")){if(s=i.data("with-credentials")||null,l=i.data("type")||e.ajaxSettings&&e.ajaxSettings.dataType,i.is("form")){r=i.attr("method"),o=i.attr("action"),a=i.serializeArray();var c=i.data("ujs:submit-button");c&&(a.push(c),i.data("ujs:submit-button",null))}else i.is(n.inputChangeSelector)?(r=i.data("method"),o=i.data("url"),a=i.serialize(),i.data("params")&&(a=a+"&"+i.data("params"))):i.is(n.buttonClickSelector)?(r=i.data("method")||"get",o=i.data("url"),a=i.serialize(),i.data("params")&&(a=a+"&"+i.data("params"))):(r=i.data("method"),o=n.href(i),a=i.data("params")||null);return u={type:r||"GET",data:a,dataType:l,beforeSend:function(e,r){return r.dataType===t&&e.setRequestHeader("accept","*/*;q=0.5, "+r.accepts.script),n.fire(i,"ajax:beforeSend",[e,r])?void i.trigger("ajax:send",e):!1},success:function(e,t,n){i.trigger("ajax:success",[e,t,n])},complete:function(e,t){i.trigger("ajax:complete",[e,t])},error:function(e,t,n){i.trigger("ajax:error",[e,t,n])},crossDomain:n.isCrossDomain(o)},s&&(u.xhrFields={withCredentials:s}),o&&(u.url=o),n.ajax(u)}return!1},isCrossDomain:function(e){var t=document.createElement("a");t.href=location.href;var n=document.createElement("a");try{return n.href=e,n.href=n.href,!((!n.protocol||":"===n.protocol)&&!n.host||t.protocol+"//"+t.host==n.protocol+"//"+n.host)}catch(i){return!0}},handleMethod:function(i){var r=n.href(i),o=i.data("method"),a=i.attr("target"),s=n.csrfToken(),l=n.csrfParam(),u=e('<form method="post" action="'+r+'"></form>'),c='<input name="_method" value="'+o+'" type="hidden" />';l===t||s===t||n.isCrossDomain(r)||(c+='<input name="'+l+'" value="'+s+'" type="hidden" />'),a&&u.attr("target",a),u.hide().append(c).appendTo("body"),u.submit()},formElements:function(t,n){return t.is("form")?e(t[0].elements).filter(n):t.find(n)},disableFormElements:function(t){n.formElements(t,n.disableSelector).each(function(){n.disableFormElement(e(this))})},disableFormElement:function(e){var n,i;n=e.is("button")?"html":"val",i=e.data("disable-with"),e.data("ujs:enable-with",e[n]()),i!==t&&e[n](i),e.prop("disabled",!0)},enableFormElements:function(t){n.formElements(t,n.enableSelector).each(function(){n.enableFormElement(e(this))})},enableFormElement:function(e){var t=e.is("button")?"html":"val";"undefined"!=typeof e.data("ujs:enable-with")&&e[t](e.data("ujs:enable-with")),e.prop("disabled",!1)},allowAction:function(e){var t,i=e.data("confirm"),r=!1;if(!i)return!0;if(n.fire(e,"confirm")){try{r=n.confirm(i)}catch(o){(console.error||console.log).call(console,o.stack||o)}t=n.fire(e,"confirm:complete",[r])}return r&&t},blankInputs:function(t,n,i){var r,o,a=e(),s=n||"input,textarea",l=t.find(s);return l.each(function(){if(r=e(this),o=r.is("input[type=checkbox],input[type=radio]")?r.is(":checked"):!!r.val(),o===i){if(r.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+r.attr("name")+'"]').length)return!0;a=a.add(r)}}),a.length?a:!1},nonBlankInputs:function(e,t){return n.blankInputs(e,t,!0)},stopEverything:function(t){return e(t.target).trigger("ujs:everythingStopped"),t.stopImmediatePropagation(),!1},disableElement:function(e){var i=e.data("disable-with");e.data("ujs:enable-with",e.html()),i!==t&&e.html(i),e.bind("click.railsDisable",function(e){return n.stopEverything(e)})},enableElement:function(e){e.data("ujs:enable-with")!==t&&(e.html(e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.unbind("click.railsDisable")}},n.fire(i,"rails:attachBindings")&&(e.ajaxPrefilter(function(e,t,i){e.crossDomain||n.CSRFProtection(i)}),e(window).on("pageshow.rails",function(){e(e.rails.enableSelector).each(function(){var t=e(this);t.data("ujs:enable-with")&&e.rails.enableFormElement(t)}),e(e.rails.linkDisableSelector).each(function(){var t=e(this);t.data("ujs:enable-with")&&e.rails.enableElement(t)})}),i.delegate(n.linkDisableSelector,"ajax:complete",function(){n.enableElement(e(this))}),i.delegate(n.buttonDisableSelector,"ajax:complete",function(){n.enableFormElement(e(this))}),i.delegate(n.linkClickSelector,"click.rails",function(t){var i=e(this),r=i.data("method"),o=i.data("params"),a=t.metaKey||t.ctrlKey;if(!n.allowAction(i))return n.stopEverything(t);if(!a&&i.is(n.linkDisableSelector)&&n.disableElement(i),n.isRemote(i)){if(a&&(!r||"GET"===r)&&!o)return!0;var s=n.handleRemote(i);return s===!1?n.enableElement(i):s.fail(function(){n.enableElement(i)}),!1}return r?(n.handleMethod(i),!1):void 0}),i.delegate(n.buttonClickSelector,"click.rails",function(t){var i=e(this);if(!n.allowAction(i)||!n.isRemote(i))return n.stopEverything(t);i.is(n.buttonDisableSelector)&&n.disableFormElement(i);var r=n.handleRemote(i);return r===!1?n.enableFormElement(i):r.fail(function(){n.enableFormElement(i)}),!1}),i.delegate(n.inputChangeSelector,"change.rails",function(t){var i=e(this);return n.allowAction(i)&&n.isRemote(i)?(n.handleRemote(i),!1):n.stopEverything(t)}),i.delegate(n.formSubmitSelector,"submit.rails",function(i){var r,o,a=e(this),s=n.isRemote(a);if(!n.allowAction(a))return n.stopEverything(i);if(a.attr("novalidate")===t&&(r=n.blankInputs(a,n.requiredInputSelector,!1),r&&n.fire(a,"ajax:aborted:required",[r])))return n.stopEverything(i);if(s){if(o=n.nonBlankInputs(a,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(a)},13);var l=n.fire(a,"ajax:aborted:file",[o]);return l||setTimeout(function(){n.enableFormElements(a)},13),l}return n.handleRemote(a),!1}setTimeout(function(){n.disableFormElements(a)},13)}),i.delegate(n.formInputClickSelector,"click.rails",function(t){var i=e(this);if(!n.allowAction(i))return n.stopEverything(t);var r=i.attr("name"),o=r?{name:r,value:i.val()}:null;i.closest("form").data("ujs:submit-button",o)}),i.delegate(n.formSubmitSelector,"ajax:send.rails",function(t){this===t.target&&n.disableFormElements(e(this))}),i.delegate(n.formSubmitSelector,"ajax:complete.rails",function(t){this===t.target&&n.enableFormElements(e(this))}),e(function(){n.refreshCSRFTokens()}))}(jQuery),/*!
|
27
|
+
* ZeroClipboard
|
28
|
+
* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
|
29
|
+
* Copyright (c) 2014 Jon Rohan, James M. Greene
|
30
|
+
* Licensed MIT
|
31
|
+
* http://zeroclipboard.org/
|
32
|
+
* v2.1.2
|
33
|
+
*/
|
34
|
+
function(e,t){"use strict";var n,i=e,r=i.document,o=i.navigator,a=i.setTimeout,s=i.encodeURIComponent,l=i.ActiveXObject,u=i.Number.parseInt||i.parseInt,c=i.Number.parseFloat||i.parseFloat,d=i.Number.isNaN||i.isNaN,h=i.Math.round,p=i.Date.now,f=i.Object.keys,m=i.Object.defineProperty,g=i.Object.prototype.hasOwnProperty,v=i.Array.prototype.slice,y=function(e){return v.call(e,0)},_=function(){var e,n,i,r,o,a,s=y(arguments),l=s[0]||{};for(e=1,n=s.length;n>e;e++)if(null!=(i=s[e]))for(r in i)g.call(i,r)&&(o=l[r],a=i[r],l!==a&&a!==t&&(l[r]=a));return l},b=function(e){var t,n,i,r;if("object"!=typeof e||null==e)t=e;else if("number"==typeof e.length)for(t=[],n=0,i=e.length;i>n;n++)g.call(e,n)&&(t[n]=b(e[n]));else{t={};for(r in e)g.call(e,r)&&(t[r]=b(e[r]))}return t},x=function(e,t){for(var n={},i=0,r=t.length;r>i;i++)t[i]in e&&(n[t[i]]=e[t[i]]);return n},w=function(e,t){var n={};for(var i in e)-1===t.indexOf(i)&&(n[i]=e[i]);return n},$=function(e){if(e)for(var t in e)g.call(e,t)&&delete e[t];return e},k=function(e,t){if(e&&1===e.nodeType&&e.ownerDocument&&t&&(1===t.nodeType&&t.ownerDocument&&t.ownerDocument===e.ownerDocument||9===t.nodeType&&!t.ownerDocument&&t===e.ownerDocument))do{if(e===t)return!0;e=e.parentNode}while(e);return!1},C={bridge:null,version:"0.0.0",pluginType:"unknown",disabled:null,outdated:null,unavailable:null,deactivated:null,overdue:null,ready:null},A="11.0.0",M={},T={},S=null,D={ready:"Flash communication is established",error:{"flash-disabled":"Flash is disabled or not installed","flash-outdated":"Flash is too outdated to support ZeroClipboard","flash-unavailable":"Flash is unable to communicate bidirectionally with JavaScript","flash-deactivated":"Flash is too outdated for your browser and/or is configured as click-to-activate","flash-overdue":"Flash communication was established but NOT within the acceptable time limit"}},E=function(){var e,t,n,i,o="ZeroClipboard.swf";if(!r.currentScript||!(i=r.currentScript.src)){var a=r.getElementsByTagName("script");if("readyState"in a[0])for(e=a.length;e--&&("interactive"!==a[e].readyState||!(i=a[e].src)););else if("loading"===r.readyState)i=a[a.length-1].src;else{for(e=a.length;e--;){if(n=a[e].src,!n){t=null;break}if(n=n.split("#")[0].split("?")[0],n=n.slice(0,n.lastIndexOf("/")+1),null==t)t=n;else if(t!==n){t=null;break}}null!==t&&(i=t)}}return i&&(i=i.split("#")[0].split("?")[0],o=i.slice(0,i.lastIndexOf("/")+1)+o),o}(),L={swfPath:E,trustedDomains:e.location.host?[e.location.host]:[],cacheBust:!0,forceEnhancedClipboard:!1,flashLoadTimeout:3e4,autoActivate:!0,bubbleEvents:!0,containerId:"global-zeroclipboard-html-bridge",containerClass:"global-zeroclipboard-container",swfObjectId:"global-zeroclipboard-flash-bridge",hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",forceHandCursor:!1,title:null,zIndex:999999999},F=function(e){if("object"==typeof e&&null!==e)for(var t in e)if(g.call(e,t))if(/^(?:forceHandCursor|title|zIndex|bubbleEvents)$/.test(t))L[t]=e[t];else if(null==C.bridge)if("containerId"===t||"swfObjectId"===t){if(!X(e[t]))throw new Error("The specified `"+t+"` value is not valid as an HTML4 Element ID");L[t]=e[t]}else L[t]=e[t];{if("string"!=typeof e||!e)return b(L);if(g.call(L,e))return L[e]}},O=function(){return{browser:x(o,["userAgent","platform","appName"]),flash:w(C,["bridge"]),zeroclipboard:{version:$e.version,config:$e.config()}}},R=function(){return!!(C.disabled||C.outdated||C.unavailable||C.deactivated)},B=function(e,t){var n,i,r,o={};if("string"==typeof e&&e)r=e.toLowerCase().split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)g.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&$e.on(n,e[n]);if(r&&r.length){for(n=0,i=r.length;i>n;n++)e=r[n].replace(/^on/,""),o[e]=!0,M[e]||(M[e]=[]),M[e].push(t);if(o.ready&&C.ready&&$e.emit({type:"ready"}),o.error){var a=["disabled","outdated","unavailable","deactivated","overdue"];for(n=0,i=a.length;i>n;n++)if(C[a[n]]===!0){$e.emit({type:"error",name:"flash-"+a[n]});break}}}return $e},P=function(e,t){var n,i,r,o,a;if(0===arguments.length)o=f(M);else if("string"==typeof e&&e)o=e.split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)g.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&$e.off(n,e[n]);if(o&&o.length)for(n=0,i=o.length;i>n;n++)if(e=o[n].toLowerCase().replace(/^on/,""),a=M[e],a&&a.length)if(t)for(r=a.indexOf(t);-1!==r;)a.splice(r,1),r=a.indexOf(t,r);else a.length=0;return $e},I=function(e){var t;return t="string"==typeof e&&e?b(M[e])||null:b(M)},Y=function(e){var t,n,i;return e=G(e),e&&!te(e)?"ready"===e.type&&C.overdue===!0?$e.emit({type:"error",name:"flash-overdue"}):(t=_({},e),ee.call(this,t),"copy"===e.type&&(i=se(T),n=i.data,S=i.formatMap),n):void 0},j=function(){if("boolean"!=typeof C.ready&&(C.ready=!1),!$e.isFlashUnusable()&&null===C.bridge){var e=L.flashLoadTimeout;"number"==typeof e&&e>=0&&a(function(){"boolean"!=typeof C.deactivated&&(C.deactivated=!0),C.deactivated===!0&&$e.emit({type:"error",name:"flash-deactivated"})},e),C.overdue=!1,oe()}},N=function(){$e.clearData(),$e.blur(),$e.emit("destroy"),ae(),$e.off()},H=function(e,t){var n;if("object"==typeof e&&e&&"undefined"==typeof t)n=e,$e.clearData();else{if("string"!=typeof e||!e)return;n={},n[e]=t}for(var i in n)"string"==typeof i&&i&&g.call(n,i)&&"string"==typeof n[i]&&n[i]&&(T[i]=n[i])},z=function(e){"undefined"==typeof e?($(T),S=null):"string"==typeof e&&g.call(T,e)&&delete T[e]},q=function(e){return"undefined"==typeof e?b(T):"string"==typeof e&&g.call(T,e)?T[e]:void 0},W=function(e){if(e&&1===e.nodeType){n&&(me(n,L.activeClass),n!==e&&me(n,L.hoverClass)),n=e,fe(e,L.hoverClass);var t=e.getAttribute("title")||L.title;if("string"==typeof t&&t){var i=re(C.bridge);i&&i.setAttribute("title",t)}var r=L.forceHandCursor===!0||"pointer"===ge(e,"cursor");be(r),_e()}},U=function(){var e=re(C.bridge);e&&(e.removeAttribute("title"),e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.top="1px"),n&&(me(n,L.hoverClass),me(n,L.activeClass),n=null)},V=function(){return n||null},X=function(e){return"string"==typeof e&&e&&/^[A-Za-z][A-Za-z0-9_:\-\.]*$/.test(e)},G=function(e){var t;if("string"==typeof e&&e?(t=e,e={}):"object"==typeof e&&e&&"string"==typeof e.type&&e.type&&(t=e.type),t){_(e,{type:t.toLowerCase(),target:e.target||n||null,relatedTarget:e.relatedTarget||null,currentTarget:C&&C.bridge||null,timeStamp:e.timeStamp||p()||null});var i=D[e.type];return"error"===e.type&&e.name&&i&&(i=i[e.name]),i&&(e.message=i),"ready"===e.type&&_(e,{target:null,version:C.version}),"error"===e.type&&(/^flash-(disabled|outdated|unavailable|deactivated|overdue)$/.test(e.name)&&_(e,{target:null,minimumVersion:A}),/^flash-(outdated|unavailable|deactivated|overdue)$/.test(e.name)&&_(e,{version:C.version})),"copy"===e.type&&(e.clipboardData={setData:$e.setData,clearData:$e.clearData}),"aftercopy"===e.type&&(e=le(e,S)),e.target&&!e.relatedTarget&&(e.relatedTarget=K(e.target)),e=J(e)}},K=function(e){var t=e&&e.getAttribute&&e.getAttribute("data-clipboard-target");return t?r.getElementById(t):null},J=function(e){if(e&&/^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type)){var n=e.target,o="_mouseover"===e.type&&e.relatedTarget?e.relatedTarget:t,a="_mouseout"===e.type&&e.relatedTarget?e.relatedTarget:t,s=ye(n),l=i.screenLeft||i.screenX||0,u=i.screenTop||i.screenY||0,c=r.body.scrollLeft+r.documentElement.scrollLeft,d=r.body.scrollTop+r.documentElement.scrollTop,h=s.left+("number"==typeof e._stageX?e._stageX:0),p=s.top+("number"==typeof e._stageY?e._stageY:0),f=h-c,m=p-d,g=l+f,v=u+m,y="number"==typeof e.movementX?e.movementX:0,b="number"==typeof e.movementY?e.movementY:0;delete e._stageX,delete e._stageY,_(e,{srcElement:n,fromElement:o,toElement:a,screenX:g,screenY:v,pageX:h,pageY:p,clientX:f,clientY:m,x:f,y:m,movementX:y,movementY:b,offsetX:0,offsetY:0,layerX:0,layerY:0})}return e},Q=function(e){var t=e&&"string"==typeof e.type&&e.type||"";return!/^(?:(?:before)?copy|destroy)$/.test(t)},Z=function(e,t,n,i){i?a(function(){e.apply(t,n)},0):e.apply(t,n)},ee=function(e){if("object"==typeof e&&e&&e.type){var t=Q(e),n=M["*"]||[],r=M[e.type]||[],o=n.concat(r);if(o&&o.length){var a,s,l,u,c,d=this;for(a=0,s=o.length;s>a;a++)l=o[a],u=d,"string"==typeof l&&"function"==typeof i[l]&&(l=i[l]),"object"==typeof l&&l&&"function"==typeof l.handleEvent&&(u=l,l=l.handleEvent),"function"==typeof l&&(c=_({},e),Z(l,u,[c],t))}return this}},te=function(e){var t=e.target||n||null,i="swf"===e._source;delete e._source;var r=["flash-disabled","flash-outdated","flash-unavailable","flash-deactivated","flash-overdue"];switch(e.type){case"error":-1!==r.indexOf(e.name)&&_(C,{disabled:"flash-disabled"===e.name,outdated:"flash-outdated"===e.name,unavailable:"flash-unavailable"===e.name,deactivated:"flash-deactivated"===e.name,overdue:"flash-overdue"===e.name,ready:!1});break;case"ready":var o=C.deactivated===!0;_(C,{disabled:!1,outdated:!1,unavailable:!1,deactivated:!1,overdue:o,ready:!o});break;case"copy":var a,s,l=e.relatedTarget;!T["text/html"]&&!T["text/plain"]&&l&&(s=l.value||l.outerHTML||l.innerHTML)&&(a=l.value||l.textContent||l.innerText)?(e.clipboardData.clearData(),e.clipboardData.setData("text/plain",a),s!==a&&e.clipboardData.setData("text/html",s)):!T["text/plain"]&&e.target&&(a=e.target.getAttribute("data-clipboard-text"))&&(e.clipboardData.clearData(),e.clipboardData.setData("text/plain",a));break;case"aftercopy":$e.clearData(),t&&t!==pe()&&t.focus&&t.focus();break;case"_mouseover":$e.focus(t),L.bubbleEvents===!0&&i&&(t&&t!==e.relatedTarget&&!k(e.relatedTarget,t)&&ne(_({},e,{type:"mouseenter",bubbles:!1,cancelable:!1})),ne(_({},e,{type:"mouseover"})));break;case"_mouseout":$e.blur(),L.bubbleEvents===!0&&i&&(t&&t!==e.relatedTarget&&!k(e.relatedTarget,t)&&ne(_({},e,{type:"mouseleave",bubbles:!1,cancelable:!1})),ne(_({},e,{type:"mouseout"})));break;case"_mousedown":fe(t,L.activeClass),L.bubbleEvents===!0&&i&&ne(_({},e,{type:e.type.slice(1)}));break;case"_mouseup":me(t,L.activeClass),L.bubbleEvents===!0&&i&&ne(_({},e,{type:e.type.slice(1)}));break;case"_click":case"_mousemove":L.bubbleEvents===!0&&i&&ne(_({},e,{type:e.type.slice(1)}))}return/^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type)?!0:void 0},ne=function(e){if(e&&"string"==typeof e.type&&e){var t,n=e.target||null,o=n&&n.ownerDocument||r,a={view:o.defaultView||i,canBubble:!0,cancelable:!0,detail:"click"===e.type?1:0,button:"number"==typeof e.which?e.which-1:"number"==typeof e.button?e.button:o.createEvent?0:1},s=_(a,e);n&&o.createEvent&&n.dispatchEvent&&(s=[s.type,s.canBubble,s.cancelable,s.view,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget],t=o.createEvent("MouseEvents"),t.initMouseEvent&&(t.initMouseEvent.apply(t,s),t._source="js",n.dispatchEvent(t)))}},ie=function(){var e=r.createElement("div");return e.id=L.containerId,e.className=L.containerClass,e.style.position="absolute",e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px",e.style.zIndex=""+xe(L.zIndex),e},re=function(e){for(var t=e&&e.parentNode;t&&"OBJECT"===t.nodeName&&t.parentNode;)t=t.parentNode;return t||null},oe=function(){var e,t=C.bridge,n=re(t);if(!t){var o=he(i.location.host,L),a="never"===o?"none":"all",s=ce(L),l=L.swfPath+ue(L.swfPath,L);n=ie();var u=r.createElement("div");n.appendChild(u),r.body.appendChild(n);var c=r.createElement("div"),d="activex"===C.pluginType;c.innerHTML='<object id="'+L.swfObjectId+'" name="'+L.swfObjectId+'" width="100%" height="100%" '+(d?'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"':'type="application/x-shockwave-flash" data="'+l+'"')+">"+(d?'<param name="movie" value="'+l+'"/>':"")+'<param name="allowScriptAccess" value="'+o+'"/><param name="allowNetworking" value="'+a+'"/><param name="menu" value="false"/><param name="wmode" value="transparent"/><param name="flashvars" value="'+s+'"/></object>',t=c.firstChild,c=null,t.ZeroClipboard=$e,n.replaceChild(t,u)}return t||(t=r[L.swfObjectId],t&&(e=t.length)&&(t=t[e-1]),!t&&n&&(t=n.firstChild)),C.bridge=t||null,t},ae=function(){var e=C.bridge;if(e){var t=re(e);t&&("activex"===C.pluginType&&"readyState"in e?(e.style.display="none",function n(){if(4===e.readyState){for(var i in e)"function"==typeof e[i]&&(e[i]=null);e.parentNode&&e.parentNode.removeChild(e),t.parentNode&&t.parentNode.removeChild(t)}else a(n,10)}()):(e.parentNode&&e.parentNode.removeChild(e),t.parentNode&&t.parentNode.removeChild(t))),C.ready=null,C.bridge=null,C.deactivated=null}},se=function(e){var t={},n={};if("object"==typeof e&&e){for(var i in e)if(i&&g.call(e,i)&&"string"==typeof e[i]&&e[i])switch(i.toLowerCase()){case"text/plain":case"text":case"air:text":case"flash:text":t.text=e[i],n.text=i;break;case"text/html":case"html":case"air:html":case"flash:html":t.html=e[i],n.html=i;break;case"application/rtf":case"text/rtf":case"rtf":case"richtext":case"air:rtf":case"flash:rtf":t.rtf=e[i],n.rtf=i}return{data:t,formatMap:n}}},le=function(e,t){if("object"!=typeof e||!e||"object"!=typeof t||!t)return e;var n={};for(var i in e)if(g.call(e,i)){if("success"!==i&&"data"!==i){n[i]=e[i];continue}n[i]={};var r=e[i];for(var o in r)o&&g.call(r,o)&&g.call(t,o)&&(n[i][t[o]]=r[o])}return n},ue=function(e,t){var n=null==t||t&&t.cacheBust===!0;return n?(-1===e.indexOf("?")?"?":"&")+"noCache="+p():""},ce=function(e){var t,n,r,o,a="",l=[];if(e.trustedDomains&&("string"==typeof e.trustedDomains?o=[e.trustedDomains]:"object"==typeof e.trustedDomains&&"length"in e.trustedDomains&&(o=e.trustedDomains)),o&&o.length)for(t=0,n=o.length;n>t;t++)if(g.call(o,t)&&o[t]&&"string"==typeof o[t]){if(r=de(o[t]),!r)continue;if("*"===r){l.length=0,l.push(r);break}l.push.apply(l,[r,"//"+r,i.location.protocol+"//"+r])}return l.length&&(a+="trustedOrigins="+s(l.join(","))),e.forceEnhancedClipboard===!0&&(a+=(a?"&":"")+"forceEnhancedClipboard=true"),"string"==typeof e.swfObjectId&&e.swfObjectId&&(a+=(a?"&":"")+"swfObjectId="+s(e.swfObjectId)),a},de=function(e){if(null==e||""===e)return null;if(e=e.replace(/^\s+|\s+$/g,""),""===e)return null;var t=e.indexOf("//");e=-1===t?e:e.slice(t+2);var n=e.indexOf("/");return e=-1===n?e:-1===t||0===n?null:e.slice(0,n),e&&".swf"===e.slice(-4).toLowerCase()?null:e||null},he=function(){var e=function(e){var t,n,i,r=[];if("string"==typeof e&&(e=[e]),"object"!=typeof e||!e||"number"!=typeof e.length)return r;for(t=0,n=e.length;n>t;t++)if(g.call(e,t)&&(i=de(e[t]))){if("*"===i){r.length=0,r.push("*");break}-1===r.indexOf(i)&&r.push(i)}return r};return function(t,n){var i=de(n.swfPath);null===i&&(i=t);var r=e(n.trustedDomains),o=r.length;if(o>0){if(1===o&&"*"===r[0])return"always";if(-1!==r.indexOf(t))return 1===o&&t===i?"sameDomain":"always"}return"never"}}(),pe=function(){try{return r.activeElement}catch(e){return null}},fe=function(e,t){if(!e||1!==e.nodeType)return e;if(e.classList)return e.classList.contains(t)||e.classList.add(t),e;if(t&&"string"==typeof t){var n=(t||"").split(/\s+/);if(1===e.nodeType)if(e.className){for(var i=" "+e.className+" ",r=e.className,o=0,a=n.length;a>o;o++)i.indexOf(" "+n[o]+" ")<0&&(r+=" "+n[o]);e.className=r.replace(/^\s+|\s+$/g,"")}else e.className=t}return e},me=function(e,t){if(!e||1!==e.nodeType)return e;if(e.classList)return e.classList.contains(t)&&e.classList.remove(t),e;if("string"==typeof t&&t){var n=t.split(/\s+/);if(1===e.nodeType&&e.className){for(var i=(" "+e.className+" ").replace(/[\n\t]/g," "),r=0,o=n.length;o>r;r++)i=i.replace(" "+n[r]+" "," ");e.className=i.replace(/^\s+|\s+$/g,"")}}return e},ge=function(e,t){var n=i.getComputedStyle(e,null).getPropertyValue(t);return"cursor"!==t||n&&"auto"!==n||"A"!==e.nodeName?n:"pointer"},ve=function(){var e,t,n,i=1;return"function"==typeof r.body.getBoundingClientRect&&(e=r.body.getBoundingClientRect(),t=e.right-e.left,n=r.body.offsetWidth,i=h(t/n*100)/100),i},ye=function(e){var t={left:0,top:0,width:0,height:0};if(e.getBoundingClientRect){var n,o,a,s=e.getBoundingClientRect();"pageXOffset"in i&&"pageYOffset"in i?(n=i.pageXOffset,o=i.pageYOffset):(a=ve(),n=h(r.documentElement.scrollLeft/a),o=h(r.documentElement.scrollTop/a));var l=r.documentElement.clientLeft||0,u=r.documentElement.clientTop||0;t.left=s.left+n-l,t.top=s.top+o-u,t.width="width"in s?s.width:s.right-s.left,t.height="height"in s?s.height:s.bottom-s.top}return t},_e=function(){var e;if(n&&(e=re(C.bridge))){var t=ye(n);_(e.style,{width:t.width+"px",height:t.height+"px",top:t.top+"px",left:t.left+"px",zIndex:""+xe(L.zIndex)})}},be=function(e){C.ready===!0&&(C.bridge&&"function"==typeof C.bridge.setHandCursor?C.bridge.setHandCursor(e):C.ready=!1)},xe=function(e){if(/^(?:auto|inherit)$/.test(e))return e;var t;return"number"!=typeof e||d(e)?"string"==typeof e&&(t=xe(u(e,10))):t=e,"number"==typeof t?t:"auto"},we=function(e){function t(e){var t=e.match(/[\d]+/g);return t.length=3,t.join(".")}function n(e){return!!e&&(e=e.toLowerCase())&&(/^(pepflashplayer\.dll|libpepflashplayer\.so|pepperflashplayer\.plugin)$/.test(e)||"chrome.plugin"===e.slice(-13))}function i(e){e&&(l=!0,e.version&&(h=t(e.version)),!h&&e.description&&(h=t(e.description)),e.filename&&(d=n(e.filename)))}var r,a,s,l=!1,u=!1,d=!1,h="";if(o.plugins&&o.plugins.length)r=o.plugins["Shockwave Flash"],i(r),o.plugins["Shockwave Flash 2.0"]&&(l=!0,h="2.0.0.11");else if(o.mimeTypes&&o.mimeTypes.length)s=o.mimeTypes["application/x-shockwave-flash"],r=s&&s.enabledPlugin,i(r);else if("undefined"!=typeof e){u=!0;try{a=new e("ShockwaveFlash.ShockwaveFlash.7"),l=!0,h=t(a.GetVariable("$version"))}catch(p){try{a=new e("ShockwaveFlash.ShockwaveFlash.6"),l=!0,h="6.0.21"}catch(f){try{a=new e("ShockwaveFlash.ShockwaveFlash"),l=!0,h=t(a.GetVariable("$version"))}catch(m){u=!1}}}}C.disabled=l!==!0,C.outdated=h&&c(h)<c(A),C.version=h||"0.0.0",C.pluginType=d?"pepper":u?"activex":l?"netscape":"unknown"};we(l);var $e=function(){return this instanceof $e?void("function"==typeof $e._createClient&&$e._createClient.apply(this,y(arguments))):new $e};m($e,"version",{value:"2.1.2",writable:!1,configurable:!0,enumerable:!0}),$e.config=function(){return F.apply(this,y(arguments))},$e.state=function(){return O.apply(this,y(arguments))},$e.isFlashUnusable=function(){return R.apply(this,y(arguments))},$e.on=function(){return B.apply(this,y(arguments))},$e.off=function(){return P.apply(this,y(arguments))},$e.handlers=function(){return I.apply(this,y(arguments))},$e.emit=function(){return Y.apply(this,y(arguments))},$e.create=function(){return j.apply(this,y(arguments))},$e.destroy=function(){return N.apply(this,y(arguments))},$e.setData=function(){return H.apply(this,y(arguments))},$e.clearData=function(){return z.apply(this,y(arguments))},$e.getData=function(){return q.apply(this,y(arguments))},$e.focus=$e.activate=function(){return W.apply(this,y(arguments))},$e.blur=$e.deactivate=function(){return U.apply(this,y(arguments))},$e.activeElement=function(){return V.apply(this,y(arguments))};var ke=0,Ce={},Ae=0,Me={},Te={};_(L,{autoActivate:!0});var Se=function(e){var t=this;t.id=""+ke++,Ce[t.id]={instance:t,elements:[],handlers:{}},e&&t.clip(e),$e.on("*",function(e){return t.emit(e)}),$e.on("destroy",function(){t.destroy()}),$e.create()},De=function(e,t){var n,i,r,o={},a=Ce[this.id]&&Ce[this.id].handlers;if("string"==typeof e&&e)r=e.toLowerCase().split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)g.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&this.on(n,e[n]);if(r&&r.length){for(n=0,i=r.length;i>n;n++)e=r[n].replace(/^on/,""),o[e]=!0,a[e]||(a[e]=[]),a[e].push(t);if(o.ready&&C.ready&&this.emit({type:"ready",client:this}),o.error){var s=["disabled","outdated","unavailable","deactivated","overdue"];for(n=0,i=s.length;i>n;n++)if(C[s[n]]){this.emit({type:"error",name:"flash-"+s[n],client:this});break}}}return this},Ee=function(e,t){var n,i,r,o,a,s=Ce[this.id]&&Ce[this.id].handlers;if(0===arguments.length)o=f(s);else if("string"==typeof e&&e)o=e.split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)g.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&this.off(n,e[n]);if(o&&o.length)for(n=0,i=o.length;i>n;n++)if(e=o[n].toLowerCase().replace(/^on/,""),a=s[e],a&&a.length)if(t)for(r=a.indexOf(t);-1!==r;)a.splice(r,1),r=a.indexOf(t,r);else a.length=0;return this},Le=function(e){var t=null,n=Ce[this.id]&&Ce[this.id].handlers;return n&&(t="string"==typeof e&&e?n[e]?n[e].slice(0):[]:b(n)),t},Fe=function(e){if(Ie.call(this,e)){"object"==typeof e&&e&&"string"==typeof e.type&&e.type&&(e=_({},e));var t=_({},G(e),{client:this});Ye.call(this,t)}return this},Oe=function(e){e=je(e);for(var t=0;t<e.length;t++)if(g.call(e,t)&&e[t]&&1===e[t].nodeType){e[t].zcClippingId?-1===Me[e[t].zcClippingId].indexOf(this.id)&&Me[e[t].zcClippingId].push(this.id):(e[t].zcClippingId="zcClippingId_"+Ae++,Me[e[t].zcClippingId]=[this.id],L.autoActivate===!0&&Ne(e[t]));var n=Ce[this.id]&&Ce[this.id].elements;-1===n.indexOf(e[t])&&n.push(e[t])}return this},Re=function(e){var t=Ce[this.id];if(!t)return this;var n,i=t.elements;e="undefined"==typeof e?i.slice(0):je(e);for(var r=e.length;r--;)if(g.call(e,r)&&e[r]&&1===e[r].nodeType){for(n=0;-1!==(n=i.indexOf(e[r],n));)i.splice(n,1);var o=Me[e[r].zcClippingId];if(o){for(n=0;-1!==(n=o.indexOf(this.id,n));)o.splice(n,1);0===o.length&&(L.autoActivate===!0&&He(e[r]),delete e[r].zcClippingId)}}return this},Be=function(){var e=Ce[this.id];return e&&e.elements?e.elements.slice(0):[]},Pe=function(){this.unclip(),this.off(),delete Ce[this.id]},Ie=function(e){if(!e||!e.type)return!1;if(e.client&&e.client!==this)return!1;var t=Ce[this.id]&&Ce[this.id].elements,n=!!t&&t.length>0,i=!e.target||n&&-1!==t.indexOf(e.target),r=e.relatedTarget&&n&&-1!==t.indexOf(e.relatedTarget),o=e.client&&e.client===this;return i||r||o?!0:!1},Ye=function(e){if("object"==typeof e&&e&&e.type){var t=Q(e),n=Ce[this.id]&&Ce[this.id].handlers["*"]||[],r=Ce[this.id]&&Ce[this.id].handlers[e.type]||[],o=n.concat(r);if(o&&o.length){var a,s,l,u,c,d=this;for(a=0,s=o.length;s>a;a++)l=o[a],u=d,"string"==typeof l&&"function"==typeof i[l]&&(l=i[l]),"object"==typeof l&&l&&"function"==typeof l.handleEvent&&(u=l,l=l.handleEvent),"function"==typeof l&&(c=_({},e),Z(l,u,[c],t))}return this}},je=function(e){return"string"==typeof e&&(e=[]),"number"!=typeof e.length?[e]:e},Ne=function(e){if(e&&1===e.nodeType){var t=function(e){(e||(e=i.event))&&("js"!==e._source&&(e.stopImmediatePropagation(),e.preventDefault()),delete e._source)},n=function(n){(n||(n=i.event))&&(t(n),$e.focus(e))};e.addEventListener("mouseover",n,!1),e.addEventListener("mouseout",t,!1),e.addEventListener("mouseenter",t,!1),e.addEventListener("mouseleave",t,!1),e.addEventListener("mousemove",t,!1),Te[e.zcClippingId]={mouseover:n,mouseout:t,mouseenter:t,mouseleave:t,mousemove:t}}},He=function(e){if(e&&1===e.nodeType){var t=Te[e.zcClippingId];if("object"==typeof t&&t){for(var n,i,r=["move","leave","enter","out","over"],o=0,a=r.length;a>o;o++)n="mouse"+r[o],i=t[n],"function"==typeof i&&e.removeEventListener(n,i,!1);delete Te[e.zcClippingId]}}};$e._createClient=function(){Se.apply(this,y(arguments))},$e.prototype.on=function(){return De.apply(this,y(arguments))},$e.prototype.off=function(){return Ee.apply(this,y(arguments))},$e.prototype.handlers=function(){return Le.apply(this,y(arguments))},$e.prototype.emit=function(){return Fe.apply(this,y(arguments))},$e.prototype.clip=function(){return Oe.apply(this,y(arguments))},$e.prototype.unclip=function(){return Re.apply(this,y(arguments))},$e.prototype.elements=function(){return Be.apply(this,y(arguments))},$e.prototype.destroy=function(){return Pe.apply(this,y(arguments))},$e.prototype.setText=function(e){return $e.setData("text/plain",e),this},$e.prototype.setHtml=function(e){return $e.setData("text/html",e),this},$e.prototype.setRichText=function(e){return $e.setData("application/rtf",e),this},$e.prototype.setData=function(){return $e.setData.apply(this,y(arguments)),this},$e.prototype.clearData=function(){return $e.clearData.apply(this,y(arguments)),this},$e.prototype.getData=function(){return $e.getData.apply(this,y(arguments))},"function"==typeof define&&define.amd?define(function(){return $e}):"object"==typeof module&&module&&"object"==typeof module.exports&&module.exports?module.exports=$e:e.ZeroClipboard=$e}(function(){return this||window}()),ZeroClipboard.config({swfPath:"/assets/ZeroClipboard-8b5c117b88fe37e32fd34a70fdf60026.swf"}),function(e,t,n){"use strict";function i(e,t){return t=t||Error,function(){var n,i,r=2,o=arguments,a=o[0],s="["+(e?e+":":"")+a+"] ",l=o[1];for(s+=l.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1),n=t+r;return n<o.length?_e(o[n]):e}),s+="\nhttp://errors.angularjs.org/1.4.7/"+(e?e+"/":"")+a,i=r,n="?";i<o.length;i++,n="&")s+=n+"p"+(i-r)+"="+encodeURIComponent(_e(o[i]));return new t(s)}}function r(e){if(null==e||T(e))return!1;var t="length"in Object(e)&&e.length;return e.nodeType===Vi&&t?!0:$(e)||Ii(e)||0===t||"number"==typeof t&&t>0&&t-1 in e}function o(e,t,n){var i,a;if(e)if(A(e))for(i in e)"prototype"==i||"length"==i||"name"==i||e.hasOwnProperty&&!e.hasOwnProperty(i)||t.call(n,e[i],i,e);else if(Ii(e)||r(e)){var s="object"!=typeof e;for(i=0,a=e.length;a>i;i++)(s||i in e)&&t.call(n,e[i],i,e)}else if(e.forEach&&e.forEach!==o)e.forEach(t,n,e);else if(w(e))for(i in e)t.call(n,e[i],i,e);else if("function"==typeof e.hasOwnProperty)for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e);else for(i in e)xi.call(e,i)&&t.call(n,e[i],i,e);return e}function a(e,t,n){for(var i=Object.keys(e).sort(),r=0;r<i.length;r++)t.call(n,e[i[r]],i[r]);return i}function s(e){return function(t,n){e(n,t)}}function l(){return++Bi}function u(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function c(e,t,n){for(var i=e.$$hashKey,r=0,o=t.length;o>r;++r){var a=t[r];if(x(a)||A(a))for(var s=Object.keys(a),l=0,d=s.length;d>l;l++){var h=s[l],p=a[h];n&&x(p)?C(p)?e[h]=new Date(p.valueOf()):M(p)?e[h]=new RegExp(p):(x(e[h])||(e[h]=Ii(p)?[]:{}),c(e[h],[p],!0)):e[h]=p}}return u(e,i),e}function d(e){return c(e,Si.call(arguments,1),!1)}function h(e){return c(e,Si.call(arguments,1),!0)}function p(e){return parseInt(e,10)}function f(e,t){return d(Object.create(e),t)}function m(){}function g(e){return e}function v(e){return function(){return e}}function y(e){return A(e.toString)&&e.toString!==Object.prototype.toString}function _(e){return"undefined"==typeof e}function b(e){return"undefined"!=typeof e}function x(e){return null!==e&&"object"==typeof e}function w(e){return null!==e&&"object"==typeof e&&!Fi(e)}function $(e){return"string"==typeof e}function k(e){return"number"==typeof e}function C(e){return"[object Date]"===Li.call(e)}function A(e){return"function"==typeof e}function M(e){return"[object RegExp]"===Li.call(e)}function T(e){return e&&e.window===e}function S(e){return e&&e.$evalAsync&&e.$watch}function D(e){return"[object File]"===Li.call(e)}function E(e){return"[object FormData]"===Li.call(e)}function L(e){return"[object Blob]"===Li.call(e)}function F(e){return"boolean"==typeof e}function O(e){return e&&A(e.then)}function R(e){return Yi.test(Li.call(e))}function B(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function P(e){var t,n={},i=e.split(",");for(t=0;t<i.length;t++)n[i[t]]=!0;return n}function I(e){return bi(e.nodeName||e[0]&&e[0].nodeName)}function Y(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),n}function j(e,t,n,i){if(T(e)||S(e))throw Oi("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(R(t))throw Oi("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t){if(e===t)throw Oi("cpi","Can't copy! Source and destination are identical.");n=n||[],i=i||[],x(e)&&(n.push(e),i.push(t));var r;if(Ii(e)){t.length=0;for(var a=0;a<e.length;a++)t.push(j(e[a],null,n,i))}else{var s=t.$$hashKey;if(Ii(t)?t.length=0:o(t,function(e,n){delete t[n]}),w(e))for(r in e)t[r]=j(e[r],null,n,i);else if(e&&"function"==typeof e.hasOwnProperty)for(r in e)e.hasOwnProperty(r)&&(t[r]=j(e[r],null,n,i));else for(r in e)xi.call(e,r)&&(t[r]=j(e[r],null,n,i));u(t,s)}}else if(t=e,x(e)){var l;if(n&&-1!==(l=n.indexOf(e)))return i[l];if(Ii(e))return j(e,[],n,i);if(R(e))t=new e.constructor(e);else if(C(e))t=new Date(e.getTime());else if(M(e))t=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]),t.lastIndex=e.lastIndex;else{if(!A(e.cloneNode)){var c=Object.create(Fi(e));return j(e,c,n,i)}t=e.cloneNode(!0)}i&&(n.push(e),i.push(t))}return t}function N(e,t){if(Ii(e)){t=t||[];for(var n=0,i=e.length;i>n;n++)t[n]=e[n]}else if(x(e)){t=t||{};for(var r in e)("$"!==r.charAt(0)||"$"!==r.charAt(1))&&(t[r]=e[r])}return t||e}function H(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var n,i,r,o=typeof e,a=typeof t;if(o==a&&"object"==o){if(!Ii(e)){if(C(e))return C(t)?H(e.getTime(),t.getTime()):!1;if(M(e))return M(t)?e.toString()==t.toString():!1;if(S(e)||S(t)||T(e)||T(t)||Ii(t)||C(t)||M(t))return!1;r=ge();for(i in e)if("$"!==i.charAt(0)&&!A(e[i])){if(!H(e[i],t[i]))return!1;r[i]=!0}for(i in t)if(!(i in r)&&"$"!==i.charAt(0)&&b(t[i])&&!A(t[i]))return!1;return!0}if(!Ii(t))return!1;if((n=e.length)==t.length){for(i=0;n>i;i++)if(!H(e[i],t[i]))return!1;return!0}}return!1}function z(e,t,n){return e.concat(Si.call(t,n))}function q(e,t){return Si.call(e,t||0)}function W(e,t){var n=arguments.length>2?q(arguments,2):[];return!A(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,z(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function U(e,i){var r=i;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?r=n:T(i)?r="$WINDOW":i&&t===i?r="$DOCUMENT":S(i)&&(r="$SCOPE"),r}function V(e,t){return"undefined"==typeof e?n:(k(t)||(t=t?2:null),JSON.stringify(e,U,t))}function X(e){return $(e)?JSON.parse(e):e}function G(e,t){var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function K(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function J(e,t,n){n=n?-1:1;var i=G(t,e.getTimezoneOffset());return K(e,n*(i-e.getTimezoneOffset()))}function Q(e){e=Ai(e).clone();try{e.empty()}catch(t){}var n=Ai("<div>").append(e).html();try{return e[0].nodeType===Gi?bi(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+bi(t)})}catch(t){return bi(n)}}function Z(e){try{return decodeURIComponent(e)}catch(t){}}function ee(e){var t={};return o((e||"").split("&"),function(e){var n,i,r;e&&(i=e=e.replace(/\+/g,"%20"),n=e.indexOf("="),-1!==n&&(i=e.substring(0,n),r=e.substring(n+1)),i=Z(i),b(i)&&(r=b(r)?Z(r):!0,xi.call(t,i)?Ii(t[i])?t[i].push(r):t[i]=[t[i],r]:t[i]=r))}),t}function te(e){var t=[];return o(e,function(e,n){Ii(e)?o(e,function(e){t.push(ie(n,!0)+(e===!0?"":"="+ie(e,!0)))}):t.push(ie(n,!0)+(e===!0?"":"="+ie(e,!0)))}),t.length?t.join("&"):""}function ne(e){return ie(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ie(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function re(e,t){var n,i,r=qi.length;for(i=0;r>i;++i)if(n=qi[i]+t,$(n=e.getAttribute(n)))return n;return null}function oe(e,t){var n,i,r={};o(qi,function(t){var r=t+"app";!n&&e.hasAttribute&&e.hasAttribute(r)&&(n=e,i=e.getAttribute(r))}),o(qi,function(t){var r,o=t+"app";!n&&(r=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=r,i=r.getAttribute(o))}),n&&(r.strictDi=null!==re(n,"strict-di"),t(n,i?[i]:[],r))}function ae(n,i,r){x(r)||(r={});var a={strictDi:!1};r=d(a,r);var s=function(){if(n=Ai(n),n.injector()){var e=n[0]===t?"document":Q(n);throw Oi("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(/</,"<").replace(/>/,">"))}i=i||[],i.unshift(["$provide",function(e){e.value("$rootElement",n)}]),r.debugInfoEnabled&&i.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),i.unshift("ng");var o=Qe(i,r.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,i){e.$apply(function(){t.data("$injector",i),n(t)(e)})}]),o},l=/^NG_ENABLE_DEBUG_INFO!/,u=/^NG_DEFER_BOOTSTRAP!/;return e&&l.test(e.name)&&(r.debugInfoEnabled=!0,e.name=e.name.replace(l,"")),e&&!u.test(e.name)?s():(e.name=e.name.replace(u,""),Ri.resumeBootstrap=function(e){return o(e,function(e){i.push(e)}),s()},void(A(Ri.resumeDeferredBootstrap)&&Ri.resumeDeferredBootstrap()))}function se(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function le(e){var t=Ri.element(e).injector();if(!t)throw Oi("test","no injector found for element argument to getTestability");return t.get("$$testability")}function ue(e,t){return t=t||"_",e.replace(Wi,function(e,n){return(n?t:"")+e.toLowerCase()})}function ce(){var t;if(!Ui){var i=zi();Mi=_(i)?e.jQuery:i?e[i]:n,Mi&&Mi.fn.on?(Ai=Mi,d(Mi.fn,{scope:pr.scope,isolateScope:pr.isolateScope,
|
35
|
+
controller:pr.controller,injector:pr.injector,inheritedData:pr.inheritedData}),t=Mi.cleanData,Mi.cleanData=function(e){var n;if(Pi)Pi=!1;else for(var i,r=0;null!=(i=e[r]);r++)n=Mi._data(i,"events"),n&&n.$destroy&&Mi(i).triggerHandler("$destroy");t(e)}):Ai=Te,Ri.element=Ai,Ui=!0}}function de(e,t,n){if(!e)throw Oi("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function he(e,t,n){return n&&Ii(e)&&(e=e[e.length-1]),de(A(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function pe(e,t){if("hasOwnProperty"===e)throw Oi("badname","hasOwnProperty is not a valid {0} name",t)}function fe(e,t,n){if(!t)return e;for(var i,r=t.split("."),o=e,a=r.length,s=0;a>s;s++)i=r[s],e&&(e=(o=e)[i]);return!n&&A(e)?W(o,e):e}function me(e){for(var t,n=e[0],i=e[e.length-1],r=1;n!==i&&(n=n.nextSibling);r++)(t||e[r]!==n)&&(t||(t=Ai(Si.call(e,0,r))),t.push(n));return t||e}function ge(){return Object.create(null)}function ve(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=i("$injector"),r=i("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||i,t(o,"module",function(){var e={};return function(i,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw r("badname","hasOwnProperty is not a valid {0} name",t)};return s(i,"module"),o&&e.hasOwnProperty(i)&&(e[i]=null),t(e,i,function(){function e(e,t,n,i){return i||(i=r),function(){return i[n||"push"]([e,t,arguments]),c}}function t(e,t){return function(n,o){return o&&A(o)&&(o.$$moduleName=i),r.push([e,t,arguments]),c}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",i);var r=[],s=[],l=[],u=e("$injector","invoke","push",s),c={_invokeQueue:r,_configBlocks:s,_runBlocks:l,requires:o,name:i,provider:t("$provide","provider"),factory:t("$provide","factory"),service:t("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:t("$provide","decorator"),animation:t("$animateProvider","register"),filter:t("$filterProvider","register"),controller:t("$controllerProvider","register"),directive:t("$compileProvider","directive"),config:u,run:function(e){return l.push(e),this}};return a&&u(a),c})}})}function ye(e){var t=[];return JSON.stringify(e,function(e,n){if(n=U(e,n),x(n)){if(t.indexOf(n)>=0)return"...";t.push(n)}return n})}function _e(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):_(e)?"undefined":"string"!=typeof e?ye(e):e}function be(t){d(t,{bootstrap:ae,copy:j,extend:d,merge:h,equals:H,element:Ai,forEach:o,injector:Qe,noop:m,bind:W,toJson:V,fromJson:X,identity:g,isUndefined:_,isDefined:b,isString:$,isFunction:A,isObject:x,isNumber:k,isElement:B,isArray:Ii,version:Zi,isDate:C,lowercase:bi,uppercase:wi,callbacks:{counter:0},getTestability:le,$$minErr:i,$$csp:Hi,reloadWithDebugInfo:se}),(Ti=ve(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:vn}),e.provider("$compile",lt).directive({a:fo,input:Eo,textarea:Eo,form:_o,script:$a,select:Aa,style:Ta,option:Ma,ngBind:Oo,ngBindHtml:Bo,ngBindTemplate:Ro,ngClass:Io,ngClassEven:jo,ngClassOdd:Yo,ngCloak:No,ngController:Ho,ngForm:bo,ngHide:va,ngIf:Wo,ngInclude:Uo,ngInit:Xo,ngNonBindable:la,ngPluralize:ha,ngRepeat:pa,ngShow:ga,ngStyle:ya,ngSwitch:_a,ngSwitchWhen:ba,ngSwitchDefault:xa,ngOptions:da,ngTransclude:wa,ngModel:oa,ngList:Go,ngChange:Po,pattern:Da,ngPattern:Da,required:Sa,ngRequired:Sa,minlength:La,ngMinlength:La,maxlength:Ea,ngMaxlength:Ea,ngValue:Fo,ngModelOptions:sa}).directive({ngInclude:Vo}).directive(mo).directive(zo),e.provider({$anchorScroll:Ze,$animate:Tr,$animateCss:Sr,$$animateQueue:Mr,$$AnimateRunner:Ar,$browser:ot,$cacheFactory:at,$controller:pt,$document:ft,$exceptionHandler:mt,$filter:En,$$forceReflow:Or,$interpolate:St,$interval:Dt,$http:Ct,$httpParamSerializer:vt,$httpParamSerializerJQLike:yt,$httpBackend:Mt,$xhrFactory:At,$location:qt,$log:Wt,$parse:dn,$rootScope:gn,$q:hn,$$q:pn,$sce:xn,$sceDelegate:bn,$sniffer:wn,$templateCache:st,$templateRequest:$n,$$testability:kn,$timeout:Cn,$window:Tn,$$rAF:mn,$$jqLite:Ve,$$HashMap:vr,$$cookieReader:Dn})}])}function xe(){return++tr}function we(e){return e.replace(rr,function(e,t,n,i){return i?n.toUpperCase():n}).replace(or,"Moz$1")}function $e(e){return!ur.test(e)}function ke(e){var t=e.nodeType;return t===Vi||!t||t===Ji}function Ce(e){for(var t in er[e.ng339])return!0;return!1}function Ae(e,t){var n,i,r,a,s=t.createDocumentFragment(),l=[];if($e(e))l.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),i=(cr.exec(e)||["",""])[1].toLowerCase(),r=hr[i]||hr._default,n.innerHTML=r[1]+e.replace(dr,"<$1></$2>")+r[2],a=r[0];a--;)n=n.lastChild;l=z(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(l,function(e){s.appendChild(e)}),s}function Me(e,n){n=n||t;var i;return(i=lr.exec(e))?[n.createElement(i[1])]:(i=Ae(e,n))?i.childNodes:[]}function Te(e){if(e instanceof Te)return e;var t;if($(e)&&(e=ji(e),t=!0),!(this instanceof Te)){if(t&&"<"!=e.charAt(0))throw sr("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Te(e)}t?Ie(this,Me(e)):Ie(this,e)}function Se(e){return e.cloneNode(!0)}function De(e,t){if(t||Le(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),i=0,r=n.length;r>i;i++)Le(n[i])}function Ee(e,t,n,i){if(b(i))throw sr("offargs","jqLite#off() does not support the `selector` argument");var r=Fe(e),a=r&&r.events,s=r&&r.handle;if(s)if(t)o(t.split(" "),function(t){if(b(n)){var i=a[t];if(Y(i||[],n),i&&i.length>0)return}ir(e,t,s),delete a[t]});else for(t in a)"$destroy"!==t&&ir(e,t,s),delete a[t]}function Le(e,t){var i=e.ng339,r=i&&er[i];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Ee(e)),delete er[i],e.ng339=n}}function Fe(e,t){var i=e.ng339,r=i&&er[i];return t&&!r&&(e.ng339=i=xe(),r=er[i]={events:{},data:{},handle:n}),r}function Oe(e,t,n){if(ke(e)){var i=b(n),r=!i&&t&&!x(t),o=!t,a=Fe(e,!r),s=a&&a.data;if(i)s[t]=n;else{if(o)return s;if(r)return s&&s[t];d(s,t)}}}function Re(e,t){return e.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}function Be(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",ji((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+ji(t)+" "," ")))})}function Pe(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=ji(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",ji(n))}}function Ie(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var i=0;n>i;i++)e[e.length++]=t[i]}else e[e.length++]=t}}function Ye(e,t){return je(e,"$"+(t||"ngController")+"Controller")}function je(e,t,n){e.nodeType==Ji&&(e=e.documentElement);for(var i=Ii(t)?t:[t];e;){for(var r=0,o=i.length;o>r;r++)if(b(n=Ai.data(e,i[r])))return n;e=e.parentNode||e.nodeType===Qi&&e.host}}function Ne(e){for(De(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function He(e,t){t||De(e);var n=e.parentNode;n&&n.removeChild(e)}function ze(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Ai(n).on("load",t)}function qe(e,t){var n=fr[t.toLowerCase()];return n&&mr[I(e)]&&n}function We(e){return gr[e]}function Ue(e,t){var n=function(n,i){n.isDefaultPrevented=function(){return n.defaultPrevented};var r=t[i||n.type],o=r?r.length:0;if(o){if(_(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0},o>1&&(r=N(r));for(var s=0;o>s;s++)n.isImmediatePropagationStopped()||r[s].call(e,n)}};return n.elem=e,n}function Ve(){this.$get=function(){return d(Te,{hasClass:function(e,t){return e.attr&&(e=e[0]),Re(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Pe(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Be(e,t)}})}}function Xe(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var i=typeof e;return n="function"==i||"object"==i&&null!==e?e.$$hashKey=i+":"+(t||l)():i+":"+e}function Ge(e,t){if(t){var n=0;this.nextUid=function(){return++n}}o(e,this.put,this)}function Ke(e){var t=e.toString().replace(xr,""),n=t.match(yr);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Je(e,t,n){var i,r,a,s;if("function"==typeof e){if(!(i=e.$inject)){if(i=[],e.length){if(t)throw $(n)&&n||(n=e.name||Ke(e)),wr("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);r=e.toString().replace(xr,""),a=r.match(yr),o(a[1].split(_r),function(e){e.replace(br,function(e,t,n){i.push(n)})})}e.$inject=i}}else Ii(e)?(s=e.length-1,he(e[s],"fn"),i=e.slice(0,s)):he(e,"fn",!0);return i}function Qe(e,t){function i(e){return function(t,n){return x(t)?void o(t,s(e)):e(t,n)}}function r(e,t){if(pe(e,"service"),(A(t)||Ii(t))&&(t=k.instantiate(t)),!t.$get)throw wr("pget","Provider '{0}' must define $get factory method.",e);return w[e+g]=t}function a(e,t){return function(){var n=M.invoke(t,this);if(_(n))throw wr("undef","Provider '{0}' must return a value from $get factory method.",e);return n}}function l(e,t,n){return r(e,{$get:n!==!1?a(e,t):t})}function u(e,t){return l(e,["$injector",function(e){return e.instantiate(t)}])}function c(e,t){return l(e,v(t),!1)}function d(e,t){pe(e,"constant"),w[e]=t,C[e]=t}function h(e,t){var n=k.get(e+g),i=n.$get;n.$get=function(){var e=M.invoke(i,n);return M.invoke(t,null,{$delegate:e})}}function p(e){de(_(e)||Ii(e),"modulesToLoad","not an array");var t,n=[];return o(e,function(e){function i(e){var t,n;for(t=0,n=e.length;n>t;t++){var i=e[t],r=k.get(i[0]);r[i[1]].apply(r,i[2])}}if(!b.get(e)){b.put(e,!0);try{$(e)?(t=Ti(e),n=n.concat(p(t.requires)).concat(t._runBlocks),i(t._invokeQueue),i(t._configBlocks)):A(e)?n.push(k.invoke(e)):Ii(e)?n.push(k.invoke(e)):he(e,"module")}catch(r){throw Ii(e)&&(e=e[e.length-1]),r.message&&r.stack&&-1==r.stack.indexOf(r.message)&&(r=r.message+"\n"+r.stack),wr("modulerr","Failed to instantiate module {0} due to:\n{1}",e,r.stack||r.message||r)}}}),n}function f(e,n){function i(t,i){if(e.hasOwnProperty(t)){if(e[t]===m)throw wr("cdep","Circular dependency found: {0}",t+" <- "+y.join(" <- "));return e[t]}try{return y.unshift(t),e[t]=m,e[t]=n(t,i)}catch(r){throw e[t]===m&&delete e[t],r}finally{y.shift()}}function r(e,n,r,o){"string"==typeof r&&(o=r,r=null);var a,s,l,u=[],c=Qe.$$annotate(e,t,o);for(s=0,a=c.length;a>s;s++){if(l=c[s],"string"!=typeof l)throw wr("itkn","Incorrect injection token! Expected service name as string, got {0}",l);u.push(r&&r.hasOwnProperty(l)?r[l]:i(l,o))}return Ii(e)&&(e=e[a]),e.apply(n,u)}function o(e,t,n){var i=Object.create((Ii(e)?e[e.length-1]:e).prototype||null),o=r(e,i,t,n);return x(o)||A(o)?o:i}return{invoke:r,instantiate:o,get:i,annotate:Qe.$$annotate,has:function(t){return w.hasOwnProperty(t+g)||e.hasOwnProperty(t)}}}t=t===!0;var m={},g="Provider",y=[],b=new Ge([],!0),w={$provide:{provider:i(r),factory:i(l),service:i(u),value:i(c),constant:i(d),decorator:h}},k=w.$injector=f(w,function(e,t){throw Ri.isString(t)&&y.push(t),wr("unpr","Unknown provider: {0}",y.join(" <- "))}),C={},M=C.$injector=f(C,function(e,t){var i=k.get(e+g,t);return M.invoke(i.$get,i,n,e)});return o(p(e),function(e){e&&M.invoke(e)}),M}function Ze(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){function r(e){var t=null;return Array.prototype.some.call(e,function(e){return"a"===I(e)?(t=e,!0):void 0}),t}function o(){var e=s.yOffset;if(A(e))e=e();else if(B(e)){var n=e[0],i=t.getComputedStyle(n);e="fixed"!==i.position?0:n.getBoundingClientRect().bottom}else k(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var i=e.getBoundingClientRect().top;t.scrollBy(0,i-n)}}else t.scrollTo(0,0)}function s(e){e=$(e)?e:n.hash();var t;e?(t=l.getElementById(e))?a(t):(t=r(l.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}var l=t.document;return e&&i.$watch(function(){return n.hash()},function(e,t){(e!==t||""!==e)&&ze(function(){i.$evalAsync(s)})}),s}]}function et(e,t){return e||t?e?t?(Ii(e)&&(e=e.join(" ")),Ii(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function tt(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===kr)return n}}function nt(e){$(e)&&(e=e.split(" "));var t=ge();return o(e,function(e){e.length&&(t[e]=!0)}),t}function it(e){return x(e)?e:{}}function rt(e,t,n,i){function r(e){try{e.apply(null,q(arguments,1))}finally{if(y--,0===y)for(;b.length;)try{b.pop()()}catch(t){n.error(t)}}}function a(e){var t=e.indexOf("#");return-1===t?"":e.substr(t)}function s(){C=null,u(),c()}function l(){try{return p.state}catch(e){}}function u(){x=l(),x=_(x)?null:x,H(x,T)&&(x=T),T=x}function c(){($!==d.url()||w!==x)&&($=d.url(),w=x,o(A,function(e){e(d.url(),x)}))}var d=this,h=(t[0],e.location),p=e.history,f=e.setTimeout,g=e.clearTimeout,v={};d.isMock=!1;var y=0,b=[];d.$$completeOutstandingRequest=r,d.$$incOutstandingRequestCount=function(){y++},d.notifyWhenNoOutstandingRequests=function(e){0===y?e():b.push(e)};var x,w,$=h.href,k=t.find("base"),C=null;u(),w=x,d.url=function(t,n,r){if(_(r)&&(r=null),h!==e.location&&(h=e.location),p!==e.history&&(p=e.history),t){var o=w===r;if($===t&&(!i.history||o))return d;var s=$&&Rt($)===Rt(t);return $=t,w=r,!i.history||s&&o?((!s||C)&&(C=t),n?h.replace(t):s?h.hash=a(t):h.href=t,h.href!==t&&(C=t)):(p[n?"replaceState":"pushState"](r,"",t),u(),w=x),d}return C||h.href.replace(/%27/g,"'")},d.state=function(){return x};var A=[],M=!1,T=null;d.onUrlChange=function(t){return M||(i.history&&Ai(e).on("popstate",s),Ai(e).on("hashchange",s),M=!0),A.push(t),t},d.$$applicationDestroyed=function(){Ai(e).off("hashchange popstate",s)},d.$$checkUrlChange=c,d.baseHref=function(){var e=k.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""},d.defer=function(e,t){var n;return y++,n=f(function(){delete v[n],r(e)},t||0),v[n]=!0,n},d.defer.cancel=function(e){return v[e]?(delete v[e],g(e),r(m),!0):!1}}function ot(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,i){return new rt(e,i,t,n)}]}function at(){this.$get=function(){function e(e,n){function r(e){e!=h&&(p?p==e&&(p=e.n):p=e,o(e.n,e.p),o(e,h),h=e,h.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw i("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=d({},n,{id:e}),l={},u=n&&n.capacity||Number.MAX_VALUE,c={},h=null,p=null;return t[e]={put:function(e,t){if(!_(t)){if(u<Number.MAX_VALUE){var n=c[e]||(c[e]={key:e});r(n)}return e in l||a++,l[e]=t,a>u&&this.remove(p.key),t}},get:function(e){if(u<Number.MAX_VALUE){var t=c[e];if(!t)return;r(t)}return l[e]},remove:function(e){if(u<Number.MAX_VALUE){var t=c[e];if(!t)return;t==h&&(h=t.p),t==p&&(p=t.n),o(t.n,t.p),delete c[e]}delete l[e],a--},removeAll:function(){l={},a=0,c={},h=p=null},destroy:function(){l=null,s=null,c=null,delete t[e]},info:function(){return d({},s,{size:a})}}}var t={};return e.info=function(){var e={};return o(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function st(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function lt(e,i){function r(e,t,n){var i=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,r={};return o(e,function(e,o){var a=e.match(i);if(!a)throw Dr("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,o,e,n?"controller bindings definition":"isolate scope definition");r[o]={mode:a[1][0],collection:"*"===a[2],optional:"?"===a[3],attrName:a[4]||o}}),r}function a(e,t){var n={isolateScope:null,bindToController:null};if(x(e.scope)&&(e.bindToController===!0?(n.bindToController=r(e.scope,t,!0),n.isolateScope={}):n.isolateScope=r(e.scope,t,!1)),x(e.bindToController)&&(n.bindToController=r(e.bindToController,t,!0)),x(n.bindToController)){var i=e.controller,o=e.controllerAs;if(!i)throw Dr("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);if(!ht(i,o))throw Dr("noident","Cannot bind to controller without identifier for directive '{0}'.",t)}return n}function l(e){var t=e.charAt(0);if(!t||t!==bi(t))throw Dr("baddir","Directive name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw Dr("baddir","Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",e)}var u={},c="Directive",h=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,p=/(([\w\-]+)(?:\:([^;]+))?;?)/,y=P("ngSrc,ngSrcset,src,srcset"),w=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,k=/^(on[a-z]+|formaction)$/;this.directive=function M(t,n){return pe(t,"directive"),$(t)?(l(t),de(n,"directiveFactory"),u.hasOwnProperty(t)||(u[t]=[],e.factory(t+c,["$injector","$exceptionHandler",function(e,n){var i=[];return o(u[t],function(r,o){try{var s=e.invoke(r);A(s)?s={compile:v(s)}:!s.compile&&s.link&&(s.compile=v(s.link)),s.priority=s.priority||0,s.index=o,s.name=s.name||t,s.require=s.require||s.controller&&s.name,s.restrict=s.restrict||"EA";var l=s.$$bindings=a(s,s.name);x(l.isolateScope)&&(s.$$isolateBindings=l.isolateScope),s.$$moduleName=r.$$moduleName,i.push(s)}catch(u){n(u)}}),i}])),u[t].push(n)):o(t,s(M)),this},this.aHrefSanitizationWhitelist=function(e){return b(e)?(i.aHrefSanitizationWhitelist(e),this):i.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return b(e)?(i.imgSrcSanitizationWhitelist(e),this):i.imgSrcSanitizationWhitelist()};var C=!0;this.debugInfoEnabled=function(e){return b(e)?(C=e,this):C},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(e,i,r,a,s,l,v,b,M,T,D){function E(e,t){try{e.addClass(t)}catch(n){}}function L(e,t,n,i,r){e instanceof Ai||(e=Ai(e)),o(e,function(t,n){t.nodeType==Gi&&t.nodeValue.match(/\S+/)&&(e[n]=Ai(t).wrap("<span></span>").parent()[0])});var a=O(e,t,e,n,i,r);L.$$addScopeClass(e);var s=null;return function(t,n,i){de(t,"scope"),i=i||{};var r=i.parentBoundTranscludeFn,o=i.transcludeControllers,l=i.futureParentElement;r&&r.$$boundTransclude&&(r=r.$$boundTransclude),s||(s=F(l));var u;if(u="html"!==s?Ai(Z(s,Ai("<div>").append(e).html())):n?pr.clone.call(e):e,o)for(var c in o)u.data("$"+c+"Controller",o[c].instance);return L.$$addScopeInfo(u,t),n&&n(u,t),a&&a(t,u,u,r),u}}function F(e){var t=e&&e[0];return t&&"foreignobject"!==I(t)&&t.toString().match(/SVG/)?"svg":"html"}function O(e,t,i,r,o,a){function s(e,i,r,o){var a,s,l,u,c,d,h,p,g;if(f){var v=i.length;for(g=new Array(v),c=0;c<m.length;c+=3)h=m[c],g[h]=i[h]}else g=i;for(c=0,d=m.length;d>c;)if(l=g[m[c++]],a=m[c++],s=m[c++],a){if(a.scope){u=e.$new(),L.$$addScopeInfo(Ai(l),u);var y=a.$$destroyBindings;y&&(a.$$destroyBindings=null,u.$on("$destroyed",y))}else u=e;p=a.transcludeOnThisElement?R(e,a.transclude,o):!a.templateOnThisElement&&o?o:!o&&t?R(e,t):null,a(s,u,l,r,p,a)}else s&&s(e,l.childNodes,n,o)}for(var l,u,c,d,h,p,f,m=[],g=0;g<e.length;g++)l=new ae,u=B(e[g],[],l,0===g?r:n,o),c=u.length?N(u,e[g],l,t,i,null,[],[],a):null,c&&c.scope&&L.$$addScopeClass(l.$$element),h=c&&c.terminal||!(d=e[g].childNodes)||!d.length?null:O(d,c?(c.transcludeOnThisElement||!c.templateOnThisElement)&&c.transclude:t),(c||h)&&(m.push(g,c,h),p=!0,f=f||c),a=null;return p?s:null}function R(e,t,n){var i=function(i,r,o,a,s){return i||(i=e.$new(!1,s),i.$$transcluded=!0),t(i,r,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:a})};return i}function B(e,t,n,i,r){var o,a,s=e.nodeType,l=n.$attr;switch(s){case Vi:W(t,ut(I(e)),"E",i,r);for(var u,c,d,f,m,g,v=e.attributes,y=0,_=v&&v.length;_>y;y++){var b=!1,w=!1;u=v[y],c=u.name,m=ji(u.value),f=ut(c),(g=he.test(f))&&(c=c.replace(Er,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var k=f.replace(/(Start|End)$/,"");U(k)&&f===k+"Start"&&(b=c,w=c.substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),d=ut(c.toLowerCase()),l[d]=c,(g||!n.hasOwnProperty(d))&&(n[d]=m,qe(e,d)&&(n[d]=!0)),te(e,t,m,d,g),W(t,d,"A",i,r,b,w)}if(a=e.className,x(a)&&(a=a.animVal),$(a)&&""!==a)for(;o=p.exec(a);)d=ut(o[2]),W(t,d,"C",i,r)&&(n[d]=ji(o[3])),a=a.substr(o.index+o[0].length);break;case Gi:if(11===Ci)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===Gi;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);J(t,e.nodeValue);break;case Ki:try{o=h.exec(e.nodeValue),o&&(d=ut(o[1]),W(t,d,"M",i,r)&&(n[d]=ji(o[2])))}catch(C){}}return t.sort(G),t}function P(e,t,n){var i=[],r=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Dr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==Vi&&(e.hasAttribute(t)&&r++,e.hasAttribute(n)&&r--),i.push(e),e=e.nextSibling}while(r>0)}else i.push(e);return Ai(i)}function j(e,t,n){return function(i,r,o,a,s){return r=P(r[0],t,n),e(i,r,o,a,s)}}function N(e,i,o,a,s,u,c,d,h){function p(e,t,n,i){e&&(n&&(e=j(e,n,i)),e.require=v.require,e.directiveName=y,(D===v||v.$$isolateScope)&&(e=ie(e,{isolateScope:!0})),c.push(e)),t&&(n&&(t=j(t,n,i)),t.require=v.require,t.directiveName=y,(D===v||v.$$isolateScope)&&(t=ie(t,{isolateScope:!0})),d.push(t))}function f(e,t,n,i){var r;if($(t)){var o=t.match(w),a=t.substring(o[0].length),s=o[1]||o[3],l="?"===o[2];if("^^"===s?n=n.parent():(r=i&&i[a],r=r&&r.instance),!r){var u="$"+a+"Controller";r=s?n.inheritedData(u):n.data(u)}if(!r&&!l)throw Dr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",a,e)}else if(Ii(t)){r=[];for(var c=0,d=t.length;d>c;c++)r[c]=f(e,t[c],n,i)}return r||null}function m(e,t,n,i,r,o){var a=ge();for(var s in i){var u=i[s],c={$scope:u===D||u.$$isolateScope?r:o,$element:e,$attrs:t,$transclude:n},d=u.controller;"@"==d&&(d=t[u.name]);var h=l(d,c,!0,u.controllerAs);a[u.name]=h,I||e.data("$"+u.name+"Controller",h.instance)}return a}function g(e,t,r,a,s,l){function u(e,t,i){var r;return S(e)||(i=t,t=e,e=n),I&&(r=_),i||(i=I?x.parent():x),s(e,t,r,i,F)}var h,p,g,v,y,_,b,x,w;if(i===r?(w=o,x=o.$$element):(x=Ai(r),w=new ae(x,o)),D&&(y=t.$new(!0)),s&&(b=u,b.$$boundTransclude=s),T&&(_=m(x,w,b,T,y,t)),D&&(L.$$addScopeInfo(x,y,!0,!(E&&(E===D||E===D.$$originalDirective))),L.$$addScopeClass(x,!0),y.$$isolateBindings=D.$$isolateBindings,oe(t,w,y,y.$$isolateBindings,D,y)),_){var $,k,C=D||M;C&&_[C.name]&&($=C.$$bindings.bindToController,v=_[C.name],v&&v.identifier&&$&&(k=v,l.$$destroyBindings=oe(t,w,v.instance,$,C)));for(h in _){v=_[h];var A=v();A!==v.instance&&(v.instance=A,x.data("$"+h+"Controller",A),v===k&&(l.$$destroyBindings(),l.$$destroyBindings=oe(t,w,A,$,C)))}}for(h=0,p=c.length;p>h;h++)g=c[h],re(g,g.isolateScope?y:t,x,w,g.require&&f(g.directiveName,g.require,x,_),b);var F=t;for(D&&(D.template||null===D.templateUrl)&&(F=y),e&&e(F,r.childNodes,n,s),h=d.length-1;h>=0;h--)g=d[h],re(g,g.isolateScope?y:t,x,w,g.require&&f(g.directiveName,g.require,x,_),b)}h=h||{};for(var v,y,_,b,k,C=-Number.MAX_VALUE,M=h.newScopeDirective,T=h.controllerDirectives,D=h.newIsolateScopeDirective,E=h.templateDirective,F=h.nonTlbTranscludeDirective,O=!1,R=!1,I=h.hasElementTranscludeDirective,Y=o.$$element=Ai(i),N=u,H=a,W=0,U=e.length;U>W;W++){v=e[W];var G=v.$$start,J=v.$$end;if(G&&(Y=P(i,G,J)),_=n,C>v.priority)break;if((k=v.scope)&&(v.templateUrl||(x(k)?(K("new/isolated scope",D||M,v,Y),D=v):K("new/isolated scope",D,v,Y)),M=M||v),y=v.name,!v.templateUrl&&v.controller&&(k=v.controller,T=T||ge(),K("'"+y+"' controller",T[y],v,Y),T[y]=v),(k=v.transclude)&&(O=!0,v.$$tlb||(K("transclusion",F,v,Y),F=v),"element"==k?(I=!0,C=v.priority,_=Y,Y=o.$$element=Ai(t.createComment(" "+y+": "+o[y]+" ")),i=Y[0],ne(s,q(_),i),H=L(_,a,C,N&&N.name,{nonTlbTranscludeDirective:F})):(_=Ai(Se(i)).contents(),Y.empty(),H=L(_,a))),v.template)if(R=!0,K("template",E,v,Y),E=v,k=A(v.template)?v.template(Y,o):v.template,k=ce(k),v.replace){if(N=v,_=$e(k)?[]:dt(Z(v.templateNamespace,ji(k))),i=_[0],1!=_.length||i.nodeType!==Vi)throw Dr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",y,"");ne(s,Y,i);var ee={$attr:{}},te=B(i,[],ee),se=e.splice(W+1,e.length-(W+1));D&&z(te),e=e.concat(te).concat(se),V(o,ee),U=e.length}else Y.html(k);if(v.templateUrl)R=!0,K("template",E,v,Y),E=v,v.replace&&(N=v),g=X(e.splice(W,e.length-W),Y,o,s,O&&H,c,d,{controllerDirectives:T,newScopeDirective:M!==v&&M,newIsolateScopeDirective:D,templateDirective:E,nonTlbTranscludeDirective:F}),U=e.length;else if(v.compile)try{b=v.compile(Y,o,H),A(b)?p(null,b,G,J):b&&p(b.pre,b.post,G,J)}catch(le){r(le,Q(Y))}v.terminal&&(g.terminal=!0,C=Math.max(C,v.priority))}return g.scope=M&&M.scope===!0,g.transcludeOnThisElement=O,g.templateOnThisElement=R,g.transclude=H,h.hasElementTranscludeDirective=I,g}function z(e){for(var t=0,n=e.length;n>t;t++)e[t]=f(e[t],{$$isolateScope:!0})}function W(t,n,i,o,a,s,l){if(n===a)return null;var d=null;if(u.hasOwnProperty(n))for(var h,p=e.get(n+c),m=0,g=p.length;g>m;m++)try{h=p[m],(_(o)||o>h.priority)&&-1!=h.restrict.indexOf(i)&&(s&&(h=f(h,{$$start:s,$$end:l})),t.push(h),d=h)}catch(v){r(v)}return d}function U(t){if(u.hasOwnProperty(t))for(var n,i=e.get(t+c),r=0,o=i.length;o>r;r++)if(n=i[r],n.multiElement)return!0;return!1}function V(e,t){var n=t.$attr,i=e.$attr,r=e.$$element;o(e,function(i,r){"$"!=r.charAt(0)&&(t[r]&&t[r]!==i&&(i+=("style"===r?";":" ")+t[r]),e.$set(r,i,!0,n[r]))}),o(t,function(t,o){"class"==o?(E(r,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==o?(r.attr("style",r.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,i[o]=n[o])})}function X(e,t,n,i,r,s,l,u){var c,d,h=[],p=t[0],m=e.shift(),g=f(m,{templateUrl:null,transclude:null,replace:null,$$originalDirective:m}),v=A(m.templateUrl)?m.templateUrl(t,n):m.templateUrl,y=m.templateNamespace;return t.empty(),a(v).then(function(a){var f,_,b,w;if(a=ce(a),m.replace){if(b=$e(a)?[]:dt(Z(y,ji(a))),f=b[0],1!=b.length||f.nodeType!==Vi)throw Dr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",m.name,v);_={$attr:{}},ne(i,t,f);var $=B(f,[],_);x(m.scope)&&z($),e=$.concat(e),V(n,_)}else f=p,t.html(a);for(e.unshift(g),c=N(e,f,n,r,t,m,s,l,u),o(i,function(e,n){e==f&&(i[n]=t[0])}),d=O(t[0].childNodes,r);h.length;){var k=h.shift(),C=h.shift(),A=h.shift(),M=h.shift(),T=t[0];if(!k.$$destroyed){if(C!==p){var S=C.className;u.hasElementTranscludeDirective&&m.replace||(T=Se(f)),ne(A,Ai(C),T),E(Ai(T),S)}w=c.transcludeOnThisElement?R(k,c.transclude,M):M,c(d,k,T,i,w,c)}}h=null}),function(e,t,n,i,r){var o=r;t.$$destroyed||(h?h.push(t,n,i,o):(c.transcludeOnThisElement&&(o=R(t,c.transclude,r)),c(d,t,n,i,o,c)))}}function G(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function K(e,t,n,i){function r(e){return e?" (module: "+e+")":""}if(t)throw Dr("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,r(t.$$moduleName),n.name,r(n.$$moduleName),e,Q(i))}function J(e,t){var n=i(t,!0);n&&e.push({priority:0,compile:function(e){var t=e.parent(),i=!!t.length;return i&&L.$$addBindingClass(t),function(e,t){var r=t.parent();i||L.$$addBindingClass(r),L.$$addBindingInfo(r,n.expressions),e.$watch(n,function(e){t[0].nodeValue=e})}}})}function Z(e,n){switch(e=bi(e||"html")){case"svg":case"math":var i=t.createElement("div");return i.innerHTML="<"+e+">"+n+"</"+e+">",i.childNodes[0].childNodes;default:return n}}function ee(e,t){if("srcdoc"==t)return M.HTML;var n=I(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?M.RESOURCE_URL:void 0}function te(e,t,n,r,o){var a=ee(e,r);o=y[r]||o;var s=i(n,!0,a,o);if(s){if("multiple"===r&&"select"===I(e))throw Dr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Q(e));t.push({priority:100,compile:function(){return{pre:function(e,t,l){var u=l.$$observers||(l.$$observers=ge());if(k.test(r))throw Dr("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=l[r];c!==n&&(s=c&&i(c,!0,a,o),n=c),s&&(l[r]=s(e),(u[r]||(u[r]=[])).$$inter=!0,(l.$$observers&&l.$$observers[r].$$scope||e).$watch(s,function(e,t){"class"===r&&e!=t?l.$updateClass(e,t):l.$set(r,e)}))}}}})}}function ne(e,n,i){var r,o,a=n[0],s=n.length,l=a.parentNode;if(e)for(r=0,o=e.length;o>r;r++)if(e[r]==a){e[r++]=i;for(var u=r,c=u+s-1,d=e.length;d>u;u++,c++)d>c?e[u]=e[c]:delete e[u];e.length-=s-1,e.context===a&&(e.context=i);break}l&&l.replaceChild(i,a);var h=t.createDocumentFragment();h.appendChild(a),Ai.hasData(a)&&(Ai(i).data(Ai(a).data()),Mi?(Pi=!0,Mi.cleanData([a])):delete Ai.cache[a[Ai.expando]]);for(var p=1,f=n.length;f>p;p++){var m=n[p];Ai(m).remove(),h.appendChild(m),delete n[p]}n[0]=i,n.length=1}function ie(e,t){return d(function(){return e.apply(null,arguments)},e,t)}function re(e,t,n,i,o,a){try{e(t,n,i,o,a)}catch(s){r(s,Q(n))}}function oe(e,t,n,r,a,l){var u;o(r,function(r,o){var l,c,d,h,p=r.attrName,f=r.optional,g=r.mode;switch(g){case"@":f||xi.call(t,p)||(n[o]=t[p]=void 0),t.$observe(p,function(e){$(e)&&(n[o]=e)}),t.$$observers[p].$$scope=e,$(t[p])&&(n[o]=i(t[p])(e));break;case"=":if(!xi.call(t,p)){if(f)break;t[p]=void 0}if(f&&!t[p])break;c=s(t[p]),h=c.literal?H:function(e,t){return e===t||e!==e&&t!==t},d=c.assign||function(){throw l=n[o]=c(e),Dr("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",t[p],a.name)},l=n[o]=c(e);var v=function(t){return h(t,n[o])||(h(t,l)?d(e,t=n[o]):n[o]=t),l=t};v.$stateful=!0;var y;y=r.collection?e.$watchCollection(t[p],v):e.$watch(s(t[p],v),null,c.literal),u=u||[],u.push(y);break;case"&":if(c=t.hasOwnProperty(p)?s(t[p]):m,c===m&&f)break;n[o]=function(t){return c(e,t)}}});var c=u?function(){for(var e=0,t=u.length;t>e;++e)u[e]()}:m;return l&&c!==m?(l.$on("$destroy",c),m):c}var ae=function(e,t){if(t){var n,i,r,o=Object.keys(t);for(n=0,i=o.length;i>n;n++)r=o[n],this[r]=t[r]}else this.$attr={};this.$$element=e};ae.prototype={$normalize:ut,$addClass:function(e){e&&e.length>0&&T.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&T.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=ct(e,t);n&&n.length&&T.addClass(this.$$element,n);var i=ct(t,e);i&&i.length&&T.removeClass(this.$$element,i)},$set:function(e,t,n,i){var a,s=this.$$element[0],l=qe(s,e),u=We(e),c=e;if(l?(this.$$element.prop(e,t),i=l):u&&(this[u]=t,c=u),this[e]=t,i?this.$attr[e]=i:(i=this.$attr[e],i||(this.$attr[e]=i=ue(e,"-"))),a=I(this.$$element),"a"===a&&"href"===e||"img"===a&&"src"===e)this[e]=t=D(t,"src"===e);else if("img"===a&&"srcset"===e){for(var d="",h=ji(t),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,f=/\s/.test(h)?p:/(,)/,m=h.split(f),g=Math.floor(m.length/2),v=0;g>v;v++){var y=2*v;d+=D(ji(m[y]),!0),d+=" "+ji(m[y+1])}var b=ji(m[2*v]).split(/\s/);d+=D(ji(b[0]),!0),2===b.length&&(d+=" "+ji(b[1])),this[e]=t=d}n!==!1&&(null===t||_(t)?this.$$element.removeAttr(i):this.$$element.attr(i,t));var x=this.$$observers;x&&o(x[c],function(e){try{e(t)}catch(n){r(n)}})},$observe:function(e,t){var n=this,i=n.$$observers||(n.$$observers=ge()),r=i[e]||(i[e]=[]);return r.push(t),v.$evalAsync(function(){r.$$inter||!n.hasOwnProperty(e)||_(n[e])||t(n[e])}),function(){Y(r,t)}}};var se=i.startSymbol(),le=i.endSymbol(),ce="{{"==se||"}}"==le?g:function(e){return e.replace(/\{\{/g,se).replace(/}}/g,le)},he=/^ngAttr[A-Z]/;return L.$$addBindingInfo=C?function(e,t){var n=e.data("$binding")||[];Ii(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:m,L.$$addBindingClass=C?function(e){E(e,"ng-binding")}:m,L.$$addScopeInfo=C?function(e,t,n,i){var r=n?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(r,t)}:m,L.$$addScopeClass=C?function(e,t){E(e,t?"ng-isolate-scope":"ng-scope")}:m,L}]}function ut(e){return we(e.replace(Er,""))}function ct(e,t){var n="",i=e.split(/\s+/),r=t.split(/\s+/);e:for(var o=0;o<i.length;o++){for(var a=i[o],s=0;s<r.length;s++)if(a==r[s])continue e;n+=(n.length>0?" ":"")+a}return n}function dt(e){e=Ai(e);var t=e.length;if(1>=t)return e;for(;t--;){var n=e[t];n.nodeType===Ki&&Di.call(e,t,1)}return e}function ht(e,t){if(t&&$(t))return t;if($(e)){var n=Fr.exec(e);if(n)return n[3]}}function pt(){var e={},t=!1;this.register=function(t,n){pe(t,"controller"),x(t)?d(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(r,o){function a(e,t,n,r){if(!e||!x(e.$scope))throw i("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",r,t);e.$scope[t]=n}return function(i,s,l,u){var c,h,p,f;if(l=l===!0,u&&$(u)&&(f=u),$(i)){if(h=i.match(Fr),!h)throw Lr("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",i);
|
36
|
+
p=h[1],f=f||h[3],i=e.hasOwnProperty(p)?e[p]:fe(s.$scope,p,!0)||(t?fe(o,p,!0):n),he(i,p,!0)}if(l){var m=(Ii(i)?i[i.length-1]:i).prototype;c=Object.create(m||null),f&&a(s,f,c,p||i.name);var g;return g=d(function(){var e=r.invoke(i,c,s,p);return e!==c&&(x(e)||A(e))&&(c=e,f&&a(s,f,c,p||i.name)),c},{instance:c,identifier:f})}return c=r.instantiate(i,s,p),f&&a(s,f,c,p||i.name),c}}]}function ft(){this.$get=["$window",function(e){return Ai(e.document)}]}function mt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function gt(e){return x(e)?C(e)?e.toISOString():V(e):e}function vt(){this.$get=function(){return function(e){if(!e)return"";var t=[];return a(e,function(e,n){null===e||_(e)||(Ii(e)?o(e,function(e,i){t.push(ie(n)+"="+ie(gt(e)))}):t.push(ie(n)+"="+ie(gt(e))))}),t.join("&")}}}function yt(){this.$get=function(){return function(e){function t(e,i,r){null===e||_(e)||(Ii(e)?o(e,function(e,n){t(e,i+"["+(x(e)?n:"")+"]")}):x(e)&&!C(e)?a(e,function(e,n){t(e,i+(r?"":"[")+n+(r?"":"]"))}):n.push(ie(i)+"="+ie(gt(e))))}if(!e)return"";var n=[];return t(e,"",!0),n.join("&")}}}function _t(e,t){if($(e)){var n=e.replace(Yr,"").trim();if(n){var i=t("Content-Type");(i&&0===i.indexOf(Rr)||bt(n))&&(e=X(n))}}return e}function bt(e){var t=e.match(Pr);return t&&Ir[t[0]].test(e)}function xt(e){function t(e,t){e&&(i[e]=i[e]?i[e]+", "+t:t)}var n,i=ge();return $(e)?o(e.split("\n"),function(e){n=e.indexOf(":"),t(bi(ji(e.substr(0,n))),ji(e.substr(n+1)))}):x(e)&&o(e,function(e,n){t(bi(n),ji(e))}),i}function wt(e){var t;return function(n){if(t||(t=xt(e)),n){var i=t[bi(n)];return void 0===i&&(i=null),i}return t}}function $t(e,t,n,i){return A(i)?i(e,t,n):(o(i,function(i){e=i(e,t,n)}),e)}function kt(e){return e>=200&&300>e}function Ct(){var e=this.defaults={transformResponse:[_t],transformRequest:[function(e){return!x(e)||D(e)||L(e)||E(e)?e:V(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:N(Br),put:N(Br),patch:N(Br)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},t=!1;this.useApplyAsync=function(e){return b(e)?(t=!!e,this):t};var r=!0;this.useLegacyPromiseExtensions=function(e){return b(e)?(r=!!e,this):r};var a=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(s,l,u,c,h,p){function f(t){function a(e){var t=d({},e);return e.data?t.data=$t(e.data,e.headers,e.status,u.transformResponse):t.data=e.data,kt(e.status)?t:h.reject(t)}function s(e,t){var n,i={};return o(e,function(e,r){A(e)?(n=e(t),null!=n&&(i[r]=n)):i[r]=e}),i}function l(t){var n,i,r,o=e.headers,a=d({},t.headers);o=d({},o.common,o[bi(t.method)]);e:for(n in o){i=bi(n);for(r in a)if(bi(r)===i)continue e;a[n]=o[n]}return s(a,N(t))}if(!Ri.isObject(t))throw i("$http")("badreq","Http request configuration must be an object. Received: {0}",t);var u=d({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer},t);u.headers=l(t),u.method=wi(u.method),u.paramSerializer=$(u.paramSerializer)?p.get(u.paramSerializer):u.paramSerializer;var c=function(t){var i=t.headers,r=$t(t.data,wt(i),n,t.transformRequest);return _(r)&&o(i,function(e,t){"content-type"===bi(t)&&delete i[t]}),_(t.withCredentials)&&!_(e.withCredentials)&&(t.withCredentials=e.withCredentials),v(t,r).then(a,a)},f=[c,n],m=h.when(u);for(o(k,function(e){(e.request||e.requestError)&&f.unshift(e.request,e.requestError),(e.response||e.responseError)&&f.push(e.response,e.responseError)});f.length;){var g=f.shift(),y=f.shift();m=m.then(g,y)}return r?(m.success=function(e){return he(e,"fn"),m.then(function(t){e(t.data,t.status,t.headers,u)}),m},m.error=function(e){return he(e,"fn"),m.then(null,function(t){e(t.data,t.status,t.headers,u)}),m}):(m.success=Nr("success"),m.error=Nr("error")),m}function m(e){o(arguments,function(e){f[e]=function(t,n){return f(d({},n||{},{method:e,url:t}))}})}function g(e){o(arguments,function(e){f[e]=function(t,n,i){return f(d({},i||{},{method:e,url:t,data:n}))}})}function v(i,r){function o(e,n,i,r){function o(){a(n,e,i,r)}p&&(kt(e)?p.put(k,[e,n,xt(i),r]):p.remove(k)),t?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function a(e,t,n,r){t=t>=-1?t:0,(kt(t)?g.resolve:g.reject)({data:e,status:t,headers:wt(n),config:i,statusText:r})}function u(e){a(e.data,e.status,N(e.headers()),e.statusText)}function d(){var e=f.pendingRequests.indexOf(i);-1!==e&&f.pendingRequests.splice(e,1)}var p,m,g=h.defer(),v=g.promise,$=i.headers,k=y(i.url,i.paramSerializer(i.params));if(f.pendingRequests.push(i),v.then(d,d),!i.cache&&!e.cache||i.cache===!1||"GET"!==i.method&&"JSONP"!==i.method||(p=x(i.cache)?i.cache:x(e.cache)?e.cache:w),p&&(m=p.get(k),b(m)?O(m)?m.then(u,u):Ii(m)?a(m[1],m[0],N(m[2]),m[3]):a(m,200,{},"OK"):p.put(k,v)),_(m)){var C=Mn(i.url)?l()[i.xsrfCookieName||e.xsrfCookieName]:n;C&&($[i.xsrfHeaderName||e.xsrfHeaderName]=C),s(i.method,k,r,o,$,i.timeout,i.withCredentials,i.responseType)}return v}function y(e,t){return t.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+t),e}var w=u("$http");e.paramSerializer=$(e.paramSerializer)?p.get(e.paramSerializer):e.paramSerializer;var k=[];return o(a,function(e){k.unshift($(e)?p.get(e):p.invoke(e))}),f.pendingRequests=[],m("get","delete","head","jsonp"),g("post","put","patch"),f.defaults=e,f}]}function At(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function Mt(){this.$get=["$browser","$window","$document","$xhrFactory",function(e,t,n,i){return Tt(e,i,e.defer,t.angular.callbacks,n[0])}]}function Tt(e,t,n,i,r){function a(e,t,n){var o=r.createElement("script"),a=null;return o.type="text/javascript",o.src=e,o.async=!0,a=function(e){ir(o,"load",a),ir(o,"error",a),r.body.removeChild(o),o=null;var s=-1,l="unknown";e&&("load"!==e.type||i[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},nr(o,"load",a),nr(o,"error",a),r.body.appendChild(o),a}return function(r,s,l,u,c,d,h,p){function f(){y&&y(),x&&x.abort()}function g(t,i,r,o,a){b(k)&&n.cancel(k),y=x=null,t(i,r,o,a),e.$$completeOutstandingRequest(m)}if(e.$$incOutstandingRequestCount(),s=s||e.url(),"jsonp"==bi(r)){var v="_"+(i.counter++).toString(36);i[v]=function(e){i[v].data=e,i[v].called=!0};var y=a(s.replace("JSON_CALLBACK","angular.callbacks."+v),v,function(e,t){g(u,e,i[v].data,"",t),i[v]=m})}else{var x=t(r,s);x.open(r,s,!0),o(c,function(e,t){b(e)&&x.setRequestHeader(t,e)}),x.onload=function(){var e=x.statusText||"",t="response"in x?x.response:x.responseText,n=1223===x.status?204:x.status;0===n&&(n=t?200:"file"==An(s).protocol?404:0),g(u,n,t,x.getAllResponseHeaders(),e)};var w=function(){g(u,-1,null,null,"")};if(x.onerror=w,x.onabort=w,h&&(x.withCredentials=!0),p)try{x.responseType=p}catch($){if("json"!==p)throw $}x.send(_(l)?null:l)}if(d>0)var k=n(f,d);else O(d)&&d.then(f)}}function St(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,i,r){function o(e){return"\\\\\\"+e}function a(n){return n.replace(h,e).replace(p,t)}function s(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=V(e)}return e}function l(o,l,h,p){function f(e){try{return e=T(e),p&&!b(e)?e:s(e)}catch(t){i(Hr.interr(o,t))}}p=!!p;for(var m,g,v,y=0,x=[],w=[],$=o.length,k=[],C=[];$>y;){if(-1==(m=o.indexOf(e,y))||-1==(g=o.indexOf(t,m+u))){y!==$&&k.push(a(o.substring(y)));break}y!==m&&k.push(a(o.substring(y,m))),v=o.substring(m+u,g),x.push(v),w.push(n(v,f)),y=g+c,C.push(k.length),k.push("")}if(h&&k.length>1&&Hr.throwNoconcat(o),!l||x.length){var M=function(e){for(var t=0,n=x.length;n>t;t++){if(p&&_(e[t]))return;k[C[t]]=e[t]}return k.join("")},T=function(e){return h?r.getTrusted(h,e):r.valueOf(e)};return d(function(e){var t=0,n=x.length,r=new Array(n);try{for(;n>t;t++)r[t]=w[t](e);return M(r)}catch(a){i(Hr.interr(o,a))}},{exp:o,expressions:x,$$watchDelegate:function(e,t){var n;return e.$watchGroup(w,function(i,r){var o=M(i);A(t)&&t.call(this,o,i!==r?n:o,e),n=o})}})}}var u=e.length,c=t.length,h=new RegExp(e.replace(/./g,o),"g"),p=new RegExp(t.replace(/./g,o),"g");return l.startSymbol=function(){return e},l.endSymbol=function(){return t},l}]}function Dt(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,i){function r(r,a,s,l){var u=arguments.length>4,c=u?q(arguments,4):[],d=t.setInterval,h=t.clearInterval,p=0,f=b(l)&&!l,m=(f?i:n).defer(),g=m.promise;return s=b(s)?s:0,g.then(null,null,u?function(){r.apply(null,c)}:r),g.$$intervalId=d(function(){m.notify(p++),s>0&&p>=s&&(m.resolve(p),h(g.$$intervalId),delete o[g.$$intervalId]),f||e.$apply()},a),o[g.$$intervalId]=m,g}var o={};return r.cancel=function(e){return e&&e.$$intervalId in o?(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0):!1},r}]}function Et(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=ne(t[n]);return t.join("/")}function Lt(e,t){var n=An(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=p(n.port)||qr[n.protocol]||null}function Ft(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var i=An(e);t.$$path=decodeURIComponent(n&&"/"===i.pathname.charAt(0)?i.pathname.substring(1):i.pathname),t.$$search=ee(i.search),t.$$hash=decodeURIComponent(i.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Ot(e,t){return 0===t.indexOf(e)?t.substr(e.length):void 0}function Rt(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function Bt(e){return e.replace(/(#.+)|#$/,"$1")}function Pt(e){return e.substr(0,Rt(e).lastIndexOf("/")+1)}function It(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Yt(e,t,n){this.$$html5=!0,n=n||"",Lt(e,this),this.$$parse=function(e){var n=Ot(t,e);if(!$(n))throw Wr("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,t);Ft(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=te(this.$$search),n=this.$$hash?"#"+ne(this.$$hash):"";this.$$url=Et(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=t+this.$$url.substr(1)},this.$$parseLinkUrl=function(i,r){if(r&&"#"===r[0])return this.hash(r.slice(1)),!0;var o,a,s;return b(o=Ot(e,i))?(a=o,s=b(o=Ot(n,o))?t+(Ot("/",o)||o):e+a):b(o=Ot(t,i))?s=t+o:t==i+"/"&&(s=t),s&&this.$$parse(s),!!s}}function jt(e,t,n){Lt(e,this),this.$$parse=function(i){function r(e,t,n){var i,r=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),r.exec(t)?e:(i=r.exec(e),i?i[1]:e)}var o,a=Ot(e,i)||Ot(t,i);_(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",_(a)&&(e=i,this.replace())):(o=Ot(n,a),_(o)&&(o=a)),Ft(o,this),this.$$path=r(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var t=te(this.$$search),i=this.$$hash?"#"+ne(this.$$hash):"";this.$$url=Et(this.$$path)+(t?"?"+t:"")+i,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return Rt(e)==Rt(t)?(this.$$parse(t),!0):!1}}function Nt(e,t,n){this.$$html5=!0,jt.apply(this,arguments),this.$$parseLinkUrl=function(i,r){if(r&&"#"===r[0])return this.hash(r.slice(1)),!0;var o,a;return e==Rt(i)?o=i:(a=Ot(t,i))?o=e+n+a:t===i+"/"&&(o=t),o&&this.$$parse(o),!!o},this.$$compose=function(){var t=te(this.$$search),i=this.$$hash?"#"+ne(this.$$hash):"";this.$$url=Et(this.$$path)+(t?"?"+t:"")+i,this.$$absUrl=e+n+this.$$url}}function Ht(e){return function(){return this[e]}}function zt(e,t){return function(n){return _(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function qt(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return b(t)?(e=t,this):e},this.html5Mode=function(e){return F(e)?(t.enabled=e,this):x(e)?(F(e.enabled)&&(t.enabled=e.enabled),F(e.requireBase)&&(t.requireBase=e.requireBase),F(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,i,r,o,a){function s(e,t,n){var r=u.url(),o=u.$$state;try{i.url(e,t,n),u.$$state=i.state()}catch(a){throw u.url(r),u.$$state=o,a}}function l(e,t){n.$broadcast("$locationChangeSuccess",u.absUrl(),e,u.$$state,t)}var u,c,d,h=i.baseHref(),p=i.url();if(t.enabled){if(!h&&t.requireBase)throw Wr("nobase","$location in HTML5 mode requires a <base> tag to be present!");d=It(p)+(h||"/"),c=r.history?Yt:Nt}else d=Rt(p),c=jt;var f=Pt(d);u=new c(d,f,"#"+e),u.$$parseLinkUrl(p,p),u.$$state=i.state();var m=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var r=Ai(e.target);"a"!==I(r[0]);)if(r[0]===o[0]||!(r=r.parent())[0])return;var s=r.prop("href"),l=r.attr("href")||r.attr("xlink:href");x(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=An(s.animVal).href),m.test(s)||!s||r.attr("target")||e.isDefaultPrevented()||u.$$parseLinkUrl(s,l)&&(e.preventDefault(),u.absUrl()!=i.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),Bt(u.absUrl())!=Bt(p)&&i.url(u.absUrl(),!0);var g=!0;return i.onUrlChange(function(e,t){return _(Ot(f,e))?void(a.location.href=e):(n.$evalAsync(function(){var i,r=u.absUrl(),o=u.$$state;u.$$parse(e),u.$$state=t,i=n.$broadcast("$locationChangeStart",e,r,t,o).defaultPrevented,u.absUrl()===e&&(i?(u.$$parse(r),u.$$state=o,s(r,!1,o)):(g=!1,l(r,o)))}),void(n.$$phase||n.$digest()))}),n.$watch(function(){var e=Bt(i.url()),t=Bt(u.absUrl()),o=i.state(),a=u.$$replace,c=e!==t||u.$$html5&&r.history&&o!==u.$$state;(g||c)&&(g=!1,n.$evalAsync(function(){var t=u.absUrl(),i=n.$broadcast("$locationChangeStart",t,e,u.$$state,o).defaultPrevented;u.absUrl()===t&&(i?(u.$$parse(e),u.$$state=o):(c&&s(t,a,o===u.$$state?null:u.$$state),l(e,o)))})),u.$$replace=!1}),u}]}function Wt(){var e=!0,t=this;this.debugEnabled=function(t){return b(t)?(e=t,this):e},this.$get=["$window",function(n){function i(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function r(e){var t=n.console||{},r=t[e]||t.log||m,a=!1;try{a=!!r.apply}catch(s){}return a?function(){var e=[];return o(arguments,function(t){e.push(i(t))}),r.apply(t,e)}:function(e,t){r(e,null==t?"":t)}}return{log:r("log"),info:r("info"),warn:r("warn"),error:r("error"),debug:function(){var n=r("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function Ut(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw Vr("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function Vt(e,t){if(e+="",!$(e))throw Vr("iseccst","Cannot convert object to primitive value! Expression: {0}",t);return e}function Xt(e,t){if(e){if(e.constructor===e)throw Vr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw Vr("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw Vr("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw Vr("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function Gt(e,t){if(e){if(e.constructor===e)throw Vr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===Xr||e===Gr||e===Kr)throw Vr("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Kt(e,t){if(e&&(e===0..constructor||e===(!1).constructor||e==="".constructor||e==={}.constructor||e===[].constructor||e===Function.constructor))throw Vr("isecaf","Assigning to a constructor is disallowed! Expression: {0}",t)}function Jt(e,t){return"undefined"!=typeof e?e:t}function Qt(e,t){return"undefined"==typeof e?t:"undefined"==typeof t?e:e+t}function Zt(e,t){var n=e(t);return!n.$stateful}function en(e,t){var n,i;switch(e.type){case eo.Program:n=!0,o(e.body,function(e){en(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case eo.Literal:e.constant=!0,e.toWatch=[];break;case eo.UnaryExpression:en(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case eo.BinaryExpression:en(e.left,t),en(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case eo.LogicalExpression:en(e.left,t),en(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case eo.ConditionalExpression:en(e.test,t),en(e.alternate,t),en(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case eo.Identifier:e.constant=!1,e.toWatch=[e];break;case eo.MemberExpression:en(e.object,t),e.computed&&en(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case eo.CallExpression:n=e.filter?Zt(t,e.callee.name):!1,i=[],o(e.arguments,function(e){en(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=e.filter&&Zt(t,e.callee.name)?i:[e];break;case eo.AssignmentExpression:en(e.left,t),en(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case eo.ArrayExpression:n=!0,i=[],o(e.elements,function(e){en(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=i;break;case eo.ObjectExpression:n=!0,i=[],o(e.properties,function(e){en(e.value,t),n=n&&e.value.constant,e.value.constant||i.push.apply(i,e.value.toWatch)}),e.constant=n,e.toWatch=i;break;case eo.ThisExpression:e.constant=!1,e.toWatch=[]}}function tn(e){if(1==e.length){var t=e[0].expression,i=t.toWatch;return 1!==i.length?i:i[0]!==t?i:n}}function nn(e){return e.type===eo.Identifier||e.type===eo.MemberExpression}function rn(e){return 1===e.body.length&&nn(e.body[0].expression)?{type:eo.AssignmentExpression,left:e.body[0].expression,right:{type:eo.NGValueParameter},operator:"="}:void 0}function on(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===eo.Literal||e.body[0].expression.type===eo.ArrayExpression||e.body[0].expression.type===eo.ObjectExpression)}function an(e){return e.constant}function sn(e,t){this.astBuilder=e,this.$filter=t}function ln(e,t){this.astBuilder=e,this.$filter=t}function un(e){return"constructor"==e}function cn(e){return A(e.valueOf)?e.valueOf():no.call(e)}function dn(){var e=ge(),t=ge();this.$get=["$filter",function(i){function r(e,t){return null==e||null==t?e===t:"object"==typeof e&&(e=cn(e),"object"==typeof e)?!1:e===t||e!==e&&t!==t}function a(e,t,i,o,a){var s,l=o.inputs;if(1===l.length){var u=r;return l=l[0],e.$watch(function(e){var t=l(e);return r(t,u)||(s=o(e,n,n,[t]),u=t&&cn(t)),s},t,i,a)}for(var c=[],d=[],h=0,p=l.length;p>h;h++)c[h]=r,d[h]=null;return e.$watch(function(e){for(var t=!1,i=0,a=l.length;a>i;i++){var u=l[i](e);(t||(t=!r(u,c[i])))&&(d[i]=u,c[i]=u&&cn(u))}return t&&(s=o(e,n,n,d)),s},t,i,a)}function s(e,t,n,i){var r,o;return r=e.$watch(function(e){return i(e)},function(e,n,i){o=e,A(t)&&t.apply(this,arguments),b(e)&&i.$$postDigest(function(){b(o)&&r()})},n)}function l(e,t,n,i){function r(e){var t=!0;return o(e,function(e){b(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return i(e)},function(e,n,i){s=e,A(t)&&t.call(this,e,n,i),r(e)&&i.$$postDigest(function(){r(s)&&a()})},n)}function u(e,t,n,i){var r;return r=e.$watch(function(e){return i(e)},function(e,n,i){A(t)&&t.apply(this,arguments),r()},n)}function c(e,t){if(!t)return e;var n=e.$$watchDelegate,i=n!==l&&n!==s,r=i?function(n,i,r,o){var a=e(n,i,r,o);return t(a,n,i)}:function(n,i,r,o){var a=e(n,i,r,o),s=t(a,n,i);return b(a)?s:a};return e.$$watchDelegate&&e.$$watchDelegate!==a?r.$$watchDelegate=e.$$watchDelegate:t.$stateful||(r.$$watchDelegate=a,r.inputs=e.inputs?e.inputs:[e]),r}var d=Hi().noUnsafeEval,h={csp:d,expensiveChecks:!1},p={csp:d,expensiveChecks:!0};return function(n,r,o){var d,f,g;switch(typeof n){case"string":n=n.trim(),g=n;var v=o?t:e;if(d=v[g],!d){":"===n.charAt(0)&&":"===n.charAt(1)&&(f=!0,n=n.substring(2));var y=o?p:h,_=new Zr(y),b=new to(_,i,y);d=b.parse(n),d.constant?d.$$watchDelegate=u:f?d.$$watchDelegate=d.literal?l:s:d.inputs&&(d.$$watchDelegate=a),v[g]=d}return c(d,r);case"function":return c(n,r);default:return m}}}]}function hn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return fn(function(t){e.$evalAsync(t)},t)}]}function pn(){this.$get=["$browser","$exceptionHandler",function(e,t){return fn(function(t){e.defer(t)},t)}]}function fn(e,t){function r(e,t,n){function i(t){return function(n){r||(r=!0,t.call(e,n))}}var r=!1;return[i(t),i(n)]}function a(){this.$$state={status:0}}function s(e,t){return function(n){t.call(e,n)}}function l(e){var i,r,o;o=e.pending,e.processScheduled=!1,e.pending=n;for(var a=0,s=o.length;s>a;++a){r=o[a][0],i=o[a][e.status];try{A(i)?r.resolve(i(e.value)):1===e.status?r.resolve(e.value):r.reject(e.value)}catch(l){r.reject(l),t(l)}}}function u(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){l(t)}))}function c(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function h(e){var t=new c,n=0,i=Ii(e)?[]:{};return o(e,function(e,r){n++,y(e).then(function(e){i.hasOwnProperty(r)||(i[r]=e,--n||t.resolve(i))},function(e){i.hasOwnProperty(r)||t.reject(e)})}),0===n&&t.resolve(i),t.promise}var p=i("$q",TypeError),f=function(){return new c};d(a.prototype,{then:function(e,t,n){if(_(e)&&_(t)&&_(n))return this;var i=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([i,e,t,n]),this.$$state.status>0&&u(this.$$state),i.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return v(t,!0,e)},function(t){return v(t,!1,e)},t)}}),d(c.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(p("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var n,i;i=r(this,this.$$resolve,this.$$reject);try{(x(e)||A(e))&&(n=e&&e.then),A(n)?(this.promise.$$state.status=-1,n.call(e,i[0],i[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,u(this.promise.$$state))}catch(o){i[1](o),t(o)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,u(this.promise.$$state)},notify:function(n){var i=this.promise.$$state.pending;this.promise.$$state.status<=0&&i&&i.length&&e(function(){for(var e,r,o=0,a=i.length;a>o;o++){r=i[o][0],e=i[o][3];try{r.notify(A(e)?e(n):n)}catch(s){t(s)}}})}});var m=function(e){var t=new c;return t.reject(e),t.promise},g=function(e,t){var n=new c;return t?n.resolve(e):n.reject(e),n.promise},v=function(e,t,n){var i=null;try{A(n)&&(i=n())}catch(r){return g(r,!1)}return O(i)?i.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},y=function(e,t,n,i){var r=new c;return r.resolve(e),r.promise.then(t,n,i)},b=y,w=function $(e){function t(e){i.resolve(e)}function n(e){i.reject(e)}if(!A(e))throw p("norslvr","Expected resolverFn, got '{0}'",e);if(!(this instanceof $))return new $(e);var i=new c;return e(t,n),i.promise};return w.defer=f,w.reject=m,w.when=y,w.resolve=b,w.all=h,w}function mn(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame,i=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,r=!!n,o=r?function(e){var t=n(e);return function(){i(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=r,o}]}function gn(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=l(),this.$$ChildScope=null}return t.prototype=e,t}var t=10,n=i("$rootScope"),a=null,s=null;this.digestTtl=function(e){return arguments.length&&(t=e),t},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(i,u,c,d){function h(e){e.currentScope.$$destroyed=!0}function p(){this.$id=l(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function f(e){if(k.$$phase)throw n("inprog","{0} already in progress",k.$$phase);k.$$phase=e}function g(){k.$$phase=null}function v(e,t){do e.$$watchersCount+=t;while(e=e.$parent)}function y(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function b(){}function w(){for(;T.length;)try{T.shift()()}catch(e){u(e)}s=null}function $(){null===s&&(s=d.defer(function(){k.$apply(w)}))}p.prototype={constructor:p,$new:function(t,n){var i;return n=n||this,t?(i=new p,i.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),i=new this.$$ChildScope),i.$parent=n,i.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=i,n.$$childTail=i):n.$$childHead=n.$$childTail=i,(t||n!=this)&&i.$on("$destroy",h),i},$watch:function(e,t,n,i){var r=c(e);if(r.$$watchDelegate)return r.$$watchDelegate(this,t,n,r,e);var o=this,s=o.$$watchers,l={fn:t,last:b,get:r,exp:i||e,eq:!!n};return a=null,A(t)||(l.fn=m),s||(s=o.$$watchers=[]),s.unshift(l),v(this,1),function(){Y(s,l)>=0&&v(o,-1),a=null}},$watchGroup:function(e,t){function n(){l=!1,u?(u=!1,t(r,r,s)):t(r,i,s)}var i=new Array(e.length),r=new Array(e.length),a=[],s=this,l=!1,u=!0;if(!e.length){var c=!0;return s.$evalAsync(function(){c&&t(r,r,s)}),function(){c=!1}}return 1===e.length?this.$watch(e[0],function(e,n,o){r[0]=e,i[0]=n,t(r,e===n?r:i,o)}):(o(e,function(e,t){var o=s.$watch(e,function(e,o){r[t]=e,i[t]=o,l||(l=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function n(e){o=e;var t,n,i,s,l;if(!_(o)){if(x(o))if(r(o)){a!==p&&(a=p,g=a.length=0,d++),t=o.length,g!==t&&(d++,a.length=g=t);for(var u=0;t>u;u++)l=a[u],s=o[u],i=l!==l&&s!==s,i||l===s||(d++,a[u]=s)}else{a!==f&&(a=f={},g=0,d++),t=0;for(n in o)xi.call(o,n)&&(t++,s=o[n],l=a[n],n in a?(i=l!==l&&s!==s,i||l===s||(d++,a[n]=s)):(g++,a[n]=s,d++));if(g>t){d++;for(n in a)xi.call(o,n)||(g--,delete a[n])}}else a!==o&&(a=o,d++);return d}}function i(){if(m?(m=!1,t(o,o,l)):t(o,s,l),u)if(x(o))if(r(o)){s=new Array(o.length);for(var e=0;e<o.length;e++)s[e]=o[e]}else{s={};for(var n in o)xi.call(o,n)&&(s[n]=o[n])}else s=o}n.$stateful=!0;var o,a,s,l=this,u=t.length>1,d=0,h=c(e,n),p=[],f={},m=!0,g=0;return this.$watch(h,i)},$digest:function(){var e,i,r,o,l,c,h,p,m,v,y=t,_=this,x=[];f("$digest"),d.$$checkUrlChange(),this===k&&null!==s&&(d.defer.cancel(s),w()),a=null;do{for(c=!1,p=_;C.length;){try{v=C.shift(),v.scope.$eval(v.expression,v.locals)}catch($){u($)}a=null}e:do{if(o=p.$$watchers)for(l=o.length;l--;)try{if(e=o[l])if((i=e.get(p))===(r=e.last)||(e.eq?H(i,r):"number"==typeof i&&"number"==typeof r&&isNaN(i)&&isNaN(r))){if(e===a){c=!1;break e}}else c=!0,a=e,e.last=e.eq?j(i,null):i,e.fn(i,r===b?i:r,p),5>y&&(m=4-y,x[m]||(x[m]=[]),x[m].push({msg:A(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:i,oldVal:r}))}catch($){u($)}if(!(h=p.$$watchersCount&&p.$$childHead||p!==_&&p.$$nextSibling))for(;p!==_&&!(h=p.$$nextSibling);)p=p.$parent}while(p=h);if((c||C.length)&&!y--)throw g(),n("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",t,x)}while(c||C.length);for(g();M.length;)try{M.shift()()}catch($){u($)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===k&&d.$$applicationDestroyed(),v(this,-this.$$watchersCount);for(var t in this.$$listenerCount)y(this,this.$$listenerCount[t],t);e&&e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=m,this.$on=this.$watch=this.$watchGroup=function(){return m},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}},$eval:function(e,t){return c(e)(this,t)},$evalAsync:function(e,t){k.$$phase||C.length||d.defer(function(){C.length&&k.$digest()}),C.push({scope:this,expression:e,locals:t})},$$postDigest:function(e){M.push(e)},$apply:function(e){try{f("$apply");try{return this.$eval(e)}finally{g()}}catch(t){u(t)}finally{try{k.$digest()}catch(t){throw u(t),t}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&T.push(t),$()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var i=this;do i.$$listenerCount[e]||(i.$$listenerCount[e]=0),i.$$listenerCount[e]++;while(i=i.$parent);var r=this;return function(){var i=n.indexOf(t);-1!==i&&(n[i]=null,y(r,1,e))}},$emit:function(e,t){var n,i,r,o=[],a=this,s=!1,l={name:e,targetScope:a,stopPropagation:function(){s=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=z([l],arguments,1);do{for(n=a.$$listeners[e]||o,l.currentScope=a,i=0,r=n.length;r>i;i++)if(n[i])try{n[i].apply(null,c)}catch(d){u(d)}else n.splice(i,1),i--,r--;if(s)return l.currentScope=null,l;a=a.$parent}while(a);return l.currentScope=null,l},$broadcast:function(e,t){var n=this,i=n,r=n,o={name:e,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[e])return o;for(var a,s,l,c=z([o],arguments,1);i=r;){for(o.currentScope=i,a=i.$$listeners[e]||[],s=0,l=a.length;l>s;s++)if(a[s])try{a[s].apply(null,c)}catch(d){u(d)}else a.splice(s,1),s--,l--;if(!(r=i.$$listenerCount[e]&&i.$$childHead||i!==n&&i.$$nextSibling))for(;i!==n&&!(r=i.$$nextSibling);)i=i.$parent}return o.currentScope=null,o}};var k=new p,C=k.$$asyncQueue=[],M=k.$$postDigestQueue=[],T=k.$$applyAsyncQueue=[];return k}]}function vn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return b(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return b(e)?(t=e,this):t},this.$get=function(){return function(n,i){var r,o=i?t:e;return r=An(n).href,""===r||r.match(o)?n:"unsafe:"+r}}}function yn(e){if("self"===e)return e;if($(e)){if(e.indexOf("***")>-1)throw io("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Ni(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(M(e))return new RegExp("^"+e.source+"$");throw io("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function _n(e){var t=[];return b(e)&&o(e,function(e){t.push(yn(e))}),t}function bn(){this.SCE_CONTEXTS=ro;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=_n(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=_n(e)),t},this.$get=["$injector",function(n){function i(e,t){return"self"===e?Mn(t):!!e.exec(t.href)}function r(n){var r,o,a=An(n.toString()),s=!1;for(r=0,o=e.length;o>r;r++)if(i(e[r],a)){s=!0;break}if(s)for(r=0,o=t.length;o>r;r++)if(i(t[r],a)){s=!1;break}return s}function o(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function a(e,t){var n=d.hasOwnProperty(e)?d[e]:null;if(!n)throw io("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||_(t)||""===t)return t;if("string"!=typeof t)throw io("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new n(t)}function s(e){return e instanceof c?e.$$unwrapTrustedValue():e}function l(e,t){if(null===t||_(t)||""===t)return t;var n=d.hasOwnProperty(e)?d[e]:null;if(n&&t instanceof n)return t.$$unwrapTrustedValue();if(e===ro.RESOURCE_URL){if(r(t))return t;throw io("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===ro.HTML)return u(t);throw io("unsafe","Attempting to use an unsafe value in a safe context.")}var u=function(e){throw io("unsafe","Attempting to use an unsafe value in a safe context.")};n.has("$sanitize")&&(u=n.get("$sanitize"));var c=o(),d={};return d[ro.HTML]=o(c),d[ro.CSS]=o(c),d[ro.URL]=o(c),d[ro.JS]=o(c),d[ro.RESOURCE_URL]=o(d[ro.URL]),{trustAs:a,getTrusted:l,valueOf:s}}]}function xn(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){
|
37
|
+
if(e&&8>Ci)throw io("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var i=N(ro);i.isEnabled=function(){return e},i.trustAs=n.trustAs,i.getTrusted=n.getTrusted,i.valueOf=n.valueOf,e||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=g),i.parseAs=function(e,n){var r=t(n);return r.literal&&r.constant?r:t(n,function(t){return i.getTrusted(e,t)})};var r=i.parseAs,a=i.getTrusted,s=i.trustAs;return o(ro,function(e,t){var n=bi(t);i[we("parse_as_"+n)]=function(t){return r(e,t)},i[we("get_trusted_"+n)]=function(t){return a(e,t)},i[we("trust_as_"+n)]=function(t){return s(e,t)}}),i}]}function wn(){this.$get=["$window","$document",function(e,t){var n,i,r={},o=p((/android (\d+)/.exec(bi((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,u=s.body&&s.body.style,c=!1,d=!1;if(u){for(var h in u)if(i=l.exec(h)){n=i[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),c=!!("transition"in u||n+"Transition"in u),d=!!("animation"in u||n+"Animation"in u),!o||c&&d||(c=$(u.webkitTransition),d=$(u.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||4>o||a),hasEvent:function(e){if("input"===e&&11>=Ci)return!1;if(_(r[e])){var t=s.createElement("div");r[e]="on"+e in t}return r[e]},csp:Hi(),vendorPrefix:n,transitions:c,animations:d,android:o}}]}function $n(){this.$get=["$templateCache","$http","$q","$sce",function(e,t,n,i){function r(o,a){function s(e){if(!a)throw Dr("tpload","Failed to load template: {0} (HTTP status: {1} {2})",o,e.status,e.statusText);return n.reject(e)}r.totalPendingRequests++,$(o)&&e.get(o)||(o=i.getTrustedResourceUrl(o));var l=t.defaults&&t.defaults.transformResponse;Ii(l)?l=l.filter(function(e){return e!==_t}):l===_t&&(l=null);var u={cache:e,transformResponse:l};return t.get(o,u)["finally"](function(){r.totalPendingRequests--}).then(function(t){return e.put(o,t.data),t.data},s)}return r.totalPendingRequests=0,r}]}function kn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var i={};return i.findBindings=function(e,t,n){var i=e.getElementsByClassName("ng-binding"),r=[];return o(i,function(e){var i=Ri.element(e).data("$binding");i&&o(i,function(i){if(n){var o=new RegExp("(^|\\s)"+Ni(t)+"(\\s|\\||$)");o.test(i)&&r.push(e)}else-1!=i.indexOf(t)&&r.push(e)})}),r},i.findModels=function(e,t,n){for(var i=["ng-","data-ng-","ng\\:"],r=0;r<i.length;++r){var o=n?"=":"*=",a="["+i[r]+"model"+o+'"'+t+'"]',s=e.querySelectorAll(a);if(s.length)return s}},i.getLocation=function(){return n.url()},i.setLocation=function(t){t!==n.url()&&(n.url(t),e.$digest())},i.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},i}]}function Cn(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,i,r){function o(o,s,l){A(o)||(l=s,s=o,o=m);var u,c=q(arguments,3),d=b(l)&&!l,h=(d?i:n).defer(),p=h.promise;return u=t.defer(function(){try{h.resolve(o.apply(null,c))}catch(t){h.reject(t),r(t)}finally{delete a[p.$$timeoutId]}d||e.$apply()},s),p.$$timeoutId=u,a[u]=h,p}var a={};return o.cancel=function(e){return e&&e.$$timeoutId in a?(a[e.$$timeoutId].reject("canceled"),delete a[e.$$timeoutId],t.defer.cancel(e.$$timeoutId)):!1},o}]}function An(e){var t=e;return Ci&&(oo.setAttribute("href",t),t=oo.href),oo.setAttribute("href",t),{href:oo.href,protocol:oo.protocol?oo.protocol.replace(/:$/,""):"",host:oo.host,search:oo.search?oo.search.replace(/^\?/,""):"",hash:oo.hash?oo.hash.replace(/^#/,""):"",hostname:oo.hostname,port:oo.port,pathname:"/"===oo.pathname.charAt(0)?oo.pathname:"/"+oo.pathname}}function Mn(e){var t=$(e)?An(e):e;return t.protocol===ao.protocol&&t.host===ao.host}function Tn(){this.$get=v(e)}function Sn(e){function t(e){try{return decodeURIComponent(e)}catch(t){return e}}var n=e[0]||{},i={},r="";return function(){var e,o,a,s,l,u=n.cookie||"";if(u!==r)for(r=u,e=r.split("; "),i={},a=0;a<e.length;a++)o=e[a],s=o.indexOf("="),s>0&&(l=t(o.substring(0,s)),_(i[l])&&(i[l]=t(o.substring(s+1))));return i}}function Dn(){this.$get=Sn}function En(e){function t(i,r){if(x(i)){var a={};return o(i,function(e,n){a[n]=t(n,e)}),a}return e.factory(i+n,r)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",Bn),t("date",Gn),t("filter",Ln),t("json",Kn),t("limitTo",Jn),t("lowercase",ho),t("number",Pn),t("orderBy",Qn),t("uppercase",po)}function Ln(){return function(e,t,n){if(!r(e)){if(null==e)return e;throw i("filter")("notarray","Expected array but received: {0}",e)}var o,a,s=Rn(t);switch(s){case"function":o=t;break;case"boolean":case"null":case"number":case"string":a=!0;case"object":o=Fn(t,n,a);break;default:return e}return Array.prototype.filter.call(e,o)}}function Fn(e,t,n){var i,r=x(e)&&"$"in e;return t===!0?t=H:A(t)||(t=function(e,t){return _(e)?!1:null===e||null===t?e===t:x(t)||x(e)&&!y(e)?!1:(e=bi(""+e),t=bi(""+t),-1!==e.indexOf(t))}),i=function(i){return r&&!x(i)?On(i,e.$,t,!1):On(i,e,t,n)}}function On(e,t,n,i,r){var o=Rn(e),a=Rn(t);if("string"===a&&"!"===t.charAt(0))return!On(e,t.substring(1),n,i);if(Ii(e))return e.some(function(e){return On(e,t,n,i)});switch(o){case"object":var s;if(i){for(s in e)if("$"!==s.charAt(0)&&On(e[s],t,n,!0))return!0;return r?!1:On(e,t,n,!1)}if("object"===a){for(s in t){var l=t[s];if(!A(l)&&!_(l)){var u="$"===s,c=u?e:e[s];if(!On(c,l,n,u,u))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function Rn(e){return null===e?"null":typeof e}function Bn(e){var t=e.NUMBER_FORMATS;return function(e,n,i){return _(n)&&(n=t.CURRENCY_SYM),_(i)&&(i=t.PATTERNS[1].maxFrac),null==e?e:In(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,i).replace(/\u00A4/g,n)}}function Pn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:In(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function In(e,t,n,i,r){if(x(e))return"";var o=0>e;e=Math.abs(e);var a=e===1/0;if(!a&&!isFinite(e))return"";var s=e+"",l="",u=!1,c=[];if(a&&(l="\u221e"),!a&&-1!==s.indexOf("e")){var d=s.match(/([\d\.]+)e(-?)(\d+)/);d&&"-"==d[2]&&d[3]>r+1?e=0:(l=s,u=!0)}if(a||u)r>0&&1>e&&(l=e.toFixed(r),e=parseFloat(l),l=l.replace(so,i));else{var h=(s.split(so)[1]||"").length;_(r)&&(r=Math.min(Math.max(t.minFrac,h),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+r)).toString()+"e"+-r);var p=(""+e).split(so),f=p[0];p=p[1]||"";var m,g=0,v=t.lgSize,y=t.gSize;if(f.length>=v+y)for(g=f.length-v,m=0;g>m;m++)(g-m)%y===0&&0!==m&&(l+=n),l+=f.charAt(m);for(m=g;m<f.length;m++)(f.length-m)%v===0&&0!==m&&(l+=n),l+=f.charAt(m);for(;p.length<r;)p+="0";r&&"0"!==r&&(l+=i+p.substr(0,r))}return 0===e&&(o=!1),c.push(o?t.negPre:t.posPre,l,o?t.negSuf:t.posSuf),c.join("")}function Yn(e,t,n){var i="";for(0>e&&(i="-",e=-e),e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),i+e}function jn(e,t,n,i){return n=n||0,function(r){var o=r["get"+e]();return(n>0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),Yn(o,t,i)}}function Nn(e,t){return function(n,i){var r=n["get"+e](),o=wi(t?"SHORT"+e:e);return i[o][r]}}function Hn(e,t,n){var i=-1*n,r=i>=0?"+":"";return r+=Yn(Math[i>0?"floor":"ceil"](i/60),2)+Yn(Math.abs(i%60),2)}function zn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(4>=t?5:12)-t)}function qn(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function Wn(e){return function(t){var n=zn(t.getFullYear()),i=qn(t),r=+i-+n,o=1+Math.round(r/6048e5);return Yn(o,e)}}function Un(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function Vn(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function Xn(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function Gn(e){function t(e){var t;if(t=e.match(n)){var i=new Date(0),r=0,o=0,a=t[8]?i.setUTCFullYear:i.setFullYear,s=t[8]?i.setUTCHours:i.setHours;t[9]&&(r=p(t[9]+t[10]),o=p(t[9]+t[11])),a.call(i,p(t[1]),p(t[2])-1,p(t[3]));var l=p(t[4]||0)-r,u=p(t[5]||0)-o,c=p(t[6]||0),d=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(i,l,u,c,d),i}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i,r){var a,s,l="",u=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,$(n)&&(n=co.test(n)?p(n):t(n)),k(n)&&(n=new Date(n)),!C(n)||!isFinite(n.getTime()))return n;for(;i;)s=uo.exec(i),s?(u=z(u,s,1),i=u.pop()):(u.push(i),i=null);var c=n.getTimezoneOffset();return r&&(c=G(r,n.getTimezoneOffset()),n=J(n,r,!0)),o(u,function(t){a=lo[t],l+=a?a(n,e.DATETIME_FORMATS,c):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function Kn(){return function(e,t){return _(t)&&(t=2),V(e,t)}}function Jn(){return function(e,t,n){return t=Math.abs(Number(t))===1/0?Number(t):p(t),isNaN(t)?e:(k(e)&&(e=e.toString()),Ii(e)||$(e)?(n=!n||isNaN(n)?0:p(n),n=0>n&&n>=-e.length?e.length+n:n,t>=0?e.slice(n,n+t):0===n?e.slice(t,e.length):e.slice(Math.max(0,n+t),n)):e)}}function Qn(e){function t(t,n){return n=n?-1:1,t.map(function(t){var i=1,r=g;if(A(t))r=t;else if($(t)&&(("+"==t.charAt(0)||"-"==t.charAt(0))&&(i="-"==t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(r=e(t),r.constant))){var o=r();r=function(e){return e[o]}}return{get:r,descending:i*n}})}function n(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function i(e,t){return"function"==typeof e.valueOf&&(e=e.valueOf(),n(e))?e:y(e)&&(e=e.toString(),n(e))?e:t}function o(e,t){var n=typeof e;return null===e?(n="string",e="null"):"string"===n?e=e.toLowerCase():"object"===n&&(e=i(e,t)),{value:e,type:n}}function a(e,t){var n=0;return e.type===t.type?e.value!==t.value&&(n=e.value<t.value?-1:1):n=e.type<t.type?-1:1,n}return function(e,n,i){function s(e,t){return{value:e,predicateValues:u.map(function(n){return o(n.get(e),t)})}}function l(e,t){for(var n=0,i=0,r=u.length;r>i&&!(n=a(e.predicateValues[i],t.predicateValues[i])*u[i].descending);++i);return n}if(!r(e))return e;Ii(n)||(n=[n]),0===n.length&&(n=["+"]);var u=t(n,i);u.push({get:function(){return{}},descending:i?-1:1});var c=Array.prototype.map.call(e,s);return c.sort(l),e=c.map(function(e){return e.value})}}function Zn(e){return A(e)&&(e={link:e}),e.restrict=e.restrict||"AC",v(e)}function ei(e,t){e.$name=t}function ti(e,t,i,r,a){var s=this,l=[];s.$error={},s.$$success={},s.$pending=n,s.$name=a(t.name||t.ngForm||"")(i),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,s.$$parentForm=go,s.$rollbackViewValue=function(){o(l,function(e){e.$rollbackViewValue()})},s.$commitViewValue=function(){o(l,function(e){e.$commitViewValue()})},s.$addControl=function(e){pe(e.$name,"input"),l.push(e),e.$name&&(s[e.$name]=e),e.$$parentForm=s},s.$$renameControl=function(e,t){var n=e.$name;s[n]===e&&delete s[n],s[t]=e,e.$name=t},s.$removeControl=function(e){e.$name&&s[e.$name]===e&&delete s[e.$name],o(s.$pending,function(t,n){s.$setValidity(n,null,e)}),o(s.$error,function(t,n){s.$setValidity(n,null,e)}),o(s.$$success,function(t,n){s.$setValidity(n,null,e)}),Y(l,e),e.$$parentForm=go},gi({ctrl:this,$element:e,set:function(e,t,n){var i=e[t];if(i){var r=i.indexOf(n);-1===r&&i.push(n)}else e[t]=[n]},unset:function(e,t,n){var i=e[t];i&&(Y(i,n),0===i.length&&delete e[t])},$animate:r}),s.$setDirty=function(){r.removeClass(e,Qo),r.addClass(e,Zo),s.$dirty=!0,s.$pristine=!1,s.$$parentForm.$setDirty()},s.$setPristine=function(){r.setClass(e,Qo,Zo+" "+vo),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(l,function(e){e.$setPristine()})},s.$setUntouched=function(){o(l,function(e){e.$setUntouched()})},s.$setSubmitted=function(){r.addClass(e,vo),s.$submitted=!0,s.$$parentForm.$setSubmitted()}}function ni(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function ii(e,t,n,i,r,o){ri(e,t,n,i,r,o),ni(i)}function ri(e,t,n,i,r,o){var a=bi(t[0].type);if(!r.android){var s=!1;t.on("compositionstart",function(e){s=!0}),t.on("compositionend",function(){s=!1,l()})}var l=function(e){if(u&&(o.defer.cancel(u),u=null),!s){var r=t.val(),l=e&&e.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(r=ji(r)),(i.$viewValue!==r||""===r&&i.$$hasNativeValidators)&&i.$setViewValue(r,l)}};if(r.hasEvent("input"))t.on("input",l);else{var u,c=function(e,t,n){u||(u=o.defer(function(){u=null,t&&t.value===n||l(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||t>15&&19>t||t>=37&&40>=t||c(e,this,this.value)}),r.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",l),i.$render=function(){var e=i.$isEmpty(i.$viewValue)?"":i.$viewValue;t.val()!==e&&t.val(e)}}function oi(e,t){if(C(e))return e;if($(e)){Mo.lastIndex=0;var n=Mo.exec(e);if(n){var i=+n[1],r=+n[2],o=0,a=0,s=0,l=0,u=zn(i),c=7*(r-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(i,0,u.getDate()+c,o,a,s,l)}}return NaN}function ai(e,t){return function(n,i){var r,a;if(C(n))return n;if($(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),xo.test(n))return new Date(n);if(e.lastIndex=0,r=e.exec(n))return r.shift(),a=i?{yyyy:i.getFullYear(),MM:i.getMonth()+1,dd:i.getDate(),HH:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds(),sss:i.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(r,function(e,n){n<t.length&&(a[t[n]]=+e)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function si(e,t,i,r){return function(o,a,s,l,u,c,d){function h(e){return e&&!(e.getTime&&e.getTime()!==e.getTime())}function p(e){return b(e)&&!C(e)?i(e)||n:e}li(o,a,s,l),ri(o,a,s,l,u,c);var f,m=l&&l.$options&&l.$options.timezone;if(l.$$parserName=e,l.$parsers.push(function(e){if(l.$isEmpty(e))return null;if(t.test(e)){var r=i(e,f);return m&&(r=J(r,m)),r}return n}),l.$formatters.push(function(e){if(e&&!C(e))throw ia("datefmt","Expected `{0}` to be a date",e);return h(e)?(f=e,f&&m&&(f=J(f,m,!0)),d("date")(e,r,m)):(f=null,"")}),b(s.min)||s.ngMin){var g;l.$validators.min=function(e){return!h(e)||_(g)||i(e)>=g},s.$observe("min",function(e){g=p(e),l.$validate()})}if(b(s.max)||s.ngMax){var v;l.$validators.max=function(e){return!h(e)||_(v)||i(e)<=v},s.$observe("max",function(e){v=p(e),l.$validate()})}}}function li(e,t,i,r){var o=t[0],a=r.$$hasNativeValidators=x(o.validity);a&&r.$parsers.push(function(e){var i=t.prop(_i)||{};return i.badInput&&!i.typeMismatch?n:e})}function ui(e,t,i,r,o,a){if(li(e,t,i,r),ri(e,t,i,r,o,a),r.$$parserName="number",r.$parsers.push(function(e){return r.$isEmpty(e)?null:ko.test(e)?parseFloat(e):n}),r.$formatters.push(function(e){if(!r.$isEmpty(e)){if(!k(e))throw ia("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),b(i.min)||i.ngMin){var s;r.$validators.min=function(e){return r.$isEmpty(e)||_(s)||e>=s},i.$observe("min",function(e){b(e)&&!k(e)&&(e=parseFloat(e,10)),s=k(e)&&!isNaN(e)?e:n,r.$validate()})}if(b(i.max)||i.ngMax){var l;r.$validators.max=function(e){return r.$isEmpty(e)||_(l)||l>=e},i.$observe("max",function(e){b(e)&&!k(e)&&(e=parseFloat(e,10)),l=k(e)&&!isNaN(e)?e:n,r.$validate()})}}function ci(e,t,n,i,r,o){ri(e,t,n,i,r,o),ni(i),i.$$parserName="url",i.$validators.url=function(e,t){var n=e||t;return i.$isEmpty(n)||wo.test(n)}}function di(e,t,n,i,r,o){ri(e,t,n,i,r,o),ni(i),i.$$parserName="email",i.$validators.email=function(e,t){var n=e||t;return i.$isEmpty(n)||$o.test(n)}}function hi(e,t,n,i){_(n.name)&&t.attr("name",l());var r=function(e){t[0].checked&&i.$setViewValue(n.value,e&&e.type)};t.on("click",r),i.$render=function(){var e=n.value;t[0].checked=e==i.$viewValue},n.$observe("value",i.$render)}function pi(e,t,n,i,r){var o;if(b(i)){if(o=e(i),!o.constant)throw ia("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,i);return o(t)}return r}function fi(e,t,n,i,r,o,a,s){var l=pi(s,e,"ngTrueValue",n.ngTrueValue,!0),u=pi(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){i.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),i.$render=function(){t[0].checked=i.$viewValue},i.$isEmpty=function(e){return e===!1},i.$formatters.push(function(e){return H(e,l)}),i.$parsers.push(function(e){return e?l:u})}function mi(e,t){return e="ngClass"+e,["$animate",function(n){function i(e,t){var n=[];e:for(var i=0;i<e.length;i++){for(var r=e[i],o=0;o<t.length;o++)if(r==t[o])continue e;n.push(r)}return n}function r(e){var t=[];return Ii(e)?(o(e,function(e){t=t.concat(r(e))}),t):$(e)?e.split(" "):x(e)?(o(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t):e}return{restrict:"AC",link:function(a,s,l){function u(e){var t=d(e,1);l.$addClass(t)}function c(e){var t=d(e,-1);l.$removeClass(t)}function d(e,t){var n=s.data("$classCounts")||ge(),i=[];return o(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&i.push(e))}),s.data("$classCounts",n),i.join(" ")}function h(e,t){var r=i(t,e),o=i(e,t);r=d(r,1),o=d(o,-1),r&&r.length&&n.addClass(s,r),o&&o.length&&n.removeClass(s,o)}function p(e){if(t===!0||a.$index%2===t){var n=r(e||[]);if(f){if(!H(e,f)){var i=r(f);h(i,n)}}else u(n)}f=N(e)}var f;a.$watch(l[e],p,!0),l.$observe("class",function(t){p(a.$eval(l[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,i){var o=1&n;if(o!==(1&i)){var s=r(a.$eval(l[e]));o===t?u(s):c(s)}})}}}]}function gi(e){function t(e,t,l){_(t)?i("$pending",e,l):r("$pending",e,l),F(t)?t?(d(s.$error,e,l),c(s.$$success,e,l)):(c(s.$error,e,l),d(s.$$success,e,l)):(d(s.$error,e,l),d(s.$$success,e,l)),s.$pending?(o(na,!0),s.$valid=s.$invalid=n,a("",null)):(o(na,!1),s.$valid=vi(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var u;u=s.$pending&&s.$pending[e]?n:s.$error[e]?!1:s.$$success[e]?!0:null,a(e,u),s.$$parentForm.$setValidity(e,u,s)}function i(e,t,n){s[e]||(s[e]={}),c(s[e],t,n)}function r(e,t,i){s[e]&&d(s[e],t,i),vi(s[e])&&(s[e]=n)}function o(e,t){t&&!u[e]?(h.addClass(l,e),u[e]=!0):!t&&u[e]&&(h.removeClass(l,e),u[e]=!1)}function a(e,t){e=e?"-"+ue(e,"-"):"",o(Ko+e,t===!0),o(Jo+e,t===!1)}var s=e.ctrl,l=e.$element,u={},c=e.set,d=e.unset,h=e.$animate;u[Jo]=!(u[Ko]=l.hasClass(Ko)),s.$setValidity=t}function vi(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}var yi=/^\/(.+)\/([a-z]*)$/,_i="validity",bi=function(e){return $(e)?e.toLowerCase():e},xi=Object.prototype.hasOwnProperty,wi=function(e){return $(e)?e.toUpperCase():e},$i=function(e){return $(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},ki=function(e){return $(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(bi=$i,wi=ki);var Ci,Ai,Mi,Ti,Si=[].slice,Di=[].splice,Ei=[].push,Li=Object.prototype.toString,Fi=Object.getPrototypeOf,Oi=i("ng"),Ri=e.angular||(e.angular={}),Bi=0;Ci=t.documentMode,m.$inject=[],g.$inject=[];var Pi,Ii=Array.isArray,Yi=/^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/,ji=function(e){return $(e)?e.trim():e},Ni=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Hi=function(){function e(){try{return new Function(""),!1}catch(e){return!0}}if(!b(Hi.rules)){var n=t.querySelector("[ng-csp]")||t.querySelector("[data-ng-csp]");if(n){var i=n.getAttribute("ng-csp")||n.getAttribute("data-ng-csp");Hi.rules={noUnsafeEval:!i||-1!==i.indexOf("no-unsafe-eval"),noInlineStyle:!i||-1!==i.indexOf("no-inline-style")}}else Hi.rules={noUnsafeEval:e(),noInlineStyle:!1}}return Hi.rules},zi=function(){if(b(zi.name_))return zi.name_;var e,n,i,r,o=qi.length;for(n=0;o>n;++n)if(i=qi[n],e=t.querySelector("["+i.replace(":","\\:")+"jq]")){r=e.getAttribute(i+"jq");break}return zi.name_=r},qi=["ng-","data-ng-","ng:","x-ng-"],Wi=/[A-Z]/g,Ui=!1,Vi=1,Xi=2,Gi=3,Ki=8,Ji=9,Qi=11,Zi={full:"1.4.7",major:1,minor:4,dot:7,codeName:"dark-luminescence"};Te.expando="ng339";var er=Te.cache={},tr=1,nr=function(e,t,n){e.addEventListener(t,n,!1)},ir=function(e,t,n){e.removeEventListener(t,n,!1)};Te._data=function(e){return this.cache[e[this.expando]]||{}};var rr=/([\:\-\_]+(.))/g,or=/^moz([A-Z])/,ar={mouseleave:"mouseout",mouseenter:"mouseover"},sr=i("jqLite"),lr=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ur=/<|&#?\w+;/,cr=/<([\w:-]+)/,dr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,hr={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};hr.optgroup=hr.option,hr.tbody=hr.tfoot=hr.colgroup=hr.caption=hr.thead,hr.th=hr.td;var pr=Te.prototype={ready:function(n){function i(){r||(r=!0,n())}var r=!1;"complete"===t.readyState?setTimeout(i):(this.on("DOMContentLoaded",i),Te(e).on("load",i))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Ai(e>=0?this[e]:this[this.length+e])},length:0,push:Ei,sort:[].sort,splice:[].splice},fr={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){fr[bi(e)]=e});var mr={};o("input,select,option,textarea,button,form,details".split(","),function(e){mr[e]=!0});var gr={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:Oe,removeData:Le,hasData:Ce},function(e,t){Te[t]=e}),o({data:Oe,inheritedData:je,scope:function(e){return Ai.data(e,"$scope")||je(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Ai.data(e,"$isolateScope")||Ai.data(e,"$isolateScopeNoTemplate")},controller:Ye,injector:function(e){return je(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:Re,css:function(e,t,n){return t=we(t),b(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,i){var r=e.nodeType;if(r!==Gi&&r!==Xi&&r!==Ki){var o=bi(t);if(fr[o]){if(!b(i))return e[t]||(e.attributes.getNamedItem(t)||m).specified?o:n;i?(e[t]=!0,e.setAttribute(t,o)):(e[t]=!1,e.removeAttribute(o))}else if(b(i))e.setAttribute(t,i);else if(e.getAttribute){var a=e.getAttribute(t,2);return null===a?n:a}}},prop:function(e,t,n){return b(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if(_(t)){var n=e.nodeType;return n===Vi||n===Gi?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(_(t)){if(e.multiple&&"select"===I(e)){var n=[];return o(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){return _(t)?e.innerHTML:(De(e,!0),void(e.innerHTML=t))},empty:Ne},function(e,t){Te.prototype[t]=function(t,n){var i,r,o=this.length;if(e!==Ne&&_(2==e.length&&e!==Re&&e!==Ye?t:n)){if(x(t)){for(i=0;o>i;i++)if(e===Oe)e(this[i],t);else for(r in t)e(this[i],r,t[r]);return this}for(var a=e.$dv,s=_(a)?Math.min(o,1):o,l=0;s>l;l++){var u=e(this[l],t,n);a=a?a+u:u}return a}for(i=0;o>i;i++)e(this[i],t,n);return this}}),o({removeData:Le,on:function Fa(e,t,n,i){if(b(i))throw sr("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(ke(e)){var r=Fe(e,!0),o=r.events,a=r.handle;a||(a=r.handle=Ue(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],l=s.length;l--;){t=s[l];var u=o[t];u||(o[t]=[],"mouseenter"===t||"mouseleave"===t?Fa(e,ar[t],function(e){var n=this,i=e.relatedTarget;(!i||i!==n&&!n.contains(i))&&a(e,t)}):"$destroy"!==t&&nr(e,t,a),u=o[t]),u.push(n)}}},off:Ee,one:function(e,t,n){e=Ai(e),e.on(t,function i(){e.off(t,n),e.off(t,i)}),e.on(t,n)},replaceWith:function(e,t){var n,i=e.parentNode;De(e),o(new Te(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return o(e.childNodes,function(e){e.nodeType===Vi&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===Vi||n===Qi){t=new Te(t);for(var i=0,r=t.length;r>i;i++){var o=t[i];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===Vi){var n=e.firstChild;o(new Te(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=Ai(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:He,detach:function(e){He(e,!0)},after:function(e,t){var n=e,i=e.parentNode;t=new Te(t);for(var r=0,o=t.length;o>r;r++){var a=t[r];i.insertBefore(a,n.nextSibling),n=a}},addClass:Pe,removeClass:Be,toggleClass:function(e,t,n){t&&o(t.split(" "),function(t){var i=n;_(i)&&(i=!Re(e,t)),(i?Pe:Be)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Qi?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Se,triggerHandler:function(e,t,n){var i,r,a,s=t.type||t,l=Fe(e),u=l&&l.events,c=u&&u[s];c&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:m,type:s,target:e},t.type&&(i=d(i,t)),r=N(c),a=n?[i].concat(n):[i],o(r,function(t){i.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){Te.prototype[t]=function(t,n,i){for(var r,o=0,a=this.length;a>o;o++)_(r)?(r=e(this[o],t,n,i),b(r)&&(r=Ai(r))):Ie(r,e(this[o],t,n,i));return b(r)?r:this},Te.prototype.bind=Te.prototype.on,Te.prototype.unbind=Te.prototype.off}),Ge.prototype={put:function(e,t){this[Xe(e,this.nextUid)]=t},get:function(e){return this[Xe(e,this.nextUid)]},remove:function(e){var t=this[e=Xe(e,this.nextUid)];return delete this[e],t}};var vr=[function(){this.$get=[function(){return Ge}]}],yr=/^[^\(]*\(\s*([^\)]*)\)/m,_r=/,/,br=/^\s*(_?)(\S+?)\1\s*$/,xr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,wr=i("$injector");Qe.$$annotate=Je;var $r=i("$animate"),kr=1,Cr="ng-animate",Ar=function(){this.$get=["$q","$$rAF",function(e,t){function n(){}return n.all=m,n.chain=m,n.prototype={end:m,cancel:m,resume:m,pause:m,complete:m,then:function(n,i){return e(function(e){t(function(){e()})}).then(n,i)}},n}]},Mr=function(){var e=new Ge,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,i){function r(e,t,n){var i=!1;return t&&(t=$(t)?t.split(" "):Ii(t)?t:[],o(t,function(t){t&&(i=!0,e[t]=n)})),i}function a(){o(t,function(t){var n=e.get(t);if(n){var i=nt(t.attr("class")),r="",a="";o(n,function(e,t){var n=!!i[t];e!==n&&(e?r+=(r.length?" ":"")+t:a+=(a.length?" ":"")+t)}),o(t,function(e){r&&Pe(e,r),a&&Be(e,a)}),e.remove(t)}}),t.length=0}function s(n,o,s){var l=e.get(n)||{},u=r(l,o,!0),c=r(l,s,!1);(u||c)&&(e.put(n,l),t.push(n),1===t.length&&i.$$postDigest(a))}return{enabled:m,on:m,off:m,pin:m,push:function(e,t,i,r){return r&&r(),i=i||{},i.from&&e.css(i.from),i.to&&e.css(i.to),(i.addClass||i.removeClass)&&s(e,i.addClass,i.removeClass),new n}}}]},Tr=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,i){if(n&&"."!==n.charAt(0))throw $r("notcsel","Expecting class selector starting with '.' got '{0}'.",n);var r=n+"-animation";t.$$registeredAnimations[n.substr(1)]=r,e.factory(r,i)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter)){var t=new RegExp("(\\s+|\\/)"+Cr+"(\\s+|\\/)");if(t.test(this.$$classNameFilter.toString()))throw $r("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Cr)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var i=tt(n);!i||i.parentNode||i.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:e.on,off:e.off,pin:e.pin,enabled:e.enabled,cancel:function(e){e.end&&e.end()},enter:function(n,i,r,o){return i=i&&Ai(i),r=r&&Ai(r),i=i||r.parent(),t(n,i,r),e.push(n,"enter",it(o))},move:function(n,i,r,o){return i=i&&Ai(i),r=r&&Ai(r),i=i||r.parent(),t(n,i,r),e.push(n,"move",it(o))},leave:function(t,n){return e.push(t,"leave",it(n),function(){t.remove()})},addClass:function(t,n,i){return i=it(i),i.addClass=et(i.addclass,n),e.push(t,"addClass",i)},removeClass:function(t,n,i){return i=it(i),i.removeClass=et(i.removeClass,n),e.push(t,"removeClass",i)},setClass:function(t,n,i,r){return r=it(r),r.addClass=et(r.addClass,n),r.removeClass=et(r.removeClass,i),e.push(t,"setClass",r)},animate:function(t,n,i,r,o){return o=it(o),o.from=o.from?d(o.from,n):n,o.to=o.to?d(o.to,i):i,r=r||"ng-inline-animate",o.tempClasses=et(o.tempClasses,r),e.push(t,"animate",o)}}}]}],Sr=function(){this.$get=["$$rAF","$q",function(e,t){var n=function(){};return n.prototype={done:function(e){this.defer&&this.defer[e===!0?"reject":"resolve"]()},end:function(){this.done()},cancel:function(){this.done(!0)},getPromise:function(){return this.defer||(this.defer=t.defer()),this.defer.promise},then:function(e,t){return this.getPromise().then(e,t)},"catch":function(e){return this.getPromise()["catch"](e)},"finally":function(e){return this.getPromise()["finally"](e)}},function(t,i){function r(){return e(function(){o(),a||s.done(),a=!0}),s}function o(){i.addClass&&(t.addClass(i.addClass),i.addClass=null),i.removeClass&&(t.removeClass(i.removeClass),i.removeClass=null),i.to&&(t.css(i.to),i.to=null)}i.cleanupStyles&&(i.from=i.to=null),i.from&&(t.css(i.from),i.from=null);var a,s=new n;return{start:r,end:r}}}]},Dr=i("$compile");lt.$inject=["$provide","$$sanitizeUriProvider"];var Er=/^((?:x|data)[\:\-_])/i,Lr=i("$controller"),Fr=/^(\S+)(\s+as\s+(\w+))?$/,Or=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof Ai&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},Rr="application/json",Br={"Content-Type":Rr+";charset=utf-8"},Pr=/^\[|^\{(?!\{)/,Ir={"[":/]$/,"{":/}$/},Yr=/^\)\]\}',?\n/,jr=i("$http"),Nr=function(e){return function(){throw jr("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",e)}},Hr=Ri.$interpolateMinErr=i("$interpolate");Hr.throwNoconcat=function(e){throw Hr("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",e)},Hr.interr=function(e,t){return Hr("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var zr=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,qr={http:80,https:443,ftp:21},Wr=i("$location"),Ur={$$html5:!1,$$replace:!1,absUrl:Ht("$$absUrl"),url:function(e){if(_(e))return this.$$url;var t=zr.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Ht("$$protocol"),host:Ht("$$host"),port:Ht("$$port"),path:zt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if($(e)||k(e))e=e.toString(),this.$$search=ee(e);else{if(!x(e))throw Wr("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=j(e,{}),o(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:_(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:zt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};o([Nt,jt,Yt],function(e){e.prototype=Object.create(Ur),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==Yt||!this.$$html5)throw Wr("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=_(t)?null:t,this}});var Vr=i("$parse"),Xr=Function.prototype.call,Gr=Function.prototype.apply,Kr=Function.prototype.bind,Jr=ge();o("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){Jr[e]=!0});var Qr={n:"\n",f:"\f",r:"\r",t:" ",v:"","'":"'",'"':'"'},Zr=function(e){this.options=e};Zr.prototype={constructor:Zr,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index);if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(t))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var n=t+this.peek(),i=n+this.peek(2),r=Jr[t],o=Jr[n],a=Jr[i];if(r||o||a){var s=a?i:o?n:t;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(e,t){return-1!==t.indexOf(e)},peek:function(e){var t=e||1;return this.index+t<this.text.length?this.text.charAt(this.index+t):!1},isNumber:function(e){return e>="0"&&"9">=e&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||" "===e||"\n"===e||""===e||"\xa0"===e},isIdent:function(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||"_"===e||"$"===e;
|
38
|
+
},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var i=b(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw Vr("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,i,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=bi(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var i=this.peek();if("e"==n&&this.isExpOperator(i))e+=n;else if(this.isExpOperator(n)&&i&&this.isNumber(i)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||i&&this.isNumber(i)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){for(var e=this.index;this.index<this.text.length;){var t=this.text.charAt(this.index);if(!this.isIdent(t)&&!this.isNumber(t))break;this.index++}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var n="",i=e,r=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(i+=o,r){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{var s=Qr[o];n+=s||o}r=!1}else if("\\"===o)r=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:i,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var eo=function(e,t){this.lexer=e,this.options=t};eo.Program="Program",eo.ExpressionStatement="ExpressionStatement",eo.AssignmentExpression="AssignmentExpression",eo.ConditionalExpression="ConditionalExpression",eo.LogicalExpression="LogicalExpression",eo.BinaryExpression="BinaryExpression",eo.UnaryExpression="UnaryExpression",eo.CallExpression="CallExpression",eo.MemberExpression="MemberExpression",eo.Identifier="Identifier",eo.Literal="Literal",eo.ArrayExpression="ArrayExpression",eo.Property="Property",eo.ObjectExpression="ObjectExpression",eo.ThisExpression="ThisExpression",eo.NGValueParameter="NGValueParameter",eo.prototype={ast:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:eo.Program,body:e}},expressionStatement:function(){return{type:eo.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();return this.expect("=")&&(e={type:eo.AssignmentExpression,left:e,right:this.assignment(),operator:"="}),e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:eo.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:eo.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:eo.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:eo.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:eo.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:eo.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:eo.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:eo.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.constants.hasOwnProperty(this.peek().text)?e=j(this.constants[this.consume().text]):this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)"("===t.text?(e={type:eo.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:eo.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:eo.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:eo.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do e.push(this.expression());while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:eo.Identifier,name:e.text}},constant:function(){return{type:eo.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:eo.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:eo.Property,kind:"init"},this.peek().constant?e.key=this.constant():this.peek().identifier?e.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),e.value=this.expression(),t.push(e)}while(this.expect(","));return this.consume("}"),{type:eo.ObjectExpression,properties:t}},throwError:function(e,t){throw Vr("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw Vr("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw Vr("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,i){return this.peekAhead(0,e,t,n,i)},peekAhead:function(e,t,n,i,r){if(this.tokens.length>e){var o=this.tokens[e],a=o.text;if(a===t||a===n||a===i||a===r||!t&&!n&&!i&&!r)return o}return!1},expect:function(e,t,n,i){var r=this.peek(e,t,n,i);return r?(this.tokens.shift(),r):!1},constants:{"true":{type:eo.Literal,value:!0},"false":{type:eo.Literal,value:!1},"null":{type:eo.Literal,value:null},undefined:{type:eo.Literal,value:n},"this":{type:eo.ThisExpression}}},sn.prototype={compile:function(e,t){var i=this,r=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},en(r,i.$filter);var a,s="";if(this.stage="assign",a=rn(r)){this.state.computing="assign";var l=this.nextId();this.recurse(a,l),this.return_(l),s="fn.assign="+this.generateFunction("assign","s,v,l")}var u=tn(r.body);i.stage="inputs",o(u,function(e,t){var n="fn"+t;i.state[n]={vars:[],body:[],own:{}},i.state.computing=n;var r=i.nextId();i.recurse(e,r),i.return_(r),i.state.inputs.push(n),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(r);var c='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+s+this.watchFns()+"return fn;",d=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",c)(this.$filter,Ut,Xt,Gt,Vt,Kt,Jt,Qt,e);return this.state=this.stage=n,d.literal=on(r),d.constant=an(r),d},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,n=this;return o(t,function(t){e.push("var "+t+"="+n.generateFunction(t,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var e=[],t=this;return o(this.state.filters,function(n,i){e.push(n+"=$filter("+t.escape(i)+")")}),e.length?"var "+e.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(e,t,i,r,a,s){var l,u,c,d,h=this;if(r=r||m,!s&&b(e.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,i,r,a,!0));switch(e.type){case eo.Program:o(e.body,function(t,i){h.recurse(t.expression,n,n,function(e){u=e}),i!==e.body.length-1?h.current().body.push(u,";"):h.return_(u)});break;case eo.Literal:d=this.escape(e.value),this.assign(t,d),r(d);break;case eo.UnaryExpression:this.recurse(e.argument,n,n,function(e){u=e}),d=e.operator+"("+this.ifDefined(u,0)+")",this.assign(t,d),r(d);break;case eo.BinaryExpression:this.recurse(e.left,n,n,function(e){l=e}),this.recurse(e.right,n,n,function(e){u=e}),d="+"===e.operator?this.plus(l,u):"-"===e.operator?this.ifDefined(l,0)+e.operator+this.ifDefined(u,0):"("+l+")"+e.operator+"("+u+")",this.assign(t,d),r(d);break;case eo.LogicalExpression:t=t||this.nextId(),h.recurse(e.left,t),h.if_("&&"===e.operator?t:h.not(t),h.lazyRecurse(e.right,t)),r(t);break;case eo.ConditionalExpression:t=t||this.nextId(),h.recurse(e.test,t),h.if_(t,h.lazyRecurse(e.alternate,t),h.lazyRecurse(e.consequent,t)),r(t);break;case eo.Identifier:t=t||this.nextId(),i&&(i.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),i.computed=!1,i.name=e.name),Ut(e.name),h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",e.name)),function(){h.if_("inputs"===h.stage||"s",function(){a&&1!==a&&h.if_(h.not(h.nonComputedMember("s",e.name)),h.lazyAssign(h.nonComputedMember("s",e.name),"{}")),h.assign(t,h.nonComputedMember("s",e.name))})},t&&h.lazyAssign(t,h.nonComputedMember("l",e.name))),(h.state.expensiveChecks||un(e.name))&&h.addEnsureSafeObject(t),r(t);break;case eo.MemberExpression:l=i&&(i.context=this.nextId())||this.nextId(),t=t||this.nextId(),h.recurse(e.object,l,n,function(){h.if_(h.notNull(l),function(){e.computed?(u=h.nextId(),h.recurse(e.property,u),h.getStringValue(u),h.addEnsureSafeMemberName(u),a&&1!==a&&h.if_(h.not(h.computedMember(l,u)),h.lazyAssign(h.computedMember(l,u),"{}")),d=h.ensureSafeObject(h.computedMember(l,u)),h.assign(t,d),i&&(i.computed=!0,i.name=u)):(Ut(e.property.name),a&&1!==a&&h.if_(h.not(h.nonComputedMember(l,e.property.name)),h.lazyAssign(h.nonComputedMember(l,e.property.name),"{}")),d=h.nonComputedMember(l,e.property.name),(h.state.expensiveChecks||un(e.property.name))&&(d=h.ensureSafeObject(d)),h.assign(t,d),i&&(i.computed=!1,i.name=e.property.name))},function(){h.assign(t,"undefined")}),r(t)},!!a);break;case eo.CallExpression:t=t||this.nextId(),e.filter?(u=h.filter(e.callee.name),c=[],o(e.arguments,function(e){var t=h.nextId();h.recurse(e,t),c.push(t)}),d=u+"("+c.join(",")+")",h.assign(t,d),r(t)):(u=h.nextId(),l={},c=[],h.recurse(e.callee,u,l,function(){h.if_(h.notNull(u),function(){h.addEnsureSafeFunction(u),o(e.arguments,function(e){h.recurse(e,h.nextId(),n,function(e){c.push(h.ensureSafeObject(e))})}),l.name?(h.state.expensiveChecks||h.addEnsureSafeObject(l.context),d=h.member(l.context,l.name,l.computed)+"("+c.join(",")+")"):d=u+"("+c.join(",")+")",d=h.ensureSafeObject(d),h.assign(t,d)},function(){h.assign(t,"undefined")}),r(t)}));break;case eo.AssignmentExpression:if(u=this.nextId(),l={},!nn(e.left))throw Vr("lval","Trying to assing a value to a non l-value");this.recurse(e.left,n,l,function(){h.if_(h.notNull(l.context),function(){h.recurse(e.right,u),h.addEnsureSafeObject(h.member(l.context,l.name,l.computed)),h.addEnsureSafeAssignContext(l.context),d=h.member(l.context,l.name,l.computed)+e.operator+u,h.assign(t,d),r(t||d)})},1);break;case eo.ArrayExpression:c=[],o(e.elements,function(e){h.recurse(e,h.nextId(),n,function(e){c.push(e)})}),d="["+c.join(",")+"]",this.assign(t,d),r(d);break;case eo.ObjectExpression:c=[],o(e.properties,function(e){h.recurse(e.value,h.nextId(),n,function(t){c.push(h.escape(e.key.type===eo.Identifier?e.key.name:""+e.key.value)+":"+t)})}),d="{"+c.join(",")+"}",this.assign(t,d),r(d);break;case eo.ThisExpression:this.assign(t,"s"),r("s");break;case eo.NGValueParameter:this.assign(t,"v"),r("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,i=this.current().own;return i.hasOwnProperty(n)||(i[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),i[n]},assign:function(e,t){return e?(this.current().body.push(e,"=",t,";"),e):void 0},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(e===!0)t();else{var i=this.current().body;i.push("if(",e,"){"),t(),i.push("}"),n&&(i.push("else{"),n(),i.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){return e+"."+t},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},addEnsureSafeAssignContext:function(e){this.current().body.push(this.ensureSafeAssignContext(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},getStringValue:function(e){this.assign(e,"getStringValue("+e+",text)")},ensureSafeAssignContext:function(e){return"ensureSafeAssignContext("+e+",text)"},lazyRecurse:function(e,t,n,i,r,o){var a=this;return function(){a.recurse(e,t,n,i,r,o)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if($(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(k(e))return e.toString();if(e===!0)return"true";if(e===!1)return"false";if(null===e)return"null";if("undefined"==typeof e)return"undefined";throw Vr("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},ln.prototype={compile:function(e,t){var n=this,i=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,en(i,n.$filter);var r,a;(r=rn(i))&&(a=this.recurse(r));var s,l=tn(i.body);l&&(s=[],o(l,function(e,t){var i=n.recurse(e);e.input=i,s.push(i),e.watchId=t}));var u=[];o(i.body,function(e){u.push(n.recurse(e.expression))});var c=0===i.body.length?function(){}:1===i.body.length?u[0]:function(e,t){var n;return o(u,function(i){n=i(e,t)}),n};return a&&(c.assign=function(e,t,n){return a(e,n,t)}),s&&(c.inputs=s),c.literal=on(i),c.constant=an(i),c},recurse:function(e,t,i){var r,a,s,l=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case eo.Literal:return this.value(e.value,t);case eo.UnaryExpression:return a=this.recurse(e.argument),this["unary"+e.operator](a,t);case eo.BinaryExpression:return r=this.recurse(e.left),a=this.recurse(e.right),this["binary"+e.operator](r,a,t);case eo.LogicalExpression:return r=this.recurse(e.left),a=this.recurse(e.right),this["binary"+e.operator](r,a,t);case eo.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case eo.Identifier:return Ut(e.name,l.expression),l.identifier(e.name,l.expensiveChecks||un(e.name),t,i,l.expression);case eo.MemberExpression:return r=this.recurse(e.object,!1,!!i),e.computed||(Ut(e.property.name,l.expression),a=e.property.name),e.computed&&(a=this.recurse(e.property)),e.computed?this.computedMember(r,a,t,i,l.expression):this.nonComputedMember(r,a,l.expensiveChecks,t,i,l.expression);case eo.CallExpression:return s=[],o(e.arguments,function(e){s.push(l.recurse(e))}),e.filter&&(a=this.$filter(e.callee.name)),e.filter||(a=this.recurse(e.callee,!0)),e.filter?function(e,i,r,o){for(var l=[],u=0;u<s.length;++u)l.push(s[u](e,i,r,o));var c=a.apply(n,l,o);return t?{context:n,name:n,value:c}:c}:function(e,n,i,r){var o,u=a(e,n,i,r);if(null!=u.value){Xt(u.context,l.expression),Gt(u.value,l.expression);for(var c=[],d=0;d<s.length;++d)c.push(Xt(s[d](e,n,i,r),l.expression));o=Xt(u.value.apply(u.context,c),l.expression)}return t?{value:o}:o};case eo.AssignmentExpression:return r=this.recurse(e.left,!0,1),a=this.recurse(e.right),function(e,n,i,o){var s=r(e,n,i,o),u=a(e,n,i,o);return Xt(s.value,l.expression),Kt(s.context),s.context[s.name]=u,t?{value:u}:u};case eo.ArrayExpression:return s=[],o(e.elements,function(e){s.push(l.recurse(e))}),function(e,n,i,r){for(var o=[],a=0;a<s.length;++a)o.push(s[a](e,n,i,r));return t?{value:o}:o};case eo.ObjectExpression:return s=[],o(e.properties,function(e){s.push({key:e.key.type===eo.Identifier?e.key.name:""+e.key.value,value:l.recurse(e.value)})}),function(e,n,i,r){for(var o={},a=0;a<s.length;++a)o[s[a].key]=s[a].value(e,n,i,r);return t?{value:o}:o};case eo.ThisExpression:return function(e){return t?{value:e}:e};case eo.NGValueParameter:return function(e,n,i,r){return t?{value:i}:i}}},"unary+":function(e,t){return function(n,i,r,o){var a=e(n,i,r,o);return a=b(a)?+a:0,t?{value:a}:a}},"unary-":function(e,t){return function(n,i,r,o){var a=e(n,i,r,o);return a=b(a)?-a:0,t?{value:a}:a}},"unary!":function(e,t){return function(n,i,r,o){var a=!e(n,i,r,o);return t?{value:a}:a}},"binary+":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a),l=t(i,r,o,a),u=Qt(s,l);return n?{value:u}:u}},"binary-":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a),l=t(i,r,o,a),u=(b(s)?s:0)-(b(l)?l:0);return n?{value:u}:u}},"binary*":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)*t(i,r,o,a);return n?{value:s}:s}},"binary/":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)/t(i,r,o,a);return n?{value:s}:s}},"binary%":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)%t(i,r,o,a);return n?{value:s}:s}},"binary===":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)===t(i,r,o,a);return n?{value:s}:s}},"binary!==":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)!==t(i,r,o,a);return n?{value:s}:s}},"binary==":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)==t(i,r,o,a);return n?{value:s}:s}},"binary!=":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)!=t(i,r,o,a);return n?{value:s}:s}},"binary<":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)<t(i,r,o,a);return n?{value:s}:s}},"binary>":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)>t(i,r,o,a);return n?{value:s}:s}},"binary<=":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)<=t(i,r,o,a);return n?{value:s}:s}},"binary>=":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)>=t(i,r,o,a);return n?{value:s}:s}},"binary&&":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)&&t(i,r,o,a);return n?{value:s}:s}},"binary||":function(e,t,n){return function(i,r,o,a){var s=e(i,r,o,a)||t(i,r,o,a);return n?{value:s}:s}},"ternary?:":function(e,t,n,i){return function(r,o,a,s){var l=e(r,o,a,s)?t(r,o,a,s):n(r,o,a,s);return i?{value:l}:l}},value:function(e,t){return function(){return t?{context:n,name:n,value:e}:e}},identifier:function(e,t,i,r,o){return function(a,s,l,u){var c=s&&e in s?s:a;r&&1!==r&&c&&!c[e]&&(c[e]={});var d=c?c[e]:n;return t&&Xt(d,o),i?{context:c,name:e,value:d}:d}},computedMember:function(e,t,n,i,r){return function(o,a,s,l){var u,c,d=e(o,a,s,l);return null!=d&&(u=t(o,a,s,l),u=Vt(u),Ut(u,r),i&&1!==i&&d&&!d[u]&&(d[u]={}),c=d[u],Xt(c,r)),n?{context:d,name:u,value:c}:c}},nonComputedMember:function(e,t,i,r,o,a){return function(s,l,u,c){var d=e(s,l,u,c);o&&1!==o&&d&&!d[t]&&(d[t]={});var h=null!=d?d[t]:n;return(i||un(t))&&Xt(h,a),r?{context:d,name:t,value:h}:h}},inputs:function(e,t){return function(n,i,r,o){return o?o[t]:e(n,i,r)}}};var to=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new eo(this.lexer),this.astCompiler=n.csp?new ln(this.ast,t):new sn(this.ast,t)};to.prototype={constructor:to,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var no=(ge(),ge(),Object.prototype.valueOf),io=i("$sce"),ro={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Dr=i("$compile"),oo=t.createElement("a"),ao=An(e.location.href);Sn.$inject=["$document"],En.$inject=["$provide"],Bn.$inject=["$locale"],Pn.$inject=["$locale"];var so=".",lo={yyyy:jn("FullYear",4),yy:jn("FullYear",2,0,!0),y:jn("FullYear",1),MMMM:Nn("Month"),MMM:Nn("Month",!0),MM:jn("Month",2,1),M:jn("Month",1,1),dd:jn("Date",2),d:jn("Date",1),HH:jn("Hours",2),H:jn("Hours",1),hh:jn("Hours",2,-12),h:jn("Hours",1,-12),mm:jn("Minutes",2),m:jn("Minutes",1),ss:jn("Seconds",2),s:jn("Seconds",1),sss:jn("Milliseconds",3),EEEE:Nn("Day"),EEE:Nn("Day",!0),a:Un,Z:Hn,ww:Wn(2),w:Wn(1),G:Vn,GG:Vn,GGG:Vn,GGGG:Xn},uo=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,co=/^\-?\d+$/;Gn.$inject=["$locale"];var ho=v(bi),po=v(wi);Qn.$inject=["$parse"];var fo=v({restrict:"E",compile:function(e,t){return t.href||t.xlinkHref?void 0:function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===Li.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),mo={};o(fr,function(e,t){function n(e,n,r){e.$watch(r[i],function(e){r.$set(t,!!e)})}if("multiple"!=e){var i=ut("ng-"+t),r=n;"checked"===e&&(r=function(e,t,r){r.ngModel!==r[i]&&n(e,t,r)}),mo[i]=function(){return{restrict:"A",priority:100,link:r}}}}),o(gr,function(e,t){mo[t]=function(){return{priority:100,link:function(e,n,i){if("ngPattern"===t&&"/"==i.ngPattern.charAt(0)){var r=i.ngPattern.match(yi);if(r)return void i.$set("ngPattern",new RegExp(r[1],r[2]))}e.$watch(i[t],function(e){i.$set(t,e)})}}}}),o(["src","srcset","href"],function(e){var t=ut("ng-"+e);mo[t]=function(){return{priority:99,link:function(n,i,r){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===Li.call(i.prop("href"))&&(a="xlinkHref",r.$attr[a]="xlink:href",o=null),r.$observe(t,function(t){return t?(r.$set(a,t),void(Ci&&o&&i.prop(o,r[a]))):void("href"===e&&r.$set(a,null))})}}}});var go={$addControl:m,$$renameControl:ei,$removeControl:m,$setValidity:m,$setDirty:m,$setPristine:m,$setSubmitted:m},vo="ng-submitted";ti.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var yo=function(e){return["$timeout","$parse",function(t,i){function r(e){return""===e?i('this[""]').assign:i(e).assign||m}var o={name:"form",restrict:e?"EAC":"E",require:["form","^^?form"],controller:ti,compile:function(i,o){i.addClass(Qo).addClass(Ko);var a=o.name?"name":e&&o.ngForm?"ngForm":!1;return{pre:function(e,i,o,s){var l=s[0];if(!("action"in o)){var u=function(t){e.$apply(function(){l.$commitViewValue(),l.$setSubmitted()}),t.preventDefault()};nr(i[0],"submit",u),i.on("$destroy",function(){t(function(){ir(i[0],"submit",u)},0,!1)})}var c=s[1]||l.$$parentForm;c.$addControl(l);var h=a?r(l.$name):m;a&&(h(e,l),o.$observe(a,function(t){l.$name!==t&&(h(e,n),l.$$parentForm.$$renameControl(l,t),(h=r(l.$name))(e,l))})),i.on("$destroy",function(){l.$$parentForm.$removeControl(l),h(e,n),d(l,go)})}}}};return o}]},_o=yo(),bo=yo(!0),xo=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,wo=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,$o=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,ko=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Co=/^(\d{4})-(\d{2})-(\d{2})$/,Ao=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Mo=/^(\d{4})-W(\d\d)$/,To=/^(\d{4})-(\d\d)$/,So=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Do={text:ii,date:si("date",Co,ai(Co,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":si("datetimelocal",Ao,ai(Ao,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:si("time",So,ai(So,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:si("week",Mo,oi,"yyyy-Www"),month:si("month",To,ai(To,["yyyy","MM"]),"yyyy-MM"),number:ui,url:ci,email:di,radio:hi,checkbox:fi,hidden:m,button:m,submit:m,reset:m,file:m},Eo=["$browser","$sniffer","$filter","$parse",function(e,t,n,i){return{restrict:"E",require:["?ngModel"],link:{pre:function(r,o,a,s){s[0]&&(Do[bi(a.type)]||Do.text)(r,o,a,s[0],t,e,n,i)}}}}],Lo=/^(true|false|\d+)$/,Fo=function(){return{restrict:"A",priority:100,compile:function(e,t){return Lo.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},Oo=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,n,i){e.$$addBindingInfo(n,i.ngBind),n=n[0],t.$watch(i.ngBind,function(e){n.textContent=_(e)?"":e})}}}}],Ro=["$interpolate","$compile",function(e,t){return{compile:function(n){return t.$$addBindingClass(n),function(n,i,r){var o=e(i.attr(r.$attr.ngBindTemplate));t.$$addBindingInfo(i,o.expressions),i=i[0],r.$observe("ngBindTemplate",function(e){i.textContent=_(e)?"":e})}}}}],Bo=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(i,r){var o=t(r.ngBindHtml),a=t(r.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(i),function(t,i,r){n.$$addBindingInfo(i,r.ngBindHtml),t.$watch(a,function(){i.html(e.getTrustedHtml(o(t))||"")})}}}}],Po=v({restrict:"A",require:"ngModel",link:function(e,t,n,i){i.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Io=mi("",!0),Yo=mi("Odd",0),jo=mi("Even",1),No=Zn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),Ho=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],zo={},qo={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=ut("ng-"+e);zo[t]=["$parse","$rootScope",function(n,i){return{restrict:"A",compile:function(r,o){var a=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var r=function(){a(t,{$event:n})};qo[e]&&i.$$phase?t.$evalAsync(r):t.$apply(r)})}}}}]});var Wo=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,i,r,o,a){var s,l,u;n.$watch(r.ngIf,function(n){n?l||a(function(n,o){l=o,n[n.length++]=t.createComment(" end ngIf: "+r.ngIf+" "),s={clone:n},e.enter(n,i.parent(),i)}):(u&&(u.remove(),u=null),l&&(l.$destroy(),l=null),s&&(u=me(s.clone),e.leave(u).then(function(){u=null}),s=null))})}}}],Uo=["$templateRequest","$anchorScroll","$animate",function(e,t,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ri.noop,compile:function(i,r){var o=r.ngInclude||r.src,a=r.onload||"",s=r.autoscroll;return function(i,r,l,u,c){var d,h,p,f=0,m=function(){h&&(h.remove(),h=null),d&&(d.$destroy(),d=null),p&&(n.leave(p).then(function(){h=null}),h=p,p=null)};i.$watch(o,function(o){var l=function(){!b(s)||s&&!i.$eval(s)||t()},h=++f;o?(e(o,!0).then(function(e){if(h===f){var t=i.$new();u.template=e;var s=c(t,function(e){m(),n.enter(e,null,r).then(l)});d=t,p=s,d.$emit("$includeContentLoaded",o),i.$eval(a)}},function(){h===f&&(m(),i.$emit("$includeContentError",o))}),i.$emit("$includeContentRequested",o)):(m(),u.template=null)})}}}}],Vo=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,i,r,o){return/SVG/.test(i[0].toString())?(i.empty(),void e(Ae(o.template,t).childNodes)(n,function(e){i.append(e)},{futureParentElement:i})):(i.html(o.template),void e(i.contents())(n))}}}],Xo=Zn({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Go=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,i,r){var a=t.attr(i.$attr.ngList)||", ",s="false"!==i.ngTrim,l=s?ji(a):a,u=function(e){if(!_(e)){var t=[];return e&&o(e.split(l),function(e){e&&t.push(s?ji(e):e)}),t}};r.$parsers.push(u),r.$formatters.push(function(e){return Ii(e)?e.join(a):n}),r.$isEmpty=function(e){return!e||!e.length}}}},Ko="ng-valid",Jo="ng-invalid",Qo="ng-pristine",Zo="ng-dirty",ea="ng-untouched",ta="ng-touched",na="ng-pending",ia=i("ngModel"),ra=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,i,r,a,s,l,u,c,d){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=d(i.name||"",!1)(e),this.$$parentForm=go;var h,p=a(i.ngModel),f=p.assign,g=p,v=f,y=null,x=this;this.$$setOptions=function(e){if(x.$options=e,e&&e.getterSetter){var t=a(i.ngModel+"()"),n=a(i.ngModel+"($$$p)");g=function(e){var n=p(e);return A(n)&&(n=t(e)),n},v=function(e,t){A(p(e))?n(e,{$$$p:x.$modelValue}):f(e,x.$modelValue)}}else if(!p.assign)throw ia("nonassign","Expression '{0}' is non-assignable. Element: {1}",i.ngModel,Q(r))},this.$render=m,this.$isEmpty=function(e){return _(e)||""===e||null===e||e!==e};var w=0;gi({ctrl:this,$element:r,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},$animate:s}),this.$setPristine=function(){x.$dirty=!1,x.$pristine=!0,s.removeClass(r,Zo),s.addClass(r,Qo)},this.$setDirty=function(){x.$dirty=!0,x.$pristine=!1,s.removeClass(r,Qo),s.addClass(r,Zo),x.$$parentForm.$setDirty()},this.$setUntouched=function(){x.$touched=!1,x.$untouched=!0,s.setClass(r,ea,ta)},this.$setTouched=function(){x.$touched=!0,x.$untouched=!1,s.setClass(r,ta,ea)},this.$rollbackViewValue=function(){l.cancel(y),x.$viewValue=x.$$lastCommittedViewValue,x.$render()},this.$validate=function(){if(!k(x.$modelValue)||!isNaN(x.$modelValue)){var e=x.$$lastCommittedViewValue,t=x.$$rawModelValue,i=x.$valid,r=x.$modelValue,o=x.$options&&x.$options.allowInvalid;x.$$runValidators(t,e,function(e){o||i===e||(x.$modelValue=e?t:n,x.$modelValue!==r&&x.$$writeModelToScope())})}},this.$$runValidators=function(e,t,i){function r(){var e=x.$$parserName||"parse";return _(h)?(l(e,null),!0):(h||(o(x.$validators,function(e,t){l(t,null)}),o(x.$asyncValidators,function(e,t){l(t,null)})),l(e,h),h)}function a(){var n=!0;return o(x.$validators,function(i,r){var o=i(e,t);n=n&&o,l(r,o)}),n?!0:(o(x.$asyncValidators,function(e,t){l(t,null)}),!1)}function s(){var i=[],r=!0;o(x.$asyncValidators,function(o,a){var s=o(e,t);if(!O(s))throw ia("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);l(a,n),i.push(s.then(function(){l(a,!0)},function(e){r=!1,l(a,!1)}))}),i.length?c.all(i).then(function(){u(r)},m):u(!0)}function l(e,t){d===w&&x.$setValidity(e,t)}function u(e){d===w&&i(e)}w++;var d=w;return r()&&a()?void s():void u(!1)},this.$commitViewValue=function(){var e=x.$viewValue;l.cancel(y),(x.$$lastCommittedViewValue!==e||""===e&&x.$$hasNativeValidators)&&(x.$$lastCommittedViewValue=e,x.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){x.$modelValue!==a&&x.$$writeModelToScope()}var i=x.$$lastCommittedViewValue,r=i;if(h=_(r)?n:!0)for(var o=0;o<x.$parsers.length;o++)if(r=x.$parsers[o](r),_(r)){h=!1;break}k(x.$modelValue)&&isNaN(x.$modelValue)&&(x.$modelValue=g(e));var a=x.$modelValue,s=x.$options&&x.$options.allowInvalid;x.$$rawModelValue=r,s&&(x.$modelValue=r,t()),x.$$runValidators(r,x.$$lastCommittedViewValue,function(e){s||(x.$modelValue=e?r:n,t())})},this.$$writeModelToScope=function(){v(e,x.$modelValue),o(x.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}})},this.$setViewValue=function(e,t){
|
39
|
+
x.$viewValue=e,(!x.$options||x.$options.updateOnDefault)&&x.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,i=0,r=x.$options;r&&b(r.debounce)&&(n=r.debounce,k(n)?i=n:k(n[t])?i=n[t]:k(n["default"])&&(i=n["default"])),l.cancel(y),i?y=l(function(){x.$commitViewValue()},i):u.$$phase?x.$commitViewValue():e.$apply(function(){x.$commitViewValue()})},e.$watch(function(){var t=g(e);if(t!==x.$modelValue&&(x.$modelValue===x.$modelValue||t===t)){x.$modelValue=x.$$rawModelValue=t,h=n;for(var i=x.$formatters,r=i.length,o=t;r--;)o=i[r](o);x.$viewValue!==o&&(x.$viewValue=x.$$lastCommittedViewValue=o,x.$render(),x.$$runValidators(t,o,m))}return t})}],oa=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:ra,priority:1,compile:function(t){return t.addClass(Qo).addClass(ea).addClass(Ko),{pre:function(e,t,n,i){var r=i[0],o=i[1]||r.$$parentForm;r.$$setOptions(i[2]&&i[2].$options),o.$addControl(r),n.$observe("name",function(e){r.$name!==e&&r.$$parentForm.$$renameControl(r,e)}),e.$on("$destroy",function(){r.$$parentForm.$removeControl(r)})},post:function(t,n,i,r){var o=r[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(n){o.$touched||(e.$$phase?t.$evalAsync(o.$setTouched):t.$apply(o.$setTouched))})}}}}}],aa=/(\s+|^)default(\s+|$)/,sa=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var n=this;this.$options=j(e.$eval(t.ngModelOptions)),b(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=ji(this.$options.updateOn.replace(aa,function(){return n.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},la=Zn({terminal:!0,priority:1e3}),ua=i("ngOptions"),ca=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,da=["$compile","$parse",function(e,n){function i(e,t,i){function o(e,t,n,i,r){this.selectValue=e,this.viewValue=t,this.label=n,this.group=i,this.disabled=r}function a(e){var t;if(!u&&r(e))t=e;else{t=[];for(var n in e)e.hasOwnProperty(n)&&"$"!==n.charAt(0)&&t.push(n)}return t}var s=e.match(ca);if(!s)throw ua("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,Q(t));var l=s[5]||s[7],u=s[6],c=/ as /.test(s[0])&&s[1],d=s[9],h=n(s[2]?s[1]:l),p=c&&n(c),f=p||h,m=d&&n(d),g=d?function(e,t){return m(i,t)}:function(e){return Xe(e)},v=function(e,t){return g(e,$(e,t))},y=n(s[2]||s[1]),_=n(s[3]||""),b=n(s[4]||""),x=n(s[8]),w={},$=u?function(e,t){return w[u]=t,w[l]=e,w}:function(e){return w[l]=e,w};return{trackBy:d,getTrackByValue:v,getWatchables:n(x,function(e){var t=[];e=e||[];for(var n=a(e),r=n.length,o=0;r>o;o++){var l=e===n?o:n[o],u=(e[l],$(e[l],l)),c=g(e[l],u);if(t.push(c),s[2]||s[1]){var d=y(i,u);t.push(d)}if(s[4]){var h=b(i,u);t.push(h)}}return t}),getOptions:function(){for(var e=[],t={},n=x(i)||[],r=a(n),s=r.length,l=0;s>l;l++){var u=n===r?l:r[l],c=n[u],h=$(c,u),p=f(i,h),m=g(p,h),w=y(i,h),k=_(i,h),C=b(i,h),A=new o(m,p,w,k,C);e.push(A),t[m]=A}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[v(e)]},getViewValueFromOption:function(e){return d?Ri.copy(e.viewValue):e.viewValue}}}}}var a=t.createElement("option"),s=t.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:function(t,n,r,l){function u(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),e.value!==t.value&&(t.value=e.selectValue)}function c(e,t,n,i){var r;return t&&bi(t.nodeName)===n?r=t:(r=i.cloneNode(!1),t?e.insertBefore(r,t):e.appendChild(r)),r}function d(e){for(var t;e;)t=e.nextSibling,He(e),e=t}function h(e){var t=m&&m[0],n=w&&w[0];if(t||n)for(;e&&(e===t||e===n||t&&t.nodeType===Ki);)e=e.nextSibling;return e}function p(){var e=$&&g.readValue();$=k.getOptions();var t={},i=n[0].firstChild;if(x&&n.prepend(m),i=h(i),$.items.forEach(function(e){var r,o,l;e.group?(r=t[e.group],r||(o=c(n[0],i,"optgroup",s),i=o.nextSibling,o.label=e.group,r=t[e.group]={groupElement:o,currentOptionElement:o.firstChild}),l=c(r.groupElement,r.currentOptionElement,"option",a),u(e,l),r.currentOptionElement=l.nextSibling):(l=c(n[0],i,"option",a),u(e,l),i=l.nextSibling)}),Object.keys(t).forEach(function(e){d(t[e].currentOptionElement)}),d(i),f.$render(),!f.$isEmpty(e)){var r=g.readValue();(k.trackBy?H(e,r):e===r)||(f.$setViewValue(r),f.$render())}}var f=l[1];if(f){for(var m,g=l[0],v=r.multiple,y=0,_=n.children(),b=_.length;b>y;y++)if(""===_[y].value){m=_.eq(y);break}var x=!!m,w=Ai(a.cloneNode(!1));w.val("?");var $,k=i(r.ngOptions,n,t),C=function(){x||n.prepend(m),n.val(""),m.prop("selected",!0),m.attr("selected",!0)},A=function(){x||m.remove()},M=function(){n.prepend(w),n.val("?"),w.prop("selected",!0),w.attr("selected",!0)},T=function(){w.remove()};v?(f.$isEmpty=function(e){return!e||0===e.length},g.writeValue=function(e){$.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=$.getOptionFromViewValue(e);t&&!t.disabled&&(t.element.selected=!0)})},g.readValue=function(){var e=n.val()||[],t=[];return o(e,function(e){var n=$.selectValueMap[e];n&&!n.disabled&&t.push($.getViewValueFromOption(n))}),t},k.trackBy&&t.$watchCollection(function(){return Ii(f.$viewValue)?f.$viewValue.map(function(e){return k.getTrackByValue(e)}):void 0},function(){f.$render()})):(g.writeValue=function(e){var t=$.getOptionFromViewValue(e);t&&!t.disabled?n[0].value!==t.selectValue&&(T(),A(),n[0].value=t.selectValue,t.element.selected=!0,t.element.setAttribute("selected","selected")):null===e||x?(T(),C()):(A(),M())},g.readValue=function(){var e=$.selectValueMap[n.val()];return e&&!e.disabled?(A(),T(),$.getViewValueFromOption(e)):null},k.trackBy&&t.$watch(function(){return k.getTrackByValue(f.$viewValue)},function(){f.$render()})),x?(m.remove(),e(m)(t),m.removeClass("ng-scope")):m=Ai(a.cloneNode(!1)),p(),t.$watchCollection(k.getWatchables,p)}}}}],ha=["$locale","$interpolate","$log",function(e,t,n){var i=/{}/g,r=/^when(Minus)?(.+)$/;return{link:function(a,s,l){function u(e){s.text(e||"")}var c,d=l.count,h=l.$attr.when&&s.attr(l.$attr.when),p=l.offset||0,f=a.$eval(h)||{},g={},v=t.startSymbol(),y=t.endSymbol(),b=v+d+"-"+p+y,x=Ri.noop;o(l,function(e,t){var n=r.exec(t);if(n){var i=(n[1]?"-":"")+bi(n[2]);f[i]=s.attr(l.$attr[t])}}),o(f,function(e,n){g[n]=t(e.replace(i,b))}),a.$watch(d,function(t){var i=parseFloat(t),r=isNaN(i);if(r||i in f||(i=e.pluralCat(i-p)),i!==c&&!(r&&k(c)&&isNaN(c))){x();var o=g[i];_(o)?(null!=t&&n.debug("ngPluralize: no rule defined for '"+i+"' in "+h),x=m,u()):x=a.$watch(o,u),c=i}})}}}],pa=["$parse","$animate",function(e,a){var s="$$NG_REMOVED",l=i("ngRepeat"),u=function(e,t,n,i,r,o,a){e[n]=i,r&&(e[r]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0===(1&t))},c=function(e){return e.clone[0]},d=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(i,h){var p=h.ngRepeat,f=t.createComment(" end ngRepeat: "+p+" "),m=p.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!m)throw l("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",p);var g=m[1],v=m[2],y=m[3],_=m[4];if(m=g.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!m)throw l("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var b=m[3]||m[1],x=m[2];if(y&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(y)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(y)))throw l("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",y);var w,$,k,C,A={$id:Xe};return _?w=e(_):(k=function(e,t){return Xe(t)},C=function(e){return e}),function(e,t,i,h,m){w&&($=function(t,n,i){return x&&(A[x]=t),A[b]=n,A.$index=i,w(e,A)});var g=ge();e.$watchCollection(v,function(i){var h,v,_,w,A,M,T,S,D,E,L,F,O=t[0],R=ge();if(y&&(e[y]=i),r(i))D=i,S=$||k;else{S=$||C,D=[];for(var B in i)xi.call(i,B)&&"$"!==B.charAt(0)&&D.push(B)}for(w=D.length,L=new Array(w),h=0;w>h;h++)if(A=i===D?h:D[h],M=i[A],T=S(A,M,h),g[T])E=g[T],delete g[T],R[T]=E,L[h]=E;else{if(R[T])throw o(L,function(e){e&&e.scope&&(g[e.id]=e)}),l("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",p,T,M);L[h]={id:T,scope:n,clone:n},R[T]=!0}for(var P in g){if(E=g[P],F=me(E.clone),a.leave(F),F[0].parentNode)for(h=0,v=F.length;v>h;h++)F[h][s]=!0;E.scope.$destroy()}for(h=0;w>h;h++)if(A=i===D?h:D[h],M=i[A],E=L[h],E.scope){_=O;do _=_.nextSibling;while(_&&_[s]);c(E)!=_&&a.move(me(E.clone),null,Ai(O)),O=d(E),u(E.scope,h,b,M,x,A,w)}else m(function(e,t){E.scope=t;var n=f.cloneNode(!1);e[e.length++]=n,a.enter(e,null,Ai(O)),O=n,E.clone=e,R[E.id]=E,u(E.scope,h,b,M,x,A,w)});g=R})}}}}],fa="ng-hide",ma="ng-hide-animate",ga=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngShow,function(t){e[t?"removeClass":"addClass"](n,fa,{tempClasses:ma})})}}}],va=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngHide,function(t){e[t?"addClass":"removeClass"](n,fa,{tempClasses:ma})})}}}],ya=Zn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),_a=["$animate",function(e){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,i,r,a){var s=r.ngSwitch||r.on,l=[],u=[],c=[],d=[],h=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var i,r;for(i=0,r=c.length;r>i;++i)e.cancel(c[i]);for(c.length=0,i=0,r=d.length;r>i;++i){var s=me(u[i].clone);d[i].$destroy();var p=c[i]=e.leave(s);p.then(h(c,i))}u.length=0,d.length=0,(l=a.cases["!"+n]||a.cases["?"])&&o(l,function(n){n.transclude(function(i,r){d.push(r);var o=n.element;i[i.length++]=t.createComment(" end ngSwitchWhen: ");var a={clone:i};u.push(a),e.enter(i,o.parent(),o)})})})}}}],ba=Zn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,r){i.cases["!"+n.ngSwitchWhen]=i.cases["!"+n.ngSwitchWhen]||[],i.cases["!"+n.ngSwitchWhen].push({transclude:r,element:t})}}),xa=Zn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,r){i.cases["?"]=i.cases["?"]||[],i.cases["?"].push({transclude:r,element:t})}}),wa=Zn({restrict:"EAC",link:function(e,t,n,r,o){if(!o)throw i("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Q(t));o(function(e){t.empty(),t.append(e)})}}),$a=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var i=n.id,r=t[0].text;e.put(i,r)}}}}],ka={$setViewValue:m,$render:m},Ca=["$element","$scope","$attrs",function(e,i,r){var o=this,a=new Ge;o.ngModelCtrl=ka,o.unknownOption=Ai(t.createElement("option")),o.renderUnknownOption=function(t){var n="? "+Xe(t)+" ?";o.unknownOption.val(n),e.prepend(o.unknownOption),e.val(n)},i.$on("$destroy",function(){o.renderUnknownOption=m}),o.removeUnknownOption=function(){o.unknownOption.parent()&&o.unknownOption.remove()},o.readValue=function(){return o.removeUnknownOption(),e.val()},o.writeValue=function(t){o.hasOption(t)?(o.removeUnknownOption(),e.val(t),""===t&&o.emptyOption.prop("selected",!0)):null==t&&o.emptyOption?(o.removeUnknownOption(),e.val("")):o.renderUnknownOption(t)},o.addOption=function(e,t){pe(e,'"option value"'),""===e&&(o.emptyOption=t);var n=a.get(e)||0;a.put(e,n+1)},o.removeOption=function(e){var t=a.get(e);t&&(1===t?(a.remove(e),""===e&&(o.emptyOption=n)):a.put(e,t-1))},o.hasOption=function(e){return!!a.get(e)}}],Aa=function(){return{restrict:"E",require:["select","?ngModel"],controller:Ca,link:function(e,t,n,i){var r=i[1];if(r){var a=i[0];if(a.ngModelCtrl=r,r.$render=function(){a.writeValue(r.$viewValue)},t.on("change",function(){e.$apply(function(){r.$setViewValue(a.readValue())})}),n.multiple){a.readValue=function(){var e=[];return o(t.find("option"),function(t){t.selected&&e.push(t.value)}),e},a.writeValue=function(e){var n=new Ge(e);o(t.find("option"),function(e){e.selected=b(n.get(e.value))})};var s,l=NaN;e.$watch(function(){l!==r.$viewValue||H(s,r.$viewValue)||(s=N(r.$viewValue),r.$render()),l=r.$viewValue}),r.$isEmpty=function(e){return!e||0===e.length}}}}}},Ma=["$interpolate",function(e){function t(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}return{restrict:"E",priority:100,compile:function(n,i){if(b(i.value))var r=e(i.value,!0);else{var o=e(n.text(),!0);o||i.$set("value",n.text())}return function(e,n,i){function a(e){u.addOption(e,n),u.ngModelCtrl.$render(),t(n)}var s="$selectController",l=n.parent(),u=l.data(s)||l.parent().data(s);if(u&&u.ngModelCtrl){if(r){var c;i.$observe("value",function(e){b(c)&&u.removeOption(c),c=e,a(e)})}else o?e.$watch(o,function(e,t){i.$set("value",e),t!==e&&u.removeOption(t),a(e)}):a(i.value);n.on("$destroy",function(){u.removeOption(i.value),u.ngModelCtrl.$render()})}}}}}],Ta=v({restrict:"E",terminal:!1}),Sa=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){i&&(n.required=!0,i.$validators.required=function(e,t){return!n.required||!i.$isEmpty(t)},n.$observe("required",function(){i.$validate()}))}}},Da=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,r,o){if(o){var a,s=r.ngPattern||r.pattern;r.$observe("pattern",function(e){if($(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw i("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,Q(t));a=e||n,o.$validate()}),o.$validators.pattern=function(e,t){return o.$isEmpty(t)||_(a)||a.test(t)}}}}},Ea=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var r=-1;n.$observe("maxlength",function(e){var t=p(e);r=isNaN(t)?-1:t,i.$validate()}),i.$validators.maxlength=function(e,t){return 0>r||i.$isEmpty(t)||t.length<=r}}}}},La=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var r=0;n.$observe("minlength",function(e){r=p(e)||0,i.$validate()}),i.$validators.minlength=function(e,t){return i.$isEmpty(t)||t.length>=r}}}}};return e.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(ce(),be(Ri),Ri.module("ngLocale",[],["$provide",function(e){function t(e){e+="";var t=e.indexOf(".");return-1==t?0:e.length-t-1}function i(e,i){var r=i;n===r&&(r=Math.min(t(e),3));var o=Math.pow(10,r),a=(e*o|0)%o;return{v:r,f:a}}var r={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\xa4",negSuf:"",posPre:"\xa4",posSuf:""}]},id:"en-us",pluralCat:function(e,t){var n=0|e,o=i(e,t);return 1==n&&0==o.v?r.ONE:r.OTHER}})}]),void Ai(t).ready(function(){oe(t,ae)}))}(window,document),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'),function(e,t,n){"use strict";function i(){function e(e,n){return t.extend(Object.create(e),n)}function n(e,t){var n=t.caseInsensitiveMatch,i={originalPath:e,regexp:e},r=i.keys=[];return e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(e,t,n,i){var o="?"===i?i:null,a="*"===i?i:null;return r.push({name:n,optional:!!o}),t=t||"",""+(o?"":t)+"(?:"+(o?t:"")+(a&&"(.+?)"||"([^/]+)")+(o||"")+")"+(o||"")}).replace(/([\/$\*])/g,"\\$1"),i.regexp=new RegExp("^"+e+"$",n?"i":""),i}var i={};this.when=function(e,r){var o=t.copy(r);if(t.isUndefined(o.reloadOnSearch)&&(o.reloadOnSearch=!0),t.isUndefined(o.caseInsensitiveMatch)&&(o.caseInsensitiveMatch=this.caseInsensitiveMatch),i[e]=t.extend(o,e&&n(e,o)),e){var a="/"==e[e.length-1]?e.substr(0,e.length-1):e+"/";i[a]=t.extend({redirectTo:e},n(a,o))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(e){return"string"==typeof e&&(e={redirectTo:e}),this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(n,r,o,a,s,u,c){function d(e,t){var n=t.keys,i={};if(!t.regexp)return null;var r=t.regexp.exec(e);if(!r)return null;for(var o=1,a=r.length;a>o;++o){var s=n[o-1],l=r[o];s&&l&&(i[s.name]=l)}return i}function h(e){var i=_.current;g=f(),v=g&&i&&g.$$route===i.$$route&&t.equals(g.pathParams,i.pathParams)&&!g.reloadOnSearch&&!y,v||!i&&!g||n.$broadcast("$routeChangeStart",g,i).defaultPrevented&&e&&e.preventDefault()}function p(){var e=_.current,i=g;v?(e.params=i.params,t.copy(e.params,o),n.$broadcast("$routeUpdate",e)):(i||e)&&(y=!1,_.current=i,i&&i.redirectTo&&(t.isString(i.redirectTo)?r.path(m(i.redirectTo,i.params)).search(i.params).replace():r.url(i.redirectTo(i.pathParams,r.path(),r.search())).replace()),a.when(i).then(function(){if(i){var e,n,r=t.extend({},i.resolve);return t.forEach(r,function(e,n){r[n]=t.isString(e)?s.get(e):s.invoke(e,null,null,n)}),t.isDefined(e=i.template)?t.isFunction(e)&&(e=e(i.params)):t.isDefined(n=i.templateUrl)&&(t.isFunction(n)&&(n=n(i.params)),t.isDefined(n)&&(i.loadedTemplateUrl=c.valueOf(n),e=u(n))),t.isDefined(e)&&(r.$template=e),a.all(r)}}).then(function(r){i==_.current&&(i&&(i.locals=r,t.copy(i.params,o)),n.$broadcast("$routeChangeSuccess",i,e))},function(t){i==_.current&&n.$broadcast("$routeChangeError",i,e,t)}))}function f(){var n,o;return t.forEach(i,function(i,a){!o&&(n=d(r.path(),i))&&(o=e(i,{params:t.extend({},r.search(),n),pathParams:n}),o.$$route=i)}),o||i[null]&&e(i[null],{params:{},pathParams:{}})}function m(e,n){var i=[];return t.forEach((e||"").split(":"),function(e,t){if(0===t)i.push(e);else{var r=e.match(/(\w+)(?:[?*])?(.*)/),o=r[1];i.push(n[o]),i.push(r[2]||""),delete n[o]}}),i.join("")}var g,v,y=!1,_={routes:i,reload:function(){y=!0,n.$evalAsync(function(){h(),p()})},updateParams:function(e){if(!this.current||!this.current.$$route)throw l("norout","Tried updating route when with no current route");e=t.extend({},this.current.params,e),r.path(m(this.current.$$route.originalPath,e)),r.search(e)}};return n.$on("$locationChangeStart",h),n.$on("$locationChangeSuccess",p),_}]}function r(){this.$get=function(){return{}}}function o(e,n,i){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(r,o,a,s,l){function u(){p&&(i.cancel(p),p=null),d&&(d.$destroy(),d=null),h&&(p=i.leave(h),p.then(function(){p=null}),h=null)}function c(){var a=e.current&&e.current.locals,s=a&&a.$template;if(t.isDefined(s)){var c=r.$new(),p=e.current,g=l(c,function(e){i.enter(e,null,h||o).then(function(){!t.isDefined(f)||f&&!r.$eval(f)||n()}),u()});h=g,d=p.scope=c,d.$emit("$viewContentLoaded"),d.$eval(m)}else u()}var d,h,p,f=a.autoscroll,m=a.onload||"";r.$on("$routeChangeSuccess",c),c()}}}function a(e,t,n){return{restrict:"ECA",priority:-400,link:function(i,r){var o=n.current,a=o.locals;r.html(a.$template);var s=e(r.contents());if(o.controller){a.$scope=i;var l=t(o.controller,a);o.controllerAs&&(i[o.controllerAs]=l),r.data("$ngControllerController",l),r.children().data("$ngControllerController",l)}s(i)}}}var s=t.module("ngRoute",["ng"]).provider("$route",i),l=t.$$minErr("ngRoute");s.provider("$routeParams",r),s.directive("ngView",o),s.directive("ngView",a),o.$inject=["$route","$anchorScroll","$animate"],a.$inject=["$compile","$controller","$route"]}(window,window.angular),function(e,t,n){"use strict";function i(e,t,n){if(!e)throw ngMinErr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function r(e,t){return e||t?e?t?(H(e)&&(e=e.join(" ")),H(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function o(e){var t={};return e&&(e.to||e.from)&&(t.to=e.to,t.from=e.from),t}function a(e,t,n){var i="";return e=H(e)?e:e&&z(e)&&e.length?e.split(/\s+/):[],N(e,function(e,r){e&&e.length>0&&(i+=r>0?" ":"",i+=n?t+e:e+t)}),i}function s(e,t){var n=e.indexOf(t);t>=0&&e.splice(n,1)}function l(e){if(e instanceof j)switch(e.length){case 0:return[];case 1:if(e[0].nodeType===G)return e;break;default:return j(u(e))}return e.nodeType===G?j(e):void 0}function u(e){if(!e[0])return e;for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType==G)return n}}function c(e,t,n){N(t,function(t){e.addClass(t,n)})}function d(e,t,n){N(t,function(t){e.removeClass(t,n)})}function h(e){return function(t,n){n.addClass&&(c(e,t,n.addClass),n.addClass=null),n.removeClass&&(d(e,t,n.removeClass),n.removeClass=null)}}function p(e){if(e=e||{},!e.$$prepared){var t=e.domOperation||I;e.domOperation=function(){e.$$domOperationFired=!0,t(),t=I},e.$$prepared=!0}return e}function f(e,t){m(e,t),g(e,t)}function m(e,t){t.from&&(e.css(t.from),t.from=null)}function g(e,t){t.to&&(e.css(t.to),t.to=null)}function v(e,t,n){var i=(t.addClass||"")+" "+(n.addClass||""),r=(t.removeClass||"")+" "+(n.removeClass||""),o=y(e.attr("class"),i,r);n.preparationClasses&&(t.preparationClasses=C(n.preparationClasses,t.preparationClasses),delete n.preparationClasses);var a=t.domOperation!==I?t.domOperation:null;return Y(t,n),a&&(t.domOperation=a),o.addClass?t.addClass=o.addClass:t.addClass=null,o.removeClass?t.removeClass=o.removeClass:t.removeClass=null,t}function y(e,t,n){function i(e){z(e)&&(e=e.split(" "));var t={};return N(e,function(e){e.length&&(t[e]=!0)}),t}var r=1,o=-1,a={};e=i(e),t=i(t),N(t,function(e,t){a[t]=r}),n=i(n),N(n,function(e,t){a[t]=a[t]===r?null:o});var s={addClass:"",removeClass:""};return N(a,function(t,n){var i,a;t===r?(i="addClass",a=!e[n]):t===o&&(i="removeClass",a=e[n]),a&&(s[i].length&&(s[i]+=" "),s[i]+=n)}),s}function _(e){return e instanceof t.element?e[0]:e}function b(e,t,n){var i="";t&&(i=a(t,Q,!0)),n.addClass&&(i=C(i,a(n.addClass,K))),n.removeClass&&(i=C(i,a(n.removeClass,J))),i.length&&(n.preparationClasses=i,e.addClass(i))}function x(e,t){t.preparationClasses&&(e.removeClass(t.preparationClasses),t.preparationClasses=null),t.activeClasses&&(e.removeClass(t.activeClasses),t.activeClasses=null)}function w(e,t){var n=t?"-"+t+"s":"";return k(e,[he,n]),[he,n]}function $(e,t){var n=t?"paused":"",i=B+le;return k(e,[i,n]),[i,n]}function k(e,t){var n=t[0],i=t[1];e.style[n]=i}function C(e,t){return e?t?e+" "+t:e:t}function A(e){return[de,e+"s"]}function M(e,t){var n=t?ce:he;return[n,e+"s"]}function T(e,t,n){var i=Object.create(null),r=e.getComputedStyle(t)||{};return N(n,function(e,t){var n=r[e];if(n){var o=n.charAt(0);("-"===o||"+"===o||o>=0)&&(n=S(n)),0===n&&(n=null),i[t]=n}}),i}function S(e){var t=0,n=e.split(/\s*,\s*/);return N(n,function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,t=t?Math.max(e,t):e}),t}function D(e){return 0===e||null!=e}function E(e,t){var n=O,i=e+"s";return t?n+=ie:i+=" linear all",[n,i]}function L(){var e=Object.create(null);return{flush:function(){e=Object.create(null)},count:function(t){var n=e[t];return n?n.total:0},get:function(t){var n=e[t];return n&&n.value},put:function(t,n){e[t]?e[t].total++:e[t]={total:1,value:n}}}}function F(e,t,n){N(n,function(n){e[n]=U(e[n])?e[n]:t.style.getPropertyValue(n)})}var O,R,B,P,I=t.noop,Y=t.extend,j=t.element,N=t.forEach,H=t.isArray,z=t.isString,q=t.isObject,W=t.isUndefined,U=t.isDefined,V=t.isFunction,X=t.isElement,G=1,K="-add",J="-remove",Q="ng-",Z="-active",ee="ng-animate",te="$$ngAnimateChildren",ne="";W(e.ontransitionend)&&U(e.onwebkittransitionend)?(ne="-webkit-",O="WebkitTransition",R="webkitTransitionEnd transitionend"):(O="transition",R="transitionend"),W(e.onanimationend)&&U(e.onwebkitanimationend)?(ne="-webkit-",B="WebkitAnimation",P="webkitAnimationEnd animationend"):(B="animation",P="animationend");var ie="Duration",re="Property",oe="Delay",ae="TimingFunction",se="IterationCount",le="PlayState",ue=9999,ce=B+oe,de=B+ie,he=O+oe,pe=O+ie,fe=["$$rAF",function(e){function t(e){i=i.concat(e),n()}function n(){if(i.length){for(var t=i.shift(),o=0;o<t.length;o++)t[o]();r||e(function(){r||n()})}}var i,r;return i=t.queue=[],t.waitUntilQuiet=function(t){r&&r(),r=e(function(){r=null,t(),n()})},t}],me=[function(){return function(e,n,i){var r=i.ngAnimateChildren;t.isString(r)&&0===r.length?n.data(te,!0):i.$observe("ngAnimateChildren",function(e){e="on"===e||"true"===e,n.data(te,e)})}}],ge="$$animateCss",ve=1e3,ye=3,_e=1.5,be={transitionDuration:pe,transitionDelay:he,transitionProperty:O+re,animationDuration:de,animationDelay:ce,animationIterationCount:B+se},xe={transitionDuration:pe,transitionDelay:he,animationDuration:de,animationDelay:ce},we=["$animateProvider",function(e){var t=L(),n=L();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$animate",function(e,i,r,l,u,c,d,v){function y(e,t){var n="$$ngAnimateParentKey",i=e.parentNode,r=i[n]||(i[n]=++Y);return r+"-"+e.getAttribute("class")+"-"+t}function b(n,i,r,o){var a=t.get(r);return a||(a=T(e,n,o),"infinite"===a.animationIterationCount&&(a.animationIterationCount=1)),t.put(r,a),a}function x(r,o,s,l){var u;if(t.count(s)>0&&(u=n.get(s),!u)){var c=a(o,"-stagger");i.addClass(r,c),u=T(e,r,l),u.animationDuration=Math.max(u.animationDuration,0),u.transitionDuration=Math.max(u.transitionDuration,0),i.removeClass(r,c),n.put(s,u)}return u||{}}function C(e){j.push(e),d.waitUntilQuiet(function(){t.flush(),n.flush();for(var e=u(),i=0;i<j.length;i++)j[i](e);j.length=0})}function S(e,t,n){var i=b(e,t,n,be),r=i.animationDelay,o=i.transitionDelay;return i.maxDelay=r&&o?Math.max(r,o):r||o,i.maxDuration=Math.max(i.animationDuration*i.animationIterationCount,i.transitionDuration),i}var L=h(i),Y=0,j=[];return function(e,n){function u(){h()}function d(){h(!0)}function h(t){q||U&&W||(q=!0,W=!1,n.$$skipPreparationClasses||i.removeClass(e,pe),i.removeClass(e,me),$(z,!1),w(z,!1),N(ie,function(e){z.style[e[0]]=""}),L(e,n),f(e,n),Object.keys(j).length&&N(j,function(e,t){e?z.style.setProperty(t,e):z.style.removeProperty(t)}),n.onDone&&n.onDone(),V&&V.complete(!t))}function b(e){Oe.blockTransition&&w(z,e),Oe.blockKeyframeAnimation&&$(z,!!e)}function T(){return V=new r({end:u,cancel:d}),C(I),h(),{$$willAnimate:!1,start:function(){return V},end:u}}function Y(){function t(){if(!q){if(b(!1),N(ie,function(e){var t=e[0],n=e[1];z.style[t]=n}),L(e,n),i.addClass(e,me),Oe.recalculateTimingStyles){if(fe=z.className+" "+pe,$e=y(z,fe),Le=S(z,fe,$e),Fe=Le.maxDelay,G=Math.max(Fe,0),te=Le.maxDuration,0===te)return void h();Oe.hasTransitions=Le.transitionDuration>0,Oe.hasAnimations=Le.animationDuration>0}if(Oe.applyAnimationDelay&&(Fe="boolean"!=typeof n.delay&&D(n.delay)?parseFloat(n.delay):Fe,G=Math.max(Fe,0),Le.animationDelay=Fe,Re=M(Fe,!0),ie.push(Re),z.style[Re[0]]=Re[1]),ee=G*ve,ne=te*ve,n.easing){var t,s=n.easing;Oe.hasTransitions&&(t=O+ae,ie.push([t,s]),z.style[t]=s),Oe.hasAnimations&&(t=B+ae,ie.push([t,s]),z.style[t]=s)}Le.transitionDuration&&u.push(R),Le.animationDuration&&u.push(P),a=Date.now();var c=ee+_e*ne,d=a+c,p=e.data(ge)||[],f=!0;if(p.length){var m=p[0];f=d>m.expectedEndTime,f?l.cancel(m.timer):p.push(h)}if(f){var v=l(r,c,!1);p[0]={timer:v,expectedEndTime:d},p.push(h),e.data(ge,p)}e.on(u.join(" "),o),n.to&&(n.cleanupStyles&&F(j,z,Object.keys(n.to)),g(e,n))}}function r(){var t=e.data(ge);if(t){for(var n=1;n<t.length;n++)t[n]();e.removeData(ge)}}function o(e){e.stopPropagation();var t=e.originalEvent||e,n=t.$manualTimeStamp||t.timeStamp||Date.now(),i=parseFloat(t.elapsedTime.toFixed(ye));Math.max(n-a,0)>=ee&&i>=te&&(U=!0,h())}if(!q){if(!z.parentNode)return void h();var a,u=[],c=function(e){if(U)W&&e&&(W=!1,h());else if(W=!e,Le.animationDuration){var t=$(z,W);W?ie.push(t):s(ie,t)}},d=De>0&&(Le.transitionDuration&&0===ke.transitionDuration||Le.animationDuration&&0===ke.animationDuration)&&Math.max(ke.animationDelay,ke.transitionDelay);d?l(t,Math.floor(d*De*ve),!1):t(),X.resume=function(){c(!0)},X.pause=function(){c(!1)}}}var j={},z=_(e);if(!z||!z.parentNode||!v.enabled())return T();n=p(n);var q,W,U,V,X,G,ee,te,ne,ie=[],oe=e.attr("class"),se=o(n);if(0===n.duration||!c.animations&&!c.transitions)return T();var le=n.event&&H(n.event)?n.event.join(" "):n.event,ce=le&&n.structural,de="",he="";ce?de=a(le,Q,!0):le&&(de=le),n.addClass&&(he+=a(n.addClass,K)),n.removeClass&&(he.length&&(he+=" "),he+=a(n.removeClass,J)),n.applyClassesEarly&&he.length&&L(e,n);var pe=[de,he].join(" ").trim(),fe=oe+" "+pe,me=a(pe,Z),be=se.to&&Object.keys(se.to).length>0,we=(n.keyframeStyle||"").length>0;if(!we&&!be&&!pe)return T();var $e,ke;if(n.stagger>0){var Ce=parseFloat(n.stagger);ke={transitionDelay:Ce,animationDelay:Ce,transitionDuration:0,animationDuration:0}}else $e=y(z,fe),ke=x(z,pe,$e,xe);n.$$skipPreparationClasses||i.addClass(e,pe);var Ae;if(n.transitionStyle){var Me=[O,n.transitionStyle];k(z,Me),ie.push(Me)}if(n.duration>=0){Ae=z.style[O].length>0;var Te=E(n.duration,Ae);k(z,Te),ie.push(Te)}if(n.keyframeStyle){var Se=[B,n.keyframeStyle];k(z,Se),ie.push(Se)}var De=ke?n.staggerIndex>=0?n.staggerIndex:t.count($e):0,Ee=0===De;Ee&&!n.skipBlocking&&w(z,ue);var Le=S(z,fe,$e),Fe=Le.maxDelay;G=Math.max(Fe,0),te=Le.maxDuration;var Oe={};if(Oe.hasTransitions=Le.transitionDuration>0,Oe.hasAnimations=Le.animationDuration>0,Oe.hasTransitionAll=Oe.hasTransitions&&"all"==Le.transitionProperty,Oe.applyTransitionDuration=be&&(Oe.hasTransitions&&!Oe.hasTransitionAll||Oe.hasAnimations&&!Oe.hasTransitions),Oe.applyAnimationDuration=n.duration&&Oe.hasAnimations,Oe.applyTransitionDelay=D(n.delay)&&(Oe.applyTransitionDuration||Oe.hasTransitions),Oe.applyAnimationDelay=D(n.delay)&&Oe.hasAnimations,Oe.recalculateTimingStyles=he.length>0,(Oe.applyTransitionDuration||Oe.applyAnimationDuration)&&(te=n.duration?parseFloat(n.duration):te,Oe.applyTransitionDuration&&(Oe.hasTransitions=!0,Le.transitionDuration=te,Ae=z.style[O+re].length>0,ie.push(E(te,Ae))),Oe.applyAnimationDuration&&(Oe.hasAnimations=!0,Le.animationDuration=te,ie.push(A(te)))),0===te&&!Oe.recalculateTimingStyles)return T();if(null!=n.delay){var Re=parseFloat(n.delay);Oe.applyTransitionDelay&&ie.push(M(Re)),Oe.applyAnimationDelay&&ie.push(M(Re,!0))}return null==n.duration&&Le.transitionDuration>0&&(Oe.recalculateTimingStyles=Oe.recalculateTimingStyles||Ee),ee=G*ve,ne=te*ve,n.skipBlocking||(Oe.blockTransition=Le.transitionDuration>0,Oe.blockKeyframeAnimation=Le.animationDuration>0&&ke.animationDelay>0&&0===ke.animationDuration),n.from&&(n.cleanupStyles&&F(j,z,Object.keys(n.from)),m(e,n)),Oe.blockTransition||Oe.blockKeyframeAnimation?b(te):n.skipBlocking||w(z,!1),{$$willAnimate:!0,end:u,start:function(){return q?void 0:(X={end:u,cancel:d,resume:null,pause:null},V=new r(X),C(Y),V)}}}}]}],$e=["$$animationProvider",function(e){function t(e){return e.parentNode&&11===e.parentNode.nodeType}e.drivers.push("$$animateCssDriver");var n="ng-animate-shim",i="ng-anchor",r="ng-anchor-out",o="ng-anchor-in";this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(e,a,s,l,u,c,d){function p(e){return e.replace(/\bng-\S+\b/g,"")}function f(e,t){return z(e)&&(e=e.split(" ")),z(t)&&(t=t.split(" ")),e.filter(function(e){return-1===t.indexOf(e)}).join(" ")}function m(t,a,l){function u(e){var t={},n=_(e).getBoundingClientRect();return N(["width","height","top","left"],function(e){var i=n[e];switch(e){case"top":i+=y.scrollTop;break;case"left":i+=y.scrollLeft}t[e]=Math.floor(i)+"px"}),t}function c(){var t=e(g,{addClass:r,delay:!0,from:u(a)});return t.$$willAnimate?t:null}function d(e){return e.attr("class")||""}function h(){var t=p(d(l)),n=f(t,v),i=f(v,t),a=e(g,{to:u(l),addClass:o+" "+n,
|
40
|
+
removeClass:r+" "+i,delay:!0});return a.$$willAnimate?a:null}function m(){g.remove(),a.removeClass(n),l.removeClass(n)}var g=j(_(a).cloneNode(!0)),v=p(d(g));a.addClass(n),l.addClass(n),g.addClass(i),x.append(g);var b,w=c();if(!w&&(b=h(),!b))return m();var $=w||b;return{start:function(){function e(){n&&n.end()}var t,n=$.start();return n.done(function(){return n=null,!b&&(b=h())?(n=b.start(),n.done(function(){n=null,m(),t.complete()}),n):(m(),void t.complete())}),t=new s({end:e,cancel:e})}}}function g(e,t,n,i){var r=v(e,I),o=v(t,I),a=[];return N(i,function(e){var t=e.out,i=e["in"],r=m(n,t,i);r&&a.push(r)}),r||o||0!==a.length?{start:function(){function e(){N(t,function(e){e.end()})}var t=[];r&&t.push(r.start()),o&&t.push(o.start()),N(a,function(e){t.push(e.start())});var n=new s({end:e,cancel:e});return s.all(t,function(e){n.complete(e)}),n}}:void 0}function v(t){var n=t.element,i=t.options||{};t.structural&&(i.event=t.event,i.structural=!0,i.applyClassesEarly=!0,"leave"===t.event&&(i.onDone=i.domOperation)),i.preparationClasses&&(i.event=C(i.event,i.preparationClasses));var r=e(n,i);return r.$$willAnimate?r:null}if(!u.animations&&!u.transitions)return I;var y=d[0].body,b=_(l),x=j(t(b)||y.contains(b)?b:y);h(c);return function(e){return e.from&&e.to?g(e.from,e.to,e.classes,e.anchors):v(e)}}]}],ke=["$animateProvider",function(e){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(t,n,i){function r(n){n=H(n)?n:n.split(" ");for(var i=[],r={},o=0;o<n.length;o++){var a=n[o],s=e.$$registeredAnimations[a];s&&!r[a]&&(i.push(t.get(s)),r[a]=!0)}return i}var o=h(i);return function(e,t,i,a){function s(){a.domOperation(),o(e,a)}function l(e,t,i,r,o){var a;switch(i){case"animate":a=[t,r.from,r.to,o];break;case"setClass":a=[t,m,g,o];break;case"addClass":a=[t,m,o];break;case"removeClass":a=[t,g,o];break;default:a=[t,o]}a.push(r);var s=e.apply(e,a);if(s)if(V(s.start)&&(s=s.start()),s instanceof n)s.done(o);else if(V(s))return s;return I}function u(e,t,i,r,o){var a=[];return N(r,function(r){var s=r[o];s&&a.push(function(){var r,o,a=!1,u=function(e){a||(a=!0,(o||I)(e),r.complete(!e))};return r=new n({end:function(){u()},cancel:function(){u(!0)}}),o=l(s,e,t,i,function(e){var t=e===!1;u(t)}),r})}),a}function c(e,t,i,r,o){var a=u(e,t,i,r,o);if(0===a.length){var s,l;"beforeSetClass"===o?(s=u(e,"removeClass",i,r,"beforeRemoveClass"),l=u(e,"addClass",i,r,"beforeAddClass")):"setClass"===o&&(s=u(e,"removeClass",i,r,"removeClass"),l=u(e,"addClass",i,r,"addClass")),s&&(a=a.concat(s)),l&&(a=a.concat(l))}if(0!==a.length)return function(e){var t=[];return a.length&&N(a,function(e){t.push(e())}),t.length?n.all(t,e):e(),function(e){N(t,function(t){e?t.cancel():t.end()})}}}3===arguments.length&&q(i)&&(a=i,i=null),a=p(a),i||(i=e.attr("class")||"",a.addClass&&(i+=" "+a.addClass),a.removeClass&&(i+=" "+a.removeClass));var d,h,m=a.addClass,g=a.removeClass,v=r(i);if(v.length){var y,_;"leave"==t?(_="leave",y="afterLeave"):(_="before"+t.charAt(0).toUpperCase()+t.substr(1),y=t),"enter"!==t&&"move"!==t&&(d=c(e,t,a,v,_)),h=c(e,t,a,v,y)}return d||h?{start:function(){function t(t){l=!0,s(),f(e,a),u.complete(t)}function i(e){l||((r||I)(e),t(e))}var r,o=[];d&&o.push(function(e){r=d(e)}),o.length?o.push(function(e){s(),e(!0)}):s(),h&&o.push(function(e){r=h(e)});var l=!1,u=new n({end:function(){i()},cancel:function(){i(!0)}});return n.chain(o,t),u}}:void 0}}]}],Ce=["$$animationProvider",function(e){e.drivers.push("$$animateJsDriver"),this.$get=["$$animateJs","$$AnimateRunner",function(e,t){function n(t){var n=t.element,i=t.event,r=t.options,o=t.classes;return e(n,i,o,r)}return function(e){if(e.from&&e.to){var i=n(e.from),r=n(e.to);if(!i&&!r)return;return{start:function(){function e(){return function(){N(o,function(e){e.end()})}}function n(e){a.complete(e)}var o=[];i&&o.push(i.start()),r&&o.push(r.start()),t.all(o,n);var a=new t({end:e(),cancel:e()});return a}}}return n(e)}}]}],Ae="data-ng-animate",Me="$ngAnimatePin",Te=["$animateProvider",function(e){function t(e,t,n,i){return a[e].some(function(e){return e(t,n,i)})}function n(e,t){e=e||{};var n=(e.addClass||"").length>0,i=(e.removeClass||"").length>0;return t?n&&i:n||i}var r=1,o=2,a=this.rules={skip:[],cancel:[],join:[]};a.join.push(function(e,t,i){return!t.structural&&n(t.options)}),a.skip.push(function(e,t,i){return!t.structural&&!n(t.options)}),a.skip.push(function(e,t,n){return"leave"==n.event&&t.structural}),a.skip.push(function(e,t,n){return n.structural&&n.state===o&&!t.structural}),a.cancel.push(function(e,t,n){return n.structural&&t.structural}),a.cancel.push(function(e,t,n){return n.state===o&&t.structural}),a.cancel.push(function(e,t,n){var i=t.options,r=n.options;return i.addClass&&i.addClass===r.removeClass||i.removeClass&&i.removeClass===r.addClass}),this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(a,s,c,d,m,g,y,w,$,k){function C(){var e=!1;return function(t){e?t():s.$$postDigest(function(){e=!0,t()})}}function A(e,t){return v(e,t,{})}function M(e,t){var n=_(e),i=[],r=I[t];return r&&N(r,function(e){e.node.contains(n)&&i.push(e.callback)}),i}function T(e,i,u){function c(t,n,i,r){$(function(){var t=M(e,n);t.length&&a(function(){N(t,function(t){t(e,i,r)})})}),t.progress(n,i,r)}function d(t){x(e,u),J(e,u),f(e,u),u.domOperation(),w.complete(!t)}var h,m;e=l(e),e&&(h=_(e),m=e.parent()),u=p(u);var w=new y,$=C();if(H(u.addClass)&&(u.addClass=u.addClass.join(" ")),u.addClass&&!z(u.addClass)&&(u.addClass=null),H(u.removeClass)&&(u.removeClass=u.removeClass.join(" ")),u.removeClass&&!z(u.removeClass)&&(u.removeClass=null),u.from&&!q(u.from)&&(u.from=null),u.to&&!q(u.to)&&(u.to=null),!h)return d(),w;var k=[h.className,u.addClass,u.removeClass].join(" ");if(!K(k))return d(),w;var T=["enter","move","leave"].indexOf(i)>=0,E=!B||R.get(h),P=!E&&O.get(h)||{},I=!!P.state;if(E||I&&P.state==r||(E=!L(e,m,i)),E)return d(),w;T&&S(e);var Y={structural:T,element:e,event:i,close:d,options:u,runner:w};if(I){var j=t("skip",e,Y,P);if(j)return P.state===o?(d(),w):(v(e,P.options,u),P.runner);var W=t("cancel",e,Y,P);if(W)if(P.state===o)P.runner.end();else{if(!P.structural)return v(e,P.options,Y.options),P.runner;P.close()}else{var U=t("join",e,Y,P);if(U){if(P.state!==o)return b(e,T?i:null,u),i=Y.event=P.event,u=v(e,P.options,Y.options),P.runner;A(e,u)}}}else A(e,u);var V=Y.structural;if(V||(V="animate"===Y.event&&Object.keys(Y.options.to||{}).length>0||n(Y.options)),!V)return d(),D(e),w;var X=(P.counter||0)+1;return Y.counter=X,F(e,r,Y),s.$$postDigest(function(){var t=O.get(h),r=!t;t=t||{};var a=e.parent()||[],s=a.length>0&&("animate"===t.event||t.structural||n(t.options));if(r||t.counter!==X||!s)return r&&(J(e,u),f(e,u)),(r||T&&t.event!==i)&&(u.domOperation(),w.end()),void(s||D(e));i=!t.structural&&n(t.options,!0)?"setClass":t.event,F(e,o);var l=g(e,i,t.options);l.done(function(t){d(!t);var n=O.get(h);n&&n.counter===X&&D(_(e)),c(w,i,"close",{})}),w.setHost(l),c(w,i,"start",{})}),w}function S(e){var t=_(e),n=t.querySelectorAll("["+Ae+"]");N(n,function(e){var t=parseInt(e.getAttribute(Ae)),n=O.get(e);switch(t){case o:n.runner.end();case r:n&&O.remove(e)}})}function D(e){var t=_(e);t.removeAttribute(Ae),O.remove(t)}function E(e,t){return _(e)===_(t)}function L(e,t,n){var i,r=j(d[0].body),o=E(e,r)||"HTML"===e[0].nodeName,a=E(e,c),s=!1,l=e.data(Me);for(l&&(t=l);t&&t.length;){a||(a=E(t,c));var u=t[0];if(u.nodeType!==G)break;var h=O.get(u)||{};if(s||(s=h.structural||R.get(u)),W(i)||i===!0){var p=t.data(te);U(p)&&(i=p)}if(s&&i===!1)break;a||(a=E(t,c),a||(l=t.data(Me),l&&(t=l))),o||(o=E(t,r)),t=t.parent()}var f=!s||i;return f&&a&&o}function F(e,t,n){n=n||{},n.state=t;var i=_(e);i.setAttribute(Ae,t);var r=O.get(i),o=r?Y(r,n):n;O.put(i,o)}var O=new m,R=new m,B=null,P=s.$watch(function(){return 0===w.totalPendingRequests},function(e){e&&(P(),s.$$postDigest(function(){s.$$postDigest(function(){null===B&&(B=!0)})}))}),I={},V=e.classNameFilter(),K=V?function(e){return V.test(e)}:function(){return!0},J=h($);return{on:function(e,t,n){var i=u(t);I[e]=I[e]||[],I[e].push({node:i,callback:n})},off:function(e,t,n){function i(e,t,n){var i=u(t);return e.filter(function(e){var t=e.node===i&&(!n||e.callback===n);return!t})}var r=I[e];r&&(I[e]=1===arguments.length?null:i(r,t,n))},pin:function(e,t){i(X(e),"element","not an element"),i(X(t),"parentElement","not an element"),e.data(Me,t)},push:function(e,t,n,i){return n=n||{},n.domOperation=i,T(e,t,n)},enabled:function(e,t){var n=arguments.length;if(0===n)t=!!B;else{var i=X(e);if(i){var r=_(e),o=R.get(r);1===n?t=!o:(t=!!t,t?o&&R.remove(r):R.put(r,!0))}else t=B=!!e}return t}}}]}],Se=["$$rAF",function(e){function t(t){n.push(t),n.length>1||e(function(){for(var e=0;e<n.length;e++)n[e]();n=[]})}var n=[];return function(){var e=!1;return t(function(){e=!0}),function(n){e?n():t(n)}}}],De=["$q","$sniffer","$$animateAsyncRun",function(e,t,n){function i(e){this.setHost(e),this._doneCallbacks=[],this._runInAnimationFrame=n(),this._state=0}var r=0,o=1,a=2;return i.chain=function(e,t){function n(){return i===e.length?void t(!0):void e[i](function(e){return e===!1?void t(!1):(i++,void n())})}var i=0;n()},i.all=function(e,t){function n(n){r=r&&n,++i===e.length&&t(r)}var i=0,r=!0;N(e,function(e){e.done(n)})},i.prototype={setHost:function(e){this.host=e||{}},done:function(e){this._state===a?e():this._doneCallbacks.push(e)},progress:I,getPromise:function(){if(!this.promise){var t=this;this.promise=e(function(e,n){t.done(function(t){t===!1?n():e()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},"catch":function(e){return this.getPromise()["catch"](e)},"finally":function(e){return this.getPromise()["finally"](e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;t._state===r&&(t._state=o,t._runInAnimationFrame(function(){t._resolve(e)}))},_resolve:function(e){this._state!==a&&(N(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=a)}},i}],Ee=["$animateProvider",function(e){function t(e,t){e.data(s,t)}function n(e){e.removeData(s)}function i(e){return e.data(s)}var o="ng-animate-ref",a=this.drivers=[],s="$$animationRunner";this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(e,s,l,u,c,d){function m(e){function t(e){if(e.processed)return e;e.processed=!0;var n=e.domNode,i=n.parentNode;o.put(n,e);for(var a;i;){if(a=o.get(i)){a.processed||(a=t(a));break}i=i.parentNode}return(a||r).children.push(e),e}function n(e){var t,n=[],i=[];for(t=0;t<e.children.length;t++)i.push(e.children[t]);var r=i.length,o=0,a=[];for(t=0;t<i.length;t++){var s=i[t];0>=r&&(r=o,o=0,n.push(a),a=[]),a.push(s.fn),s.children.forEach(function(e){o++,i.push(e)}),r--}return a.length&&n.push(a),n}var i,r={children:[]},o=new c;for(i=0;i<e.length;i++){var a=e[i];o.put(a.domNode,e[i]={domNode:a.domNode,fn:a.fn,children:[]})}for(i=0;i<e.length;i++)t(e[i]);return n(r)}var g=[],v=h(e);return function(c,h,y){function b(e){var t="["+o+"]",n=e.hasAttribute(o)?[e]:e.querySelectorAll(t),i=[];return N(n,function(e){var t=e.getAttribute(o);t&&t.length&&i.push(e)}),i}function x(e){var t=[],n={};N(e,function(e,i){var r=e.element,a=_(r),s=e.event,l=["enter","move"].indexOf(s)>=0,u=e.structural?b(a):[];if(u.length){var c=l?"to":"from";N(u,function(e){var t=e.getAttribute(o);n[t]=n[t]||{},n[t][c]={animationID:i,element:j(e)}})}else t.push(e)});var i={},r={};return N(n,function(n,o){var a=n.from,s=n.to;if(!a||!s){var l=a?a.animationID:s.animationID,u=l.toString();return void(i[u]||(i[u]=!0,t.push(e[l])))}var c=e[a.animationID],d=e[s.animationID],h=a.animationID.toString();if(!r[h]){var p=r[h]={structural:!0,beforeStart:function(){c.beforeStart(),d.beforeStart()},close:function(){c.close(),d.close()},classes:w(c.classes,d.classes),from:c,to:d,anchors:[]};p.classes.length?t.push(p):(t.push(c),t.push(d))}r[h].anchors.push({out:a.element,"in":s.element})}),t}function w(e,t){e=e.split(" "),t=t.split(" ");for(var n=[],i=0;i<e.length;i++){var r=e[i];if("ng-"!==r.substring(0,3))for(var o=0;o<t.length;o++)if(r===t[o]){n.push(r);break}}return n.join(" ")}function $(e){for(var t=a.length-1;t>=0;t--){var n=a[t];if(l.has(n)){var i=l.get(n),r=i(e);if(r)return r}}}function k(){c.addClass(ee),E&&e.addClass(c,E)}function C(e,t){function n(e){i(e).setHost(t)}e.from&&e.to?(n(e.from.element),n(e.to.element)):n(e.element)}function A(){var e=i(c);!e||"leave"===h&&y.$$domOperationFired||e.end()}function M(t){c.off("$destroy",A),n(c),v(c,y),f(c,y),y.domOperation(),E&&e.removeClass(c,E),c.removeClass(ee),S.complete(!t)}y=p(y);var T=["enter","move","leave"].indexOf(h)>=0,S=new u({end:function(){M()},cancel:function(){M(!0)}});if(!a.length)return M(),S;t(c,S);var D=r(c.attr("class"),r(y.addClass,y.removeClass)),E=y.tempClasses;return E&&(D+=" "+E,y.tempClasses=null),g.push({element:c,classes:D,event:h,structural:T,options:y,beforeStart:k,close:M}),c.on("$destroy",A),g.length>1?S:(s.$$postDigest(function(){var e=[];N(g,function(t){i(t.element)?e.push(t):t.close()}),g.length=0;var t=x(e),n=[];N(t,function(e){n.push({domNode:_(e.from?e.from.element:e.element),fn:function(){e.beforeStart();var t,n=e.close,r=e.anchors?e.from.element||e.to.element:e.element;if(i(r)){var o=$(e);o&&(t=o.start)}if(t){var a=t();a.done(function(e){n(!e)}),C(e,a)}else n()}})}),d(m(n))}),S)}}]}];t.module("ngAnimate",[]).directive("ngAnimateChildren",me).factory("$$rAFScheduler",fe).factory("$$AnimateRunner",De).factory("$$animateAsyncRun",Se).provider("$$animateQueue",Te).provider("$$animation",Ee).provider("$animateCss",we).provider("$$animateCssDriver",$e).provider("$$animateJs",ke).provider("$$animateJsDriver",Ce)}(window,window.angular),function(e,t,n){"use strict";function i(e){return null!=e&&""!==e&&"hasOwnProperty"!==e&&s.test("."+e)}function r(e,r){if(!i(r))throw a("badmember",'Dotted member path "@{0}" is invalid.',r);for(var o=r.split("."),s=0,l=o.length;l>s&&t.isDefined(e);s++){var u=o[s];e=null!==e?e[u]:n}return e}function o(e,n){n=n||{},t.forEach(n,function(e,t){delete n[t]});for(var i in e)!e.hasOwnProperty(i)||"$"===i.charAt(0)&&"$"===i.charAt(1)||(n[i]=e[i]);return n}var a=t.$$minErr("$resource"),s=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;t.module("ngResource",["ng"]).provider("$resource",function(){var e=/^https?:\/\/[^\/]*/,i=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}},this.$get=["$http","$q",function(s,l){function u(e){return c(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function c(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function d(e,t){this.template=e,this.defaults=m({},i.defaults,t),this.urlParams={}}function h(e,u,c,y){function _(e,t){var n={};return t=m({},u,t),f(t,function(t,i){v(t)&&(t=t()),n[i]=t&&t.charAt&&"@"==t.charAt(0)?r(e,t.substr(1)):t}),n}function b(e){return e.resource}function x(e){o(e||{},this)}var w=new d(e,y);return c=m({},i.defaults.actions,c),x.prototype.toJSON=function(){var e=m({},this);return delete e.$promise,delete e.$resolved,e},f(c,function(e,i){var r=/^(POST|PUT|PATCH)$/i.test(e.method);x[i]=function(u,c,d,h){var y,$,k,C={};switch(arguments.length){case 4:k=h,$=d;case 3:case 2:if(!v(c)){C=u,y=c,$=d;break}if(v(u)){$=u,k=c;break}$=c,k=d;case 1:v(u)?$=u:r?y=u:C=u;break;case 0:break;default:throw a("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var A=this instanceof x,M=A?y:e.isArray?[]:new x(y),T={},S=e.interceptor&&e.interceptor.response||b,D=e.interceptor&&e.interceptor.responseError||n;f(e,function(e,t){"params"!=t&&"isArray"!=t&&"interceptor"!=t&&(T[t]=g(e))}),r&&(T.data=y),w.setUrlParams(T,m({},_(y,e.params||{}),C),e.url);var E=s(T).then(function(n){var r=n.data,s=M.$promise;if(r){if(t.isArray(r)!==!!e.isArray)throw a("badcfg","Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})",i,e.isArray?"array":"object",t.isArray(r)?"array":"object",T.method,T.url);e.isArray?(M.length=0,f(r,function(e){"object"==typeof e?M.push(new x(e)):M.push(e)})):(o(r,M),M.$promise=s)}return M.$resolved=!0,n.resource=M,n},function(e){return M.$resolved=!0,(k||p)(e),l.reject(e)});return E=E.then(function(e){var t=S(e);return($||p)(t,e.headers),t},D),A?E:(M.$promise=E,M.$resolved=!1,M)},x.prototype["$"+i]=function(e,t,n){v(e)&&(n=t,t=e,e={});var r=x[i].call(this,e,this,t,n);return r.$promise||r}}),x.bind=function(t){return h(e,m({},u,t),c)},x}var p=t.noop,f=t.forEach,m=t.extend,g=t.copy,v=t.isFunction;return d.prototype={setUrlParams:function(n,i,r){var o,s,l=this,c=r||l.template,d="",h=l.urlParams={};f(c.split(/\W/),function(e){if("hasOwnProperty"===e)throw a("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(e)&&e&&new RegExp("(^|[^\\\\]):"+e+"(\\W|$)").test(c)&&(h[e]=!0)}),c=c.replace(/\\:/g,":"),c=c.replace(e,function(e){return d=e,""}),i=i||{},f(l.urlParams,function(e,n){o=i.hasOwnProperty(n)?i[n]:l.defaults[n],t.isDefined(o)&&null!==o?(s=u(o),c=c.replace(new RegExp(":"+n+"(\\W|$)","g"),function(e,t){return s+t})):c=c.replace(new RegExp("(/?):"+n+"(\\W|$)","g"),function(e,t,n){return"/"==n.charAt(0)?n:t+n})}),l.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/"),c=c.replace(/\/\.(?=\w+($|\?))/,"."),n.url=d+c.replace(/\/\\\./,"/."),f(i,function(e,t){l.urlParams[t]||(n.params=n.params||{},n.params[t]=e)})}},h}]})}(window,window.angular),/* ***** BEGIN LICENSE BLOCK *****
|
41
|
+
* Distributed under the BSD license:
|
42
|
+
*
|
43
|
+
* Copyright (c) 2010, Ajax.org B.V.
|
44
|
+
* All rights reserved.
|
45
|
+
*
|
46
|
+
* Redistribution and use in source and binary forms, with or without
|
47
|
+
* modification, are permitted provided that the following conditions are met:
|
48
|
+
* * Redistributions of source code must retain the above copyright
|
49
|
+
* notice, this list of conditions and the following disclaimer.
|
50
|
+
* * Redistributions in binary form must reproduce the above copyright
|
51
|
+
* notice, this list of conditions and the following disclaimer in the
|
52
|
+
* documentation and/or other materials provided with the distribution.
|
53
|
+
* * Neither the name of Ajax.org B.V. nor the
|
54
|
+
* names of its contributors may be used to endorse or promote products
|
55
|
+
* derived from this software without specific prior written permission.
|
56
|
+
*
|
57
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
58
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
59
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
60
|
+
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
61
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
62
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
63
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
64
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
65
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
66
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
67
|
+
*
|
68
|
+
* ***** END LICENSE BLOCK ***** */
|
69
|
+
function(){function e(e){var t=n;e&&(n[e]||(n[e]={}),t=n[e]),t.define&&t.define.packaged||(i.original=t.define,t.define=i,t.define.packaged=!0),t.require&&t.require.packaged||(o.original=t.require,t.require=o,t.require.packaged=!0)}var t="",n=function(){return this}();if(n||"undefined"==typeof window||(n=window),t||"undefined"==typeof requirejs){var i=function(e,t,n){return"string"!=typeof e?void(i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())):(2==arguments.length&&(n=t),void(i.modules[e]||(i.payloads[e]=n,i.modules[e]=null)))};i.modules={},i.payloads={};var r=function(e,t,n){if("string"==typeof t){var i=s(e,t);if(void 0!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],a=0,l=t.length;l>a;++a){var u=s(e,t[a]);if(void 0==u&&o.original)return;r.push(u)}return n&&n.apply(null,r)||!0}},o=function(e,t){var n=r("",e,t);return void 0==n&&o.original?o.original.apply(this,arguments):n},a=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return a(e,n[0])+"!"+a(e,n[1])}if("."==t.charAt(0)){var i=e.split("/").slice(0,-1).join("/");for(t=i+"/"+t;-1!==t.indexOf(".")&&r!=t;){var r=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},s=function(e,t){t=a(e,t);var n=i.modules[t];if(!n){if(n=i.payloads[t],"function"==typeof n){var o={},s={id:t,uri:"",exports:o,packaged:!0},l=function(e,n){return r(t,e,n)},u=n(l,o,s);o=u||s.exports,i.modules[t]=o,delete i.payloads[t]}n=i.modules[t]=o||n}return n};e(t)}}(),define("ace/lib/regexp",["require","exports","module"],function(e,t,n){"use strict";function i(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function r(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var i=n||0;i<e.length;i++)if(e[i]===t)return i;return-1}var o={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},a=void 0===o.exec.call(/()??/,"")[1],s=function(){var e=/^/g;return o.test.call(e,""),!e.lastIndex}();s&&a||(RegExp.prototype.exec=function(e){var t,n,l=o.exec.apply(this,arguments);if("string"==typeof e&&l){if(!a&&l.length>1&&r(l,"")>-1&&(n=RegExp(this.source,o.replace.call(i(this),"g","")),o.replace.call(e.slice(l.index),n,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(l[e]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var u=1;u<l.length;u++)t=this._xregexp.captureNames[u-1],t&&(l[t]=l[u]);!s&&this.global&&!l[0].length&&this.lastIndex>l.index&&this.lastIndex--}return l},s||(RegExp.prototype.test=function(e){var t=o.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function i(){}function r(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function o(e){return e=+e,e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=f.call(arguments,1),r=function(){if(this instanceof r){var i=t.apply(this,n.concat(f.call(arguments)));return Object(i)===i?i:this}return t.apply(e,n.concat(f.call(arguments)))};return t.prototype&&(i.prototype=t.prototype,r.prototype=new i,i.prototype=null),r});var a,s,l,u,c,d=Function.prototype.call,h=Array.prototype,p=Object.prototype,f=h.slice,m=d.bind(p.toString),g=d.bind(p.hasOwnProperty);if((c=g(p,"__defineGetter__"))&&(a=d.bind(p.__defineGetter__),s=d.bind(p.__defineSetter__),l=d.bind(p.__lookupGetter__),u=d.bind(p.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];return n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),t+1==n.length,t+1==n.length?!0:void 0}()){var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(f.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):void 0==e?e=0:0>e&&(e=Math.max(n+e,0)),n>e+t||(t=n-e);var i=this.slice(e,e+t),r=f.call(arguments,2),o=r.length;if(e===n)o&&this.push.apply(this,r);else{var a=Math.min(t,n-e),s=e+a,l=s+o-a,u=n-s,c=n-a;if(s>l)for(var d=0;u>d;++d)this[l+d]=this[s+d];else if(l>s)for(d=u;d--;)this[l+d]=this[s+d];if(o&&e===c)this.length=c,this.push.apply(this,r);else for(this.length=c+o,d=0;o>d;++d)this[e+d]=r[d]}return i};Array.isArray||(Array.isArray=function(e){return"[object Array]"==m(e)});var y=Object("a"),_="a"!=y[0]||!(0 in y);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=B(this),n=_&&"[object String]"==m(this)?this.split(""):t,i=arguments[1],r=-1,o=n.length>>>0;if("[object Function]"!=m(e))throw new TypeError;for(;++r<o;)r in n&&e.call(i,n[r],r,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=B(this),n=_&&"[object String]"==m(this)?this.split(""):t,i=n.length>>>0,r=Array(i),o=arguments[1];if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");for(var a=0;i>a;a++)a in n&&(r[a]=e.call(o,n[a],a,t));return r}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,n=B(this),i=_&&"[object String]"==m(this)?this.split(""):n,r=i.length>>>0,o=[],a=arguments[1];if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");for(var s=0;r>s;s++)s in i&&(t=i[s],e.call(a,t,s,n)&&o.push(t));return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=B(this),n=_&&"[object String]"==m(this)?this.split(""):t,i=n.length>>>0,r=arguments[1];if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");for(var o=0;i>o;o++)if(o in n&&!e.call(r,n[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=B(this),n=_&&"[object String]"==m(this)?this.split(""):t,i=n.length>>>0,r=arguments[1];if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");for(var o=0;i>o;o++)if(o in n&&e.call(r,n[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=B(this),n=_&&"[object String]"==m(this)?this.split(""):t,i=n.length>>>0;if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var r,o=0;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in n){r=n[o++];break}if(++o>=i)throw new TypeError("reduce of empty array with no initial value")}for(;i>o;o++)o in n&&(r=e.call(void 0,r,n[o],o,t));return r}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=B(this),n=_&&"[object String]"==m(this)?this.split(""):t,i=n.length>>>0;if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,o=i-1;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in n){r=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do o in this&&(r=e.call(void 0,r,n[o],o,t));while(o--);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=_&&"[object String]"==m(this)?this.split(""):B(this),n=t.length>>>0;if(!n)return-1;var i=0;for(arguments.length>1&&(i=o(arguments[1])),i=i>=0?i:Math.max(0,n+i);n>i;i++)if(i in t&&t[i]===e)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=_&&"[object String]"==m(this)?this.split(""):B(this),n=t.length>>>0;if(!n)return-1;var i=n-1;for(arguments.length>1&&(i=Math.min(i,o(arguments[1]))),i=i>=0?i:n-Math.abs(i);i>=0;i--)if(i in t&&e===t[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:p)}),!Object.getOwnPropertyDescriptor){var b="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(b+e);if(g(e,t)){var n,i,r;if(n={enumerable:!0,configurable:!0},c){var o=e.__proto__;e.__proto__=p;var i=l(e,t),r=u(e,t);if(e.__proto__=o,i||r)return i&&(n.get=i),r&&(n.set=r),n}return n.value=e[t],n}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var x;x=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=x();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var i=function(){};i.prototype=e,n=new i,n.__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var w=r({}),$="undefined"==typeof document||r(document.createElement("div"));if(!w||!$)var k=Object.defineProperty}if(!Object.defineProperty||k){var C="Property description must be an object: ",A="Object.defineProperty called on non-object: ",M="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(A+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError(C+n);if(k)try{return k.call(Object,e,t,n)}catch(i){}if(g(n,"value"))if(c&&(l(e,t)||u(e,t))){var r=e.__proto__;e.__proto__=p,delete e[t],e[t]=n.value,e.__proto__=r}else e[t]=n.value;else{if(!c)throw new TypeError(M);g(n,"get")&&a(e,t,n.get),g(n,"set")&&s(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)g(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(T){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";g(e,t);)t+="?";e[t]=!0;var n=g(e,t);return delete e[t],n}),!Object.keys){var S=!0,D=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],E=D.length;for(var L in{toString:null})S=!1;Object.keys=function P(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var P=[];for(var t in e)g(e,t)&&P.push(t);if(S)for(var n=0,i=E;i>n;n++){var r=D[n];g(e,r)&&P.push(r)}return P}}Date.now||(Date.now=function(){return(new Date).getTime()});var F=" \n\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||F.trim()){F="["+F+"]";var O=new RegExp("^"+F+F+"*"),R=new RegExp(F+F+"*$");String.prototype.trim=function(){return String(this).replace(O,"").replace(R,"")}}var B=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,n){"use strict";e("./regexp"),e("./es5-shim")}),define("ace/lib/dom",["require","exports","module"],function(e,t,n){"use strict";var i="http://www.w3.org/1999/xhtml";return t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||i,e):document.createElement(e)},t.hasCssClass=function(e,t){var n=(e.className||"").split(/\s+/g);return-1!==n.indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var i=n.indexOf(t);if(-1==i)break;n.splice(i,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),i=!0;;){var r=n.indexOf(t);if(-1==r)break;i=!1,n.splice(r,1)}return i&&n.push(t),e.className=n.join(" "),i},t.setCssClass=function(e,n,i){i?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,i=0;if(t=t||document,t.createStyleSheet&&(n=t.styleSheets)){for(;i<n.length;)if(n[i++].owningElement.id===e)return!0}else if(n=t.getElementsByTagName("style"))for(;i<n.length;)if(n[i++].id===e)return!0;return!1},t.importCssString=function(e,n,i){if(i=i||document,n&&t.hasCssString(n,i))return null;var r;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */"),i.createStyleSheet?(r=i.createStyleSheet(),r.cssText=e,n&&(r.owningElement.id=n)):(r=t.createElement("style"),r.appendChild(i.createTextNode(e)),n&&(r.id=n),t.getDocumentHead(i).appendChild(r))},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var i=t.createElement("link");i.rel="stylesheet",i.href=e,t.getDocumentHead(n).appendChild(i)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=t.createElement("ace_outer"),r=i.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",i.appendChild(n);var o=e.documentElement;o.appendChild(i);var a=n.offsetWidth;r.overflow="scroll";var s=n.offsetWidth;return a==s&&(s=i.clientWidth),o.removeChild(i),a-s},"undefined"==typeof document?void(t.importCssString=function(){}):(void 0!==window.pageYOffset?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.setInnerHtml=function(e,t){var n=e.cloneNode(!1);return n.innerHTML=t,e.parentNode.replaceChild(n,e),n},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),void(t.getParentWindow=function(e){return e.defaultView||e.parentWindow}))}),define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(e,t,n){"use strict";e("./fixoldbrowsers");var i=e("./oop"),r=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,"super":8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n["return"],n.escape=n.esc,n.del=n["delete"],n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter(function(e){return t&n.KEY_MODS[e]}).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,r),t.keyCodeToString=function(e){var t=r[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";if(t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS},"object"==typeof navigator){var i=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),r=navigator.userAgent;t.isWin="win"==i,t.isMac="mac"==i,t.isLinux="linux"==i,t.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((r.match(/rv\:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isIPad=r.indexOf("iPad")>=0,t.isTouchPad=r.indexOf("TouchPad")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function i(e,t,n){var i=u(t);if(!a.isMac&&s){if(s.OSKey&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var r="location"in t?t.location:t.keyLocation;if(17===n&&1===r)1==s[n]&&(l=t.timeStamp);else if(18===n&&3===i&&2===r){var c=t.timeStamp-l;50>c&&(s.altGr=!0)}}}if(n in o.MODIFIER_KEYS&&(n=-1),8&i&&n>=91&&93>=n&&(n=-1),!i&&13===n){var r="location"in t?t.location:t.keyLocation;if(3===r&&(e(t,i,-n),t.defaultPrevented))return}if(a.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return i||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS?e(t,i,n):!1}function r(){s=Object.create(null),s.count=0,s.lastT=0}var o=e("./keys"),a=e("./useragent"),s=null,l=0;t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var i=function(){n.call(e,window.event)};n._wrapper=i,e.attachEvent("on"+t,i)}},t.removeListener=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):void(e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n))},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||a.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,i){function r(e){n&&n(e),i&&i(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",r,!0),t.removeListener(document,"dragstart",r,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",r,!0),t.addListener(document,"dragstart",r,!0),r},t.addTouchMoveListener=function(e,n){if("ontouchmove"in e){var i,r;t.addListener(e,"touchstart",function(e){var t=e.changedTouches[0];i=t.clientX,r=t.clientY}),t.addListener(e,"touchmove",function(e){var t=1,o=e.changedTouches[0];e.wheelX=-(o.clientX-i)/t,e.wheelY=-(o.clientY-r)/t,i=o.clientX,r=o.clientY,n(e)})}},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){var t=8;void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/t,e.wheelY=-e.wheelDeltaY/t):(e.wheelX=0,e.wheelY=-e.wheelDelta/t),n(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){var t=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*t||0,e.wheelY=e.deltaY*t||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}n(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),n(e)})},t.addMultiMouseDownListener=function(e,n,i,r){var o,s,l,u=0,c={2:"dblclick",3:"tripleclick",4:"quadclick"};t.addListener(e,"mousedown",function(e){if(0!==t.getButton(e)?u=0:e.detail>1?(u++,u>4&&(u=1)):u=1,a.isIE){var d=Math.abs(e.clientX-o)>5||Math.abs(e.clientY-s)>5;(!l||d)&&(u=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},n[u-1]||600),1==u&&(o=e.clientX,s=e.clientY)}if(e._clicks=u,i[r]("mousedown",e),u>4)u=0;else if(u>1)return i[r](c[u],e)}),a.isOldIE&&t.addListener(e,"dblclick",function(e){u=2,l&&clearTimeout(l),l=setTimeout(function(){l=null},n[u-1]||600),i[r]("mousedown",e),i[r](c[u],e)})};var u=!a.isMac||!a.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};if(t.getModifierString=function(e){return o.KEY_MODS[u(e)]},t.addCommandKeyListener=function(e,n){var o=t.addListener;if(a.isOldGecko||a.isOpera&&!("KeyboardEvent"in window)){var l=null;o(e,"keydown",function(e){l=e.keyCode}),o(e,"keypress",function(e){return i(n,e,l)})}else{var u=null;o(e,"keydown",function(e){var t=e.keyCode;s[t]=(s[t]||0)+1,91==t||92==t?s.OSKey=!0:s.OSKey&&e.timeStamp-s.lastT>200&&1==s.count&&r(),1==s[t]&&s.count++,s.lastT=e.timeStamp;var o=i(n,e,t);return u=e.defaultPrevented,o}),o(e,"keypress",function(e){u&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),u=null)}),o(e,"keyup",function(e){var t=e.keyCode;s[t]?s.count=Math.max(s.count-1,0):r(),(91==t||92==t)&&(s.OSKey=!1),s[t]=null}),s||(r(),o(window,"focus",r))}},"object"==typeof window&&window.postMessage&&!a.isOldIE){var c=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+c;t.addListener(n,"message",function r(o){o.data==i&&(t.stopPropagation(o),t.removeListener(n,"message",r),e())}),n.postMessage(i,"*")}}t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;i>n;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function o(e){if("object"!=typeof e||!e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0;n<e.length;n++)t[n]=o(e[n]);return t}var i=e.constructor;if(i===RegExp)return e;t=i();for(var n in e)t[n]=o(e[n]);return t},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},i=function(e){return i.cancel(),t=setTimeout(n,e||0),i};return i.schedule=i,i.call=function(){return this.cancel(),e(),i},i.cancel=function(){return clearTimeout(t),t=null,i},i.isPending=function(){return t},i},t.delayedCall=function(e,t){var n=null,i=function(){n=null,e()},r=function(e){null==n&&(n=setTimeout(i,e||t))};return r.delay=function(e){n&&clearTimeout(n),n=setTimeout(i,e||t)},r.schedule=r,r.call=function(){this.cancel(),e()},r.cancel=function(){n&&clearTimeout(n),n=null},r.isPending=function(){return n},r}}),define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),a=e("../lib/lang"),s=r.isChrome<18,l=r.isIE,u=function(e,t){function n(e){if(!m){if(m=!0,T)t=0,n=e?0:d.value.length-1;else var t=e?2:1,n=2;try{d.setSelectionRange(t,n)}catch(i){}m=!1}}function u(){m||(d.value=h,r.isWebKit&&x.schedule())}function c(){clearTimeout(N),N=setTimeout(function(){g&&(d.style.cssText=g,g=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},r.isOldIE?200:0)}var d=o.createElement("textarea");d.className="ace_text-input",r.isTouchPad&&d.setAttribute("x-palm-disable-auto-cap",!0),d.setAttribute("wrap","off"),d.setAttribute("autocorrect","off"),d.setAttribute("autocapitalize","off"),d.setAttribute("spellcheck",!1),d.style.opacity="0",r.isOldIE&&(d.style.top="-1000px"),e.insertBefore(d,e.firstChild);var h="",p=!1,f=!1,m=!1,g="",v=!0;try{var y=document.activeElement===d}catch(_){}i.addListener(d,"blur",function(e){t.onBlur(e),y=!1}),i.addListener(d,"focus",function(e){y=!0,t.onFocus(e),n()}),this.focus=function(){if(g)return d.focus();var e=d.style.top;d.style.position="fixed",d.style.top="-1000px",d.focus(),setTimeout(function(){d.style.position="","-1000px"==d.style.top&&(d.style.top=e)},0)},this.blur=function(){d.blur()},this.isFocused=function(){return y};var b=a.delayedCall(function(){y&&n(v)}),x=a.delayedCall(function(){m||(d.value=h,y&&n())});r.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=v&&(v=!v,b.schedule())}),u(),y&&t.onFocus();var w=function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length};if(!d.setSelectionRange&&d.createTextRange&&(d.setSelectionRange=function(e,t){var n=this.createTextRange();n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select()},w=function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?t.text==e.value:!1}),r.isOldIE){var $=!1,k=function(e){if(!$){var t=d.value;if(!m&&t&&t!=h){if(e&&t==h[0])return C.schedule();D(t),$=!0,u(),$=!1}}},C=a.delayedCall(k);i.addListener(d,"propertychange",k);var A={13:1,27:1};i.addListener(d,"keyup",function(e){return!m||d.value&&!A[e.keyCode]||setTimeout(Y,0),(d.value.charCodeAt(0)||0)<129?C.call():void(m?I():P())}),i.addListener(d,"keydown",function(e){C.schedule(50)})}var M=function(e){p?p=!1:w(d)?(t.selectAll(),n()):T&&n(t.selection.isEmpty())},T=null;this.setInputHandler=function(e){T=e},this.getInputHandler=function(){return T};var S=!1,D=function(e){T&&(e=T(e),T=null),f?(n(),e&&t.onPaste(e),f=!1):e==h.charAt(0)?S?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==h?e=e.substr(2):e.charAt(0)==h.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),S&&(S=!1)},E=function(e){if(!m){var t=d.value;D(t),u()}},L=function(e,t){var n=e.clipboardData||window.clipboardData;if(n&&!s){var i=l?"Text":"text/plain";return t?n.setData(i,t)!==!1:n.getData(i)}},F=function(e,r){var o=t.getCopyText();return o?void(L(e,o)?(r?t.onCut():t.onCopy(),i.preventDefault(e)):(p=!0,d.value=o,d.select(),setTimeout(function(){p=!1,u(),n(),r?t.onCut():t.onCopy()}))):i.preventDefault(e)},O=function(e){F(e,!0)},R=function(e){F(e,!1)},B=function(e){var o=L(e);"string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(n),i.preventDefault(e)):(d.value="",f=!0)};i.addCommandKeyListener(d,t.onCommandKey.bind(t)),i.addListener(d,"select",M),i.addListener(d,"input",E),i.addListener(d,"cut",O),i.addListener(d,"copy",R),i.addListener(d,"paste",B),"oncut"in d&&"oncopy"in d&&"onpaste"in d||i.addListener(e,"keydown",function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:R(e);break;case 86:B(e);break;case 88:O(e)}});var P=function(e){m||!t.onCompositionStart||t.$readOnly||(m={},t.onCompositionStart(),setTimeout(I,0),t.on("mousedown",Y),t.selection.isEmpty()||(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())},I=function(){if(m&&t.onCompositionUpdate&&!t.$readOnly){var e=d.value.replace(/\x01/g,"");if(m.lastValue!==e&&(t.onCompositionUpdate(e),m.lastValue&&t.undo(),m.lastValue=e,m.lastValue)){var n=t.selection.getRange();t.insert(m.lastValue),t.session.markUndoGroup(),m.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},Y=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=m;m=!1;var i=setTimeout(function(){i=null;var e=d.value.replace(/\x01/g,"");m||(e==n.lastValue?u():!n.lastValue&&e&&(u(),D(e)))});T=function(e){return i&&clearTimeout(i),e=e.replace(/\x01/g,""),e==n.lastValue?"":(n.lastValue&&i&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",Y),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range)}},j=a.delayedCall(I,50);i.addListener(d,"compositionstart",P),r.isGecko?i.addListener(d,"text",function(){j.schedule()}):(i.addListener(d,"keyup",function(){j.schedule()}),i.addListener(d,"keydown",function(){j.schedule()})),i.addListener(d,"compositionend",Y),this.getElement=function(){return d},this.setReadOnly=function(e){d.readOnly=e},this.onContextMenu=function(e){S=!0,n(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,n){if(n||!r.isOldIE){g||(g=d.style.cssText),d.style.cssText=(n?"z-index:100000;":"")+"height:"+d.style.height+";"+(r.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),s=o.computedStyle(t.container),l=a.top+(parseInt(s.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),h=a.bottom-l-d.clientHeight-2,p=function(e){d.style.left=e.clientX-u-2+"px",d.style.top=Math.min(e.clientY-l-2,h)+"px"};p(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),r.isWin&&!r.isOldIE&&i.capture(t.container,p,c))}},this.onContextMenuClose=c;var N,H=function(e){t.textInput.onContextMenu(e),c()};i.addListener(t.renderer.scroller,"contextmenu",H),i.addListener(d,"contextmenu",H)};t.TextInput=u}),define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function i(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function r(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)var n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;
|
70
|
+
return 0>n?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var a=(e("../lib/dom"),e("../lib/event"),e("../lib/useragent"),0);(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,r=e.getButton();if(0!==r){var o=i.getSelectionRange(),a=o.isEmpty();return i.$blockScrolling++,a&&i.selection.moveToPosition(n),i.$blockScrolling--,void i.textInput.onContextMenu(e.domEvent)}return this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimout||this.$clickSelection||i.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;n.$blockScrolling++,this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"),n.$blockScrolling--},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.column);if(n.$blockScrolling++,this.$clickSelection){var a=this.$clickSelection.comparePoint(r.start),s=this.$clickSelection.comparePoint(r.end);if(-1==a&&0>=s)t=this.$clickSelection.end,(r.end.row!=i.row||r.end.column!=i.column)&&(i=r.start);else if(1==s&&a>=0)t=this.$clickSelection.start,(r.start.row!=i.row||r.start.column!=i.column)&&(i=r.end);else if(-1==a&&1==s)i=r.end,t=r.start;else{var l=o(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.$blockScrolling--,n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>a||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session,r=i.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),i=this.editor,r=i.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);return r||200>n?(this.$lastScrollTime=t,i.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),i=this.editor,r=i.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);return r||200>n?(this.$lastScrollTime=t,i.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}).call(i.prototype),t.DefaultHandlers=i}),define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,n){"use strict";function i(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var r=(e("./lib/oop"),e("./lib/dom"));(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){r.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(i.prototype),t.Tooltip=i}),define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,n){"use strict";function i(e){function t(){var t=d.getDocumentPosition().row,r=l.$annotations[t];if(!r)return n();var o=a.session.getLength();if(t==o){var s=a.renderer.pixelToScreenCoordinates(0,d.y).row,c=d.$pos;if(s>a.session.documentToScreenRow(c.row,c.column))return n()}if(h!=r)if(h=r.text.join("<br/>"),u.setHtml(h),u.show(),a.on("mousewheel",n),e.$tooltipFollowsMouse)i(d);else{var p=d.domEvent.target,f=p.getBoundingClientRect(),m=u.getElement().style;m.left=f.right+"px",m.top=f.bottom+"px"}}function n(){c&&(c=clearTimeout(c)),h&&(u.hide(),h=null,a.removeEventListener("mousewheel",n))}function i(e){u.setPosition(e.x,e.y)}var a=e.editor,l=a.renderer.$gutterLayer,u=new r(a.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(a.isFocused()&&0==t.getButton()){var n=l.getRegion(t);if("foldWidgets"!=n){var i=t.getDocumentPosition().row,r=a.session.selection;if(t.getShiftKey())r.selectTo(i,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(i)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}});var c,d,h;e.editor.setDefaultHandler("guttermousemove",function(r){var a=r.domEvent.target||r.domEvent.srcElement;return o.hasCssClass(a,"ace_fold-widget")?n():(h&&e.$tooltipFollowsMouse&&i(r),d=r,void(c||(c=setTimeout(function(){c=null,d&&!e.isMousePressed?t():n()},50))))}),s.addListener(a.renderer.$gutter,"mouseout",function(e){d=null,h&&!c&&(c=setTimeout(function(){c=null,n()},50))}),a.on("changeSession",n)}function r(e){l.call(this,e)}var o=e("../lib/dom"),a=e("../lib/oop"),s=e("../lib/event"),l=e("../tooltip").Tooltip;a.inherits(r,l),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();e+=15,t+=15,e+r>n&&(e-=e+r-n),t+o>i&&(t-=20+o),l.prototype.setPosition.call(this,e,t)}}.call(r.prototype),t.GutterHandler=i}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function i(e){function t(e,t){var n=Date.now(),i=!t||e.row!=t.row,o=!t||e.column!=t.column;if(!T||i||o)g.$blockScrolling+=1,g.moveCursorToPosition(e),g.$blockScrolling-=1,T=n,S={x:b,y:x};else{var a=r(S.x,S.y,b,x);a>c?T=null:n-T>=u&&(g.renderer.scrollCursorIntoView(),T=null)}}function n(e,t){var n=Date.now(),i=g.renderer.layerConfig.lineHeight,r=g.renderer.layerConfig.characterWidth,o=g.renderer.scroller.getBoundingClientRect(),a={x:{left:b-o.left,right:o.right-b},y:{top:x-o.top,bottom:o.bottom-x}},s=Math.min(a.x.left,a.x.right),u=Math.min(a.y.top,a.y.bottom),c={row:e.row,column:e.column};2>=s/r&&(c.column+=a.x.left<a.x.right?-3:2),1>=u/i&&(c.row+=a.y.top<a.y.bottom?-1:1);var d=e.row!=c.row,h=e.column!=c.column,p=!t||e.row!=t.row;d||h&&!p?M?n-M>=l&&g.renderer.scrollCursorIntoView(c):M=n:M=null}function i(){var e=k;k=g.renderer.screenToTextCoordinates(b,x),t(k,e),n(k,e)}function d(){$=g.selection.toOrientedRange(),_=g.session.addMarker($,"ace_selection",g.getSelectionStyle()),g.clearSelection(),g.isFocused()&&g.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),i(),w=setInterval(i,20),E=0,a.addListener(document,"mousemove",p)}function h(){clearInterval(w),g.session.removeMarker(_),_=null,g.$blockScrolling+=1,g.selection.fromOrientedRange($),g.$blockScrolling-=1,g.isFocused()&&!A&&g.renderer.$cursorLayer.setBlinking(!g.getReadOnly()),$=null,k=null,E=0,M=null,T=null,a.removeListener(document,"mousemove",p)}function p(){null==L&&(L=setTimeout(function(){null!=L&&_&&h()},20))}function f(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function m(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],i=s.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return i&&t.indexOf(r)>=0?o="copy":n.indexOf(r)>=0?o="move":t.indexOf(r)>=0&&(o="copy"),o}var g=e.editor,v=o.createElement("img");v.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(v.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var y=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];y.forEach(function(t){e[t]=this[t]},this),g.addEventListener("mousedown",this.onMouseDown.bind(e));var _,b,x,w,$,k,C,A,M,T,S,D=g.container,E=0;this.onDragStart=function(e){if(this.cancelDrag||!D.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}$=g.getSelectionRange();var n=e.dataTransfer;n.effectAllowed=g.getReadOnly()?"copy":"copyMove",s.isOpera&&(g.container.appendChild(v),v.scrollTop=0),n.setDragImage&&n.setDragImage(v,0,0),s.isOpera&&g.container.removeChild(v),n.clearData(),n.setData("Text",g.session.getTextRange()),A=!0,this.setState("drag")},this.onDragEnd=function(e){if(D.draggable=!1,A=!1,this.setState(null),!g.getReadOnly()){var t=e.dataTransfer.dropEffect;C||"move"!=t||g.session.remove(g.getSelectionRange()),g.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){return!g.getReadOnly()&&f(e.dataTransfer)?(b=e.clientX,x=e.clientY,_||d(),E++,e.dataTransfer.dropEffect=C=m(e),a.preventDefault(e)):void 0},this.onDragOver=function(e){return!g.getReadOnly()&&f(e.dataTransfer)?(b=e.clientX,x=e.clientY,_||(d(),E++),null!==L&&(L=null),e.dataTransfer.dropEffect=C=m(e),a.preventDefault(e)):void 0},this.onDragLeave=function(e){return E--,0>=E&&_?(h(),C=null,a.preventDefault(e)):void 0},this.onDrop=function(e){if(k){var t=e.dataTransfer;if(A)switch(C){case"move":$=$.contains(k.row,k.column)?{start:k,end:k}:g.moveText($,k);break;case"copy":$=g.moveText($,k,!0)}else{var n=t.getData("Text");$={start:k,end:g.session.insert(k,n)},g.focus(),C=null}return h(),a.preventDefault(e)}},a.addListener(D,"dragstart",this.onDragStart.bind(e)),a.addListener(D,"dragend",this.onDragEnd.bind(e)),a.addListener(D,"dragenter",this.onDragEnter.bind(e)),a.addListener(D,"dragover",this.onDragOver.bind(e)),a.addListener(D,"dragleave",this.onDragLeave.bind(e)),a.addListener(D,"drop",this.onDrop.bind(e));var L=null}function r(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}var o=e("../lib/dom"),a=e("../lib/event"),s=e("../lib/useragent"),l=200,u=200,c=5;(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var n=s.isWin?"default":"move";e.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(s.isIE&&"dragReady"==this.state){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if("dragWait"===this.state){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton(),r=e.domEvent.detail||1;if(1===r&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(s.isWebKit){this.cancelDrag=!0;var a=t.container;a.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(i.prototype),t.DragdropHandler=i}),define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),r=document.createElement("script");r.src=e,n.appendChild(r),r.onload=r.onreadystatechange=function(e,n){(n||!r.readyState||"loaded"==r.readyState||"complete"==r.readyState)&&(r=r.onload=r.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var i={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return i&&!t.defaultPrevented?i(t,this):void 0}},i._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var i=0;i<n.length;i++)n[i](t,this)}},i.once=function(e,t){var n=this;t&&this.addEventListener(e,function i(){n.removeEventListener(e,i),t.apply(null,arguments)})},i.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var i=n[e],r=n._disabled_[e];r||(n._disabled_[e]=r=[]),r.push(i);var o=r.indexOf(t);-1!=o&&r.splice(o,1)}n[e]=t},i.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var i=n._disabled_[e];if(n[e]==t){n[e];i&&this.setDefaultHandler(e,i.pop())}else if(i){var r=i.indexOf(t);-1!=r&&i.splice(r,1)}}},i.on=i.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];return i||(i=this._eventRegistry[e]=[]),-1==i.indexOf(t)&&i[n?"unshift":"push"](t),t},i.off=i.removeListener=i.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}},i.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=i}),define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"no use strict";function i(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function r(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout(function(){throw n})}var o=e("./oop"),a=e("./event_emitter").EventEmitter,s={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return i('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:i('misspelled option "'+e+'"')}},l=function(){this.$defaultOptions={}};(function(){o.implement(this,a),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var i=n[t];"string"==typeof i&&(i={forwardTo:i}),i.name||(i.name=t),e.$options[i.name]=i,"initialValue"in i&&(e["$"+i.name]=i.initialValue)}),o.implement(e,s),this},this.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},this.setDefaultValue=function(e,t,n){var i=this.$defaultOptions[e]||(this.$defaultOptions[e]={});i[t]&&(i.forwardTo?this.setDefaultValue(i.forwardTo,t,n):i[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},this.warn=i,this.reportError=r}).call(l.prototype),t.AppConfig=l}),define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(e,t,n){"no use strict";function i(i){if(u.packaged=i||e.packaged||n.packaged||l.define&&define.packaged,!l.document)return"";for(var o={},a="",s=document.currentScript||document._currentScript,c=s&&s.ownerDocument||document,d=c.getElementsByTagName("script"),h=0;h<d.length;h++){var p=d[h],f=p.src||p.getAttribute("src");if(f){for(var m=p.attributes,g=0,v=m.length;v>g;g++){var y=m[g];0===y.name.indexOf("data-ace-")&&(o[r(y.name.replace(/^data-ace-/,""))]=y.value)}var _=f.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);_&&(a=_[1])}}a&&(o.base=o.base||a,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base;for(var b in o)"undefined"!=typeof o[b]&&t.set(b,o[b])}function r(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}var o=e("./lib/lang"),a=(e("./lib/oop"),e("./lib/net")),s=e("./lib/app_config").AppConfig;n.exports=t=new s;var l=function(){return this||"undefined"!=typeof window&&window}(),u={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!u.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return u[e]},t.set=function(e,t){if(!u.hasOwnProperty(e))throw new Error("Unknown config key: "+e);u[e]=t},t.all=function(){return o.copyObject(u)},t.moduleUrl=function(e,t){if(u.$moduleUrls[e])return u.$moduleUrls[e];var n=e.split("/");t=t||n[n.length-2]||"";var i="snippets"==t?"/":"-",r=n[n.length-1];if("worker"==t&&"-"==i){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");r=r.replace(o,"")}(!r||r==t)&&n.length>1&&(r=n[n.length-2]);var a=u[t+"Path"];return null==a?a=u.basePath:"/"==i&&(t=i=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+i+r+this.get("suffix")},t.setModuleUrl=function(e,t){return u.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,i){var r,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{r=e(n)}catch(s){}if(r&&!t.$loading[n])return i&&i(r);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var l=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var i=t.$loading[n];t.$loading[n]=null,i.forEach(function(t){t&&t(e)})})};return t.get("packaged")?void a.loadScript(t.moduleUrl(n,o),l):l()}},i(!0),t.init=i}),define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,a=e("./default_gutter_handler").GutterHandler,s=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,u=e("../config"),c=function(e){var t=this;this.editor=e,new o(this),new a(this),new l(this);var n=function(t){document.hasFocus&&document.hasFocus()||window.focus(),e.focus(),e.isFocused()||window.focus()},s=e.renderer.getMouseEventTarget();i.addListener(s,"click",this.onMouseEvent.bind(this,"click")),i.addListener(s,"mousemove",this.onMouseMove.bind(this,"mousemove")),i.addMultiMouseDownListener(s,[400,300,250],this,"onMouseEvent"),e.renderer.scrollBarV&&(i.addMultiMouseDownListener(e.renderer.scrollBarV.inner,[400,300,250],this,"onMouseEvent"),i.addMultiMouseDownListener(e.renderer.scrollBarH.inner,[400,300,250],this,"onMouseEvent"),r.isIE&&(i.addListener(e.renderer.scrollBarV.element,"mousedown",n),i.addListener(e.renderer.scrollBarH.element,"mousedown",n))),i.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),i.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var u=e.renderer.$gutter;i.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),i.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick")),i.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),i.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),i.addListener(s,"mousedown",n),i.addListener(u,"mousedown",function(t){return e.focus(),i.preventDefault(t)}),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var i=e.renderer.screenToTextCoordinates(n.x,n.y),r=e.session.selection.getRange(),o=e.renderer;!r.isEmpty()&&r.insideStart(i.row,i.column)?o.setCursorStyle("default"):o.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new s(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new s(t,this.editor))},this.onMouseWheel=function(e,t){var n=new s(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.onTouchMove=function(e,t){var n=new s(t,this.editor);n.speed=1,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var o=this,a=function(e){if(e){if(r.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new s(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(c),u(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},u=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});o.$onCaptureMouseMove=a,o.releaseMouse=i.capture(this.editor.container,a,l);var c=setInterval(u,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&i.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(c.prototype),u.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=c}),define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){"use strict";function i(e){e.on("click",function(t){var n=t.getDocumentPosition(),i=e.session,r=i.getFoldAt(n.row,n.column,1);r&&(t.getAccelKey()?i.removeFold(r):i.expandFold(r),t.stop())}),e.on("gutterclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==n){var i=t.getDocumentPosition().row,r=e.session;r.foldWidgets&&r.foldWidgets[i]&&e.session.onFoldWidgetClick(i,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==n){var i=t.getDocumentPosition().row,r=e.session,o=r.getParentFoldRangeData(i,!0),a=o.range||o.firstRange;if(a){i=a.start.row;var s=r.getFoldAt(i,r.getLine(i).length,1);s?r.removeFold(s):(r.addFold("...",a),e.renderer.scrollCursorIntoView({row:a.start.row,column:0}))}t.stop()}})}t.FoldHandler=i}),define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var i=e("../lib/keys"),r=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1==t?!1:(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,i){for(var o,a=!1,s=this.$editor.commands,l=this.$handlers.length;l--&&(o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,i),!(o&&o.command&&(a="null"==o.command?!0:s.exec(o.command,this.$editor,o.args,i),a&&i&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&r.stopEvent(i),a))););return a||-1!=e||(o={command:"insertstring"},a=s.exec("insertstring",this.$editor,t)),a&&this.$editor._signal("keyboardActivity",o),a},this.onCommandKey=function(e,t,n){var r=i.keyCodeToString(n);this.$callKeyboardHandlers(t,r,n,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o}),define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var i=function(e,t){return e.row-t.row||e.column-t.column},r=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return t=this.compare(n.row,n.column),1==t?(t=this.compare(i.row,i.column),1==t?2:0==t?1:0):-1==t?-2:(t=this.compare(i.row,i.column),-1==t?-1:1==t?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return 0==this.compare(e,t)?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return 0==this.compare(e,t)?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var i={row:t+1,column:0};else if(this.start.row<e)var i={row:e,column:0};return r.fromPoints(i||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(0==n)return this;if(-1==n)var i={row:e,column:t};else var o={row:e,column:t};return r.fromPoints(i||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return r.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new r(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(r.prototype),r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},r.comparePoints=i,r.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=r}),define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(e){t._emit("changeCursor"),
|
71
|
+
t.$isEmpty||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){t.$isEmpty||t._emit("changeSelection")})};(function(){i.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty)return void this.moveCursorTo(this.lead.row,this.lead.column+e);var t=this.getSelectionAnchor(),n=this.getSelectionLead(),i=this.isBackwards();i&&0===t.column||this.setSelectionAnchor(t.row,t.column+e),(i||0!==n.column)&&this.$moveSelection(function(){this.moveCursorTo(n.row,n.column+e)})},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,t===!0?new a(i,0,n,this.session.getLine(n).length):new a(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column-n,t.column).split(" ").length-1==n?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize(),t=this.lead;this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column,t.column+n).split(" ").length-1==n?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),i=this.session.screenToDocumentPosition(n,0),r=this.session.getDisplayLine(e,null,i.row,i.column),o=r.match(/^\s*/);o[0].length==t||this.session.$useEmacsStyleLineStart||(i.column+=o[0].length),this.moveCursorToPosition(i)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var i=n.search(/\s+$/);i>0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e,t=this.lead.row,n=this.lead.column,i=this.doc.getLine(t),r=i.substring(n);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(t,n,1);return o?void this.moveCursorTo(o.end.row,o.end.column):((e=this.session.nonTokenRe.exec(r))&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=i.substring(n)),n>=i.length?(this.moveCursorTo(t,i.length),this.moveCursorRight(),void(t<this.doc.getLength()-1&&this.moveCursorWordRight())):((e=this.session.tokenRe.exec(r))&&(n+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(t,n)))},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return void this.moveCursorTo(e.start.row,e.start.column);var i=this.session.getFoldStringAt(t,n,-1);null==i&&(i=this.doc.getLine(t).substring(0,n));var o,a=r.stringReverse(i);return this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,(o=this.session.nonTokenRe.exec(a))&&(n-=this.session.nonTokenRe.lastIndex,a=a.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),0>=n?(this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft())):((o=this.session.tokenRe.exec(a))&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(t,n))},this.$shortWordEndIndex=function(e){var t,n,i=0,r=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,t=this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{for(;(n=e[i])&&r.test(n);)i++;if(1>i)for(o.lastIndex=0;(n=e[i])&&!o.test(n);)if(o.lastIndex=0,i++,r.test(n)){if(i>2){i--;break}for(;(n=e[i])&&r.test(n);)i++;if(i>2)break}}return o.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){var o=this.doc.getLength();do e++,i=this.doc.getLine(e);while(o>e&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),t=0}var a=this.$shortWordEndIndex(i);this.moveCursorTo(e,t+a)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var i=this.session.getLine(t).substring(0,n);if(0===n){do t--,i=this.doc.getLine(t);while(t>0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),a=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-a)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var i=this.session.screenToDocumentPosition(n.row+e,n.column);0!==e&&0===t&&i.row===this.lead.row&&i.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[i.row]&&(i.row>0||e>0)&&i.row++,this.moveCursorTo(i.row,i.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e.call(null,this);var n=this.getCursor();return a.fromPoints(t,n)}catch(i){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(s.prototype),t.Selection=s}),define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,n){"use strict";var i=e("./config"),r=2e3,o=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){for(var n=this.states[t],i=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],l=0;l<n.length;l++){var u=n[l];if(u.defaultToken&&(o.defaultToken=u.defaultToken),u.caseInsensitive&&(a="gi"),null!=u.regex){u.regex instanceof RegExp&&(u.regex=u.regex.toString().slice(1,-1));var c=u.regex,d=new RegExp("(?:("+c+")|(.))").exec("a").length-2;Array.isArray(u.token)?1==u.token.length||1==d?u.token=u.token[0]:d-1!=u.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:u,groupCount:d-1}),u.token=u.token[0]):(u.tokenArray=u.token,u.token=null,u.onMatch=this.$arrayTokens):"function"!=typeof u.token||u.onMatch||(d>1?u.onMatch=this.$applyToken:u.onMatch=u.token),d>1&&(/\\\d/.test(u.regex)?c=u.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+r+1)}):(d=1,c=this.removeCapturingGroups(u.regex)),u.splitRegex||"string"==typeof u.token||s.push(u)),o[r]=l,r+=d,i.push(c),u.onMatch||(u.onMatch=null)}}i.length||(o[0]=0,i.push("$")),s.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)},this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],r=0,o=n.length;o>r;r++)t[r]&&(i[i.length]={type:n[r],value:t[r]});return i},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],i=this.tokenArray,r=0,o=i.length;o>r;r++)t[r+1]&&(n[n.length]={type:i[r],value:t[r+1]});return n},this.removeCapturingGroups=function(e){var t=e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e});return t},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,i=!1,r={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,o,a,s,l){return i?i="]"!=s:s?i=!0:a?(n==r.stack&&(r.end=l+1,r.stack=-1),n--):o&&(n++,1!=o.length&&(r.stack=n,r.start=l)),e}),null!=r.end&&/^\)*$/.test(e.substr(r.end))&&(e=e.substring(0,r.start)+e.substr(r.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);t=n[0],"#tmp"===t&&(n.shift(),t=n.shift())}else var n=[];var i=t||"start",o=this.states[i];o||(i="start",o=this.states[i]);var a=this.matchMappings[i],s=this.regExps[i];s.lastIndex=0;for(var l,u=[],c=0,d=0,h={type:null,value:""};l=s.exec(e);){var p=a.defaultToken,f=null,m=l[0],g=s.lastIndex;if(g-m.length>c){var v=e.substring(c,g-m.length);h.type==p?h.value+=v:(h.type&&u.push(h),h={type:p,value:v})}for(var y=0;y<l.length-2;y++)if(void 0!==l[y+1]){f=o[a[y]],p=f.onMatch?f.onMatch(m,i,n):f.token,f.next&&(i="string"==typeof f.next?f.next:f.next(i,n),o=this.states[i],o||(this.reportError("state doesn't exist",i),i="start",o=this.states[i]),a=this.matchMappings[i],c=g,s=this.regExps[i],s.lastIndex=g);break}if(m)if("string"==typeof p)f&&f.merge===!1||h.type!==p?(h.type&&u.push(h),h={type:p,value:m}):h.value+=m;else if(p){h.type&&u.push(h),h={type:null,value:""};for(var y=0;y<p.length;y++)u.push(p[y])}if(c==e.length)break;if(c=g,d++>r){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c<e.length;)h.type&&u.push(h),h={value:e.substring(c,c+=2e3),type:"overflow"};i="start",n=[];break}}return h.type&&u.push(h),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:u,state:n.length?n:i}},this.reportError=i.reportError}).call(o.prototype),t.Tokenizer=o}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var i=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r<i.length;r++){var o=i[r];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+n]=i}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,r,o){var a="function"==typeof e?(new e).getRules():e;if(r)for(var s=0;s<r.length;s++)r[s]=t+r[s];else{r=[];for(var l in a)r.push(t+l)}if(this.addRules(a,t),n)for(var u=Array.prototype[o?"push":"unshift"],s=0;s<r.length;s++)u.apply(this.$rules[r[s]],i.deepCopy(n));this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){function n(o){var a=r[o];a.processed=!0;for(var s=0;s<a.length;s++){var l=a[s];!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var c=l.stateName;c||(c=l.token,"string"!=typeof c&&(c=c[0]||""),r[c]&&(c+=i++)),r[c]=u,l.next=c,n(c)}else"pop"==u&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var d in l.rules)r[d]?r[d].push&&r[d].push.apply(r[d],l.rules[d]):r[d]=l.rules[d];if(l.include||"string"==typeof l)var h=l.include||l,p=r[h];else Array.isArray(l)&&(p=l);if(p){var f=[s,1].concat(p);l.noEscape&&(f=f.filter(function(e){return!e.next})),a.splice.apply(a,f),s--,p=null}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}var i=0,r=this.$rules;Object.keys(r).forEach(n,this)},this.createKeywordMapper=function(e,t,n,i){var r=Object.create(null);return Object.keys(e).forEach(function(t){var o=e[t];n&&(o=o.toLowerCase());for(var a=o.split(i||"|"),s=a.length;s--;)r[a[s]]=t}),Object.getPrototypeOf(r)&&(r.__proto__=null),this.$keywordList=Object.keys(r),e=null,n?function(e){return r[e.toLowerCase()]||t}:function(e){return r[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(r.prototype),t.TextHighlightRules=r}),define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";var i=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else var n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call(i.prototype),t.Behaviour=i}),define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";function i(e){var n=/\w{4}/g;for(var i in e)t.packages[i]=e[i].replace(n,"\\u$&")}t.packages={},i({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",
|
72
|
+
No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),define("ace/token_iterator",["require","exports","module"],function(e,t,n){"use strict";var i=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var i=e.getTokenAt(t,n);this.$tokenIndex=i?i.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;for(var e;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)t-=1,n+=e[t].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}}}).call(i.prototype),t.TokenIterator=i}),define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var i=e("../tokenizer").Tokenizer,r=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,a=e("../unicode"),s=e("../lib/lang"),l=e("../token_iterator").TokenIterator,u=e("../range").Range,c=function(){this.HighlightRules=r,this.$behaviour=new o};(function(){this.tokenRe=new RegExp("^["+a.packages.L+a.packages.Mn+a.packages.Mc+a.packages.Nd+a.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+a.packages.L+a.packages.Mn+a.packages.Mc+a.packages.Nd+a.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new i(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,i){function r(e){for(var t=n;i>=t;t++)e(o.getLine(t),t)}var o=t.doc,a=!0,l=!0,u=1/0,c=t.getTabSize(),d=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var h=this.lineCommentStart.map(s.escapeRegExp).join("|"),p=this.lineCommentStart[0];else var h=s.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart;h=new RegExp("^(\\s*)(?:"+h+") ?"),d=t.getUseSoftTabs();var f=function(e,t){var n=e.match(h);if(n){var i=n[1].length,r=n[0].length;y(e,i,r)||" "!=n[0][r-1]||r--,o.removeInLine(t,i,r)}},m=p+" ",g=function(e,t){(!a||/\S/.test(e))&&(y(e,u,u)?o.insertInLine({row:t,column:u},m):o.insertInLine({row:t,column:u},p))},v=function(e,t){return h.test(e)},y=function(e,t,n){for(var i=0;t--&&" "==e.charAt(t);)i++;if(i%c!=0)return!1;for(var i=0;" "==e.charAt(n++);)i++;return c>2?i%c!=c-1:i%c==0}}else{if(!this.blockComment)return!1;var p=this.blockComment.start,_=this.blockComment.end,h=new RegExp("^(\\s*)(?:"+s.escapeRegExp(p)+")"),b=new RegExp("(?:"+s.escapeRegExp(_)+")\\s*$"),g=function(e,t){v(e,t)||(!a||/\S/.test(e))&&(o.insertInLine({row:t,column:e.length},_),o.insertInLine({row:t,column:u},p))},f=function(e,t){var n;(n=e.match(b))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(h))&&o.removeInLine(t,n[1].length,n[0].length)},v=function(e,n){if(h.test(e))return!0;for(var i=t.getTokens(n),r=0;r<i.length;r++)if("comment"===i[r].type)return!0}}var x=1/0;r(function(e,t){var n=e.search(/\S/);-1!==n?(u>n&&(u=n),l&&!v(e,t)&&(l=!1)):x>e.length&&(x=e.length)}),u==1/0&&(u=x,a=!1,l=!1),d&&u%c!=0&&(u=Math.floor(u/c)*c),r(l?f:g)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,a,s=new l(t,i.row,i.column),c=s.getCurrentToken(),d=(t.selection,t.selection.toOrientedRange());if(c&&/comment/.test(c.type)){for(var h,p;c&&/comment/.test(c.type);){var f=c.value.indexOf(r.start);if(-1!=f){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+f;h=new u(m,g,m,g+r.start.length);break}c=s.stepBackward()}for(var s=new l(t,i.row,i.column),c=s.getCurrentToken();c&&/comment/.test(c.type);){var f=c.value.indexOf(r.end);if(-1!=f){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+f;p=new u(m,g,m,g+r.end.length);break}c=s.stepForward()}p&&t.remove(p),h&&(t.remove(h),o=h.start.row,a=-r.start.length)}else a=r.start.length,o=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);d.start.row==o&&(d.start.column+=a),d.end.row==o&&(d.end.column+=a),t.selection.fromOrientedRange(d)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);for(var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],t=0;t<n.length;t++)!function(e){var i=n[t],r=e[i];e[n[t]]=function(){return this.$delegator(i,arguments,r)}}(this)},this.$delegator=function(e,t,n){var i=t[0];"string"!=typeof i&&(i=i[0]);for(var r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]){var o=i.split(this.$embeds[r]);if(!o[0]&&o[1]){t[0]=o[1];var a=this.$modes[this.$embeds[r]];return a[e].apply(a,t)}}var s=n.apply(this,t);return n?s:void 0},this.transformAction=function(e,t,n,i,r){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var a in o)if(o[a][t]){var s=o[a][t].apply(this,arguments);if(s)return s}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var i in t)for(var r=t[i],o=0,a=r.length;a>o;o++)if("string"==typeof r[o].token)/keyword|support|storage/.test(r[o].token)&&n.push(r[o].regex);else if("object"==typeof r[o].token)for(var s=0,l=r[o].token.length;l>s;s++)if(/keyword|support|storage/.test(r[o].token[s])){var i=r[o].regex.match(/\(.+?\)/g)[s];n.push(i.substr(1,i.length-2))}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,i){var r=this.$keywordList||this.$createKeywordList();return r.map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),t.Mode=c}),define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var i=t.start.row,r=t.start.column,o=e[i]||"";switch(t.action){case"insert":var a=t.lines;if(1===a.length)e[i]=o.substring(0,r)+t.lines[0]+o.substring(r);else{var s=[i,1].concat(t.lines);e.splice.apply(e,s),e[i]=o.substring(0,r)+e[i],e[i+t.lines.length-1]+=o.substring(r)}break;case"remove":var l=t.end.column,u=t.end.row;i===u?e[i]=o.substring(0,r)+o.substring(l):e.splice(i,u-i+1,o.substring(0,r)+e[u].substring(l))}}}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"undefined"==typeof n?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var i=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&i}function t(t,n,i){var r="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),a=(r?1:-1)*(t.end.column-t.start.column),s=t.start,l=r?s:t.end;return e(n,s,i)?{row:n.row,column:n.column}:e(l,n,!i)?{row:n.row+o,column:n.column+(n.row==l.row?a:0)}:{row:s.row,column:s.column}}i.implement(this,r),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var n=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):0>e?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),0>t&&(n.column=0),n}}).call(o.prototype)}),define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){i.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new s(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:0>e?e=0:e>=n&&(e=n-1,t=void 0);var i=this.getLine(e);return void 0==t&&(t=i.length),t=Math.min(Math.max(t,0),i.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),i={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:i,action:"insert",lines:t}),this.clonePos(i)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var i=this.clippedPos(e,t),r=this.clippedPos(e,n);return this.applyDelta({start:i,end:r,action:"remove",lines:this.getLinesForRange({start:i,end:r})},!0),this.clonePos(i)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var n=t==this.getLength()-1&&e>0,i=t<this.getLength()-1,r=n?e-1:e,o=n?this.getLine(r).length:0,s=i?t+1:t,l=i?0:this.getLine(s).length,u=new a(r,o,s,l),c=this.$lines.slice(e,t+1);return this.applyDelta({start:u.start,end:u.end,action:"remove",lines:this.getLinesForRange(u)}),c},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){if(e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var n;return n=t?this.insert(e.start,t):e.start},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),r(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,i=n.length,r=e.start.row,o=e.start.column,a=0,s=0;;){a=s,s+=t-1;var l=n.slice(a,s);if(s>i){e.lines=l,e.start.row=r+a,e.start.column=o;break}l.push(""),this.applyDelta({start:this.pos(r+a,o),end:this.pos(r+s,o=0),action:e.action,lines:l},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=t||0,o=n.length;o>r;r++)if(e-=n[r].length+i,0>e)return{row:r,column:e+n[r].length+i};return{row:o-1,column:n[o-1].length}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=0,o=Math.min(e.row,n.length),a=t||0;o>a;++a)r+=n[a].length+i;return r+e.column}}).call(l.prototype),t.Document=l}),define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,i=-1,r=n.doc,o=t;n.lines[t];)t++;var a=r.getLength(),s=0;for(n.running=!1;a>t;){n.$tokenizeRow(t),i=t;do t++;while(n.lines[t]);if(s++,s%5===0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,i>=o&&n.fireUpdateEvent(o,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var i=e("./lib/lang"),r=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var a=o.firstRow,s=o.lastRow,l=a;s>=l;l++){var u=this.cache[l];null==u&&(u=i.getMatchOffsets(n.getLine(l),this.regExp),u.length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map(function(e){return new r(l,e.offset,l,e.offset+e.length)}),this.cache[l]=u.length?u:"");for(var c=u.length;c--;)t.drawSingleLineMarker(e,u[c].toScreenRange(n),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var r=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,r,o,a=0,s=this.folds,l=!0;null==t&&(t=this.end.row,n=this.end.column);for(var u=0;u<s.length;u++){if(i=s[u],r=i.range.compareStart(t,n),-1==r)return void e(null,t,n,a,l);if(o=e(null,i.start.row,i.start.column,a,l),o=!o&&e(i.placeholder,i.start.row,i.start.column,a),o||0===r)return;l=!i.sameRow,a=i.end.column}e(null,t,n,a,l)},this.getNextFoldTo=function(e,t){for(var n,i,r=0;r<this.folds.length;r++){if(n=this.folds[r],i=n.range.compareEnd(e,t),-1==i)return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var i,r,o=this.getNextFoldTo(e,t);if(o)if(i=o.fold,"inside"==o.kind&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){r=this.folds;var a=r.indexOf(i);for(0===a&&(this.start.column+=n),a;a<r.length;a++){if(i=r[a],i.start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},this.split=function(e,t){var n=this.getNextFoldTo(e,t);if(!n||"inside"==n.kind)return null;var r=n.fold,o=this.folds,a=this.foldData,s=o.indexOf(r),l=o[s-1];this.end.row=l.end.row,this.end.column=l.end.column,o=o.splice(s,o.length-s);var u=new i(a,o);return a.splice(a.indexOf(this)+1,0,u),u},this.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var i=this.foldData;i.splice(i.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push(" "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if(e-=i.start.column-t,0>e)return{row:i.start.row,column:i.start.column+e};if(e-=i.placeholder.length,0>e)return i.start;t=i.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(i.prototype),t.FoldLine=i}),define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){
|
73
|
+
"use strict";var i=e("./range").Range,r=i.comparePoints,o=function(){this.ranges=[]};(function(){this.comparePoints=r,this.pointIndex=function(e,t,n){for(var i=this.ranges,o=n||0;o<i.length;o++){var a=i[o],s=r(e,a.end);if(!(s>0)){var l=r(e,a.start);return 0===s?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);0>n&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return 0>i?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.call(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);return t>=0?this.ranges.splice(t,1):void 0},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return r(e.start,t.start)});for(var n,i=t[0],o=1;o<t.length;o++){n=i,i=t[o];var a=r(n.end,i.start);0>a||(0!=a||n.isEmpty()||i.isEmpty())&&(r(n.end,i.end)<0&&(n.end.row=i.end.row,n.end.column=i.end.column),t.splice(o,1),e.push(i),i=n,o--)}return this.ranges=t,e},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);return t>=0?this.ranges[t]:void 0},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var i=this.pointIndex({row:e,column:0});0>i&&(i=-i-1);var r=this.pointIndex({row:t,column:0},i);0>r&&(r=-r-1);for(var o=[],a=i;r>a;a++)o.push(n[a]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){if("insert"==e.action)var t=e.start,n=e.end;else var n=e.start,t=e.end;for(var i=t.row,r=n.row,o=r-i,a=-t.column+n.column,s=this.ranges,l=0,u=s.length;u>l;l++){var c=s[l];if(!(c.end.row<i)){if(c.start.row>i)break;if(c.start.row==i&&c.start.column>=t.column&&(c.start.column==t.column&&this.$insertRight||(c.start.column+=a,c.start.row+=o)),c.end.row==i&&c.end.column>=t.column){if(c.end.column==t.column&&this.$insertRight)continue;c.end.column==t.column&&a>0&&u-1>l&&c.end.column>c.start.column&&c.end.column==s[l+1].start.column&&(c.end.column-=a),c.end.column+=a,c.end.row+=o}}}if(0!=o&&u>l)for(;u>l;l++){var c=s[l];c.start.row+=o,c.end.row+=o}}}).call(o.prototype),t.RangeList=o}),define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,n){"use strict";function i(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function r(e,t){i(e.start,t),i(e.end,t)}function o(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}function a(e,t){o(e.start,t),o(e.end,t)}var s=(e("../range").Range,e("../range_list").RangeList),l=e("../lib/oop"),u=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};l.inherits(u,s),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new u(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);r(e,this.start);for(var t=e.start.row,n=e.start.column,i=0,o=-1;i<this.subFolds.length&&(o=this.subFolds[i].range.compare(t,n),1==o);i++);var a=this.subFolds[i];if(0==o)return a.addSubFold(e);for(var t=e.range.end.row,n=e.range.end.column,s=i,o=-1;s<this.subFolds.length&&(o=this.subFolds[s].range.compare(t,n),1==o);s++);this.subFolds[s];if(0==o)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);this.subFolds.splice(i,s-i,e);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return a(e,this.start)}}.call(u.prototype)}),define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,n){"use strict";function i(){this.getFoldAt=function(e,t,n){var i=this.getFoldLine(e);if(!i)return null;for(var r=i.folds,o=0;o<r.length;o++){var a=r[o];if(a.range.contains(e,t)){if(1==n&&a.range.isEnd(e,t))continue;if(-1==n&&a.range.isStart(e,t))continue;return a}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,i=this.$foldData,r=[];t.column+=1,n.column-=1;for(var o=0;o<i.length;o++){var a=i[o].range.compareRange(e);if(2!=a){if(-2==a)break;for(var s=i[o].folds,l=0;l<s.length;l++){var u=s[l];if(a=u.range.compareRange(e),-2==a)break;if(2!=a){if(42==a)break;r.push(u)}}}}return t.column-=1,n.column+=1,r},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else var t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var i=0;i<t[n].folds.length;i++)e.push(t[n].folds[i]);return e},this.getFoldStringAt=function(e,t,n,i){if(i=i||this.getFoldLine(e),!i)return null;for(var r,o,a={end:{column:0}},s=0;s<i.folds.length;s++){o=i.folds[s];var l=o.range.compareEnd(e,t);if(-1==l){r=this.getLine(o.start.row).substring(a.end.column,o.start.column);break}if(0===l)return null;a=o}return r||(r=this.getLine(o.start.row).substring(a.end.column)),-1==n?r.substring(0,t-a.end.column):1==n?r.substring(t-a.end.column):r},this.getFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0),i;i<n.length;i++){var r=n[i];if(r.start.row<=e&&r.end.row>=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0),i;i<n.length;i++){var r=n[i];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r<n.length;r++){var o=n[r],a=o.end.row,s=o.start.row;if(a>=t){t>s&&(s>=e?i-=t-s:i=0);break}a>=e&&(i-=s>=e?a-s:a-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n,i=this.$foldData,r=!1;e instanceof a?n=e:(n=new a(t,e),n.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(n.range);var s=n.start.row,l=n.start.column,u=n.end.row,c=n.end.column;if(!(u>s||s==u&&c-2>=l))throw new Error("The range has to be at least 2 characters width");var d=this.getFoldAt(s,l,1),h=this.getFoldAt(u,c,-1);if(d&&h==d)return d.addSubFold(n);d&&!d.range.isStart(s,l)&&this.removeFold(d),h&&!h.range.isEnd(u,c)&&this.removeFold(h);var p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),p.forEach(function(e){n.addSubFold(e)}));for(var f=0;f<i.length;f++){var m=i[f];if(u==m.start.row){m.addFold(n),r=!0;break}if(s==m.end.row){if(m.addFold(n),r=!0,!n.sameRow){var g=i[f+1];if(g&&g.start.row==u){m.merge(g);break}}break}if(u<=m.start.row)break}return r||(m=this.$addFoldLine(new o(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(m.start.row,m.start.row):this.$updateRowLengthCache(m.start.row,m.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,i=t.end.row,r=this.$foldData,o=t.folds;if(1==o.length)r.splice(r.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var a=t.split(e.start.row,e.start.column);o=a.folds,o.shift(),a.start.row=o[0].start.row,a.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;if(null==e?(n=new r(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new r(e,0,e,this.getLine(e).length):"row"in e?r.fromPoints(e,e):e,i=this.getFoldsInRangeList(n),t)this.removeFolds(i);else for(var o=i;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);return i.length?i:void 0},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,a="";return e.walk(function(e,t,n,s){if(!(i>t)){if(t==i){if(r>n)return;s=Math.max(r,s)}a+=null!=e?e:o.getLine(t).substring(s,n)}},t,n),a},this.getDisplayLine=function(e,t,n,i){var r=this.getFoldLine(e);if(r)return this.getFoldDisplayLine(r,e,t,n,i);var o;return o=this.doc.getLine(e),o.substring(i||0,t||o.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new o(e,n)})},this.toggleFold=function(e){var t,n,i=this.selection,r=i.getRange();if(r.isEmpty()){var o=r.start;if(t=this.getFoldAt(o.row,o.column))return void this.expandFold(t);(n=this.findMatchingBracket(o))?1==r.comparePoint(n)?r.end=n:(r.start=n,r.start.column++,r.end.column--):(n=this.findMatchingBracket({row:o.row,column:o.column+1}))?(1==r.comparePoint(n)?r.end=n:r.start=n,r.start.column++):r=this.getCommentFoldRange(o.row,o.column)||r}else{var a=this.getFoldsInRange(r);if(e&&a.length)return void this.expandFolds(a);1==a.length&&(t=a[0])}if(t||(t=this.getFoldAt(r.start.row,r.start.column)),t&&t.range.toString()==r.toString())return void this.expandFold(t);var s="...";if(!r.isMultiLine()){if(s=this.getTextRange(r),s.length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,r)},this.getCommentFoldRange=function(e,t,n){var i=new s(this,e,t),o=i.getCurrentToken();if(o&&/^comment|string/.test(o.type)){var a=new r,l=new RegExp(o.type.replace(/\..*/,"\\."));if(1!=n){do o=i.stepBackward();while(o&&l.test(o.type));i.stepForward()}if(a.start.row=i.getCurrentTokenRow(),a.start.column=i.getCurrentTokenColumn()+2,i=new s(this,e,t),-1!=n){do o=i.stepForward();while(o&&l.test(o.type));o=i.stepBackward()}else o=i.getCurrentToken();return a.end.row=i.getCurrentTokenRow(),a.end.column=i.getCurrentTokenColumn()+o.value.length-2,a}},this.foldAll=function(e,t,n){void 0==n&&(n=1e5);var i=this.foldWidgets;if(i){t=t||this.getLength(),e=e||0;for(var r=e;t>r;r++)if(null==i[r]&&(i[r]=this.getFoldWidget(r)),"start"==i[r]){var o=this.getFoldWidgetRange(r);if(o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e){r=o.end.row;try{var a=this.addFold("...",o);a&&(a.collapseChildren=n)}catch(s){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!e||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var i,r=e-1;r>=0;){var o=n[r];if(null==o&&(o=n[r]=this.getFoldWidget(r)),"start"==o){var a=this.getFoldWidgetRange(r);if(i||(i=a),a&&a.end.row>=e)break}r--}return{range:-1!==r&&a,firstRange:i}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},i=this.$toggleFoldWidget(e,n);if(!i){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),r="end"===n?-1:1,o=this.getFoldAt(e,-1===r?0:i.length,r);if(o)return void(t.children||t.all?this.removeFold(o):this.expandFold(o));var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(o=this.getFoldAt(a.start.row,a.start.column,1),o&&a.isEqual(o.range)))return void this.removeFold(o);if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var l=s.range.start.row+1,u=s.range.end.row;this.foldAll(l,u,t.all?1e4:0)}else t.children?(u=a?a.end.row:this.getLength(),this.foldAll(e+1,u,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var r=e("../range").Range,o=e("./fold_line").FoldLine,a=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=i}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";function i(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,r=n.charAt(e.column-1),a=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(a||(r=n.charAt(e.column),e={row:e.row,column:e.column+1},a=r&&r.match(/([\(\[\{])|([\)\]\}])/),i=!1),!a)return null;if(a[1]){var s=this.$findClosingBracket(a[1],e);if(!s)return null;t=o.fromPoints(e,s),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s=this.$findOpeningBracket(a[2],e);if(!s)return null;t=o.fromPoints(s,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn()-2,u=s.value;;){for(;l>=0;){var c=u.charAt(l);if(c==i){if(o-=1,0==o)return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else c==e&&(o+=1);l-=1}do s=a.stepBackward();while(s&&!n.test(s.type));if(null==s)break;u=s.value,l=u.length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn();;){for(var u=s.value,c=u.length;c>l;){var d=u.charAt(l);if(d==i){if(o-=1,0==o)return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else d==e&&(o+=1);l+=1}do s=a.stepForward();while(s&&!n.test(s.type));if(null==s)break;l=0}return null}}}var r=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=i}),define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./config"),a=e("./lib/event_emitter").EventEmitter,s=e("./selection").Selection,l=e("./mode/text").Mode,u=e("./range").Range,c=e("./document").Document,d=e("./background_tokenizer").BackgroundTokenizer,h=e("./search_highlight").SearchHighlight,p=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new c(e)),this.setDocument(e),this.selection=new s(this),o.resetOptions(this),this.setMode(t),o._signal("session",this)};(function(){function e(e){return 4352>e?!1:e>=4352&&4447>=e||e>=4515&&4519>=e||e>=4602&&4607>=e||e>=9001&&9002>=e||e>=11904&&11929>=e||e>=11931&&12019>=e||e>=12032&&12245>=e||e>=12272&&12283>=e||e>=12288&&12350>=e||e>=12353&&12438>=e||e>=12441&&12543>=e||e>=12549&&12589>=e||e>=12593&&12686>=e||e>=12688&&12730>=e||e>=12736&&12771>=e||e>=12784&&12830>=e||e>=12832&&12871>=e||e>=12880&&13054>=e||e>=13056&&19903>=e||e>=19968&&42124>=e||e>=42128&&42182>=e||e>=43360&&43388>=e||e>=44032&&55203>=e||e>=55216&&55238>=e||e>=55243&&55291>=e||e>=63744&&64255>=e||e>=65040&&65049>=e||e>=65072&&65106>=e||e>=65108&&65126>=e||e>=65128&&65131>=e||e>=65281&&65376>=e||e>=65504&&65510>=e}i.implement(this,a),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;i>=n;){var r=n+i>>1,o=e[r];if(t>o)n=r+1;else{if(!(o>t))return r;i=r-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);this.$fromUndo||!this.$undoManager||e.ignore||(this.$deltasDoc.push(e),t&&0!=t.length&&this.$deltasFold.push({action:"removeFolds",folds:t}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n,i=this.bgTokenizer.getTokens(e),r=0;if(null==t)o=i.length-1,r=this.getLine(e).length;else for(var o=0;o<i.length&&(r+=i[o].value.length,!(r>=t));o++);return(n=i[o])?(n.index=o,n.start=r-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,i){var r=this.$markerId++,o={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!i,id:r};return i?(this.$frontMarkers[r]=o,this._signal("changeFrontMarker")):(this.$backMarkers[r]=o,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var n=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete n[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new h(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,i){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var r=new u(e,0,t,1/0);return r.id=this.addMarker(r,n,"fullLine",i),r},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine="\n"},this.getWordRange=function(e,t){var n=this.getLine(e),i=!1;if(t>0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var r=/\s/;else var r=this.nonTokenRe;var o=t;if(o>0){do o--;while(o>=0&&n.charAt(o).match(r));o++}for(var a=t;a<n.length&&n.charAt(a).match(r);)a++;return new u(e,o,e,a)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),i=this.getLine(n.end.row);i.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,i=n.path}else i=e||"ace/mode/text";return this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[i]&&!n?(this.$onChangeMode(this.$modes[i]),void(t&&t())):(this.$modeId=i,o.loadModule(["mode",i],function(e){return this.$modeId!==i?t&&t():(this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[i]=e,e.$id=i),this.$onChangeMode(e)),void(t&&t()))}.bind(this)),void(this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)))},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var n=e.getTokenizer();if(void 0!==n.addEventListener){var i=this.onReloadTokenizer.bind(this);n.addEventListener("update",i)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(n);else{this.bgTokenizer=new d(n);var r=this;this.bgTokenizer.addEventListener("update",function(e){r._signal("tokenizerUpdate",e)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){o.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],a=o?o.start.row:1/0,s=t.length,l=0;s>l;l++){if(l>a){if(l=o.end.row+1,l>=s)break;o=this.$foldData[r++],a=o?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,i=e.length-1;-1!=i;i--){var r=e[i];"doc"==r.group?(this.doc.revertDeltas(r.deltas),n=this.$getUndoSelection(r.deltas,!0,n)):r.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,i=0;i<e.length;i++){var r=e[i];"doc"==r.group&&(this.doc.applyDeltas(r.deltas),n=this.$getUndoSelection(r.deltas,!1,n))}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,n){function i(e){return t?"insert"!==e.action:"insert"===e.action}var r,o,a=e[0],s=!1;i(a)?(r=u.fromPoints(a.start,a.end),s=!0):(r=u.fromPoints(a.start,a.start),s=!1);for(var l=1;l<e.length;l++)a=e[l],i(a)?(o=a.start,-1==r.compare(o.row,o.column)&&r.setStart(o),o=a.end,1==r.compare(o.row,o.column)&&r.setEnd(o),s=!0):(o=a.start,-1==r.compare(o.row,o.column)&&(r=u.fromPoints(a.start,a.start)),s=!1);if(null!=n){0===u.comparePoints(n.start,r.start)&&(n.start.column+=r.end.column-r.start.column,n.end.column+=r.end.column-r.start.column);var c=n.compareRange(r);1==c?r.setStart(n.start):-1==c&&r.setEnd(n.end)}return r},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var i=this.getTextRange(e),r=this.getFoldsInRange(e),o=u.fromPoints(t,t);if(!n){this.remove(e);var a=e.start.row-e.end.row,s=a?-e.end.column:e.start.column-e.end.column;s&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=s),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=s)),a&&o.start.row>=e.end.row&&(o.start.row+=a,o.end.row+=a)}if(o.end=this.insert(o.start,i),r.length){var l=e.start,c=o.start,a=c.row-l.row,s=c.column-l.column;this.addFolds(r.map(function(e){return e=e.clone(),e.start.row==l.row&&(e.start.column+=s),e.end.row==l.row&&(e.end.column+=s),e.start.row+=a,e.end.row+=a,e}))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;t>=i;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var a=0;i>a&&" "==o.charAt(a);++a);i>a&&" "==o.charAt(a)?(n.start.column=a,n.end.column=a+1):(n.start.column=0,n.end.column=a),this.remove(n)}},this.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),0>n){var i=this.getRowFoldStart(e+n);if(0>i)return 0;var r=i-e}else if(n>0){var i=this.getRowFoldEnd(t+n);if(i>this.doc.getLength()-1)return 0;var r=i-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var r=t-e+1}var o=new u(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(o).map(function(e){return e=e.clone(),e.start.row+=r,e.end.row+=r,e}),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,s),a.length&&this.addFolds(a),r},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return 0>t?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),0>e)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,
|
74
|
+
this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)&&(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1?(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,r=e.end,o=i.row,a=r.row,s=a-o,l=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,s);var u=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var c=this.getFoldLine(r.row),d=0;if(c){c.addRemoveChars(r.row,r.column,i.column-r.column),c.shiftRow(-s);var h=this.getFoldLine(o);h&&h!==c&&(h.merge(c),c=h),d=u.indexOf(c)+1}for(d;d<u.length;d++){var c=u[d];c.start.row>=r.row&&c.shiftRow(-s)}a=o}else{var p=Array(s);p.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,p);var u=this.$foldData,c=this.getFoldLine(o),d=0;if(c){var m=c.range.compareInside(i.row,i.column);0==m?(c=c.split(i.row,i.column),c&&(c.shiftRow(s),c.addRemoveChars(a,0,r.column-i.column))):-1==m&&(c.addRemoveChars(o,0,r.column-i.column),c.shiftRow(s)),d=u.indexOf(c)+1}for(d;d<u.length;d++){var c=u[d];c.start.row>=o&&c.shiftRow(s)}}else{s=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),s=-s);var c=this.getFoldLine(o);c&&c.addRemoveChars(o,i.column,s)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,a):this.$updateRowLengthCache(o,a),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var n,i,r=this.doc.getAllLines(),o=this.getTabSize(),a=this.$wrapData,l=this.$wrapLimit,u=e;for(t=Math.min(t,r.length-1);t>=u;)i=this.getFoldLine(u,i),i?(n=[],i.walk(function(e,t,i,o){var a;if(null!=e){a=this.$getDisplayTokens(e,n.length),a[0]=s;for(var l=1;l<a.length;l++)a[l]=c}else a=this.$getDisplayTokens(r[t].substring(o,i),n.length);n=n.concat(a)}.bind(this),i.end.row,r[i.end.row].length+1),a[i.start.row]=this.$computeWrapSplits(n,l,o),u=i.end.row+1):(n=this.$getDisplayTokens(r[u]),a[u]=this.$computeWrapSplits(n,l,o),u++)};var t=1,n=2,s=3,c=4,p=9,f=10,m=11,g=12;this.$computeWrapSplits=function(e,t,i){function r(){var t=0;if(0===y)return t;if(v)for(var n=0;n<e.length;n++){var r=e[n];if(r==f)t+=1;else{if(r!=m){if(r==g)continue;break}t+=i}}return h&&v!==!1&&(t+=i),Math.min(t,y)}function o(t){var n=e.slice(u,t),i=n.length;n.join("").replace(/12/g,function(){i-=1}).replace(/2/g,function(){i-=1}),a.length||(_=r(),a.indent=_),d+=i,a.push(d),u=t}if(0==e.length)return[];for(var a=[],l=e.length,u=0,d=0,h=this.$wrapAsCode,v=this.$indentedSoftWrap,y=t<=Math.max(2*i,8)||v===!1?0:Math.floor(t/2),_=0;l-u>t-_;){var b=u+t-_;if(e[b-1]>=f&&e[b]>=f)o(b);else if(e[b]!=s&&e[b]!=c){for(var x=Math.max(b-(t-(t>>2)),u-1);b>x&&e[b]<s;)b--;if(h){for(;b>x&&e[b]<s;)b--;for(;b>x&&e[b]==p;)b--}else for(;b>x&&e[b]<f;)b--;b>x?o(++b):(b=u+t,e[b]==n&&b--,o(b-_))}else{for(b;b!=u-1&&e[b]!=s;b--);if(b>u){o(b);continue}for(b=u+t;b<e.length&&e[b]==c;b++);if(b==e.length)break;o(b)}}return a},this.$getDisplayTokens=function(i,r){var o,a=[];r=r||0;for(var s=0;s<i.length;s++){var l=i.charCodeAt(s);if(9==l){o=this.getScreenTabSize(a.length+r),a.push(m);for(var u=1;o>u;u++)a.push(g)}else 32==l?a.push(f):l>39&&48>l||l>57&&64>l?a.push(p):l>=4352&&e(l)?a.push(t,n):a.push(t)}return a},this.$getStringScreenWidth=function(t,n,i){if(0==n)return[0,0];null==n&&(n=1/0),i=i||0;var r,o;for(o=0;o<t.length&&(r=t.charCodeAt(o),i+=9==r?this.getScreenTabSize(i):r>=4352&&e(r)?2:1,!(i>n));o++);return[i,o]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(0>e)return{row:0,column:0};var n,i,r=0,o=0,a=0,s=0,l=this.$screenRowCache,u=this.$getRowCacheIndex(l,e),c=l.length;if(c&&u>=0)var a=l[u],r=this.$docRowCache[u],d=e>l[c-1];else var d=!c;for(var h=this.getLength()-1,p=this.getNextFoldLine(r),f=p?p.start.row:1/0;e>=a&&(s=this.getRowLength(r),!(a+s>e||r>=h));)a+=s,r++,r>f&&(r=p.end.row+1,p=this.getNextFoldLine(r,p),f=p?p.start.row:1/0),d&&(this.$docRowCache.push(r),this.$screenRowCache.push(a));if(p&&p.start.row<=r)n=this.getFoldDisplayLine(p),r=p.start.row;else{if(e>=a+s||r>h)return{row:h,column:this.getLine(h).length};n=this.getLine(r),p=null}var m=0;if(this.$useWrapMode){var g=this.$wrapData[r];if(g){var v=Math.floor(e-a);i=g[v],v>0&&g.length&&(m=g.indent,o=g[v-1]||g[g.length-1],n=n.substring(o))}}return o+=this.$getStringScreenWidth(n,t-m)[1],this.$useWrapMode&&o>=i&&(o=i-1),p?p.idxToPosition(o):{row:r,column:o}},this.documentToScreenPosition=function(e,t){if("undefined"==typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i=0,r=null,o=null;o=this.getFoldAt(e,t,1),o&&(e=o.start.row,t=o.start.column);var a,s=0,l=this.$docRowCache,u=this.$getRowCacheIndex(l,e),c=l.length;if(c&&u>=0)var s=l[u],i=this.$screenRowCache[u],d=e>l[c-1];else var d=!c;for(var h=this.getNextFoldLine(s),p=h?h.start.row:1/0;e>s;){if(s>=p){if(a=h.end.row+1,a>e)break;h=this.getNextFoldLine(a,h),p=h?h.start.row:1/0}else a=s+1;i+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(i))}var f="";h&&s>=p?(f=this.getFoldDisplayLine(h,e,t),r=h.start.row):(f=this.getLine(e).substring(0,t),r=e);var m=0;if(this.$useWrapMode){var g=this.$wrapData[r];if(g){for(var v=0;f.length>=g[v];)i++,v++;f=f.substring(g[v-1]||0,f.length),m=v>0?g.indent:0}}return{row:i,column:m+this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=0,t=this.$foldData[r++],o=t?t.start.row:1/0;n>i;){var a=this.$wrapData[i];e+=a?a.length+1:1,i++,i>o&&(i=t.end.row+1,t=this.$foldData[r++],o=t?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,r=0;r<s.length;r++)t=s[r],e-=t.end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,i){if(0===n)return[0,0];n||(n=1/0),i=i||0;var r,o;for(o=0;o<t.length&&(r=t.charAt(o),i+=" "===r?this.getScreenTabSize(i):e.getCharacterWidth(r),!(i>n));o++);return[i,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()}}).call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),o.defineOptions(p.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){e="auto"==e?"text"!=this.$mode.type:"text"!=e,e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=p}),define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var i=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,a=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach(function(e,n,r){if(e.start)i=e;else{var a=e.offset+(r||0);if(i=new o(n,a,n,a+e.length),!e.length&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))return i=null,!1}return!0}),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var l,u=s.length,c=r.length-u;e:for(var d=s.offset||0;c>=d;d++){for(var h=0;u>h;h++)if(-1==r[d+h].search(s[h]))continue e;var p=r[d],f=r[d+u-1],m=p.length-p.match(s[0])[0].length,g=f.match(s[u-1])[0].length;l&&l.end.row===d&&l.end.column>m||(a.push(l=new o(d,m,d+u-1,g)),u>2&&(d=d+u-2))}}else for(var v=0;v<r.length;v++)for(var y=i.getMatchOffsets(r[v],s),h=0;h<y.length;h++){var _=y[h];a.push(new o(v,_.offset,v,_.offset+_.length))}if(n){for(var b=n.start.column,x=n.start.column,v=0,h=a.length-1;h>v&&a[v].start.column<b&&a[v].start.row==n.start.row;)v++;for(;h>v&&a[h].end.column>x&&a[h].end.row==n.end.row;)h--;for(a=a.slice(v,h+1),v=0,h=a.length;h>v;v++)a[v].start.row+=n.start.row,a[v].end.row+=n.start.row}return a},this.replace=function(e,t){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(i){var r=i.exec(e);if(!r||r[0].length!=e.length)return null;if(t=e.replace(i,t),n.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var a=e[o];a&&a.toLowerCase()!=a?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var r;if(t.$isMultiLine)var a=n.length,s=function(t,i,s){var l=t.search(n[0]);if(-1!=l){for(var u=1;a>u;u++)if(t=e.getLine(i+u),-1==t.search(n[u]))return;var c=t.match(n[a-1])[0].length,d=new o(i,l,i+a-1,c);return 1==n.offset?(d.start.row--,d.start.column=Number.MAX_VALUE):s&&(d.start.column+=s),r(d)?!0:void 0}};else if(t.backwards)var s=function(e,t,o){for(var a=i.getMatchOffsets(e,n),s=a.length-1;s>=0;s--)if(r(a[s],t,o))return!0};else var s=function(e,t,o){for(var a=i.getMatchOffsets(e,n),s=0;s<a.length;s++)if(r(a[s],t,o))return!0};var l=this.$lineIterator(e,t);return{forEach:function(e){r=e,l.forEach(s)}}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=i.escapeRegExp(n)),e.wholeWord&&(n="\\b"+n+"\\b");var r=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,r);try{var o=new RegExp(n,r)}catch(a){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],r=0;r<n.length;r++)try{i.push(new RegExp(n[r],t))}catch(o){return!1}return""==n[0]?(i.shift(),i.offset=1):i.offset=0,i},this.$lineIterator=function(e,t){var n=1==t.backwards,i=0!=t.skipCurrent,r=t.range,o=t.start;o||(o=r?r[n?"end":"start"]:e.selection.getRange()),o.start&&(o=o[i!=n?"end":"start"]);var a=r?r.start.row:0,s=r?r.end.row:e.getLength()-1,l=n?function(n){var i=o.row,r=e.getLine(i).substring(0,o.column);if(!n(r,i)){for(i--;i>=a;i--)if(n(e.getLine(i),i))return;if(0!=t.wrap)for(i=s,a=o.row;i>=a;i--)if(n(e.getLine(i),i))return}}:function(n){var i=o.row,r=e.getLine(i).substr(o.column);if(!n(r,i,o.column)){for(i+=1;s>=i;i++)if(n(e.getLine(i),i))return;if(0!=t.wrap)for(i=a,s=o.row;s>=i;i++)if(n(e.getLine(i),i))return}};return{forEach:l}}}).call(a.prototype),t.Search=a}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function i(e,t){this.platform=t||(a.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function r(e,t){i.call(this,e,t),this.$singleCommand=!1}var o=e("../lib/keys"),a=e("../lib/useragent"),s=o.KEY_MODS;r.prototype=i.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||0}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==e)delete i[r];else if(Array.isArray(o)){var a=o.indexOf(e);-1!=a&&(o.splice(a,1),1==o.length&&(i[r]=o[0]))}}},this.bindKey=function(e,t,n){return"object"==typeof e&&(void 0==n&&(n=e.position),e=e[this.platform]),e?"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var i="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach(function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")},this),i+=" "}var o=this.parseKeys(e),a=s[o.hashId]+o.key;this._addCommandToBinding(i+a,t,n)},this):void 0},this._addCommandToBinding=function(t,n,i){var r,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(r=o[t].indexOf(n))&&o[t].splice(r,1):o[t]=[o[t]],"number"!=typeof i&&(i=i||n.isDefault?-100:e(n));var a=o[t];for(r=0;r<a.length;r++){var s=a[r],l=e(s);if(l>i)break}a.splice(r,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),i=o[n];if(o.FUNCTION_KEYS[i])n=o.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var r=0,a=t.length;a--;){var s=o.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;r|=s}return{key:n,hashId:r}},this.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(0>i)){var r=s[t]+n,o=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:o}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(i.prototype),t.HashHandler=i,t.MultiHashHandler=r}),define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,a=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};i.inherits(a,r),function(){i.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var r={editor:t,command:e,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),r.returnValue===!1?!1:!0},this.toggleRecording=function(e){return this.$inReplay?void 0:(e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0))},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(a.prototype),t.CommandManager=a}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";function i(e,t){return{win:e,mac:t}}var r=e("../lib/lang"),o=e("../config"),a=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:i("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:i("Alt-E","Ctrl-E"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:i("Alt-Shift-E","Ctrl-Shift-E"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:i("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:i(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:i("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:i("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:i("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:i("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:i("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:i(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:i("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:i("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:i("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:i("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:i("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:i("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:i("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:i("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:i("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:i("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:i("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:i("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:i("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:i("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:i("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:i("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:i("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:i("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:i("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:i("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:i("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:i("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:i("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:i("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:i("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:i("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:i("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:i(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:i("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:i(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:i("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:i("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:i("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:i("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:i("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:i("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:i("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:i(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:i("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:i("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:i("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:i("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:i("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:i("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:i("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:i("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:i("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:i("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:i("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:i("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:i("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:i("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:i("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:i("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:i("Shift-Delete",null),exec:function(e){return e.selection.isEmpty()?void e.remove("left"):!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:i("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:i("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:i("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:i("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:i("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:i("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:i("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:i("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:i(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:i("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:i("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:i("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"
|
75
|
+
},{name:"expandtoline",bindKey:i("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:i(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()),l=s.replace(/\n\s*/," ").length,u=e.session.doc.getLine(n.row),c=n.row+1;c<=i.row+1;c++){var d=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),u+=d}i.row+1<e.session.doc.getLength()-1&&(u+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new a(n.row,0,i.row+2,0),u),l>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+l)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:i(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var o=0;o<i.length;o++)o==i.length-1&&(i[o].end.row!==t||i[o].end.column!==n)&&r.push(new a(i[o].end.row,i[o].end.column,t,n)),0===o?(0!==i[o].start.row||0!==i[o].start.column)&&r.push(new a(0,0,i[o].start.row,i[o].start.column)):r.push(new a(i[o-1].end.row,i[o-1].end.column,i[o].start.row,i[o].start.column));e.exitMultiSelectMode(),e.clearSelection();for(var o=0;o<r.length;o++)e.selection.addRange(r[o],!1)},readOnly:!0,scrollIntoView:"none"}]}),define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/lang"),a=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,h=e("./search").Search,p=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,g=e("./commands/default_commands").commands,v=e("./config"),y=e("./token_iterator").TokenIterator,_=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.commands=new m(a.isMac?"mac":"win",g),this.textInput=new s(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new c(this),this.$mouseHandler=new l(this),new u(this),this.$blockScrolling=0,this.$search=(new h).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||new d("")),v.resetOptions(this),v._signal("editor",this)};(function(){i.implement(this,f),this.$initOperationListeners=function(){this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=o.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&void 0!==this.curOp.command.scrollIntoView&&this.$blockScrolling++},this.endOperation=function(e){if(this.curOp){if(e&&e.returnValue===!1)return this.curOp=null;this._signal("beforeEndOperation");var t=this.curOp.command;t.name&&this.$blockScrolling>0&&this.$blockScrolling--;var n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),r=this.renderer.layerConfig;(i.start.row>=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.removeEventListener("changeCursor",this.$onCursorChange),n.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=t.findMatchingBracket(e.getCursorPosition());if(n)var i=new p(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)var i=t.$mode.getMatching(e.session);i&&(t.$bracketHighlight=t.addMarker(i,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),i=new y(e.session,n.row,n.column),r=i.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==r.type.indexOf("tag-open")||(r=i.stepForward())){var o=r.value,a=0,s=i.stepBackward();if("<"==s.value){do s=r,r=i.stepForward(),r&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===s.value?a++:"</"===s.value&&a--);while(r&&a>=0)}else{do r=s,s=i.stepBackward(),r&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===s.value?a++:"</"===s.value&&a--);while(s&&0>=a);i.stepForward()}if(!r)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=i.getCurrentTokenRow(),u=i.getCurrentTokenColumn(),c=new p(l,u,l,u+r.value.length);t.$tagHighlight&&0!==c.compareRange(t.$backMarkers[t.$tagHighlight].range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),c&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(c,"ace_bracket","text"))}}},50)}},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(v.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new p(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column-1,i=t.end.column+1,r=e.getLine(t.start.row),o=r.length,a=r.substring(Math.max(n,0),Math.min(i,o));if(!(n>=0&&/^[\w\d]/.test(a)||o>=i&&/[\w\d]$/.test(a))&&(a=r.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(a))){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:a});return s}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var n=t.split(/\r\n|\r|\n/),i=this.selection.rangeList.ranges;if(n.length>i.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,t);for(var r=i.length;r--;){var o=i[r];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,n[r])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,i=n.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=i.transformAction(n.getState(r.row),"insertion",this,n,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if(" "==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var a=new p.fromPoints(r,r);a.end.column+=e.length,this.session.remove(a)}}else{var a=this.getSelectionRange();r=this.session.remove(a),this.clearSelection()}if("\n"==e||"\r\n"==e){var s=n.getLine(r.row);if(r.column>s.search(/\S|$/)){var l=s.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var u=r.column,c=n.getState(r.row),s=n.getLine(r.row),d=i.checkOutdent(c,s,e);n.insert(r,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new p(r.row,u+o.selection[0],r.row,u+o.selection[1])):this.selection.setSelectionRange(new p(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),n.getDocument().isNewLine(e)){var h=i.getNextLineIndent(c,s.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},h)}d&&i.autoOutdent(c,n,r.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),r=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}r&&(t=r)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,r=this.session.getLine(e.row);t<r.length?(n=r.charAt(t)+r.charAt(t-1),i=new p(e.row,t-1,e.row,t+1)):(n=r.charAt(t-1)+r.charAt(t-2),i=new p(e.row,t-2,e.row,t)),this.session.replace(i,n)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(t.start.row<t.end.row){var n=this.$getSelectedRows();return void e.indentRows(n.first,n.last," ")}if(t.start.column<t.end.column){var i=e.getTextRange(t);if(!/^\s+$/.test(i)){var n=this.$getSelectedRows();return void e.indentRows(n.first,n.last," ")}}var r=e.getLine(t.start.row),a=t.start,s=e.getTabSize(),l=e.documentToScreenColumn(a.row,a.column);if(this.session.getUseSoftTabs())var u=s-l%s,c=o.stringRepeat(" ",u);else{for(var u=l%s;" "==r[t.start.column]&&u;)t.start.column--,u--;this.selection.setSelectionRange(t),c=" "}return this.insert(c)},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last," ")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){var e=this.$getSelectedRows(),t=this.session,n=[];for(r=e.first;r<=e.last;r++)n.push(t.getLine(r));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});for(var i=new p(0,0,0,0),r=e.first;r<=e.last;r++){var o=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=o.length,t.replace(i,n[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex<t;){var r=n.exec(i);if(r.index<=t&&r.index+r[0].length>=t){var o={value:r[0],start:r.index,end:r.index+r[0].length};return o}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new p(t,n-1,t,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,n);if(o){var a=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,s=o.start+o.value.length-a,l=parseFloat(o.value);l*=Math.pow(10,s),e*=a!==o.end&&a>n?Math.pow(10,o.end-n-1):Math.pow(10,o.end-n),l+=e,l/=Math.pow(10,s);var u=l.toFixed(s),c=new p(t,o.start,t,o.end);this.session.replace(c,u),this.moveCursorTo(t,Math.max(o.start+1,n+u.length-o.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var o=i?n.start:n.end,a=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=a,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,i,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();n=this.$getSelectedRows(o),i=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(i=0),o.moveBy(i,0),r.fromOrientedRange(o)}else{var a=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var s=0,l=0,u=a.length,c=0;u>c;c++){var d=c;a[c].moveBy(s,0),n=this.$getSelectedRows(a[c]);for(var h=n.first,p=n.last;++c<u;){l&&a[c].moveBy(l,0);var f=this.$getSelectedRows(a[c]);if(t&&f.first!=p)break;if(!t&&f.first>p+1)break;p=f.last}for(c--,s=this.session.$moveLines(h,p,t?0:e),t&&-1==e&&(d=c+1);c>=d;)a[d].moveBy(s,0),d++;t||(s=0),l+=s}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);this.$blockScrolling++,t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):t===!1&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),this.$blockScrolling--;var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new y(this.session,n.row,n.column),r=i.getCurrentToken(),o=r||i.stepForward();if(o){var a,s,l=!1,u={},c=n.column-o.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;c<o.value.length&&!l;c++)if(d[o.value[c]])switch(s=d[o.value[c]]+"."+o.type.replace("rparen","lparen"),isNaN(u[s])&&(u[s]=0),o.value[c]){case"(":case"[":case"{":u[s]++;break;case")":case"]":case"}":u[s]--,-1===u[s]&&(a="bracket",l=!0)}}else o&&-1!==o.type.indexOf("tag-name")&&(isNaN(u[o.value])&&(u[o.value]=0),"<"===r.value?u[o.value]++:"</"===r.value&&u[o.value]--,-1===u[o.value]&&(a="tag",l=!0));l||(r=o,o=i.stepForward(),c=0)}while(o&&!l);if(a){var h,f;if("bracket"===a)h=this.session.getBracketRange(n),h||(h=new p(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+c-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+c-1),f=h.start,(t||f.row===n.row&&Math.abs(f.column-n.column)<2)&&(h=this.session.getBracketRange(f)));else if("tag"===a){if(!o||-1===o.type.indexOf("tag-name"))return;var m=o.value;if(h=new p(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2),0===h.compare(n.row,n.column)){l=!1;do o=r,r=i.stepBackward(),r&&(-1!==r.type.indexOf("tag-close")&&h.setEnd(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1),o.value===m&&-1!==o.type.indexOf("tag-name")&&("<"===r.value?u[m]++:"</"===r.value&&u[m]--,0===u[m]&&(l=!0)));while(r&&!l)}o&&o.type.indexOf("tag-name")&&(f=h.start,f.row==n.row&&Math.abs(f.column-n.column)<2&&(f=h.end))}f=h&&h.cursor||f,f&&(e?h&&t?this.selection.setRange(h):h&&h.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(f.row,f.column):this.selection.moveTo(f.row,f.column))}}},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),
|
76
|
+
this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),i=0;return n?(this.$tryReplace(n,e)&&(i=1),null!==n&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),i):i},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;this.$blockScrolling+=1;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],e)&&i++;return this.selection.setSelectionRange(r),this.$blockScrolling-=1,i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),null!==t?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&i.mixin(t,e);var r=this.selection.getRange();null==t.needle&&(e=this.session.getTextRange(r)||this.$search.$options.needle,e||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var o=this.on("changeSelection",function(){i=!0}),a=this.renderer.on("beforeRender",function(){i&&(t=n.renderer.container.getBoundingClientRect())}),s=this.renderer.on("afterRender",function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=o.top-a.offset;i=o.top>=0&&s+t.top<0?!0:o.top<a.height&&o.top+t.top+a.lineHeight>window.innerHeight?!1:null,null!=i&&(r.style.top=s+"px",r.style.left=o.left+"px",r.style.height=a.lineHeight+"px",r.scrollIntoView(i)),i=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",o),this.renderer.removeEventListener("afterRender",s),this.renderer.removeEventListener("beforeRender",a))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}).call(_.prototype),v.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=_}),define("ace/undomanager",["require","exports","module"],function(e,t,n){"use strict";var i=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function n(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++){for(var r=e[i],o={group:r.group,deltas:new Array(r.length)},a=0;a<r.deltas.length;a++){var s=r.deltas[a];o.deltas[a]=t(s)}n[i]=o}return n}this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),n=null;return t&&(n=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),n},this.redo=function(e){var t=this.$redoStack.pop(),n=null;return t&&(n=this.$doc.redoChanges(this.$deserializeDeltas(t),e),this.$undoStack.push(t),this.dirtyCounter++),n},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return n(t,e)},this.$deserializeDeltas=function(e){return n(e,t)}}).call(i.prototype),t.UndoManager=i}),define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/lang"),a=e("../lib/event_emitter").EventEmitter,s=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){r.implement(this,a),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],i=n.row,r=this.$annotations[i];r||(r=this.$annotations[i]={text:[]});var a=n.text;a=a?o.escapeHTML(a):n.html||"",-1===r.text.indexOf(a)&&r.text.push(a);var s=n.type;"error"==s?r.className=" ace_error":"warning"==s&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=s||r.className||(r.className=" ace_info")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var i=new Array(n+1);i.unshift(t,1),this.$annotations.splice.apply(this.$annotations,i)}}},this.update=function(e){for(var t=this.session,n=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),o=t.getNextFoldLine(n),a=o?o.start.row:1/0,s=this.$showFoldWidgets&&t.foldWidgets,l=t.$breakpoints,u=t.$decorations,c=t.$firstLineNumber,d=0,h=t.gutterRenderer||this.$renderer,p=null,f=-1,m=n;;){if(m>a&&(m=o.end.row+1,o=t.getNextFoldLine(m,o),a=o?o.start.row:1/0),m>r){for(;this.$cells.length>f+1;)p=this.$cells.pop(),this.element.removeChild(p.element);break}p=this.$cells[++f],p||(p={element:null,textNode:null,foldWidget:null},p.element=i.createElement("div"),p.textNode=document.createTextNode(""),p.element.appendChild(p.textNode),this.element.appendChild(p.element),this.$cells[f]=p);var g="ace_gutter-cell ";l[m]&&(g+=l[m]),u[m]&&(g+=u[m]),this.$annotations[m]&&(g+=this.$annotations[m].className),p.element.className!=g&&(p.element.className=g);var v=t.getRowLength(m)*e.lineHeight+"px";if(v!=p.element.style.height&&(p.element.style.height=v),s){var y=s[m];null==y&&(y=s[m]=t.getFoldWidget(m))}if(y){p.foldWidget||(p.foldWidget=i.createElement("span"),p.element.appendChild(p.foldWidget));var g="ace_fold-widget ace_"+y;g+="start"==y&&m==a&&m<o.end.row?" ace_closed":" ace_open",p.foldWidget.className!=g&&(p.foldWidget.className=g);var v=e.lineHeight+"px";p.foldWidget.style.height!=v&&(p.foldWidget.style.height=v)}else p.foldWidget&&(p.element.removeChild(p.foldWidget),p.foldWidget=null);var _=d=h?h.getText(t,m):m+c;_!=p.textNode.data&&(p.textNode.data=_),m++}this.element.style.height=e.minHeight+"px",(this.$fixedWidth||t.$useWrapMode)&&(d=t.getLength()+c);var b=h?h.getWidth(t,d,e):d.toString().length*e.characterWidth,x=this.$padding||this.$computePadding();b+=x.left+x.right,b===this.gutterWidth||isNaN(b)||(this.gutterWidth=b,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",b))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1||0,this.$padding.right=parseInt(e.paddingRight)||0,this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0}}).call(s.prototype),t.Gutter=s}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var i=e("../range").Range,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,n,i){return(e?1:0)|(t?2:0)|(n?4:0)|(i?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(e){this.config=e;var t=[];for(var n in this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,e),a=this.$padding+r.start.column*e.characterWidth;i.renderer(t,r,a,o,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,r,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,r,i.clazz,e):r.isMultiLine()?"text"==i.type?this.drawTextMarker(t,r,i.clazz,e):this.drawMultiLineMarker(t,r,i.clazz,e):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(t,n,r,o,a){for(var s=this.session,l=n.start.row,u=n.end.row,c=l,d=0,h=0,p=s.getScreenLastRowColumn(c),f=new i(c,n.start.column,c,h);u>=c;c++)f.start.row=f.end.row=c,f.start.column=c==l?n.start.column:s.getRowWrapIndent(c),f.end.column=p,d=h,h=p,p=u>c+1?s.getScreenLastRowColumn(c+1):c==u?0:n.end.column,this.drawSingleLineMarker(t,f,r+(c==l?" ace_start":"")+" ace_br"+e(c==l||c==l+1&&n.start.column,h>d,h>p,c==u),o,c==u?0:1,a)},this.drawMultiLineMarker=function(e,t,n,i,r){var o=this.$padding,a=i.lineHeight,s=this.$getTop(t.start.row,i),l=o+t.start.column*i.characterWidth;r=r||"",e.push("<div class='",n," ace_br1 ace_start' style='","height:",a,"px;","right:0;","top:",s,"px;","left:",l,"px;",r,"'></div>"),s=this.$getTop(t.end.row,i);var u=t.end.column*i.characterWidth;if(e.push("<div class='",n," ace_br12' style='","height:",a,"px;","width:",u,"px;","top:",s,"px;","left:",o,"px;",r,"'></div>"),a=(t.end.row-t.start.row-1)*i.lineHeight,!(0>=a)){s=this.$getTop(t.start.row+1,i);var c=(t.start.column?1:0)|(t.end.column?0:8);e.push("<div class='",n,c?" ace_br"+c:"","' style='","height:",a,"px;","right:0;","top:",s,"px;","left:",o,"px;",r,"'></div>")}},this.drawSingleLineMarker=function(e,t,n,i,r,o){var a=i.lineHeight,s=(t.end.column+(r||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),u=this.$padding+t.start.column*i.characterWidth;e.push("<div class='",n,"' style='","height:",a,"px;","width:",s,"px;","top:",l,"px;","left:",u,"px;",o||"","'></div>")},this.drawFullLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),a=i.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,i)-o),e.push("<div class='",n,"' style='","height:",a,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")},this.drawScreenLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),a=i.lineHeight;e.push("<div class='",n,"' style='","height:",a,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")}}).call(o.prototype),t.Marker=o}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),a=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),s=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){i.implement(this,a),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;return this.EOL_CHAR!=e?(this.EOL_CHAR=e,!0):void 0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;e+1>n;n++)this.showInvisibles?t.push("<span class='ace_invisible ace_invisible_tab'>"+o.stringRepeat(this.TAB_CHAR,n)+"</span>"):t.push(o.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var i="ace_indent-guide",r="",a="";if(this.showInvisibles){i+=" ace_invisible",r=" ace_invisible_space",a=" ace_invisible_tab";var s=o.stringRepeat(this.SPACE_CHAR,this.tabSize),l=o.stringRepeat(this.TAB_CHAR,this.tabSize)}else var s=o.stringRepeat(" ",this.tabSize),l=s;this.$tabStrings[" "]="<span class='"+i+r+"'>"+s+"</span>",this.$tabStrings[" "]="<span class='"+i+a+"'>"+l+"</span>"}},this.updateLines=function(e,t,n){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;for(var i=Math.max(t,e.firstRow),r=Math.min(n,e.lastRow),o=this.element.childNodes,a=0,s=e.firstRow;i>s;s++){var l=this.session.getFoldLine(s);if(l){if(l.containsRow(i)){i=l.start.row;break}s=l.end.row}a++}for(var s=i,l=this.session.getNextFoldLine(s),u=l?l.start.row:1/0;;){if(s>u&&(s=l.end.row+1,l=this.session.getNextFoldLine(s,l),u=l?l.start.row:1/0),s>r)break;var c=o[a++];if(c){var d=[];this.$renderLine(d,s,!this.$useLineGroups(),s==u?l:!1),c.style.height=e.lineHeight*this.session.getRowLength(s)+"px",c.innerHTML=d.join("")}s++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var n=this.element;if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(var i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)n.removeChild(n.lastChild);if(e.firstRow<t.firstRow){var r=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r)}if(e.lastRow>t.lastRow){var r=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(r)}},this.$renderLinesFragment=function(e,t,n){for(var i=this.element.ownerDocument.createDocumentFragment(),o=t,a=this.session.getNextFoldLine(o),s=a?a.start.row:1/0;;){if(o>s&&(o=a.end.row+1,a=this.session.getNextFoldLine(o,a),s=a?a.start.row:1/0),o>n)break;var l=r.createElement("div"),u=[];if(this.$renderLine(u,o,!1,o==s?a:!1),l.innerHTML=u.join(""),this.$useLineGroups())l.className="ace_line_group",i.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)i.appendChild(l.firstChild);o++}return i},this.update=function(e){this.config=e;for(var t=[],n=e.firstRow,i=e.lastRow,r=n,o=this.session.getNextFoldLine(r),a=o?o.start.row:1/0;;){if(r>a&&(r=o.end.row+1,o=this.session.getNextFoldLine(r,o),a=o?o.start.row:1/0),r>i)break;this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(r),"px'>"),this.$renderLine(t,r,!1,r==a?o:!1),this.$useLineGroups()&&t.push("</div>"),r++}this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,i){var r=this,a=/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,s=function(e,n,i,a,s){if(n)return r.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+o.stringRepeat(r.SPACE_CHAR,e.length)+"</span>":e;if("&"==e)return"&";if("<"==e)return"<";if(">"==e)return">";if(" "==e){var l=r.session.getScreenTabSize(t+a);return t+=l-1,r.$tabStrings[l]}if("\u3000"==e){var u=r.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",c=r.showInvisibles?r.SPACE_CHAR:"";return t+=1,"<span class='"+u+"' style='width:"+2*r.config.characterWidth+"px'>"+c+"</span>"}return i?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+r.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+2*r.config.characterWidth+"px'>"+e+"</span>")},l=i.replace(a,s);if(this.$textToken[n.type])e.push(l);else{var u="ace_"+n.type.replace(/\./g," ace_"),c="";"fold"==n.type&&(c=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",u,"'",c,">",l,"</span>")}return t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);return 0>=i||i>=n?t:" "==t[0]?(i-=i%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],i/this.tabSize)),t.substr(i)):" "==t[0]?(e.push(o.stringRepeat(this.$tabStrings[" "],i)),t.substr(i)):t},this.$renderWrappedLine=function(e,t,n,i){for(var r=0,a=0,s=n[0],l=0,u=0;u<t.length;u++){var c=t[u],d=c.value;if(0==u&&this.displayIndentGuides){if(r=d.length,d=this.renderIndentGuide(e,d,s),!d)continue;r-=d.length}if(r+d.length<s)l=this.$renderToken(e,l,c,d),r+=d.length;else{for(;r+d.length>=s;)l=this.$renderToken(e,l,c,d.substring(0,s-r)),d=d.substring(s-r),r=s,i||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),e.push(o.stringRepeat("\xa0",n.indent)),a++,l=0,s=n[a]||Number.MAX_VALUE;0!=d.length&&(r+=d.length,l=this.$renderToken(e,l,c,d))}}},this.$renderSimpleLine=function(e,t){var n=0,i=t[0],r=i.value;this.displayIndentGuides&&(r=this.renderIndentGuide(e,r)),r&&(n=this.$renderToken(e,n,i,r));for(var o=1;o<t.length;o++)i=t[o],r=i.value,n=this.$renderToken(e,n,i,r)},this.$renderLine=function(e,t,n,i){if(i||0==i||(i=this.session.getFoldLine(t)),i)var r=this.$getFoldLineTokens(t,i);else var r=this.session.getTokens(t);if(n||e.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>"),r.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,r,o,n):this.$renderSimpleLine(e,r)}this.showInvisibles&&(i&&(t=i.end.row),e.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),n||e.push("</div>")},this.$getFoldLineTokens=function(e,t){function n(e,t,n){for(var i=0,o=0;o+e[i].value.length<t;)if(o+=e[i].value.length,i++,i==e.length)return;if(o!=t){var a=e[i].value.substring(t-o);a.length>n-t&&(a=a.substring(0,n-t)),r.push({type:e[i].type,value:a}),o=t+a.length,i+=1}for(;n>o&&i<e.length;){var a=e[i].value;a.length+o>n?r.push({type:e[i].type,value:a.substring(0,n-o)}):r.push(e[i]),o+=a.length,i+=1}}var i=this.session,r=[],o=i.getTokens(e);return t.walk(function(e,t,a,s,l){null!=e?r.push({type:"fold",value:e}):(l&&(o=i.getTokens(t)),o.length&&n(o,s,a))},t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(s.prototype),t.Text=s}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var i,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===i&&(i=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(i?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||i||(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),i=this.$padding+n.column*this.config.characterWidth,r=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:r}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;(void 0===t||0===t.length)&&(t=[{cursor:null}]);for(var n=0,r=t.length;r>n;n++){var o=this.getPixelPosition(t[n].cursor,!0);if(!((o.top>e.height+e.offset||o.top<0)&&n>1)){var a=(this.cursors[i++]||this.addCursor()).style;this.drawCursor?this.drawCursor(a,o,e,t[n],this.session):(a.left=o.left+"px",a.top=o.top+"px",a.width=e.characterWidth+"px",a.height=e.lineHeight+"px")}}for(;this.cursors.length>i;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,s=function(e){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){i.implement(this,a),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e}}).call(s.prototype);var l=function(e,t){s.call(this,e),this.scrollTop=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};i.inherits(l,s),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}.call(l.prototype);var u=function(e,t){s.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(u,s),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(u.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=u,t.VScrollBar=l,t.HScrollBar=u}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var i=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;i.nextFrame(function(){t.pending=!1;for(var e;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(r.prototype),t.RenderLoop=r}),define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),a=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,l=0,u=t.FontMetrics=function(e,t){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){i.implement(this,s),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=r.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=t>0&&1>t?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===l){var e=null;try{e=this.$measureNode.getBoundingClientRect();
|
77
|
+
}catch(t){e={width:0,height:0}}var n={height:e.height,width:e.width/l}}else var n={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/l};return 0===n.width||0===n.height?null:n},this.$measureCharWidth=function(e){this.$main.innerHTML=o.stringRepeat(e,l);var t=this.$main.getBoundingClientRect();return t.width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(u.prototype)}),define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./config"),a=e("./lib/useragent"),s=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,u=e("./layer/text").Text,c=e("./layer/cursor").Cursor,d=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,m=e("./lib/event_emitter").EventEmitter,g='.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}';r.importCssString(g,"ace_editor.css");var v=function(e,t){var n=this;this.container=e||r.createElement("div"),this.$keepTextAreaAtCursor=!a.isOldIE,r.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var i=this.$textLayer=new u(this.content);this.canvas=i.element,this.$markerFront=new l(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var r=0,o=this.$size,a={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return i&&(e||o.height!=i)&&(o.height=i,r|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),n&&(e||o.width!=n)&&(r|=this.CHANGE_SIZE,o.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL)),o.$dirty=!n||!i,r&&this._signal("resize",a),r},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var i=this.textarea.style,r=this.lineHeight;if(0>t||t>e.height-r)return void(i.top=i.left="0");var o=this.characterWidth;if(this.$composition){var a=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(a)[0]+2,r+=2}n-=this.scrollLeft,n>this.$size.scrollerWidth-o&&(n=this.$size.scrollerWidth-o),n+=this.gutterWidth,i.height=r+"px",i.width=o+"px",i.left=Math.min(n,this.$size.scrollerWidth-o)+"px",i.top=Math.min(t,this.$size.height-r)+"px"}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t)return void(this.$changes|=e);if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-n.offset+"px",this.content.style.marginTop=-n.offset+"px",this.content.style.width=n.width+2*this.$padding+"px",this.content.style.height=n.minHeight+"px"}return e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):e&this.CHANGE_SCROLL?(e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(e&this.CHANGE_TEXT?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),void this._signal("afterRender"))},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight());var i=e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength(),r=i*this.lineHeight,o=this.$getLongestLine(),a=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),s=this.$horizScroll!==a;s&&(this.$horizScroll=a,this.scrollBarH.setVisible(a));var l=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var u=this.scrollTop%this.lineHeight,c=t.scrollerHeight+this.lineHeight,d=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=d;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,r-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+h.right)));var p=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+d<0||this.scrollTop>h.top),f=l!==p;f&&(this.$vScroll=p,this.scrollBarV.setVisible(p));var m,g,v=Math.ceil(c/this.lineHeight)-1,y=Math.max(0,Math.round((this.scrollTop-u)/this.lineHeight)),_=y+v,b=this.lineHeight;y=e.screenToDocumentRow(y,0);var x=e.getFoldLine(y);x&&(y=x.start.row),m=e.documentToScreenRow(y,0),g=e.getRowLength(y)*b,_=Math.min(e.screenToDocumentRow(_,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(_)*b+g,u=this.scrollTop-m*b;var w=0;return this.layerConfig.width!=o&&(w=this.CHANGE_H_SCROLL),(s||f)&&(w=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),f&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:y,firstRowScreen:m,lastRow:_,lineHeight:b,characterWidth:this.characterWidth,minHeight:c,maxHeight:r,offset:u,gutterOffset:Math.max(0,Math.ceil((u+t.height-t.scrollerHeight)/b)),height:this.$size.scrollerHeight},w},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;return e>n.lastRow+1||t<n.firstRow?void 0:t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),r=i.left,o=i.top,a=n&&n.top||0,s=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+a>o?(t&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-s<o+this.lineHeight&&(t&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight-this.$size.scrollerHeight));var u=this.scrollLeft;u>r?(r<this.$padding+2*this.layerConfig.characterWidth&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):u+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):u<=this.$padding&&r-u<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),i=this.$size.scrollerHeight-this.lineHeight,r=n.top-i*(t||0);return this.session.setScrollTop(r),r},this.STEPS=8,this.$calcSteps=function(e,t){var n=0,i=this.STEPS,r=[],o=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;i>n;++n)r.push(o(n/this.STEPS,e,t-e));
|
78
|
+
return r},this.scrollToLine=function(e,t,n,i){var r=this.$cursorLayer.getPixelPosition({row:e,column:0}),o=r.top;t&&(o-=this.$size.scrollerHeight/2);var a=this.scrollTop;this.session.setScrollTop(o),n!==!1&&this.animateScrolling(a,i)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(e!=n){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0],e==n))return}var o=i.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:o},clearInterval(this.$timer),i.session.setScrollTop(o.shift()),i.session.$scrollTop=n,this.$timer=setInterval(function(){o.length?(i.session.setScrollTop(o.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):(i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,t&&t())},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return 0>t&&this.session.getScrollTop()>=1-this.scrollMargin.top?!0:t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom?!0:0>e&&this.session.getScrollLeft()>=1-this.scrollMargin.left?!0:e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right?!0:void 0},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=(e+this.scrollLeft-n.left-this.$padding)/this.characterWidth,r=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),o=Math.round(i);return{row:r,column:o,side:i-o>0?1:-1}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=Math.round((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),r=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(r,Math.max(i,0))},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),r=this.$padding+Math.round(i.column*this.characterWidth),o=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(r.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){function n(n){if(i.$themeId!=e)return t&&t();if(n.cssClass){r.importCssString(n.cssText,n.cssClass,i.container.ownerDocument),i.theme&&r.removeCssClass(i.container,i.theme.cssClass);var o="padding"in n?n.padding:"padding"in(i.theme||{})?4:i.$padding;i.$padding&&o!=i.$padding&&i.setPadding(o),i.$theme=n.cssClass,i.theme=n,r.addCssClass(i.container,n.cssClass),r.setCssClass(i.container,"ace_dark",n.isDark),i.$size&&(i.$size.width=0,i.$updateSizeAsync()),i._dispatchEvent("themeLoaded",{theme:n}),t&&t()}}var i=this;if(this.$themeId=e,i._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)n(e);else{var a=e||this.$options.theme.initialValue;o.loadModule(["theme",a],n)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){r.setCssClass(this.container,e,t!==!1)},this.unsetStyle=function(e){r.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(v.prototype),o.defineOptions(v.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=e?"":"none",void(this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight())):(this.$gutterLineHighlight=r.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight))},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=v}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,a=e("../config"),s=function(t,n,i,r){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)r=r||a.moduleUrl(n,"worker");else{var o=this.$normalizePath;r=r||o(e.toUrl("ace/worker/worker.js",null,"_"));var s={};t.forEach(function(t){s[t]=o(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{this.$worker=new Worker(r)}catch(l){if(!(l instanceof window.DOMException))throw l;var u=this.$workerBlob(r),c=window.URL||window.webkitURL,d=c.createObjectURL(u);this.$worker=new Worker(d),c.revokeObjectURL(d)}this.$worker.postMessage({init:!0,tlns:s,module:n,classname:i}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,o),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return r.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))},this.$workerBlob=function(e){var t="importScripts('"+r.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(n){var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,o=new i;return o.append(t),o.getBlob("application/javascript")}}}).call(s.prototype);var l=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var i=null,r=!1,s=Object.create(o),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),i&&(r?setTimeout(u):u())},this.setEmitSync=function(e){r=e};var u=function(){var e=l.messageBuffer.shift();e.command?i[e.command].apply(i,e.args):e.event&&s._signal(e.event,e.data)};s.postMessage=function(e){l.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],function(e){for(i=new e[n](s);l.messageBuffer.length;)u()})};l.prototype=s.prototype,t.UIWorkerClient=l,t.WorkerClient=s}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),a=function(e,t,n,i,r,o){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,r=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s=this.others[a],l={row:s.row,column:s.column+o};this.doc.insertMergedLines(l,e.lines)}else if("remove"===e.action)for(var a=this.others.length-1;a>=0;a--){var s=this.others[a],l={row:s.row,column:s.column+o};this.doc.remove(new i(l.row,l.column,l.row,l.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;t>n;n++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(a.prototype),t.PlaceHolder=a}),define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){function i(e,t){return e.row==t.row&&e.column==t.column}function r(e){var t=e.domEvent,n=t.altKey,r=t.shiftKey,s=t.ctrlKey,l=e.getAccelKey(),u=e.getButton();if(s&&a.isMac&&(u=t.button),e.editor.inMultiSelectMode&&2==u)return void e.editor.textInput.onContextMenu(e.domEvent);if(!s&&!n&&!l)return void(0===u&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode());if(0===u){var c,d=e.editor,h=d.selection,p=d.inMultiSelectMode,f=e.getDocumentPosition(),m=h.getCursor(),g=e.inSelection()||h.isEmpty()&&i(f,m),v=e.x,y=e.y,_=function(e){v=e.clientX,y=e.clientY},b=d.session,x=d.renderer.pixelToScreenCoordinates(v,y),w=x;if(d.$mouseHandler.$enableJumpToDef)s&&n||l&&n?c=r?"block":"add":n&&d.$blockSelectEnabled&&(c="block");else if(l&&!n){if(c="add",!p&&r)return}else n&&d.$blockSelectEnabled&&(c="block");if(c&&a.isMac&&t.ctrlKey&&d.$mouseHandler.cancelContextMenu(),"add"==c){if(!p&&g)return;if(!p){var $=h.toOrientedRange();d.addSelectionMarker($)}var k=h.rangeList.rangeAtPoint(f);d.$blockScrolling++,d.inVirtualSelectionMode=!0,r&&(k=null,$=h.ranges[0]||$,d.removeSelectionMarker($)),d.once("mouseup",function(){var e=h.toOrientedRange();k&&e.isEmpty()&&i(k.cursor,e.cursor)?h.substractPoint(e.cursor):(r?h.substractPoint($.cursor):$&&(d.removeSelectionMarker($),h.addRange($)),h.addRange(e)),d.$blockScrolling--,d.inVirtualSelectionMode=!1})}else if("block"==c){e.stop(),d.inVirtualSelectionMode=!0;var C,A=[],M=function(){var e=d.renderer.pixelToScreenCoordinates(v,y),t=b.screenToDocumentPosition(e.row,e.column);i(w,e)&&i(t,h.lead)||(w=e,d.$blockScrolling++,d.selection.moveToPosition(t),d.renderer.scrollCursorIntoView(),d.removeSelectionMarkers(A),A=h.rectangularRangeBlock(w,x),d.$mouseHandler.$clickSelection&&1==A.length&&A[0].isEmpty()&&(A[0]=d.$mouseHandler.$clickSelection.clone()),A.forEach(d.addSelectionMarker,d),d.updateSelectionMarkers(),d.$blockScrolling--)};d.$blockScrolling++,p&&!l?h.toSingleRange():!p&&l&&(C=h.toOrientedRange(),d.addSelectionMarker(C)),r?x=b.documentToScreenPosition(h.lead):h.moveToPosition(f),d.$blockScrolling--,w={row:-1,column:-1};var T=function(e){clearInterval(D),d.removeSelectionMarkers(A),A.length||(A=[h.toOrientedRange()]),d.$blockScrolling++,C&&(d.removeSelectionMarker(C),h.toSingleRange(C));for(var t=0;t<A.length;t++)h.addRange(A[t]);d.inVirtualSelectionMode=!1,d.$mouseHandler.$clickSelection=null,d.$blockScrolling--},S=M;o.capture(d.container,_,T);var D=setInterval(function(){S()},20);return e.preventDefault()}}}var o=e("../lib/event"),a=e("../lib/useragent");t.onMouseDown=r}),define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)}),define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,n){function i(e,t,n){return m.$options.wrap=!0,m.$options.needle=t,m.$options.backwards=-1==n,m.find(e)}function r(e,t){return e.row==t.row&&e.column==t.column}function o(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",c),e.commands.addCommands(p.defaultCommands),a(e))}function a(e){function t(t){i&&(e.renderer.setMouseCursor(""),i=!1)}var n=e.textInput.getElement(),i=!1;d.addListener(n,"keydown",function(n){var r=18==n.keyCode&&!(n.ctrlKey||n.shiftKey||n.metaKey);e.$blockSelectEnabled&&r?i||(e.renderer.setMouseCursor("crosshair"),i=!0):i&&t()}),d.addListener(n,"keyup",t),d.addListener(n,"blur",t)}var s=e("./range_list").RangeList,l=e("./range").Range,u=e("./selection").Selection,c=e("./mouse/multi_select_handler").onMouseDown,d=e("./lib/event"),h=e("./lib/lang"),p=e("./commands/multi_select_commands");t.commands=p.defaultCommands.concat(p.multiSelectCommands);var f=e("./search").Search,m=new f,g=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);return t?(this.$onRemoveRange(t),t[0]):void 0},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=l.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),i=this.isBackwards(),r=n.start.row,o=n.end.row;if(r==o){if(i)var a=n.end,s=n.start;else var a=n.start,s=n.end;return this.addRange(l.fromPoints(s,s)),void this.addRange(l.fromPoints(a,a))}var u=[],c=this.getLineRange(r,!0);c.start.column=n.start.column,u.push(c);for(var d=r+1;o>d;d++)u.push(this.getLineRange(d,!0));c=this.getLineRange(o,!0),c.end.column=n.end.column,u.push(c),u.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=l.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.selectionLead),r=this.session.documentToScreenPosition(this.selectionAnchor),o=this.rectangularRangeBlock(i,r);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],o=e.column<t.column;if(o)var a=e.column,s=t.column;else var a=t.column,s=e.column;var u=e.row<t.row;if(u)var c=e.row,d=t.row;else var c=t.row,d=e.row;0>a&&(a=0),0>c&&(c=0),c==d&&(n=!0);for(var h=c;d>=h;h++){var p=l.fromPoints(this.session.screenToDocumentPosition(h,a),this.session.screenToDocumentPosition(h,s));if(p.isEmpty()){if(f&&r(p.end,f))break;var f=p.end}p.cursor=o?p.start:p.end,i.push(p)}if(u&&i.reverse(),!n){for(var m=i.length-1;i[m].isEmpty()&&m>0;)m--;if(m>0)for(var g=0;i[g].isEmpty();)g++;for(var v=m;v>=g;v--)i[v].isEmpty()&&i.splice(v,1)}return i}}.call(u.prototype);var v=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var r=t.indexOf(i);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(p.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(p.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,o=1==n||n&&n.$byLines,a=this.session,s=this.selection,l=s.rangeList,c=(r?s:l).ranges;if(!c.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=s._eventRegistry;s._eventRegistry={};var h=new u(a);this.inVirtualSelectionMode=!0;for(var p=c.length;p--;){if(o)for(;p>0&&c[p].start.row==c[p-1].end.row;)p--;h.fromOrientedRange(c[p]),h.index=p,this.selection=a.selection=h;var f=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===f||(i=f),h.toOrientedRange(c[p])}h.detach(),this.selection=a.selection=s,this.inVirtualSelectionMode=!1,s._eventRegistry=d,s.mergeOverlappingRanges();var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;i<t.length;i++)n.push(this.session.getTextRange(t[i]));var r=this.session.getDocument().getNewLineCharacter();e=n.join(r),e.length==(n.length-1)*r.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var i=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;(i.row!=t.row||this.session.$clipPositionToDocument(i.row,i.column).column!=t.column)&&this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(e,t,n){if(t=t||{},t.needle=e||t.needle,void 0==t.needle){var i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(i)}this.$search.set(t);var r=this.$search.findAll(this.session);if(!r.length)return 0;this.$blockScrolling+=1;var o=this.multiSelect;n||o.toSingleRange(r[0]);for(var a=r.length;a--;)o.addRange(r[a],!0);return i&&o.rangeList.rangeAtPoint(i.start)&&o.addRange(i,!0),this.$blockScrolling-=1,r.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,r=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(r.column=this.selection.$desiredColumn);var o=this.session.screenToDocumentPosition(r.row+e,r.column);if(n.isEmpty())var a=o;else var s=this.session.documentToScreenPosition(i?n.end:n.start),a=this.session.screenToDocumentPosition(s.row+e,s.column);if(i){var u=l.fromPoints(o,a);u.cursor=u.start}else{var u=l.fromPoints(a,o);u.cursor=u.end}if(u.desiredColumn=r.column,this.selection.inMultiSelectMode){if(t)var c=n.cursor}else this.selection.addRange(n);this.selection.addRange(u),c&&this.selection.substractPoint(c)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,i=n.ranges,r=i.length;r--;){var o=i[r];if(o.isEmpty()){var a=t.getWordRange(o.start.row,o.start.column);o.start.row=a.start.row,o.start.column=a.start.column,o.end.row=a.end.row,o.end.column=a.end.column}}n.mergeOverlappingRanges();for(var s=[],r=i.length;r--;){var o=i[r];s.unshift(t.getTextRange(o))}0>e?s.unshift(s.pop()):s.push(s.shift());for(var r=i.length;r--;){var o=i[r],a=o.clone();t.replace(o,s[r]),o.start.row=a.start.row,o.start.column=a.start.column}},this.selectMore=function(e,t,n){var r=this.session,o=r.multiSelect,a=o.toOrientedRange();if(!a.isEmpty()||(a=r.getWordRange(a.start.row,a.start.column),a.cursor=-1==e?a.start:a.end,this.multiSelect.addRange(a),!n)){var s=r.getTextRange(a),l=i(r,s,e);l&&(l.cursor=-1==e?l.start:l.end,this.$blockScrolling+=1,this.session.unfold(l),this.multiSelect.addRange(l),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(a.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,i=-1,r=n.filter(function(e){return e.cursor.row==i?!0:void(i=e.cursor.row)});if(n.length&&r.length!=n.length-1){r.forEach(function(e){t.substractPoint(e.cursor)});var o=0,a=1/0,s=n.map(function(t){var n=t.cursor,i=e.getLine(n.row),r=i.substr(n.column).search(/\S/g);return-1==r&&(r=0),n.column>o&&(o=n.column),a>r&&(a=r),r});n.forEach(function(t,n){var i=t.cursor,r=o-i.column,u=s[n]-a;r>u?e.insert(i,h.stringRepeat(" ",r-u)):e.remove(new l(i.row,i.column,i.row,i.column-r+u)),t.start.column=t.end.column=o,t.start.row=t.end.row=i.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),c=u.start.row,d=u.end.row,p=c==d;if(p){var f,m=this.session.getLength();do f=this.session.getLine(d);while(/[=:]/.test(f)&&++d<m);do f=this.session.getLine(c);while(/[=:]/.test(f)&&--c>0);0>c&&(c=0),d>=m&&(d=m-1)}var g=this.session.removeFullLines(c,d);g=this.$reAlignText(g,p),this.session.insert({row:c,column:0},g.join("\n")+"\n"),p||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){function n(e){return h.stringRepeat(" ",e)}function i(e){return e[2]?n(a)+e[2]+n(s-e[2].length+l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function r(e){return e[2]?n(a+s-e[2].length)+e[2]+n(l," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function o(e){return e[2]?n(a)+e[2]+n(l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var a,s,l,u=!0,c=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==a?(a=t[1].length,s=t[2].length,l=t[3].length,t):(a+s+l!=t[1].length+t[2].length+t[3].length&&(c=!1),a!=t[1].length&&(u=!1),a>t[1].length&&(a=t[1].length),s<t[2].length&&(s=t[2].length),l>t[3].length&&(l=t[3].length),t):[e]}).map(t?i:u?c?r:i:o)}}).call(v.prototype),t.onSessionChange=function(e){var t=e.session;
|
79
|
+
t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=o,e("./config").defineOptions(v.prototype,"editor",{enableMultiselect:{set:function(e){o(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",c)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",c))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,o=e.getLine(t),a=o.search(r);if(-1!=a){for(var s=n||o.length,l=e.getLength(),u=t,c=t;++t<l;){var d=e.getLine(t).search(r);if(-1!=d){if(a>=d)break;c=t}}if(c>u){var h=e.getLine(c).length;return new i(u,s,c,h)}}},this.openingBracketBlock=function(e,t,n,r,o){var a={row:n,column:r+1},s=e.$findClosingBracket(t,a,o);if(s){var l=e.foldWidgets[s.row];return null==l&&(l=e.getFoldWidget(s.row)),"start"==l&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),i.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,r,o){var a={row:n,column:r},s=e.$findOpeningBracket(t,a);return s?(s.column++,a.column--,i.fromPoints(s,a)):void 0}}).call(r.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var i=e("../lib/dom");i.importCssString(t.cssText,t.cssClass)}),define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function i(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var r=(e("./lib/oop"),e("./lib/dom"));e("./range").Range;(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets?this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0:0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=e.data,r=i.start.row,o=i.end.row,a="add"==e.action,s=r+1;o>s;s++)n[s]&&(n[s].hidden=a);n[o]&&(a?n[r]?n[o].hidden=a:n[r]=n[o]:(n[r]==n[o]&&(n[r]=void 0),n[o].hidden=a))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,i=e.end.row-n;if(0===i);else if("remove"==e.action){var r=t.splice(n+1,i);r.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var o=new Array(i);o.unshift(n,0),t.splice.apply(t,o),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget}),t&&(this.session.lineWidgets=null)}},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e.session=this.session;var n=this.editor.renderer;e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,n.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),e.pixelHeight||(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/n.layerConfig.lineHeight);var i=this.session.getFoldAt(e.row,0);if(e.$fold=i,i){var o=this.session.lineWidgets;e.row!=i.end.row||o[i.start.row]?e.hidden=!0:o[i.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,n),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(t){}if(this.session.lineWidgets){var n=this.session.lineWidgets[e.row];if(n==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;n;){if(n.$oldWidget==e){n.$oldWidget=e.$oldWidget;break}n=n.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o<n.length;o++){var a=n[o];if(a&&a.el&&a.session==this.session){if(!a._inDocument){if(this.session.lineWidgets[a.row]!=a)continue;a._inDocument=!0,t.container.appendChild(a.el)}a.h=a.el.offsetHeight,a.fixedWidth||(a.w=a.el.offsetWidth,a.screenWidth=Math.ceil(a.w/i.characterWidth));var s=a.h/i.lineHeight;a.coverLine&&(s-=this.session.getRowLineCount(a.row),0>s&&(s=0)),a.rowCount!=s&&(a.rowCount=s,a.row<r&&(r=a.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var n=t.layerConfig,i=this.session.lineWidgets;if(i){for(var r=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,i.length);r>0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=r;o>=a;a++){var s=i[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var l=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=l-n.offset+"px";var u=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(u-=t.scrollLeft),s.el.style.left=u+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}}}).call(i.prototype),t.LineWidgets=i}),define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function i(e,t,n){for(var i=0,r=e.length-1;r>=i;){var o=i+r>>1,a=n(t,e[o]);if(a>0)i=o+1;else{if(!(0>a))return o;r=o-1}}return-(i+1)}function r(e,t,n){var r=e.getAnnotations().sort(s.comparePoints);if(r.length){var o=i(r,{row:t,column:-1},s.comparePoints);0>o&&(o=-o-1),o>=r.length?o=n>0?0:r.length-1:0===o&&0>n&&(o=r.length-1);var a=r[o];if(a&&n){if(a.row===t){do a=r[o+=n];while(a&&a.row===t);if(!a)return r.slice()}var l=[];t=a.row;do l[0>n?"unshift":"push"](a),a=r[o+=n];while(a&&a.row==t);return l.length&&l}}}var o=e("../line_widgets").LineWidgets,a=e("../lib/dom"),s=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new o(n),n.widgetManager.attach(e));var i=e.getCursorPosition(),s=i.row,l=n.widgetManager.getWidgetsAtRow(s).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():s-=t;var u,c=r(n,s,t);if(c){var d=c[0];i.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,i.row=d.row,u=e.renderer.$gutterLayer.$annotations[i.row]}else{if(l)return;u={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(i.row),e.selection.moveToPosition(i);var h={row:i.row,fixedWidth:!0,coverGutter:!0,el:a.createElement("div"),type:"errorMarker"},p=h.el.appendChild(a.createElement("div")),f=h.el.appendChild(a.createElement("div"));f.className="error_widget_arrow "+u.className;var m=e.renderer.$cursorLayer.getPixelPosition(i).left;f.style.left=m+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+u.className,p.innerHTML=u.text.join("<br>"),p.appendChild(a.createElement("div"));var g=function(e,t,n){return 0!==t||"esc"!==n&&"return"!==n?void 0:(h.destroy(),{command:"null"})};h.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},a.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/dom"),r=e("./lib/event"),o=e("./editor").Editor,a=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.edit=function(e){if("string"==typeof e){var n=e;if(e=document.getElementById(n),!e)throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof o)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var s=e;a=s.value,e=i.createElement("pre"),s.parentNode.replaceChild(e,s)}else e&&(a=i.getInnerText(e),e.innerHTML="");var u=t.createEditSession(a),c=new o(new l(e));c.setSession(u);var d={document:u,editor:c,onResize:c.resize.bind(c,null)};return s&&(d.textarea=s),r.addListener(window,"resize",d.onResize),c.on("destroy",function(){r.removeListener(window,"resize",d.onResize),d.editor.container.env=null}),c.container.env=c.env=d,c},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new s),n},t.EditSession=a,t.UndoManager=s,t.version="1.2.2"}),function(){window.require(["ace/ace"],function(e){e&&e.config.init(!0),window.ace||(window.ace=e);for(var t in e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])})}(),define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=e("./lib/lang"),a=e("./range").Range,s=e("./anchor").Anchor,l=e("./keyboard/hash_handler").HashHandler,u=e("./tokenizer").Tokenizer,c=a.comparePoints,d=function(){this.snippetMap={},this.snippetNameMap={}};(function(){i.implement(this,r),this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return d.$tokenizer=new u({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length?e=i:-1!="`$\\".indexOf(i)?e=i:n.inFormatString&&("n"==i?e="\n":"t"==i?e="\n":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){var r=e(t.substr(1),n,i);return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var i=n[0];return i.fmtString=e,e=this.splitRegex.exec(e),i.guard=e[1],i.fmt=e[2],i.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),d.prototype.getTokenizer=function(){return d.$tokenizer},d.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var i=e.session;switch(t){case"CURRENT_WORD":var r=i.getWordRange();case"SELECTION":case"SELECTED_TEXT":return i.getTextRange(r);case"CURRENT_LINE":return i.getLine(e.getCursorPosition().row);case"PREV_LINE":return i.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return i.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return i.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,n){var i=t.flag||"",r=t.guard;r=new RegExp(r,i.replace(/[^gi]/,""));var o=this.tokenizeTmSnippet(t.fmt,"formatString"),a=this,s=e.replace(r,function(){a.variables.__=arguments;for(var e=a.resolveVariables(o,n),t="E",i=0;i<e.length;i++){var r=e[i];if("object"==typeof r)if(e[i]="",r.changeCase&&r.local){var s=e[i+1];s&&"string"==typeof s&&("u"==r.changeCase?e[i]=s[0].toUpperCase():e[i]=s[0].toLowerCase(),e[i+1]=s.substr(1))}else r.changeCase&&(t=r.changeCase);else"U"==t?e[i]=r.toUpperCase():"L"==t&&(e[i]=r.toLowerCase())}return e.join("")});return this.variables.__=null,s},this.resolveVariables=function(e,t){function n(t){var n=e.indexOf(t,r+1);-1!=n&&(r=n)}for(var i=[],r=0;r<e.length;r++){var o=e[r];if("string"==typeof o)i.push(o);else{if("object"!=typeof o)continue;if(o.skip)n(o);else{if(o.processed<r)continue;if(o.text){var a=this.getVariableValue(t,o.text);a&&o.fmtString&&(a=this.tmStrFormat(a,o)),o.processed=r,null==o.expectIf?a&&(i.push(a),n(o)):a?o.skip=o.elseBranch:n(o)}else null!=o.tabstopId?i.push(o):null!=o.changeCase&&i.push(o)}}}return i},this.insertSnippetForSelection=function(e,t){function n(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];if("object"==typeof i){if(u[i.tabstopId])continue;var r=e.lastIndexOf(i,n-1);i=t[r]||{tabstopId:i.tabstopId}}t[n]=i}return t}var i=e.getCursorPosition(),r=e.session.getLine(i.row),o=e.session.getTabString(),a=r.match(/^\s*/)[0];i.column<a.length&&(a=a.slice(0,i.column));var s=this.tokenizeTmSnippet(t);s=this.resolveVariables(s,e),s=s.map(function(e){return"\n"==e?e+a:"string"==typeof e?e.replace(/\t/g,o):e});var l=[];s.forEach(function(e,t){if("object"==typeof e){var n=e.tabstopId,i=l[n];if(i||(i=l[n]=[],i.index=n,i.value=""),-1===i.indexOf(e)){i.push(e);var r=s.indexOf(e,t+1);if(-1!==r){var o=s.slice(t+1,r),a=o.some(function(e){return"object"==typeof e});a&&!i.value?i.value=o:!o.length||i.value&&"string"==typeof i.value||(i.value=o.join(""))}}}}),l.forEach(function(e){e.length=0});for(var u={},c=0;c<s.length;c++){var d=s[c];if("object"==typeof d){var p=d.tabstopId,f=s.indexOf(d,c+1);if(u[p])u[p]===d&&(u[p]=null);else{var m=l[p],g="string"==typeof m.value?[m.value]:n(m.value);g.unshift(c+1,Math.max(0,f-c)),g.push(d),u[p]=d,s.splice.apply(s,g),-1===m.indexOf(d)&&m.push(d)}}}var v=0,y=0,_="";s.forEach(function(e){"string"==typeof e?("\n"===e[0]?(y=e.length-1,v++):y+=e.length,_+=e):e.start?e.end={row:v,column:y}:e.start={row:v,column:y}});var b=e.getSelectionRange(),x=e.session.replace(b,_),w=new h(e),$=e.inVirtualSelectionMode&&e.selection.index;w.addTabstops(l,b.start,x,$)},this.insertSnippet=function(e,t){var n=this;return e.inVirtualSelectionMode?n.insertSnippetForSelection(e,t):(e.forEachSelection(function(){n.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),void(e.tabstopManager&&e.tabstopManager.tabNext()))},this.$getScope=function(e){var t=e.session.$mode.$id||"";if(t=t.split("/").pop(),"html"===t||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var n=e.getCursorPosition(),i=e.session.getState(n.row);"object"==typeof i&&(i=i[0]),i.substring&&("js-"==i.substring(0,3)?t="javascript":"css-"==i.substring(0,4)?t="css":"php-"==i.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],i=this.snippetMap;return i[t]&&i[t].includeScopes&&n.push.apply(n,i[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,i=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return i&&e.tabstopManager&&e.tabstopManager.tabNext(),i},this.expandSnippetForSelection=function(e,t){var n,i=e.getCursorPosition(),r=e.session.getLine(i.row),o=r.substring(0,i.column),a=r.substr(i.column),s=this.snippetMap;return this.getActiveScopes(e).some(function(e){var t=s[e];return t&&(n=this.findMatchingSnippet(t,o,a)),!!n},this),n?t&&t.dryRun?!0:(e.session.doc.removeInLine(i.row,i.column-n.replaceBefore.length,i.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null,!0):!1},this.findMatchingSnippet=function(e,t,n){for(var i=e.length;i--;){var r=e[i];if((!r.startRe||r.startRe.test(t))&&(!r.endRe||r.endRe.test(n))&&(r.startRe||r.endRe))return r.matchBefore=r.startRe?r.startRe.exec(t):[""],r.matchAfter=r.endRe?r.endRe.exec(n):[""],r.replaceBefore=r.triggerRe?r.triggerRe.exec(t)[0]:"",r.replaceAfter=r.endTriggerRe?r.endTriggerRe.exec(n)[0]:"",r}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function n(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function i(e,t,i){return e=n(e),t=n(t),i?(e=t+e,e&&"$"!=e[e.length-1]&&(e+="$")):(e+=t,e&&"^"!=e[0]&&(e="^"+e)),new RegExp(e)}function r(e){e.scope||(e.scope=t||"_"),t=e.scope,a[t]||(a[t]=[],s[t]={});var n=s[t];if(e.name){var r=n[e.name];r&&l.unregister(r),n[e.name]=e}a[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=o.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=i(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=i(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0))}var a=this.snippetMap,s=this.snippetNameMap,l=this;e||(e=[]),e&&e.content?r(e):Array.isArray(e)&&e.forEach(r),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){function n(e){var n=r[e.scope||t];if(n&&n[e.name]){delete n[e.name];var o=i[e.scope||t],a=o&&o.indexOf(e);a>=0&&o.splice(a,1)}}var i=this.snippetMap,r=this.snippetNameMap;e.content?n(e):Array.isArray(e)&&e.forEach(n)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=r.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch(o){}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var a=t[2],s=t[3];if("regex"==a){var l=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=l.exec(s)[1],i.trigger=l.exec(s)[1],i.endTrigger=l.exec(s)[1],i.endGuard=l.exec(s)[1]}else"snippet"==a?(i.tabTrigger=s.match(/^\S*/)[0],i.name||(i.name=s)):i[a]=s}}return n},this.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some(function(t){var r=i[t];return r&&(n=r[e]),!!n},this),n}}).call(d.prototype);var h=function(e){return e.tabstopManager?e.tabstopManager:(e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),void this.attach(e))};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t="r"==e.action[0],n=e.start,i=e.end,r=n.row,o=i.row,a=o-r,s=i.column-n.column;if(t&&(a=-a,s=-s),!this.$inChange&&t){var l=this.selectedTabstop,u=l&&!l.some(function(e){return c(e.start,n)<=0&&c(e.end,i)>=0});if(u)return this.detach()}for(var d=this.ranges,h=0;h<d.length;h++){var p=d[h];p.end.row<n.row||(t&&c(n,p.start)<0&&c(i,p.end)>0?(this.removeRange(p),h--):(p.start.row==r&&p.start.column>n.column&&(p.start.column+=s),p.end.row==r&&p.end.column>=n.column&&(p.end.column+=s),p.start.row>=r&&(p.start.row+=a),p.end.row>=r&&(p.end.row+=a),c(p.start,p.end)>0&&this.removeRange(p)))}d.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var n=this.editor.session,i=n.getTextRange(e.firstNonLinked),r=e.length;r--;){var o=e[r];if(o.linked){var a=t.snippetManager.tmStrFormat(i,o.original);n.replace(o,a)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),i=this.ranges.length;i--;)if(!this.ranges[i].linked){var r=this.ranges[i].contains(e.row,e.column),o=n||this.ranges[i].contains(t.row,t.column);if(r&&o)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);n=Math.min(Math.max(n,1),t),n==t&&(n=0),this.selectTabstop(n),0===n&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index],t&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var n=this.editor.multiSelect;n.toSingleRange(t.firstNonLinked.clone());for(var i=t.length;i--;)t.hasLinkedRanges&&t[i].linked||n.addRange(t[i].clone(),!0);n.ranges[0]&&n.addRange(n.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,n){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var i=a.fromPoints(n,n);m(i.start,t),m(i.end,t),e[0]=[i],e[0].index=0}var r=this.index,o=[r+1,0],s=this.ranges;e.forEach(function(e,n){for(var i=this.$openTabstops[n]||e,r=e.length;r--;){var l=e[r],u=a.fromPoints(l.start,l.end||l.start);f(u.start,t),f(u.end,t),u.original=l,u.tabstop=i,s.push(u),i!=e?i.unshift(u):i[r]=u,l.fmtString?(u.linked=!0,i.hasLinkedRanges=!0):i.firstNonLinked||(i.firstNonLinked=u)}i.firstNonLinked||(i.hasLinkedRanges=!1),i===e&&(o.push(i),this.$openTabstops[n]=i),this.addTabstopMarkers(i)},this),o.length>2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),-1!=t&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(h.prototype);var p={};p.onChange=s.prototype.onChange,p.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},p.update=function(e,t,n){this.$insertRight=n,this.pos=e,this.onChange(t)};var f=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},m=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new d;var g=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(g.prototype)}),define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t,n){"use strict";var i=e("../virtual_renderer").VirtualRenderer,r=e("../editor").Editor,o=e("../range").Range,a=e("../lib/event"),s=e("../lib/lang"),l=e("../lib/dom"),u=function(e){var t=new i(e);t.$maxLines=4;var n=new r(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusWaitTimout=0,n.$highlightTagPending=!0,n},c=function(e){var t=l.createElement("div"),n=new u(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i=function(){};n.focus=i,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=i,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),d.start.row=d.end.row=t.row,e.stop()});var r,c=new o(-1,0,-1,1/0),d=new o(-1,0,-1,1/0);d.id=n.session.addMarker(d,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?c.id&&(n.session.removeMarker(c.id),c.id=null):c.id=n.session.addMarker(c,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",function(e){if(!r)return void(r=e);if(r.x!=e.x||r.y!=e.y){r=e,r.scrollTop=n.renderer.scrollTop;var t=r.getDocumentPosition().row;
|
80
|
+
c.start.row!=t&&(c.id||n.setRow(t),p(t))}}),n.renderer.on("beforeRender",function(){if(r&&-1!=c.start.row){r.$pos=null;var e=r.getDocumentPosition().row;c.id||n.setRow(e),p(e,!0)}}),n.renderer.on("afterRender",function(){var e=n.getRow(),t=n.renderer.$textLayer,i=t.element.childNodes[e-t.config.firstRow];i!=t.selectedNode&&(t.selectedNode&&l.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=i,i&&l.addCssClass(i,"ace_selected"))});var h=function(){p(-1)},p=function(e,t){e!==c.start.row&&(c.start.row=c.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return c.start.row},a.addListener(n.container,"mouseout",h),n.on("hide",h),n.on("changeSelection",h),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var f=n.session.bgTokenizer;return f.$tokenizeRow=function(e){var t=n.data[e],i=[];if(!t)return i;"string"==typeof t&&(t={value:t}),t.caption||(t.caption=t.value||t.name);for(var r,o,a=-1,s=0;s<t.caption.length;s++)o=t.caption[s],r=t.matchMask&1<<s?1:0,a!==r?(i.push({type:t.className||""+(r?"completion-highlight":""),value:o}),a=r):i[i.length-1].value+=o;if(t.meta){var l=n.renderer.$size.scrollerWidth/n.renderer.layerConfig.characterWidth,u=t.meta;u.length+t.caption.length>l-2&&(u=u.substr(0,l-t.caption.length-3)+"\u2026"),i.push({type:"rightAlignedText",value:u})}return i},f.$updateOnChange=i,f.start=i,n.session.$computeWidth=function(){return this.screenWidth=0},n.$blockScrolling=1/0,n.isOpen=!1,n.isTopdown=!1,n.data=[],n.setData=function(e){n.setValue(s.stringRepeat("\n",e.length),-1),n.data=e||[],n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return d.start.row},n.setRow=function(e){e=Math.max(-1,Math.min(this.data.length,e)),d.start.row!=e&&(n.selection.clearSelection(),d.start.row=d.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()}),n.hide=function(){this.container.style.display="none",this._signal("hide"),n.isOpen=!1},n.show=function(e,t,i){var o=this.container,a=window.innerHeight,s=window.innerWidth,l=this.renderer,u=l.$maxLines*t*1.4,c=e.top+this.$borderSize;c+u>a-t&&!i?(o.style.top="",o.style.bottom=a-c+"px",n.isTopdown=!1):(c+=t,o.style.top=c+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="",this.renderer.$textLayer.checkForSizeChanges();var d=e.left;d+o.offsetWidth>s&&(d=s-o.offsetWidth),o.style.left=d+"px",this._signal("show"),r=null,n.isOpen=!0},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n};l.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover { position: absolute; z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller { background: none; border: none; box-shadow: none;}.ace_rightAlignedText { color: gray; display: inline-block; position: absolute; right: 4px; text-align: right; z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #000; text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete { width: 280px; z-index: 200000; background: #fbfbfb; color: #444; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4;}"),t.AcePopup=c}),define("ace/autocomplete/util",["require","exports","module"],function(e,t,n){"use strict";t.parForEach=function(e,t,n){var i=0,r=e.length;0===r&&n();for(var o=0;r>o;o++)t(e[o],function(e,t){i++,i===r&&n(e,t)})};var i=/[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t-1;o>=0&&n.test(e[o]);o--)r.push(e[o]);return r.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t;o<e.length&&n.test(e[o]);o++)r.push(e[o]);return r}}),define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"],function(e,t,n){"use strict";var i=e("./keyboard/hash_handler").HashHandler,r=e("./autocomplete/popup").AcePopup,o=e("./autocomplete/util"),a=(e("./lib/event"),e("./lib/lang")),s=e("./lib/dom"),l=e("./snippets").snippetManager,u=function(){this.autoInsert=!1,this.autoSelect=!0,this.exactMatch=!1,this.gatherCompletionsId=0,this.keyboardHandler=new i,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=a.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=a.delayedCall(this.updateDocTooltip.bind(this),50)};(function(){this.$init=function(){return this.popup=new r(document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.tooltipTimer.bind(null,null)),this.popup.on("select",this.tooltipTimer.bind(null,null)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},this.getPopup=function(){return this.popup||this.$init()},this.openPopup=function(e,t,n){this.popup||this.$init(),this.popup.setData(this.completions.filtered),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var i=e.renderer;if(this.popup.setRow(this.autoSelect?0:-1),n)n&&!t&&this.detach();else{this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize());var r=i.layerConfig.lineHeight,o=i.$cursorLayer.getPixelPosition(this.base,!0);o.left-=this.popup.getTextLeftOffset();var a=e.container.getBoundingClientRect();o.top+=a.top-i.layerConfig.offset,o.left+=a.left-e.renderer.scrollLeft,o.left+=i.gutterWidth,this.popup.show(o,r)}},this.detach=function(){this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener),this.changeTimer.cancel(),this.hideDocTooltip(),this.gatherCompletionsId+=1,this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),i=e.relatedTarget&&e.relatedTarget==this.tooltipNode,r=this.popup&&this.popup.container;t==n||t.parentNode==r||i||t==this.tooltipNode||e.relatedTarget==n||this.detach()},this.mousedownListener=function(e){this.detach()},this.mousewheelListener=function(e){this.detach()},this.goTo=function(e){var t=this.popup.getRow(),n=this.popup.session.getLength()-1;switch(e){case"up":t=0>=t?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.popup.setRow(t)},this.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(this.completions.filterText)for(var n,i=this.editor.selection.getAllRanges(),r=0;n=i[r];r++)n.start.column-=this.completions.filterText.length,this.editor.session.remove(n);e.snippet?l.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();return t||e.tabstopManager?t:void e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var n=e.getSession(),i=e.getCursorPosition(),r=n.getLine(i.row),a=o.retrievePrecedingIdentifier(r,i.column);this.base=n.doc.createAnchor(i.row,i.column-a.length),this.base.$insertRight=!0;var s=[],l=e.completers.length;return e.completers.forEach(function(r,u){r.getCompletions(e,n,i,a,function(i,r){i||(s=s.concat(r));var a=e.getCursorPosition(),u=n.getLine(a.row);t(null,{prefix:o.retrievePrecedingIdentifier(u,a.column,r[0]&&r[0].identifierRegex),matches:s,finished:0===--l})})}),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),n=this.editor.session.getTextRange({start:this.base,end:t});if(n==this.completions.filterText)return;return this.completions.setFilter(n),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=n||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,n,e):this.detach()}var i=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,n){var r=function(){return n.finished?this.detach():void 0}.bind(this),o=n.prefix,a=n&&n.matches;if(!a||!a.length)return r();if(0===o.indexOf(n.prefix)&&i==this.gatherCompletionsId){this.completions=new c(a),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(o);var s=this.completions.filtered;return s.length&&(1!=s.length||s[0].value!=o||s[0].snippet)?this.autoInsert&&1==s.length&&n.finished?this.insertMatch(s[0]):void this.openPopup(this.editor,o,e):r()}}.bind(this))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),i=null;return n&&this.editor&&this.popup.isOpen?(this.editor.completers.some(function(e){return e.getDocTooltip&&(i=e.getDocTooltip(n)),i}),i||(i=n),"string"==typeof i&&(i={docText:i}),i&&(i.docHTML||i.docText)?void this.showDocTooltip(i):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=s.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var n=this.popup,i=n.container.getBoundingClientRect();t.style.top=n.container.style.top,t.style.bottom=n.container.style.bottom,window.innerWidth-i.right<320?(t.style.right=window.innerWidth-i.left+"px",t.style.left=""):(t.style.left=i.right+1+"px",t.style.right=""),t.style.display="block"},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}}}).call(u.prototype),u.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new u),e.completer.autoInsert=!1,e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var c=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t===n?!1:(n=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),r=t.toLowerCase();e:for(var o,a=0;o=e[a];a++){var s=o.value||o.caption||o.snippet;if(s){var l,u,c=-1,d=0,h=0;if(this.exactMatch){if(t!==s.substr(0,t.length))continue e}else for(var p=0;p<t.length;p++){var f=s.indexOf(r[p],c+1),m=s.indexOf(i[p],c+1);if(l=f>=0&&(0>m||m>f)?f:m,0>l)continue e;u=l-c-1,u>0&&(-1===c&&(h+=10),h+=u),d|=1<<l,c=l}o.matchMask=d,o.exactMatch=h?0:1,o.score=(o.score||0)-h,n.push(o)}}return n}}).call(c.prototype),t.Autocomplete=u,t.FilteredList=c}),define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,t,n){function i(e,t){var n=e.getTextRange(o.fromPoints({row:0,column:0},t));return n.split(a).length-1}function r(e,t){var n=i(e,t),r=e.getValue().split(a),o=Object.create(null),s=r[n];return r.forEach(function(e,t){if(e&&e!==s){var i=Math.abs(n-t),a=r.length-i;o[e]?o[e]=Math.max(a,o[e]):o[e]=a}}),o}var o=e("../range").Range,a=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,i,o){var a=r(t,n,i),s=Object.keys(a);o(null,s.map(function(e){return{caption:e,value:e,score:a[e],meta:"local"}}))}}),define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,t,n){"use strict";function i(e){var t,n=e.getCursorPosition(),i=e.session.getLine(n.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=l.retrievePrecedingIdentifier(i,n.column,e))})}),t||l.retrievePrecedingIdentifier(i,n.column)}var r=e("../snippets").snippetManager,o=e("../autocomplete").Autocomplete,a=e("../config"),s=e("../lib/lang"),l=e("../autocomplete/util"),u=e("../autocomplete/text_completer"),c={getCompletions:function(e,t,n,i,r){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,i,r);var o=e.session.getState(n.row),a=t.$mode.getCompletions(o,t,n,i);r(null,a)}},d={getCompletions:function(e,t,n,i,o){var a=r.snippetMap,s=[];r.getActiveScopes(e).forEach(function(e){for(var t=a[e]||[],n=t.length;n--;){var i=t[n],r=i.name||i.tabTrigger;r&&s.push({caption:r,snippet:i.content,meta:i.tabTrigger&&!i.name?i.tabTrigger+"\u21e5 ":"snippet",type:"snippet"})}},this),o(null,s)},getDocTooltip:function(e){"snippet"!=e.type||e.docHTML||(e.docHTML=["<b>",s.escapeHTML(e.caption),"</b>","<hr></hr>",s.escapeHTML(e.snippet)].join(""))}},h=[d,u,c];t.setCompleters=function(e){h=e||[]},t.addCompleter=function(e){h.push(e)},t.textCompleter=u,t.keyWordCompleter=c,t.snippetCompleter=d;var p={name:"expandSnippet",exec:function(e){return r.expandWithTab(e)},bindKey:"Tab"},f=function(e,t){m(t.session.$mode)},m=function(e){var t=e.$id;r.files||(r.files={}),g(t),e.modes&&e.modes.forEach(m)},g=function(e){if(e&&!r.files[e]){var t=e.replace("mode","snippets");r.files[e]={},a.loadModule(t,function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){g("ace/mode/"+e)})))})}},v=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!i(t)&&t.completer.detach();else if("insertstring"===e.command.name){var r=i(t);r&&!n&&(t.completer||(t.completer=new o),t.completer.autoInsert=!1,t.completer.showPopup(t))}},y=e("../editor").Editor;e("../config").defineOptions(y.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.on("afterExec",v)):this.commands.removeListener("afterExec",v)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(p),this.on("changeMode",f),f(null,this)):(this.commands.removeCommand(p),this.off("changeMode",f))},value:!1}})}),function(){window.require(["ace/ext/language_tools"],function(){})}(),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};i.inherits(o,r),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function i(){var e=s.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var i="/"==e.charAt(1)?2:1;return 1==i?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==i&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==i?"":"end-")+"tag-open.xml",value:e.slice(0,i)},{type:"meta.tag.tag-name.xml",value:e.substr(i)}]},regex:"</?"+e,next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},n,{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[n,{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]}],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_\xa1-\uffff][a-zA-Z\\d\\$_\xa1-\uffff]*\\b",l=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+s+")(\\.)(prototype)(\\.)("+s+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx"))?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:r},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),e&&e.noJSX||i.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(l,a),t.JavaScriptHighlightRules=l}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var o=r[1].length,a=e.findMatchingBracket({row:t,column:o});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new i(t,0,t,o-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var i,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},d=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?i=c[t]:void(i=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},h=function(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},p=function(){this.add("braces","insertion",function(e,t,n,r,o){var a=n.getCursorPosition(),l=r.doc.getLine(a.row);if("{"==o){d(n);var u=n.getSelectionRange(),c=r.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return h(u,c,"{","}");if(p.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(p.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==o){d(n);var f=l.substring(a.column,a.column+1);
|
81
|
+
if("}"==f){var m=r.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==m&&p.isAutoInsertedClosing(a,l,o))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==o||"\r\n"==o){d(n);var g="";p.isMaybeInsertedClosing(a,l)&&(g=s.stringRepeat("}",i.maybeInsertedBrackets),p.clearMaybeInsertedClosing());var f=l.substring(a.column,a.column+1);if("}"===f){var v=r.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!v)return null;var y=this.$getIndent(r.getLine(v.row))}else{if(!g)return void p.clearMaybeInsertedClosing();var y=this.$getIndent(l)}var _=y+r.getTabString();return{text:"\n"+_+"\n"+y+g,selection:[1,_.length,1,_.length]}}p.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){d(n);var s=r.doc.getLine(o.start.row),l=s.substring(o.end.column,o.end.column+1);if("}"==l)return o.end.column++,o;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,i,r){if("("==r){d(n);var o=n.getSelectionRange(),a=i.doc.getTextRange(o);if(""!==a&&n.getWrapBehavioursEnabled())return h(o,a,"(",")");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(n);var s=n.getCursorPosition(),l=i.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=i.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&p.isAutoInsertedClosing(s,l,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o){d(n);var a=i.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,i,r){if("["==r){d(n);var o=n.getSelectionRange(),a=i.doc.getTextRange(o);if(""!==a&&n.getWrapBehavioursEnabled())return h(o,a,"[","]");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(n);var s=n.getCursorPosition(),l=i.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=i.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&p.isAutoInsertedClosing(s,l,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o){d(n);var a=i.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,i,r){if('"'==r||"'"==r){d(n);var o=r,a=n.getSelectionRange(),s=i.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return h(a,s,o,o);if(!s){var l=n.getCursorPosition(),u=i.doc.getLine(l.row),c=u.substring(l.column-1,l.column),p=u.substring(l.column,l.column+1),f=i.getTokenAt(l.row,l.column),m=i.getTokenAt(l.row,l.column+1);if("\\"==c&&f&&/escape/.test(f.type))return null;var g,v=f&&/string|escape/.test(f.type),y=!m||/string|escape/.test(m.type);if(p==o)g=v!==y;else{if(v&&!y)return null;if(v&&y)return null;var _=i.$mode.tokenRe;_.lastIndex=0;var b=_.test(c);_.lastIndex=0;var x=_.test(c);if(b||x)return null;if(p&&!/[\s;,.})\]\\]/.test(p))return null;g=!0}return{text:g?o+o:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==o||"'"==o)){d(n);var a=i.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==o)return r.end.column++,r}})};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new a(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){var r=new a(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",u)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+o.substr(r.column),i.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=o.substr(0,r.column)+n,i.maybeInsertedLineEnd=o.substr(r.column),i.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(p,o),t.CstyleBehaviour=p}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var i=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(a,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(i)?"start":r},this.getFoldWidgetRange=function(e,t,n,i){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var o=r.match(this.foldingStartMarker);if(o){var a=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,a);var s=e.getCommentFoldRange(n,a+o[0].length,1);return s&&!s.isMultiLine()&&(i?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var o=r.match(this.foldingStopMarker);if(o){var a=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),i=n.search(/\S/),o=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++t<l;){n=e.getLine(t);var u=n.search(/\S/);if(-1!==u){if(i>u)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=o)break;if(c.isMultiLine())t=c.end.row;else if(i==u)break}s=t}}return new r(o,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<o;){t=e.getLine(n);var u=s.exec(t);if(u&&(u[1]?l--:l++,!l))break}var c=n;return c>a?new r(a,i,c,t.length):void 0}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text").Mode,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=o,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};i.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),o=r.tokens,a=r.state;if(o.length&&"comment"==o[o.length-1].type)return i;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(i+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(i+=" "),i+="* ")}return i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),o=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",d=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",h=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",p=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":o,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:d},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:h},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};i.inherits(p,r),t.CssHighlightRules=p}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var i={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},r=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});i.hasOwnProperty(n)||(i[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,i){this.completionsDefined||this.defineCompletions();var r=t.getTokenAt(n.row,n.column);if(!r)return[];if("ruleset"===e){var o=t.getLine(n.row).substr(0,n.column);return/:[^;]+$/.test(o)?(/([\w\-]+):[^:]*$/.test(o),this.getPropertyValueCompletions(e,t,n,i)):this.getPropertyCompletions(e,t,n,i)}return[]},this.getPropertyCompletions=function(e,t,n,r){var o=Object.keys(i);return o.map(function(e){return{caption:e,snippet:e+": $0",meta:"property",score:Number.MAX_VALUE}})},this.getPropertyValueCompletions=function(e,t,n,r){var o=t.getLine(n.row).substr(0,n.column),a=(/([\w\-]+):[^:]*$/.exec(o)||{})[1];if(!a)return[];var s=[];return a in i&&"object"==typeof i[a]&&(s=Object.keys(i[a])),s.map(function(e){return{caption:e,snippet:e,meta:"property value",score:Number.MAX_VALUE}})}}).call(r.prototype),t.CssCompletions=r}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var i=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),o=e("../../token_iterator").TokenIterator,a=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,i,r){if(":"===r){var a=n.getCursorPosition(),s=new o(i,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=i.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,i,r){var a=i.doc.getTextRange(r);if(!r.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new o(i,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=i.doc.getLine(r.start.row),d=c.substring(r.end.column,r.end.column+1);if(";"===d)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,i,r){if(";"===r){var o=n.getCursorPosition(),a=i.doc.getLine(o.row),s=a.substring(o.column,o.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};i.inherits(a,r),t.CssBehaviour=a}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text").Mode,o=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,u=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=o,this.$outdent=new a,this.$behaviour=new u,this.$completer=new l,this.foldingRules=new c};i.inherits(d,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return i;var o=t.match(/^.*\{\s*$/);return o&&(i+=n),i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,i){return this.$completer.getCompletions(e,t,n,i)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(d.prototype),t.Mode=d}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(e){var t="[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],xml_decl:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:"(?:"+t+":)?"+t},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+t+":)?"+t+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:"+t+":)?"+t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===o&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(</)("+n+"(?=\\s|>|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),i.inherits(o,r),t.XmlHighlightRules=o}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/lang"),o=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(o,"css-","style"),this.embedTagRules(new a({noJSX:!0}).getRules(),"js-","script"),this.constructor===u&&this.normalizeRules()};i.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function i(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),o=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){var s=o,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),d=c.substring(u.column,u.column+1),h=new a(r,u.row,u.column),p=h.getCurrentToken();if(d==s&&(i(p,"attribute-value")||i(p,"string")))return{text:"",selection:[1,1]};if(p||(p=h.stepBackward()),!p)return;for(;i(p,"tag-whitespace")||i(p,"whitespace");)p=h.stepBackward();var f=!d||d.match(/\s/);if(i(p,"attribute-equals")&&(f||">"==d)||i(p,"decl-attribute-equals")&&(f||"?"==d))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==o||"'"==o)){var a=i.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==o)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,o){if(">"==o){var s=n.getCursorPosition(),l=new a(r,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(i(u,"tag-name")||i(u,"tag-whitespace")||i(u,"attribute-name")||i(u,"attribute-equals")||i(u,"attribute-value")))return;
|
82
|
+
if(i(u,"reference.attribute-value"))return;if(i(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var d=u.value.charAt(u.value.length-1),h=l.getCurrentTokenColumn()+u.value.length;if(h>s.column||h==s.column&&c!=d)return}}for(;!i(u,"tag-name");)u=l.stepBackward();var p=l.getCurrentTokenRow(),f=l.getCurrentTokenColumn();if(i(l.stepBackward(),"end-tag-open"))return;var m=u.value;if(p==s.row&&(m=m.substring(0,s.column-f)),this.voidElements.hasOwnProperty(m.toLowerCase()))return;return{text:"></"+m+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,i,r){if("\n"==r){var o=n.getCursorPosition(),s=i.getLine(o.row),l=new a(i,o.row,o.column),u=l.getCurrentToken();if(u&&-1!==u.type.indexOf("tag-close")){if("/>"==u.value)return;for(;u&&-1===u.type.indexOf("tag-name");)u=l.stepBackward();if(!u)return;var c=u.value,d=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||-1!==u.type.indexOf("end-tag"))return;if(this.voidElements&&!this.voidElements[c]){var h=i.getTokenAt(o.row,o.column+1),s=i.getLine(d),p=this.$getIndent(s),f=p+i.getTabString();return h&&"</"===h.value?{text:"\n"+f+"\n"+p,selection:[1,f.length,1,f.length]}:{text:"\n"+f}}}}})});r.inherits(s,o),t.XmlBehaviour=s}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var i=e("../../lib/oop"),r=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};i.inherits(o,r),function(){this.$getMode=function(e){"string"!=typeof e&&(e=e[0]);for(var t in this.subModes)if(0===e.indexOf(t))return this.subModes[t];return null},this.$tryMode=function(e,t,n,i){var r=this.$getMode(e);return r?r.getFoldWidget(t,n,i):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var i=this.$getMode(e.getState(n-1));return i&&i.getFoldWidget(e,t,n)||(i=this.$getMode(e.getState(n))),i&&i.getFoldWidget(e,t,n)||(i=this.defaultMode),i.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){"use strict";function i(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),o=(e("../../lib/lang"),e("../../range").Range),a=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){a.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,a);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var i=this._getFirstTagInLine(e,n);return i?i.closing||!i.tagName&&i.selfClosing?"markbeginend"==t?"end":"":!i.tagName||i.selfClosing||this.voidElements.hasOwnProperty(i.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,i.tagName,i.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,o=0;o<n.length;o++){var a=n[o];if(i(a,"tag-open")){if(r.end.column=r.start.column+a.value.length,r.closing=i(a,"end-tag-open"),a=n[++o],!a)return null;for(r.tagName=a.value,r.end.column+=a.value.length,o++;o<n.length;o++)if(a=n[o],r.end.column+=a.value.length,i(a,"tag-close")){r.selfClosing="/>"==a.value;break}return r}if(i(a,"tag-close"))return r.selfClosing="/>"==a.value,r;r.start.column+=a.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var o=e.getTokens(t),a=0,s=0;s<o.length;s++){var l=o[s];if(a+=l.value.length,!(r>a)&&i(l,"end-tag-open")&&(l=o[s+1],l&&l.value==n))return!0}return!1},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new u;do if(i(t,"tag-open"))n.closing=i(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn();else if(i(t,"tag-name"))n.tagName=t.value;else if(i(t,"tag-close"))return n.selfClosing="/>"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length,e.stepForward(),n;while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new u;do{if(i(t,"tag-open"))return n.closing=i(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn(),e.stepBackward(),n;i(t,"tag-name")?n.tagName=t.value:i(t,"tag-close")&&(n.selfClosing="/>"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var i=this._getFirstTagInLine(e,n);if(!i)return null;var r,a=i.closing||i.selfClosing,l=[];if(a)for(var u=new s(e,n,i.end.column),c={row:n,column:i.start.column};r=this._readTagBackward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,o.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,r.start.row==r.end.row&&r.start.column<r.end.column&&(r.start.column=r.end.column),o.fromPoints(r.start,c)}else{var u=new s(e,n,i.start.column),d={row:n,column:i.start.column+i.tagName.length+2};for(i.start.row==i.end.row&&(d.column=i.end.column);r=this._readTagForward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,o.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return o.fromPoints(d,r.start)}else l.push(r)}}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var i=e("../../lib/oop"),r=e("./mixed").FoldMode,o=e("./xml").FoldMode,a=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new o(e,t),{"js-":new a,"css-":new a})};i.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function i(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new a(e,t.row,t.column),r=n.getCurrentToken();r&&!i(r,"tag-name");)r=n.stepBackward();return r?r.value:void 0}function o(e,t){for(var n=new a(e,t.row,t.column),r=n.getCurrentToken();r&&!i(r,"attribute-name");)r=n.stepBackward();return r?r.value:void 0}var a=e("../token_iterator").TokenIterator,s=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],l=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],u=s.concat(l),c={html:{manifest:1},head:{},title:{},base:{href:1,target:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},noscript:{href:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},section:{},nav:{},article:{pubdate:1},aside:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},header:{},footer:{},address:{},main:{},p:{},hr:{},pre:{},blockquote:{cite:1},ol:{start:1,reversed:1},ul:{},li:{value:1},dl:{},dt:{},dd:{},figure:{},figcaption:{},div:{},a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},em:{},strong:{},small:{},s:{},cite:{},q:{cite:1},dfn:{},abbr:{},data:{},time:{datetime:1},code:{},"var":{},samp:{},kbd:{},sub:{},sup:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{},bdo:{},span:{},br:{},wbr:{},ins:{cite:1,datetime:1},del:{cite:1,datetime:1},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},embed:{src:1,height:1,width:1,type:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},param:{name:1,value:1},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},source:{src:1,type:1,media:1},track:{kind:1,src:1,srclang:1,label:1,"default":1},canvas:{width:1,height:1},map:{name:1},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},svg:{},math:{},table:{summary:1},caption:{},colgroup:{span:1},col:{span:1},tbody:{},thead:{},tfoot:{},tr:{},td:{headers:1,rowspan:1,colspan:1},th:{headers:1,rowspan:1,colspan:1,scope:1},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},fieldset:{disabled:1,form:1,name:1},legend:{},label:{form:1,"for":1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},datalist:{},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},output:{"for":1,form:1,name:1},progress:{value:1,max:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},details:{open:1},summary:{},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},menu:{type:1,label:1},dialog:{open:1}},d=Object.keys(c),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var o=t.getTokenAt(n.row,n.column);if(!o)return[];if(i(o,"tag-name")||i(o,"tag-open")||i(o,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(i(o,"tag-whitespace")||i(o,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(i(o,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var a=t.getLine(n.row).substr(0,n.column);return/&[A-z]*$/i.test(a)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,i){return d.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompletions=function(e,t,n,i){var o=r(t,n);if(!o)return[];var a=u;return o in c&&(a=a.concat(Object.keys(c[o]))),a.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})},this.getAttributeValueCompletions=function(e,t,n,i){var a=r(t,n),s=o(t,n);if(!a)return[];var l=[];return a in c&&s in c[a]&&"object"==typeof c[a][s]&&(l=Object.keys(c[a][s])),l.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:Number.MAX_VALUE}})},this.getHTMLEntityCompletions=function(e,t,n,i){var r=["Á","á","Â","â","´","Æ","æ","À","à","ℵ","Α","α","&","∧","∠","Å","å","≈","Ã","ã","Ä","ä","„","Β","β","¦","•","∩","Ç","ç","¸","¢","Χ","χ","ˆ","♣","≅","©","↵","∪","¤","‡","†","⇓","↓","°","Δ","δ","♦","÷","É","é","Ê","ê","È","è","∅"," "," ","Ε","ε","≡","Η","η","Ð","ð","Ë","ë","€","∃","ƒ","∀","½","¼","¾","⁄","Γ","γ","≥",">","⇔","↔","♥","…","Í","í","Î","î","¡","Ì","ì","ℑ","∞","∫","Ι","ι","¿","∈","Ï","ï","Κ","κ","Λ","λ","⟨","«","⇐","←","⌈","“","≤","⌊","∗","◊","‎","‹","‘","<","¯","—","µ","·","−","Μ","μ","∇"," ","–","≠","∋","¬","∉","⊄","Ñ","ñ","Ν","ν","Ó","ó","Ô","ô","Œ","œ","Ò","ò","‾","Ω","ω","Ο","ο","⊕","∨","ª","º","Ø","ø","Õ","õ","⊗","Ö","ö","¶","∂","‰","⊥","Φ","φ","Π","π","ϖ","±","£","″","′","∏","∝","Ψ","ψ",""","√","⟩","»","⇒","→","⌉","”","ℜ","®","⌋","Ρ","ρ","‏","›","’","‚","Š","š","⋅","§","­","Σ","σ","ς","∼","♠","⊂","⊆","∑","⊃","¹","²","³","⊇","ß","Τ","τ","∴","Θ","θ","ϑ"," ","Þ","þ","˜","×","™","Ú","ú","⇑","↑","Û","û","Ù","ù","¨","ϒ","Υ","υ","Ü","ü","℘","Ξ","ξ","Ý","ý","¥","Ÿ","ÿ","Ζ","ζ","‍","‌"];return r.map(function(e){return{caption:e,snippet:e.substr(1),meta:"html entity",score:Number.MAX_VALUE}})}}).call(h.prototype),t.HtmlCompletions=h}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/lang"),o=e("./text").Mode,a=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,d=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],f=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],m=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new d,this.createModeDelegates({"js-":a,"css-":s}),this.foldingRules=new c(this.voidElements,r.arrayToMap(f))};i.inherits(m,o),function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=r.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,i){return this.$completer.getCompletions(e,t,n,i)},this.createWorker=function(e){if(this.constructor==m){var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(m.prototype),t.Mode=m}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};i.inherits(o,r),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o}),define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars",t="ARGV|ENV|INC|SIG",n="getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do",i=this.createKeywordMapper({keyword:e,"constant.language":t,"support.function":n},"identifier");this.$rules={start:[{token:"comment.doc",regex:"^=(?:begin|item)\\b",next:"block_comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0x[0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"%#|\\$#|\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},{token:"comment",regex:"#.*$"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}],block_comment:[{token:"comment.doc",regex:"^=cut\\b",next:"start"},{defaultToken:"comment.doc"}]}};i.inherits(o,r),t.PerlHighlightRules=o}),define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern",i=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"constant.language":t,keyword:e},"identifier"),r="(?:r|u|ur|R|U|UR|Ur|uR)?",o="(?:(?:[1-9]\\d*)|(?:0))",a="(?:0[oO]?[0-7]+)",s="(?:0[xX][\\dA-Fa-f]+)",l="(?:0[bB][01]+)",u="(?:"+o+"|"+a+"|"+s+"|"+l+")",c="(?:[eE][+-]?\\d+)",d="(?:\\.\\d+)",h="(?:\\d+)",p="(?:(?:"+h+"?"+d+")|(?:"+h+"\\.))",f="(?:(?:"+p+"|"+h+")"+c+")",m="(?:"+f+"|"+p+")",g="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:r+'"{3}',next:"qqstring3"},{token:"string",regex:r+'"(?=.)',next:"qqstring"},{token:"string",regex:r+"'{3}",next:"qstring3"},{token:"string",regex:r+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+m+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:u+"[lL]\\b"},{token:"constant.numeric",regex:u+"\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:g},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:g},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};i.inherits(o,r),t.PythonHighlightRules=o}),define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};i.inherits(o,r),t.JsonHighlightRules=o}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function i(){var e=s.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var i="/"==e.charAt(1)?2:1;return 1==i?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==i&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==i?"":"end-")+"tag-open.xml",value:e.slice(0,i)},{type:"meta.tag.tag-name.xml",value:e.substr(i)}]},regex:"</?"+e,next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},n,{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[n,{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]}],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_\xa1-\uffff][a-zA-Z\\d\\$_\xa1-\uffff]*\\b",l=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+s+")(\\.)(prototype)(\\.)("+s+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
|
83
|
+
},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx"))?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:r},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),e&&e.noJSX||i.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(l,a),t.JavaScriptHighlightRules=l}),define("ace/mode/pgsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/perl_highlight_rules","ace/mode/python_highlight_rules","ace/mode/json_highlight_rules","ace/mode/javascript_highlight_rules"],function(e,t,n){var i=e("../lib/oop"),r=(e("../lib/lang"),e("./doc_comment_highlight_rules").DocCommentHighlightRules),o=e("./text_highlight_rules").TextHighlightRules,a=e("./perl_highlight_rules").PerlHighlightRules,s=e("./python_highlight_rules").PythonHighlightRules,l=e("./json_highlight_rules").JsonHighlightRules,u=e("./javascript_highlight_rules").JavaScriptHighlightRules,c=function(){var e="abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|anyrange|array|as|asc|assertion|assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|bigint|binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|create|cross|cstring|csv|current|current_catalog|current_date|current_role|current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|date|daterange|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|definer|delete|delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|double|drop|each|else|enable|encoding|encrypted|end|enum|escape|event|event_trigger|except|exclude|excluding|exclusive|execute|exists|explain|extension|external|extract|false|family|fdw_handler|fetch|first|float|float4|float8|following|for|force|foreign|forward|freeze|from|full|function|functions|global|grant|granted|greatest|group|gtsvector|handler|having|header|hold|hour|identity|if|ilike|immediate|immutable|implicit|in|including|increment|index|indexes|inet|inherit|inherits|initially|inline|inner|inout|input|insensitive|insert|instead|int|int2|int2vector|int4|int4range|int8|int8range|integer|internal|intersect|interval|into|invoker|is|isnull|isolation|join|json|key|label|language|language_handler|large|last|lateral|lc_collate|lc_ctype|leading|leakproof|least|left|level|like|limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|mapping|match|materialized|maxvalue|minute|minvalue|mode|money|month|move|name|names|national|natural|nchar|next|no|none|not|nothing|notify|notnull|nowait|null|nullif|nulls|numeric|numrange|object|of|off|offset|oid|oids|oidvector|on|only|opaque|operator|option|options|or|order|out|outer|over|overlaps|overlay|owned|owner|parser|partial|partition|passing|password|path|pg_attribute|pg_auth_members|pg_authid|pg_class|pg_database|pg_node_tree|pg_proc|pg_type|placing|plans|point|polygon|position|preceding|precision|prepare|prepared|preserve|primary|prior|privileges|procedural|procedure|program|quote|range|read|real|reassign|recheck|record|recursive|ref|refcursor|references|refresh|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|regtype|reindex|relative|release|reltime|rename|repeatable|replace|replica|reset|restart|restrict|returning|returns|revoke|right|role|rollback|row|rows|rule|savepoint|schema|scroll|search|second|security|select|sequence|sequences|serializable|server|session|session_user|set|setof|share|show|similar|simple|smallint|smgr|snapshot|some|stable|standalone|start|statement|statistics|stdin|stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|tablespace|temp|template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|tinterval|to|trailing|transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsrange|tstzrange|tsvector|txid_snapshot|type|types|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone",t="RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|acldefault|aclexplode|aclinsert|aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|anyarray_in|anyarray_out|anyarray_recv|anyarray_send|anyelement_in|anyelement_out|anyenum_in|anyenum_out|anynonarray_in|anynonarray_out|anyrange_in|anyrange_out|anytextcat|area|areajoinsel|areasel|array_agg|array_agg_finalfn|array_agg_transfn|array_append|array_cat|array_dims|array_eq|array_fill|array_ge|array_gt|array_in|array_larger|array_le|array_length|array_lower|array_lt|array_ndims|array_ne|array_out|array_prepend|array_recv|array_remove|array_replace|array_send|array_smaller|array_to_json|array_to_string|array_typanalyze|array_upper|arraycontained|arraycontains|arraycontjoinsel|arraycontsel|arrayoverlap|ascii|ascii_to_mic|ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|big5_to_utf8|bit_and|bit_in|bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|bitcmp|biteq|bitge|bitgt|bitle|bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|bittypmodin|bittypmodout|bitxor|bool|bool_and|bool_or|booland_statefunc|booleq|boolge|boolgt|boolin|boolle|boollt|boolne|boolor_statefunc|boolout|boolrecv|boolsend|box|box_above|box_above_eq|box_add|box_below|box_below_eq|box_center|box_contain|box_contain_pt|box_contained|box_distance|box_div|box_eq|box_ge|box_gt|box_in|box_intersect|box_le|box_left|box_lt|box_mul|box_out|box_overabove|box_overbelow|box_overlap|box_overleft|box_overright|box_recv|box_right|box_same|box_send|box_sub|bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|bpchar_pattern_le|bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|bpchargt|bpchariclike|bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|bpcharlike|bpcharlt|bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|bpcharregexne|bpcharsend|bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|btarraycmp|btbeginscan|btboolcmp|btbpchar_pattern_cmp|btbuild|btbuildempty|btbulkdelete|btcanreturn|btcharcmp|btcostestimate|btendscan|btfloat48cmp|btfloat4cmp|btfloat4sortsupport|btfloat84cmp|btfloat8cmp|btfloat8sortsupport|btgetbitmap|btgettuple|btinsert|btint24cmp|btint28cmp|btint2cmp|btint2sortsupport|btint42cmp|btint48cmp|btint4cmp|btint4sortsupport|btint82cmp|btint84cmp|btint8cmp|btint8sortsupport|btmarkpos|btnamecmp|btnamesortsupport|btoidcmp|btoidsortsupport|btoidvectorcmp|btoptions|btrecordcmp|btreltimecmp|btrescan|btrestrpos|btrim|bttext_pattern_cmp|bttextcmp|bttidcmp|bttintervalcmp|btvacuumcleanup|bytea_string_agg_finalfn|bytea_string_agg_transfn|byteacat|byteacmp|byteaeq|byteage|byteagt|byteain|byteale|bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|cash_cmp|cash_div_cash|cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|cash_ge|cash_gt|cash_in|cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|cash_mul_int2|cash_mul_int4|cash_ne|cash_out|cash_pl|cash_recv|cash_send|cash_words|cashlarger|cashsmaller|cbrt|ceil|ceiling|center|char|char_length|character_length|chareq|charge|chargt|charin|charle|charlt|charne|charout|charrecv|charsend|chr|cideq|cidin|cidout|cidr|cidr_in|cidr_out|cidr_recv|cidr_send|cidrecv|cidsend|circle|circle_above|circle_add_pt|circle_below|circle_center|circle_contain|circle_contain_pt|circle_contained|circle_distance|circle_div_pt|circle_eq|circle_ge|circle_gt|circle_in|circle_le|circle_left|circle_lt|circle_mul_pt|circle_ne|circle_out|circle_overabove|circle_overbelow|circle_overlap|circle_overleft|circle_overright|circle_recv|circle_right|circle_same|circle_send|circle_sub_pt|clock_timestamp|close_lb|close_ls|close_lseg|close_pb|close_pl|close_ps|close_sb|close_sl|col_description|concat|concat_ws|contjoinsel|contsel|convert|convert_from|convert_to|corr|cos|cot|count|covar_pop|covar_samp|cstring_in|cstring_out|cstring_recv|cstring_send|cume_dist|current_database|current_query|current_schema|current_schemas|current_setting|current_user|currtid|currtid2|currval|cursor_to_xml|cursor_to_xmlschema|database_to_xml|database_to_xml_and_xmlschema|database_to_xmlschema|date|date_cmp|date_cmp_timestamp|date_cmp_timestamptz|date_eq|date_eq_timestamp|date_eq_timestamptz|date_ge|date_ge_timestamp|date_ge_timestamptz|date_gt|date_gt_timestamp|date_gt_timestamptz|date_in|date_larger|date_le|date_le_timestamp|date_le_timestamptz|date_lt|date_lt_timestamp|date_lt_timestamptz|date_mi|date_mi_interval|date_mii|date_ne|date_ne_timestamp|date_ne_timestamptz|date_out|date_part|date_pl_interval|date_pli|date_recv|date_send|date_smaller|date_sortsupport|date_trunc|daterange|daterange_canonical|daterange_subdiff|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|dense_rank|dexp|diagonal|diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|dist_pc|dist_pl|dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|dpow|dround|dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|dsynonym_init|dsynonym_lexize|dtrunc|elem_contained_by_range|encode|enum_cmp|enum_eq|enum_first|enum_ge|enum_gt|enum_in|enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|enum_range|enum_recv|enum_send|enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|euc_cn_to_utf8|euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|euc_jp_to_sjis|euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|euc_tw_to_mic|euc_tw_to_utf8|event_trigger_in|event_trigger_out|every|exp|factorial|family|fdw_handler_in|fdw_handler_out|first_value|float4|float48div|float48eq|float48ge|float48gt|float48le|float48lt|float48mi|float48mul|float48ne|float48pl|float4_accum|float4abs|float4div|float4eq|float4ge|float4gt|float4in|float4larger|float4le|float4lt|float4mi|float4mul|float4ne|float4out|float4pl|float4recv|float4send|float4smaller|float4um|float4up|float8|float84div|float84eq|float84ge|float84gt|float84le|float84lt|float84mi|float84mul|float84ne|float84pl|float8_accum|float8_avg|float8_corr|float8_covar_pop|float8_covar_samp|float8_regr_accum|float8_regr_avgx|float8_regr_avgy|float8_regr_intercept|float8_regr_r2|float8_regr_slope|float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|float8_stddev_samp|float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|float8ge|float8gt|float8in|float8larger|float8le|float8lt|float8mi|float8mul|float8ne|float8out|float8pl|float8recv|float8send|float8smaller|float8um|float8up|floor|flt4_mul_cash|flt8_mul_cash|fmgr_c_validator|fmgr_internal_validator|fmgr_sql_validator|format|format_type|gb18030_to_utf8|gbk_to_utf8|generate_series|generate_subscripts|get_bit|get_byte|get_current_ts_config|getdatabaseencoding|getpgusername|gin_cmp_prefix|gin_cmp_tslexeme|gin_extract_tsquery|gin_extract_tsvector|gin_tsquery_consistent|ginarrayconsistent|ginarrayextract|ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|gincostestimate|ginendscan|gingetbitmap|gininsert|ginmarkpos|ginoptions|ginqueryarrayextract|ginrescan|ginrestrpos|ginvacuumcleanup|gist_box_compress|gist_box_consistent|gist_box_decompress|gist_box_penalty|gist_box_picksplit|gist_box_same|gist_box_union|gist_circle_compress|gist_circle_consistent|gist_point_compress|gist_point_consistent|gist_point_distance|gist_poly_compress|gist_poly_consistent|gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|gistcostestimate|gistendscan|gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|gistoptions|gistrescan|gistrestrpos|gistvacuumcleanup|gtsquery_compress|gtsquery_consistent|gtsquery_decompress|gtsquery_penalty|gtsquery_picksplit|gtsquery_same|gtsquery_union|gtsvector_compress|gtsvector_consistent|gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|gtsvector_same|gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|has_function_privilege|has_language_privilege|has_schema_privilege|has_sequence_privilege|has_server_privilege|has_table_privilege|has_tablespace_privilege|has_type_privilege|hash_aclitem|hash_array|hash_numeric|hash_range|hashbeginscan|hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|hashcostestimate|hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|hashinet|hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|hashname|hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|hashvacuumcleanup|hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|icnlikejoinsel|icnlikesel|icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|inet_client_addr|inet_client_port|inet_in|inet_out|inet_recv|inet_send|inet_server_addr|inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|initcap|int2|int24div|int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|int24pl|int28div|int28eq|int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|int2_accum|int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|int2gt|int2in|int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|int2pl|int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|int2vectorin|int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|int42ge|int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|int48gt|int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|int4_mul_cash|int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|int4larger|int4le|int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|int4range|int4range_canonical|int4range_subdiff|int4recv|int4send|int4shl|int4shr|int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|int82le|int82lt|int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|int84lt|int84mi|int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|int8abs|int8and|int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|int8inc_float8_float8|int8larger|int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|int8or|int8out|int8pl|int8pl_inet|int8range|int8range_canonical|int8range_subdiff|int8recv|int8send|int8shl|int8shr|int8smaller|int8um|int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|internal_out|interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|interval_ge|interval_gt|interval_hash|interval_in|interval_larger|interval_le|interval_lt|interval_mi|interval_mul|interval_ne|interval_out|interval_pl|interval_pl_date|interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|interval_pl_timetz|interval_recv|interval_send|interval_smaller|interval_transform|interval_um|intervaltypmodin|intervaltypmodout|intinterval|isclosed|isempty|isfinite|ishorizontal|iso8859_1_to_utf8|iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|iso_to_win866|isopen|isparallel|isperp|isvertical|johab_to_utf8|json_agg|json_agg_finalfn|json_agg_transfn|json_array_element|json_array_element_text|json_array_elements|json_array_length|json_each|json_each_text|json_extract_path|json_extract_path_op|json_extract_path_text|json_extract_path_text_op|json_in|json_object_field|json_object_field_text|json_object_keys|json_out|json_populate_record|json_populate_recordset|json_recv|json_send|justify_days|justify_hours|justify_interval|koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|koi8r_to_win1251|koi8r_to_win866|koi8u_to_utf8|lag|language_handler_in|language_handler_out|last_value|lastval|latin1_to_mic|latin2_to_mic|latin2_to_win1250|latin3_to_mic|latin4_to_mic|lead|left|length|like|like_escape|likejoinsel|likesel|line|line_distance|line_eq|line_horizontal|line_in|line_interpt|line_intersect|line_out|line_parallel|line_perp|line_recv|line_send|line_vertical|ln|lo_close|lo_creat|lo_create|lo_export|lo_import|lo_lseek|lo_lseek64|lo_open|lo_tell|lo_tell64|lo_truncate|lo_truncate64|lo_unlink|log|loread|lower|lower_inc|lower_inf|lowrite|lpad|lseg|lseg_center|lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_and|macaddr_cmp|macaddr_eq|macaddr_ge|macaddr_gt|macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_not|macaddr_or|macaddr_out|macaddr_recv|macaddr_send|makeaclitem|masklen|max|md5|mic_to_ascii|mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|mic_to_koi8r|mic_to_latin1|mic_to_latin2|mic_to_latin3|mic_to_latin4|mic_to_sjis|mic_to_win1250|mic_to_win1251|mic_to_win866|min|mktinterval|mod|money|mul_d_interval|name|nameeq|namege|namegt|nameiclike|nameicnlike|nameicregexeq|nameicregexne|namein|namele|namelike|namelt|namene|namenlike|nameout|namerecv|nameregexeq|nameregexne|namesend|neqjoinsel|neqsel|netmask|network|network_cmp|network_eq|network_ge|network_gt|network_le|network_lt|network_ne|network_sub|network_subeq|network_sup|network_supeq|nextval|nlikejoinsel|nlikesel|notlike|now|npoints|nth_value|ntile|numeric_abs|numeric_accum|numeric_add|numeric_avg|numeric_avg_accum|numeric_cmp|numeric_div|numeric_div_trunc|numeric_eq|numeric_exp|numeric_fac|numeric_ge|numeric_gt|numeric_in|numeric_inc|numeric_larger|numeric_le|numeric_ln|numeric_log|numeric_lt|numeric_mod|numeric_mul|numeric_ne|numeric_out|numeric_power|numeric_recv|numeric_send|numeric_smaller|numeric_sqrt|numeric_stddev_pop|numeric_stddev_samp|numeric_sub|numeric_transform|numeric_uminus|numeric_uplus|numeric_var_pop|numeric_var_samp|numerictypmodin|numerictypmodout|numnode|numrange|numrange_subdiff|obj_description|octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|oidrecv|oidsend|oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|oidvectorlt|oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|on_pl|on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|path_add_pt|path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|path_length|path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|path_out|path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|pg_available_extension_versions|pg_available_extensions|pg_backend_pid|pg_backup_start_time|pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|pg_collation_for|pg_collation_is_visible|pg_column_is_updatable|pg_column_size|pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|pg_event_trigger_dropped_objects|pg_export_snapshot|pg_extension_config_dump|pg_extension_update_paths|pg_function_is_visible|pg_get_constraintdef|pg_get_expr|pg_get_function_arguments|pg_get_function_identity_arguments|pg_get_function_result|pg_get_functiondef|pg_get_indexdef|pg_get_keywords|pg_get_multixact_members|pg_get_ruledef|pg_get_serial_sequence|pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_identify_object|pg_indexes_size|pg_is_in_backup|pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|pg_opfamily_is_visible|pg_options_to_table|pg_postmaster_start_time|pg_prepared_statement|pg_prepared_xact|pg_read_binary_file|pg_read_file|pg_relation_filenode|pg_relation_filepath|pg_relation_is_updatable|pg_relation_size|pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|pg_show_all_settings|pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|pg_stat_file|pg_stat_get_activity|pg_stat_get_analyze_count|pg_stat_get_autoanalyze_count|pg_stat_get_autovacuum_count|pg_stat_get_backend_activity|pg_stat_get_backend_activity_start|pg_stat_get_backend_client_addr|pg_stat_get_backend_client_port|pg_stat_get_backend_dbid|pg_stat_get_backend_idset|pg_stat_get_backend_pid|pg_stat_get_backend_start|pg_stat_get_backend_userid|pg_stat_get_backend_waiting|pg_stat_get_backend_xact_start|pg_stat_get_bgwriter_buf_written_checkpoints|pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|pg_stat_get_buf_written_backend|pg_stat_get_checkpoint_sync_time|pg_stat_get_checkpoint_write_time|pg_stat_get_db_blk_read_time|pg_stat_get_db_blk_write_time|pg_stat_get_db_blocks_fetched|pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|pg_stat_get_db_conflict_tablespace|pg_stat_get_db_deadlocks|pg_stat_get_db_numbackends|pg_stat_get_db_stat_reset_time|pg_stat_get_db_temp_bytes|pg_stat_get_db_temp_files|pg_stat_get_db_tuples_deleted|pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|pg_stat_get_function_calls|pg_stat_get_function_self_time|pg_stat_get_function_total_time|pg_stat_get_last_analyze_time|pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_total_time|pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|pg_tablespace_databases|pg_tablespace_location|pg_tablespace_size|pg_terminate_backend|pg_timezone_abbrevs|pg_timezone_names|pg_total_relation_size|pg_trigger_depth|pg_try_advisory_lock|pg_try_advisory_lock_shared|pg_try_advisory_xact_lock|pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|pg_ts_dict_is_visible|pg_ts_parser_is_visible|pg_ts_template_is_visible|pg_type_is_visible|pg_typeof|pg_xlog_location_diff|pg_xlog_replay_pause|pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|pi|plainto_tsquery|plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|point|point_above|point_add|point_below|point_distance|point_div|point_eq|point_horiz|point_in|point_left|point_mul|point_ne|point_out|point_recv|point_right|point_send|point_sub|point_vert|poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|poly_contained|poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|poly_overbelow|poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|poly_same|poly_send|polygon|popen|position|positionjoinsel|positionsel|postgresql_fdw_validator|pow|power|prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|prsd_start|pt_contained_circle|pt_contained_poly|query_to_xml|query_to_xml_and_xmlschema|query_to_xmlschema|querytree|quote_ident|quote_literal|quote_nullable|radians|radius|random|range_adjacent|range_after|range_before|range_cmp|range_contained_by|range_contains|range_contains_elem|range_eq|range_ge|range_gist_compress|range_gist_consistent|range_gist_decompress|range_gist_penalty|range_gist_picksplit|range_gist_same|range_gist_union|range_gt|range_in|range_intersect|range_le|range_lt|range_minus|range_ne|range_out|range_overlaps|range_overleft|range_overright|range_recv|range_send|range_typanalyze|range_union|rangesel|rank|record_eq|record_ge|record_gt|record_in|record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|row_to_json|rpad|rtrim|scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|smgrout|spg_kd_choose|spg_kd_config|spg_kd_inner_consistent|spg_kd_picksplit|spg_quad_choose|spg_quad_config|spg_quad_inner_consistent|spg_quad_leaf_consistent|spg_quad_picksplit|spg_range_quad_choose|spg_range_quad_config|spg_range_quad_inner_consistent|spg_range_quad_leaf_consistent|spg_range_quad_picksplit|spg_text_choose|spg_text_config|spg_text_inner_consistent|spg_text_leaf_consistent|spg_text_picksplit|spgbeginscan|spgbuild|spgbuildempty|spgbulkdelete|spgcanreturn|spgcostestimate|spgendscan|spggetbitmap|spggettuple|spginsert|spgmarkpos|spgoptions|spgrescan|spgrestrpos|spgvacuumcleanup|split_part|sqrt|statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|string_agg_finalfn|string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|time_smaller|time_transform|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|timestamp_sortsupport|timestamp_transform|timestamptypmodin|timestamptypmodout|timestamptz_cmp|timestamptz_cmp_date|timestamptz_cmp_timestamp|timestamptz_eq|timestamptz_eq_date|timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|to_json|to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsrange|tsrange_subdiff|tstzrange|tstzrange_subdiff|tsvector_cmp|tsvector_concat|tsvector_eq|tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|tsvector_ne|tsvector_update_trigger|tsvector_update_trigger_column|tsvectorin|tsvectorout|tsvectorrecv|tsvectorsend|txid_current|txid_current_snapshot|txid_snapshot_in|txid_snapshot_out|txid_snapshot_recv|txid_snapshot_send|txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|uhc_to_utf8|unique_key_recheck|unknownin|unknownout|unknownrecv|unknownsend|unnest|upper|upper_inc|upper_inf|utf8_to_ascii|utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|utf8_to_euc_kr|utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|utf8_to_iso8859_1|utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|utf8_to_sjis|utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|uuid_le|uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|varbit_out|varbit_recv|varbit_send|varbit_transform|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|varbitlt|varbitne|varbittypmodin|varbittypmodout|varchar_transform|varcharin|varcharout|varcharrecv|varcharsend|varchartypmodin|varchartypmodout|variance|version|void_in|void_out|void_recv|void_send|width|width_bucket|win1250_to_latin2|win1250_to_mic|win1251_to_iso|win1251_to_koi8r|win1251_to_mic|win1251_to_win866|win866_to_iso|win866_to_koi8r|win866_to_mic|win866_to_win1251|win_to_utf8|xideq|xideqint4|xidin|xidout|xidrecv|xidsend|xml|xml_in|xml_is_well_formed|xml_is_well_formed_content|xml_is_well_formed_document|xml_out|xml_recv|xml_send|xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|xpath_exists",n=this.createKeywordMapper({
|
84
|
+
"support.function":t,keyword:e},"identifier",!0),i=[{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"variable.language",regex:'".*?"'},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:n,regex:"[a-zA-Z_][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|~=|~>=~|~>~|~~|~~\\*"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}];this.$rules={start:[{token:"comment",regex:"--.*$"},r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"keyword.statementBegin",regex:"^[a-zA-Z]+",next:"statement"},{token:"support.buildin",regex:"^\\\\[\\S]+.*$"}],statement:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\/\\*",next:"commentStatement"},{token:"statementEnd",regex:";",next:"start"},{token:"string",regex:"\\$perl\\$",next:"perl-start"},{token:"string",regex:"\\$python\\$",next:"python-start"},{token:"string",regex:"\\$json\\$",next:"json-start"},{token:"string",regex:"\\$(js|javascript)\\$",next:"javascript-start"},{token:"string",regex:"\\$[\\w_0-9]*\\$$",next:"dollarSql"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarStatementString"}].concat(i),dollarSql:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\/\\*",next:"commentDollarSql"},{token:"string",regex:"^\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarSqlString"}].concat(i),comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],commentStatement:[{token:"comment",regex:".*?\\*\\/",next:"statement"},{token:"comment",regex:".+"}],commentDollarSql:[{token:"comment",regex:".*?\\*\\/",next:"dollarSql"},{token:"comment",regex:".+"}],dollarStatementString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",regex:".+"}],dollarSqlString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"dollarSql"},{token:"string",regex:".+"}]},this.embedRules(r,"doc-",[r.getEndRule("start")]),this.embedRules(a,"perl-",[{token:"string",regex:"\\$perl\\$",next:"statement"}]),this.embedRules(s,"python-",[{token:"string",regex:"\\$python\\$",next:"statement"}]),this.embedRules(l,"json-",[{token:"string",regex:"\\$json\\$",next:"statement"}]),this.embedRules(u,"javascript-",[{token:"string",regex:"\\$(js|javascript)\\$",next:"statement"}])};i.inherits(c,o),t.PgsqlHighlightRules=c}),define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pgsql_highlight_rules","ace/range"],function(e,t,n){var i=e("../lib/oop"),r=e("../mode/text").Mode,o=e("./pgsql_highlight_rules").PgsqlHighlightRules,a=(e("../range").Range,function(){this.HighlightRules=o});i.inherits(a,r),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){return"start"==e||"keyword.statementEnd"==e?"":this.$getIndent(t)},this.$id="ace/mode/pgsql"}.call(a.prototype),t.Mode=a}),define("ace/snippets/coffee",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# Closure loop\nsnippet forindo\n for ${1:name} in ${2:array}\n do ($1) ->\n ${3:// body}\n# Array comprehension\nsnippet fora\n for ${1:name} in ${2:array}\n ${3:// body...}\n# Object comprehension\nsnippet foro\n for ${1:key}, ${2:value} of ${3:object}\n ${4:// body...}\n# Range comprehension (inclusive)\nsnippet forr\n for ${1:name} in [${2:start}..${3:finish}]\n ${4:// body...}\nsnippet forrb\n for ${1:name} in [${2:start}..${3:finish}] by ${4:step}\n ${5:// body...}\n# Range comprehension (exclusive)\nsnippet forrex\n for ${1:name} in [${2:start}...${3:finish}]\n ${4:// body...}\nsnippet forrexb\n for ${1:name} in [${2:start}...${3:finish}] by ${4:step}\n ${5:// body...}\n# Function\nsnippet fun\n (${1:args}) ->\n ${2:// body...}\n# Function (bound)\nsnippet bfun\n (${1:args}) =>\n ${2:// body...}\n# Class\nsnippet cla class ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n ${2}\nsnippet cla class .. constructor: ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n constructor: (${2:args}) ->\n ${3}\n\n ${4}\nsnippet cla class .. extends ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n ${3}\nsnippet cla class .. extends .. constructor: ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n constructor: (${3:args}) ->\n ${4}\n\n ${5}\n# If\nsnippet if\n if ${1:condition}\n ${2:// body...}\n# If __ Else\nsnippet ife\n if ${1:condition}\n ${2:// body...}\n else\n ${3:// body...}\n# Else if\nsnippet elif\n else if ${1:condition}\n ${2:// body...}\n# Ternary If\nsnippet ifte\n if ${1:condition} then ${2:value} else ${3:other}\n# Unless\nsnippet unl\n ${1:action} unless ${2:condition}\n# Switch\nsnippet swi\n switch ${1:object}\n when ${2:value}\n ${3:// body...}\n\n# Log\nsnippet log\n console.log ${1}\n# Try __ Catch\nsnippet try\n try\n ${1}\n catch ${2:error}\n ${3}\n# Require\nsnippet req\n ${2:$1} = require '${1:sys}'${3}\n# Export\nsnippet exp\n ${1:root} = exports ? this\n",t.scope="coffee"}),define("ace/snippets/css",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet .\n ${1} {\n ${2}\n }\nsnippet !\n !important\nsnippet bdi:m+\n -moz-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:m\n -moz-border-image: ${1};\nsnippet bdrz:m\n -moz-border-radius: ${1};\nsnippet bxsh:m+\n -moz-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh:m\n -moz-box-shadow: ${1};\nsnippet bdi:w+\n -webkit-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:w\n -webkit-border-image: ${1};\nsnippet bdrz:w\n -webkit-border-radius: ${1};\nsnippet bxsh:w+\n -webkit-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh:w\n -webkit-box-shadow: ${1};\nsnippet @f\n @font-face {\n font-family: ${1};\n src: url(${2});\n }\nsnippet @i\n @import url(${1});\nsnippet @m\n @media ${1:print} {\n ${2}\n }\nsnippet bg+\n background: #${1:FFF} url(${2}) ${3:0} ${4:0} ${5:no-repeat};\nsnippet bga\n background-attachment: ${1};\nsnippet bga:f\n background-attachment: fixed;\nsnippet bga:s\n background-attachment: scroll;\nsnippet bgbk\n background-break: ${1};\nsnippet bgbk:bb\n background-break: bounding-box;\nsnippet bgbk:c\n background-break: continuous;\nsnippet bgbk:eb\n background-break: each-box;\nsnippet bgcp\n background-clip: ${1};\nsnippet bgcp:bb\n background-clip: border-box;\nsnippet bgcp:cb\n background-clip: content-box;\nsnippet bgcp:nc\n background-clip: no-clip;\nsnippet bgcp:pb\n background-clip: padding-box;\nsnippet bgc\n background-color: #${1:FFF};\nsnippet bgc:t\n background-color: transparent;\nsnippet bgi\n background-image: url(${1});\nsnippet bgi:n\n background-image: none;\nsnippet bgo\n background-origin: ${1};\nsnippet bgo:bb\n background-origin: border-box;\nsnippet bgo:cb\n background-origin: content-box;\nsnippet bgo:pb\n background-origin: padding-box;\nsnippet bgpx\n background-position-x: ${1};\nsnippet bgpy\n background-position-y: ${1};\nsnippet bgp\n background-position: ${1:0} ${2:0};\nsnippet bgr\n background-repeat: ${1};\nsnippet bgr:n\n background-repeat: no-repeat;\nsnippet bgr:x\n background-repeat: repeat-x;\nsnippet bgr:y\n background-repeat: repeat-y;\nsnippet bgr:r\n background-repeat: repeat;\nsnippet bgz\n background-size: ${1};\nsnippet bgz:a\n background-size: auto;\nsnippet bgz:ct\n background-size: contain;\nsnippet bgz:cv\n background-size: cover;\nsnippet bg\n background: ${1};\nsnippet bg:ie\n filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1}',sizingMethod='${2:crop}');\nsnippet bg:n\n background: none;\nsnippet bd+\n border: ${1:1px} ${2:solid} #${3:000};\nsnippet bdb+\n border-bottom: ${1:1px} ${2:solid} #${3:000};\nsnippet bdbc\n border-bottom-color: #${1:000};\nsnippet bdbi\n border-bottom-image: url(${1});\nsnippet bdbi:n\n border-bottom-image: none;\nsnippet bdbli\n border-bottom-left-image: url(${1});\nsnippet bdbli:c\n border-bottom-left-image: continue;\nsnippet bdbli:n\n border-bottom-left-image: none;\nsnippet bdblrz\n border-bottom-left-radius: ${1};\nsnippet bdbri\n border-bottom-right-image: url(${1});\nsnippet bdbri:c\n border-bottom-right-image: continue;\nsnippet bdbri:n\n border-bottom-right-image: none;\nsnippet bdbrrz\n border-bottom-right-radius: ${1};\nsnippet bdbs\n border-bottom-style: ${1};\nsnippet bdbs:n\n border-bottom-style: none;\nsnippet bdbw\n border-bottom-width: ${1};\nsnippet bdb\n border-bottom: ${1};\nsnippet bdb:n\n border-bottom: none;\nsnippet bdbk\n border-break: ${1};\nsnippet bdbk:c\n border-break: close;\nsnippet bdcl\n border-collapse: ${1};\nsnippet bdcl:c\n border-collapse: collapse;\nsnippet bdcl:s\n border-collapse: separate;\nsnippet bdc\n border-color: #${1:000};\nsnippet bdci\n border-corner-image: url(${1});\nsnippet bdci:c\n border-corner-image: continue;\nsnippet bdci:n\n border-corner-image: none;\nsnippet bdf\n border-fit: ${1};\nsnippet bdf:c\n border-fit: clip;\nsnippet bdf:of\n border-fit: overwrite;\nsnippet bdf:ow\n border-fit: overwrite;\nsnippet bdf:r\n border-fit: repeat;\nsnippet bdf:sc\n border-fit: scale;\nsnippet bdf:sp\n border-fit: space;\nsnippet bdf:st\n border-fit: stretch;\nsnippet bdi\n border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:n\n border-image: none;\nsnippet bdl+\n border-left: ${1:1px} ${2:solid} #${3:000};\nsnippet bdlc\n border-left-color: #${1:000};\nsnippet bdli\n border-left-image: url(${1});\nsnippet bdli:n\n border-left-image: none;\nsnippet bdls\n border-left-style: ${1};\nsnippet bdls:n\n border-left-style: none;\nsnippet bdlw\n border-left-width: ${1};\nsnippet bdl\n border-left: ${1};\nsnippet bdl:n\n border-left: none;\nsnippet bdlt\n border-length: ${1};\nsnippet bdlt:a\n border-length: auto;\nsnippet bdrz\n border-radius: ${1};\nsnippet bdr+\n border-right: ${1:1px} ${2:solid} #${3:000};\nsnippet bdrc\n border-right-color: #${1:000};\nsnippet bdri\n border-right-image: url(${1});\nsnippet bdri:n\n border-right-image: none;\nsnippet bdrs\n border-right-style: ${1};\nsnippet bdrs:n\n border-right-style: none;\nsnippet bdrw\n border-right-width: ${1};\nsnippet bdr\n border-right: ${1};\nsnippet bdr:n\n border-right: none;\nsnippet bdsp\n border-spacing: ${1};\nsnippet bds\n border-style: ${1};\nsnippet bds:ds\n border-style: dashed;\nsnippet bds:dtds\n border-style: dot-dash;\nsnippet bds:dtdtds\n border-style: dot-dot-dash;\nsnippet bds:dt\n border-style: dotted;\nsnippet bds:db\n border-style: double;\nsnippet bds:g\n border-style: groove;\nsnippet bds:h\n border-style: hidden;\nsnippet bds:i\n border-style: inset;\nsnippet bds:n\n border-style: none;\nsnippet bds:o\n border-style: outset;\nsnippet bds:r\n border-style: ridge;\nsnippet bds:s\n border-style: solid;\nsnippet bds:w\n border-style: wave;\nsnippet bdt+\n border-top: ${1:1px} ${2:solid} #${3:000};\nsnippet bdtc\n border-top-color: #${1:000};\nsnippet bdti\n border-top-image: url(${1});\nsnippet bdti:n\n border-top-image: none;\nsnippet bdtli\n border-top-left-image: url(${1});\nsnippet bdtli:c\n border-corner-image: continue;\nsnippet bdtli:n\n border-corner-image: none;\nsnippet bdtlrz\n border-top-left-radius: ${1};\nsnippet bdtri\n border-top-right-image: url(${1});\nsnippet bdtri:c\n border-top-right-image: continue;\nsnippet bdtri:n\n border-top-right-image: none;\nsnippet bdtrrz\n border-top-right-radius: ${1};\nsnippet bdts\n border-top-style: ${1};\nsnippet bdts:n\n border-top-style: none;\nsnippet bdtw\n border-top-width: ${1};\nsnippet bdt\n border-top: ${1};\nsnippet bdt:n\n border-top: none;\nsnippet bdw\n border-width: ${1};\nsnippet bd\n border: ${1};\nsnippet bd:n\n border: none;\nsnippet b\n bottom: ${1};\nsnippet b:a\n bottom: auto;\nsnippet bxsh+\n box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh\n box-shadow: ${1};\nsnippet bxsh:n\n box-shadow: none;\nsnippet bxz\n box-sizing: ${1};\nsnippet bxz:bb\n box-sizing: border-box;\nsnippet bxz:cb\n box-sizing: content-box;\nsnippet cps\n caption-side: ${1};\nsnippet cps:b\n caption-side: bottom;\nsnippet cps:t\n caption-side: top;\nsnippet cl\n clear: ${1};\nsnippet cl:b\n clear: both;\nsnippet cl:l\n clear: left;\nsnippet cl:n\n clear: none;\nsnippet cl:r\n clear: right;\nsnippet cp\n clip: ${1};\nsnippet cp:a\n clip: auto;\nsnippet cp:r\n clip: rect(${1:0} ${2:0} ${3:0} ${4:0});\nsnippet c\n color: #${1:000};\nsnippet ct\n content: ${1};\nsnippet ct:a\n content: attr(${1});\nsnippet ct:cq\n content: close-quote;\nsnippet ct:c\n content: counter(${1});\nsnippet ct:cs\n content: counters(${1});\nsnippet ct:ncq\n content: no-close-quote;\nsnippet ct:noq\n content: no-open-quote;\nsnippet ct:n\n content: normal;\nsnippet ct:oq\n content: open-quote;\nsnippet coi\n counter-increment: ${1};\nsnippet cor\n counter-reset: ${1};\nsnippet cur\n cursor: ${1};\nsnippet cur:a\n cursor: auto;\nsnippet cur:c\n cursor: crosshair;\nsnippet cur:d\n cursor: default;\nsnippet cur:ha\n cursor: hand;\nsnippet cur:he\n cursor: help;\nsnippet cur:m\n cursor: move;\nsnippet cur:p\n cursor: pointer;\nsnippet cur:t\n cursor: text;\nsnippet d\n display: ${1};\nsnippet d:mib\n display: -moz-inline-box;\nsnippet d:mis\n display: -moz-inline-stack;\nsnippet d:b\n display: block;\nsnippet d:cp\n display: compact;\nsnippet d:ib\n display: inline-block;\nsnippet d:itb\n display: inline-table;\nsnippet d:i\n display: inline;\nsnippet d:li\n display: list-item;\nsnippet d:n\n display: none;\nsnippet d:ri\n display: run-in;\nsnippet d:tbcp\n display: table-caption;\nsnippet d:tbc\n display: table-cell;\nsnippet d:tbclg\n display: table-column-group;\nsnippet d:tbcl\n display: table-column;\nsnippet d:tbfg\n display: table-footer-group;\nsnippet d:tbhg\n display: table-header-group;\nsnippet d:tbrg\n display: table-row-group;\nsnippet d:tbr\n display: table-row;\nsnippet d:tb\n display: table;\nsnippet ec\n empty-cells: ${1};\nsnippet ec:h\n empty-cells: hide;\nsnippet ec:s\n empty-cells: show;\nsnippet exp\n expression()\nsnippet fl\n float: ${1};\nsnippet fl:l\n float: left;\nsnippet fl:n\n float: none;\nsnippet fl:r\n float: right;\nsnippet f+\n font: ${1:1em} ${2:Arial},${3:sans-serif};\nsnippet fef\n font-effect: ${1};\nsnippet fef:eb\n font-effect: emboss;\nsnippet fef:eg\n font-effect: engrave;\nsnippet fef:n\n font-effect: none;\nsnippet fef:o\n font-effect: outline;\nsnippet femp\n font-emphasize-position: ${1};\nsnippet femp:a\n font-emphasize-position: after;\nsnippet femp:b\n font-emphasize-position: before;\nsnippet fems\n font-emphasize-style: ${1};\nsnippet fems:ac\n font-emphasize-style: accent;\nsnippet fems:c\n font-emphasize-style: circle;\nsnippet fems:ds\n font-emphasize-style: disc;\nsnippet fems:dt\n font-emphasize-style: dot;\nsnippet fems:n\n font-emphasize-style: none;\nsnippet fem\n font-emphasize: ${1};\nsnippet ff\n font-family: ${1};\nsnippet ff:c\n font-family: ${1:'Monotype Corsiva','Comic Sans MS'},cursive;\nsnippet ff:f\n font-family: ${1:Capitals,Impact},fantasy;\nsnippet ff:m\n font-family: ${1:Monaco,'Courier New'},monospace;\nsnippet ff:ss\n font-family: ${1:Helvetica,Arial},sans-serif;\nsnippet ff:s\n font-family: ${1:Georgia,'Times New Roman'},serif;\nsnippet fza\n font-size-adjust: ${1};\nsnippet fza:n\n font-size-adjust: none;\nsnippet fz\n font-size: ${1};\nsnippet fsm\n font-smooth: ${1};\nsnippet fsm:aw\n font-smooth: always;\nsnippet fsm:a\n font-smooth: auto;\nsnippet fsm:n\n font-smooth: never;\nsnippet fst\n font-stretch: ${1};\nsnippet fst:c\n font-stretch: condensed;\nsnippet fst:e\n font-stretch: expanded;\nsnippet fst:ec\n font-stretch: extra-condensed;\nsnippet fst:ee\n font-stretch: extra-expanded;\nsnippet fst:n\n font-stretch: normal;\nsnippet fst:sc\n font-stretch: semi-condensed;\nsnippet fst:se\n font-stretch: semi-expanded;\nsnippet fst:uc\n font-stretch: ultra-condensed;\nsnippet fst:ue\n font-stretch: ultra-expanded;\nsnippet fs\n font-style: ${1};\nsnippet fs:i\n font-style: italic;\nsnippet fs:n\n font-style: normal;\nsnippet fs:o\n font-style: oblique;\nsnippet fv\n font-variant: ${1};\nsnippet fv:n\n font-variant: normal;\nsnippet fv:sc\n font-variant: small-caps;\nsnippet fw\n font-weight: ${1};\nsnippet fw:b\n font-weight: bold;\nsnippet fw:br\n font-weight: bolder;\nsnippet fw:lr\n font-weight: lighter;\nsnippet fw:n\n font-weight: normal;\nsnippet f\n font: ${1};\nsnippet h\n height: ${1};\nsnippet h:a\n height: auto;\nsnippet l\n left: ${1};\nsnippet l:a\n left: auto;\nsnippet lts\n letter-spacing: ${1};\nsnippet lh\n line-height: ${1};\nsnippet lisi\n list-style-image: url(${1});\nsnippet lisi:n\n list-style-image: none;\nsnippet lisp\n list-style-position: ${1};\nsnippet lisp:i\n list-style-position: inside;\nsnippet lisp:o\n list-style-position: outside;\nsnippet list\n list-style-type: ${1};\nsnippet list:c\n list-style-type: circle;\nsnippet list:dclz\n list-style-type: decimal-leading-zero;\nsnippet list:dc\n list-style-type: decimal;\nsnippet list:d\n list-style-type: disc;\nsnippet list:lr\n list-style-type: lower-roman;\nsnippet list:n\n list-style-type: none;\nsnippet list:s\n list-style-type: square;\nsnippet list:ur\n list-style-type: upper-roman;\nsnippet lis\n list-style: ${1};\nsnippet lis:n\n list-style: none;\nsnippet mb\n margin-bottom: ${1};\nsnippet mb:a\n margin-bottom: auto;\nsnippet ml\n margin-left: ${1};\nsnippet ml:a\n margin-left: auto;\nsnippet mr\n margin-right: ${1};\nsnippet mr:a\n margin-right: auto;\nsnippet mt\n margin-top: ${1};\nsnippet mt:a\n margin-top: auto;\nsnippet m\n margin: ${1};\nsnippet m:4\n margin: ${1:0} ${2:0} ${3:0} ${4:0};\nsnippet m:3\n margin: ${1:0} ${2:0} ${3:0};\nsnippet m:2\n margin: ${1:0} ${2:0};\nsnippet m:0\n margin: 0;\nsnippet m:a\n margin: auto;\nsnippet mah\n max-height: ${1};\nsnippet mah:n\n max-height: none;\nsnippet maw\n max-width: ${1};\nsnippet maw:n\n max-width: none;\nsnippet mih\n min-height: ${1};\nsnippet miw\n min-width: ${1};\nsnippet op\n opacity: ${1};\nsnippet op:ie\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100});\nsnippet op:ms\n -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100})';\nsnippet orp\n orphans: ${1};\nsnippet o+\n outline: ${1:1px} ${2:solid} #${3:000};\nsnippet oc\n outline-color: ${1:#000};\nsnippet oc:i\n outline-color: invert;\nsnippet oo\n outline-offset: ${1};\nsnippet os\n outline-style: ${1};\nsnippet ow\n outline-width: ${1};\nsnippet o\n outline: ${1};\nsnippet o:n\n outline: none;\nsnippet ovs\n overflow-style: ${1};\nsnippet ovs:a\n overflow-style: auto;\nsnippet ovs:mq\n overflow-style: marquee;\nsnippet ovs:mv\n overflow-style: move;\nsnippet ovs:p\n overflow-style: panner;\nsnippet ovs:s\n overflow-style: scrollbar;\nsnippet ovx\n overflow-x: ${1};\nsnippet ovx:a\n overflow-x: auto;\nsnippet ovx:h\n overflow-x: hidden;\nsnippet ovx:s\n overflow-x: scroll;\nsnippet ovx:v\n overflow-x: visible;\nsnippet ovy\n overflow-y: ${1};\nsnippet ovy:a\n overflow-y: auto;\nsnippet ovy:h\n overflow-y: hidden;\nsnippet ovy:s\n overflow-y: scroll;\nsnippet ovy:v\n overflow-y: visible;\nsnippet ov\n overflow: ${1};\nsnippet ov:a\n overflow: auto;\nsnippet ov:h\n overflow: hidden;\nsnippet ov:s\n overflow: scroll;\nsnippet ov:v\n overflow: visible;\nsnippet pb\n padding-bottom: ${1};\nsnippet pl\n padding-left: ${1};\nsnippet pr\n padding-right: ${1};\nsnippet pt\n padding-top: ${1};\nsnippet p\n padding: ${1};\nsnippet p:4\n padding: ${1:0} ${2:0} ${3:0} ${4:0};\nsnippet p:3\n padding: ${1:0} ${2:0} ${3:0};\nsnippet p:2\n padding: ${1:0} ${2:0};\nsnippet p:0\n padding: 0;\nsnippet pgba\n page-break-after: ${1};\nsnippet pgba:aw\n page-break-after: always;\nsnippet pgba:a\n page-break-after: auto;\nsnippet pgba:l\n page-break-after: left;\nsnippet pgba:r\n page-break-after: right;\nsnippet pgbb\n page-break-before: ${1};\nsnippet pgbb:aw\n page-break-before: always;\nsnippet pgbb:a\n page-break-before: auto;\nsnippet pgbb:l\n page-break-before: left;\nsnippet pgbb:r\n page-break-before: right;\nsnippet pgbi\n page-break-inside: ${1};\nsnippet pgbi:a\n page-break-inside: auto;\nsnippet pgbi:av\n page-break-inside: avoid;\nsnippet pos\n position: ${1};\nsnippet pos:a\n position: absolute;\nsnippet pos:f\n position: fixed;\nsnippet pos:r\n position: relative;\nsnippet pos:s\n position: static;\nsnippet q\n quotes: ${1};\nsnippet q:en\n quotes: '\\201C' '\\201D' '\\2018' '\\2019';\nsnippet q:n\n quotes: none;\nsnippet q:ru\n quotes: '\\00AB' '\\00BB' '\\201E' '\\201C';\nsnippet rz\n resize: ${1};\nsnippet rz:b\n resize: both;\nsnippet rz:h\n resize: horizontal;\nsnippet rz:n\n resize: none;\nsnippet rz:v\n resize: vertical;\nsnippet r\n right: ${1};\nsnippet r:a\n right: auto;\nsnippet tbl\n table-layout: ${1};\nsnippet tbl:a\n table-layout: auto;\nsnippet tbl:f\n table-layout: fixed;\nsnippet tal\n text-align-last: ${1};\nsnippet tal:a\n text-align-last: auto;\nsnippet tal:c\n text-align-last: center;\nsnippet tal:l\n text-align-last: left;\nsnippet tal:r\n text-align-last: right;\nsnippet ta\n text-align: ${1};\nsnippet ta:c\n text-align: center;\nsnippet ta:l\n text-align: left;\nsnippet ta:r\n text-align: right;\nsnippet td\n text-decoration: ${1};\nsnippet td:l\n text-decoration: line-through;\nsnippet td:n\n text-decoration: none;\nsnippet td:o\n text-decoration: overline;\nsnippet td:u\n text-decoration: underline;\nsnippet te\n text-emphasis: ${1};\nsnippet te:ac\n text-emphasis: accent;\nsnippet te:a\n text-emphasis: after;\nsnippet te:b\n text-emphasis: before;\nsnippet te:c\n text-emphasis: circle;\nsnippet te:ds\n text-emphasis: disc;\nsnippet te:dt\n text-emphasis: dot;\nsnippet te:n\n text-emphasis: none;\nsnippet th\n text-height: ${1};\nsnippet th:a\n text-height: auto;\nsnippet th:f\n text-height: font-size;\nsnippet th:m\n text-height: max-size;\nsnippet th:t\n text-height: text-size;\nsnippet ti\n text-indent: ${1};\nsnippet ti:-\n text-indent: -9999px;\nsnippet tj\n text-justify: ${1};\nsnippet tj:a\n text-justify: auto;\nsnippet tj:d\n text-justify: distribute;\nsnippet tj:ic\n text-justify: inter-cluster;\nsnippet tj:ii\n text-justify: inter-ideograph;\nsnippet tj:iw\n text-justify: inter-word;\nsnippet tj:k\n text-justify: kashida;\nsnippet tj:t\n text-justify: tibetan;\nsnippet to+\n text-outline: ${1:0} ${2:0} #${3:000};\nsnippet to\n text-outline: ${1};\nsnippet to:n\n text-outline: none;\nsnippet tr\n text-replace: ${1};\nsnippet tr:n\n text-replace: none;\nsnippet tsh+\n text-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet tsh\n text-shadow: ${1};\nsnippet tsh:n\n text-shadow: none;\nsnippet tt\n text-transform: ${1};\nsnippet tt:c\n text-transform: capitalize;\nsnippet tt:l\n text-transform: lowercase;\nsnippet tt:n\n text-transform: none;\nsnippet tt:u\n text-transform: uppercase;\nsnippet tw\n text-wrap: ${1};\nsnippet tw:no\n text-wrap: none;\nsnippet tw:n\n text-wrap: normal;\nsnippet tw:s\n text-wrap: suppress;\nsnippet tw:u\n text-wrap: unrestricted;\nsnippet t\n top: ${1};\nsnippet t:a\n top: auto;\nsnippet va\n vertical-align: ${1};\nsnippet va:bl\n vertical-align: baseline;\nsnippet va:b\n vertical-align: bottom;\nsnippet va:m\n vertical-align: middle;\nsnippet va:sub\n vertical-align: sub;\nsnippet va:sup\n vertical-align: super;\nsnippet va:tb\n vertical-align: text-bottom;\nsnippet va:tt\n vertical-align: text-top;\nsnippet va:t\n vertical-align: top;\nsnippet v\n visibility: ${1};\nsnippet v:c\n visibility: collapse;\nsnippet v:h\n visibility: hidden;\nsnippet v:v\n visibility: visible;\nsnippet whsc\n white-space-collapse: ${1};\nsnippet whsc:ba\n white-space-collapse: break-all;\nsnippet whsc:bs\n white-space-collapse: break-strict;\nsnippet whsc:k\n white-space-collapse: keep-all;\nsnippet whsc:l\n white-space-collapse: loose;\nsnippet whsc:n\n white-space-collapse: normal;\nsnippet whs\n white-space: ${1};\nsnippet whs:n\n white-space: normal;\nsnippet whs:nw\n white-space: nowrap;\nsnippet whs:pl\n white-space: pre-line;\nsnippet whs:pw\n white-space: pre-wrap;\nsnippet whs:p\n white-space: pre;\nsnippet wid\n widows: ${1};\nsnippet w\n width: ${1};\nsnippet w:a\n width: auto;\nsnippet wob\n word-break: ${1};\nsnippet wob:ba\n word-break: break-all;\nsnippet wob:bs\n word-break: break-strict;\nsnippet wob:k\n word-break: keep-all;\nsnippet wob:l\n word-break: loose;\nsnippet wob:n\n word-break: normal;\nsnippet wos\n word-spacing: ${1};\nsnippet wow\n word-wrap: ${1};\nsnippet wow:no\n word-wrap: none;\nsnippet wow:n\n word-wrap: normal;\nsnippet wow:s\n word-wrap: suppress;\nsnippet wow:u\n word-wrap: unrestricted;\nsnippet z\n z-index: ${1};\nsnippet z:a\n z-index: auto;\nsnippet zoo\n zoom: 1;\n",t.scope="css"}),define("ace/snippets/haml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet t\n %table\n %tr\n %th\n ${1:headers}\n %tr\n %td\n ${2:headers}\nsnippet ul\n %ul\n %li\n ${1:item}\n %li\nsnippet =rp\n = render :partial => '${1:partial}'\nsnippet =rpl\n = render :partial => '${1:partial}', :locals => {}\nsnippet =rpc\n = render :partial => '${1:partial}', :collection => @$1\n\n",t.scope="haml"}),define("ace/snippets/html",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Some useful Unicode entities\n# Non-Breaking Space\nsnippet nbs\n \n# \u2190\nsnippet left\n ←\n# \u2192\nsnippet right\n →\n# \u2191\nsnippet up\n ↑\n# \u2193\nsnippet down\n ↓\n# \u21a9\nsnippet return\n ↩\n# \u21e4\nsnippet backtab\n ⇤\n# \u21e5\nsnippet tab\n ⇥\n# \u21e7\nsnippet shift\n ⇧\n# \u2303\nsnippet ctrl\n ⌃\n# \u2305\nsnippet enter\n ⌅\n# \u2318\nsnippet cmd\n ⌘\n# \u2325\nsnippet option\n ⌥\n# \u2326\nsnippet delete\n ⌦\n# \u232b\nsnippet backspace\n ⌫\n# \u238b\nsnippet esc\n ⎋\n# Generic Doctype\nsnippet doctype HTML 4.01 Strict\n <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n "http://www.w3.org/TR/html4/strict.dtd">\nsnippet doctype HTML 4.01 Transitional\n <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n "http://www.w3.org/TR/html4/loose.dtd">\nsnippet doctype HTML 5\n <!DOCTYPE HTML>\nsnippet doctype XHTML 1.0 Frameset\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\nsnippet doctype XHTML 1.0 Strict\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\nsnippet doctype XHTML 1.0 Transitional\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\nsnippet doctype XHTML 1.1\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\n "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n# HTML Doctype 4.01 Strict\nsnippet docts\n <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n "http://www.w3.org/TR/html4/strict.dtd">\n# HTML Doctype 4.01 Transitional\nsnippet doct\n <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n "http://www.w3.org/TR/html4/loose.dtd">\n# HTML Doctype 5\nsnippet doct5\n <!DOCTYPE HTML>\n# XHTML Doctype 1.0 Frameset\nsnippet docxf\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">\n# XHTML Doctype 1.0 Strict\nsnippet docxs\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n# XHTML Doctype 1.0 Transitional\nsnippet docxt\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n# XHTML Doctype 1.1\nsnippet docx\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\n "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n# Attributes\nsnippet attr\n ${1:attribute}="${2:property}"\nsnippet attr+\n ${1:attribute}="${2:property}" attr+${3}\nsnippet .\n class="${1}"${2}\nsnippet #\n id="${1}"${2}\nsnippet alt\n alt="${1}"${2}\nsnippet charset\n charset="${1:utf-8}"${2}\nsnippet data\n data-${1}="${2:$1}"${3}\nsnippet for\n for="${1}"${2}\nsnippet height\n height="${1}"${2}\nsnippet href\n href="${1:#}"${2}\nsnippet lang\n lang="${1:en}"${2}\nsnippet media\n media="${1}"${2}\nsnippet name\n name="${1}"${2}\nsnippet rel\n rel="${1}"${2}\nsnippet scope\n scope="${1:row}"${2}\nsnippet src\n src="${1}"${2}\nsnippet title=\n title="${1}"${2}\nsnippet type\n type="${1}"${2}\nsnippet value\n value="${1}"${2}\nsnippet width\n width="${1}"${2}\n# Elements\nsnippet a\n <a href="${1:#}">${2:$1}</a>\nsnippet a.\n <a class="${1}" href="${2:#}">${3:$1}</a>\nsnippet a#\n <a id="${1}" href="${2:#}">${3:$1}</a>\nsnippet a:ext\n <a href="http://${1:example.com}">${2:$1}</a>\nsnippet a:mail\n <a href="mailto:${1:joe@example.com}?subject=${2:feedback}">${3:email me}</a>\nsnippet abbr\n <abbr title="${1}">${2}</abbr>\nsnippet address\n <address>\n ${1}\n </address>\nsnippet area\n <area shape="${1:rect}" coords="${2}" href="${3}" alt="${4}" />\nsnippet area+\n <area shape="${1:rect}" coords="${2}" href="${3}" alt="${4}" />\n area+${5}\nsnippet area:c\n <area shape="circle" coords="${1}" href="${2}" alt="${3}" />\nsnippet area:d\n <area shape="default" coords="${1}" href="${2}" alt="${3}" />\nsnippet area:p\n <area shape="poly" coords="${1}" href="${2}" alt="${3}" />\nsnippet area:r\n <area shape="rect" coords="${1}" href="${2}" alt="${3}" />\nsnippet article\n <article>\n ${1}\n </article>\nsnippet article.\n <article class="${1}">\n ${2}\n </article>\nsnippet article#\n <article id="${1}">\n ${2}\n </article>\nsnippet aside\n <aside>\n ${1}\n </aside>\nsnippet aside.\n <aside class="${1}">\n ${2}\n </aside>\nsnippet aside#\n <aside id="${1}">\n ${2}\n </aside>\nsnippet audio\n <audio src="${1}>${2}</audio>\nsnippet b\n <b>${1}</b>\nsnippet base\n <base href="${1}" target="${2}" />\nsnippet bdi\n <bdi>${1}</bdo>\nsnippet bdo\n <bdo dir="${1}">${2}</bdo>\nsnippet bdo:l\n <bdo dir="ltr">${1}</bdo>\nsnippet bdo:r\n <bdo dir="rtl">${1}</bdo>\nsnippet blockquote\n <blockquote>\n ${1}\n </blockquote>\nsnippet body\n <body>\n ${1}\n </body>\nsnippet br\n <br />${1}\nsnippet button\n <button type="${1:submit}">${2}</button>\nsnippet button.\n <button class="${1:button}" type="${2:submit}">${3}</button>\nsnippet button#\n <button id="${1}" type="${2:submit}">${3}</button>\nsnippet button:s\n <button type="submit">${1}</button>\nsnippet button:r\n <button type="reset">${1}</button>\nsnippet canvas\n <canvas>\n ${1}\n </canvas>\nsnippet caption\n <caption>${1}</caption>\nsnippet cite\n <cite>${1}</cite>\nsnippet code\n <code>${1}</code>\nsnippet col\n <col />${1}\nsnippet col+\n <col />\n col+${1}\nsnippet colgroup\n <colgroup>\n ${1}\n </colgroup>\nsnippet colgroup+\n <colgroup>\n <col />\n col+${1}\n </colgroup>\nsnippet command\n <command type="command" label="${1}" icon="${2}" />\nsnippet command:c\n <command type="checkbox" label="${1}" icon="${2}" />\nsnippet command:r\n <command type="radio" radiogroup="${1}" label="${2}" icon="${3}" />\nsnippet datagrid\n <datagrid>\n ${1}\n </datagrid>\nsnippet datalist\n <datalist>\n ${1}\n </datalist>\nsnippet datatemplate\n <datatemplate>\n ${1}\n </datatemplate>\nsnippet dd\n <dd>${1}</dd>\nsnippet dd.\n <dd class="${1}">${2}</dd>\nsnippet dd#\n <dd id="${1}">${2}</dd>\nsnippet del\n <del>${1}</del>\nsnippet details\n <details>${1}</details>\nsnippet dfn\n <dfn>${1}</dfn>\nsnippet dialog\n <dialog>\n ${1}\n </dialog>\nsnippet div\n <div>\n ${1}\n </div>\nsnippet div.\n <div class="${1}">\n ${2}\n </div>\nsnippet div#\n <div id="${1}">\n ${2}\n </div>\nsnippet dl\n <dl>\n ${1}\n </dl>\nsnippet dl.\n <dl class="${1}">\n ${2}\n </dl>\nsnippet dl#\n <dl id="${1}">\n ${2}\n </dl>\nsnippet dl+\n <dl>\n <dt>${1}</dt>\n <dd>${2}</dd>\n dt+${3}\n </dl>\nsnippet dt\n <dt>${1}</dt>\nsnippet dt.\n <dt class="${1}">${2}</dt>\nsnippet dt#\n <dt id="${1}">${2}</dt>\nsnippet dt+\n <dt>${1}</dt>\n <dd>${2}</dd>\n dt+${3}\nsnippet em\n <em>${1}</em>\nsnippet embed\n <embed src=${1} type="${2} />\nsnippet fieldset\n <fieldset>\n ${1}\n </fieldset>\nsnippet fieldset.\n <fieldset class="${1}">\n ${2}\n </fieldset>\nsnippet fieldset#\n <fieldset id="${1}">\n ${2}\n </fieldset>\nsnippet fieldset+\n <fieldset>\n <legend><span>${1}</span></legend>\n ${2}\n </fieldset>\n fieldset+${3}\nsnippet figcaption\n <figcaption>${1}</figcaption>\nsnippet figure\n <figure>${1}</figure>\nsnippet footer\n <footer>\n ${1}\n </footer>\nsnippet footer.\n <footer class="${1}">\n ${2}\n </footer>\nsnippet footer#\n <footer id="${1}">\n ${2}\n </footer>\nsnippet form\n <form action="${1}" method="${2:get}" accept-charset="utf-8">\n ${3}\n </form>\nsnippet form.\n <form class="${1}" action="${2}" method="${3:get}" accept-charset="utf-8">\n ${4}\n </form>\nsnippet form#\n <form id="${1}" action="${2}" method="${3:get}" accept-charset="utf-8">\n ${4}\n </form>\nsnippet h1\n <h1>${1}</h1>\nsnippet h1.\n <h1 class="${1}">${2}</h1>\nsnippet h1#\n <h1 id="${1}">${2}</h1>\nsnippet h2\n <h2>${1}</h2>\nsnippet h2.\n <h2 class="${1}">${2}</h2>\nsnippet h2#\n <h2 id="${1}">${2}</h2>\nsnippet h3\n <h3>${1}</h3>\nsnippet h3.\n <h3 class="${1}">${2}</h3>\nsnippet h3#\n <h3 id="${1}">${2}</h3>\nsnippet h4\n <h4>${1}</h4>\nsnippet h4.\n <h4 class="${1}">${2}</h4>\nsnippet h4#\n <h4 id="${1}">${2}</h4>\nsnippet h5\n <h5>${1}</h5>\nsnippet h5.\n <h5 class="${1}">${2}</h5>\nsnippet h5#\n <h5 id="${1}">${2}</h5>\nsnippet h6\n <h6>${1}</h6>\nsnippet h6.\n <h6 class="${1}">${2}</h6>\nsnippet h6#\n <h6 id="${1}">${2}</h6>\nsnippet head\n <head>\n <meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\n <title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\n ${2}\n </head>\nsnippet header\n <header>\n ${1}\n </header>\nsnippet header.\n <header class="${1}">\n ${2}\n </header>\nsnippet header#\n <header id="${1}">\n ${2}\n </header>\nsnippet hgroup\n <hgroup>\n ${1}\n </hgroup>\nsnippet hgroup.\n <hgroup class="${1}>\n ${2}\n </hgroup>\nsnippet hr\n <hr />${1}\nsnippet html\n <html>\n ${1}\n </html>\nsnippet xhtml\n <html xmlns="http://www.w3.org/1999/xhtml">\n ${1}\n </html>\nsnippet html5\n <!DOCTYPE html>\n <html>\n <head>\n <meta http-equiv="content-type" content="text/html; charset=utf-8" />\n <title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\n ${2:meta}\n </head>\n <body>\n ${3:body}\n </body>\n </html>\nsnippet i\n <i>${1}</i>\nsnippet iframe\n <iframe src="${1}" frameborder="0"></iframe>${2}\nsnippet iframe.\n <iframe class="${1}" src="${2}" frameborder="0"></iframe>${3}\nsnippet iframe#\n <iframe id="${1}" src="${2}" frameborder="0"></iframe>${3}\nsnippet img\n <img src="${1}" alt="${2}" />${3}\nsnippet img.\n <img class="${1}" src="${2}" alt="${3}" />${4}\nsnippet img#\n <img id="${1}" src="${2}" alt="${3}" />${4}\nsnippet input\n <input type="${1:text/submit/hidden/button/image}" name="${2}" id="${3:$2}" value="${4}" />${5}\nsnippet input.\n <input class="${1}" type="${2:text/submit/hidden/button/image}" name="${3}" id="${4:$3}" value="${5}" />${6}\nsnippet input:text\n <input type="text" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:submit\n <input type="submit" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:hidden\n <input type="hidden" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:button\n <input type="button" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:image\n <input type="image" name="${1}" id="${2:$1}" src="${3}" alt="${4}" />${5}\nsnippet input:checkbox\n <input type="checkbox" name="${1}" id="${2:$1}" />${3}\nsnippet input:radio\n <input type="radio" name="${1}" id="${2:$1}" />${3}\nsnippet input:color\n <input type="color" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:date\n <input type="date" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:datetime\n <input type="datetime" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:datetime-local\n <input type="datetime-local" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:email\n <input type="email" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:file\n <input type="file" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:month\n <input type="month" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:number\n <input type="number" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:password\n <input type="password" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:range\n <input type="range" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:reset\n <input type="reset" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:search\n <input type="search" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:time\n <input type="time" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:url\n <input type="url" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:week\n <input type="week" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet ins\n <ins>${1}</ins>\nsnippet kbd\n <kbd>${1}</kbd>\nsnippet keygen\n <keygen>${1}</keygen>\nsnippet label\n <label for="${2:$1}">${1}</label>\nsnippet label:i\n <label for="${2:$1}">${1}</label>\n <input type="${3:text/submit/hidden/button}" name="${4:$2}" id="${5:$2}" value="${6}" />${7}\nsnippet label:s\n <label for="${2:$1}">${1}</label>\n <select name="${3:$2}" id="${4:$2}">\n <option value="${5}">${6:$5}</option>\n </select>\nsnippet legend\n <legend>${1}</legend>\nsnippet legend+\n <legend><span>${1}</span></legend>\nsnippet li\n <li>${1}</li>\nsnippet li.\n <li class="${1}">${2}</li>\nsnippet li+\n <li>${1}</li>\n li+${2}\nsnippet lia\n <li><a href="${2:#}">${1}</a></li>\nsnippet lia+\n <li><a href="${2:#}">${1}</a></li>\n lia+${3}\nsnippet link\n <link rel="${1}" href="${2}" title="${3}" type="${4}" />${5}\nsnippet link:atom\n <link rel="alternate" href="${1:atom.xml}" title="Atom" type="application/atom+xml" />${2}\nsnippet link:css\n <link rel="stylesheet" href="${2:style.css}" type="text/css" media="${3:all}" />${4}\nsnippet link:favicon\n <link rel="shortcut icon" href="${1:favicon.ico}" type="image/x-icon" />${2}\nsnippet link:rss\n <link rel="alternate" href="${1:rss.xml}" title="RSS" type="application/atom+xml" />${2}\nsnippet link:touch\n <link rel="apple-touch-icon" href="${1:favicon.png}" />${2}\nsnippet map\n <map name="${1}">\n ${2}\n </map>\nsnippet map.\n <map class="${1}" name="${2}">\n ${3}\n </map>\nsnippet map#\n <map name="${1}" id="${2:$1}>\n ${3}\n </map>\nsnippet map+\n <map name="${1}">\n <area shape="${2}" coords="${3}" href="${4}" alt="${5}" />${6}\n </map>${7}\nsnippet mark\n <mark>${1}</mark>\nsnippet menu\n <menu>\n ${1}\n </menu>\nsnippet menu:c\n <menu type="context">\n ${1}\n </menu>\nsnippet menu:t\n <menu type="toolbar">\n ${1}\n </menu>\nsnippet meta\n <meta http-equiv="${1}" content="${2}" />${3}\nsnippet meta:compat\n <meta http-equiv="X-UA-Compatible" content="IE=${1:7,8,edge}" />${3}\nsnippet meta:refresh\n <meta http-equiv="refresh" content="text/html;charset=UTF-8" />${3}\nsnippet meta:utf\n <meta http-equiv="content-type" content="text/html;charset=UTF-8" />${3}\nsnippet meter\n <meter>${1}</meter>\nsnippet nav\n <nav>\n ${1}\n </nav>\nsnippet nav.\n <nav class="${1}">\n ${2}\n </nav>\nsnippet nav#\n <nav id="${1}">\n ${2}\n </nav>\nsnippet noscript\n <noscript>\n ${1}\n </noscript>\nsnippet object\n <object data="${1}" type="${2}">\n ${3}\n </object>${4}\n# Embed QT Movie\nsnippet movie\n <object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"\n codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n <param name="src" value="$1" />\n <param name="controller" value="$4" />\n <param name="autoplay" value="$5" />\n <embed src="${1:movie.mov}"\n width="${2:320}" height="${3:240}"\n controller="${4:true}" autoplay="${5:true}"\n scale="tofit" cache="true"\n pluginspage="http://www.apple.com/quicktime/download/" />\n </object>${6}\nsnippet ol\n <ol>\n ${1}\n </ol>\nsnippet ol.\n <ol class="${1}>\n ${2}\n </ol>\nsnippet ol#\n <ol id="${1}>\n ${2}\n </ol>\nsnippet ol+\n <ol>\n <li>${1}</li>\n li+${2}\n </ol>\nsnippet opt\n <option value="${1}">${2:$1}</option>\nsnippet opt+\n <option value="${1}">${2:$1}</option>\n opt+${3}\nsnippet optt\n <option>${1}</option>\nsnippet optgroup\n <optgroup>\n <option value="${1}">${2:$1}</option>\n opt+${3}\n </optgroup>\nsnippet output\n <output>${1}</output>\nsnippet p\n <p>${1}</p>\nsnippet param\n <param name="${1}" value="${2}" />${3}\nsnippet pre\n <pre>\n ${1}\n </pre>\nsnippet progress\n <progress>${1}</progress>\nsnippet q\n <q>${1}</q>\nsnippet rp\n <rp>${1}</rp>\nsnippet rt\n <rt>${1}</rt>\nsnippet ruby\n <ruby>\n <rp><rt>${1}</rt></rp>\n </ruby>\nsnippet s\n <s>${1}</s>\nsnippet samp\n <samp>\n ${1}\n </samp>\nsnippet script\n <script type="text/javascript" charset="utf-8">\n ${1}\n </script>\nsnippet scriptsrc\n <script src="${1}.js" type="text/javascript" charset="utf-8"></script>\nsnippet section\n <section>\n ${1}\n </section>\nsnippet section.\n <section class="${1}">\n ${2}\n </section>\nsnippet section#\n <section id="${1}">\n ${2}\n </section>\nsnippet select\n <select name="${1}" id="${2:$1}">\n ${3}\n </select>\nsnippet select.\n <select name="${1}" id="${2:$1}" class="${3}>\n ${4}\n </select>\nsnippet select+\n <select name="${1}" id="${2:$1}">\n <option value="${3}">${4:$3}</option>\n opt+${5}\n </select>\nsnippet small\n <small>${1}</small>\nsnippet source\n <source src="${1}" type="${2}" media="${3}" />\nsnippet span\n <span>${1}</span>\nsnippet strong\n <strong>${1}</strong>\nsnippet style\n <style type="text/css" media="${1:all}">\n ${2}\n </style>\nsnippet sub\n <sub>${1}</sub>\nsnippet summary\n <summary>\n ${1}\n </summary>\nsnippet sup\n <sup>${1}</sup>\nsnippet table\n <table border="${1:0}">\n ${2}\n </table>\nsnippet table.\n <table class="${1}" border="${2:0}">\n ${3}\n </table>\nsnippet table#\n <table id="${1}" border="${2:0}">\n ${3}\n </table>\nsnippet tbody\n <tbody>\n ${1}\n </tbody>\nsnippet td\n <td>${1}</td>\nsnippet td.\n <td class="${1}">${2}</td>\nsnippet td#\n <td id="${1}">${2}</td>\nsnippet td+\n <td>${1}</td>\n td+${2}\nsnippet textarea\n <textarea name="${1}" id=${2:$1} rows="${3:8}" cols="${4:40}">${5}</textarea>${6}\nsnippet tfoot\n <tfoot>\n ${1}\n </tfoot>\nsnippet th\n <th>${1}</th>\nsnippet th.\n <th class="${1}">${2}</th>\nsnippet th#\n <th id="${1}">${2}</th>\nsnippet th+\n <th>${1}</th>\n th+${2}\nsnippet thead\n <thead>\n ${1}\n </thead>\nsnippet time\n <time datetime="${1}" pubdate="${2:$1}>${3:$1}</time>\nsnippet title\n <title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\nsnippet tr\n <tr>\n ${1}\n </tr>\nsnippet tr+\n <tr>\n <td>${1}</td>\n td+${2}\n </tr>\nsnippet track\n <track src="${1}" srclang="${2}" label="${3}" default="${4:default}>${5}</track>${6}\nsnippet ul\n <ul>\n ${1}\n </ul>\nsnippet ul.\n <ul class="${1}">\n ${2}\n </ul>\nsnippet ul#\n <ul id="${1}">\n ${2}\n </ul>\nsnippet ul+\n <ul>\n <li>${1}</li>\n li+${2}\n </ul>\nsnippet var\n <var>${1}</var>\nsnippet video\n <video src="${1} height="${2}" width="${3}" preload="${5:none}" autoplay="${6:autoplay}>${7}</video>${8}\nsnippet wbr\n <wbr />${1}\n',
|
85
|
+
t.scope="html"}),define("ace/snippets/html_elixir",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="html_elixir"}),define("ace/snippets/html_ruby",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="html_ruby"}),define("ace/snippets/javascript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Prototype\nsnippet proto\n ${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {\n ${4:// body...}\n };\n# Function\nsnippet fun\n function ${1?:function_name}(${2:argument}) {\n ${3:// body...}\n }\n# Anonymous Function\nregex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/\nsnippet f\n function${M1?: ${1:functionName}}($2) {\n ${0:$TM_SELECTED_TEXT}\n }${M2?;}${M3?,}${M4?)}\n# Immediate function\ntrigger \\(?f\\(\nendTrigger \\)?\nsnippet f(\n (function(${1}) {\n ${0:${TM_SELECTED_TEXT:/* code */}}\n }(${1}));\n# if\nsnippet if\n if (${1:true}) {\n ${0}\n }\n# if ... else\nsnippet ife\n if (${1:true}) {\n ${2}\n } else {\n ${0}\n }\n# tertiary conditional\nsnippet ter\n ${1:/* condition */} ? ${2:a} : ${3:b}\n# switch\nsnippet switch\n switch (${1:expression}) {\n case \'${3:case}\':\n ${4:// code}\n break;\n ${5}\n default:\n ${2:// code}\n }\n# case\nsnippet case\n case \'${1:case}\':\n ${2:// code}\n break;\n ${3}\n\n# while (...) {...}\nsnippet wh\n while (${1:/* condition */}) {\n ${0:/* code */}\n }\n# try\nsnippet try\n try {\n ${0:/* code */}\n } catch (e) {}\n# do...while\nsnippet do\n do {\n ${2:/* code */}\n } while (${1:/* condition */});\n# Object Method\nsnippet :f\nregex /([,{[])|^\\s*/:f/\n ${1:method_name}: function(${2:attribute}) {\n ${0}\n }${3:,}\n# setTimeout function\nsnippet setTimeout\nregex /\\b/st|timeout|setTimeo?u?t?/\n setTimeout(function() {${3:$TM_SELECTED_TEXT}}, ${1:10});\n# Get Elements\nsnippet gett\n getElementsBy${1:TagName}(\'${2}\')${3}\n# Get Element\nsnippet get\n getElementBy${1:Id}(\'${2}\')${3}\n# console.log (Firebug)\nsnippet cl\n console.log(${1});\n# return\nsnippet ret\n return ${1:result}\n# for (property in object ) { ... }\nsnippet fori\n for (var ${1:prop} in ${2:Things}) {\n ${0:$2[$1]}\n }\n# hasOwnProperty\nsnippet has\n hasOwnProperty(${1})\n# docstring\nsnippet /**\n /**\n * ${1:description}\n *\n */\nsnippet @par\nregex /^\\s*\\*\\s*/@(para?m?)?/\n @param {${1:type}} ${2:name} ${3:description}\nsnippet @ret\n @return {${1:type}} ${2:description}\n# JSON.parse\nsnippet jsonp\n JSON.parse(${1:jstr});\n# JSON.stringify\nsnippet jsons\n JSON.stringify(${1:object});\n# self-defining function\nsnippet sdf\n var ${1:function_name} = function(${2:argument}) {\n ${3:// initial code ...}\n\n $1 = function($2) {\n ${4:// main code}\n };\n }\n# singleton\nsnippet sing\n function ${1:Singleton} (${2:argument}) {\n // the cached instance\n var instance;\n\n // rewrite the constructor\n $1 = function $1($2) {\n return instance;\n };\n \n // carry over the prototype properties\n $1.prototype = this;\n\n // the instance\n instance = new $1();\n\n // reset the constructor pointer\n instance.constructor = $1;\n\n ${3:// code ...}\n\n return instance;\n }\n# class\nsnippet class\nregex /^\\s*/clas{0,2}/\n var ${1:class} = function(${20}) {\n $40$0\n };\n \n (function() {\n ${60:this.prop = ""}\n }).call(${1:class}.prototype);\n \n exports.${1:class} = ${1:class};\n# \nsnippet for-\n for (var ${1:i} = ${2:Things}.length; ${1:i}--; ) {\n ${0:${2:Things}[${1:i}];}\n }\n# for (...) {...}\nsnippet for\n for (var ${1:i} = 0; $1 < ${2:Things}.length; $1++) {\n ${3:$2[$1]}$0\n }\n# for (...) {...} (Improved Native For-Loop)\nsnippet forr\n for (var ${1:i} = ${2:Things}.length - 1; $1 >= 0; $1--) {\n ${3:$2[$1]}$0\n }\n\n\n#modules\nsnippet def\n define(function(require, exports, module) {\n "use strict";\n var ${1/.*\\///} = require("${1}");\n \n $TM_SELECTED_TEXT\n });\nsnippet req\nguard ^\\s*\n var ${1/.*\\///} = require("${1}");\n $0\nsnippet requ\nguard ^\\s*\n var ${1/.*\\/(.)/\\u$1/} = require("${1}").${1/.*\\/(.)/\\u$1/};\n $0\n',t.scope="javascript"}),define("ace/snippets/json",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="json"}),define("ace/snippets/jsp",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet @page\n <%@page contentType="text/html" pageEncoding="UTF-8"%>\nsnippet jstl\n <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>\n <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>\nsnippet jstl:c\n <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>\nsnippet jstl:fn\n <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>\nsnippet cpath\n ${pageContext.request.contextPath}\nsnippet cout\n <c:out value="${1}" default="${2}" />\nsnippet cset\n <c:set var="${1}" value="${2}" />\nsnippet cremove\n <c:remove var="${1}" scope="${2:page}" />\nsnippet ccatch\n <c:catch var="${1}" />\nsnippet cif\n <c:if test="${${1}}">\n ${2}\n </c:if>\nsnippet cchoose\n <c:choose>\n ${1}\n </c:choose>\nsnippet cwhen\n <c:when test="${${1}}">\n ${2}\n </c:when>\nsnippet cother\n <c:otherwise>\n ${1}\n </c:otherwise>\nsnippet cfore\n <c:forEach items="${${1}}" var="${2}" varStatus="${3}">\n ${4:<c:out value="$2" />}\n </c:forEach>\nsnippet cfort\n <c:set var="${1}">${2:item1,item2,item3}</c:set>\n <c:forTokens var="${3}" items="${$1}" delims="${4:,}">\n ${5:<c:out value="$3" />}\n </c:forTokens>\nsnippet cparam\n <c:param name="${1}" value="${2}" />\nsnippet cparam+\n <c:param name="${1}" value="${2}" />\n cparam+${3}\nsnippet cimport\n <c:import url="${1}" />\nsnippet cimport+\n <c:import url="${1}">\n <c:param name="${2}" value="${3}" />\n cparam+${4}\n </c:import>\nsnippet curl\n <c:url value="${1}" var="${2}" />\n <a href="${$2}">${3}</a>\nsnippet curl+\n <c:url value="${1}" var="${2}">\n <c:param name="${4}" value="${5}" />\n cparam+${6}\n </c:url>\n <a href="${$2}">${3}</a>\nsnippet credirect\n <c:redirect url="${1}" />\nsnippet contains\n ${fn:contains(${1:string}, ${2:substr})}\nsnippet contains:i\n ${fn:containsIgnoreCase(${1:string}, ${2:substr})}\nsnippet endswith\n ${fn:endsWith(${1:string}, ${2:suffix})}\nsnippet escape\n ${fn:escapeXml(${1:string})}\nsnippet indexof\n ${fn:indexOf(${1:string}, ${2:substr})}\nsnippet join\n ${fn:join(${1:collection}, ${2:delims})}\nsnippet length\n ${fn:length(${1:collection_or_string})}\nsnippet replace\n ${fn:replace(${1:string}, ${2:substr}, ${3:replace})}\nsnippet split\n ${fn:split(${1:string}, ${2:delims})}\nsnippet startswith\n ${fn:startsWith(${1:string}, ${2:prefix})}\nsnippet substr\n ${fn:substring(${1:string}, ${2:begin}, ${3:end})}\nsnippet substr:a\n ${fn:substringAfter(${1:string}, ${2:substr})}\nsnippet substr:b\n ${fn:substringBefore(${1:string}, ${2:substr})}\nsnippet lc\n ${fn:toLowerCase(${1:string})}\nsnippet uc\n ${fn:toUpperCase(${1:string})}\nsnippet trim\n ${fn:trim(${1:string})}\n',t.scope="jsp"}),define("ace/snippets/jsx",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="jsx"}),define("ace/snippets/less",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="less"}),define("ace/snippets/mysql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="mysql"}),define("ace/snippets/pgsql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="pgsql"}),define("ace/snippets/plain_text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="plain_text"}),define("ace/snippets/rhtml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="rhtml"}),define("ace/snippets/sass",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="sass"}),define("ace/snippets/scss",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="scss"}),define("ace/snippets/snippets",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# snippets for making snippets :)\nsnippet snip\n snippet ${1:trigger}\n ${2}\nsnippet msnip\n snippet ${1:trigger} ${2:description}\n ${3}\nsnippet v\n {VISUAL}\n",t.scope="snippets"}),define("ace/snippets/sql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet tbl\n create table ${1:table} (\n ${2:columns}\n );\nsnippet col\n ${1:name} ${2:type} ${3:default ''} ${4:not null}\nsnippet ccol\n ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\nsnippet ncol\n ${1:name} number ${3:default 0} ${4:not null}\nsnippet dcol\n ${1:name} date ${3:default sysdate} ${4:not null}\nsnippet ind\n create index ${3:$1_$2} on ${1:table}(${2:column});\nsnippet uind\n create unique index ${1:name} on ${2:table}(${3:column});\nsnippet tblcom\n comment on table ${1:table} is '${2:comment}';\nsnippet colcom\n comment on column ${1:table}.${2:column} is '${3:comment}';\nsnippet addcol\n alter table ${1:table} add (${2:column} ${3:type});\nsnippet seq\n create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\nsnippet s*\n select * from ${1:table}\n",t.scope="sql"}),define("ace/snippets/sqlserver",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# ISNULL\nsnippet isnull\n ISNULL(${1:check_expression}, ${2:replacement_value})\n# FORMAT\nsnippet format\n FORMAT(${1:value}, ${2:format})\n# CAST\nsnippet cast\n CAST(${1:expression} AS ${2:data_type})\n# CONVERT\nsnippet convert\n CONVERT(${1:data_type}, ${2:expression})\n# DATEPART\nsnippet datepart\n DATEPART(${1:datepart}, ${2:date})\n# DATEDIFF\nsnippet datediff\n DATEDIFF(${1:datepart}, ${2:startdate}, ${3:enddate})\n# DATEADD\nsnippet dateadd\n DATEADD(${1:datepart}, ${2:number}, ${3:date})\n# DATEFROMPARTS \nsnippet datefromparts\n DATEFROMPARTS(${1:year}, ${2:month}, ${3:day})\n# OBJECT_DEFINITION\nsnippet objectdef\n SELECT OBJECT_DEFINITION(OBJECT_ID('${1:sys.server_permissions /*object name*/}'))\n# STUFF XML\nsnippet stuffxml\n STUFF((SELECT ', ' + ${1:ColumnName}\n FROM ${2:TableName}\n WHERE ${3:WhereClause}\n FOR XML PATH('')), 1, 1, '') AS ${4:Alias}\n ${5:/*https://msdn.microsoft.com/en-us/library/ms188043.aspx*/}\n# Create Procedure\nsnippet createproc\n -- =============================================\n -- Author: ${1:Author}\n -- Create date: ${2:Date}\n -- Description: ${3:Description}\n -- =============================================\n CREATE PROCEDURE ${4:Procedure_Name}\n ${5:/*Add the parameters for the stored procedure here*/}\n AS\n BEGIN\n -- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements.\n SET NOCOUNT ON;\n \n ${6:/*Add the T-SQL statements to compute the return value here*/}\n \n END\n GO\n# Create Scalar Function\nsnippet createfn\n -- =============================================\n -- Author: ${1:Author}\n -- Create date: ${2:Date}\n -- Description: ${3:Description}\n -- =============================================\n CREATE FUNCTION ${4:Scalar_Function_Name}\n -- Add the parameters for the function here\n RETURNS ${5:Function_Data_Type}\n AS\n BEGIN\n DECLARE @Result ${5:Function_Data_Type}\n \n ${6:/*Add the T-SQL statements to compute the return value here*/}\n \n END\n GO",t.scope="sqlserver"}),define("ace/snippets/svg",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="svg"}),define("ace/snippets/text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=void 0,t.scope="text"}),define("ace/snippets/textile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Jekyll post header\nsnippet header\n ---\n title: ${1:title}\n layout: post\n date: ${2:date} ${3:hour:minute:second} -05:00\n ---\n\n# Image\nsnippet img\n !${1:url}(${2:title}):${3:link}!\n\n# Table\nsnippet |\n |${1}|${2}\n\n# Link\nsnippet link\n "${1:link text}":${2:url}\n\n# Acronym\nsnippet (\n (${1:Expand acronym})${2}\n\n# Footnote\nsnippet fn\n [${1:ref number}] ${3}\n\n fn$1. ${2:footnote}\n \n',t.scope="textile"}),define("ace/theme/monokai",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=".ace-monokai .ace_gutter {background: #2F3129;color: #8F908A}.ace-monokai .ace_print-margin {width: 1px;background: #555651}.ace-monokai {background-color: #272822;color: #F8F8F2}.ace-monokai .ace_cursor {color: #F8F8F0}.ace-monokai .ace_marker-layer .ace_selection {background: #49483E}.ace-monokai.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #272822;}.ace-monokai .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-monokai .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #49483E}.ace-monokai .ace_marker-layer .ace_active-line {background: #202020}.ace-monokai .ace_gutter-active-line {background-color: #272727}.ace-monokai .ace_marker-layer .ace_selected-word {border: 1px solid #49483E}.ace-monokai .ace_invisible {color: #52524d}.ace-monokai .ace_entity.ace_name.ace_tag,.ace-monokai .ace_keyword,.ace-monokai .ace_meta.ace_tag,.ace-monokai .ace_storage {color: #F92672}.ace-monokai .ace_punctuation,.ace-monokai .ace_punctuation.ace_tag {color: #fff}.ace-monokai .ace_constant.ace_character,.ace-monokai .ace_constant.ace_language,.ace-monokai .ace_constant.ace_numeric,.ace-monokai .ace_constant.ace_other {color: #AE81FF}.ace-monokai .ace_invalid {color: #F8F8F0;background-color: #F92672}.ace-monokai .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #AE81FF}.ace-monokai .ace_support.ace_constant,.ace-monokai .ace_support.ace_function {color: #66D9EF}.ace-monokai .ace_fold {background-color: #A6E22E;border-color: #F8F8F2}.ace-monokai .ace_storage.ace_type,.ace-monokai .ace_support.ace_class,.ace-monokai .ace_support.ace_type {font-style: italic;color: #66D9EF}.ace-monokai .ace_entity.ace_name.ace_function,.ace-monokai .ace_entity.ace_other,.ace-monokai .ace_entity.ace_other.ace_attribute-name,.ace-monokai .ace_variable {color: #A6E22E}.ace-monokai .ace_variable.ace_parameter {font-style: italic;color: #FD971F}.ace-monokai .ace_string {color: #E6DB74}.ace-monokai .ace_comment {color: #75715E}.ace-monokai .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y}";var i=e("../lib/dom");i.importCssString(t.cssText,t.cssClass)}),function(e,t,n){"use strict";function i(e){return S(e)?e:Object.keys(e).map(function(t){return e[t]})}function r(e){return null===e}function o(e,t){var i=Object.keys(e);return-1==i.map(function(i){return t[i]!==n&&t[i]==e[i]}).indexOf(!1)}function a(e,t){if(""===t)return e;var n=e.indexOf(t.charAt(0));return-1===n?!1:a(e.substr(n+1),t.substr(1))}function s(e,t,n){var i=0;return e.filter(function(e){var r=$(n)?t>i&&n(e):t>i;return i=r?i+1:i,r})}function l(e,t,n){return n.round(e*n.pow(10,t))/n.pow(10,t)}function u(e,t,n){t=t||[];var i=Object.keys(e);return i.forEach(function(i){if(T(e[i])&&!S(e[i])){var r=n?n+"."+i:n;u(e[i],t,r||i)}else{var o=n?n+"."+i:i;t.push(o)}}),t}function c(e){return e&&e.$evalAsync&&e.$watch}function d(){return function(e,t){return e>t}}function h(){return function(e,t){return e>=t}}function p(){return function(e,t){return t>e}}function f(){return function(e,t){return t>=e}}function m(){return function(e,t){return e==t}}function g(){return function(e,t){return e!=t}}function v(){return function(e,t){return e===t}}function y(){return function(e,t){return e!==t}}function _(e){return function(t,n){return t=T(t)?i(t):t,!S(t)||k(n)?!1:t.some(function(t){return T(t)||C(n)?e(n)(t):t===n})}}function b(e,t){return t=t||0,t>=e.length?e:S(e[t])?b(e.slice(0,t).concat(e[t],e.slice(t+1)),t):b(e,t+1)}function x(e){return function(t,n){function r(e,t){return k(t)?!1:e.some(function(e){return F(e,t)})}if(t=T(t)?i(t):t,!S(t))return t;var o=[],a=e(n);return k(n)?t.filter(function(e,t,n){return n.indexOf(e)===t}):t.filter(function(e){var t=a(e);return r(o,t)?!1:(o.push(t),!0)})}}function w(e,t,n){return t?e+n+w(e,--t,n):e}var $=t.isDefined,k=t.isUndefined,C=t.isFunction,A=t.isString,M=t.isNumber,T=t.isObject,S=t.isArray,D=t.forEach,E=t.extend,L=t.copy,F=t.equals;String.prototype.contains||(String.prototype.contains=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),t.module("a8m.angular",[]).filter("isUndefined",function(){return function(e){return t.isUndefined(e)}}).filter("isDefined",function(){return function(e){return t.isDefined(e)}}).filter("isFunction",function(){return function(e){return t.isFunction(e)}}).filter("isString",function(){return function(e){return t.isString(e)}}).filter("isNumber",function(){return function(e){return t.isNumber(e)}}).filter("isArray",function(){return function(e){return t.isArray(e)}}).filter("isObject",function(){return function(e){return t.isObject(e)}}).filter("isEqual",function(){return function(e,n){return t.equals(e,n)}}),t.module("a8m.conditions",[]).filter({isGreaterThan:d,">":d,isGreaterThanOrEqualTo:h,">=":h,isLessThan:p,"<":p,isLessThanOrEqualTo:f,"<=":f,isEqualTo:m,"==":m,isNotEqualTo:g,"!=":g,isIdenticalTo:v,"===":v,isNotIdenticalTo:y,"!==":y}),t.module("a8m.is-null",[]).filter("isNull",function(){return function(e){return r(e)}}),t.module("a8m.after-where",[]).filter("afterWhere",function(){return function(e,t){if(e=T(e)?i(e):e,!S(e)||k(t))return e;var n=e.map(function(e){return o(t,e)}).indexOf(!0);return e.slice(-1===n?0:n)}}),t.module("a8m.after",[]).filter("after",function(){return function(e,t){return e=T(e)?i(e):e,S(e)?e.slice(t):e}}),t.module("a8m.before-where",[]).filter("beforeWhere",function(){return function(e,t){if(e=T(e)?i(e):e,!S(e)||k(t))return e;var n=e.map(function(e){return o(t,e)}).indexOf(!0);return e.slice(0,-1===n?e.length:++n)}}),t.module("a8m.before",[]).filter("before",function(){return function(e,t){return e=T(e)?i(e):e,S(e)?e.slice(0,t?--t:t):e}}),t.module("a8m.chunk-by",[]).filter("chunkBy",[function(){function e(e,t){for(var n=[];e--;)n[e]=t;return n}return function(t,n,i){return S(t)?t.map(function(t,r,o){return r*=n,t=o.slice(r,r+n),!k(i)&&t.length<n?t.concat(e(n-t.length,i)):t}).slice(0,Math.ceil(t.length/n)):t}}]),t.module("a8m.concat",[]).filter("concat",[function(){return function(e,t){if(k(t))return e;if(S(e))return T(t)?e.concat(i(t)):e.concat(t);if(T(e)){var n=i(e);return T(t)?n.concat(i(t)):n.concat(t)}return e}}]),t.module("a8m.contains",[]).filter({contains:["$parse",_],some:["$parse",_]}),t.module("a8m.count-by",[]).filter("countBy",["$parse",function(e){return function(t,n){var r,o={},a=e(n);return t=T(t)?i(t):t,!S(t)||k(n)?t:(t.forEach(function(e){r=a(e),o[r]||(o[r]=0),o[r]++}),o)}}]),t.module("a8m.defaults",[]).filter("defaults",["$parse",function(e){return function(t,n){if(t=T(t)?i(t):t,!S(t)||!T(n))return t;var r=u(n);return t.forEach(function(t){r.forEach(function(i){var r=e(i),o=r.assign;k(r(t))&&o(t,r(n))})}),t}}]),t.module("a8m.every",[]).filter("every",["$parse",function(e){return function(t,n){return t=T(t)?i(t):t,!S(t)||k(n)?!0:t.every(function(t){return T(t)||C(n)?e(n)(t):t===n})}}]),t.module("a8m.filter-by",[]).filter("filterBy",["$parse",function(e){return function(t,r,o){var a;return o=A(o)||M(o)?String(o).toLowerCase():n,t=T(t)?i(t):t,!S(t)||k(o)?t:t.filter(function(t){return r.some(function(n){if(~n.indexOf("+")){var i=n.replace(new RegExp("\\s","g"),"").split("+");a=i.reduce(function(n,i,r){return 1===r?e(n)(t)+" "+e(i)(t):n+" "+e(i)(t)})}else a=e(n)(t);return A(a)||M(a)?String(a).toLowerCase().contains(o):!1})})}}]),t.module("a8m.first",[]).filter("first",["$parse",function(e){return function(t){var r,o,a;return t=T(t)?i(t):t,S(t)?(a=Array.prototype.slice.call(arguments,1),r=M(a[0])?a[0]:1,o=M(a[0])?M(a[1])?n:a[1]:a[0],a.length?s(t,r,o?e(o):o):t[0]):t}}]),t.module("a8m.flatten",[]).filter("flatten",function(){return function(e,t){return t=t||!1,e=T(e)?i(e):e,S(e)?t?[].concat.apply([],e):b(e,0):e}}),t.module("a8m.fuzzy-by",[]).filter("fuzzyBy",["$parse",function(e){return function(t,n,r,o){var s,l,u=o||!1;return t=T(t)?i(t):t,!S(t)||k(n)||k(r)?t:(l=e(n),t.filter(function(e){return s=l(e),A(s)?(s=u?s:s.toLowerCase(),r=u?r:r.toLowerCase(),a(s,r)!==!1):!1}))}}]),t.module("a8m.fuzzy",[]).filter("fuzzy",function(){return function(e,t,n){function r(e,t){var n,i,r=Object.keys(e);return 0<r.filter(function(r){return n=e[r],i?!0:A(n)?(n=o?n:n.toLowerCase(),i=a(n,t)!==!1):!1}).length}var o=n||!1;return e=T(e)?i(e):e,!S(e)||k(t)?e:(t=o?t:t.toLowerCase(),e.filter(function(e){return A(e)?(e=o?e:e.toLowerCase(),a(e,t)!==!1):T(e)?r(e,t):!1}))}}),t.module("a8m.group-by",["a8m.filter-watcher"]).filter("groupBy",["$parse","filterWatcher",function(e,t){return function(n,i){function r(e,t){var n,i={};return D(e,function(e){n=t(e),i[n]||(i[n]=[]),i[n].push(e)}),i}if(!T(n)||k(i))return n;var o=e(i);return t.isMemoized("groupBy",arguments)||t.memoize("groupBy",arguments,this,r(n,o))}}]),t.module("a8m.is-empty",[]).filter("isEmpty",function(){return function(e){return T(e)?!i(e).length:!e.length}}),t.module("a8m.join",[]).filter("join",function(){return function(e,t){return k(e)||!S(e)?e:(k(t)&&(t=" "),e.join(t))}}),t.module("a8m.last",[]).filter("last",["$parse",function(e){return function(t){var r,o,a,l=L(t);return l=T(l)?i(l):l,S(l)?(a=Array.prototype.slice.call(arguments,1),r=M(a[0])?a[0]:1,o=M(a[0])?M(a[1])?n:a[1]:a[0],a.length?s(l.reverse(),r,o?e(o):o).reverse():l[l.length-1]):l}}]),t.module("a8m.map",[]).filter("map",["$parse",function(e){return function(t,n){return t=T(t)?i(t):t,!S(t)||k(n)?t:t.map(function(t){return e(n)(t)})}}]),t.module("a8m.omit",[]).filter("omit",["$parse",function(e){return function(t,n){return t=T(t)?i(t):t,!S(t)||k(n)?t:t.filter(function(t){return!e(n)(t)})}}]),t.module("a8m.pick",[]).filter("pick",["$parse",function(e){return function(t,n){return t=T(t)?i(t):t,!S(t)||k(n)?t:t.filter(function(t){return e(n)(t)})}}]),t.module("a8m.range",[]).filter("range",function(){return function(e,t){for(var n=0;n<parseInt(t);n++)e.push(n);return e}}),t.module("a8m.remove-with",[]).filter("removeWith",function(){return function(e,t){return k(t)?e:(e=T(e)?i(e):e,e.filter(function(e){return!o(t,e)}))}}),t.module("a8m.remove",[]).filter("remove",function(){return function(e){e=T(e)?i(e):e;var t=Array.prototype.slice.call(arguments,1);return S(e)?e.filter(function(e){return!t.some(function(t){return F(t,e)})}):e}}),t.module("a8m.reverse",[]).filter("reverse",[function(){return function(e){return e=T(e)?i(e):e,A(e)?e.split("").reverse().join(""):S(e)?e.slice().reverse():e}}]),t.module("a8m.search-field",[]).filter("searchField",["$parse",function(e){return function(t){var n,r;t=T(t)?i(t):t;var o=Array.prototype.slice.call(arguments,1);return S(t)&&o.length?t.map(function(t){return r=o.map(function(i){return(n=e(i))(t)}).join(" "),E(t,{searchField:r})}):t}}]),t.module("a8m.to-array",[]).filter("toArray",function(){return function(e,t){return T(e)?t?Object.keys(e).map(function(t){return E(e[t],{$key:t})}):i(e):e}}),t.module("a8m.unique",[]).filter({unique:["$parse",x],uniq:["$parse",x]}),t.module("a8m.where",[]).filter("where",function(){return function(e,t){return k(t)?e:(e=T(e)?i(e):e,e.filter(function(e){return o(t,e)}))}}),t.module("a8m.xor",[]).filter("xor",["$parse",function(e){return function(t,n,r){function o(t,n){var i=e(r);return n.some(function(e){return r?F(i(e),i(t)):F(e,t)})}return r=r||!1,t=T(t)?i(t):t,n=T(n)?i(n):n,S(t)&&S(n)?t.concat(n).filter(function(e){return!(o(e,t)&&o(e,n))}):t}}]),t.module("a8m.math.byteFmt",["a8m.math"]).filter("byteFmt",["$math",function(e){return function(t,n){return M(n)&&isFinite(n)&&n%1===0&&n>=0&&M(t)&&isFinite(t)?1024>t?l(t,n,e)+" B":1048576>t?l(t/1024,n,e)+" KB":1073741824>t?l(t/1048576,n,e)+" MB":l(t/1073741824,n,e)+" GB":"NaN"}}]),t.module("a8m.math.degrees",["a8m.math"]).filter("degrees",["$math",function(e){return function(t,n){if(M(n)&&isFinite(n)&&n%1===0&&n>=0&&M(t)&&isFinite(t)){var i=180*t/e.PI;return e.round(i*e.pow(10,n))/e.pow(10,n)}return"NaN"}}]),t.module("a8m.math.kbFmt",["a8m.math"]).filter("kbFmt",["$math",function(e){return function(t,n){return M(n)&&isFinite(n)&&n%1===0&&n>=0&&M(t)&&isFinite(t)?1024>t?l(t,n,e)+" KB":1048576>t?l(t/1024,n,e)+" MB":l(t/1048576,n,e)+" GB":"NaN"}}]),t.module("a8m.math",[]).factory("$math",["$window",function(e){return e.Math}]),t.module("a8m.math.max",["a8m.math"]).filter("max",["$math","$parse",function(e,t){function n(n,i){var r=n.map(function(e){return t(i)(e)});return r.indexOf(e.max.apply(e,r))}return function(t,i){return S(t)?k(i)?e.max.apply(e,t):t[n(t,i)]:t}}]),t.module("a8m.math.min",["a8m.math"]).filter("min",["$math","$parse",function(e,t){function n(n,i){var r=n.map(function(e){return t(i)(e)});return r.indexOf(e.min.apply(e,r))}return function(t,i){return S(t)?k(i)?e.min.apply(e,t):t[n(t,i)]:t}}]),t.module("a8m.math.percent",["a8m.math"]).filter("percent",["$math","$window",function(e,t){return function(n,i,r){var o=A(n)?t.Number(n):n;return i=i||100,r=r||!1,!M(o)||t.isNaN(o)?n:r?e.round(o/i*100):o/i*100}}]),t.module("a8m.math.radians",["a8m.math"]).filter("radians",["$math",function(e){return function(t,n){if(M(n)&&isFinite(n)&&n%1===0&&n>=0&&M(t)&&isFinite(t)){var i=3.14159265359*t/180;return e.round(i*e.pow(10,n))/e.pow(10,n)}return"NaN"}}]),t.module("a8m.math.radix",[]).filter("radix",function(){return function(e,t){var n=/^[2-9]$|^[1-2]\d$|^3[0-6]$/;return M(e)&&n.test(t)?e.toString(t).toUpperCase():e}}),t.module("a8m.math.shortFmt",["a8m.math"]).filter("shortFmt",["$math",function(e){return function(t,n){return M(n)&&isFinite(n)&&n%1===0&&n>=0&&M(t)&&isFinite(t)?1e3>t?t:1e6>t?l(t/1e3,n,e)+" K":1e9>t?l(t/1e6,n,e)+" M":l(t/1e9,n,e)+" B":"NaN"}}]),t.module("a8m.math.sum",[]).filter("sum",function(){return function(e,t){return S(e)?e.reduce(function(e,t){return e+t},t||0):e}}),t.module("a8m.ends-with",[]).filter("endsWith",function(){return function(e,t,n){var i,r=n||!1;return!A(e)||k(t)?e:(e=r?e:e.toLowerCase(),i=e.length-t.length,-1!==e.indexOf(r?t:t.toLowerCase(),i))}}),t.module("a8m.latinize",[]).filter("latinize",[function(){function e(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return n[e]||e})}for(var t=[{base:"A",letters:"A\u24b6\uff21\xc0\xc1\xc2\u1ea6\u1ea4\u1eaa\u1ea8\xc3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\xc4\u01de\u1ea2\xc5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f"},{base:"AA",letters:"\ua732"},{base:"AE",letters:"\xc6\u01fc\u01e2"},{base:"AO",letters:"\ua734"},{base:"AU",letters:"\ua736"},{base:"AV",letters:"\ua738\ua73a"},{base:"AY",letters:"\ua73c"},{base:"B",letters:"B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181"},{base:"C",letters:"C\u24b8\uff23\u0106\u0108\u010a\u010c\xc7\u1e08\u0187\u023b\ua73e"},{base:"D",letters:"D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779"},{base:"DZ",letters:"\u01f1\u01c4"},{base:"Dz",letters:"\u01f2\u01c5"},{base:"E",letters:"E\u24ba\uff25\xc8\xc9\xca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\xcb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e"},{base:"F",letters:"F\u24bb\uff26\u1e1e\u0191\ua77b"},{base:"G",letters:"G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e"},{base:"H",letters:"H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d"},{base:"I",letters:"I\u24be\uff29\xcc\xcd\xce\u0128\u012a\u012c\u0130\xcf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197"},{base:"J",letters:"J\u24bf\uff2a\u0134\u0248"},{base:"K",letters:"K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2"},{base:"L",letters:"L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780"},{base:"LJ",letters:"\u01c7"},{base:"Lj",letters:"\u01c8"},{base:"M",letters:"M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c"},{base:"N",letters:"N\u24c3\uff2e\u01f8\u0143\xd1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4"},{base:"NJ",letters:"\u01ca"},{base:"Nj",letters:"\u01cb"},{base:"O",letters:"O\u24c4\uff2f\xd2\xd3\xd4\u1ed2\u1ed0\u1ed6\u1ed4\xd5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\xd6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\xd8\u01fe\u0186\u019f\ua74a\ua74c"},{base:"OI",letters:"\u01a2"},{base:"OO",letters:"\ua74e"},{base:"OU",letters:"\u0222"},{base:"OE",letters:"\x8c\u0152"},{base:"oe",letters:"\x9c\u0153"},{base:"P",letters:"P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754"},{base:"Q",letters:"Q\u24c6\uff31\ua756\ua758\u024a"},{base:"R",letters:"R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782"},{base:"S",letters:"S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784"},{base:"T",letters:"T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786"},{base:"TZ",letters:"\ua728"},{base:"U",letters:"U\u24ca\uff35\xd9\xda\xdb\u0168\u1e78\u016a\u1e7a\u016c\xdc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244"},{base:"V",letters:"V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245"},{base:"VY",letters:"\ua760"},{base:"W",letters:"W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72"},{base:"X",letters:"X\u24cd\uff38\u1e8a\u1e8c"},{base:"Y",letters:"Y\u24ce\uff39\u1ef2\xdd\u0176\u1ef8\u0232\u1e8e\u0178\u1ef6\u1ef4\u01b3\u024e\u1efe"},{base:"Z",letters:"Z\u24cf\uff3a\u0179\u1e90\u017b\u017d\u1e92\u1e94\u01b5\u0224\u2c7f\u2c6b\ua762"},{base:"a",letters:"a\u24d0\uff41\u1e9a\xe0\xe1\xe2\u1ea7\u1ea5\u1eab\u1ea9\xe3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\xe4\u01df\u1ea3\xe5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250"},{base:"aa",letters:"\ua733"},{base:"ae",letters:"\xe6\u01fd\u01e3"},{base:"ao",letters:"\ua735"},{base:"au",letters:"\ua737"},{base:"av",letters:"\ua739\ua73b"},{base:"ay",letters:"\ua73d"},{base:"b",letters:"b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253"},{base:"c",letters:"c\u24d2\uff43\u0107\u0109\u010b\u010d\xe7\u1e09\u0188\u023c\ua73f\u2184"},{base:"d",letters:"d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a"},{base:"dz",letters:"\u01f3\u01c6"},{base:"e",letters:"e\u24d4\uff45\xe8\xe9\xea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\xeb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd"},{base:"f",letters:"f\u24d5\uff46\u1e1f\u0192\ua77c"},{base:"g",letters:"g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f"},{base:"h",letters:"h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24d8\uff49\xec\xed\xee\u0129\u012b\u012d\xef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131"},{base:"j",letters:"j\u24d9\uff4a\u0135\u01f0\u0249"},{base:"k",letters:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3"},{base:"l",letters:"l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747"},{base:"lj",letters:"\u01c9"},{base:"m",letters:"m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f"},{base:"n",letters:"n\u24dd\uff4e\u01f9\u0144\xf1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5"},{base:"nj",letters:"\u01cc"},{base:"o",letters:"o\u24de\uff4f\xf2\xf3\xf4\u1ed3\u1ed1\u1ed7\u1ed5\xf5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\xf6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\xf8\u01ff\u0254\ua74b\ua74d\u0275"},{base:"oi",letters:"\u01a3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\ua74f"},{base:"p",letters:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755"},{base:"q",letters:"q\u24e0\uff51\u024b\ua757\ua759"},{base:"r",letters:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783"},{base:"s",letters:"s\u24e2\uff53\xdf\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b"},{base:"t",letters:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787"},{base:"tz",letters:"\ua729"},{base:"u",letters:"u\u24e4\uff55\xf9\xfa\xfb\u0169\u1e79\u016b\u1e7b\u016d\xfc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289"},{base:"v",letters:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c"},{
|
86
|
+
base:"vy",letters:"\ua761"},{base:"w",letters:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73"},{base:"x",letters:"x\u24e7\uff58\u1e8b\u1e8d"},{base:"y",letters:"y\u24e8\uff59\u1ef3\xfd\u0177\u1ef9\u0233\u1e8f\xff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff"},{base:"z",letters:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763"}],n={},i=0;i<t.length;i++)for(var r=t[i].letters.split(""),o=0;o<r.length;o++)n[r[o]]=t[i].base;return function(t){return A(t)?e(t):t}}]),t.module("a8m.ltrim",[]).filter("ltrim",function(){return function(e,t){var n=t||"\\s";return A(e)?e.replace(new RegExp("^"+n+"+"),""):e}}),t.module("a8m.match",[]).filter("match",function(){return function(e,t,n){var i=new RegExp(t,n);return A(e)?e.match(i):null}}),t.module("a8m.repeat",[]).filter("repeat",[function(){return function(e,t,n){var i=~~t;return A(e)&&i?w(e,--t,n||""):e}}]),t.module("a8m.rtrim",[]).filter("rtrim",function(){return function(e,t){var n=t||"\\s";return A(e)?e.replace(new RegExp(n+"+$"),""):e}}),t.module("a8m.slugify",[]).filter("slugify",[function(){return function(e,t){var n=k(t)?"-":t;return A(e)?e.toLowerCase().replace(/\s+/g,n):e}}]),t.module("a8m.starts-with",[]).filter("startsWith",function(){return function(e,t,n){var i=n||!1;return!A(e)||k(t)?e:(e=i?e:e.toLowerCase(),!e.indexOf(i?t:t.toLowerCase()))}}),t.module("a8m.stringular",[]).filter("stringular",function(){return function(e){var t=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,n){return k(t[n])?e:t[n]})}}),t.module("a8m.strip-tags",[]).filter("stripTags",function(){return function(e){return A(e)?e.replace(/<\S[^><]*>/g,""):e}}),t.module("a8m.test",[]).filter("test",function(){return function(e,t,n){var i=new RegExp(t,n);return A(e)?i.test(e):e}}),t.module("a8m.trim",[]).filter("trim",function(){return function(e,t){var n=t||"\\s";return A(e)?e.replace(new RegExp("^"+n+"+|"+n+"+$","g"),""):e}}),t.module("a8m.truncate",[]).filter("truncate",function(){return function(e,t,n,i){return t=k(t)?e.length:t,i=i||!1,n=n||"",!A(e)||e.length<=t?e:e.substring(0,i?-1===e.indexOf(" ",t)?e.length:e.indexOf(" ",t):t)+n}}),t.module("a8m.ucfirst",[]).filter("ucfirst",[function(){return function(e){return A(e)?e.split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.substring(1)}).join(" "):e}}]),t.module("a8m.uri-component-encode",[]).filter("uriComponentEncode",["$window",function(e){return function(t){return A(t)?e.encodeURIComponent(t):t}}]),t.module("a8m.uri-encode",[]).filter("uriEncode",["$window",function(e){return function(t){return A(t)?e.encodeURI(t):t}}]),t.module("a8m.wrap",[]).filter("wrap",function(){return function(e,t,n){return A(e)&&$(t)?[t,e,n||t].join(""):e}}),t.module("a8m.filter-watcher",[]).provider("filterWatcher",function(){this.$get=["$window","$rootScope",function(e,n){function i(e,n){return[e,t.toJson(n)].join("#").replace(/"/g,"")}function r(e){var t=e.targetScope.$id;D(d[t],function(e){delete u[e]}),delete d[t]}function o(){h(function(){n.$$phase||(u={})})}function a(e,t){var n=e.$id;return k(d[n])&&(e.$on("$destroy",r),d[n]=[]),d[n].push(t)}function s(e,t){var n=i(e,t);return u[n]}function l(e,t,n,r){var s=i(e,t);return u[s]=r,c(n)?a(n,s):o(),r}var u={},d={},h=e.setTimeout;return{isMemoized:s,memoize:l}}]}),t.module("angular.filter",["a8m.ucfirst","a8m.uri-encode","a8m.uri-component-encode","a8m.slugify","a8m.latinize","a8m.strip-tags","a8m.stringular","a8m.truncate","a8m.starts-with","a8m.ends-with","a8m.wrap","a8m.trim","a8m.ltrim","a8m.rtrim","a8m.repeat","a8m.test","a8m.match","a8m.to-array","a8m.concat","a8m.contains","a8m.unique","a8m.is-empty","a8m.after","a8m.after-where","a8m.before","a8m.before-where","a8m.defaults","a8m.where","a8m.reverse","a8m.remove","a8m.remove-with","a8m.group-by","a8m.count-by","a8m.chunk-by","a8m.search-field","a8m.fuzzy-by","a8m.fuzzy","a8m.omit","a8m.pick","a8m.every","a8m.filter-by","a8m.xor","a8m.map","a8m.first","a8m.last","a8m.flatten","a8m.join","a8m.range","a8m.math","a8m.math.max","a8m.math.min","a8m.math.percent","a8m.math.radix","a8m.math.sum","a8m.math.degrees","a8m.math.radians","a8m.math.byteFmt","a8m.math.kbFmt","a8m.math.shortFmt","a8m.angular","a8m.conditions","a8m.is-null","a8m.filter-watcher"])}(window,window.angular),/*!
|
87
|
+
* angular-hotkeys v1.4.5
|
88
|
+
* https://chieffancypants.github.io/angular-hotkeys
|
89
|
+
* Copyright (c) 2014 Wes Cruver
|
90
|
+
* License: MIT
|
91
|
+
*/
|
92
|
+
function(){"use strict";angular.module("cfp.hotkeys",[]).provider("hotkeys",function(){this.includeCheatSheet=!0,this.templateTitle="Keyboard Shortcuts:",this.template='<div class="cfp-hotkeys-container fade" ng-class="{in: helpVisible}" style="display: none;"><div class="cfp-hotkeys"><h4 class="cfp-hotkeys-title">{{ title }}</h4><table><tbody><tr ng-repeat="hotkey in hotkeys | filter:{ description: \'!$$undefined$$\' }"><td class="cfp-hotkeys-keys"><span ng-repeat="key in hotkey.format() track by $index" class="cfp-hotkeys-key">{{ key }}</span></td><td class="cfp-hotkeys-text">{{ hotkey.description }}</td></tr></tbody></table><div class="cfp-hotkeys-close" ng-click="toggleCheatSheet()">\xd7</div></div></div>',this.cheatSheetHotkey="?",this.cheatSheetDescription="Show / hide this help menu",this.$get=["$rootElement","$rootScope","$compile","$window","$document",function(e,t,n,i,r){function o(e){var t={command:"\u2318",shift:"\u21e7",left:"\u2190",right:"\u2192",up:"\u2191",down:"\u2193","return":"\u21a9",backspace:"\u232b"};e=e.split("+");for(var n=0;n<e.length;n++)"mod"===e[n]&&(i.navigator&&i.navigator.platform.indexOf("Mac")>=0?e[n]="command":e[n]="ctrl"),e[n]=t[e[n]]||e[n];return e.join(" + ")}function a(e,t,n,i,r,o){this.combo=e instanceof Array?e:[e],this.description=t,this.callback=n,this.action=i,this.allowIn=r,this.persistent=o}function s(){for(var e=f.hotkeys.length;e--;){var t=f.hotkeys[e];t&&!t.persistent&&c(t)}}function l(){f.helpVisible=!f.helpVisible,f.helpVisible?(_=d("esc"),c("esc"),u("esc",_.description,l)):(c("esc"),_!==!1&&u(_))}function u(e,t,n,i,r,o){var s,l=["INPUT","SELECT","TEXTAREA"],u=Object.prototype.toString.call(e);if("[object Object]"===u&&(t=e.description,n=e.callback,i=e.action,o=e.persistent,r=e.allowIn,e=e.combo),t instanceof Function?(i=n,n=t,t="$$undefined$$"):angular.isUndefined(t)&&(t="$$undefined$$"),void 0===o&&(o=!0),"function"==typeof n){s=n,r instanceof Array||(r=[]);for(var c,d=0;d<r.length;d++)r[d]=r[d].toUpperCase(),c=l.indexOf(r[d]),-1!==c&&l.splice(c,1);n=function(e){var t=!0,n=e.target||e.srcElement,i=n.nodeName.toUpperCase();if((" "+n.className+" ").indexOf(" mousetrap ")>-1)t=!0;else for(var r=0;r<l.length;r++)if(l[r]===i){t=!1;break}t&&p(s.apply(this,arguments))}}"string"==typeof i?Mousetrap.bind(e,p(n),i):Mousetrap.bind(e,p(n));var h=new a(e,t,n,i,r,o);return f.hotkeys.push(h),h}function c(e){var t=e instanceof a?e.combo:e;if(Mousetrap.unbind(t),angular.isArray(t)){for(var n=!0,i=t.length;i--;)n=c(t[i])&&n;return n}var r=f.hotkeys.indexOf(d(t));return r>-1?(f.hotkeys[r].combo.length>1?f.hotkeys[r].combo.splice(f.hotkeys[r].combo.indexOf(t),1):f.hotkeys.splice(r,1),!0):!1}function d(e){for(var t,n=0;n<f.hotkeys.length;n++)if(t=f.hotkeys[n],t.combo.indexOf(e)>-1)return t;return!1}function h(e){return e.$id in m||(m[e.$id]=[],e.$on("$destroy",function(){for(var t=m[e.$id].length;t--;)c(m[e.$id][t]),delete m[e.$id][t]})),{add:function(t){var n;return n=arguments.length>1?u.apply(this,arguments):u(t),m[e.$id].push(n),this}}}function p(e){return function(n,i){if(e instanceof Array){var r=e[0],o=e[1];e=function(e){o.scope.$eval(r)}}t.$apply(function(){e(n,d(i))})}}Mousetrap.stopCallback=function(e,t){return(" "+t.className+" ").indexOf(" mousetrap ")>-1?!1:t.contentEditable&&"true"==t.contentEditable},a.prototype.format=function(){for(var e=this.combo[0],t=e.split(/[\s]/),n=0;n<t.length;n++)t[n]=o(t[n]);return t};var f=t.$new();f.hotkeys=[],f.helpVisible=!1,f.title=this.templateTitle,f.toggleCheatSheet=l;var m=[];if(t.$on("$routeChangeSuccess",function(e,t){s(),t&&t.hotkeys&&angular.forEach(t.hotkeys,function(e){var n=e[2];("string"==typeof n||n instanceof String)&&(e[2]=[n,t]),e[5]=!1,u.apply(this,e)})}),this.includeCheatSheet){var g=r[0],v=e[0],y=angular.element(this.template);u(this.cheatSheetHotkey,this.cheatSheetDescription,l),(v===g||v===g.documentElement)&&(v=g.body),angular.element(v).append(n(y)(f))}var _=!1,b={add:u,del:c,get:d,bindTo:h,template:this.template,toggleCheatSheet:l,includeCheatSheet:this.includeCheatSheet,cheatSheetHotkey:this.cheatSheetHotkey,cheatSheetDescription:this.cheatSheetDescription,purgeHotkeys:s,templateTitle:this.templateTitle};return b}]}).directive("hotkey",["hotkeys",function(e){return{restrict:"A",link:function(t,n,i){var r,o;angular.forEach(t.$eval(i.hotkey),function(t,n){o="string"==typeof i.hotkeyAllowIn?i.hotkeyAllowIn.split(/[\s,]+/):[],r=n,e.add({combo:n,description:i.hotkeyDescription,callback:t,action:i.hotkeyAction,allowIn:o})}),n.bind("$destroy",function(){e.del(r)})}}}]).run(["hotkeys",function(e){}])}(),/**
|
93
|
+
* Copyright 2013 Craig Campbell
|
94
|
+
*
|
95
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
96
|
+
* you may not use this file except in compliance with the License.
|
97
|
+
* You may obtain a copy of the License at
|
98
|
+
*
|
99
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
100
|
+
*
|
101
|
+
* Unless required by applicable law or agreed to in writing, software
|
102
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
103
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
104
|
+
* See the License for the specific language governing permissions and
|
105
|
+
* limitations under the License.
|
106
|
+
*
|
107
|
+
* Mousetrap is a simple keyboard shortcut library for Javascript with
|
108
|
+
* no external dependencies
|
109
|
+
*
|
110
|
+
* @version 1.4.6
|
111
|
+
* @url craig.is/killing/mice
|
112
|
+
*/
|
113
|
+
function(e,t,n){function i(e,t,n){return e.addEventListener?void e.addEventListener(t,n,!1):void e.attachEvent("on"+t,n)}function r(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return C[e.which]?C[e.which]:A[e.which]?A[e.which]:String.fromCharCode(e.which).toLowerCase()}function o(e,t){return e.sort().join(",")===t.sort().join(",")}function a(e){e=e||{};var t,n=!1;for(t in E)e[t]?n=!0:E[t]=0;n||(O=!1)}function s(e,t,n,i,r,a){var s,l,u=[],c=n.type;if(!S[e])return[];for("keyup"==c&&f(e)&&(t=[e]),s=0;s<S[e].length;++s)if(l=S[e][s],(i||!l.seq||E[l.seq]==l.level)&&c==l.action&&("keypress"==c&&!n.metaKey&&!n.ctrlKey||o(t,l.modifiers))){var d=!i&&l.combo==r,h=i&&l.seq==i&&l.level==a;(d||h)&&S[e].splice(s,1),u.push(l)}return u}function l(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}function u(e){return e.preventDefault?void e.preventDefault():void(e.returnValue=!1)}function c(e){return e.stopPropagation?void e.stopPropagation():void(e.cancelBubble=!0)}function d(e,t,n,i){B.stopCallback(t,t.target||t.srcElement,n,i)||e(t,n)===!1&&(u(t),c(t))}function h(e,t,n){var i,r=s(e,t,n),o={},l=0,u=!1;for(i=0;i<r.length;++i)r[i].seq&&(l=Math.max(l,r[i].level));for(i=0;i<r.length;++i)if(r[i].seq){if(r[i].level!=l)continue;u=!0,o[r[i].seq]=1,d(r[i].callback,n,r[i].combo,r[i].seq)}else u||d(r[i].callback,n,r[i].combo);var c="keypress"==n.type&&F;n.type!=O||f(e)||c||a(o),F=u&&"keydown"==n.type}function p(e){"number"!=typeof e.which&&(e.which=e.keyCode);var t=r(e);if(t)return"keyup"==e.type&&L===t?void(L=!1):void B.handleKey(t,l(e),e)}function f(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function m(){clearTimeout(k),k=setTimeout(a,1e3)}function g(){if(!$){$={};for(var e in C)e>95&&112>e||C.hasOwnProperty(e)&&($[C[e]]=e)}return $}function v(e,t,n){return n||(n=g()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function y(e,t,n,i){function o(t){return function(){O=t,++E[e],m()}}function s(t){d(n,t,e),"keyup"!==i&&(L=r(t)),setTimeout(a,10)}E[e]=0;for(var l=0;l<t.length;++l){var u=l+1===t.length,c=u?s:o(i||b(t[l+1]).action);x(t[l],c,i,e,l)}}function _(e){return"+"===e?["+"]:e.split("+")}function b(e,t){var n,i,r,o=[];for(n=_(e),r=0;r<n.length;++r)i=n[r],T[i]&&(i=T[i]),t&&"keypress"!=t&&M[i]&&(i=M[i],o.push("shift")),f(i)&&o.push(i);return t=v(i,o,t),{key:i,modifiers:o,action:t}}function x(e,t,n,i,r){D[e+":"+n]=t,e=e.replace(/\s+/g," ");var o,a=e.split(" ");return a.length>1?void y(e,a,t,n):(o=b(e,n),S[o.key]=S[o.key]||[],s(o.key,o.modifiers,{type:o.action},i,e,r),void S[o.key][i?"unshift":"push"]({callback:t,modifiers:o.modifiers,action:o.action,seq:i,level:r,combo:e}))}function w(e,t,n){for(var i=0;i<e.length;++i)x(e[i],t,n)}for(var $,k,C={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},A={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},M={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},T={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},S={},D={},E={},L=!1,F=!1,O=!1,R=1;20>R;++R)C[111+R]="f"+R;for(R=0;9>=R;++R)C[R+96]=R;i(t,"keypress",p),i(t,"keydown",p),i(t,"keyup",p);var B={bind:function(e,t,n){return e=e instanceof Array?e:[e],w(e,t,n),this},unbind:function(e,t){return B.bind(e,function(){},t)},trigger:function(e,t){return D[e+":"+t]&&D[e+":"+t]({},e),this},reset:function(){return S={},D={},this},stopCallback:function(e,t){return(" "+t.className+" ").indexOf(" mousetrap ")>-1?!1:"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},handleKey:h};e.Mousetrap=B,"function"==typeof define&&define.amd&&define(B)}(window,document),angular.module("selectionModel",[]),/**
|
114
|
+
* Selection Model Ignore
|
115
|
+
*
|
116
|
+
* For clickable elements that don't directly interact with `selectionModel`.
|
117
|
+
*
|
118
|
+
* Useful for when you want to manually change the selection, or for things like
|
119
|
+
* "delete" buttons that belong under `ngRepeat` but shouldn't select an item
|
120
|
+
* when clicked.
|
121
|
+
*
|
122
|
+
* @package selectionModel
|
123
|
+
* @copyright 2014 Justin Russell, released under the MIT license
|
124
|
+
*/
|
125
|
+
angular.module("selectionModel").directive("selectionModelIgnore",[function(){"use strict";return{restrict:"A",link:function(e,t,n){t.on("click",function(e){e.selectionModelIgnore=!0,e.originalEvent&&(e.originalEvent.selectionModelIgnore=!0)})}}}]),/**
|
126
|
+
* Selection Model - a selection aware companion for ngRepeat
|
127
|
+
*
|
128
|
+
* @package selectionModel
|
129
|
+
* @copyright 2014 Justin Russell, released under the MIT license
|
130
|
+
*/
|
131
|
+
angular.module("selectionModel").directive("selectionModel",["selectionStack","uuidGen","selectionModelOptions",function(e,t,n){"use strict";return{restrict:"A",link:function(i,r,o){var a=n.get(),s=a.selectedAttribute,l=a.selectedClass,u=a.type,c=a.mode,d=a.cleanupStrategy,h=o.selectionModelType||u,p=o.selectionModelMode||c,f=/^multi(ple)?(-additive)?$/.test(p),m=/^multi(ple)?-additive/.test(p),g=o.selectionModelSelectedAttribute||s,v=o.selectionModelSelectedClass||l,y=o.selectionModelCleanupStrategy||d,_=o.selectionModelOnChange,b=o.ngRepeat;if(!b)throw"selectionModel must be used along side ngRepeat";var x=i.$eval(o.selectionModelSelectedItems),w=function(){if(!f)return null;var e="data-selection-model-stack-id",n=r.attr(e);return n?n:(n=r.parent().attr(e))?(r.attr(e,n),n):(n=t.create(),r.attr(e,n),r.parent().attr(e,n),n)}(),$=b.split(" in "),k=i.$eval($[0]),C=function(){if(k[g]?r.addClass(v):r.removeClass(v),"checkbox"===h){var e=r.find("input");e.prop("checked",k[g])}},A=function(){return i.$eval($[1])},M=function(){return i.$eval($[1].split(/[|=]/)[0])},T=function(e){var t,n=angular.isArray(x),i=angular.isArray(e)&&2===e.length,r=M(),o=0,a=!1;n&&(x.length=0),angular.forEach(r,function(r){i?(t=e.indexOf(r),t>-1?(o++,a=!1,e.splice(t,1)):a=1!==o):a=r!==e,a?r[g]=!1:n&&r[g]&&x.push(r)})},S=function(e){var t=(A(),!1),n=!1;e=e||k,angular.forEach(A(),function(i){n=n||i===k,t=t||i===e;var r=t+n===1;(r||i===k||i===e)&&(i[g]=!0)})},D=function(t){if(!(t.selectionModelIgnore||t.originalEvent&&t.originalEvent.selectionModelIgnore||t.selectionModelClickHandled||t.originalEvent&&t.originalEvent.selectionModelClickHandled)){t.selectionModelClickHandled=!0,t.originalEvent&&(t.originalEvent.selectionModelClickHandled=!0);var n=t.ctrlKey||t.metaKey||m,o=t.shiftKey,a=t.target||t.srcElement,s="checkbox"===h&&"INPUT"===a.tagName&&"checkbox"===a.type;if("LABEL"===a.tagName){var l=angular.element(a).attr("for");if(l){var u,c=r[0].getElementsByTagName("INPUT");for(u=c.length;u--;)if(c[u].id===l)return}else if(a.getElementsByTagName("INPUT").length)return}if(o&&f&&!s)return n||i.$apply(function(){T([k,e.peek(w)])}),S(e.peek(w)),void i.$apply();if(n||o||s){var d=!k[g];return f||T(k),k[g]=d,k[g]&&e.push(w,k),void i.$apply()}T(k),i.$apply(),k[g]=!0,e.push(w,k),i.$apply()}},E=function(){if(angular.isArray(x)){var e=x.indexOf(k);k[g]?-1===e&&x.push(k):e>-1&&x.splice(e,1)}};if(r.on("click",D),"checkbox"===h){var L=r.find("input");L[0]&&"checkbox"===L[0].type&&r.find("input").on("click",D)}C(),E(),"deselect"===y&&i.$on("$destroy",function(){var e=k[g];k[g]=!1,E(),_&&e&&i.$eval(_)}),i.$watch($[0]+"."+g,function(e,t){e!==t&&(f||!e||t||(T(k),k[g]=!0),C(),E(),_&&i.$eval(_))})}}}]),angular.module("selectionModel").provider("selectionModelOptions",[function(){"use strict";var e={selectedAttribute:"selected",selectedClass:"selected",type:"basic",mode:"single",cleanupStrategy:"none"};this.set=function(t){angular.extend(e,t)},this.$get=function(){var t={get:function(){return angular.copy(e)}};return t}}]),angular.module("selectionModel").service("selectionStack",function(){"use strict";var e={},t=1e3,n={};return e.push=function(e,i){n.hasOwnProperty(e)||(n[e]=[]);var r=n[e];for(r.push(i);r.length>t;)r.shift();return r.length},e.pop=function(e){n.hasOwnProperty(e)||(n[e]=[]);var t=n[e];return t.pop()},e.peek=function(e){n.hasOwnProperty(e)||(n[e]=[]);var t=n[e];return t.length?t[t.length-1]:void 0},e}),angular.module("selectionModel").service("uuidGen",function(){"use strict";var e={},t=["0","0","0"];return e.create=function(){for(var e,n=t.length;n;){if(n--,e=t[n].charCodeAt(0),57===e)return t[n]="A",t.join("");if(90!==e)return t[n]=String.fromCharCode(e+1),t.join("");t[n]="0"}return t.unshift("0"),t.join("")},e}),function(e){function t(e){function t(t,n){function i(t){e[t?"addClass":"removeClass"](n,"treasure-overlay-spinner-active")}t.$watch("active",i)}return{templateUrl:r,scope:{active:"="},transclude:!0,restrict:"E",link:t}}function n(e){e.put(r,o)}var i=e.angular,r="/template/treasure-overlay-spinner/treasure-overlay-spinner.html",o="";o+='<div class="treasure-overlay-spinner-content">',o+='<div class="treasure-overlay-spinner-container">',o+='<div class="treasure-overlay-spinner"></div>',o+="</div>",o+="<ng-transclude></ng-transclude>",o+="</div>",i.module("treasure-overlay-spinner",["ngAnimate"]),i.module("treasure-overlay-spinner").directive("treasureOverlaySpinner",t),t.$inject=["$animate"],i.module("treasure-overlay-spinner").run(n),n.$inject=["$templateCache"]}.call(this,window),angular.module("ui.ace",[]).constant("uiAceConfig",{}).directive("uiAce",["uiAceConfig",function(e){if(angular.isUndefined(window.ace))throw new Error("ui-ace need ace to work... (o rly?)");var t=function(e,t,n){if(angular.isDefined(n.require)&&n.require.forEach(function(e){window.ace.require(e)}),angular.isDefined(n.showGutter)&&e.renderer.setShowGutter(n.showGutter),angular.isDefined(n.useWrapMode)&&t.setUseWrapMode(n.useWrapMode),angular.isDefined(n.showInvisibles)&&e.renderer.setShowInvisibles(n.showInvisibles),angular.isDefined(n.showIndentGuides)&&e.renderer.setDisplayIndentGuides(n.showIndentGuides),angular.isDefined(n.useSoftTabs)&&t.setUseSoftTabs(n.useSoftTabs),angular.isDefined(n.disableSearch)&&n.disableSearch&&e.commands.addCommands([{name:"unfind",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(){return!1},readOnly:!0}]),angular.isFunction(n.onLoad)&&n.onLoad(e),angular.isString(n.theme)&&e.setTheme("ace/theme/"+n.theme),angular.isString(n.mode)&&t.setMode("ace/mode/"+n.mode),angular.isDefined(n.firstLineNumber)&&(angular.isNumber(n.firstLineNumber)?t.setOption("firstLineNumber",n.firstLineNumber):angular.isFunction(n.firstLineNumber)&&t.setOption("firstLineNumber",n.firstLineNumber())),angular.isDefined(n.advanced))for(var i in n.advanced){var r={name:i,value:n.advanced[i]};e.setOption(r.name,r.value)}};return{restrict:"EA",require:"?ngModel",link:function(n,i,r,o){var a,s,l=e.ace||{},u=angular.extend({},l,n.$eval(r.uiAce)),c=window.ace.edit(i[0]),d=c.getSession(),h=function(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);angular.isDefined(e)&&n.$apply(function(){if(!angular.isFunction(e))throw new Error("ui-ace use a function as callback.");e(t)})},p={onChange:function(e){return function(t){var i=d.getValue();i===n.$eval(r.value)||n.$$phase||n.$root.$$phase||(angular.isDefined(o)&&n.$apply(function(){o.$setViewValue(i)}),h(e,t,c))}},onBlur:function(e){return function(){h(e,c)}}};r.$observe("readonly",function(e){c.setReadOnly("true"===e)}),angular.isDefined(o)&&(o.$formatters.push(function(e){if(angular.isUndefined(e)||null===e)return"";if(angular.isObject(e)||angular.isArray(e))throw new Error("ui-ace cannot use an object or an array as a model");return e}),o.$render=function(){d.setValue(o.$viewValue)}),t(c,d,u),n.$watch(r.uiAce,function(e,i){e!==i&&(u=angular.extend({},l,n.$eval(r.uiAce)),d.removeListener("change",a),a=p.onChange(u.onChange),d.on("change",a),c.removeListener("blur",s),s=p.onBlur(u.onBlur),c.on("blur",s),t(c,d,u))},!0),a=p.onChange(u.onChange),d.on("change",a),s=p.onBlur(u.onBlur),c.on("blur",s),i.on("$destroy",function(){c.session.$stopWorker(),c.destroy()}),n.$watch(function(){return[i[0].offsetWidth,i[0].offsetHeight]},function(){c.resize(),c.renderer.updateFull()},!0)}}}]),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-popup.html","template/tooltip/tooltip-popup.html","template/tooltip/tooltip-template-popup.html","template/popover/popover-html.html","template/popover/popover-template.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$injector",function(e,t){var n=t.has("$animateCss")?t.get("$animateCss"):null;return{link:function(t,i,r){function o(){i.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),n?n(i,{addClass:"in",easing:"ease",to:{height:i[0].scrollHeight+"px"}}).start()["finally"](a):e.addClass(i,"in",{to:{height:i[0].scrollHeight+"px"}}).then(a)}function a(){i.removeClass("collapsing").addClass("collapse").css({height:"auto"})}function s(){return i.hasClass("collapse")||i.hasClass("in")?(i.css({height:i[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void(n?n(i,{removeClass:"in",to:{height:"0"}}).start()["finally"](l):e.removeClass(i,"in",{to:{height:"0"}}).then(l))):l()}function l(){i.css({height:"0"}),i.removeClass("collapsing").addClass("collapse")}t.$watch(r.uibCollapse,function(e){e?s():o()})}}}]),angular.module("ui.bootstrap.collapse").value("$collapseSuppressWarning",!1).directive("collapse",["$animate","$injector","$log","$collapseSuppressWarning",function(e,t,n,i){var r=t.has("$animateCss")?t.get("$animateCss"):null;return{link:function(t,o,a){function s(){o.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),r?r(o,{easing:"ease",to:{height:o[0].scrollHeight+"px"}}).start().done(l):e.animate(o,{},{height:o[0].scrollHeight+"px"}).then(l)}function l(){o.removeClass("collapsing").addClass("collapse in").css({height:"auto"})}function u(){return o.hasClass("collapse")||o.hasClass("in")?(o.css({height:o[0].scrollHeight+"px"}).removeClass("collapse in").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void(r?r(o,{to:{height:"0"}}).start().done(c):e.animate(o,{},{height:"0"}).then(c))):c()}function c(){o.css({height:"0"}),o.removeClass("collapsing").addClass("collapse")}i||n.warn("collapse is now deprecated. Use uib-collapse instead."),t.$watch(a.collapse,function(e){e?u():s()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(e,t,n){this.groups=[],this.closeOthers=function(i){var r=angular.isDefined(t.closeOthers)?e.$eval(t.closeOthers):n.closeOthers;r&&angular.forEach(this.groups,function(e){e!==i&&(e.isOpen=!1)})},this.addGroup=function(e){var t=this;this.groups.push(e),e.$on("$destroy",function(n){t.removeGroup(e)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(t,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(e,t){return t.templateUrl||"template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(e,t,n,i){i.addGroup(e),e.openClass=n.openClass||"panel-open",e.panelClass=n.panelClass,e.$watch("isOpen",function(n){t.toggleClass(e.openClass,!!n),n&&i.closeOthers(e)}),e.toggleOpen=function(t){e.isDisabled||t&&32!==t.which||(e.isOpen=!e.isOpen)}}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(e,t,n,i,r){i.setHeading(r(e,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:["?^uibAccordionGroup","?^accordionGroup"],link:function(e,t,n,i){i=i[0]?i[0]:i[1],e.$watch(function(){return i[n.uibAccordionTransclude]},function(e){e&&(t.find("span").html(""),t.find("span").append(e))})}}}),angular.module("ui.bootstrap.accordion").value("$accordionSuppressWarning",!1).controller("AccordionController",["$scope","$attrs","$controller","$log","$accordionSuppressWarning",function(e,t,n,i,r){r||i.warn("AccordionController is now deprecated. Use UibAccordionController instead."),angular.extend(this,n("UibAccordionController",{$scope:e,$attrs:t}))}]).directive("accordion",["$log","$accordionSuppressWarning",function(e,t){return{restrict:"EA",controller:"AccordionController",controllerAs:"accordion",transclude:!0,replace:!1,templateUrl:function(e,t){return t.templateUrl||"template/accordion/accordion.html"},link:function(){t||e.warn("accordion is now deprecated. Use uib-accordion instead.")}}}]).directive("accordionGroup",["$log","$accordionSuppressWarning",function(e,t){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:function(e,t){return t.templateUrl||"template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(n,i,r,o){t||e.warn("accordion-group is now deprecated. Use uib-accordion-group instead."),o.addGroup(n),n.openClass=r.openClass||"panel-open",n.panelClass=r.panelClass,n.$watch("isOpen",function(e){i.toggleClass(n.openClass,!!e),e&&o.closeOthers(n)}),n.toggleOpen=function(e){n.isDisabled||e&&32!==e.which||(n.isOpen=!n.isOpen)}}}}]).directive("accordionHeading",["$log","$accordionSuppressWarning",function(e,t){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(n,i,r,o,a){t||e.warn("accordion-heading is now deprecated. Use uib-accordion-heading instead."),o.setHeading(a(n,angular.noop))}}}]).directive("accordionTransclude",["$log","$accordionSuppressWarning",function(e,t){return{require:"^accordionGroup",link:function(n,i,r,o){t||e.warn("accordion-transclude is now deprecated. Use uib-accordion-transclude instead."),n.$watch(function(){return o[r.accordionTransclude]},function(e){e&&(i.find("span").html(""),i.find("span").append(e))})}}}]),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(e,t,n,i){e.closeable=!!t.close;var r=angular.isDefined(t.dismissOnTimeout)?n(t.dismissOnTimeout)(e.$parent):null;r&&i(function(){e.close()},parseInt(r,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(e,t){return t.templateUrl||"template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.alert").value("$alertSuppressWarning",!1).controller("AlertController",["$scope","$attrs","$controller","$log","$alertSuppressWarning",function(e,t,n,i,r){r||i.warn("AlertController is now deprecated. Use UibAlertController instead."),angular.extend(this,n("UibAlertController",{$scope:e,$attrs:t}))}]).directive("alert",["$log","$alertSuppressWarning",function(e,t){return{controller:"AlertController",controllerAs:"alert",templateUrl:function(e,t){return t.templateUrl||"template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"},link:function(){t||e.warn("alert is now deprecated. Use uib-alert instead.")}}}]),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(e){this.activeClass=e.activeClass||"active",this.toggleEvent=e.toggleEvent||"click"}]).directive("uibBtnRadio",function(){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(e,t,n,i){var r=i[0],o=i[1];t.find("input").css({display:"none"}),o.$render=function(){t.toggleClass(r.activeClass,angular.equals(o.$modelValue,e.$eval(n.uibBtnRadio)))},t.on(r.toggleEvent,function(){if(!n.disabled){var i=t.hasClass(r.activeClass);(!i||angular.isDefined(n.uncheckable))&&e.$apply(function(){o.$setViewValue(i?null:e.$eval(n.uibBtnRadio)),o.$render()})}})}}}).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(e,t,n,i){function r(){return a(n.btnCheckboxTrue,!0)}function o(){return a(n.btnCheckboxFalse,!1)}function a(t,n){return angular.isDefined(t)?e.$eval(t):n}var s=i[0],l=i[1];t.find("input").css({display:"none"}),l.$render=function(){t.toggleClass(s.activeClass,angular.equals(l.$modelValue,r()))},t.on(s.toggleEvent,function(){n.disabled||e.$apply(function(){l.$setViewValue(t.hasClass(s.activeClass)?o():r()),l.$render()})})}}}),angular.module("ui.bootstrap.buttons").value("$buttonsSuppressWarning",!1).controller("ButtonsController",["$controller","$log","$buttonsSuppressWarning",function(e,t,n){n||t.warn("ButtonsController is now deprecated. Use UibButtonsController instead."),angular.extend(this,e("UibButtonsController"))}]).directive("btnRadio",["$log","$buttonsSuppressWarning",function(e,t){return{require:["btnRadio","ngModel"],controller:"ButtonsController",controllerAs:"buttons",link:function(n,i,r,o){t||e.warn("btn-radio is now deprecated. Use uib-btn-radio instead.");var a=o[0],s=o[1];i.find("input").css({display:"none"}),s.$render=function(){i.toggleClass(a.activeClass,angular.equals(s.$modelValue,n.$eval(r.btnRadio)))},i.bind(a.toggleEvent,function(){if(!r.disabled){var e=i.hasClass(a.activeClass);(!e||angular.isDefined(r.uncheckable))&&n.$apply(function(){s.$setViewValue(e?null:n.$eval(r.btnRadio)),s.$render()})}})}}}]).directive("btnCheckbox",["$document","$log","$buttonsSuppressWarning",function(e,t,n){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",controllerAs:"button",link:function(i,r,o,a){function s(){return u(o.btnCheckboxTrue,!0)}function l(){return u(o.btnCheckboxFalse,!1)}function u(e,t){var n=i.$eval(e);return angular.isDefined(n)?n:t}n||t.warn("btn-checkbox is now deprecated. Use uib-btn-checkbox instead.");var c=a[0],d=a[1];r.find("input").css({display:"none"}),d.$render=function(){r.toggleClass(c.activeClass,angular.equals(d.$modelValue,s()))},r.bind(c.toggleEvent,function(){o.disabled||i.$apply(function(){d.$setViewValue(r.hasClass(c.activeClass)?l():s()),d.$render()})}),r.on("keypress",function(t){o.disabled||32!==t.which||e[0].activeElement!==r[0]||i.$apply(function(){d.$setViewValue(r.hasClass(c.activeClass)?l():s()),d.$render()})})}}}]),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$animate",function(e,t,n,i){function r(t,n,r){y||(angular.extend(t,{direction:r,active:!0}),angular.extend(h.currentSlide||{},{direction:r,active:!1}),i.enabled()&&!e.noTransition&&!e.$currentTransition&&t.$element&&h.slides.length>1&&(t.$element.data(g,t.direction),h.currentSlide&&h.currentSlide.$element&&h.currentSlide.$element.data(g,t.direction),e.$currentTransition=!0,f?i.on("addClass",t.$element,function(t,n){"close"===n&&(e.$currentTransition=null,i.off("addClass",t))}):t.$element.one("$animate:close",function(){e.$currentTransition=null})),h.currentSlide=t,v=n,a())}function o(e){if(angular.isUndefined(p[e].index))return p[e];var t;p.length;for(t=0;t<p.length;++t)if(p[t].index==e)return p[t]}function a(){s();var t=+e.interval;!isNaN(t)&&t>0&&(c=n(l,t))}function s(){c&&(n.cancel(c),c=null)}function l(){var t=+e.interval;d&&!isNaN(t)&&t>0&&p.length?e.next():e.pause()}function u(t){t.length||(e.$currentTransition=null)}var c,d,h=this,p=h.slides=e.slides=[],f=angular.version.minor>=4,m="uib-noTransition",g="uib-slideDirection",v=-1;h.currentSlide=null;var y=!1;h.select=e.select=function(t,n){var i=e.indexOfSlide(t);void 0===n&&(n=i>h.getCurrentIndex()?"next":"prev"),t&&t!==h.currentSlide&&!e.$currentTransition&&r(t,i,n)},e.$on("$destroy",function(){y=!0}),h.getCurrentIndex=function(){return h.currentSlide&&angular.isDefined(h.currentSlide.index)?+h.currentSlide.index:v},e.indexOfSlide=function(e){return angular.isDefined(e.index)?+e.index:p.indexOf(e)},e.next=function(){var t=(h.getCurrentIndex()+1)%p.length;return 0===t&&e.noWrap()?void e.pause():h.select(o(t),"next")},e.prev=function(){var t=h.getCurrentIndex()-1<0?p.length-1:h.getCurrentIndex()-1;return e.noWrap()&&t===p.length-1?void e.pause():h.select(o(t),"prev")},e.isActive=function(e){return h.currentSlide===e},e.$watch("interval",a),e.$watchCollection("slides",u),e.$on("$destroy",s),e.play=function(){d||(d=!0,a())},e.pause=function(){e.noPause||(d=!1,s())},h.addSlide=function(t,n){t.$element=n,p.push(t),1===p.length||t.active?(h.select(p[p.length-1]),1===p.length&&e.play()):t.active=!1},h.removeSlide=function(e){angular.isDefined(e.index)&&p.sort(function(e,t){return+e.index>+t.index});var t=p.indexOf(e);p.splice(t,1),p.length>0&&e.active?t>=p.length?h.select(p[t-1]):h.select(p[t]):v>t&&v--,0===p.length&&(h.currentSlide=null)},e.$watch("noTransition",function(e){t.data(m,e)})}]).directive("uibCarousel",[function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",require:"carousel",templateUrl:function(e,t){return t.templateUrl||"template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}]).directive("uibSlide",function(){return{require:"^uibCarousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:function(e,t){return t.templateUrl||"template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(e,t,n,i){i.addSlide(e,t),e.$on("$destroy",function(){i.removeSlide(e)}),e.$watch("active",function(t){t&&i.select(e)})}}}).animation(".item",["$injector","$animate",function(e,t){function n(e,t,n){e.removeClass(t),n&&n()}var i="uib-noTransition",r="uib-slideDirection",o=null;return e.has("$animateCss")&&(o=e.get("$animateCss")),{beforeAddClass:function(e,a,s){if("active"==a&&e.parent()&&e.parent().parent()&&!e.parent().parent().data(i)){var l=!1,u=e.data(r),c="next"==u?"left":"right",d=n.bind(this,e,c+" "+u,s);return e.addClass(u),o?o(e,{addClass:c}).start().done(d):t.addClass(e,c).then(function(){l||d(),s()}),function(){l=!0}}s()},beforeRemoveClass:function(e,a,s){if("active"===a&&e.parent()&&e.parent().parent()&&!e.parent().parent().data(i)){var l=!1,u=e.data(r),c="next"==u?"left":"right",d=n.bind(this,e,c,s);return o?o(e,{addClass:c}).start().done(d):t.addClass(e,c).then(function(){l||d(),s()}),function(){l=!0}}s()}}}]),angular.module("ui.bootstrap.carousel").value("$carouselSuppressWarning",!1).controller("CarouselController",["$scope","$element","$controller","$log","$carouselSuppressWarning",function(e,t,n,i,r){r||i.warn("CarouselController is now deprecated. Use UibCarouselController instead."),angular.extend(this,n("UibCarouselController",{$scope:e,$element:t}))}]).directive("carousel",["$log","$carouselSuppressWarning",function(e,t){return{transclude:!0,replace:!0,controller:"CarouselController",controllerAs:"carousel",require:"carousel",templateUrl:function(e,t){return t.templateUrl||"template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"},link:function(){t||e.warn("carousel is now deprecated. Use uib-carousel instead.")}}}]).directive("slide",["$log","$carouselSuppressWarning",function(e,t){return{require:"^carousel",transclude:!0,replace:!0,templateUrl:function(e,t){return t.templateUrl||"template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(n,i,r,o){t||e.warn("slide is now deprecated. Use uib-slide instead."),o.addSlide(n,i),n.$on("$destroy",function(){o.removeSlide(n)}),n.$watch("active",function(e){e&&o.select(n)})}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","orderByFilter",function(e,t,n){function i(e){var t=[],i=e.split("");return angular.forEach(a,function(n,r){var o=e.indexOf(r);if(o>-1){e=e.split(""),i[o]="("+n.regex+")",e[o]="$";for(var a=o+1,s=o+r.length;s>a;a++)i[a]="",e[a]="$";e=e.join(""),t.push({index:o,apply:n.apply})}}),{regex:new RegExp("^"+i.join("")+"$"),map:n(t,"index")}}function r(e,t,n){return 1>n?!1:1===t&&n>28?29===n&&(e%4===0&&e%100!==0||e%400===0):3===t||5===t||8===t||10===t?31>n:!0}var o,a,s=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){o=t.id,this.parsers={},a={yyyy:{regex:"\\d{4}",apply:function(e){this.year=+e}},yy:{regex:"\\d{2}",apply:function(e){this.year=+e+2e3}},y:{regex:"\\d{1,4}",apply:function(e){this.year=+e}},MMMM:{regex:t.DATETIME_FORMATS.MONTH.join("|"),apply:function(e){this.month=t.DATETIME_FORMATS.MONTH.indexOf(e)}},MMM:{regex:t.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(e){this.month=t.DATETIME_FORMATS.SHORTMONTH.indexOf(e)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(e){this.month=e-1}},M:{regex:"[1-9]|1[0-2]",apply:function(e){this.month=e-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},EEEE:{regex:t.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:t.DATETIME_FORMATS.SHORTDAY.join("|")},HH:{regex:"(?:0|1)[0-9]|2[0-3]",apply:function(e){this.hours=+e}},hh:{regex:"0[0-9]|1[0-2]",apply:function(e){this.hours=+e}},H:{regex:"1?[0-9]|2[0-3]",apply:function(e){this.hours=+e}},h:{regex:"[0-9]|1[0-2]",apply:function(e){this.hours=+e}},mm:{regex:"[0-5][0-9]",apply:function(e){this.minutes=+e}},m:{regex:"[0-9]|[1-5][0-9]",apply:function(e){this.minutes=+e}},sss:{regex:"[0-9][0-9][0-9]",apply:function(e){this.milliseconds=+e}},ss:{regex:"[0-5][0-9]",apply:function(e){this.seconds=+e}},s:{regex:"[0-9]|[1-5][0-9]",apply:function(e){this.seconds=+e}},a:{regex:t.DATETIME_FORMATS.AMPMS.join("|"),apply:function(e){12===this.hours&&(this.hours=0),"PM"===e&&(this.hours+=12)}}}},this.init(),this.parse=function(n,a,l){if(!angular.isString(n)||!a)return n;a=t.DATETIME_FORMATS[a]||a,a=a.replace(s,"\\$&"),t.id!==o&&this.init(),this.parsers[a]||(this.parsers[a]=i(a));var u=this.parsers[a],c=u.regex,d=u.map,h=n.match(c);if(h&&h.length){var p,f;angular.isDate(l)&&!isNaN(l.getTime())?p={year:l.getFullYear(),month:l.getMonth(),date:l.getDate(),hours:l.getHours(),minutes:l.getMinutes(),seconds:l.getSeconds(),milliseconds:l.getMilliseconds()}:(l&&e.warn("dateparser:","baseDate is not a valid date"),p={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var m=1,g=h.length;g>m;m++){var v=d[m-1];v.apply&&v.apply.call(p,h[m])}return r(p.year,p.month,p.date)&&(angular.isDate(l)&&!isNaN(l.getTime())?(f=new Date(l),f.setFullYear(p.year,p.month,p.date,p.hours,p.minutes,p.seconds,p.milliseconds||0)):f=new Date(p.year,p.month,p.date,p.hours,p.minutes,p.seconds,p.milliseconds||0)),f}}}]),angular.module("ui.bootstrap.dateparser").value("$dateParserSuppressWarning",!1).service("dateParser",["$log","$dateParserSuppressWarning","uibDateParser",function(e,t,n){t||e.warn("dateParser is now deprecated. Use uibDateParser instead."),angular.extend(this,n)}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function i(e){return"static"===(n(e,"position")||"static")}var r=function(t){for(var n=e[0],r=t.offsetParent||n;r&&r!==n&&i(r);)r=r.offsetParent;return r||n};return{position:function(t){var n=this.offset(t),i={top:0,left:0},o=r(t[0]);o!=e[0]&&(i=this.offset(angular.element(o)),i.top+=o.clientTop-o.scrollTop,i.left+=o.clientLeft-o.scrollLeft);var a=t[0].getBoundingClientRect();return{width:a.width||t.prop("offsetWidth"),height:a.height||t.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}},positionElements:function(e,t,n,i){var r,o,a,s,l=n.split("-"),u=l[0],c=l[1]||"center";r=i?this.offset(e):this.position(e),o=t.prop("offsetWidth"),a=t.prop("offsetHeight");var d={center:function(){return r.left+r.width/2-o/2},left:function(){return r.left},right:function(){return r.left+r.width}},h={center:function(){return r.top+r.height/2-a/2},top:function(){return r.top},bottom:function(){return r.top+r.height}};switch(u){case"right":s={top:h[c](),left:d[u]()};break;case"left":s={top:h[c](),left:r.left-o};break;case"bottom":s={top:h[u](),left:d[c]()};break;default:s={top:r.top-a,left:d[c]()}}return s}}}]),angular.module("ui.bootstrap.position").value("$positionSuppressWarning",!1).service("$position",["$log","$positionSuppressWarning","$uibPosition",function(e,t,n){t||e.warn("$position is now deprecated. Use $uibPosition instead."),angular.extend(this,n)}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null,shortcutPropagation:!1}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError",function(e,t,n,i,r,o,a,s){var l=this,u={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRange","shortcutPropagation"],function(n,r){l[n]=angular.isDefined(t[n])?6>r?i(t[n])(e.$parent):e.$parent.$eval(t[n]):a[n]}),angular.forEach(["minDate","maxDate"],function(i){t[i]?e.$parent.$watch(n(t[i]),function(e){l[i]=e?new Date(e):null,l.refreshView()}):l[i]=a[i]?new Date(a[i]):null}),angular.forEach(["minMode","maxMode"],function(i){t[i]?e.$parent.$watch(n(t[i]),function(n){l[i]=angular.isDefined(n)?n:t[i],e[i]=l[i],("minMode"==i&&l.modes.indexOf(e.datepickerMode)<l.modes.indexOf(l[i])||"maxMode"==i&&l.modes.indexOf(e.datepickerMode)>l.modes.indexOf(l[i]))&&(e.datepickerMode=l[i])}):(l[i]=a[i]||null,e[i]=l[i])}),e.datepickerMode=e.datepickerMode||a.datepickerMode,e.uniqueId="datepicker-"+e.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(t.initDate)?(this.activeDate=e.$parent.$eval(t.initDate)||new Date,e.$parent.$watch(t.initDate,function(e){e&&(u.$isEmpty(u.$modelValue)||u.$invalid)&&(l.activeDate=e,l.refreshView())})):this.activeDate=new Date,e.isActive=function(t){return 0===l.compare(t.date,l.activeDate)?(e.activeDateId=t.uid,!0):!1},this.init=function(e){u=e,u.$render=function(){l.render()}},this.render=function(){if(u.$viewValue){var e=new Date(u.$viewValue),t=!isNaN(e);t?this.activeDate=e:s||r.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var e=u.$viewValue?new Date(u.$viewValue):null;u.$setValidity("dateDisabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,t){var n=u.$viewValue?new Date(u.$viewValue):null;return{date:e,label:o(e,t),selected:n&&0===this.compare(e,n),disabled:this.isDisabled(e),current:0===this.compare(e,new Date),customClass:this.customClass(e)}},this.isDisabled=function(n){return this.minDate&&this.compare(n,this.minDate)<0||this.maxDate&&this.compare(n,this.maxDate)>0||t.dateDisabled&&e.dateDisabled({date:n,mode:e.datepickerMode})},this.customClass=function(t){return e.customClass({date:t,mode:e.datepickerMode})},this.split=function(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n},e.select=function(t){if(e.datepickerMode===l.minMode){var n=u.$viewValue?new Date(u.$viewValue):new Date(0,0,0,0,0,0,0);n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),u.$setViewValue(n),u.$render()}else l.activeDate=t,e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)-1]},e.move=function(e){
|
132
|
+
var t=l.activeDate.getFullYear()+e*(l.step.years||0),n=l.activeDate.getMonth()+e*(l.step.months||0);l.activeDate.setFullYear(t,n,1),l.refreshView()},e.toggleMode=function(t){t=t||1,e.datepickerMode===l.maxMode&&1===t||e.datepickerMode===l.minMode&&-1===t||(e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)+t])},e.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var c=function(){l.element[0].focus()};e.$on("uib:datepicker.focus",c),e.keydown=function(t){var n=e.keys[t.which];if(n&&!t.shiftKey&&!t.altKey)if(t.preventDefault(),l.shortcutPropagation||t.stopPropagation(),"enter"===n||"space"===n){if(l.isDisabled(l.activeDate))return;e.select(l.activeDate)}else!t.ctrlKey||"up"!==n&&"down"!==n?(l.handleKeyDown(n,t),l.refreshView()):e.toggleMode("up"===n?1:-1)}}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(e,t,n){function i(e,t){return 1!==t||e%4!==0||e%100===0&&e%400!==0?o[t]:29}function r(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1}var o=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=t,this.init=function(t){angular.extend(t,this),e.showWeeks=t.showWeeks,t.refreshView()},this.getDates=function(e,t){for(var n,i=new Array(t),r=new Date(e),o=0;t>o;)n=new Date(r),i[o++]=n,r.setDate(r.getDate()+1);return i},this._refreshView=function(){var t=this.activeDate.getFullYear(),i=this.activeDate.getMonth(),o=new Date(this.activeDate);o.setFullYear(t,i,1);var a=this.startingDay-o.getDay(),s=a>0?7-a:-a,l=new Date(o);s>0&&l.setDate(-s+1);for(var u=this.getDates(l,42),c=0;42>c;c++)u[c]=angular.extend(this.createDateObject(u[c],this.formatDay),{secondary:u[c].getMonth()!==i,uid:e.uniqueId+"-"+c});e.labels=new Array(7);for(var d=0;7>d;d++)e.labels[d]={abbr:n(u[d].date,this.formatDayHeader),full:n(u[d].date,"EEEE")};if(e.title=n(this.activeDate,this.formatDayTitle),e.rows=this.split(u,7),e.showWeeks){e.weekNumbers=[];for(var h=(11-this.startingDay)%7,p=e.rows.length,f=0;p>f;f++)e.weekNumbers.push(r(e.rows[f][h].date))}},this.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},this.handleKeyDown=function(e,t){var n=this.activeDate.getDate();if("left"===e)n-=1;else if("up"===e)n-=7;else if("right"===e)n+=1;else if("down"===e)n+=7;else if("pageup"===e||"pagedown"===e){var r=this.activeDate.getMonth()+("pageup"===e?-1:1);this.activeDate.setMonth(r,1),n=Math.min(i(this.activeDate.getFullYear(),this.activeDate.getMonth()),n)}else"home"===e?n=1:"end"===e&&(n=i(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(n)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(e,t,n){this.step={years:1},this.element=t,this.init=function(e){angular.extend(e,this),e.refreshView()},this._refreshView=function(){for(var t,i=new Array(12),r=this.activeDate.getFullYear(),o=0;12>o;o++)t=new Date(this.activeDate),t.setFullYear(r,o,1),i[o]=angular.extend(this.createDateObject(t,this.formatMonth),{uid:e.uniqueId+"-"+o});e.title=n(this.activeDate,this.formatMonthTitle),e.rows=this.split(i,3)},this.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth())-new Date(t.getFullYear(),t.getMonth())},this.handleKeyDown=function(e,t){var n=this.activeDate.getMonth();if("left"===e)n-=1;else if("up"===e)n-=3;else if("right"===e)n+=1;else if("down"===e)n+=3;else if("pageup"===e||"pagedown"===e){var i=this.activeDate.getFullYear()+("pageup"===e?-1:1);this.activeDate.setFullYear(i)}else"home"===e?n=0:"end"===e&&(n=11);this.activeDate.setMonth(n)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(e,t,n){function i(e){return parseInt((e-1)/r,10)*r+1}var r;this.element=t,this.yearpickerInit=function(){r=this.yearRange,this.step={years:r}},this._refreshView=function(){for(var t,n=new Array(r),o=0,a=i(this.activeDate.getFullYear());r>o;o++)t=new Date(this.activeDate),t.setFullYear(a+o,0,1),n[o]=angular.extend(this.createDateObject(t,this.formatYear),{uid:e.uniqueId+"-"+o});e.title=[n[0].label,n[r-1].label].join(" - "),e.rows=this.split(n,5)},this.compare=function(e,t){return e.getFullYear()-t.getFullYear()},this.handleKeyDown=function(e,t){var n=this.activeDate.getFullYear();"left"===e?n-=1:"up"===e?n-=5:"right"===e?n+=1:"down"===e?n+=5:"pageup"===e||"pagedown"===e?n+=("pageup"===e?-1:1)*this.step.years:"home"===e?n=i(this.activeDate.getFullYear()):"end"===e&&(n=i(this.activeDate.getFullYear())+r-1),this.activeDate.setFullYear(n)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(e,t){return t.templateUrl||"template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(e,t,n,i){var r=i[0],o=i[1];r.init(o)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(e,t){return t.templateUrl||"template/datepicker/day.html"},require:["^?uibDatepicker","uibDaypicker","^?datepicker"],controller:"UibDaypickerController",link:function(e,t,n,i){var r=i[0]||i[2],o=i[1];o.init(r)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(e,t){return t.templateUrl||"template/datepicker/month.html"},require:["^?uibDatepicker","uibMonthpicker","^?datepicker"],controller:"UibMonthpickerController",link:function(e,t,n,i){var r=i[0]||i[2],o=i[1];o.init(r)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(e,t){return t.templateUrl||"template/datepicker/year.html"},require:["^?uibDatepicker","uibYearpicker","^?datepicker"],controller:"UibYearpickerController",link:function(e,t,n,i){var r=i[0]||i[2];angular.extend(r,i[1]),r.yearpickerInit(),r.refreshView()}}}).constant("uibDatepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"template/datepicker/popup.html",datepickerTemplateUrl:"template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0,onOpenFocus:!0}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout",function(e,t,n,i,r,o,a,s,l,u,c,d){function h(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function p(t){if(angular.isNumber(t)&&(t=new Date(t)),t){if(angular.isDate(t)&&!isNaN(t))return t;if(angular.isString(t)){var n=u.parse(t,v,e.date);return isNaN(n)?void 0:n}return void 0}return null}function f(e,t){var i=e||t;if(!n.ngRequired&&!i)return!0;if(angular.isNumber(i)&&(i=new Date(i)),i){if(angular.isDate(i)&&!isNaN(i))return!0;if(angular.isString(i)){var r=u.parse(i,v);return!isNaN(r)}return!1}return!0}function m(n){var i=A[0],r=t[0].contains(n.target),o=void 0!==i.contains&&i.contains(n.target);!e.isOpen||r||o||e.$apply(function(){e.isOpen=!1})}function g(n){27===n.which&&e.isOpen?(n.preventDefault(),n.stopPropagation(),e.$apply(function(){e.isOpen=!1}),t[0].focus()):40!==n.which||e.isOpen||(n.preventDefault(),n.stopPropagation(),e.$apply(function(){e.isOpen=!0}))}var v,y,_,b,x,w,$,k,C,A,M={},T=!1;e.watchData={},this.init=function(s){if(C=s,y=angular.isDefined(n.closeOnDateSelection)?e.$parent.$eval(n.closeOnDateSelection):c.closeOnDateSelection,_=angular.isDefined(n.datepickerAppendToBody)?e.$parent.$eval(n.datepickerAppendToBody):c.appendToBody,b=angular.isDefined(n.onOpenFocus)?e.$parent.$eval(n.onOpenFocus):c.onOpenFocus,x=angular.isDefined(n.datepickerPopupTemplateUrl)?n.datepickerPopupTemplateUrl:c.datepickerPopupTemplateUrl,w=angular.isDefined(n.datepickerTemplateUrl)?n.datepickerTemplateUrl:c.datepickerTemplateUrl,e.showButtonBar=angular.isDefined(n.showButtonBar)?e.$parent.$eval(n.showButtonBar):c.showButtonBar,c.html5Types[n.type]?(v=c.html5Types[n.type],T=!0):(v=n.datepickerPopup||n.uibDatepickerPopup||c.datepickerPopup,n.$observe("uibDatepickerPopup",function(e,t){var n=e||c.datepickerPopup;if(n!==v&&(v=n,C.$modelValue=null,!v))throw new Error("uibDatepickerPopup must have a date format specified.")})),!v)throw new Error("uibDatepickerPopup must have a date format specified.");if(T&&n.datepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");if($=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),$.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":x}),k=angular.element($.children()[0]),k.attr("template-url",w),T&&"month"===n.type&&(k.attr("datepicker-mode",'"month"'),k.attr("min-mode","month")),n.datepickerOptions){var d=e.$parent.$eval(n.datepickerOptions);d&&d.initDate&&(e.initDate=d.initDate,k.attr("init-date","initDate"),delete d.initDate),angular.forEach(d,function(e,t){k.attr(h(t),e)})}angular.forEach(["minMode","maxMode","minDate","maxDate","datepickerMode","initDate","shortcutPropagation"],function(t){if(n[t]){var i=r(n[t]);if(e.$parent.$watch(i,function(n){e.watchData[t]=n,("minDate"===t||"maxDate"===t)&&(M[t]=new Date(n))}),k.attr(h(t),"watchData."+t),"datepickerMode"===t){var o=i.assign;e.$watch("watchData."+t,function(t,n){angular.isFunction(o)&&t!==n&&o(e.$parent,t)})}}}),n.dateDisabled&&k.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),n.showWeeks&&k.attr("show-weeks",n.showWeeks),n.customClass&&k.attr("custom-class","customClass({ date: date, mode: mode })"),T?C.$formatters.push(function(t){return e.date=t,t}):(C.$$parserName="date",C.$validators.date=f,C.$parsers.unshift(p),C.$formatters.push(function(t){return e.date=t,C.$isEmpty(t)?t:l(t,v)})),C.$viewChangeListeners.push(function(){e.date=u.parse(C.$viewValue,v,e.date)}),t.bind("keydown",g),A=i($)(e),$.remove(),_?o.find("body").append(A):t.after(A),e.$on("$destroy",function(){e.isOpen===!0&&(a.$$phase||e.$apply(function(){e.isOpen=!1})),A.remove(),t.unbind("keydown",g),o.unbind("click",m)})},e.getText=function(t){return e[t+"Text"]||c[t+"Text"]},e.isDisabled=function(t){return"today"===t&&(t=new Date),e.watchData.minDate&&e.compare(t,M.minDate)<0||e.watchData.maxDate&&e.compare(t,M.maxDate)>0},e.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},e.dateSelection=function(n){angular.isDefined(n)&&(e.date=n);var i=e.date?l(e.date,v):null;t.val(i),C.$setViewValue(i),y&&(e.isOpen=!1,t[0].focus())},e.keydown=function(n){27===n.which&&(e.isOpen=!1,t[0].focus())},e.select=function(t){if("today"===t){var n=new Date;angular.isDate(e.date)?(t=new Date(e.date),t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate())):t=new Date(n.setHours(0,0,0,0))}e.dateSelection(t)},e.close=function(){e.isOpen=!1,t[0].focus()},e.$watch("isOpen",function(n){n?(e.position=_?s.offset(t):s.position(t),e.position.top=e.position.top+t.prop("offsetHeight"),d(function(){b&&e.$broadcast("uib:datepicker.focus"),o.bind("click",m)},0,!1)):o.unbind("click",m)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(e,t,n,i){var r=i[0],o=i[1];o.init(r)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(e,t){return t.templateUrl||"template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.datepicker").value("$datepickerSuppressWarning",!1).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","$datepickerSuppressWarning",function(e,t,n,i,r,o,a,s,l){l||r.warn("DatepickerController is now deprecated. Use UibDatepickerController instead.");var u=this,c={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRange","shortcutPropagation"],function(n,r){u[n]=angular.isDefined(t[n])?6>r?i(t[n])(e.$parent):e.$parent.$eval(t[n]):a[n]}),angular.forEach(["minDate","maxDate"],function(i){t[i]?e.$parent.$watch(n(t[i]),function(e){u[i]=e?new Date(e):null,u.refreshView()}):u[i]=a[i]?new Date(a[i]):null}),angular.forEach(["minMode","maxMode"],function(i){t[i]?e.$parent.$watch(n(t[i]),function(n){u[i]=angular.isDefined(n)?n:t[i],e[i]=u[i],("minMode"==i&&u.modes.indexOf(e.datepickerMode)<u.modes.indexOf(u[i])||"maxMode"==i&&u.modes.indexOf(e.datepickerMode)>u.modes.indexOf(u[i]))&&(e.datepickerMode=u[i])}):(u[i]=a[i]||null,e[i]=u[i])}),e.datepickerMode=e.datepickerMode||a.datepickerMode,e.uniqueId="datepicker-"+e.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(t.initDate)?(this.activeDate=e.$parent.$eval(t.initDate)||new Date,e.$parent.$watch(t.initDate,function(e){e&&(c.$isEmpty(c.$modelValue)||c.$invalid)&&(u.activeDate=e,u.refreshView())})):this.activeDate=new Date,e.isActive=function(t){return 0===u.compare(t.date,u.activeDate)?(e.activeDateId=t.uid,!0):!1},this.init=function(e){c=e,c.$render=function(){u.render()}},this.render=function(){if(c.$viewValue){var e=new Date(c.$viewValue),t=!isNaN(e);t?this.activeDate=e:s||r.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var e=c.$viewValue?new Date(c.$viewValue):null;c.$setValidity("dateDisabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,t){var n=c.$viewValue?new Date(c.$viewValue):null;return{date:e,label:o(e,t),selected:n&&0===this.compare(e,n),disabled:this.isDisabled(e),current:0===this.compare(e,new Date),customClass:this.customClass(e)}},this.isDisabled=function(n){return this.minDate&&this.compare(n,this.minDate)<0||this.maxDate&&this.compare(n,this.maxDate)>0||t.dateDisabled&&e.dateDisabled({date:n,mode:e.datepickerMode})},this.customClass=function(t){return e.customClass({date:t,mode:e.datepickerMode})},this.split=function(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n},this.fixTimeZone=function(e){var t=e.getHours();e.setHours(23===t?t+2:0)},e.select=function(t){if(e.datepickerMode===u.minMode){var n=c.$viewValue?new Date(c.$viewValue):new Date(0,0,0,0,0,0,0);n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),c.$setViewValue(n),c.$render()}else u.activeDate=t,e.datepickerMode=u.modes[u.modes.indexOf(e.datepickerMode)-1]},e.move=function(e){var t=u.activeDate.getFullYear()+e*(u.step.years||0),n=u.activeDate.getMonth()+e*(u.step.months||0);u.activeDate.setFullYear(t,n,1),u.refreshView()},e.toggleMode=function(t){t=t||1,e.datepickerMode===u.maxMode&&1===t||e.datepickerMode===u.minMode&&-1===t||(e.datepickerMode=u.modes[u.modes.indexOf(e.datepickerMode)+t])},e.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var d=function(){u.element[0].focus()};e.$on("uib:datepicker.focus",d),e.keydown=function(t){var n=e.keys[t.which];if(n&&!t.shiftKey&&!t.altKey)if(t.preventDefault(),u.shortcutPropagation||t.stopPropagation(),"enter"===n||"space"===n){if(u.isDisabled(u.activeDate))return;e.select(u.activeDate)}else!t.ctrlKey||"up"!==n&&"down"!==n?(u.handleKeyDown(n,t),u.refreshView()):e.toggleMode("up"===n?1:-1)}}]).directive("datepicker",["$log","$datepickerSuppressWarning",function(e,t){return{replace:!0,templateUrl:function(e,t){return t.templateUrl||"template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["datepicker","^ngModel"],controller:"DatepickerController",controllerAs:"datepicker",link:function(n,i,r,o){t||e.warn("datepicker is now deprecated. Use uib-datepicker instead.");var a=o[0],s=o[1];a.init(s)}}}]).directive("daypicker",["$log","$datepickerSuppressWarning",function(e,t){return{replace:!0,templateUrl:"template/datepicker/day.html",require:["^datepicker","daypicker"],controller:"UibDaypickerController",link:function(n,i,r,o){t||e.warn("daypicker is now deprecated. Use uib-daypicker instead.");var a=o[0],s=o[1];s.init(a)}}}]).directive("monthpicker",["$log","$datepickerSuppressWarning",function(e,t){return{replace:!0,templateUrl:"template/datepicker/month.html",require:["^datepicker","monthpicker"],controller:"UibMonthpickerController",link:function(n,i,r,o){t||e.warn("monthpicker is now deprecated. Use uib-monthpicker instead.");var a=o[0],s=o[1];s.init(a)}}}]).directive("yearpicker",["$log","$datepickerSuppressWarning",function(e,t){return{replace:!0,templateUrl:"template/datepicker/year.html",require:["^datepicker","yearpicker"],controller:"UibYearpickerController",link:function(n,i,r,o){t||e.warn("yearpicker is now deprecated. Use uib-yearpicker instead.");var a=o[0];angular.extend(a,o[1]),a.yearpickerInit(),a.refreshView()}}}]).directive("datepickerPopup",["$log","$datepickerSuppressWarning",function(e,t){return{require:["ngModel","datepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(n,i,r,o){t||e.warn("datepicker-popup is now deprecated. Use uib-datepicker-popup instead.");var a=o[0],s=o[1];s.init(a)}}}]).directive("datepickerPopupWrap",["$log","$datepickerSuppressWarning",function(e,t){return{replace:!0,transclude:!0,templateUrl:function(e,t){return t.templateUrl||"template/datepicker/popup.html"},link:function(){t||e.warn("datepicker-popup-wrap is now deprecated. Use uib-datepicker-popup-wrap instead.")}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(e,t){var n=null;this.open=function(t){n||(e.bind("click",i),e.bind("keydown",r)),n&&n!==t&&(n.isOpen=!1),n=t},this.close=function(t){n===t&&(n=null,e.unbind("click",i),e.unbind("keydown",r))};var i=function(e){if(n&&(!e||"disabled"!==n.getAutoClose())){var i=n.getToggleElement();if(!(e&&i&&i[0].contains(e.target))){var r=n.getDropdownElement();e&&"outsideClick"===n.getAutoClose()&&r&&r[0].contains(e.target)||(n.isOpen=!1,t.$$phase||n.$apply())}}},r=function(e){27===e.which?(n.focusToggleElement(),i()):n.isKeynavEnabled()&&/(38|40)/.test(e.which)&&n.isOpen&&(e.preventDefault(),e.stopPropagation(),n.focusDropdownEntry(e.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(e,t,n,i,r,o,a,s,l,u,c){var d,h,p=this,f=e.$new(),m=r.openClass,g=angular.noop,v=n.onToggle?i(n.onToggle):angular.noop,y=!1,_=!1;t.addClass("dropdown"),this.init=function(){n.isOpen&&(h=i(n.isOpen),g=h.assign,e.$watch(h,function(e){f.isOpen=!!e})),y=angular.isDefined(n.dropdownAppendToBody),_=angular.isDefined(n.uibKeyboardNav),y&&p.dropdownMenu&&(l.find("body").append(p.dropdownMenu),t.on("$destroy",function(){p.dropdownMenu.remove()}))},this.toggle=function(e){return f.isOpen=arguments.length?!!e:!f.isOpen},this.isOpen=function(){return f.isOpen},f.getToggleElement=function(){return p.toggleElement},f.getAutoClose=function(){return n.autoClose||"always"},f.getElement=function(){return t},f.isKeynavEnabled=function(){return _},f.focusDropdownEntry=function(e){var n=p.dropdownMenu?angular.element(p.dropdownMenu).find("a"):angular.element(t).find("ul").eq(0).find("a");switch(e){case 40:angular.isNumber(p.selectedOption)?p.selectedOption=p.selectedOption===n.length-1?p.selectedOption:p.selectedOption+1:p.selectedOption=0;break;case 38:angular.isNumber(p.selectedOption)?p.selectedOption=0===p.selectedOption?0:p.selectedOption-1:p.selectedOption=n.length-1}n[p.selectedOption].focus()},f.getDropdownElement=function(){return p.dropdownMenu},f.focusToggleElement=function(){p.toggleElement&&p.toggleElement[0].focus()},f.$watch("isOpen",function(n,i){if(y&&p.dropdownMenu){var r=s.positionElements(t,p.dropdownMenu,"bottom-left",!0),l={top:r.top+"px",display:n?"block":"none"},h=p.dropdownMenu.hasClass("dropdown-menu-right");h?(l.left="auto",l.right=window.innerWidth-(r.left+t.prop("offsetWidth"))+"px"):(l.left=r.left+"px",l.right="auto"),p.dropdownMenu.css(l)}if(a[n?"addClass":"removeClass"](t,m).then(function(){angular.isDefined(n)&&n!==i&&v(e,{open:!!n})}),n)p.dropdownMenuTemplateUrl&&c(p.dropdownMenuTemplateUrl).then(function(e){d=f.$new(),u(e.trim())(d,function(e){var t=e;p.dropdownMenu.replaceWith(t),p.dropdownMenu=t})}),f.focusToggleElement(),o.open(f);else{if(p.dropdownMenuTemplateUrl){d&&d.$destroy();var _=angular.element('<ul class="dropdown-menu"></ul>');p.dropdownMenu.replaceWith(_),p.dropdownMenu=_}o.close(f),p.selectedOption=null}angular.isFunction(g)&&g(e,n)}),e.$on("$locationChangeSuccess",function(){"disabled"!==f.getAutoClose()&&(f.isOpen=!1)});var b=e.$on("$destroy",function(){f.$destroy()});f.$on("$destroy",b)}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(e,t,n,i){i.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"AC",require:"?^uibDropdown",link:function(e,t,n,i){if(i&&!angular.isDefined(n.dropdownNested)){t.addClass("dropdown-menu");var r=n.templateUrl;r&&(i.dropdownMenuTemplateUrl=r),i.dropdownMenu||(i.dropdownMenu=t)}}}}).directive("uibKeyboardNav",function(){return{restrict:"A",require:"?^uibDropdown",link:function(e,t,n,i){t.bind("keydown",function(e){if(-1!==[38,40].indexOf(e.which)){e.preventDefault(),e.stopPropagation();var t=i.dropdownMenu.find("a");switch(e.which){case 40:angular.isNumber(i.selectedOption)?i.selectedOption=i.selectedOption===t.length-1?i.selectedOption:i.selectedOption+1:i.selectedOption=0;break;case 38:angular.isNumber(i.selectedOption)?i.selectedOption=0===i.selectedOption?0:i.selectedOption-1:i.selectedOption=t.length-1}t[i.selectedOption].focus()}})}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(e,t,n,i){if(i){t.addClass("dropdown-toggle"),i.toggleElement=t;var r=function(r){r.preventDefault(),t.hasClass("disabled")||n.disabled||e.$apply(function(){i.toggle()})};t.bind("click",r),t.attr({"aria-haspopup":!0,"aria-expanded":!1}),e.$watch(i.isOpen,function(e){t.attr("aria-expanded",!!e)}),e.$on("$destroy",function(){t.unbind("click",r)})}}}}),angular.module("ui.bootstrap.dropdown").value("$dropdownSuppressWarning",!1).service("dropdownService",["$log","$dropdownSuppressWarning","uibDropdownService",function(e,t,n){t||e.warn("dropdownService is now deprecated. Use uibDropdownService instead."),angular.extend(this,n)}]).controller("DropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest","$log","$dropdownSuppressWarning",function(e,t,n,i,r,o,a,s,l,u,c,d,h){h||d.warn("DropdownController is now deprecated. Use UibDropdownController instead.");var p,f,m=this,g=e.$new(),v=r.openClass,y=angular.noop,_=n.onToggle?i(n.onToggle):angular.noop,b=!1,x=!1;t.addClass("dropdown"),this.init=function(){n.isOpen&&(f=i(n.isOpen),y=f.assign,e.$watch(f,function(e){g.isOpen=!!e})),b=angular.isDefined(n.dropdownAppendToBody),x=angular.isDefined(n.uibKeyboardNav),b&&m.dropdownMenu&&(l.find("body").append(m.dropdownMenu),t.on("$destroy",function(){m.dropdownMenu.remove()}))},this.toggle=function(e){return g.isOpen=arguments.length?!!e:!g.isOpen},this.isOpen=function(){return g.isOpen},g.getToggleElement=function(){return m.toggleElement},g.getAutoClose=function(){return n.autoClose||"always"},g.getElement=function(){return t},g.isKeynavEnabled=function(){return x},g.focusDropdownEntry=function(e){var n=m.dropdownMenu?angular.element(m.dropdownMenu).find("a"):angular.element(t).find("ul").eq(0).find("a");switch(e){case 40:angular.isNumber(m.selectedOption)?m.selectedOption=m.selectedOption===n.length-1?m.selectedOption:m.selectedOption+1:m.selectedOption=0;break;case 38:angular.isNumber(m.selectedOption)?m.selectedOption=0===m.selectedOption?0:m.selectedOption-1:m.selectedOption=n.length-1}n[m.selectedOption].focus()},g.getDropdownElement=function(){return m.dropdownMenu},g.focusToggleElement=function(){m.toggleElement&&m.toggleElement[0].focus()},g.$watch("isOpen",function(n,i){if(b&&m.dropdownMenu){var r=s.positionElements(t,m.dropdownMenu,"bottom-left",!0),l={top:r.top+"px",display:n?"block":"none"},d=m.dropdownMenu.hasClass("dropdown-menu-right");d?(l.left="auto",l.right=window.innerWidth-(r.left+t.prop("offsetWidth"))+"px"):(l.left=r.left+"px",l.right="auto"),m.dropdownMenu.css(l)}if(a[n?"addClass":"removeClass"](t,v).then(function(){angular.isDefined(n)&&n!==i&&_(e,{open:!!n})}),n)m.dropdownMenuTemplateUrl&&c(m.dropdownMenuTemplateUrl).then(function(e){p=g.$new(),u(e.trim())(p,function(e){var t=e;m.dropdownMenu.replaceWith(t),m.dropdownMenu=t})}),g.focusToggleElement(),o.open(g);else{if(m.dropdownMenuTemplateUrl){p&&p.$destroy();var h=angular.element('<ul class="dropdown-menu"></ul>');m.dropdownMenu.replaceWith(h),m.dropdownMenu=h}o.close(g),m.selectedOption=null}angular.isFunction(y)&&y(e,n)}),e.$on("$locationChangeSuccess",function(){"disabled"!==g.getAutoClose()&&(g.isOpen=!1)});var w=e.$on("$destroy",function(){g.$destroy()});g.$on("$destroy",w)}]).directive("dropdown",["$log","$dropdownSuppressWarning",function(e,t){return{controller:"DropdownController",link:function(n,i,r,o){t||e.warn("dropdown is now deprecated. Use uib-dropdown instead."),o.init()}}}]).directive("dropdownMenu",["$log","$dropdownSuppressWarning",function(e,t){return{restrict:"AC",require:"?^dropdown",link:function(n,i,r,o){if(o&&!angular.isDefined(r.dropdownNested)){t||e.warn("dropdown-menu is now deprecated. Use uib-dropdown-menu instead."),i.addClass("dropdown-menu");var a=r.templateUrl;a&&(o.dropdownMenuTemplateUrl=a),o.dropdownMenu||(o.dropdownMenu=i)}}}}]).directive("keyboardNav",["$log","$dropdownSuppressWarning",function(e,t){return{restrict:"A",require:"?^dropdown",link:function(n,i,r,o){t||e.warn("keyboard-nav is now deprecated. Use uib-keyboard-nav instead."),i.bind("keydown",function(e){if(-1!==[38,40].indexOf(e.which)){e.preventDefault(),e.stopPropagation();var t=o.dropdownMenu.find("a");switch(e.which){case 40:angular.isNumber(o.selectedOption)?o.selectedOption=o.selectedOption===t.length-1?o.selectedOption:o.selectedOption+1:o.selectedOption=0;break;case 38:angular.isNumber(o.selectedOption)?o.selectedOption=0===o.selectedOption?0:o.selectedOption-1:o.selectedOption=t.length-1}t[o.selectedOption].focus()}})}}}]).directive("dropdownToggle",["$log","$dropdownSuppressWarning",function(e,t){return{require:"?^dropdown",link:function(n,i,r,o){if(t||e.warn("dropdown-toggle is now deprecated. Use uib-dropdown-toggle instead."),o){i.addClass("dropdown-toggle"),o.toggleElement=i;var a=function(e){e.preventDefault(),i.hasClass("disabled")||r.disabled||n.$apply(function(){o.toggle()})};i.bind("click",a),i.attr({"aria-haspopup":!0,"aria-expanded":!1}),n.$watch(o.isOpen,function(e){i.attr("aria-expanded",!!e)}),n.$on("$destroy",function(){i.unbind("click",a)})}}}}]),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var e=[];return{add:function(t,n){e.push({key:t,value:n})},get:function(t){for(var n=0;n<e.length;n++)if(t==e[n].key)return e[n]},keys:function(){for(var t=[],n=0;n<e.length;n++)t.push(e[n].key);return t},top:function(){return e[e.length-1]},remove:function(t){for(var n=-1,i=0;i<e.length;i++)if(t==e[i].key){n=i;break}return e.splice(n,1)[0]},removeTop:function(){return e.splice(e.length-1,1)[0]},length:function(){return e.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.stackedMap"]).factory("$$multiMap",function(){return{createNew:function(){var e={};return{entries:function(){return Object.keys(e).map(function(t){return{key:t,value:e[t]}})},get:function(t){return e[t]},hasKey:function(t){return!!e[t]},keys:function(){return Object.keys(e)},put:function(t,n){e[t]||(e[t]=[]),e[t].push(n)},remove:function(t,n){var i=e[t];if(i){var r=i.indexOf(n);-1!==r&&i.splice(r,1),i.length||delete e[t]}}}}}}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(e,t,n){function i(t,i,o){i.addClass("modal-backdrop"),o.modalInClass&&(r?r(i,{addClass:o.modalInClass}).start():e.addClass(i,o.modalInClass),t.$on(n.NOW_CLOSING_EVENT,function(t,n){var a=n();r?r(i,{removeClass:o.modalInClass}).start().then(a):e.removeClass(i,o.modalInClass).then(a)}))}var r=null;return t.has("$animateCss")&&(r=t.get("$animateCss")),{replace:!0,templateUrl:"template/modal/backdrop.html",compile:function(e,t){return e.addClass(t.backdropClass),i}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animate","$injector",function(e,t,n,i){var r=null;return i.has("$animateCss")&&(r=i.get("$animateCss")),{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(e,t){return t.templateUrl||"template/modal/window.html"},link:function(i,o,a){o.addClass(a.windowClass||""),o.addClass(a.windowTopClass||""),i.size=a.size,i.close=function(t){var n=e.getTop();n&&n.value.backdrop&&"static"!==n.value.backdrop&&t.target===t.currentTarget&&(t.preventDefault(),t.stopPropagation(),e.dismiss(n.key,"backdrop click"))},o.on("click",i.close),i.$isRendered=!0;var s=t.defer();a.$observe("modalRender",function(e){"true"==e&&s.resolve()}),s.promise.then(function(){var s=null;a.modalInClass&&(s=r?r(o,{addClass:a.modalInClass}).start():n.addClass(o,a.modalInClass),i.$on(e.NOW_CLOSING_EVENT,function(e,t){var i=t();r?r(o,{removeClass:a.modalInClass}).start().then(i):n.removeClass(o,a.modalInClass).then(i)})),t.when(s).then(function(){var e=o[0].querySelector("[autofocus]");e?e.focus():o[0].focus()});var l=e.getTop();l&&e.modalRendered(l.key)})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(e,t){t.modalAnimation&&e.addClass(t.uibModalAnimationClass)}}}).directive("uibModalTransclude",function(){return{link:function(e,t,n,i,r){r(e.$parent,function(e){t.empty(),t.append(e)})}}}).factory("$uibModalStack",["$animate","$timeout","$document","$compile","$rootScope","$q","$injector","$$multiMap","$$stackedMap",function(e,t,n,i,r,o,a,s,l){function u(){for(var e=-1,t=b.keys(),n=0;n<t.length;n++)b.get(t[n]).value.backdrop&&(e=n);return e}function c(e,t){var i=n.find("body").eq(0),r=b.get(e).value;b.remove(e),p(r.modalDomEl,r.modalScope,function(){var t=r.openedClass||_;x.remove(t,e),i.toggleClass(t,x.hasKey(t)),d(!0)}),h(),t&&t.focus?t.focus():i.focus()}function d(e){var t;b.length()>0&&(t=b.top().value,t.modalDomEl.toggleClass(t.windowTopClass||"",e))}function h(){if(g&&-1==u()){var e=v;p(g,v,function(){e=null}),g=void 0,v=void 0}}function p(t,n,i){function r(){r.done||(r.done=!0,m?m(t,{event:"leave"}).start().then(function(){t.remove()}):e.leave(t),n.$destroy(),i&&i())}var a,s=null,l=function(){return a||(a=o.defer(),s=a.promise),function(){a.resolve()}};return n.$broadcast(w.NOW_CLOSING_EVENT,l),o.when(s).then(r)}function f(e,t,n){return!e.value.modalScope.$broadcast("modal.closing",t,n).defaultPrevented}var m=null;a.has("$animateCss")&&(m=a.get("$animateCss"));var g,v,y,_="modal-open",b=l.createNew(),x=s.createNew(),w={NOW_CLOSING_EVENT:"modal.stack.now-closing"},$=0,k="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return r.$watch(u,function(e){v&&(v.index=e)}),n.bind("keydown",function(e){if(e.isDefaultPrevented())return e;var t=b.top();if(t&&t.value.keyboard)switch(e.which){case 27:e.preventDefault(),r.$apply(function(){w.dismiss(t.key,"escape key press")});break;case 9:w.loadFocusElementList(t);var n=!1;e.shiftKey?w.isFocusInFirstItem(e)&&(n=w.focusLastFocusableElement()):w.isFocusInLastItem(e)&&(n=w.focusFirstFocusableElement()),n&&(e.preventDefault(),e.stopPropagation())}}),w.open=function(e,t){var o=n[0].activeElement,a=t.openedClass||_;d(!1),b.add(e,{deferred:t.deferred,renderDeferred:t.renderDeferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard,openedClass:t.openedClass,windowTopClass:t.windowTopClass}),x.put(a,e);var s=n.find("body").eq(0),l=u();if(l>=0&&!g){v=r.$new(!0),v.index=l;var c=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>');c.attr("backdrop-class",t.backdropClass),
|
133
|
+
t.animation&&c.attr("modal-animation","true"),g=i(c)(v),s.append(g)}var h=angular.element('<div uib-modal-window="modal-window"></div>');h.attr({"template-url":t.windowTemplateUrl,"window-class":t.windowClass,"window-top-class":t.windowTopClass,size:t.size,index:b.length()-1,animate:"animate"}).html(t.content),t.animation&&h.attr("modal-animation","true");var p=i(h)(t.scope);b.top().value.modalDomEl=p,b.top().value.modalOpener=o,s.append(p),s.addClass(a),w.clearFocusListCache()},w.close=function(e,t){var n=b.get(e);return n&&f(n,t,!0)?(n.value.modalScope.$$uibDestructionScheduled=!0,n.value.deferred.resolve(t),c(e,n.value.modalOpener),!0):!n},w.dismiss=function(e,t){var n=b.get(e);return n&&f(n,t,!1)?(n.value.modalScope.$$uibDestructionScheduled=!0,n.value.deferred.reject(t),c(e,n.value.modalOpener),!0):!n},w.dismissAll=function(e){for(var t=this.getTop();t&&this.dismiss(t.key,e);)t=this.getTop()},w.getTop=function(){return b.top()},w.modalRendered=function(e){var t=b.get(e);t&&t.value.renderDeferred.resolve()},w.focusFirstFocusableElement=function(){return y.length>0?(y[0].focus(),!0):!1},w.focusLastFocusableElement=function(){return y.length>0?(y[y.length-1].focus(),!0):!1},w.isFocusInFirstItem=function(e){return y.length>0?(e.target||e.srcElement)==y[0]:!1},w.isFocusInLastItem=function(e){return y.length>0?(e.target||e.srcElement)==y[y.length-1]:!1},w.clearFocusListCache=function(){y=[],$=0},w.loadFocusElementList=function(e){if((void 0===y||!y.length)&&e){var t=e.value.modalDomEl;t&&t.length&&(y=t[0].querySelectorAll(k))}},w}]).provider("$uibModal",function(){var e={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$templateRequest","$controller","$uibModalStack","$modalSuppressWarning","$log",function(t,n,i,r,o,a,s,l){function u(e){return e.template?i.when(e.template):r(angular.isFunction(e.templateUrl)?e.templateUrl():e.templateUrl)}function c(e){var n=[];return angular.forEach(e,function(e){angular.isFunction(e)||angular.isArray(e)?n.push(i.when(t.invoke(e))):angular.isString(e)?n.push(i.when(t.get(e))):n.push(i.when(e))}),n}var d={},h=null;return d.getPromiseChain=function(){return h},d.open=function(t){function r(){return v}var d=i.defer(),p=i.defer(),f=i.defer(),m={result:d.promise,opened:p.promise,rendered:f.promise,close:function(e){return a.close(m,e)},dismiss:function(e){return a.dismiss(m,e)}};if(t=angular.extend({},e.options,t),t.resolve=t.resolve||{},!t.template&&!t.templateUrl)throw new Error("One of template or templateUrl options is required.");var g,v=i.all([u(t)].concat(c(t.resolve)));return g=h=i.all([h]).then(r,r).then(function(e){var i=(t.scope||n).$new();i.$close=m.close,i.$dismiss=m.dismiss,i.$on("$destroy",function(){i.$$uibDestructionScheduled||i.$dismiss("$uibUnscheduledDestruction")});var r,u={},c=1;t.controller&&(u.$scope=i,u.$uibModalInstance=m,Object.defineProperty(u,"$modalInstance",{get:function(){return s||l.warn("$modalInstance is now deprecated. Use $uibModalInstance instead."),m}}),angular.forEach(t.resolve,function(t,n){u[n]=e[c++]}),r=o(t.controller,u),t.controllerAs&&(t.bindToController&&angular.extend(r,i),i[t.controllerAs]=r)),a.open(m,{scope:i,deferred:d,renderDeferred:f,content:e[0],animation:t.animation,backdrop:t.backdrop,keyboard:t.keyboard,backdropClass:t.backdropClass,windowTopClass:t.windowTopClass,windowClass:t.windowClass,windowTemplateUrl:t.windowTemplateUrl,size:t.size,openedClass:t.openedClass}),p.resolve(!0)},function(e){p.reject(e),d.reject(e)})["finally"](function(){h===g&&(h=null)}),m},d}]};return e}),angular.module("ui.bootstrap.modal").value("$modalSuppressWarning",!1).directive("modalBackdrop",["$animate","$injector","$modalStack","$log","$modalSuppressWarning",function(e,t,n,i,r){function o(t,o,s){r||i.warn("modal-backdrop is now deprecated. Use uib-modal-backdrop instead."),o.addClass("modal-backdrop"),s.modalInClass&&(a?a(o,{addClass:s.modalInClass}).start():e.addClass(o,s.modalInClass),t.$on(n.NOW_CLOSING_EVENT,function(t,n){var i=n();a?a(o,{removeClass:s.modalInClass}).start().then(i):e.removeClass(o,s.modalInClass).then(i)}))}var a=null;return t.has("$animateCss")&&(a=t.get("$animateCss")),{replace:!0,templateUrl:"template/modal/backdrop.html",compile:function(e,t){return e.addClass(t.backdropClass),o}}}]).directive("modalWindow",["$modalStack","$q","$animate","$injector","$log","$modalSuppressWarning",function(e,t,n,i,r,o){var a=null;return i.has("$animateCss")&&(a=i.get("$animateCss")),{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(e,t){return t.templateUrl||"template/modal/window.html"},link:function(i,s,l){o||r.warn("modal-window is now deprecated. Use uib-modal-window instead."),s.addClass(l.windowClass||""),s.addClass(l.windowTopClass||""),i.size=l.size,i.close=function(t){var n=e.getTop();n&&n.value.backdrop&&"static"!==n.value.backdrop&&t.target===t.currentTarget&&(t.preventDefault(),t.stopPropagation(),e.dismiss(n.key,"backdrop click"))},s.on("click",i.close),i.$isRendered=!0;var u=t.defer();l.$observe("modalRender",function(e){"true"==e&&u.resolve()}),u.promise.then(function(){var r=null;l.modalInClass&&(r=a?a(s,{addClass:l.modalInClass}).start():n.addClass(s,l.modalInClass),i.$on(e.NOW_CLOSING_EVENT,function(e,t){var i=t();a?a(s,{removeClass:l.modalInClass}).start().then(i):n.removeClass(s,l.modalInClass).then(i)})),t.when(r).then(function(){var e=s[0].querySelector("[autofocus]");e?e.focus():s[0].focus()});var o=e.getTop();o&&e.modalRendered(o.key)})}}}]).directive("modalAnimationClass",["$log","$modalSuppressWarning",function(e,t){return{compile:function(n,i){t||e.warn("modal-animation-class is now deprecated. Use uib-modal-animation-class instead."),i.modalAnimation&&n.addClass(i.modalAnimationClass)}}}]).directive("modalTransclude",["$log","$modalSuppressWarning",function(e,t){return{link:function(n,i,r,o,a){t||e.warn("modal-transclude is now deprecated. Use uib-modal-transclude instead."),a(n.$parent,function(e){i.empty(),i.append(e)})}}}]).service("$modalStack",["$animate","$timeout","$document","$compile","$rootScope","$q","$injector","$$multiMap","$$stackedMap","$uibModalStack","$log","$modalSuppressWarning",function(e,t,n,i,r,o,a,s,l,u,c,d){d||c.warn("$modalStack is now deprecated. Use $uibModalStack instead."),angular.extend(this,u)}]).provider("$modal",["$uibModalProvider",function(e){angular.extend(this,e),this.$get=["$injector","$log","$modalSuppressWarning",function(t,n,i){return i||n.warn("$modal is now deprecated. Use $uibModal instead."),t.invoke(e.$get)}]}]),angular.module("ui.bootstrap.pagination",[]).controller("UibPaginationController",["$scope","$attrs","$parse",function(e,t,n){var i=this,r={$setViewValue:angular.noop},o=t.numPages?n(t.numPages).assign:angular.noop;this.init=function(a,s){r=a,this.config=s,r.$render=function(){i.render()},t.itemsPerPage?e.$parent.$watch(n(t.itemsPerPage),function(t){i.itemsPerPage=parseInt(t,10),e.totalPages=i.calculateTotalPages()}):this.itemsPerPage=s.itemsPerPage,e.$watch("totalItems",function(){e.totalPages=i.calculateTotalPages()}),e.$watch("totalPages",function(t){o(e.$parent,t),e.page>t?e.selectPage(t):r.$render()})},this.calculateTotalPages=function(){var t=this.itemsPerPage<1?1:Math.ceil(e.totalItems/this.itemsPerPage);return Math.max(t||0,1)},this.render=function(){e.page=parseInt(r.$viewValue,10)||1},e.selectPage=function(t,n){n&&n.preventDefault();var i=!e.ngDisabled||!n;i&&e.page!==t&&t>0&&t<=e.totalPages&&(n&&n.target&&n.target.blur(),r.$setViewValue(t),r.$render())},e.getText=function(t){return e[t+"Text"]||i.config[t+"Text"]},e.noPrevious=function(){return 1===e.page},e.noNext=function(){return e.page===e.totalPages}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("uibPagination",["$parse","uibPaginationConfig",function(e,t){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(e,t){return t.templateUrl||"template/pagination/pagination.html"},replace:!0,link:function(n,i,r,o){function a(e,t,n){return{number:e,text:t,active:n}}function s(e,t){var n=[],i=1,r=t,o=angular.isDefined(c)&&t>c;o&&(d?(i=Math.max(e-Math.floor(c/2),1),r=i+c-1,r>t&&(r=t,i=r-c+1)):(i=(Math.ceil(e/c)-1)*c+1,r=Math.min(i+c-1,t)));for(var s=i;r>=s;s++){var l=a(s,s,s===e);n.push(l)}if(o&&!d){if(i>1){var u=a(i-1,"...",!1);n.unshift(u)}if(t>r){var h=a(r+1,"...",!1);n.push(h)}}return n}var l=o[0],u=o[1];if(u){var c=angular.isDefined(r.maxSize)?n.$parent.$eval(r.maxSize):t.maxSize,d=angular.isDefined(r.rotate)?n.$parent.$eval(r.rotate):t.rotate;n.boundaryLinks=angular.isDefined(r.boundaryLinks)?n.$parent.$eval(r.boundaryLinks):t.boundaryLinks,n.directionLinks=angular.isDefined(r.directionLinks)?n.$parent.$eval(r.directionLinks):t.directionLinks,l.init(u,t),r.maxSize&&n.$parent.$watch(e(r.maxSize),function(e){c=parseInt(e,10),l.render()});var h=l.render;l.render=function(){h(),n.page>0&&n.page<=n.totalPages&&(n.pages=s(n.page,n.totalPages))}}}}}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"\xab Previous",nextText:"Next \xbb",align:!0}).directive("uibPager",["uibPagerConfig",function(e){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(e,t){return t.templateUrl||"template/pagination/pager.html"},replace:!0,link:function(t,n,i,r){var o=r[0],a=r[1];a&&(t.align=angular.isDefined(i.align)?t.$parent.$eval(i.align):e.align,o.init(a,e))}}}]),angular.module("ui.bootstrap.pagination").value("$paginationSuppressWarning",!1).controller("PaginationController",["$scope","$attrs","$parse","$log","$paginationSuppressWarning",function(e,t,n,i,r){r||i.warn("PaginationController is now deprecated. Use UibPaginationController instead.");var o=this,a={$setViewValue:angular.noop},s=t.numPages?n(t.numPages).assign:angular.noop;this.init=function(i,r){a=i,this.config=r,a.$render=function(){o.render()},t.itemsPerPage?e.$parent.$watch(n(t.itemsPerPage),function(t){o.itemsPerPage=parseInt(t,10),e.totalPages=o.calculateTotalPages()}):this.itemsPerPage=r.itemsPerPage,e.$watch("totalItems",function(){e.totalPages=o.calculateTotalPages()}),e.$watch("totalPages",function(t){s(e.$parent,t),e.page>t?e.selectPage(t):a.$render()})},this.calculateTotalPages=function(){var t=this.itemsPerPage<1?1:Math.ceil(e.totalItems/this.itemsPerPage);return Math.max(t||0,1)},this.render=function(){e.page=parseInt(a.$viewValue,10)||1},e.selectPage=function(t,n){n&&n.preventDefault();var i=!e.ngDisabled||!n;i&&e.page!==t&&t>0&&t<=e.totalPages&&(n&&n.target&&n.target.blur(),a.$setViewValue(t),a.$render())},e.getText=function(t){return e[t+"Text"]||o.config[t+"Text"]},e.noPrevious=function(){return 1===e.page},e.noNext=function(){return e.page===e.totalPages}}]).directive("pagination",["$parse","uibPaginationConfig","$log","$paginationSuppressWarning",function(e,t,n,i){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["pagination","?ngModel"],controller:"PaginationController",controllerAs:"pagination",templateUrl:function(e,t){return t.templateUrl||"template/pagination/pagination.html"},replace:!0,link:function(r,o,a,s){function l(e,t,n){return{number:e,text:t,active:n}}function u(e,t){var n=[],i=1,r=t,o=angular.isDefined(h)&&t>h;o&&(p?(i=Math.max(e-Math.floor(h/2),1),r=i+h-1,r>t&&(r=t,i=r-h+1)):(i=(Math.ceil(e/h)-1)*h+1,r=Math.min(i+h-1,t)));for(var a=i;r>=a;a++){var s=l(a,a,a===e);n.push(s)}if(o&&!p){if(i>1){var u=l(i-1,"...",!1);n.unshift(u)}if(t>r){var c=l(r+1,"...",!1);n.push(c)}}return n}i||n.warn("pagination is now deprecated. Use uib-pagination instead.");var c=s[0],d=s[1];if(d){var h=angular.isDefined(a.maxSize)?r.$parent.$eval(a.maxSize):t.maxSize,p=angular.isDefined(a.rotate)?r.$parent.$eval(a.rotate):t.rotate;r.boundaryLinks=angular.isDefined(a.boundaryLinks)?r.$parent.$eval(a.boundaryLinks):t.boundaryLinks,r.directionLinks=angular.isDefined(a.directionLinks)?r.$parent.$eval(a.directionLinks):t.directionLinks,c.init(d,t),a.maxSize&&r.$parent.$watch(e(a.maxSize),function(e){h=parseInt(e,10),c.render()});var f=c.render;c.render=function(){f(),r.page>0&&r.page<=r.totalPages&&(r.pages=u(r.page,r.totalPages))}}}}}]).directive("pager",["uibPagerConfig","$log","$paginationSuppressWarning",function(e,t,n){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["pager","?ngModel"],controller:"PaginationController",controllerAs:"pagination",templateUrl:function(e,t){return t.templateUrl||"template/pagination/pager.html"},replace:!0,link:function(i,r,o,a){n||t.warn("pager is now deprecated. Use uib-pager instead.");var s=a[0],l=a[1];l&&(i.align=angular.isDefined(o.align)?i.$parent.$eval(o.align):e.align,s.init(l,e))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function e(e){var t=/[A-Z]/g,n="-";return e.replace(t,function(e,t){return(t?n:"")+e.toLowerCase()})}var t={placement:"top",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},n={mouseenter:"mouseleave",click:"click",focus:"blur",none:""},i={};this.options=function(e){angular.extend(i,e)},this.setTriggers=function(e){angular.extend(n,e)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(r,o,a,s,l,u,c,d,h){var p=h.createNew();return s.on("keypress",function(e){if(27===e.which){var t=p.top();t&&(t.value.close(),p.removeTop(),t=null)}}),function(r,c,h,f){function m(e){var t=(e||f.trigger||h).split(" "),i=t.map(function(e){return n[e]||e});return{show:t,hide:i}}f=angular.extend({},t,i,f);var g=e(r),v=u.startSymbol(),y=u.endSymbol(),_="<div "+g+'-popup title="'+v+"title"+y+'" '+(f.useContentExp?'content-exp="contentExp()" ':'content="'+v+"content"+y+'" ')+'placement="'+v+"placement"+y+'" popup-class="'+v+"popupClass"+y+'" animation="animation" is-open="isOpen"origin-scope="origScope" style="visibility: hidden; display: block; top: -9999px; left: -9999px;"></div>';return{compile:function(e,t){var n=o(_);return function(e,t,i,o){function u(){P.isOpen?g():h()}function h(){(!B||e.$eval(i[c+"Enable"]))&&(b(),$(),P.popupDelay?E||(E=a(v,P.popupDelay,!1)):v())}function g(){y(),P.popupCloseDelay?L||(L=a(_,P.popupCloseDelay,!1)):_()}function v(){return y(),b(),P.content?(x(),void P.$evalAsync(function(){P.isOpen=!0,k(!0),H()})):angular.noop}function y(){E&&(a.cancel(E),E=null),F&&(a.cancel(F),F=null)}function _(){y(),b(),P&&P.$evalAsync(function(){P.isOpen=!1,k(!1),P.animation?D||(D=a(w,150,!1)):w()})}function b(){L&&(a.cancel(L),L=null),D&&(a.cancel(D),D=null)}function x(){T||(S=P.$new(),T=n(S,function(e){O?s.find("body").append(e):t.after(e)}),C())}function w(){A(),D=null,T&&(T.remove(),T=null),S&&(S.$destroy(),S=null)}function $(){P.title=i[c+"Title"],j?P.content=j(e):P.content=i[r],P.popupClass=i[c+"Class"],P.placement=angular.isDefined(i[c+"Placement"])?i[c+"Placement"]:f.placement;var t=parseInt(i[c+"PopupDelay"],10),n=parseInt(i[c+"PopupCloseDelay"],10);P.popupDelay=isNaN(t)?f.popupDelay:t,P.popupCloseDelay=isNaN(n)?f.popupCloseDelay:n}function k(t){Y&&angular.isFunction(Y.assign)&&Y.assign(e,t)}function C(){N.length=0,j?(N.push(e.$watch(j,function(e){P.content=e,!e&&P.isOpen&&_()})),N.push(S.$watch(function(){I||(I=!0,S.$$postDigest(function(){I=!1,P&&P.isOpen&&H()}))}))):N.push(i.$observe(r,function(e){P.content=e,!e&&P.isOpen?_():H()})),N.push(i.$observe(c+"Title",function(e){P.title=e,P.isOpen&&H()})),N.push(i.$observe(c+"Placement",function(e){P.placement=e?e:f.placement,P.isOpen&&H()}))}function A(){N.length&&(angular.forEach(N,function(e){e()}),N.length=0)}function M(){var e=i[c+"Trigger"];z(),R=m(e),"none"!==R.show&&R.show.forEach(function(e,n){e===R.hide[n]?t[0].addEventListener(e,u):e&&(t[0].addEventListener(e,h),R.hide[n].split(" ").forEach(function(e){t[0].addEventListener(e,g)})),t.on("keypress",function(e){27===e.which&&g()})})}var T,S,D,E,L,F,O=angular.isDefined(f.appendToBody)?f.appendToBody:!1,R=m(void 0),B=angular.isDefined(i[c+"Enable"]),P=e.$new(!0),I=!1,Y=angular.isDefined(i[c+"IsOpen"])?d(i[c+"IsOpen"]):!1,j=f.useContentExp?d(i[r]):!1,N=[],H=function(){T&&T.html()&&(F||(F=a(function(){T.css({top:0,left:0});var e=l.positionElements(t,T,P.placement,O);e.top+="px",e.left+="px",e.visibility="visible",T.css(e),F=null},0,!1)))};P.origScope=e,P.isOpen=!1,p.add(P,{close:_}),P.contentExp=function(){return P.content},i.$observe("disabled",function(e){e&&y(),e&&P.isOpen&&_()}),Y&&e.$watch(Y,function(e){P&&!e===P.isOpen&&u()});var z=function(){R.show.forEach(function(e){t.unbind(e,h)}),R.hide.forEach(function(e){e.split(" ").forEach(function(e){t[0].removeEventListener(e,g)})})};M();var q=e.$eval(i[c+"Animation"]);P.animation=angular.isDefined(q)?!!q:f.animation;var W=e.$eval(i[c+"AppendToBody"]);O=angular.isDefined(W)?W:O,O&&e.$on("$locationChangeSuccess",function(){P.isOpen&&_()}),e.$on("$destroy",function(){y(),b(),z(),w(),p.remove(P),P=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(e,t,n,i){return{link:function(r,o,a){var s,l,u,c=r.$eval(a.tooltipTemplateTranscludeScope),d=0,h=function(){l&&(l.remove(),l=null),s&&(s.$destroy(),s=null),u&&(e.leave(u).then(function(){l=null}),l=u,u=null)};r.$watch(t.parseAsResourceUrl(a.uibTooltipTemplateTransclude),function(t){var a=++d;t?(i(t,!0).then(function(i){if(a===d){var r=c.$new(),l=i,p=n(l)(r,function(t){h(),e.enter(t,o)});s=r,u=p,s.$emit("$includeContentLoaded",t)}},function(){a===d&&(h(),r.$emit("$includeContentError",t))}),r.$emit("$includeContentRequested",t)):h()}),r.$on("$destroy",h)}}}]).directive("uibTooltipClasses",function(){return{restrict:"A",link:function(e,t,n){e.placement&&t.addClass(e.placement),e.popupClass&&t.addClass(e.popupClass),e.animation()&&t.addClass(n.tooltipAnimationClass)}}}).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html",link:function(e,t){t.addClass("tooltip")}}}).directive("uibTooltip",["$uibTooltip",function(e){return e("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/tooltip/tooltip-template-popup.html",link:function(e,t){t.addClass("tooltip")}}}).directive("uibTooltipTemplate",["$uibTooltip",function(e){return e("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-popup.html",link:function(e,t){t.addClass("tooltip")}}}).directive("uibTooltipHtml",["$uibTooltip",function(e){return e("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.tooltip").value("$tooltipSuppressWarning",!1).provider("$tooltip",["$uibTooltipProvider",function(e){angular.extend(this,e),this.$get=["$log","$tooltipSuppressWarning","$injector",function(t,n,i){return n||t.warn("$tooltip is now deprecated. Use $uibTooltip instead."),i.invoke(e.$get)}]}]).directive("tooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest","$log","$tooltipSuppressWarning",function(e,t,n,i,r,o){return{link:function(a,s,l){o||r.warn("tooltip-template-transclude is now deprecated. Use uib-tooltip-template-transclude instead.");var u,c,d,h=a.$eval(l.tooltipTemplateTranscludeScope),p=0,f=function(){c&&(c.remove(),c=null),u&&(u.$destroy(),u=null),d&&(e.leave(d).then(function(){c=null}),c=d,d=null)};a.$watch(t.parseAsResourceUrl(l.tooltipTemplateTransclude),function(t){var r=++p;t?(i(t,!0).then(function(i){if(r===p){var o=h.$new(),a=i,l=n(a)(o,function(t){f(),e.enter(t,s)});u=o,d=l,u.$emit("$includeContentLoaded",t)}},function(){r===p&&(f(),a.$emit("$includeContentError",t))}),a.$emit("$includeContentRequested",t)):f()}),a.$on("$destroy",f)}}}]).directive("tooltipClasses",["$log","$tooltipSuppressWarning",function(e,t){return{restrict:"A",link:function(n,i,r){t||e.warn("tooltip-classes is now deprecated. Use uib-tooltip-classes instead."),n.placement&&i.addClass(n.placement),n.popupClass&&i.addClass(n.popupClass),n.animation()&&i.addClass(r.tooltipAnimationClass)}}}]).directive("tooltipPopup",["$log","$tooltipSuppressWarning",function(e,t){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html",link:function(n,i){t||e.warn("tooltip-popup is now deprecated. Use uib-tooltip-popup instead."),i.addClass("tooltip")}}}]).directive("tooltip",["$tooltip",function(e){return e("tooltip","tooltip","mouseenter")}]).directive("tooltipTemplatePopup",["$log","$tooltipSuppressWarning",function(e,t){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/tooltip/tooltip-template-popup.html",link:function(n,i){t||e.warn("tooltip-template-popup is now deprecated. Use uib-tooltip-template-popup instead."),i.addClass("tooltip")}}}]).directive("tooltipTemplate",["$tooltip",function(e){return e("tooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("tooltipHtmlPopup",["$log","$tooltipSuppressWarning",function(e,t){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-popup.html",link:function(n,i){t||e.warn("tooltip-html-popup is now deprecated. Use uib-tooltip-html-popup instead."),i.addClass("tooltip")}}}]).directive("tooltipHtml",["$tooltip",function(e){return e("tooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/popover/popover-template.html",link:function(e,t){t.addClass("popover")}}}).directive("uibPopoverTemplate",["$uibTooltip",function(e){return e("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover-html.html",link:function(e,t){t.addClass("popover")}}}).directive("uibPopoverHtml",["$uibTooltip",function(e){return e("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html",link:function(e,t){t.addClass("popover")}}}).directive("uibPopover",["$uibTooltip",function(e){return e("uibPopover","popover","click")}]),angular.module("ui.bootstrap.popover").value("$popoverSuppressWarning",!1).directive("popoverTemplatePopup",["$log","$popoverSuppressWarning",function(e,t){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/popover/popover-template.html",link:function(n,i){t||e.warn("popover-template-popup is now deprecated. Use uib-popover-template-popup instead."),i.addClass("popover")}}}]).directive("popoverTemplate",["$tooltip",function(e){return e("popoverTemplate","popover","click",{useContentExp:!0})}]).directive("popoverHtmlPopup",["$log","$popoverSuppressWarning",function(e,t){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover-html.html",link:function(n,i){t||e.warn("popover-html-popup is now deprecated. Use uib-popover-html-popup instead."),i.addClass("popover")}}}]).directive("popoverHtml",["$tooltip",function(e){return e("popoverHtml","popover","click",{useContentExp:!0})}]).directive("popoverPopup",["$log","$popoverSuppressWarning",function(e,t){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html",link:function(n,i){t||e.warn("popover-popup is now deprecated. Use uib-popover-popup instead."),i.addClass("popover")}}}]).directive("popover",["$tooltip",function(e){return e("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(e,t,n){var i=this,r=angular.isDefined(t.animate)?e.$parent.$eval(t.animate):n.animate;this.bars=[],e.max=angular.isDefined(e.max)?e.max:n.max,this.addBar=function(t,n,o){r||n.css({transition:"none"}),this.bars.push(t),t.max=e.max,t.title=o&&angular.isDefined(o.title)?o.title:"progressbar",t.$watch("value",function(e){t.recalculatePercentage()}),t.recalculatePercentage=function(){var e=i.bars.reduce(function(e,t){return t.percent=+(100*t.value/t.max).toFixed(2),e+t.percent},0);e>100&&(t.percent-=e-100)},t.$on("$destroy",function(){n=null,i.removeBar(t)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1),this.bars.forEach(function(e){e.recalculatePercentage()})},e.$watch("max",function(t){i.bars.forEach(function(t){t.max=e.max,t.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(e,t,n,i){i.addBar(e,t,n)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(e,t,n,i){i.addBar(e,angular.element(t.children()[0]),{title:n.title})}}}),angular.module("ui.bootstrap.progressbar").value("$progressSuppressWarning",!1).controller("ProgressController",["$scope","$attrs","uibProgressConfig","$log","$progressSuppressWarning",function(e,t,n,i,r){r||i.warn("ProgressController is now deprecated. Use UibProgressController instead.");var o=this,a=angular.isDefined(t.animate)?e.$parent.$eval(t.animate):n.animate;this.bars=[],e.max=angular.isDefined(e.max)?e.max:n.max,this.addBar=function(t,n,i){a||n.css({transition:"none"}),this.bars.push(t),t.max=e.max,t.title=i&&angular.isDefined(i.title)?i.title:"progressbar",t.$watch("value",function(e){t.recalculatePercentage()}),t.recalculatePercentage=function(){t.percent=+(100*t.value/t.max).toFixed(2);var e=o.bars.reduce(function(e,t){return e+t.percent},0);e>100&&(t.percent-=e-100)},t.$on("$destroy",function(){n=null,o.removeBar(t)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1)},e.$watch("max",function(t){o.bars.forEach(function(t){t.max=e.max,t.recalculatePercentage()})})}]).directive("progress",["$log","$progressSuppressWarning",function(e,t){return{replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{max:"=?",title:"@?"},templateUrl:"template/progressbar/progress.html",link:function(){t||e.warn("progress is now deprecated. Use uib-progress instead.")}}}]).directive("bar",["$log","$progressSuppressWarning",function(e,t){return{replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(n,i,r,o){t||e.warn("bar is now deprecated. Use uib-bar instead."),o.addBar(n,i)}}}]).directive("progressbar",["$log","$progressSuppressWarning",function(e,t){return{replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(n,i,r,o){t||e.warn("progressbar is now deprecated. Use uib-progressbar instead."),o.addBar(n,angular.element(i.children()[0]),{title:r.title})}}}]),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(e,t,n){var i={$setViewValue:angular.noop};this.init=function(r){i=r,i.$render=this.render,i.$formatters.push(function(e){return angular.isNumber(e)&&e<<0!==e&&(e=Math.round(e)),e}),this.stateOn=angular.isDefined(t.stateOn)?e.$parent.$eval(t.stateOn):n.stateOn,this.stateOff=angular.isDefined(t.stateOff)?e.$parent.$eval(t.stateOff):n.stateOff;var o=angular.isDefined(t.titles)?e.$parent.$eval(t.titles):n.titles;this.titles=angular.isArray(o)&&o.length>0?o:n.titles;var a=angular.isDefined(t.ratingStates)?e.$parent.$eval(t.ratingStates):new Array(angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max);e.range=this.buildTemplateObjects(a)},this.buildTemplateObjects=function(e){for(var t=0,n=e.length;n>t;t++)e[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(t)},e[t]);return e},this.getTitle=function(e){return e>=this.titles.length?e+1:this.titles[e]},e.rate=function(t){!e.readonly&&t>=0&&t<=e.range.length&&(i.$setViewValue(i.$viewValue===t?0:t),i.$render())},e.enter=function(t){e.readonly||(e.value=t),e.onHover({value:t})},e.reset=function(){e.value=i.$viewValue,e.onLeave()},e.onKeydown=function(t){/(37|38|39|40)/.test(t.which)&&(t.preventDefault(),t.stopPropagation(),e.rate(e.value+(38===t.which||39===t.which?1:-1)))},this.render=function(){e.value=i.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(e,t,n,i){var r=i[0],o=i[1];r.init(o)}}}),angular.module("ui.bootstrap.rating").value("$ratingSuppressWarning",!1).controller("RatingController",["$scope","$attrs","$controller","$log","$ratingSuppressWarning",function(e,t,n,i,r){r||i.warn("RatingController is now deprecated. Use UibRatingController instead."),angular.extend(this,n("UibRatingController",{$scope:e,$attrs:t}))}]).directive("rating",["$log","$ratingSuppressWarning",function(e,t){return{require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(n,i,r,o){t||e.warn("rating is now deprecated. Use uib-rating instead.");var a=o[0],s=o[1];a.init(s)}}}]),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(e){var t=this,n=t.tabs=e.tabs=[];t.select=function(e){angular.forEach(n,function(t){t.active&&t!==e&&(t.active=!1,t.onDeselect(),e.selectCalled=!1)}),e.active=!0,e.selectCalled||(e.onSelect(),e.selectCalled=!0)},t.addTab=function(e){n.push(e),1===n.length&&e.active!==!1?e.active=!0:e.active?t.select(e):e.active=!1},t.removeTab=function(e){var r=n.indexOf(e);if(e.active&&n.length>1&&!i){var o=r==n.length-1?r-1:r+1;t.select(n[o])}n.splice(r,1)};var i;e.$on("$destroy",function(){i=!0})}]).directive("uibTabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"template/tabs/tabset.html",link:function(e,t,n){e.vertical=angular.isDefined(n.vertical)?e.$parent.$eval(n.vertical):!1,e.justified=angular.isDefined(n.justified)?e.$parent.$eval(n.justified):!1}}}).directive("uibTab",["$parse",function(e){return{require:"^uibTabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},link:function(t,n,i,r,o){t.$watch("active",function(e){e&&r.select(t)}),t.disabled=!1,i.disable&&t.$parent.$watch(e(i.disable),function(e){t.disabled=!!e}),t.select=function(){t.disabled||(t.active=!0)},r.addTab(t),t.$on("$destroy",function(){r.removeTab(t)}),t.$transcludeFn=o}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:["?^uibTab","?^tab"],link:function(e,t){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}).directive("uibTabContentTransclude",function(){function e(e){return e.tagName&&(e.hasAttribute("tab-heading")||e.hasAttribute("data-tab-heading")||e.hasAttribute("x-tab-heading")||e.hasAttribute("uib-tab-heading")||e.hasAttribute("data-uib-tab-heading")||e.hasAttribute("x-uib-tab-heading")||"tab-heading"===e.tagName.toLowerCase()||"data-tab-heading"===e.tagName.toLowerCase()||"x-tab-heading"===e.tagName.toLowerCase()||"uib-tab-heading"===e.tagName.toLowerCase()||"data-uib-tab-heading"===e.tagName.toLowerCase()||"x-uib-tab-heading"===e.tagName.toLowerCase());
|
134
|
+
}return{restrict:"A",require:["?^uibTabset","?^tabset"],link:function(t,n,i){var r=t.$eval(i.uibTabContentTransclude);r.$transcludeFn(r.$parent,function(t){angular.forEach(t,function(t){e(t)?r.headingElement=t:n.append(t)})})}}}),angular.module("ui.bootstrap.tabs").value("$tabsSuppressWarning",!1).controller("TabsetController",["$scope","$controller","$log","$tabsSuppressWarning",function(e,t,n,i){i||n.warn("TabsetController is now deprecated. Use UibTabsetController instead."),angular.extend(this,t("UibTabsetController",{$scope:e}))}]).directive("tabset",["$log","$tabsSuppressWarning",function(e,t){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(n,i,r){t||e.warn("tabset is now deprecated. Use uib-tabset instead."),n.vertical=angular.isDefined(r.vertical)?n.$parent.$eval(r.vertical):!1,n.justified=angular.isDefined(r.justified)?n.$parent.$eval(r.justified):!1}}}]).directive("tab",["$parse","$log","$tabsSuppressWarning",function(e,t,n){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},link:function(i,r,o,a,s){n||t.warn("tab is now deprecated. Use uib-tab instead."),i.$watch("active",function(e){e&&a.select(i)}),i.disabled=!1,o.disable&&i.$parent.$watch(e(o.disable),function(e){i.disabled=!!e}),i.select=function(){i.disabled||(i.active=!0)},a.addTab(i),i.$on("$destroy",function(){a.removeTab(i)}),i.$transcludeFn=s}}}]).directive("tabHeadingTransclude",["$log","$tabsSuppressWarning",function(e,t){return{restrict:"A",require:"^tab",link:function(n,i){t||e.warn("tab-heading-transclude is now deprecated. Use uib-tab-heading-transclude instead."),n.$watch("headingElement",function(e){e&&(i.html(""),i.append(e))})}}}]).directive("tabContentTransclude",["$log","$tabsSuppressWarning",function(e,t){function n(e){return e.tagName&&(e.hasAttribute("tab-heading")||e.hasAttribute("data-tab-heading")||e.hasAttribute("x-tab-heading")||"tab-heading"===e.tagName.toLowerCase()||"data-tab-heading"===e.tagName.toLowerCase()||"x-tab-heading"===e.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(i,r,o){t||e.warn("tab-content-transclude is now deprecated. Use uib-tab-content-transclude instead.");var a=i.$eval(o.tabContentTransclude);a.$transcludeFn(a.$parent,function(e){angular.forEach(e,function(e){n(e)?a.headingElement=e:r.append(e)})})}}}]),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(e,t,n,i,r,o,a){function s(){var t=parseInt(e.hours,10),n=e.showMeridian?t>0&&13>t:t>=0&&24>t;return n?(e.showMeridian&&(12===t&&(t=0),e.meridian===v[1]&&(t+=12)),t):void 0}function l(){var t=parseInt(e.minutes,10);return t>=0&&60>t?t:void 0}function u(e){return angular.isDefined(e)&&e.toString().length<2?"0"+e:e.toString()}function c(e){d(),g.$setViewValue(new Date(m)),h(e)}function d(){g.$setValidity("time",!0),e.invalidHours=!1,e.invalidMinutes=!1}function h(t){var n=m.getHours(),i=m.getMinutes();e.showMeridian&&(n=0===n||12===n?12:n%12),e.hours="h"===t?n:u(n),"m"!==t&&(e.minutes=u(i)),e.meridian=m.getHours()<12?v[0]:v[1]}function p(e,t){var n=new Date(e.getTime()+6e4*t),i=new Date(e);return i.setHours(n.getHours(),n.getMinutes()),i}function f(e){m=p(m,e),c()}var m=new Date,g={$setViewValue:angular.noop},v=angular.isDefined(n.meridians)?e.$parent.$eval(n.meridians):a.meridians||o.DATETIME_FORMATS.AMPMS;e.tabindex=angular.isDefined(n.tabindex)?n.tabindex:0,t.removeAttr("tabindex"),this.init=function(t,i){g=t,g.$render=this.render,g.$formatters.unshift(function(e){return e?new Date(e):null});var r=i.eq(0),o=i.eq(1),s=angular.isDefined(n.mousewheel)?e.$parent.$eval(n.mousewheel):a.mousewheel;s&&this.setupMousewheelEvents(r,o);var l=angular.isDefined(n.arrowkeys)?e.$parent.$eval(n.arrowkeys):a.arrowkeys;l&&this.setupArrowkeyEvents(r,o),e.readonlyInput=angular.isDefined(n.readonlyInput)?e.$parent.$eval(n.readonlyInput):a.readonlyInput,this.setupInputEvents(r,o)};var y=a.hourStep;n.hourStep&&e.$parent.$watch(i(n.hourStep),function(e){y=parseInt(e,10)});var _=a.minuteStep;n.minuteStep&&e.$parent.$watch(i(n.minuteStep),function(e){_=parseInt(e,10)});var b;e.$parent.$watch(i(n.min),function(e){var t=new Date(e);b=isNaN(t)?void 0:t});var x;e.$parent.$watch(i(n.max),function(e){var t=new Date(e);x=isNaN(t)?void 0:t}),e.noIncrementHours=function(){var e=p(m,60*y);return e>x||m>e&&b>e},e.noDecrementHours=function(){var e=p(m,60*-y);return b>e||e>m&&e>x},e.noIncrementMinutes=function(){var e=p(m,_);return e>x||m>e&&b>e},e.noDecrementMinutes=function(){var e=p(m,-_);return b>e||e>m&&e>x},e.noToggleMeridian=function(){return m.getHours()<13?p(m,720)>x:p(m,-720)<b},e.showMeridian=a.showMeridian,n.showMeridian&&e.$parent.$watch(i(n.showMeridian),function(t){if(e.showMeridian=!!t,g.$error.time){var n=s(),i=l();angular.isDefined(n)&&angular.isDefined(i)&&(m.setHours(n),c())}else h()}),this.setupMousewheelEvents=function(t,n){var i=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||t>0};t.bind("mousewheel wheel",function(t){e.$apply(i(t)?e.incrementHours():e.decrementHours()),t.preventDefault()}),n.bind("mousewheel wheel",function(t){e.$apply(i(t)?e.incrementMinutes():e.decrementMinutes()),t.preventDefault()})},this.setupArrowkeyEvents=function(t,n){t.bind("keydown",function(t){38===t.which?(t.preventDefault(),e.incrementHours(),e.$apply()):40===t.which&&(t.preventDefault(),e.decrementHours(),e.$apply())}),n.bind("keydown",function(t){38===t.which?(t.preventDefault(),e.incrementMinutes(),e.$apply()):40===t.which&&(t.preventDefault(),e.decrementMinutes(),e.$apply())})},this.setupInputEvents=function(t,n){if(e.readonlyInput)return e.updateHours=angular.noop,void(e.updateMinutes=angular.noop);var i=function(t,n){g.$setViewValue(null),g.$setValidity("time",!1),angular.isDefined(t)&&(e.invalidHours=t),angular.isDefined(n)&&(e.invalidMinutes=n)};e.updateHours=function(){var e=s(),t=l();angular.isDefined(e)&&angular.isDefined(t)?(m.setHours(e),b>m||m>x?i(!0):c("h")):i(!0)},t.bind("blur",function(t){!e.invalidHours&&e.hours<10&&e.$apply(function(){e.hours=u(e.hours)})}),e.updateMinutes=function(){var e=l(),t=s();angular.isDefined(e)&&angular.isDefined(t)?(m.setMinutes(e),b>m||m>x?i(void 0,!0):c("m")):i(void 0,!0)},n.bind("blur",function(t){!e.invalidMinutes&&e.minutes<10&&e.$apply(function(){e.minutes=u(e.minutes)})})},this.render=function(){var t=g.$viewValue;isNaN(t)?(g.$setValidity("time",!1),r.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(t&&(m=t),b>m||m>x?(g.$setValidity("time",!1),e.invalidHours=!0,e.invalidMinutes=!0):d(),h())},e.showSpinners=angular.isDefined(n.showSpinners)?e.$parent.$eval(n.showSpinners):a.showSpinners,e.incrementHours=function(){e.noIncrementHours()||f(60*y)},e.decrementHours=function(){e.noDecrementHours()||f(60*-y)},e.incrementMinutes=function(){e.noIncrementMinutes()||f(_)},e.decrementMinutes=function(){e.noDecrementMinutes()||f(-_)},e.toggleMeridian=function(){e.noToggleMeridian()||f(720*(m.getHours()<12?1:-1))}}]).directive("uibTimepicker",function(){return{restrict:"EA",require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(e,t){return t.templateUrl||"template/timepicker/timepicker.html"},link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o,t.find("input"))}}}),angular.module("ui.bootstrap.timepicker").value("$timepickerSuppressWarning",!1).controller("TimepickerController",["$scope","$element","$attrs","$controller","$log","$timepickerSuppressWarning",function(e,t,n,i,r,o){o||r.warn("TimepickerController is now deprecated. Use UibTimepickerController instead."),angular.extend(this,i("UibTimepickerController",{$scope:e,$element:t,$attrs:n}))}]).directive("timepicker",["$log","$timepickerSuppressWarning",function(e,t){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(e,t){return t.templateUrl||"template/timepicker/timepicker.html"},link:function(n,i,r,o){t||e.warn("timepicker is now deprecated. Use uib-timepicker instead.");var a=o[0],s=o[1];s&&a.init(s,i.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(e){var t=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var i=n.match(t);if(!i)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:i[3],source:e(i[4]),viewMapper:e(i[2]||i[1]),modelMapper:e(i[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$uibPosition","uibTypeaheadParser",function(e,t,n,i,r,o,a,s,l,u,c,d){function h(){B.moveInProgress||(B.moveInProgress=!0,B.$digest()),q&&a.cancel(q),q=a(function(){B.matches.length&&p(),B.moveInProgress=!1},v)}function p(){B.position=T?c.offset(t):c.position(t),B.position.top+=t.prop("offsetHeight")}var f,m,g=[9,13,27,38,40],v=200,y=e.$eval(n.typeaheadMinLength);y||0===y||(y=1);var _,b,x=e.$eval(n.typeaheadWaitMs)||0,w=e.$eval(n.typeaheadEditable)!==!1,$=r(n.typeaheadLoading).assign||angular.noop,k=r(n.typeaheadOnSelect),C=angular.isDefined(n.typeaheadSelectOnBlur)?e.$eval(n.typeaheadSelectOnBlur):!1,A=r(n.typeaheadNoResults).assign||angular.noop,M=n.typeaheadInputFormatter?r(n.typeaheadInputFormatter):void 0,T=n.typeaheadAppendToBody?e.$eval(n.typeaheadAppendToBody):!1,S=n.typeaheadAppendToElementId||!1,D=e.$eval(n.typeaheadFocusFirst)!==!1,E=n.typeaheadSelectOnExact?e.$eval(n.typeaheadSelectOnExact):!1,L=r(n.ngModel),F=r(n.ngModel+"($$$p)"),O=function(t,n){return angular.isFunction(L(e))&&m&&m.$options&&m.$options.getterSetter?F(t,{$$$p:n}):L.assign(t,n)},R=d.parse(n.uibTypeahead),B=e.$new(),P=e.$on("$destroy",function(){B.$destroy()});B.$on("$destroy",P);var I="typeahead-"+B.$id+"-"+Math.floor(1e4*Math.random());t.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":I});var Y=angular.element("<div uib-typeahead-popup></div>");Y.attr({id:I,matches:"matches",active:"activeIdx",select:"select(activeIdx)","move-in-progress":"moveInProgress",query:"query",position:"position"}),angular.isDefined(n.typeaheadTemplateUrl)&&Y.attr("template-url",n.typeaheadTemplateUrl),angular.isDefined(n.typeaheadPopupTemplateUrl)&&Y.attr("popup-template-url",n.typeaheadPopupTemplateUrl);var j=function(){B.matches=[],B.activeIdx=-1,t.attr("aria-expanded",!1)},N=function(e){return I+"-option-"+e};B.$watch("activeIdx",function(e){0>e?t.removeAttr("aria-activedescendant"):t.attr("aria-activedescendant",N(e))});var H=function(e,t){return B.matches.length>t&&e?e.toUpperCase()===B.matches[t].label.toUpperCase():!1},z=function(n){var i={$viewValue:n};$(e,!0),A(e,!1),o.when(R.source(e,i)).then(function(r){var o=n===f.$viewValue;if(o&&_)if(r&&r.length>0){B.activeIdx=D?0:-1,A(e,!1),B.matches.length=0;for(var a=0;a<r.length;a++)i[R.itemName]=r[a],B.matches.push({id:N(a),label:R.viewMapper(B,i),model:r[a]});B.query=n,p(),t.attr("aria-expanded",!0),E&&1===B.matches.length&&H(n,0)&&B.select(0)}else j(),A(e,!0);o&&$(e,!1)},function(){j(),$(e,!1),A(e,!0)})};T&&(angular.element(l).bind("resize",h),s.find("body").bind("scroll",h));var q;B.moveInProgress=!1,B.query=void 0;var W,U=function(e){W=a(function(){z(e)},x)},V=function(){W&&a.cancel(W)};j(),B.select=function(i){var r,o,s={};b=!0,s[R.itemName]=o=B.matches[i].model,r=R.modelMapper(e,s),O(e,r),f.$setValidity("editable",!0),f.$setValidity("parse",!0),k(e,{$item:o,$model:r,$label:R.viewMapper(e,s)}),j(),B.$eval(n.typeaheadFocusOnSelect)!==!1&&a(function(){t[0].focus()},0,!1)},t.bind("keydown",function(e){if(0!==B.matches.length&&-1!==g.indexOf(e.which)){if(-1===B.activeIdx&&(9===e.which||13===e.which))return j(),void B.$digest();e.preventDefault(),40===e.which?(B.activeIdx=(B.activeIdx+1)%B.matches.length,B.$digest()):38===e.which?(B.activeIdx=(B.activeIdx>0?B.activeIdx:B.matches.length)-1,B.$digest()):13===e.which||9===e.which?B.$apply(function(){B.select(B.activeIdx)}):27===e.which&&(e.stopPropagation(),j(),B.$digest())}}),t.bind("blur",function(){C&&B.matches.length&&-1!==B.activeIdx&&!b&&(b=!0,B.$apply(function(){B.select(B.activeIdx)})),_=!1,b=!1});var X=function(e){t[0]!==e.target&&3!==e.which&&0!==B.matches.length&&(j(),u.$$phase||B.$digest())};s.bind("click",X),e.$on("$destroy",function(){s.unbind("click",X),(T||S)&&G.remove(),T&&(angular.element(l).unbind("resize",h),s.find("body").unbind("scroll",h)),Y.remove()});var G=i(Y)(B);T?s.find("body").append(G):S!==!1?angular.element(s[0].getElementById(S)).append(G):t.after(G),this.init=function(t,n){f=t,m=n,f.$parsers.unshift(function(t){return _=!0,0===y||t&&t.length>=y?x>0?(V(),U(t)):z(t):($(e,!1),V(),j()),w?t:t?void f.$setValidity("editable",!1):(f.$setValidity("editable",!0),null)}),f.$formatters.push(function(t){var n,i,r={};return w||f.$setValidity("editable",!0),M?(r.$model=t,M(e,r)):(r[R.itemName]=t,n=R.viewMapper(e,r),r[R.itemName]=void 0,i=R.viewMapper(e,r),n!==i?n:t)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(e,t,n,i){i[2].init(i[0],i[1])}}}).directive("uibTypeaheadPopup",function(){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&"},replace:!0,templateUrl:function(e,t){return t.popupTemplateUrl||"template/typeahead/typeahead-popup.html"},link:function(e,t,n){e.templateUrl=n.templateUrl,e.isOpen=function(){return e.matches.length>0},e.isActive=function(t){return e.active==t},e.selectActive=function(t){e.active=t},e.selectMatch=function(t){e.select({activeIdx:t})}}}}).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(e,t,n){return{scope:{index:"=",match:"=",query:"="},link:function(i,r,o){var a=n(o.templateUrl)(i.$parent)||"template/typeahead/typeahead-match.html";e(a).then(function(e){t(e.trim())(i,function(e){r.replaceWith(e)})})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(e,t,n){function i(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function r(e){return/<.*>/g.test(e)}var o;return o=t.has("$sanitize"),function(t,a){return!o&&r(t)&&n.warn("Unsafe use of typeahead please use ngSanitize"),t=a?(""+t).replace(new RegExp(i(a),"gi"),"<strong>$&</strong>"):t,o||(t=e.trustAsHtml(t)),t}}]),angular.module("ui.bootstrap.typeahead").value("$typeaheadSuppressWarning",!1).service("typeaheadParser",["$parse","uibTypeaheadParser","$log","$typeaheadSuppressWarning",function(e,t,n,i){return i||n.warn("typeaheadParser is now deprecated. Use uibTypeaheadParser instead."),t}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$window","$rootScope","$uibPosition","typeaheadParser","$log","$typeaheadSuppressWarning",function(e,t,n,i,r,o,a,s,l,u,c){var d=[9,13,27,38,40],h=200;return{require:["ngModel","^?ngModelOptions"],link:function(p,f,m,g){function v(){Y.moveInProgress||(Y.moveInProgress=!0,Y.$digest()),V&&i.cancel(V),V=i(function(){Y.matches.length&&y(),Y.moveInProgress=!1},h)}function y(){Y.position=E?s.offset(f):s.position(f),Y.position.top+=f.prop("offsetHeight")}c||u.warn("typeahead is now deprecated. Use uib-typeahead instead.");var _=g[0],b=g[1],x=p.$eval(m.typeaheadMinLength);x||0===x||(x=1);var w,$,k=p.$eval(m.typeaheadWaitMs)||0,C=p.$eval(m.typeaheadEditable)!==!1,A=t(m.typeaheadLoading).assign||angular.noop,M=t(m.typeaheadOnSelect),T=angular.isDefined(m.typeaheadSelectOnBlur)?p.$eval(m.typeaheadSelectOnBlur):!1,S=t(m.typeaheadNoResults).assign||angular.noop,D=m.typeaheadInputFormatter?t(m.typeaheadInputFormatter):void 0,E=m.typeaheadAppendToBody?p.$eval(m.typeaheadAppendToBody):!1,L=m.typeaheadAppendToElementId||!1,F=p.$eval(m.typeaheadFocusFirst)!==!1,O=m.typeaheadSelectOnExact?p.$eval(m.typeaheadSelectOnExact):!1,R=t(m.ngModel),B=t(m.ngModel+"($$$p)"),P=function(e,t){return angular.isFunction(R(p))&&b&&b.$options&&b.$options.getterSetter?B(e,{$$$p:t}):R.assign(e,t)},I=l.parse(m.typeahead),Y=p.$new(),j=p.$on("$destroy",function(){Y.$destroy()});Y.$on("$destroy",j);var N="typeahead-"+Y.$id+"-"+Math.floor(1e4*Math.random());f.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":N});var H=angular.element("<div typeahead-popup></div>");H.attr({id:N,matches:"matches",active:"activeIdx",select:"select(activeIdx)","move-in-progress":"moveInProgress",query:"query",position:"position"}),angular.isDefined(m.typeaheadTemplateUrl)&&H.attr("template-url",m.typeaheadTemplateUrl),angular.isDefined(m.typeaheadPopupTemplateUrl)&&H.attr("popup-template-url",m.typeaheadPopupTemplateUrl);var z=function(){Y.matches=[],Y.activeIdx=-1,f.attr("aria-expanded",!1)},q=function(e){return N+"-option-"+e};Y.$watch("activeIdx",function(e){0>e?f.removeAttr("aria-activedescendant"):f.attr("aria-activedescendant",q(e))});var W=function(e,t){return Y.matches.length>t&&e?e.toUpperCase()===Y.matches[t].label.toUpperCase():!1},U=function(e){var t={$viewValue:e};A(p,!0),S(p,!1),n.when(I.source(p,t)).then(function(n){var i=e===_.$viewValue;if(i&&w)if(n&&n.length>0){Y.activeIdx=F?0:-1,S(p,!1),Y.matches.length=0;for(var r=0;r<n.length;r++)t[I.itemName]=n[r],Y.matches.push({id:q(r),label:I.viewMapper(Y,t),model:n[r]});Y.query=e,y(),f.attr("aria-expanded",!0),O&&1===Y.matches.length&&W(e,0)&&Y.select(0)}else z(),S(p,!0);i&&A(p,!1)},function(){z(),A(p,!1),S(p,!0)})};E&&(angular.element(o).bind("resize",v),r.find("body").bind("scroll",v));var V;Y.moveInProgress=!1,z(),Y.query=void 0;var X,G=function(e){X=i(function(){U(e)},k)},K=function(){X&&i.cancel(X)};_.$parsers.unshift(function(e){return w=!0,0===x||e&&e.length>=x?k>0?(K(),G(e)):U(e):(A(p,!1),K(),z()),C?e:e?void _.$setValidity("editable",!1):(_.$setValidity("editable",!0),null)}),_.$formatters.push(function(e){var t,n,i={};return C||_.$setValidity("editable",!0),D?(i.$model=e,D(p,i)):(i[I.itemName]=e,t=I.viewMapper(p,i),i[I.itemName]=void 0,n=I.viewMapper(p,i),t!==n?t:e)}),Y.select=function(e){var t,n,r={};$=!0,r[I.itemName]=n=Y.matches[e].model,t=I.modelMapper(p,r),P(p,t),_.$setValidity("editable",!0),_.$setValidity("parse",!0),M(p,{$item:n,$model:t,$label:I.viewMapper(p,r)}),z(),Y.$eval(m.typeaheadFocusOnSelect)!==!1&&i(function(){f[0].focus()},0,!1)},f.bind("keydown",function(e){if(0!==Y.matches.length&&-1!==d.indexOf(e.which)){if(-1===Y.activeIdx&&(9===e.which||13===e.which))return z(),void Y.$digest();e.preventDefault(),40===e.which?(Y.activeIdx=(Y.activeIdx+1)%Y.matches.length,Y.$digest()):38===e.which?(Y.activeIdx=(Y.activeIdx>0?Y.activeIdx:Y.matches.length)-1,Y.$digest()):13===e.which||9===e.which?Y.$apply(function(){Y.select(Y.activeIdx)}):27===e.which&&(e.stopPropagation(),z(),Y.$digest())}}),f.bind("blur",function(){T&&Y.matches.length&&-1!==Y.activeIdx&&!$&&($=!0,Y.$apply(function(){Y.select(Y.activeIdx)})),w=!1,$=!1});var J=function(e){f[0]!==e.target&&3!==e.which&&0!==Y.matches.length&&(z(),a.$$phase||Y.$digest())};r.bind("click",J),p.$on("$destroy",function(){r.unbind("click",J),(E||L)&&Q.remove(),E&&(angular.element(o).unbind("resize",v),r.find("body").unbind("scroll",v)),H.remove()});var Q=e(H)(Y);E?r.find("body").append(Q):L!==!1?angular.element(r[0].getElementById(L)).append(Q):f.after(Q)}}}]).directive("typeaheadPopup",["$typeaheadSuppressWarning","$log",function(e,t){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&"},replace:!0,templateUrl:function(e,t){return t.popupTemplateUrl||"template/typeahead/typeahead-popup.html"},link:function(n,i,r){e||t.warn("typeahead-popup is now deprecated. Use uib-typeahead-popup instead."),n.templateUrl=r.templateUrl,n.isOpen=function(){return n.matches.length>0},n.isActive=function(e){return n.active==e},n.selectActive=function(e){n.active=e},n.selectMatch=function(e){n.select({activeIdx:e})}}}}]).directive("typeaheadMatch",["$templateRequest","$compile","$parse","$typeaheadSuppressWarning","$log",function(e,t,n,i,r){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(o,a,s){i||r.warn("typeahead-match is now deprecated. Use uib-typeahead-match instead.");var l=n(s.templateUrl)(o.$parent)||"template/typeahead/typeahead-match.html";e(l).then(function(e){t(e.trim())(o,function(e){a.replaceWith(e)})})}}}]).filter("typeaheadHighlight",["$sce","$injector","$log","$typeaheadSuppressWarning",function(e,t,n,i){function r(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function o(e){return/<.*>/g.test(e)}var a;return a=t.has("$sanitize"),function(t,s){return i||n.warn("typeaheadHighlight is now deprecated. Use uibTypeaheadHighlight instead."),!a&&o(t)&&n.warn("Unsafe use of typeahead please use ngSanitize"),t=s?(""+t).replace(new RegExp(r(s),"gi"),"<strong>$&</strong>"):t,a||(t=e.trustAsHtml(t)),t}}]),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion-group.html",'<div class="panel {{panelClass || \'panel-default\'}}">\n <div class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a href tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n </div>\n</div>\n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissible\' : null]" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">×</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(e){e.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <div class="carousel-inner" ng-transclude></div>\n <a role="button" href class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n </a>\n <a role="button" href class="right carousel-control" ng-click="next()" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n </a>\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n </ol>\n</div>')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(e){e.put("template/carousel/slide.html",'<div ng-class="{\n \'active\': active\n }" class="item text-center" ng-transclude></div>\n')}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/datepicker.html",'<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <uib-daypicker ng-switch-when="day" tabindex="0"></uib-daypicker>\n <uib-monthpicker ng-switch-when="month" tabindex="0"></uib-monthpicker>\n <uib-yearpicker ng-switch-when="year" tabindex="0"></uib-yearpicker>\n</div>')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/day.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n <button type="button" style="min-width:100%;" class="btn btn-default btn-sm" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/month.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n <button type="button" style="min-width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/popup.html",'<ul class="dropdown-menu" dropdown-nested ng-if="isOpen" style="display: block" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" style="padding:10px 9px 2px">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info" ng-click="select(\'today\')" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText(\'close\') }}</button>\n </li>\n</ul>\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/year.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="3"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n <button type="button" style="min-width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(e){e.put("template/modal/backdrop.html",'<div uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(e){e.put("template/modal/window.html",'<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}">\n <div class="modal-dialog" ng-class="size ? \'modal-\' + size : \'\'"><div class="modal-content" uib-modal-transclude></div></div>\n</div>\n')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n</ul>\n')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText(\'first\')}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)">{{page.text}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n <li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)">{{::getText(\'last\')}}</a></li>\n</ul>\n')}]),angular.module("template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-html-popup.html",'<div\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){
|
135
|
+
e.put("template/tooltip/tooltip-popup.html",'<div\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-template-popup.html",'<div\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("template/popover/popover-html.html",[]).run(["$templateCache",function(e){e.put("template/popover/popover-html.html",'<div tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n </div>\n</div>\n')}]),angular.module("template/popover/popover-template.html",[]).run(["$templateCache",function(e){e.put("template/popover/popover-template.html",'<div tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n </div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(e){e.put("template/popover/popover.html",'<div tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" style="min-width: 0;" ng-transclude></div>\n')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" style="min-width: 0;" ng-transclude></div>\n</div>\n')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(e){e.put("template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}" aria-valuetext="{{r.title}}"></i>\n</span>\n')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n <a href ng-click="select()" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane" \n ng-repeat="tab in tabs" \n ng-class="{active: tab.active}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(e){e.put("template/timepicker/timepicker.html",'<table>\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td> </td>\n <td><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group" ng-class="{\'has-error\': invalidHours}">\n <input style="width:50px;" type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}">\n </td>\n <td>:</td>\n <td class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n <input style="width:50px;" type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}">\n </td>\n <td ng-show="showMeridian"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td> </td>\n <td><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-match.html",'<a href tabindex="-1" ng-bind-html="match.label | uibTypeaheadHighlight:query"></a>\n')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),!function(e){"use strict";function t(e){this.owner=e}function n(e,t){if(Object.create)t.prototype=Object.create(e.prototype);else{var n=function(){};n.prototype=e.prototype,t.prototype=new n}return t.prototype.constructor=t,t}function i(e){var t=this.internal=new r(this);t.loadConfig(e),t.init(),function n(e,t,i){Object.keys(e).forEach(function(r){t[r]=e[r].bind(i),Object.keys(e[r]).length>0&&n(e[r],t[r],i)})}(s,this,this)}function r(t){var n=this;n.d3=e.d3?e.d3:"undefined"!=typeof require?require("d3"):void 0,n.api=t,n.config=n.getDefaultConfig(),n.data={},n.cache={},n.axes={}}function o(e){t.call(this,e)}function a(e,t){function n(e,t){e.attr("transform",function(e){return"translate("+Math.ceil(t(e)+b)+", 0)"})}function i(e,t){e.attr("transform",function(e){return"translate(0,"+Math.ceil(t(e))+")"})}function r(e){var t=e[0],n=e[e.length-1];return n>t?[t,n]:[n,t]}function o(e){var t,n,i=[];if(e.ticks)return e.ticks.apply(e,p);for(n=e.domain(),t=Math.ceil(n[0]);t<n[1];t++)i.push(t);return i.length>0&&i[0]>0&&i.unshift(i[0]-(i[1]-i[0])),i}function a(){var e,n=m.copy();return t.isCategory&&(e=m.domain(),n.domain([e[0],e[1]-1])),n}function s(e){var t=h?h(e):e;return"undefined"!=typeof t?t:""}function l(e){if(C)return C;var t={h:11.5,w:5.5};return e.select("text").text(s).each(function(e){var n=this.getBoundingClientRect(),i=s(e),r=n.height,o=i?n.width/i.length:void 0;r&&o&&(t.h=r,t.w=o)}).text(""),C=t,t}function u(n){return t.withoutTransition?n:e.transition(n)}function c(h){h.each(function(){function h(e,n){function i(e,t){o=void 0;for(var s=1;s<t.length;s++)if(" "===t.charAt(s)&&(o=s),r=t.substr(0,s+1),a=U.w*r.length,a>n)return i(e.concat(t.substr(0,o?o:s)),t.slice(o?o+1:s));return e.concat(t)}var r,o,a,l=s(e),u=[];return"[object Array]"===Object.prototype.toString.call(l)?l:((!n||0>=n)&&(n=G?95:t.isCategory?Math.ceil(E(L[1])-E(L[0]))-12:110),i(u,l+""))}function p(e,t){var n=U.h;return 0===t&&(n="left"===g||"right"===g?-((V[e.index]-1)*(U.h/2)-3):".71em"),n}function x(e){var t=m(e)+(f?0:b);return P[0]<t&&t<P[1]?v:0}function w(e){return e?e>0?"start":"end":"middle"}function $(e){return e?"rotate("+e+")":""}function k(e){return e?8*Math.sin(Math.PI*(e/180)):0}function C(e){return e?11.5-2.5*(e/15)*(e>0?1:-1):X}var A,M,T,S=c.g=e.select(this),D=this.__chart__||m,E=this.__chart__=a(),L=_?_:o(E),F=S.selectAll(".tick").data(L,E),O=F.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),R=F.exit().remove(),B=u(F).style("opacity",1),P=m.rangeExtent?m.rangeExtent():r(m.range()),I=S.selectAll(".domain").data([0]),Y=(I.enter().append("path").attr("class","domain"),u(I));O.append("line"),O.append("text");var j=O.select("line"),N=B.select("line"),H=O.select("text"),z=B.select("text");t.isCategory?(b=Math.ceil((E(1)-E(0))/2),M=f?0:b,T=f?b:0):b=M=0;var q,W,U=l(S.select(".tick")),V=[],X=Math.max(v,0)+y,G="left"===g||"right"===g;q=F.select("text"),W=q.selectAll("tspan").data(function(e,n){var i=t.tickMultiline?h(e,t.tickWidth):[].concat(s(e));return V[n]=i.length,i.map(function(e){return{index:n,splitted:e}})}),W.enter().append("tspan"),W.exit().remove(),W.text(function(e){return e.splitted});var K=t.tickTextRotate;switch(g){case"bottom":A=n,j.attr("y2",v),H.attr("y",X),N.attr("x1",M).attr("x2",M).attr("y2",x),z.attr("x",0).attr("y",C(K)).style("text-anchor",w(K)).attr("transform",$(K)),W.attr("x",0).attr("dy",p).attr("dx",k(K)),Y.attr("d","M"+P[0]+","+d+"V0H"+P[1]+"V"+d);break;case"top":A=n,j.attr("y2",-v),H.attr("y",-X),N.attr("x2",0).attr("y2",-v),z.attr("x",0).attr("y",-X),q.style("text-anchor","middle"),W.attr("x",0).attr("dy","0em"),Y.attr("d","M"+P[0]+","+-d+"V0H"+P[1]+"V"+-d);break;case"left":A=i,j.attr("x2",-v),H.attr("x",-X),N.attr("x2",-v).attr("y1",T).attr("y2",T),z.attr("x",-X).attr("y",b),q.style("text-anchor","end"),W.attr("x",-X).attr("dy",p),Y.attr("d","M"+-d+","+P[0]+"H0V"+P[1]+"H"+-d);break;case"right":A=i,j.attr("x2",v),H.attr("x",X),N.attr("x2",v).attr("y2",0),z.attr("x",X).attr("y",0),q.style("text-anchor","start"),W.attr("x",X).attr("dy",p),Y.attr("d","M"+d+","+P[0]+"H0V"+P[1]+"H"+d)}if(E.rangeBand){var J=E,Q=J.rangeBand()/2;D=E=function(e){return J(e)+Q}}else D.rangeBand?D=E:R.call(A,E);O.call(A,D),B.call(A,E)})}var d,h,p,f,m=e.scale.linear(),g="bottom",v=6,y=3,_=null,b=0,x=!0;return t=t||{},d=t.withOuterTick?6:0,c.scale=function(e){return arguments.length?(m=e,c):m},c.orient=function(e){return arguments.length?(g=e in{top:1,right:1,bottom:1,left:1}?e+"":"bottom",c):g},c.tickFormat=function(e){return arguments.length?(h=e,c):h},c.tickCentered=function(e){return arguments.length?(f=e,c):f},c.tickOffset=function(){return b},c.tickInterval=function(){var e,n;return t.isCategory?e=2*b:(n=c.g.select("path.domain").node().getTotalLength()-2*d,e=n/c.g.selectAll("line").size()),1/0===e?0:e},c.ticks=function(){return arguments.length?(p=arguments,c):p},c.tickCulling=function(e){return arguments.length?(x=e,c):x},c.tickValues=function(e){if("function"==typeof e)_=function(){return e(m.domain())};else{if(!arguments.length)return _;_=e}return c},c}var s,l,u,c={version:"0.4.10"};c.generate=function(e){return new i(e)},c.chart={fn:i.prototype,internal:{fn:r.prototype,axis:{fn:o.prototype}}},s=c.chart.fn,l=c.chart.internal.fn,u=c.chart.internal.axis.fn,l.init=function(){var e=this,t=e.config;if(e.initParams(),t.data_url)e.convertUrlToData(t.data_url,t.data_mimeType,t.data_keys,e.initWithData);else if(t.data_json)e.initWithData(e.convertJsonToData(t.data_json,t.data_keys));else if(t.data_rows)e.initWithData(e.convertRowsToData(t.data_rows));else{if(!t.data_columns)throw Error("url or json or rows or columns is required.");e.initWithData(e.convertColumnsToData(t.data_columns))}},l.initParams=function(){var e=this,t=e.d3,n=e.config;e.clipId="c3-"+ +new Date+"-clip",e.clipIdForXAxis=e.clipId+"-xaxis",e.clipIdForYAxis=e.clipId+"-yaxis",e.clipIdForGrid=e.clipId+"-grid",e.clipIdForSubchart=e.clipId+"-subchart",e.clipPath=e.getClipPath(e.clipId),e.clipPathForXAxis=e.getClipPath(e.clipIdForXAxis),e.clipPathForYAxis=e.getClipPath(e.clipIdForYAxis),e.clipPathForGrid=e.getClipPath(e.clipIdForGrid),e.clipPathForSubchart=e.getClipPath(e.clipIdForSubchart),e.dragStart=null,e.dragging=!1,e.flowing=!1,e.cancelClick=!1,e.mouseover=!1,e.transiting=!1,e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),e.dataTimeFormat=n.data_xLocaltime?t.time.format:t.time.format.utc,e.axisTimeFormat=n.axis_x_localtime?t.time.format:t.time.format.utc,e.defaultAxisTimeFormat=e.axisTimeFormat.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%-m/%-d",function(e){return e.getDay()&&1!==e.getDate()}],["%-m/%-d",function(e){return 1!==e.getDate()}],["%-m/%-d",function(e){return e.getMonth()}],["%Y/%-m/%-d",function(){return!0}]]),e.hiddenTargetIds=[],e.hiddenLegendIds=[],e.focusedTargetIds=[],e.defocusedTargetIds=[],e.xOrient=n.axis_rotated?"left":"bottom",e.yOrient=n.axis_rotated?n.axis_y_inner?"top":"bottom":n.axis_y_inner?"right":"left",e.y2Orient=n.axis_rotated?n.axis_y2_inner?"bottom":"top":n.axis_y2_inner?"left":"right",e.subXOrient=n.axis_rotated?"left":"bottom",e.isLegendRight="right"===n.legend_position,e.isLegendInset="inset"===n.legend_position,e.isLegendTop="top-left"===n.legend_inset_anchor||"top-right"===n.legend_inset_anchor,e.isLegendLeft="top-left"===n.legend_inset_anchor||"bottom-left"===n.legend_inset_anchor,e.legendStep=0,e.legendItemWidth=0,e.legendItemHeight=0,e.currentMaxTickWidths={x:0,y:0,y2:0},e.rotated_padding_left=30,e.rotated_padding_right=n.axis_rotated&&!n.axis_x_show?0:30,e.rotated_padding_top=5,e.withoutFadeIn={},e.intervalForObserveInserted=void 0,e.axes.subx=t.selectAll([])},l.initChartElements=function(){this.initBar&&this.initBar(),this.initLine&&this.initLine(),this.initArc&&this.initArc(),this.initGauge&&this.initGauge(),this.initText&&this.initText()},l.initWithData=function(t){var n,i,r=this,a=r.d3,s=r.config,l=!0;r.axis=new o(r),r.initPie&&r.initPie(),r.initBrush&&r.initBrush(),r.initZoom&&r.initZoom(),r.selectChart=s.bindto?"function"==typeof s.bindto.node?s.bindto:a.select(s.bindto):a.selectAll([]),r.selectChart.empty()&&(r.selectChart=a.select(document.createElement("div")).style("opacity",0),r.observeInserted(r.selectChart),l=!1),r.selectChart.html("").classed("c3",!0),r.data.xs={},r.data.targets=r.convertDataToTargets(t),s.data_filter&&(r.data.targets=r.data.targets.filter(s.data_filter)),s.data_hide&&r.addHiddenTargetIds(s.data_hide===!0?r.mapToIds(r.data.targets):s.data_hide),s.legend_hide&&r.addHiddenLegendIds(s.legend_hide===!0?r.mapToIds(r.data.targets):s.legend_hide),r.hasType("gauge")&&(s.legend_show=!1),r.updateSizes(),r.updateScales(),r.x.domain(a.extent(r.getXDomain(r.data.targets))),r.y.domain(r.getYDomain(r.data.targets,"y")),r.y2.domain(r.getYDomain(r.data.targets,"y2")),r.subX.domain(r.x.domain()),r.subY.domain(r.y.domain()),r.subY2.domain(r.y2.domain()),r.orgXDomain=r.x.domain(),r.brush&&r.brush.scale(r.subX),s.zoom_enabled&&r.zoom.scale(r.x),r.svg=r.selectChart.append("svg").style("overflow","hidden").on("mouseenter",function(){return s.onmouseover.call(r)}).on("mouseleave",function(){return s.onmouseout.call(r)}),n=r.svg.append("defs"),r.clipChart=r.appendClip(n,r.clipId),r.clipXAxis=r.appendClip(n,r.clipIdForXAxis),r.clipYAxis=r.appendClip(n,r.clipIdForYAxis),r.clipGrid=r.appendClip(n,r.clipIdForGrid),r.clipSubchart=r.appendClip(n,r.clipIdForSubchart),r.updateSvgSize(),i=r.main=r.svg.append("g").attr("transform",r.getTranslate("main")),r.initSubchart&&r.initSubchart(),r.initTooltip&&r.initTooltip(),r.initLegend&&r.initLegend(),i.append("text").attr("class",d.text+" "+d.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),r.initRegion(),r.initGrid(),i.append("g").attr("clip-path",r.clipPath).attr("class",d.chart),s.grid_lines_front&&r.initGridLines(),r.initEventRect(),r.initChartElements(),i.insert("rect",s.zoom_privileged?null:"g."+d.regions).attr("class",d.zoomRect).attr("width",r.width).attr("height",r.height).style("opacity",0).on("dblclick.zoom",null),s.axis_x_extent&&r.brush.extent(r.getDefaultExtent()),r.axis.init(),r.updateTargets(r.data.targets),l&&(r.updateDimension(),r.config.oninit.call(r),r.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1})),null==e.onresize&&(e.onresize=r.generateResize()),e.onresize.add&&(e.onresize.add(function(){s.onresize.call(r)}),e.onresize.add(function(){r.api.flush()}),e.onresize.add(function(){s.onresized.call(r)})),r.api.element=r.selectChart.node()},l.smoothLines=function(e,t){var n=this;"grid"===t&&e.each(function(){var e=n.d3.select(this),t=e.attr("x1"),i=e.attr("x2"),r=e.attr("y1"),o=e.attr("y2");e.attr({x1:Math.ceil(t),x2:Math.ceil(i),y1:Math.ceil(r),y2:Math.ceil(o)})})},l.updateSizes=function(){var e=this,t=e.config,n=e.legend?e.getLegendHeight():0,i=e.legend?e.getLegendWidth():0,r=e.isLegendRight||e.isLegendInset?0:n,o=e.hasArcType(),a=t.axis_rotated||o?0:e.getHorizontalAxisHeight("x"),s=t.subchart_show&&!o?t.subchart_size_height+a:0;e.currentWidth=e.getCurrentWidth(),e.currentHeight=e.getCurrentHeight(),e.margin=t.axis_rotated?{top:e.getHorizontalAxisHeight("y2")+e.getCurrentPaddingTop(),right:o?0:e.getCurrentPaddingRight(),bottom:e.getHorizontalAxisHeight("y")+r+e.getCurrentPaddingBottom(),left:s+(o?0:e.getCurrentPaddingLeft())}:{top:4+e.getCurrentPaddingTop(),right:o?0:e.getCurrentPaddingRight(),bottom:a+s+r+e.getCurrentPaddingBottom(),left:o?0:e.getCurrentPaddingLeft()},e.margin2=t.axis_rotated?{top:e.margin.top,right:NaN,bottom:20+r,left:e.rotated_padding_left}:{top:e.currentHeight-s-r,right:NaN,bottom:a+r,left:e.margin.left},e.margin3={top:0,right:NaN,bottom:0,left:0},e.updateSizeForLegend&&e.updateSizeForLegend(n,i),e.width=e.currentWidth-e.margin.left-e.margin.right,e.height=e.currentHeight-e.margin.top-e.margin.bottom,e.width<0&&(e.width=0),e.height<0&&(e.height=0),e.width2=t.axis_rotated?e.margin.left-e.rotated_padding_left-e.rotated_padding_right:e.width,e.height2=t.axis_rotated?e.height:e.currentHeight-e.margin2.top-e.margin2.bottom,e.width2<0&&(e.width2=0),e.height2<0&&(e.height2=0),e.arcWidth=e.width-(e.isLegendRight?i+10:0),e.arcHeight=e.height-(e.isLegendRight?0:10),e.hasType("gauge")&&(e.arcHeight+=e.height-e.getGaugeLabelHeight()),e.updateRadius&&e.updateRadius(),e.isLegendRight&&o&&(e.margin3.left=e.arcWidth/2+1.1*e.radiusExpanded)},l.updateTargets=function(e){var t=this;t.updateTargetsForText(e),t.updateTargetsForBar(e),t.updateTargetsForLine(e),t.hasArcType()&&t.updateTargetsForArc&&t.updateTargetsForArc(e),t.updateTargetsForSubchart&&t.updateTargetsForSubchart(e),t.showTargets()},l.showTargets=function(){var e=this;e.svg.selectAll("."+d.target).filter(function(t){return e.isTargetToShow(t.id)}).transition().duration(e.config.transition_duration).style("opacity",1)},l.redraw=function(e,t){var n,i,r,o,a,s,l,u,c,h,p,f,m,g,v,y,_,b,x,$,k,C,A,M,T,S,D,E,L,F=this,O=F.main,R=F.d3,B=F.config,P=F.getShapeIndices(F.isAreaType),I=F.getShapeIndices(F.isBarType),Y=F.getShapeIndices(F.isLineType),j=F.hasArcType(),N=F.filterTargetsToShow(F.data.targets),H=F.xv.bind(F);if(e=e||{},n=w(e,"withY",!0),i=w(e,"withSubchart",!0),r=w(e,"withTransition",!0),s=w(e,"withTransform",!1),l=w(e,"withUpdateXDomain",!1),u=w(e,"withUpdateOrgXDomain",!1),c=w(e,"withTrimXDomain",!0),m=w(e,"withUpdateXAxis",l),h=w(e,"withLegend",!1),p=w(e,"withEventRect",!0),f=w(e,"withDimension",!0),o=w(e,"withTransitionForExit",r),a=w(e,"withTransitionForAxis",r),x=r?B.transition_duration:0,$=o?x:0,k=a?x:0,t=t||F.axis.generateTransitions(k),h&&B.legend_show?F.updateLegend(F.mapToIds(F.data.targets),e,t):f&&F.updateDimension(!0),F.isCategorized()&&0===N.length&&F.x.domain([0,F.axes.x.selectAll(".tick").size()]),N.length?(F.updateXDomain(N,l,u,c),B.axis_x_tick_values||(M=F.axis.updateXAxisTickValues(N))):(F.xAxis.tickValues([]),F.subXAxis.tickValues([])),B.zoom_rescale&&!e.flow&&(D=F.x.orgDomain()),F.y.domain(F.getYDomain(N,"y",D)),F.y2.domain(F.getYDomain(N,"y2",D)),!B.axis_y_tick_values&&B.axis_y_tick_count&&F.yAxis.tickValues(F.axis.generateTickValues(F.y.domain(),B.axis_y_tick_count)),!B.axis_y2_tick_values&&B.axis_y2_tick_count&&F.y2Axis.tickValues(F.axis.generateTickValues(F.y2.domain(),B.axis_y2_tick_count)),F.axis.redraw(t,j),F.axis.updateLabels(r),(l||m)&&N.length)if(B.axis_x_tick_culling&&M){for(T=1;T<M.length;T++)if(M.length/T<B.axis_x_tick_culling_max){S=T;break}F.svg.selectAll("."+d.axisX+" .tick text").each(function(e){var t=M.indexOf(e);t>=0&&R.select(this).style("display",t%S?"none":"block")})}else F.svg.selectAll("."+d.axisX+" .tick text").style("display","block");g=F.generateDrawArea?F.generateDrawArea(P,!1):void 0,v=F.generateDrawBar?F.generateDrawBar(I):void 0,y=F.generateDrawLine?F.generateDrawLine(Y,!1):void 0,_=F.generateXYForText(P,I,Y,!0),b=F.generateXYForText(P,I,Y,!1),n&&(F.subY.domain(F.getYDomain(N,"y")),F.subY2.domain(F.getYDomain(N,"y2"))),F.tooltip.style("display","none"),F.updateXgridFocus(),O.select("text."+d.text+"."+d.empty).attr("x",F.width/2).attr("y",F.height/2).text(B.data_empty_label_text).transition().style("opacity",N.length?0:1),F.updateGrid(x),F.updateRegion(x),F.updateBar($),F.updateLine($),F.updateArea($),F.updateCircle(),F.hasDataLabel()&&F.updateText($),F.redrawArc&&F.redrawArc(x,$,s),F.redrawSubchart&&F.redrawSubchart(i,t,x,$,P,I,Y),O.selectAll("."+d.selectedCircles).filter(F.isBarType.bind(F)).selectAll("circle").remove(),B.interaction_enabled&&!e.flow&&p&&(F.redrawEventRect(),F.updateZoom&&F.updateZoom()),F.updateCircleY(),E=(F.config.axis_rotated?F.circleY:F.circleX).bind(F),L=(F.config.axis_rotated?F.circleX:F.circleY).bind(F),e.flow&&(A=F.generateFlow({targets:N,flow:e.flow,duration:e.flow.duration,drawBar:v,drawLine:y,drawArea:g,cx:E,cy:L,xv:H,xForText:_,yForText:b})),(x||A)&&F.isTabVisible()?R.transition().duration(x).each(function(){var t=[];[F.redrawBar(v,!0),F.redrawLine(y,!0),F.redrawArea(g,!0),F.redrawCircle(E,L,!0),F.redrawText(_,b,e.flow,!0),F.redrawRegion(!0),F.redrawGrid(!0)].forEach(function(e){e.forEach(function(e){t.push(e)})}),C=F.generateWait(),t.forEach(function(e){C.add(e)})}).call(C,function(){A&&A(),B.onrendered&&B.onrendered.call(F)}):(F.redrawBar(v),F.redrawLine(y),F.redrawArea(g),F.redrawCircle(E,L),F.redrawText(_,b,e.flow),F.redrawRegion(),F.redrawGrid(),B.onrendered&&B.onrendered.call(F)),F.mapToIds(F.data.targets).forEach(function(e){F.withoutFadeIn[e]=!0})},l.updateAndRedraw=function(e){var t,n=this,i=n.config;e=e||{},e.withTransition=w(e,"withTransition",!0),e.withTransform=w(e,"withTransform",!1),e.withLegend=w(e,"withLegend",!1),e.withUpdateXDomain=!0,e.withUpdateOrgXDomain=!0,e.withTransitionForExit=!1,e.withTransitionForTransform=w(e,"withTransitionForTransform",e.withTransition),n.updateSizes(),e.withLegend&&i.legend_show||(t=n.axis.generateTransitions(e.withTransitionForAxis?i.transition_duration:0),n.updateScales(),n.updateSvgSize(),n.transformAll(e.withTransitionForTransform,t)),n.redraw(e,t)},l.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},l.isTimeSeries=function(){return"timeseries"===this.config.axis_x_type},l.isCategorized=function(){return this.config.axis_x_type.indexOf("categor")>=0},l.isCustomX=function(){var e=this,t=e.config;return!e.isTimeSeries()&&(t.data_x||x(t.data_xs))},l.isTimeSeriesY=function(){return"timeseries"===this.config.axis_y_type},l.getTranslate=function(e){var t,n,i=this,r=i.config;return"main"===e?(t=y(i.margin.left),n=y(i.margin.top)):"context"===e?(t=y(i.margin2.left),n=y(i.margin2.top)):"legend"===e?(t=i.margin3.left,n=i.margin3.top):"x"===e?(t=0,n=r.axis_rotated?0:i.height):"y"===e?(t=0,n=r.axis_rotated?i.height:0):"y2"===e?(t=r.axis_rotated?0:i.width,n=r.axis_rotated?1:0):"subx"===e?(t=0,n=r.axis_rotated?0:i.height2):"arc"===e&&(t=i.arcWidth/2,n=i.arcHeight/2),"translate("+t+","+n+")"},l.initialOpacity=function(e){return null!==e.value&&this.withoutFadeIn[e.id]?1:0},l.initialOpacityForCircle=function(e){return null!==e.value&&this.withoutFadeIn[e.id]?this.opacityForCircle(e):0},l.opacityForCircle=function(e){var t=this.config.point_show?1:0;return h(e.value)?this.isScatterType(e)?.5:t:0},l.opacityForText=function(){return this.hasDataLabel()?1:0},l.xx=function(e){return e?this.x(e.x):null},l.xv=function(e){var t=this,n=e.value;return t.isTimeSeries()?n=t.parseDate(e.value):t.isCategorized()&&"string"==typeof e.value&&(n=t.config.axis_x_categories.indexOf(e.value)),Math.ceil(t.x(n))},l.yv=function(e){var t=this,n=e.axis&&"y2"===e.axis?t.y2:t.y;return Math.ceil(n(e.value))},l.subxx=function(e){return e?this.subX(e.x):null},l.transformMain=function(e,t){var n,i,r,o=this;t&&t.axisX?n=t.axisX:(n=o.main.select("."+d.axisX),e&&(n=n.transition())),t&&t.axisY?i=t.axisY:(i=o.main.select("."+d.axisY),e&&(i=i.transition())),t&&t.axisY2?r=t.axisY2:(r=o.main.select("."+d.axisY2),e&&(r=r.transition())),(e?o.main.transition():o.main).attr("transform",o.getTranslate("main")),n.attr("transform",o.getTranslate("x")),i.attr("transform",o.getTranslate("y")),r.attr("transform",o.getTranslate("y2")),o.main.select("."+d.chartArcs).attr("transform",o.getTranslate("arc"))},l.transformAll=function(e,t){var n=this;n.transformMain(e,t),n.config.subchart_show&&n.transformContext(e,t),n.legend&&n.transformLegend(e)},l.updateSvgSize=function(){var e=this,t=e.svg.select(".c3-brush .background");e.svg.attr("width",e.currentWidth).attr("height",e.currentHeight),e.svg.selectAll(["#"+e.clipId,"#"+e.clipIdForGrid]).select("rect").attr("width",e.width).attr("height",e.height),e.svg.select("#"+e.clipIdForXAxis).select("rect").attr("x",e.getXAxisClipX.bind(e)).attr("y",e.getXAxisClipY.bind(e)).attr("width",e.getXAxisClipWidth.bind(e)).attr("height",e.getXAxisClipHeight.bind(e)),e.svg.select("#"+e.clipIdForYAxis).select("rect").attr("x",e.getYAxisClipX.bind(e)).attr("y",e.getYAxisClipY.bind(e)).attr("width",e.getYAxisClipWidth.bind(e)).attr("height",e.getYAxisClipHeight.bind(e)),e.svg.select("#"+e.clipIdForSubchart).select("rect").attr("width",e.width).attr("height",t.size()?t.attr("height"):0),e.svg.select("."+d.zoomRect).attr("width",e.width).attr("height",e.height),e.selectChart.style("max-height",e.currentHeight+"px")},l.updateDimension=function(e){var t=this;e||(t.config.axis_rotated?(t.axes.x.call(t.xAxis),t.axes.subx.call(t.subXAxis)):(t.axes.y.call(t.yAxis),t.axes.y2.call(t.y2Axis))),t.updateSizes(),t.updateScales(),t.updateSvgSize(),t.transformAll(!1)},l.observeInserted=function(t){var n,i=this;return"undefined"==typeof MutationObserver?void e.console.error("MutationObserver not defined."):(n=new MutationObserver(function(r){r.forEach(function(r){"childList"===r.type&&r.previousSibling&&(n.disconnect(),i.intervalForObserveInserted=e.setInterval(function(){t.node().parentNode&&(e.clearInterval(i.intervalForObserveInserted),i.updateDimension(),i.config.oninit.call(i),i.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),t.transition().style("opacity",1))},10))})}),void n.observe(t.node(),{attributes:!0,childList:!0,characterData:!0}))},l.generateResize=function(){function e(){t.forEach(function(e){e()})}var t=[];return e.add=function(e){t.push(e)},e},l.endall=function(e,t){var n=0;e.each(function(){++n}).each("end",function(){--n||t.apply(this,arguments)})},l.generateWait=function(){var e=[],t=function(t,n){var i=setInterval(function(){var t=0;e.forEach(function(e){if(e.empty())return void(t+=1);try{e.transition()}catch(n){t+=1}}),t===e.length&&(clearInterval(i),n&&n())},10)};return t.add=function(t){e.push(t)},t},l.parseDate=function(t){var n,i=this;return t instanceof Date?n=t:"string"==typeof t?n=i.dataTimeFormat(i.config.data_xFormat).parse(t):"number"!=typeof t&&isNaN(t)||(n=new Date(+t)),(!n||isNaN(+n))&&e.console.error("Failed to parse x '"+t+"' to Date object"),n},l.isTabVisible=function(){var e;return"undefined"!=typeof document.hidden?e="hidden":"undefined"!=typeof document.mozHidden?e="mozHidden":"undefined"!=typeof document.msHidden?e="msHidden":"undefined"!=typeof document.webkitHidden&&(e="webkitHidden"),document[e]?!1:!0},l.getDefaultConfig=function(){var e={bindto:"#chart",size_width:void 0,size_height:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,zoom_enabled:!1,zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:function(){},zoom_onzoomstart:function(){},zoom_onzoomend:function(){},interaction_enabled:!0,onmouseover:function(){},onmouseout:function(){},onresize:function(){},onresized:function(){},oninit:function(){},onrendered:function(){},transition_duration:350,data_x:void 0,data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function(e){return e},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:void 0,data_types:{},data_labels:{},data_order:"desc",data_regions:{},data_color:void 0,data_colors:{},data_hide:!1,data_filter:void 0,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function(){},data_onmouseover:function(){},data_onmouseout:function(){},data_onselected:function(){},data_onunselected:function(){},data_url:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:void 0,data_keys:void 0,data_empty_label_text:"",subchart_show:!1,subchart_size_height:60,subchart_onbrush:function(){},color_pattern:[],color_threshold:{},legend_show:!0,legend_hide:!1,legend_position:"bottom",legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_onclick:void 0,legend_item_onmouseover:void 0,legend_item_onmouseout:void 0,legend_equally:!1,axis_rotated:!1,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:void 0,axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_max:void 0,axis_x_min:void 0,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_y_show:!0,axis_y_type:void 0,axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:void 0,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_count:void 0,axis_y_tick_time_value:void 0,axis_y_tick_time_interval:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y2_show:!1,
|
136
|
+
axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:void 0,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_count:void 0,axis_y2_padding:{},axis_y2_default:void 0,grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_show:!0,grid_lines_front:!0,point_show:!0,point_r:2.5,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_select_r:void 0,line_connectNull:!1,line_step_type:"step",bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0,area_zerobased:!0,pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_expand:!0,gauge_label_show:!0,gauge_label_format:void 0,gauge_expand:!0,gauge_min:0,gauge_max:100,gauge_units:void 0,gauge_width:void 0,donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_width:void 0,donut_expand:!0,donut_title:"",regions:[],tooltip_show:!0,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:function(e,t,n,i){return this.getTooltipContent?this.getTooltipContent(e,t,n,i):""},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"}};return Object.keys(this.additionalConfig).forEach(function(t){e[t]=this.additionalConfig[t]},this),e},l.additionalConfig={},l.loadConfig=function(e){function t(){var e=i.shift();return e&&n&&"object"==typeof n&&e in n?(n=n[e],t()):e?void 0:n}var n,i,r,o=this.config;Object.keys(o).forEach(function(a){n=e,i=a.split("_"),r=t(),g(r)&&(o[a]=r)})},l.getScale=function(e,t,n){return(n?this.d3.time.scale():this.d3.scale.linear()).range([e,t])},l.getX=function(e,t,n,i){var r,o=this,a=o.getScale(e,t,o.isTimeSeries()),s=n?a.domain(n):a;o.isCategorized()?(i=i||function(){return 0},a=function(e,t){var n=s(e)+i(e);return t?n:Math.ceil(n)}):a=function(e,t){var n=s(e);return t?n:Math.ceil(n)};for(r in s)a[r]=s[r];return a.orgDomain=function(){return s.domain()},o.isCategorized()&&(a.domain=function(e){return arguments.length?(s.domain(e),a):(e=this.orgDomain(),[e[0],e[1]+1])}),a},l.getY=function(e,t,n){var i=this.getScale(e,t,this.isTimeSeriesY());return n&&i.domain(n),i},l.getYScale=function(e){return"y2"===this.axis.getId(e)?this.y2:this.y},l.getSubYScale=function(e){return"y2"===this.axis.getId(e)?this.subY2:this.subY},l.updateScales=function(){var e=this,t=e.config,n=!e.x;e.xMin=t.axis_rotated?1:0,e.xMax=t.axis_rotated?e.height:e.width,e.yMin=t.axis_rotated?0:e.height,e.yMax=t.axis_rotated?e.width:1,e.subXMin=e.xMin,e.subXMax=e.xMax,e.subYMin=t.axis_rotated?0:e.height2,e.subYMax=t.axis_rotated?e.width2:1,e.x=e.getX(e.xMin,e.xMax,n?void 0:e.x.orgDomain(),function(){return e.xAxis.tickOffset()}),e.y=e.getY(e.yMin,e.yMax,n?t.axis_y_default:e.y.domain()),e.y2=e.getY(e.yMin,e.yMax,n?t.axis_y2_default:e.y2.domain()),e.subX=e.getX(e.xMin,e.xMax,e.orgXDomain,function(t){return t%1?0:e.subXAxis.tickOffset()}),e.subY=e.getY(e.subYMin,e.subYMax,n?t.axis_y_default:e.subY.domain()),e.subY2=e.getY(e.subYMin,e.subYMax,n?t.axis_y2_default:e.subY2.domain()),e.xAxisTickFormat=e.axis.getXAxisTickFormat(),e.xAxisTickValues=e.axis.getXAxisTickValues(),e.yAxisTickValues=e.axis.getYAxisTickValues(),e.y2AxisTickValues=e.axis.getY2AxisTickValues(),e.xAxis=e.axis.getXAxis(e.x,e.xOrient,e.xAxisTickFormat,e.xAxisTickValues,t.axis_x_tick_outer),e.subXAxis=e.axis.getXAxis(e.subX,e.subXOrient,e.xAxisTickFormat,e.xAxisTickValues,t.axis_x_tick_outer),e.yAxis=e.axis.getYAxis(e.y,e.yOrient,t.axis_y_tick_format,e.yAxisTickValues,t.axis_y_tick_outer),e.y2Axis=e.axis.getYAxis(e.y2,e.y2Orient,t.axis_y2_tick_format,e.y2AxisTickValues,t.axis_y2_tick_outer),n||(e.brush&&e.brush.scale(e.subX),t.zoom_enabled&&e.zoom.scale(e.x)),e.updateArc&&e.updateArc()},l.getYDomainMin=function(e){var t,n,i,r,o,a,s=this,l=s.config,u=s.mapToIds(e),c=s.getValuesAsIdKeyed(e);if(l.data_groups.length>0)for(a=s.hasNegativeValueInTargets(e),t=0;t<l.data_groups.length;t++)if(r=l.data_groups[t].filter(function(e){return u.indexOf(e)>=0}),0!==r.length)for(i=r[0],a&&c[i]&&c[i].forEach(function(e,t){c[i][t]=0>e?e:0}),n=1;n<r.length;n++)o=r[n],c[o]&&c[o].forEach(function(e,t){s.axis.getId(o)!==s.axis.getId(i)||!c[i]||a&&+e>0||(c[i][t]+=+e)});return s.d3.min(Object.keys(c).map(function(e){return s.d3.min(c[e])}))},l.getYDomainMax=function(e){var t,n,i,r,o,a,s=this,l=s.config,u=s.mapToIds(e),c=s.getValuesAsIdKeyed(e);if(l.data_groups.length>0)for(a=s.hasPositiveValueInTargets(e),t=0;t<l.data_groups.length;t++)if(r=l.data_groups[t].filter(function(e){return u.indexOf(e)>=0}),0!==r.length)for(i=r[0],a&&c[i]&&c[i].forEach(function(e,t){c[i][t]=e>0?e:0}),n=1;n<r.length;n++)o=r[n],c[o]&&c[o].forEach(function(e,t){s.axis.getId(o)!==s.axis.getId(i)||!c[i]||a&&0>+e||(c[i][t]+=+e)});return s.d3.max(Object.keys(c).map(function(e){return s.d3.max(c[e])}))},l.getYDomain=function(e,t,n){var i,r,o,a,s,l,u,c,d,p,f,m=this,g=m.config,v=e.filter(function(e){return m.axis.getId(e.id)===t}),y=n?m.filterByXDomain(v,n):v,b="y2"===t?g.axis_y2_min:g.axis_y_min,w="y2"===t?g.axis_y2_max:g.axis_y_max,$=m.getYDomainMin(y),k=m.getYDomainMax(y),C="y2"===t?g.axis_y2_center:g.axis_y_center,A=m.hasType("bar",y)&&g.bar_zerobased||m.hasType("area",y)&&g.area_zerobased,M="y2"===t?g.axis_y2_inverted:g.axis_y_inverted,T=m.hasDataLabel()&&g.axis_rotated,S=m.hasDataLabel()&&!g.axis_rotated;return $=h(b)?b:h(w)?w>$?$:w-10:$,k=h(w)?w:h(b)?k>b?k:b+10:k,0===y.length?"y2"===t?m.y2.domain():m.y.domain():(isNaN($)&&($=0),isNaN(k)&&(k=$),$===k&&(0>$?k=0:$=0),p=$>=0&&k>=0,f=0>=$&&0>=k,(h(b)&&p||h(w)&&f)&&(A=!1),A&&(p&&($=0),f&&(k=0)),r=Math.abs(k-$),o=a=s=.1*r,"undefined"!=typeof C&&(l=Math.max(Math.abs($),Math.abs(k)),k=C+l,$=C-l),T?(u=m.getDataLabelLength($,k,"width"),c=_(m.y.range()),d=[u[0]/c,u[1]/c],a+=r*(d[1]/(1-d[0]-d[1])),s+=r*(d[0]/(1-d[0]-d[1]))):S&&(u=m.getDataLabelLength($,k,"height"),a+=m.axis.convertPixelsToAxisPadding(u[1],r),s+=m.axis.convertPixelsToAxisPadding(u[0],r)),"y"===t&&x(g.axis_y_padding)&&(a=m.axis.getPadding(g.axis_y_padding,"top",a,r),s=m.axis.getPadding(g.axis_y_padding,"bottom",s,r)),"y2"===t&&x(g.axis_y2_padding)&&(a=m.axis.getPadding(g.axis_y2_padding,"top",a,r),s=m.axis.getPadding(g.axis_y2_padding,"bottom",s,r)),A&&(p&&(s=$),f&&(a=-k)),i=[$-s,k+a],M?i.reverse():i)},l.getXDomainMin=function(e){var t=this,n=t.config;return g(n.axis_x_min)?t.isTimeSeries()?this.parseDate(n.axis_x_min):n.axis_x_min:t.d3.min(e,function(e){return t.d3.min(e.values,function(e){return e.x})})},l.getXDomainMax=function(e){var t=this,n=t.config;return g(n.axis_x_max)?t.isTimeSeries()?this.parseDate(n.axis_x_max):n.axis_x_max:t.d3.max(e,function(e){return t.d3.max(e.values,function(e){return e.x})})},l.getXDomainPadding=function(e){var t,n,i,r,o=this,a=o.config,s=e[1]-e[0];return o.isCategorized()?n=0:o.hasType("bar")?(t=o.getMaxDataCount(),n=t>1?s/(t-1)/2:.5):n=.01*s,"object"==typeof a.axis_x_padding&&x(a.axis_x_padding)?(i=h(a.axis_x_padding.left)?a.axis_x_padding.left:n,r=h(a.axis_x_padding.right)?a.axis_x_padding.right:n):i=r="number"==typeof a.axis_x_padding?a.axis_x_padding:n,{left:i,right:r}},l.getXDomain=function(e){var t=this,n=[t.getXDomainMin(e),t.getXDomainMax(e)],i=n[0],r=n[1],o=t.getXDomainPadding(n),a=0,s=0;return i-r!==0||t.isCategorized()||(t.isTimeSeries()?(i=new Date(.5*i.getTime()),r=new Date(1.5*r.getTime())):(i=0===i?1:.5*i,r=0===r?-1:1.5*r)),(i||0===i)&&(a=t.isTimeSeries()?new Date(i.getTime()-o.left):i-o.left),(r||0===r)&&(s=t.isTimeSeries()?new Date(r.getTime()+o.right):r+o.right),[a,s]},l.updateXDomain=function(e,t,n,i,r){var o=this,a=o.config;return n&&(o.x.domain(r?r:o.d3.extent(o.getXDomain(e))),o.orgXDomain=o.x.domain(),a.zoom_enabled&&o.zoom.scale(o.x).updateScaleExtent(),o.subX.domain(o.x.domain()),o.brush&&o.brush.scale(o.subX)),t&&(o.x.domain(r?r:!o.brush||o.brush.empty()?o.orgXDomain:o.brush.extent()),a.zoom_enabled&&o.zoom.scale(o.x).updateScaleExtent()),i&&o.x.domain(o.trimXDomain(o.x.orgDomain())),o.x.domain()},l.trimXDomain=function(e){var t=this;return e[0]<=t.orgXDomain[0]&&(e[1]=+e[1]+(t.orgXDomain[0]-e[0]),e[0]=t.orgXDomain[0]),t.orgXDomain[1]<=e[1]&&(e[0]=+e[0]-(e[1]-t.orgXDomain[1]),e[1]=t.orgXDomain[1]),e},l.isX=function(e){var t=this,n=t.config;return n.data_x&&e===n.data_x||x(n.data_xs)&&$(n.data_xs,e)},l.isNotX=function(e){return!this.isX(e)},l.getXKey=function(e){var t=this,n=t.config;return n.data_x?n.data_x:x(n.data_xs)?n.data_xs[e]:null},l.getXValuesOfXKey=function(e,t){var n,i=this,r=t&&x(t)?i.mapToIds(t):[];return r.forEach(function(t){i.getXKey(t)===e&&(n=i.data.xs[t])}),n},l.getIndexByX=function(e){var t=this,n=t.filterByX(t.data.targets,e);return n.length?n[0].index:null},l.getXValue=function(e,t){var n=this;return e in n.data.xs&&n.data.xs[e]&&h(n.data.xs[e][t])?n.data.xs[e][t]:t},l.getOtherTargetXs=function(){var e=this,t=Object.keys(e.data.xs);return t.length?e.data.xs[t[0]]:null},l.getOtherTargetX=function(e){var t=this.getOtherTargetXs();return t&&e<t.length?t[e]:null},l.addXs=function(e){var t=this;Object.keys(e).forEach(function(n){t.config.data_xs[n]=e[n]})},l.hasMultipleX=function(e){return this.d3.set(Object.keys(e).map(function(t){return e[t]})).size()>1},l.isMultipleX=function(){return x(this.config.data_xs)||!this.config.data_xSort||this.hasType("scatter")},l.addName=function(e){var t,n=this;return e&&(t=n.config.data_names[e.id],e.name=t?t:e.id),e},l.getValueOnIndex=function(e,t){var n=e.filter(function(e){return e.index===t});return n.length?n[0]:null},l.updateTargetX=function(e,t){var n=this;e.forEach(function(e){e.values.forEach(function(i,r){i.x=n.generateTargetX(t[r],e.id,r)}),n.data.xs[e.id]=t})},l.updateTargetXs=function(e,t){var n=this;e.forEach(function(e){t[e.id]&&n.updateTargetX([e],t[e.id])})},l.generateTargetX=function(e,t,n){var i,r=this;return i=r.isTimeSeries()?r.parseDate(e?e:r.getXValue(t,n)):r.isCustomX()&&!r.isCategorized()?h(e)?+e:r.getXValue(t,n):n},l.cloneTarget=function(e){return{id:e.id,id_org:e.id_org,values:e.values.map(function(e){return{x:e.x,value:e.value,id:e.id}})}},l.updateXs=function(){var e=this;e.data.targets.length&&(e.xs=[],e.data.targets[0].values.forEach(function(t){e.xs[t.index]=t.x}))},l.getPrevX=function(e){var t=this.xs[e-1];return"undefined"!=typeof t?t:null},l.getNextX=function(e){var t=this.xs[e+1];return"undefined"!=typeof t?t:null},l.getMaxDataCount=function(){var e=this;return e.d3.max(e.data.targets,function(e){return e.values.length})},l.getMaxDataCountTarget=function(e){var t,n=e.length,i=0;return n>1?e.forEach(function(e){e.values.length>i&&(t=e,i=e.values.length)}):t=n?e[0]:null,t},l.getEdgeX=function(e){var t=this;return e.length?[t.d3.min(e,function(e){return e.values[0].x}),t.d3.max(e,function(e){return e.values[e.values.length-1].x})]:[0,0]},l.mapToIds=function(e){return e.map(function(e){return e.id})},l.mapToTargetIds=function(e){var t=this;return e?f(e)?[e]:e:t.mapToIds(t.data.targets)},l.hasTarget=function(e,t){var n,i=this.mapToIds(e);for(n=0;n<i.length;n++)if(i[n]===t)return!0;return!1},l.isTargetToShow=function(e){return this.hiddenTargetIds.indexOf(e)<0},l.isLegendToShow=function(e){return this.hiddenLegendIds.indexOf(e)<0},l.filterTargetsToShow=function(e){var t=this;return e.filter(function(e){return t.isTargetToShow(e.id)})},l.mapTargetsToUniqueXs=function(e){var t=this,n=t.d3.set(t.d3.merge(e.map(function(e){return e.values.map(function(e){return+e.x})}))).values();return n.map(t.isTimeSeries()?function(e){return new Date(+e)}:function(e){return+e})},l.addHiddenTargetIds=function(e){this.hiddenTargetIds=this.hiddenTargetIds.concat(e)},l.removeHiddenTargetIds=function(e){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(t){return e.indexOf(t)<0})},l.addHiddenLegendIds=function(e){this.hiddenLegendIds=this.hiddenLegendIds.concat(e)},l.removeHiddenLegendIds=function(e){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(t){return e.indexOf(t)<0})},l.getValuesAsIdKeyed=function(e){var t={};return e.forEach(function(e){t[e.id]=[],e.values.forEach(function(n){t[e.id].push(n.value)})}),t},l.checkValueInTargets=function(e,t){var n,i,r,o=Object.keys(e);for(n=0;n<o.length;n++)for(r=e[o[n]].values,i=0;i<r.length;i++)if(t(r[i].value))return!0;return!1},l.hasNegativeValueInTargets=function(e){return this.checkValueInTargets(e,function(e){return 0>e})},l.hasPositiveValueInTargets=function(e){return this.checkValueInTargets(e,function(e){return e>0})},l.isOrderDesc=function(){var e=this.config;return"string"==typeof e.data_order&&"desc"===e.data_order.toLowerCase()},l.isOrderAsc=function(){var e=this.config;return"string"==typeof e.data_order&&"asc"===e.data_order.toLowerCase()},l.orderTargets=function(e){var t=this,n=t.config,i=t.isOrderAsc(),r=t.isOrderDesc();return i||r?e.sort(function(e,t){var n=function(e,t){return e+Math.abs(t.value)},r=e.values.reduce(n,0),o=t.values.reduce(n,0);return i?o-r:r-o}):p(n.data_order)&&e.sort(n.data_order),e},l.filterByX=function(e,t){return this.d3.merge(e.map(function(e){return e.values})).filter(function(e){return e.x-t===0})},l.filterRemoveNull=function(e){return e.filter(function(e){return h(e.value)})},l.filterByXDomain=function(e,t){return e.map(function(e){return{id:e.id,id_org:e.id_org,values:e.values.filter(function(e){return t[0]<=e.x&&e.x<=t[1]})}})},l.hasDataLabel=function(){var e=this.config;return"boolean"==typeof e.data_labels&&e.data_labels?!0:"object"==typeof e.data_labels&&x(e.data_labels)?!0:!1},l.getDataLabelLength=function(e,t,n){var i=this,r=[0,0],o=1.3;return i.selectChart.select("svg").selectAll(".dummy").data([e,t]).enter().append("text").text(function(e){return i.dataLabelFormat(e.id)(e)}).each(function(e,t){r[t]=this.getBoundingClientRect()[n]*o}).remove(),r},l.isNoneArc=function(e){return this.hasTarget(this.data.targets,e.id)},l.isArc=function(e){return"data"in e&&this.hasTarget(this.data.targets,e.data.id)},l.findSameXOfValues=function(e,t){var n,i=e[t].x,r=[];for(n=t-1;n>=0&&i===e[n].x;n--)r.push(e[n]);for(n=t;n<e.length&&i===e[n].x;n++)r.push(e[n]);return r},l.findClosestFromTargets=function(e,t){var n,i=this;return n=e.map(function(e){return i.findClosest(e.values,t)}),i.findClosest(n,t)},l.findClosest=function(e,t){var n,i=this,r=100;return e.filter(function(e){return e&&i.isBarType(e.id)}).forEach(function(e){var t=i.main.select("."+d.bars+i.getTargetSelectorSuffix(e.id)+" ."+d.bar+"-"+e.index).node();!n&&i.isWithinBar(t)&&(n=e)}),e.filter(function(e){return e&&!i.isBarType(e.id)}).forEach(function(e){var o=i.dist(e,t);r>o&&(r=o,n=e)}),n},l.dist=function(e,t){var n=this,i=n.config,r=i.axis_rotated?1:0,o=i.axis_rotated?0:1,a=n.circleY(e,e.index),s=n.x(e.x);return Math.pow(s-t[r],2)+Math.pow(a-t[o],2)},l.convertValuesToStep=function(e){var t,n=[].concat(e);if(!this.isCategorized())return e;for(t=e.length+1;t>0;t--)n[t]=n[t-1];return n[0]={x:n[0].x-1,value:n[0].value,id:n[0].id},n[e.length+1]={x:n[e.length].x+1,value:n[e.length].value,id:n[e.length].id},n},l.updateDataAttributes=function(e,t){var n=this,i=n.config,r=i["data_"+e];return"undefined"==typeof t?r:(Object.keys(t).forEach(function(e){r[e]=t[e]}),n.redraw({withLegend:!0}),r)},l.convertUrlToData=function(e,t,n,i){var r=this,o=t?t:"csv";r.d3.xhr(e,function(e,t){var a;if(!t)throw new Error(e.responseURL+" "+e.status+" ("+e.statusText+")");a="json"===o?r.convertJsonToData(JSON.parse(t.response),n):"tsv"===o?r.convertTsvToData(t.response):r.convertCsvToData(t.response),i.call(r,a)})},l.convertXsvToData=function(e,t){var n,i=t.parseRows(e);return 1===i.length?(n=[{}],i[0].forEach(function(e){n[0][e]=null})):n=t.parse(e),n},l.convertCsvToData=function(e){return this.convertXsvToData(e,this.d3.csv)},l.convertTsvToData=function(e){return this.convertXsvToData(e,this.d3.tsv)},l.convertJsonToData=function(e,t){var n,i,r=this,o=[];return t?(t.x?(n=t.value.concat(t.x),r.config.data_x=t.x):n=t.value,o.push(n),e.forEach(function(e){var t=[];n.forEach(function(n){var i=m(e[n])?null:e[n];t.push(i)}),o.push(t)}),i=r.convertRowsToData(o)):(Object.keys(e).forEach(function(t){o.push([t].concat(e[t]))}),i=r.convertColumnsToData(o)),i},l.convertRowsToData=function(e){var t,n,i=e[0],r={},o=[];for(t=1;t<e.length;t++){for(r={},n=0;n<e[t].length;n++){if(m(e[t][n]))throw new Error("Source data is missing a component at ("+t+","+n+")!");r[i[n]]=e[t][n]}o.push(r)}return o},l.convertColumnsToData=function(e){var t,n,i,r=[];for(t=0;t<e.length;t++)for(i=e[t][0],n=1;n<e[t].length;n++){if(m(r[n-1])&&(r[n-1]={}),m(e[t][n]))throw new Error("Source data is missing a component at ("+t+","+n+")!");r[n-1][i]=e[t][n]}return r},l.convertDataToTargets=function(e,t){var n,i=this,r=i.config,o=i.d3.keys(e[0]).filter(i.isNotX,i),a=i.d3.keys(e[0]).filter(i.isX,i);return o.forEach(function(n){var o=i.getXKey(n);i.isCustomX()||i.isTimeSeries()?a.indexOf(o)>=0?i.data.xs[n]=(t&&i.data.xs[n]?i.data.xs[n]:[]).concat(e.map(function(e){return e[o]}).filter(h).map(function(e,t){return i.generateTargetX(e,n,t)})):r.data_x?i.data.xs[n]=i.getOtherTargetXs():x(r.data_xs)&&(i.data.xs[n]=i.getXValuesOfXKey(o,i.data.targets)):i.data.xs[n]=e.map(function(e,t){return t})}),o.forEach(function(e){if(!i.data.xs[e])throw new Error('x is not defined for id = "'+e+'".')}),n=o.map(function(t,n){var o=r.data_idConverter(t);return{id:o,id_org:t,values:e.map(function(e,a){var s=i.getXKey(t),l=e[s],u=i.generateTargetX(l,t,a);return i.isCustomX()&&i.isCategorized()&&0===n&&l&&(0===a&&(r.axis_x_categories=[]),r.axis_x_categories.push(l)),(m(e[t])||i.data.xs[t].length<=a)&&(u=void 0),{x:u,value:null===e[t]||isNaN(e[t])?null:+e[t],id:o}}).filter(function(e){return g(e.x)})}}),n.forEach(function(e){var t;r.data_xSort&&(e.values=e.values.sort(function(e,t){var n=e.x||0===e.x?e.x:1/0,i=t.x||0===t.x?t.x:1/0;return n-i})),t=0,e.values.forEach(function(e){e.index=t++}),i.data.xs[e.id].sort(function(e,t){return e-t})}),r.data_type&&i.setTargetType(i.mapToIds(n).filter(function(e){return!(e in r.data_types)}),r.data_type),n.forEach(function(e){i.addCache(e.id_org,e)}),n},l.load=function(e,t){var n=this;e&&(t.filter&&(e=e.filter(t.filter)),(t.type||t.types)&&e.forEach(function(e){var i=t.types&&t.types[e.id]?t.types[e.id]:t.type;n.setTargetType(e.id,i)}),n.data.targets.forEach(function(t){for(var n=0;n<e.length;n++)if(t.id===e[n].id){t.values=e[n].values,e.splice(n,1);break}}),n.data.targets=n.data.targets.concat(e)),n.updateTargets(n.data.targets),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),t.done&&t.done()},l.loadFromArgs=function(e){var t=this;e.data?t.load(t.convertDataToTargets(e.data),e):e.url?t.convertUrlToData(e.url,e.mimeType,e.keys,function(n){t.load(t.convertDataToTargets(n),e)}):e.json?t.load(t.convertDataToTargets(t.convertJsonToData(e.json,e.keys)),e):e.rows?t.load(t.convertDataToTargets(t.convertRowsToData(e.rows)),e):e.columns?t.load(t.convertDataToTargets(t.convertColumnsToData(e.columns)),e):t.load(null,e)},l.unload=function(e,t){var n=this;return t||(t=function(){}),e=e.filter(function(e){return n.hasTarget(n.data.targets,e)}),e&&0!==e.length?(n.svg.selectAll(e.map(function(e){return n.selectorTarget(e)})).transition().style("opacity",0).remove().call(n.endall,t),void e.forEach(function(e){n.withoutFadeIn[e]=!1,n.legend&&n.legend.selectAll("."+d.legendItem+n.getTargetSelectorSuffix(e)).remove(),n.data.targets=n.data.targets.filter(function(t){return t.id!==e})})):void t()},l.categoryName=function(e){var t=this.config;return e<t.axis_x_categories.length?t.axis_x_categories[e]:e},l.initEventRect=function(){var e=this;e.main.select("."+d.chart).append("g").attr("class",d.eventRects).style("fill-opacity",0)},l.redrawEventRect=function(){var e,t,n=this,i=n.config,r=n.isMultipleX(),o=n.main.select("."+d.eventRects).style("cursor",i.zoom_enabled?i.axis_rotated?"ns-resize":"ew-resize":null).classed(d.eventRectsMultiple,r).classed(d.eventRectsSingle,!r);o.selectAll("."+d.eventRect).remove(),n.eventRect=o.selectAll("."+d.eventRect),r?(e=n.eventRect.data([0]),n.generateEventRectsForMultipleXs(e.enter()),n.updateEventRect(e)):(t=n.getMaxDataCountTarget(n.data.targets),o.datum(t?t.values:[]),n.eventRect=o.selectAll("."+d.eventRect),e=n.eventRect.data(function(e){return e}),n.generateEventRectsForSingleX(e.enter()),n.updateEventRect(e),e.exit().remove())},l.updateEventRect=function(e){var t,n,i,r,o,a,s=this,l=s.config;e=e||s.eventRect.data(function(e){return e}),s.isMultipleX()?(t=0,n=0,i=s.width,r=s.height):(!s.isCustomX()&&!s.isTimeSeries()||s.isCategorized()?(o=s.getEventRectWidth(),a=function(e){return s.x(e.x)-o/2}):(s.updateXs(),o=function(e){var t=s.getPrevX(e.index),n=s.getNextX(e.index);return null===t&&null===n?l.axis_rotated?s.height:s.width:(null===t&&(t=s.x.domain()[0]),null===n&&(n=s.x.domain()[1]),Math.max(0,(s.x(n)-s.x(t))/2))},a=function(e){var t=s.getPrevX(e.index),n=s.getNextX(e.index),i=s.data.xs[e.id][e.index];return null===t&&null===n?0:(null===t&&(t=s.x.domain()[0]),(s.x(i)+s.x(t))/2)}),t=l.axis_rotated?0:a,n=l.axis_rotated?a:0,i=l.axis_rotated?s.width:o,r=l.axis_rotated?o:s.height),e.attr("class",s.classEvent.bind(s)).attr("x",t).attr("y",n).attr("width",i).attr("height",r)},l.generateEventRectsForSingleX=function(e){var t=this,n=t.d3,i=t.config;e.append("rect").attr("class",t.classEvent.bind(t)).style("cursor",i.data_selection_enabled&&i.data_selection_grouped?"pointer":null).on("mouseover",function(e){var n=e.index;t.dragging||t.flowing||t.hasArcType()||(i.point_focus_expand_enabled&&t.expandCircles(n,null,!0),t.expandBars(n,null,!0),t.main.selectAll("."+d.shape+"-"+n).each(function(e){i.data_onmouseover.call(t.api,e)}))}).on("mouseout",function(e){var n=e.index;t.config&&(t.hasArcType()||(t.hideXGridFocus(),t.hideTooltip(),t.unexpandCircles(),t.unexpandBars(),t.main.selectAll("."+d.shape+"-"+n).each(function(e){i.data_onmouseout.call(t.api,e)})))}).on("mousemove",function(e){var r,o=e.index,a=t.svg.select("."+d.eventRect+"-"+o);t.dragging||t.flowing||t.hasArcType()||(t.isStepType(e)&&"step-after"===t.config.line_step_type&&n.mouse(this)[0]<t.x(t.getXValue(e.id,o))&&(o-=1),r=t.filterTargetsToShow(t.data.targets).map(function(e){return t.addName(t.getValueOnIndex(e.values,o))}),i.tooltip_grouped&&(t.showTooltip(r,this),t.showXGridFocus(r)),(!i.tooltip_grouped||i.data_selection_enabled&&!i.data_selection_grouped)&&t.main.selectAll("."+d.shape+"-"+o).each(function(){n.select(this).classed(d.EXPANDED,!0),i.data_selection_enabled&&a.style("cursor",i.data_selection_grouped?"pointer":null),i.tooltip_grouped||(t.hideXGridFocus(),t.hideTooltip(),i.data_selection_grouped||(t.unexpandCircles(o),t.unexpandBars(o)))}).filter(function(e){return t.isWithinShape(this,e)}).each(function(e){i.data_selection_enabled&&(i.data_selection_grouped||i.data_selection_isselectable(e))&&a.style("cursor","pointer"),i.tooltip_grouped||(t.showTooltip([e],this),t.showXGridFocus([e]),i.point_focus_expand_enabled&&t.expandCircles(o,e.id,!0),t.expandBars(o,e.id,!0))}))}).on("click",function(e){var r=e.index;if(!t.hasArcType()&&t.toggleShape){if(t.cancelClick)return void(t.cancelClick=!1);t.isStepType(e)&&"step-after"===i.line_step_type&&n.mouse(this)[0]<t.x(t.getXValue(e.id,r))&&(r-=1),t.main.selectAll("."+d.shape+"-"+r).each(function(e){(i.data_selection_grouped||t.isWithinShape(this,e))&&(t.toggleShape(this,e,r),t.config.data_onclick.call(t.api,e,this))})}}).call(i.data_selection_draggable&&t.drag?n.behavior.drag().origin(Object).on("drag",function(){t.drag(n.mouse(this))}).on("dragstart",function(){t.dragstart(n.mouse(this))}).on("dragend",function(){t.dragend()}):function(){})},l.generateEventRectsForMultipleXs=function(e){function t(){n.svg.select("."+d.eventRect).style("cursor",null),n.hideXGridFocus(),n.hideTooltip(),n.unexpandCircles(),n.unexpandBars()}var n=this,i=n.d3,r=n.config;e.append("rect").attr("x",0).attr("y",0).attr("width",n.width).attr("height",n.height).attr("class",d.eventRect).on("mouseout",function(){n.config&&(n.hasArcType()||t())}).on("mousemove",function(){var e,o,a,s,l=n.filterTargetsToShow(n.data.targets);if(!n.dragging&&!n.hasArcType(l)){if(e=i.mouse(this),o=n.findClosestFromTargets(l,e),!n.mouseover||o&&o.id===n.mouseover.id||(r.data_onmouseout.call(n.api,n.mouseover),n.mouseover=void 0),!o)return void t();a=n.isScatterType(o)||!r.tooltip_grouped?[o]:n.filterByX(l,o.x),s=a.map(function(e){return n.addName(e)}),n.showTooltip(s,this),r.point_focus_expand_enabled&&n.expandCircles(o.index,o.id,!0),n.expandBars(o.index,o.id,!0),n.showXGridFocus(s),(n.isBarType(o.id)||n.dist(o,e)<100)&&(n.svg.select("."+d.eventRect).style("cursor","pointer"),n.mouseover||(r.data_onmouseover.call(n.api,o),n.mouseover=o))}}).on("click",function(){var e,t,o=n.filterTargetsToShow(n.data.targets);n.hasArcType(o)||(e=i.mouse(this),t=n.findClosestFromTargets(o,e),t&&(n.isBarType(t.id)||n.dist(t,e)<100)&&n.main.selectAll("."+d.shapes+n.getTargetSelectorSuffix(t.id)).selectAll("."+d.shape+"-"+t.index).each(function(){(r.data_selection_grouped||n.isWithinShape(this,t))&&(n.toggleShape(this,t,t.index),n.config.data_onclick.call(n.api,t,this))}))}).call(r.data_selection_draggable&&n.drag?i.behavior.drag().origin(Object).on("drag",function(){n.drag(i.mouse(this))}).on("dragstart",function(){n.dragstart(i.mouse(this))}).on("dragend",function(){n.dragend()}):function(){})},l.dispatchEvent=function(t,n,i){var r=this,o="."+d.eventRect+(r.isMultipleX()?"":"-"+n),a=r.main.select(o).node(),s=a.getBoundingClientRect(),l=s.left+(i?i[0]:0),u=s.top+(i?i[1]:0),c=document.createEvent("MouseEvents");c.initMouseEvent(t,!0,!0,e,0,l,u,l,u,!1,!1,!1,!1,0,null),a.dispatchEvent(c)},l.getCurrentWidth=function(){var e=this,t=e.config;return t.size_width?t.size_width:e.getParentWidth()},l.getCurrentHeight=function(){var e=this,t=e.config,n=t.size_height?t.size_height:e.getParentHeight();return n>0?n:320/(e.hasType("gauge")?2:1)},l.getCurrentPaddingTop=function(){var e=this.config;return h(e.padding_top)?e.padding_top:0},l.getCurrentPaddingBottom=function(){var e=this.config;return h(e.padding_bottom)?e.padding_bottom:0},l.getCurrentPaddingLeft=function(e){var t=this,n=t.config;return h(n.padding_left)?n.padding_left:n.axis_rotated?n.axis_x_show?Math.max(v(t.getAxisWidthByAxisId("x",e)),40):1:!n.axis_y_show||n.axis_y_inner?t.axis.getYAxisLabelPosition().isOuter?30:1:v(t.getAxisWidthByAxisId("y",e))},l.getCurrentPaddingRight=function(){var e=this,t=e.config,n=10,i=e.isLegendRight?e.getLegendWidth()+20:0;return h(t.padding_right)?t.padding_right+1:t.axis_rotated?n+i:!t.axis_y2_show||t.axis_y2_inner?2+i+(e.axis.getY2AxisLabelPosition().isOuter?20:0):v(e.getAxisWidthByAxisId("y2"))+i},l.getParentRectValue=function(e){for(var t,n=this.selectChart.node();n&&"BODY"!==n.tagName;){try{t=n.getBoundingClientRect()[e]}catch(i){"width"===e&&(t=n.offsetWidth)}if(t)break;n=n.parentNode}return t},l.getParentWidth=function(){return this.getParentRectValue("width")},l.getParentHeight=function(){var e=this.selectChart.style("height");return e.indexOf("px")>0?+e.replace("px",""):0},l.getSvgLeft=function(e){var t=this,n=t.config,i=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,r=n.axis_rotated?d.axisX:d.axisY,o=t.main.select("."+r).node(),a=o&&i?o.getBoundingClientRect():{right:0},s=t.selectChart.node().getBoundingClientRect(),l=t.hasArcType(),u=a.right-s.left-(l?0:t.getCurrentPaddingLeft(e));return u>0?u:0},l.getAxisWidthByAxisId=function(e,t){var n=this,i=n.axis.getLabelPositionById(e);return n.axis.getMaxTickWidth(e,t)+(i.isInner?20:40)},l.getHorizontalAxisHeight=function(e){var t=this,n=t.config,i=30;return"x"!==e||n.axis_x_show?"x"===e&&n.axis_x_height?n.axis_x_height:"y"!==e||n.axis_y_show?"y2"!==e||n.axis_y2_show?("x"===e&&!n.axis_rotated&&n.axis_x_tick_rotate&&(i=30+t.axis.getMaxTickWidth(e)*Math.cos(Math.PI*(90-n.axis_x_tick_rotate)/180)),i+(t.axis.getLabelPositionById(e).isInner?0:10)+("y2"===e?-10:0)):t.rotated_padding_top:!n.legend_show||t.isLegendRight||t.isLegendInset?1:10:8},l.getEventRectWidth=function(){return Math.max(0,this.xAxis.tickInterval())},l.getShapeIndices=function(e){var t,n,i=this,r=i.config,o={},a=0;return i.filterTargetsToShow(i.data.targets.filter(e,i)).forEach(function(e){for(t=0;t<r.data_groups.length;t++)if(!(r.data_groups[t].indexOf(e.id)<0))for(n=0;n<r.data_groups[t].length;n++)if(r.data_groups[t][n]in o){o[e.id]=o[r.data_groups[t][n]];break}m(o[e.id])&&(o[e.id]=a++)}),o.__max__=a-1,o},l.getShapeX=function(e,t,n,i){var r=this,o=i?r.subX:r.x;return function(i){var r=i.id in n?n[i.id]:0;return i.x||0===i.x?o(i.x)-e*(t/2-r):0}},l.getShapeY=function(e){var t=this;return function(n){var i=e?t.getSubYScale(n.id):t.getYScale(n.id);return i(n.value)}},l.getShapeOffset=function(e,t,n){var i=this,r=i.orderTargets(i.filterTargetsToShow(i.data.targets.filter(e,i))),o=r.map(function(e){return e.id});return function(e,a){var s=n?i.getSubYScale(e.id):i.getYScale(e.id),l=s(0),u=l;return r.forEach(function(n){var r=i.isStepType(e)?i.convertValuesToStep(n.values):n.values;n.id!==e.id&&t[n.id]===t[e.id]&&o.indexOf(n.id)<o.indexOf(e.id)&&r[a].value*e.value>=0&&(u+=s(r[a].value)-l)}),u}},l.isWithinShape=function(e,t){var n,i=this,r=i.d3.select(e);return i.isTargetToShow(t.id)?"circle"===e.nodeName?n=i.isStepType(t)?i.isWithinStep(e,i.getYScale(t.id)(t.value)):i.isWithinCircle(e,1.5*i.pointSelectR(t)):"path"===e.nodeName&&(n=r.classed(d.bar)?i.isWithinBar(e):!0):n=!1,n},l.getInterpolate=function(e){var t=this;return t.isSplineType(e)?"cardinal":t.isStepType(e)?t.config.line_step_type:"linear"},l.initLine=function(){var e=this;e.main.select("."+d.chart).append("g").attr("class",d.chartLines)},l.updateTargetsForLine=function(e){var t,n,i=this,r=i.config,o=i.classChartLine.bind(i),a=i.classLines.bind(i),s=i.classAreas.bind(i),l=i.classCircles.bind(i),u=i.classFocus.bind(i);t=i.main.select("."+d.chartLines).selectAll("."+d.chartLine).data(e).attr("class",function(e){return o(e)+u(e)}),n=t.enter().append("g").attr("class",o).style("opacity",0).style("pointer-events","none"),n.append("g").attr("class",a),n.append("g").attr("class",s),n.append("g").attr("class",function(e){return i.generateClass(d.selectedCircles,e.id)}),n.append("g").attr("class",l).style("cursor",function(e){return r.data_selection_isselectable(e)?"pointer":null}),e.forEach(function(e){i.main.selectAll("."+d.selectedCircles+i.getTargetSelectorSuffix(e.id)).selectAll("."+d.selectedCircle).each(function(t){t.value=e.values[t.index].value})})},l.updateLine=function(e){var t=this;t.mainLine=t.main.selectAll("."+d.lines).selectAll("."+d.line).data(t.lineData.bind(t)),t.mainLine.enter().append("path").attr("class",t.classLine.bind(t)).style("stroke",t.color),t.mainLine.style("opacity",t.initialOpacity.bind(t)).style("shape-rendering",function(e){return t.isStepType(e)?"crispEdges":""}).attr("transform",null),t.mainLine.exit().transition().duration(e).style("opacity",0).remove()},l.redrawLine=function(e,t){return[(t?this.mainLine.transition():this.mainLine).attr("d",e).style("stroke",this.color).style("opacity",1)]},l.generateDrawLine=function(e,t){var n=this,i=n.config,r=n.d3.svg.line(),o=n.generateGetLinePoints(e,t),a=t?n.getSubYScale:n.getYScale,s=function(e){return(t?n.subxx:n.xx).call(n,e)},l=function(e,t){return i.data_groups.length>0?o(e,t)[0][1]:a.call(n,e.id)(e.value)};return r=i.axis_rotated?r.x(l).y(s):r.x(s).y(l),i.line_connectNull||(r=r.defined(function(e){return null!=e.value})),function(e){var o,s=i.line_connectNull?n.filterRemoveNull(e.values):e.values,l=t?n.x:n.subX,u=a.call(n,e.id),c=0,d=0;return n.isLineType(e)?i.data_regions[e.id]?o=n.lineWithRegions(s,l,u,i.data_regions[e.id]):(n.isStepType(e)&&(s=n.convertValuesToStep(s)),o=r.interpolate(n.getInterpolate(e))(s)):(s[0]&&(c=l(s[0].x),d=u(s[0].value)),o=i.axis_rotated?"M "+d+" "+c:"M "+c+" "+d),o?o:"M 0 0"}},l.generateGetLinePoints=function(e,t){var n=this,i=n.config,r=e.__max__+1,o=n.getShapeX(0,r,e,!!t),a=n.getShapeY(!!t),s=n.getShapeOffset(n.isLineType,e,!!t),l=t?n.getSubYScale:n.getYScale;return function(e,t){var r=l.call(n,e.id)(0),u=s(e,t)||r,c=o(e),d=a(e);return i.axis_rotated&&(0<e.value&&r>d||e.value<0&&d>r)&&(d=r),[[c,d-(r-u)],[c,d-(r-u)],[c,d-(r-u)],[c,d-(r-u)]]}},l.lineWithRegions=function(e,t,n,i){function r(e,t){var n;for(n=0;n<t.length;n++)if(t[n].start<e&&e<=t[n].end)return!0;return!1}function o(e){return"M"+e[0][0]+" "+e[0][1]+" "+e[1][0]+" "+e[1][1]}var a,s,l,u,c,d,h,p,f,v,y,_,b=this,x=b.config,w=-1,$="M",k=b.isCategorized()?.5:0,C=[];if(g(i))for(a=0;a<i.length;a++)C[a]={},C[a].start=m(i[a].start)?e[0].x:b.isTimeSeries()?b.parseDate(i[a].start):i[a].start,C[a].end=m(i[a].end)?e[e.length-1].x:b.isTimeSeries()?b.parseDate(i[a].end):i[a].end;for(y=x.axis_rotated?function(e){return n(e.value)}:function(e){return t(e.x)},_=x.axis_rotated?function(e){return t(e.x)}:function(e){return n(e.value);
|
137
|
+
},l=b.isTimeSeries()?function(e,i,r,a){var s,l=e.x.getTime(),u=i.x-e.x,d=new Date(l+u*r),h=new Date(l+u*(r+a));return s=x.axis_rotated?[[n(c(r)),t(d)],[n(c(r+a)),t(h)]]:[[t(d),n(c(r))],[t(h),n(c(r+a))]],o(s)}:function(e,i,r,a){var s;return s=x.axis_rotated?[[n(c(r),!0),t(u(r))],[n(c(r+a),!0),t(u(r+a))]]:[[t(u(r),!0),n(c(r))],[t(u(r+a),!0),n(c(r+a))]],o(s)},a=0;a<e.length;a++){if(m(C)||!r(e[a].x,C))$+=" "+y(e[a])+" "+_(e[a]);else for(u=b.getScale(e[a-1].x+k,e[a].x+k,b.isTimeSeries()),c=b.getScale(e[a-1].value,e[a].value),d=t(e[a].x)-t(e[a-1].x),h=n(e[a].value)-n(e[a-1].value),p=Math.sqrt(Math.pow(d,2)+Math.pow(h,2)),f=2/p,v=2*f,s=f;1>=s;s+=v)$+=l(e[a-1],e[a],s,f);w=e[a].x}return $},l.updateArea=function(e){var t=this,n=t.d3;t.mainArea=t.main.selectAll("."+d.areas).selectAll("."+d.area).data(t.lineData.bind(t)),t.mainArea.enter().append("path").attr("class",t.classArea.bind(t)).style("fill",t.color).style("opacity",function(){return t.orgAreaOpacity=+n.select(this).style("opacity"),0}),t.mainArea.style("opacity",t.orgAreaOpacity),t.mainArea.exit().transition().duration(e).style("opacity",0).remove()},l.redrawArea=function(e,t){return[(t?this.mainArea.transition():this.mainArea).attr("d",e).style("fill",this.color).style("opacity",this.orgAreaOpacity)]},l.generateDrawArea=function(e,t){var n=this,i=n.config,r=n.d3.svg.area(),o=n.generateGetAreaPoints(e,t),a=t?n.getSubYScale:n.getYScale,s=function(e){return(t?n.subxx:n.xx).call(n,e)},l=function(e,t){return i.data_groups.length>0?o(e,t)[0][1]:a.call(n,e.id)(n.getAreaBaseValue(e.id))},u=function(e,t){return i.data_groups.length>0?o(e,t)[1][1]:a.call(n,e.id)(e.value)};return r=i.axis_rotated?r.x0(l).x1(u).y(s):r.x(s).y0(l).y1(u),i.line_connectNull||(r=r.defined(function(e){return null!==e.value})),function(e){var t,o=i.line_connectNull?n.filterRemoveNull(e.values):e.values,a=0,s=0;return n.isAreaType(e)?(n.isStepType(e)&&(o=n.convertValuesToStep(o)),t=r.interpolate(n.getInterpolate(e))(o)):(o[0]&&(a=n.x(o[0].x),s=n.getYScale(e.id)(o[0].value)),t=i.axis_rotated?"M "+s+" "+a:"M "+a+" "+s),t?t:"M 0 0"}},l.getAreaBaseValue=function(){return 0},l.generateGetAreaPoints=function(e,t){var n=this,i=n.config,r=e.__max__+1,o=n.getShapeX(0,r,e,!!t),a=n.getShapeY(!!t),s=n.getShapeOffset(n.isAreaType,e,!!t),l=t?n.getSubYScale:n.getYScale;return function(e,t){var r=l.call(n,e.id)(0),u=s(e,t)||r,c=o(e),d=a(e);return i.axis_rotated&&(0<e.value&&r>d||e.value<0&&d>r)&&(d=r),[[c,u],[c,d-(r-u)],[c,d-(r-u)],[c,u]]}},l.updateCircle=function(){var e=this;e.mainCircle=e.main.selectAll("."+d.circles).selectAll("."+d.circle).data(e.lineOrScatterData.bind(e)),e.mainCircle.enter().append("circle").attr("class",e.classCircle.bind(e)).attr("r",e.pointR.bind(e)).style("fill",e.color),e.mainCircle.style("opacity",e.initialOpacityForCircle.bind(e)),e.mainCircle.exit().remove()},l.redrawCircle=function(e,t,n){var i=this.main.selectAll("."+d.selectedCircle);return[(n?this.mainCircle.transition():this.mainCircle).style("opacity",this.opacityForCircle.bind(this)).style("fill",this.color).attr("cx",e).attr("cy",t),(n?i.transition():i).attr("cx",e).attr("cy",t)]},l.circleX=function(e){return e.x||0===e.x?this.x(e.x):null},l.updateCircleY=function(){var e,t,n=this;n.config.data_groups.length>0?(e=n.getShapeIndices(n.isLineType),t=n.generateGetLinePoints(e),n.circleY=function(e,n){return t(e,n)[0][1]}):n.circleY=function(e){return n.getYScale(e.id)(e.value)}},l.getCircles=function(e,t){var n=this;return(t?n.main.selectAll("."+d.circles+n.getTargetSelectorSuffix(t)):n.main).selectAll("."+d.circle+(h(e)?"-"+e:""))},l.expandCircles=function(e,t,n){var i=this,r=i.pointExpandedR.bind(i);n&&i.unexpandCircles(),i.getCircles(e,t).classed(d.EXPANDED,!0).attr("r",r)},l.unexpandCircles=function(e){var t=this,n=t.pointR.bind(t);t.getCircles(e).filter(function(){return t.d3.select(this).classed(d.EXPANDED)}).classed(d.EXPANDED,!1).attr("r",n)},l.pointR=function(e){var t=this,n=t.config;return t.isStepType(e)?0:p(n.point_r)?n.point_r(e):n.point_r},l.pointExpandedR=function(e){var t=this,n=t.config;return n.point_focus_expand_enabled?n.point_focus_expand_r?n.point_focus_expand_r:1.75*t.pointR(e):t.pointR(e)},l.pointSelectR=function(e){var t=this,n=t.config;return n.point_select_r?n.point_select_r:4*t.pointR(e)},l.isWithinCircle=function(e,t){var n=this.d3,i=n.mouse(e),r=n.select(e),o=+r.attr("cx"),a=+r.attr("cy");return Math.sqrt(Math.pow(o-i[0],2)+Math.pow(a-i[1],2))<t},l.isWithinStep=function(e,t){return Math.abs(t-this.d3.mouse(e)[1])<30},l.initBar=function(){var e=this;e.main.select("."+d.chart).append("g").attr("class",d.chartBars)},l.updateTargetsForBar=function(e){var t,n,i=this,r=i.config,o=i.classChartBar.bind(i),a=i.classBars.bind(i),s=i.classFocus.bind(i);t=i.main.select("."+d.chartBars).selectAll("."+d.chartBar).data(e).attr("class",function(e){return o(e)+s(e)}),n=t.enter().append("g").attr("class",o).style("opacity",0).style("pointer-events","none"),n.append("g").attr("class",a).style("cursor",function(e){return r.data_selection_isselectable(e)?"pointer":null})},l.updateBar=function(e){var t=this,n=t.barData.bind(t),i=t.classBar.bind(t),r=t.initialOpacity.bind(t),o=function(e){return t.color(e.id)};t.mainBar=t.main.selectAll("."+d.bars).selectAll("."+d.bar).data(n),t.mainBar.enter().append("path").attr("class",i).style("stroke",o).style("fill",o),t.mainBar.style("opacity",r),t.mainBar.exit().transition().duration(e).style("opacity",0).remove()},l.redrawBar=function(e,t){return[(t?this.mainBar.transition():this.mainBar).attr("d",e).style("fill",this.color).style("opacity",1)]},l.getBarW=function(e,t){var n=this,i=n.config,r="number"==typeof i.bar_width?i.bar_width:t?e.tickInterval()*i.bar_width_ratio/t:0;return i.bar_width_max&&r>i.bar_width_max?i.bar_width_max:r},l.getBars=function(e,t){var n=this;return(t?n.main.selectAll("."+d.bars+n.getTargetSelectorSuffix(t)):n.main).selectAll("."+d.bar+(h(e)?"-"+e:""))},l.expandBars=function(e,t,n){var i=this;n&&i.unexpandBars(),i.getBars(e,t).classed(d.EXPANDED,!0)},l.unexpandBars=function(e){var t=this;t.getBars(e).classed(d.EXPANDED,!1)},l.generateDrawBar=function(e,t){var n=this,i=n.config,r=n.generateGetBarPoints(e,t);return function(e,t){var n=r(e,t),o=i.axis_rotated?1:0,a=i.axis_rotated?0:1,s="M "+n[0][o]+","+n[0][a]+" L"+n[1][o]+","+n[1][a]+" L"+n[2][o]+","+n[2][a]+" L"+n[3][o]+","+n[3][a]+" z";return s}},l.generateGetBarPoints=function(e,t){var n=this,i=t?n.subXAxis:n.xAxis,r=e.__max__+1,o=n.getBarW(i,r),a=n.getShapeX(o,r,e,!!t),s=n.getShapeY(!!t),l=n.getShapeOffset(n.isBarType,e,!!t),u=t?n.getSubYScale:n.getYScale;return function(e,t){var i=u.call(n,e.id)(0),r=l(e,t)||i,c=a(e),d=s(e);return n.config.axis_rotated&&(0<e.value&&i>d||e.value<0&&d>i)&&(d=i),[[c,r],[c,d-(i-r)],[c+o,d-(i-r)],[c+o,r]]}},l.isWithinBar=function(e){var t=this.d3.mouse(e),n=e.getBoundingClientRect(),i=e.pathSegList.getItem(0),r=e.pathSegList.getItem(1),o=Math.min(i.x,r.x),a=Math.min(i.y,r.y),s=n.width,l=n.height,u=2,c=o-u,d=o+s+u,h=a+l+u,p=a-u;return c<t[0]&&t[0]<d&&p<t[1]&&t[1]<h},l.initText=function(){var e=this;e.main.select("."+d.chart).append("g").attr("class",d.chartTexts),e.mainText=e.d3.selectAll([])},l.updateTargetsForText=function(e){var t,n,i=this,r=i.classChartText.bind(i),o=i.classTexts.bind(i),a=i.classFocus.bind(i);t=i.main.select("."+d.chartTexts).selectAll("."+d.chartText).data(e).attr("class",function(e){return r(e)+a(e)}),n=t.enter().append("g").attr("class",r).style("opacity",0).style("pointer-events","none"),n.append("g").attr("class",o)},l.updateText=function(e){var t=this,n=t.config,i=t.barOrLineData.bind(t),r=t.classText.bind(t);t.mainText=t.main.selectAll("."+d.texts).selectAll("."+d.text).data(i),t.mainText.enter().append("text").attr("class",r).attr("text-anchor",function(e){return n.axis_rotated?e.value<0?"end":"start":"middle"}).style("stroke","none").style("fill",function(e){return t.color(e)}).style("fill-opacity",0),t.mainText.text(function(e,n,i){return t.dataLabelFormat(e.id)(e.value,e.id,n,i)}),t.mainText.exit().transition().duration(e).style("fill-opacity",0).remove()},l.redrawText=function(e,t,n,i){return[(i?this.mainText.transition():this.mainText).attr("x",e).attr("y",t).style("fill",this.color).style("fill-opacity",n?0:this.opacityForText.bind(this))]},l.getTextRect=function(e,t){var n,i=this.d3.select("body").append("div").classed("c3",!0),r=i.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0);return r.selectAll(".dummy").data([e]).enter().append("text").classed(t?t:"",!0).text(e).each(function(){n=this.getBoundingClientRect()}),i.remove(),n},l.generateXYForText=function(e,t,n,i){var r=this,o=r.generateGetAreaPoints(e,!1),a=r.generateGetBarPoints(t,!1),s=r.generateGetLinePoints(n,!1),l=i?r.getXForText:r.getYForText;return function(e,t){var n=r.isAreaType(e)?o:r.isBarType(e)?a:s;return l.call(r,n(e,t),e,this)}},l.getXForText=function(e,t,n){var i,r,o=this,a=n.getBoundingClientRect();return o.config.axis_rotated?(r=o.isBarType(t)?4:6,i=e[2][1]+r*(t.value<0?-1:1)):i=o.hasType("bar")?(e[2][0]+e[0][0])/2:e[0][0],null===t.value&&(i>o.width?i=o.width-a.width:0>i&&(i=4)),i},l.getYForText=function(e,t,n){var i,r=this,o=n.getBoundingClientRect();return r.config.axis_rotated?i=(e[0][0]+e[2][0]+.6*o.height)/2:(i=e[2][1],t.value<0?(i+=o.height,r.isBarType(t)&&r.isSafari()?i-=3:!r.isBarType(t)&&r.isChrome()&&(i+=3)):i+=r.isBarType(t)?-3:-6),null!==t.value||r.config.axis_rotated||(i<o.height?i=o.height:i>this.height&&(i=this.height-4)),i},l.setTargetType=function(e,t){var n=this,i=n.config;n.mapToTargetIds(e).forEach(function(e){n.withoutFadeIn[e]=t===i.data_types[e],i.data_types[e]=t}),e||(i.data_type=t)},l.hasType=function(e,t){var n=this,i=n.config.data_types,r=!1;return t=t||n.data.targets,t&&t.length?t.forEach(function(t){var n=i[t.id];(n&&n.indexOf(e)>=0||!n&&"line"===e)&&(r=!0)}):Object.keys(i).length?Object.keys(i).forEach(function(t){i[t]===e&&(r=!0)}):r=n.config.data_type===e,r},l.hasArcType=function(e){return this.hasType("pie",e)||this.hasType("donut",e)||this.hasType("gauge",e)},l.isLineType=function(e){var t=this.config,n=f(e)?e:e.id;return!t.data_types[n]||["line","spline","area","area-spline","step","area-step"].indexOf(t.data_types[n])>=0},l.isStepType=function(e){var t=f(e)?e:e.id;return["step","area-step"].indexOf(this.config.data_types[t])>=0},l.isSplineType=function(e){var t=f(e)?e:e.id;return["spline","area-spline"].indexOf(this.config.data_types[t])>=0},l.isAreaType=function(e){var t=f(e)?e:e.id;return["area","area-spline","area-step"].indexOf(this.config.data_types[t])>=0},l.isBarType=function(e){var t=f(e)?e:e.id;return"bar"===this.config.data_types[t]},l.isScatterType=function(e){var t=f(e)?e:e.id;return"scatter"===this.config.data_types[t]},l.isPieType=function(e){var t=f(e)?e:e.id;return"pie"===this.config.data_types[t]},l.isGaugeType=function(e){var t=f(e)?e:e.id;return"gauge"===this.config.data_types[t]},l.isDonutType=function(e){var t=f(e)?e:e.id;return"donut"===this.config.data_types[t]},l.isArcType=function(e){return this.isPieType(e)||this.isDonutType(e)||this.isGaugeType(e)},l.lineData=function(e){return this.isLineType(e)?[e]:[]},l.arcData=function(e){return this.isArcType(e.data)?[e]:[]},l.barData=function(e){return this.isBarType(e)?e.values:[]},l.lineOrScatterData=function(e){return this.isLineType(e)||this.isScatterType(e)?e.values:[]},l.barOrLineData=function(e){return this.isBarType(e)||this.isLineType(e)?e.values:[]},l.initGrid=function(){var e=this,t=e.config,n=e.d3;e.grid=e.main.append("g").attr("clip-path",e.clipPathForGrid).attr("class",d.grid),t.grid_x_show&&e.grid.append("g").attr("class",d.xgrids),t.grid_y_show&&e.grid.append("g").attr("class",d.ygrids),t.grid_focus_show&&e.grid.append("g").attr("class",d.xgridFocus).append("line").attr("class",d.xgridFocus),e.xgrid=n.selectAll([]),t.grid_lines_front||e.initGridLines()},l.initGridLines=function(){var e=this,t=e.d3;e.gridLines=e.main.append("g").attr("clip-path",e.clipPathForGrid).attr("class",d.grid+" "+d.gridLines),e.gridLines.append("g").attr("class",d.xgridLines),e.gridLines.append("g").attr("class",d.ygridLines),e.xgridLines=t.selectAll([])},l.updateXGrid=function(e){var t=this,n=t.config,i=t.d3,r=t.generateGridData(n.grid_x_type,t.x),o=t.isCategorized()?t.xAxis.tickOffset():0;t.xgridAttr=n.axis_rotated?{x1:0,x2:t.width,y1:function(e){return t.x(e)-o},y2:function(e){return t.x(e)-o}}:{x1:function(e){return t.x(e)+o},x2:function(e){return t.x(e)+o},y1:0,y2:t.height},t.xgrid=t.main.select("."+d.xgrids).selectAll("."+d.xgrid).data(r),t.xgrid.enter().append("line").attr("class",d.xgrid),e||t.xgrid.attr(t.xgridAttr).style("opacity",function(){return+i.select(this).attr(n.axis_rotated?"y1":"x1")===(n.axis_rotated?t.height:0)?0:1}),t.xgrid.exit().remove()},l.updateYGrid=function(){var e=this,t=e.config,n=e.yAxis.tickValues()||e.y.ticks(t.grid_y_ticks);e.ygrid=e.main.select("."+d.ygrids).selectAll("."+d.ygrid).data(n),e.ygrid.enter().append("line").attr("class",d.ygrid),e.ygrid.attr("x1",t.axis_rotated?e.y:0).attr("x2",t.axis_rotated?e.y:e.width).attr("y1",t.axis_rotated?0:e.y).attr("y2",t.axis_rotated?e.height:e.y),e.ygrid.exit().remove(),e.smoothLines(e.ygrid,"grid")},l.gridTextAnchor=function(e){return e.position?e.position:"end"},l.gridTextDx=function(e){return"start"===e.position?4:"middle"===e.position?0:-4},l.xGridTextX=function(e){return"start"===e.position?-this.height:"middle"===e.position?-this.height/2:0},l.yGridTextX=function(e){return"start"===e.position?0:"middle"===e.position?this.width/2:this.width},l.updateGrid=function(e){var t,n,i,r=this,o=r.main,a=r.config;r.grid.style("visibility",r.hasArcType()?"hidden":"visible"),o.select("line."+d.xgridFocus).style("visibility","hidden"),a.grid_x_show&&r.updateXGrid(),r.xgridLines=o.select("."+d.xgridLines).selectAll("."+d.xgridLine).data(a.grid_x_lines),t=r.xgridLines.enter().append("g").attr("class",function(e){return d.xgridLine+(e["class"]?" "+e["class"]:"")}),t.append("line").style("opacity",0),t.append("text").attr("text-anchor",r.gridTextAnchor).attr("transform",a.axis_rotated?"":"rotate(-90)").attr("dx",r.gridTextDx).attr("dy",-5).style("opacity",0),r.xgridLines.exit().transition().duration(e).style("opacity",0).remove(),a.grid_y_show&&r.updateYGrid(),r.ygridLines=o.select("."+d.ygridLines).selectAll("."+d.ygridLine).data(a.grid_y_lines),n=r.ygridLines.enter().append("g").attr("class",function(e){return d.ygridLine+(e["class"]?" "+e["class"]:"")}),n.append("line").style("opacity",0),n.append("text").attr("text-anchor",r.gridTextAnchor).attr("transform",a.axis_rotated?"rotate(-90)":"").attr("dx",r.gridTextDx).attr("dy",-5).style("opacity",0),i=r.yv.bind(r),r.ygridLines.select("line").transition().duration(e).attr("x1",a.axis_rotated?i:0).attr("x2",a.axis_rotated?i:r.width).attr("y1",a.axis_rotated?0:i).attr("y2",a.axis_rotated?r.height:i).style("opacity",1),r.ygridLines.select("text").transition().duration(e).attr("x",a.axis_rotated?r.xGridTextX.bind(r):r.yGridTextX.bind(r)).attr("y",i).text(function(e){return e.text}).style("opacity",1),r.ygridLines.exit().transition().duration(e).style("opacity",0).remove()},l.redrawGrid=function(e){var t=this,n=t.config,i=t.xv.bind(t),r=t.xgridLines.select("line"),o=t.xgridLines.select("text");return[(e?r.transition():r).attr("x1",n.axis_rotated?0:i).attr("x2",n.axis_rotated?t.width:i).attr("y1",n.axis_rotated?i:0).attr("y2",n.axis_rotated?i:t.height).style("opacity",1),(e?o.transition():o).attr("x",n.axis_rotated?t.yGridTextX.bind(t):t.xGridTextX.bind(t)).attr("y",i).text(function(e){return e.text}).style("opacity",1)]},l.showXGridFocus=function(e){var t=this,n=t.config,i=e.filter(function(e){return e&&h(e.value)}),r=t.main.selectAll("line."+d.xgridFocus),o=t.xx.bind(t);n.tooltip_show&&(t.hasType("scatter")||t.hasArcType()||(r.style("visibility","visible").data([i[0]]).attr(n.axis_rotated?"y1":"x1",o).attr(n.axis_rotated?"y2":"x2",o),t.smoothLines(r,"grid")))},l.hideXGridFocus=function(){this.main.select("line."+d.xgridFocus).style("visibility","hidden")},l.updateXgridFocus=function(){var e=this,t=e.config;e.main.select("line."+d.xgridFocus).attr("x1",t.axis_rotated?0:-10).attr("x2",t.axis_rotated?e.width:-10).attr("y1",t.axis_rotated?-10:0).attr("y2",t.axis_rotated?-10:e.height)},l.generateGridData=function(e,t){var n,i,r,o,a=this,s=[],l=a.main.select("."+d.axisX).selectAll(".tick").size();if("year"===e)for(n=a.getXDomain(),i=n[0].getFullYear(),r=n[1].getFullYear(),o=i;r>=o;o++)s.push(new Date(o+"-01-01 00:00:00"));else s=t.ticks(10),s.length>l&&(s=s.filter(function(e){return(""+e).indexOf(".")<0}));return s},l.getGridFilterToRemove=function(e){return e?function(t){var n=!1;return[].concat(e).forEach(function(e){("value"in e&&t.value===e.value||"class"in e&&t["class"]===e["class"])&&(n=!0)}),n}:function(){return!0}},l.removeGridLines=function(e,t){var n=this,i=n.config,r=n.getGridFilterToRemove(e),o=function(e){return!r(e)},a=t?d.xgridLines:d.ygridLines,s=t?d.xgridLine:d.ygridLine;n.main.select("."+a).selectAll("."+s).filter(r).transition().duration(i.transition_duration).style("opacity",0).remove(),t?i.grid_x_lines=i.grid_x_lines.filter(o):i.grid_y_lines=i.grid_y_lines.filter(o)},l.initTooltip=function(){var e,t=this,n=t.config;if(t.tooltip=t.selectChart.style("position","relative").append("div").attr("class",d.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),n.tooltip_init_show){if(t.isTimeSeries()&&f(n.tooltip_init_x)){for(n.tooltip_init_x=t.parseDate(n.tooltip_init_x),e=0;e<t.data.targets[0].values.length&&t.data.targets[0].values[e].x-n.tooltip_init_x!==0;e++);n.tooltip_init_x=e}t.tooltip.html(n.tooltip_contents.call(t,t.data.targets.map(function(e){return t.addName(e.values[n.tooltip_init_x])}),t.axis.getXAxisTickFormat(),t.getYFormat(t.hasArcType()),t.color)),t.tooltip.style("top",n.tooltip_init_position.top).style("left",n.tooltip_init_position.left).style("display","block")}},l.getTooltipContent=function(e,t,n,i){var r,o,a,s,l,u,c=this,h=c.config,p=h.tooltip_format_title||t,f=h.tooltip_format_name||function(e){return e},m=h.tooltip_format_value||n;for(o=0;o<e.length;o++)e[o]&&(e[o].value||0===e[o].value)&&(r||(a=p?p(e[o].x):e[o].x,r="<table class='"+d.tooltip+"'>"+(a||0===a?"<tr><th colspan='2'>"+a+"</th></tr>":"")),s=m(e[o].value,e[o].ratio,e[o].id,e[o].index),void 0!==s&&(l=f(e[o].name,e[o].ratio,e[o].id,e[o].index),u=c.levelColor?c.levelColor(e[o].value):i(e[o].id),r+="<tr class='"+d.tooltipName+"-"+e[o].id+"'>",r+="<td class='name'><span style='background-color:"+u+"'></span>"+l+"</td>",r+="<td class='value'>"+s+"</td>",r+="</tr>"));return r+"</table>"},l.tooltipPosition=function(e,t,n,i){var r,o,a,s,l,u=this,c=u.config,d=u.d3,h=u.hasArcType(),p=d.mouse(i);return h?(o=(u.width-(u.isLegendRight?u.getLegendWidth():0))/2+p[0],s=u.height/2+p[1]+20):(r=u.getSvgLeft(!0),c.axis_rotated?(o=r+p[0]+100,a=o+t,l=u.currentWidth-u.getCurrentPaddingRight(),s=u.x(e[0].x)+20):(o=r+u.getCurrentPaddingLeft(!0)+u.x(e[0].x)+20,a=o+t,l=r+u.currentWidth-u.getCurrentPaddingRight(),s=p[1]+15),a>l&&(o-=a-l+20),s+n>u.currentHeight&&(s-=n+30)),0>s&&(s=0),{top:s,left:o}},l.showTooltip=function(e,t){var n,i,r,o=this,a=o.config,s=o.hasArcType(),u=e.filter(function(e){return e&&h(e.value)}),c=a.tooltip_position||l.tooltipPosition;0!==u.length&&a.tooltip_show&&(o.tooltip.html(a.tooltip_contents.call(o,e,o.axis.getXAxisTickFormat(),o.getYFormat(s),o.color)).style("display","block"),n=o.tooltip.property("offsetWidth"),i=o.tooltip.property("offsetHeight"),r=c.call(this,u,n,i,t),o.tooltip.style("top",r.top+"px").style("left",r.left+"px"))},l.hideTooltip=function(){this.tooltip.style("display","none")},l.initLegend=function(){var e=this;return e.legendItemTextBox={},e.legendHasRendered=!1,e.legend=e.svg.append("g").attr("transform",e.getTranslate("legend")),e.config.legend_show?void e.updateLegendWithDefaults():(e.legend.style("visibility","hidden"),void(e.hiddenLegendIds=e.mapToIds(e.data.targets)))},l.updateLegendWithDefaults=function(){var e=this;e.updateLegend(e.mapToIds(e.data.targets),{withTransform:!1,withTransitionForTransform:!1,withTransition:!1})},l.updateSizeForLegend=function(e,t){var n=this,i=n.config,r={top:n.isLegendTop?n.getCurrentPaddingTop()+i.legend_inset_y+5.5:n.currentHeight-e-n.getCurrentPaddingBottom()-i.legend_inset_y,left:n.isLegendLeft?n.getCurrentPaddingLeft()+i.legend_inset_x+.5:n.currentWidth-t-n.getCurrentPaddingRight()-i.legend_inset_x+.5};n.margin3={top:n.isLegendRight?0:n.isLegendInset?r.top:n.currentHeight-e,right:NaN,bottom:0,left:n.isLegendRight?n.currentWidth-t:n.isLegendInset?r.left:0}},l.transformLegend=function(e){var t=this;(e?t.legend.transition():t.legend).attr("transform",t.getTranslate("legend"))},l.updateLegendStep=function(e){this.legendStep=e},l.updateLegendItemWidth=function(e){this.legendItemWidth=e},l.updateLegendItemHeight=function(e){this.legendItemHeight=e},l.getLegendWidth=function(){var e=this;return e.config.legend_show?e.isLegendRight||e.isLegendInset?e.legendItemWidth*(e.legendStep+1):e.currentWidth:0},l.getLegendHeight=function(){var e=this,t=0;return e.config.legend_show&&(t=e.isLegendRight?e.currentHeight:Math.max(20,e.legendItemHeight)*(e.legendStep+1)),t},l.opacityForLegend=function(e){return e.classed(d.legendItemHidden)?null:1},l.opacityForUnfocusedLegend=function(e){return e.classed(d.legendItemHidden)?null:.3},l.toggleFocusLegend=function(e,t){var n=this;e=n.mapToTargetIds(e),n.legend.selectAll("."+d.legendItem).filter(function(t){return e.indexOf(t)>=0}).classed(d.legendItemFocused,t).transition().duration(100).style("opacity",function(){var e=t?n.opacityForLegend:n.opacityForUnfocusedLegend;return e.call(n,n.d3.select(this))})},l.revertLegend=function(){var e=this,t=e.d3;e.legend.selectAll("."+d.legendItem).classed(d.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return e.opacityForLegend(t.select(this))})},l.showLegend=function(e){var t=this,n=t.config;n.legend_show||(n.legend_show=!0,t.legend.style("visibility","visible"),t.legendHasRendered||t.updateLegendWithDefaults()),t.removeHiddenLegendIds(e),t.legend.selectAll(t.selectorLegends(e)).style("visibility","visible").transition().style("opacity",function(){return t.opacityForLegend(t.d3.select(this))})},l.hideLegend=function(e){var t=this,n=t.config;n.legend_show&&b(e)&&(n.legend_show=!1,t.legend.style("visibility","hidden")),t.addHiddenLegendIds(e),t.legend.selectAll(t.selectorLegends(e)).style("opacity",0).style("visibility","hidden")},l.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}},l.updateLegend=function(e,t,n){function i(e,t){return b.legendItemTextBox[t]||(b.legendItemTextBox[t]=b.getTextRect(e.textContent,d.legendItem)),b.legendItemTextBox[t]}function r(t,n,r){function o(e,t){t||(a=(f-S-p)/2,M>a&&(a=(f-p)/2,S=0,R++)),O[e]=R,F[R]=b.isLegendInset?10:a,D[e]=S,S+=p}var a,s,l=0===r,u=r===e.length-1,c=i(t,n),d=c.width+T+(!u||b.isLegendRight||b.isLegendInset?k:0),h=c.height+$,p=b.isLegendRight||b.isLegendInset?h:d,f=b.isLegendRight||b.isLegendInset?b.getLegendHeight():b.getLegendWidth();return l&&(S=0,R=0,C=0,A=0),x.legend_show&&!b.isLegendToShow(n)?void(E[n]=L[n]=O[n]=D[n]=0):(E[n]=d,L[n]=h,(!C||d>=C)&&(C=d),(!A||h>=A)&&(A=h),s=b.isLegendRight||b.isLegendInset?A:C,void(x.legend_equally?(Object.keys(E).forEach(function(e){E[e]=C}),Object.keys(L).forEach(function(e){L[e]=A}),a=(f-s*e.length)/2,M>a?(S=0,R=0,e.forEach(function(e){o(e)})):o(n,!0)):o(n)))}var o,a,s,l,u,c,h,p,f,m,v,y,_,b=this,x=b.config,$=4,k=10,C=0,A=0,M=10,T=15,S=0,D={},E={},L={},F=[0],O={},R=0;t=t||{},p=w(t,"withTransition",!0),f=w(t,"withTransitionForTransform",!0),b.isLegendInset&&(R=x.legend_inset_step?x.legend_inset_step:e.length,b.updateLegendStep(R)),b.isLegendRight?(o=function(e){return C*O[e]},l=function(e){return F[O[e]]+D[e]}):b.isLegendInset?(o=function(e){return C*O[e]+10},l=function(e){return F[O[e]]+D[e]}):(o=function(e){return F[O[e]]+D[e]},l=function(e){return A*O[e]}),a=function(e,t){return o(e,t)+14},u=function(e,t){return l(e,t)+9},s=function(e,t){return o(e,t)},c=function(e,t){return l(e,t)-5},h=b.legend.selectAll("."+d.legendItem).data(e).enter().append("g").attr("class",function(e){return b.generateClass(d.legendItem,e)}).style("visibility",function(e){return b.isLegendToShow(e)?"visible":"hidden"}).style("cursor","pointer").on("click",function(e){x.legend_item_onclick?x.legend_item_onclick.call(b,e):b.d3.event.altKey?(b.api.hide(),b.api.show(e)):(b.api.toggle(e),b.isTargetToShow(e)?b.api.focus(e):b.api.revert())}).on("mouseover",function(e){b.d3.select(this).classed(d.legendItemFocused,!0),!b.transiting&&b.isTargetToShow(e)&&b.api.focus(e),x.legend_item_onmouseover&&x.legend_item_onmouseover.call(b,e)}).on("mouseout",function(e){b.d3.select(this).classed(d.legendItemFocused,!1),b.api.revert(),x.legend_item_onmouseout&&x.legend_item_onmouseout.call(b,e)}),h.append("text").text(function(e){return g(x.data_names[e])?x.data_names[e]:e}).each(function(e,t){r(this,e,t)}).style("pointer-events","none").attr("x",b.isLegendRight||b.isLegendInset?a:-200).attr("y",b.isLegendRight||b.isLegendInset?-200:u),h.append("rect").attr("class",d.legendItemEvent).style("fill-opacity",0).attr("x",b.isLegendRight||b.isLegendInset?s:-200).attr("y",b.isLegendRight||b.isLegendInset?-200:c),h.append("rect").attr("class",d.legendItemTile).style("pointer-events","none").style("fill",b.color).attr("x",b.isLegendRight||b.isLegendInset?a:-200).attr("y",b.isLegendRight||b.isLegendInset?-200:l).attr("width",10).attr("height",10),_=b.legend.select("."+d.legendBackground+" rect"),b.isLegendInset&&C>0&&0===_.size()&&(_=b.legend.insert("g","."+d.legendItem).attr("class",d.legendBackground).append("rect")),m=b.legend.selectAll("text").data(e).text(function(e){return g(x.data_names[e])?x.data_names[e]:e}).each(function(e,t){r(this,e,t)}),(p?m.transition():m).attr("x",a).attr("y",u),v=b.legend.selectAll("rect."+d.legendItemEvent).data(e),(p?v.transition():v).attr("width",function(e){return E[e]}).attr("height",function(e){return L[e]}).attr("x",s).attr("y",c),y=b.legend.selectAll("rect."+d.legendItemTile).data(e),(p?y.transition():y).style("fill",b.color).attr("x",o).attr("y",l),_&&(p?_.transition():_).attr("height",b.getLegendHeight()-12).attr("width",C*(R+1)+10),b.legend.selectAll("."+d.legendItem).classed(d.legendItemHidden,function(e){return!b.isTargetToShow(e)}),b.updateLegendItemWidth(C),b.updateLegendItemHeight(A),b.updateLegendStep(R),b.updateSizes(),b.updateScales(),b.updateSvgSize(),b.transformAll(f,n),b.legendHasRendered=!0},n(t,o),o.prototype.init=function(){var e=this.owner,t=e.config,n=e.main;e.axes.x=n.append("g").attr("class",d.axis+" "+d.axisX).attr("clip-path",e.clipPathForXAxis).attr("transform",e.getTranslate("x")).style("visibility",t.axis_x_show?"visible":"hidden"),e.axes.x.append("text").attr("class",d.axisXLabel).attr("transform",t.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this)),e.axes.y=n.append("g").attr("class",d.axis+" "+d.axisY).attr("clip-path",t.axis_y_inner?"":e.clipPathForYAxis).attr("transform",e.getTranslate("y")).style("visibility",t.axis_y_show?"visible":"hidden"),e.axes.y.append("text").attr("class",d.axisYLabel).attr("transform",t.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this)),e.axes.y2=n.append("g").attr("class",d.axis+" "+d.axisY2).attr("transform",e.getTranslate("y2")).style("visibility",t.axis_y2_show?"visible":"hidden"),e.axes.y2.append("text").attr("class",d.axisY2Label).attr("transform",t.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))},o.prototype.getXAxis=function(e,t,n,i,r,o,s){var l=this.owner,u=l.config,c={isCategory:l.isCategorized(),withOuterTick:r,tickMultiline:u.axis_x_tick_multiline,tickWidth:u.axis_x_tick_width,tickTextRotate:s?0:u.axis_x_tick_rotate,withoutTransition:o},d=a(l.d3,c).scale(e).orient(t);return l.isTimeSeries()&&i&&(i=i.map(function(e){return l.parseDate(e)})),d.tickFormat(n).tickValues(i),l.isCategorized()&&(d.tickCentered(u.axis_x_tick_centered),b(u.axis_x_tick_culling)&&(u.axis_x_tick_culling=!1)),d},o.prototype.updateXAxisTickValues=function(e,t){var n,i=this.owner,r=i.config;return(r.axis_x_tick_fit||r.axis_x_tick_count)&&(n=this.generateTickValues(i.mapTargetsToUniqueXs(e),r.axis_x_tick_count,i.isTimeSeries())),t?t.tickValues(n):(i.xAxis.tickValues(n),i.subXAxis.tickValues(n)),n},o.prototype.getYAxis=function(e,t,n,i,r,o){var s={withOuterTick:r,withoutTransition:o},l=this.owner,u=l.d3,c=l.config,d=a(u,s).scale(e).orient(t).tickFormat(n);return l.isTimeSeriesY()?d.ticks(u.time[c.axis_y_tick_time_value],c.axis_y_tick_time_interval):d.tickValues(i),d},o.prototype.getId=function(e){var t=this.owner.config;return e in t.data_axes?t.data_axes[e]:"y"},o.prototype.getXAxisTickFormat=function(){var e=this.owner,t=e.config,n=e.isTimeSeries()?e.defaultAxisTimeFormat:e.isCategorized()?e.categoryName:function(e){return 0>e?e.toFixed(0):e};return t.axis_x_tick_format&&(p(t.axis_x_tick_format)?n=t.axis_x_tick_format:e.isTimeSeries()&&(n=function(n){return n?e.axisTimeFormat(t.axis_x_tick_format)(n):""})),p(n)?function(t){return n.call(e,t)}:n},o.prototype.getTickValues=function(e,t){return e?e:t?t.tickValues():void 0},o.prototype.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},o.prototype.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},o.prototype.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},o.prototype.getLabelOptionByAxisId=function(e){var t,n=this.owner,i=n.config;return"y"===e?t=i.axis_y_label:"y2"===e?t=i.axis_y2_label:"x"===e&&(t=i.axis_x_label),t},o.prototype.getLabelText=function(e){var t=this.getLabelOptionByAxisId(e);return f(t)?t:t?t.text:null},o.prototype.setLabelText=function(e,t){var n=this.owner,i=n.config,r=this.getLabelOptionByAxisId(e);f(r)?"y"===e?i.axis_y_label=t:"y2"===e?i.axis_y2_label=t:"x"===e&&(i.axis_x_label=t):r&&(r.text=t)},o.prototype.getLabelPosition=function(e,t){var n=this.getLabelOptionByAxisId(e),i=n&&"object"==typeof n&&n.position?n.position:t;return{isInner:i.indexOf("inner")>=0,isOuter:i.indexOf("outer")>=0,isLeft:i.indexOf("left")>=0,isCenter:i.indexOf("center")>=0,isRight:i.indexOf("right")>=0,isTop:i.indexOf("top")>=0,isMiddle:i.indexOf("middle")>=0,isBottom:i.indexOf("bottom")>=0}},o.prototype.getXAxisLabelPosition=function(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner-right")},o.prototype.getYAxisLabelPosition=function(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")},o.prototype.getY2AxisLabelPosition=function(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")},o.prototype.getLabelPositionById=function(e){return"y2"===e?this.getY2AxisLabelPosition():"y"===e?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},o.prototype.textForXAxisLabel=function(){return this.getLabelText("x")},o.prototype.textForYAxisLabel=function(){return this.getLabelText("y")},o.prototype.textForY2AxisLabel=function(){return this.getLabelText("y2")},o.prototype.xForAxisLabel=function(e,t){var n=this.owner;return e?t.isLeft?0:t.isCenter?n.width/2:n.width:t.isBottom?-n.height:t.isMiddle?-n.height/2:0},o.prototype.dxForAxisLabel=function(e,t){return e?t.isLeft?"0.5em":t.isRight?"-0.5em":"0":t.isTop?"-0.5em":t.isBottom?"0.5em":"0"},o.prototype.textAnchorForAxisLabel=function(e,t){return e?t.isLeft?"start":t.isCenter?"middle":"end":t.isBottom?"start":t.isMiddle?"middle":"end"},o.prototype.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},o.prototype.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},o.prototype.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},o.prototype.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},o.prototype.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},o.prototype.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},o.prototype.dyForXAxisLabel=function(){var e=this.owner,t=e.config,n=this.getXAxisLabelPosition();return t.axis_rotated?n.isInner?"1.2em":-25-this.getMaxTickWidth("x"):n.isInner?"-0.5em":t.axis_x_height?t.axis_x_height-10:"3em"},o.prototype.dyForYAxisLabel=function(){
|
138
|
+
var e=this.owner,t=this.getYAxisLabelPosition();return e.config.axis_rotated?t.isInner?"-0.5em":"3em":t.isInner?"1.2em":-10-(e.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},o.prototype.dyForY2AxisLabel=function(){var e=this.owner,t=this.getY2AxisLabelPosition();return e.config.axis_rotated?t.isInner?"1.2em":"-2.2em":t.isInner?"-0.5em":15+(e.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},o.prototype.textAnchorForXAxisLabel=function(){var e=this.owner;return this.textAnchorForAxisLabel(!e.config.axis_rotated,this.getXAxisLabelPosition())},o.prototype.textAnchorForYAxisLabel=function(){var e=this.owner;return this.textAnchorForAxisLabel(e.config.axis_rotated,this.getYAxisLabelPosition())},o.prototype.textAnchorForY2AxisLabel=function(){var e=this.owner;return this.textAnchorForAxisLabel(e.config.axis_rotated,this.getY2AxisLabelPosition())},o.prototype.getMaxTickWidth=function(e,t){var n,i,r,o,a,s=this.owner,l=s.config,u=0;return t&&s.currentMaxTickWidths[e]?s.currentMaxTickWidths[e]:(s.svg&&(n=s.filterTargetsToShow(s.data.targets),"y"===e?(i=s.y.copy().domain(s.getYDomain(n,"y")),r=this.getYAxis(i,s.yOrient,l.axis_y_tick_format,s.yAxisTickValues,!1,!0)):"y2"===e?(i=s.y2.copy().domain(s.getYDomain(n,"y2")),r=this.getYAxis(i,s.y2Orient,l.axis_y2_tick_format,s.y2AxisTickValues,!1,!0)):(i=s.x.copy().domain(s.getXDomain(n)),r=this.getXAxis(i,s.xOrient,s.xAxisTickFormat,s.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(n,r)),o=s.d3.select("body").append("div").classed("c3",!0),a=o.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),a.append("g").call(r).each(function(){s.d3.select(this).selectAll("text").each(function(){var e=this.getBoundingClientRect();u<e.width&&(u=e.width)}),o.remove()})),s.currentMaxTickWidths[e]=0>=u?s.currentMaxTickWidths[e]:u,s.currentMaxTickWidths[e])},o.prototype.updateLabels=function(e){var t=this.owner,n=t.main.select("."+d.axisX+" ."+d.axisXLabel),i=t.main.select("."+d.axisY+" ."+d.axisYLabel),r=t.main.select("."+d.axisY2+" ."+d.axisY2Label);(e?n.transition():n).attr("x",this.xForXAxisLabel.bind(this)).attr("dx",this.dxForXAxisLabel.bind(this)).attr("dy",this.dyForXAxisLabel.bind(this)).text(this.textForXAxisLabel.bind(this)),(e?i.transition():i).attr("x",this.xForYAxisLabel.bind(this)).attr("dx",this.dxForYAxisLabel.bind(this)).attr("dy",this.dyForYAxisLabel.bind(this)).text(this.textForYAxisLabel.bind(this)),(e?r.transition():r).attr("x",this.xForY2AxisLabel.bind(this)).attr("dx",this.dxForY2AxisLabel.bind(this)).attr("dy",this.dyForY2AxisLabel.bind(this)).text(this.textForY2AxisLabel.bind(this))},o.prototype.getPadding=function(e,t,n,i){return h(e[t])?"ratio"===e.unit?e[t]*i:this.convertPixelsToAxisPadding(e[t],i):n},o.prototype.convertPixelsToAxisPadding=function(e,t){var n=this.owner,i=n.config.axis_rotated?n.width:n.height;return t*(e/i)},o.prototype.generateTickValues=function(e,t,n){var i,r,o,a,s,l,u,c=e;if(t)if(i=p(t)?t():t,1===i)c=[e[0]];else if(2===i)c=[e[0],e[e.length-1]];else if(i>2){for(a=i-2,r=e[0],o=e[e.length-1],s=(o-r)/(a+1),c=[r],l=0;a>l;l++)u=+r+s*(l+1),c.push(n?new Date(u):u);c.push(o)}return n||(c=c.sort(function(e,t){return e-t})),c},o.prototype.generateTransitions=function(e){var t=this.owner,n=t.axes;return{axisX:e?n.x.transition().duration(e):n.x,axisY:e?n.y.transition().duration(e):n.y,axisY2:e?n.y2.transition().duration(e):n.y2,axisSubX:e?n.subx.transition().duration(e):n.subx}},o.prototype.redraw=function(e,t){var n=this.owner;n.axes.x.style("opacity",t?0:1),n.axes.y.style("opacity",t?0:1),n.axes.y2.style("opacity",t?0:1),n.axes.subx.style("opacity",t?0:1),e.axisX.call(n.xAxis),e.axisY.call(n.yAxis),e.axisY2.call(n.y2Axis),e.axisSubX.call(n.subXAxis)},l.getClipPath=function(t){var n=e.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0;return"url("+(n?"":document.URL.split("#")[0])+"#"+t+")"},l.appendClip=function(e,t){return e.append("clipPath").attr("id",t).append("rect")},l.getAxisClipX=function(e){var t=Math.max(30,this.margin.left);return e?-(1+t):-(t-1)},l.getAxisClipY=function(e){return e?-20:-this.margin.top},l.getXAxisClipX=function(){var e=this;return e.getAxisClipX(!e.config.axis_rotated)},l.getXAxisClipY=function(){var e=this;return e.getAxisClipY(!e.config.axis_rotated)},l.getYAxisClipX=function(){var e=this;return e.config.axis_y_inner?-1:e.getAxisClipX(e.config.axis_rotated)},l.getYAxisClipY=function(){var e=this;return e.getAxisClipY(e.config.axis_rotated)},l.getAxisClipWidth=function(e){var t=this,n=Math.max(30,t.margin.left),i=Math.max(30,t.margin.right);return e?t.width+2+n+i:t.margin.left+20},l.getAxisClipHeight=function(e){return(e?this.margin.bottom:this.margin.top+this.height)+20},l.getXAxisClipWidth=function(){var e=this;return e.getAxisClipWidth(!e.config.axis_rotated)},l.getXAxisClipHeight=function(){var e=this;return e.getAxisClipHeight(!e.config.axis_rotated)},l.getYAxisClipWidth=function(){var e=this;return e.getAxisClipWidth(e.config.axis_rotated)+(e.config.axis_y_inner?20:0)},l.getYAxisClipHeight=function(){var e=this;return e.getAxisClipHeight(e.config.axis_rotated)},l.initPie=function(){var e=this,t=e.d3,n=e.config;e.pie=t.layout.pie().value(function(e){return e.values.reduce(function(e,t){return e+t.value},0)}),n.data_order||e.pie.sort(null)},l.updateRadius=function(){var e=this,t=e.config,n=t.gauge_width||t.donut_width;e.radiusExpanded=Math.min(e.arcWidth,e.arcHeight)/2,e.radius=.95*e.radiusExpanded,e.innerRadiusRatio=n?(e.radius-n)/e.radius:.6,e.innerRadius=e.hasType("donut")||e.hasType("gauge")?e.radius*e.innerRadiusRatio:0},l.updateArc=function(){var e=this;e.svgArc=e.getSvgArc(),e.svgArcExpanded=e.getSvgArcExpanded(),e.svgArcExpandedSub=e.getSvgArcExpanded(.98)},l.updateAngle=function(e){var t,n,i=this,r=i.config,o=!1,a=0,s=r.gauge_min,l=r.gauge_max;return i.pie(i.filterTargetsToShow(i.data.targets)).forEach(function(t){o||t.data.id!==e.data.id||(o=!0,e=t,e.index=a),a++}),isNaN(e.startAngle)&&(e.startAngle=0),isNaN(e.endAngle)&&(e.endAngle=e.startAngle),i.isGaugeType(e.data)&&(t=Math.PI/(l-s),n=e.value<s?0:e.value<l?e.value-s:l-s,e.startAngle=-1*(Math.PI/2),e.endAngle=e.startAngle+t*n),o?e:null},l.getSvgArc=function(){var e=this,t=e.d3.svg.arc().outerRadius(e.radius).innerRadius(e.innerRadius),n=function(n,i){var r;return i?t(n):(r=e.updateAngle(n),r?t(r):"M 0 0")};return n.centroid=t.centroid,n},l.getSvgArcExpanded=function(e){var t=this,n=t.d3.svg.arc().outerRadius(t.radiusExpanded*(e?e:1)).innerRadius(t.innerRadius);return function(e){var i=t.updateAngle(e);return i?n(i):"M 0 0"}},l.getArc=function(e,t,n){return n||this.isArcType(e.data)?this.svgArc(e,t):"M 0 0"},l.transformForArcLabel=function(e){var t,n,i,r,o,a=this,s=a.updateAngle(e),l="";return s&&!a.hasType("gauge")&&(t=this.svgArc.centroid(s),n=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1],r=Math.sqrt(n*n+i*i),o=a.radius&&r?(36/a.radius>.375?1.175-36/a.radius:.8)*a.radius/r:0,l="translate("+n*o+","+i*o+")"),l},l.getArcRatio=function(e){var t=this,n=t.hasType("gauge")?Math.PI:2*Math.PI;return e?(e.endAngle-e.startAngle)/n:null},l.convertToArcData=function(e){return this.addName({id:e.data.id,value:e.value,ratio:this.getArcRatio(e),index:e.index})},l.textForArcLabel=function(e){var t,n,i,r,o,a=this;return a.shouldShowArcLabel()?(t=a.updateAngle(e),n=t?t.value:null,i=a.getArcRatio(t),r=e.data.id,a.hasType("gauge")||a.meetsArcLabelThreshold(i)?(o=a.getArcLabelFormat(),o?o(n,i,r):a.defaultArcValueFormat(n,i)):""):""},l.expandArc=function(t){var n,i=this;return i.transiting?void(n=e.setInterval(function(){i.transiting||(e.clearInterval(n),i.legend.selectAll(".c3-legend-item-focused").size()>0&&i.expandArc(t))},10)):(t=i.mapToTargetIds(t),void i.svg.selectAll(i.selectorTargets(t,"."+d.chartArc)).each(function(e){i.shouldExpand(e.data.id)&&i.d3.select(this).selectAll("path").transition().duration(50).attr("d",i.svgArcExpanded).transition().duration(100).attr("d",i.svgArcExpandedSub).each(function(e){i.isDonutType(e.data)})}))},l.unexpandArc=function(e){var t=this;t.transiting||(e=t.mapToTargetIds(e),t.svg.selectAll(t.selectorTargets(e,"."+d.chartArc)).selectAll("path").transition().duration(50).attr("d",t.svgArc),t.svg.selectAll("."+d.arc).style("opacity",1))},l.shouldExpand=function(e){var t=this,n=t.config;return t.isDonutType(e)&&n.donut_expand||t.isGaugeType(e)&&n.gauge_expand||t.isPieType(e)&&n.pie_expand},l.shouldShowArcLabel=function(){var e=this,t=e.config,n=!0;return e.hasType("donut")?n=t.donut_label_show:e.hasType("pie")&&(n=t.pie_label_show),n},l.meetsArcLabelThreshold=function(e){var t=this,n=t.config,i=t.hasType("donut")?n.donut_label_threshold:n.pie_label_threshold;return e>=i},l.getArcLabelFormat=function(){var e=this,t=e.config,n=t.pie_label_format;return e.hasType("gauge")?n=t.gauge_label_format:e.hasType("donut")&&(n=t.donut_label_format),n},l.getArcTitle=function(){var e=this;return e.hasType("donut")?e.config.donut_title:""},l.updateTargetsForArc=function(e){var t,n,i=this,r=i.main,o=i.classChartArc.bind(i),a=i.classArcs.bind(i),s=i.classFocus.bind(i);t=r.select("."+d.chartArcs).selectAll("."+d.chartArc).data(i.pie(e)).attr("class",function(e){return o(e)+s(e.data)}),n=t.enter().append("g").attr("class",o),n.append("g").attr("class",a),n.append("text").attr("dy",i.hasType("gauge")?"-.1em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none")},l.initArc=function(){var e=this;e.arcs=e.main.select("."+d.chart).append("g").attr("class",d.chartArcs).attr("transform",e.getTranslate("arc")),e.arcs.append("text").attr("class",d.chartArcsTitle).style("text-anchor","middle").text(e.getArcTitle())},l.redrawArc=function(e,t,n){var i,r=this,o=r.d3,a=r.config,s=r.main;i=s.selectAll("."+d.arcs).selectAll("."+d.arc).data(r.arcData.bind(r)),i.enter().append("path").attr("class",r.classArc.bind(r)).style("fill",function(e){return r.color(e.data)}).style("cursor",function(e){return a.interaction_enabled&&a.data_selection_isselectable(e)?"pointer":null}).style("opacity",0).each(function(e){r.isGaugeType(e.data)&&(e.startAngle=e.endAngle=-1*(Math.PI/2)),this._current=e}),i.attr("transform",function(e){return!r.isGaugeType(e.data)&&n?"scale(0)":""}).style("opacity",function(e){return e===this._current?0:1}).on("mouseover",a.interaction_enabled?function(e){var t,n;r.transiting||(t=r.updateAngle(e),n=r.convertToArcData(t),r.expandArc(t.data.id),r.api.focus(t.data.id),r.toggleFocusLegend(t.data.id,!0),r.config.data_onmouseover(n,this))}:null).on("mousemove",a.interaction_enabled?function(e){var t=r.updateAngle(e),n=r.convertToArcData(t),i=[n];r.showTooltip(i,this)}:null).on("mouseout",a.interaction_enabled?function(e){var t,n;r.transiting||(t=r.updateAngle(e),n=r.convertToArcData(t),r.unexpandArc(t.data.id),r.api.revert(),r.revertLegend(),r.hideTooltip(),r.config.data_onmouseout(n,this))}:null).on("click",a.interaction_enabled?function(e,t){var n=r.updateAngle(e),i=r.convertToArcData(n);r.toggleShape&&r.toggleShape(this,i,t),r.config.data_onclick.call(r.api,i,this)}:null).each(function(){r.transiting=!0}).transition().duration(e).attrTween("d",function(e){var t,n=r.updateAngle(e);return n?(isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle),t=o.interpolate(this._current,n),this._current=t(0),function(n){var i=t(n);return i.data=e.data,r.getArc(i,!0)}):function(){return"M 0 0"}}).attr("transform",n?"scale(1)":"").style("fill",function(e){return r.levelColor?r.levelColor(e.data.values[0].value):r.color(e.data.id)}).style("opacity",1).call(r.endall,function(){r.transiting=!1}),i.exit().transition().duration(t).style("opacity",0).remove(),s.selectAll("."+d.chartArc).select("text").style("opacity",0).attr("class",function(e){return r.isGaugeType(e.data)?d.gaugeValue:""}).text(r.textForArcLabel.bind(r)).attr("transform",r.transformForArcLabel.bind(r)).style("font-size",function(e){return r.isGaugeType(e.data)?Math.round(r.radius/5)+"px":""}).transition().duration(e).style("opacity",function(e){return r.isTargetToShow(e.data.id)&&r.isArcType(e.data)?1:0}),s.select("."+d.chartArcsTitle).style("opacity",r.hasType("donut")||r.hasType("gauge")?1:0),r.hasType("gauge")&&(r.arcs.select("."+d.chartArcsBackground).attr("d",function(){var e={data:[{value:a.gauge_max}],startAngle:-1*(Math.PI/2),endAngle:Math.PI/2};return r.getArc(e,!0,!0)}),r.arcs.select("."+d.chartArcsGaugeUnit).attr("dy",".75em").text(a.gauge_label_show?a.gauge_units:""),r.arcs.select("."+d.chartArcsGaugeMin).attr("dx",-1*(r.innerRadius+(r.radius-r.innerRadius)/2)+"px").attr("dy","1.2em").text(a.gauge_label_show?a.gauge_min:""),r.arcs.select("."+d.chartArcsGaugeMax).attr("dx",r.innerRadius+(r.radius-r.innerRadius)/2+"px").attr("dy","1.2em").text(a.gauge_label_show?a.gauge_max:""))},l.initGauge=function(){var e=this.arcs;this.hasType("gauge")&&(e.append("path").attr("class",d.chartArcsBackground),e.append("text").attr("class",d.chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),e.append("text").attr("class",d.chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),e.append("text").attr("class",d.chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none"))},l.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0},l.initRegion=function(){var e=this;e.region=e.main.append("g").attr("clip-path",e.clipPath).attr("class",d.regions)},l.updateRegion=function(e){var t=this,n=t.config;t.region.style("visibility",t.hasArcType()?"hidden":"visible"),t.mainRegion=t.main.select("."+d.regions).selectAll("."+d.region).data(n.regions),t.mainRegion.enter().append("g").attr("class",t.classRegion.bind(t)).append("rect").style("fill-opacity",0),t.mainRegion.exit().transition().duration(e).style("opacity",0).remove()},l.redrawRegion=function(e){var t=this,n=t.mainRegion.selectAll("rect"),i=t.regionX.bind(t),r=t.regionY.bind(t),o=t.regionWidth.bind(t),a=t.regionHeight.bind(t);return[(e?n.transition():n).attr("x",i).attr("y",r).attr("width",o).attr("height",a).style("fill-opacity",function(e){return h(e.opacity)?e.opacity:.1})]},l.regionX=function(e){var t,n=this,i=n.config,r="y"===e.axis?n.y:n.y2;return t="y"===e.axis||"y2"===e.axis?i.axis_rotated&&"start"in e?r(e.start):0:i.axis_rotated?0:"start"in e?n.x(n.isTimeSeries()?n.parseDate(e.start):e.start):0},l.regionY=function(e){var t,n=this,i=n.config,r="y"===e.axis?n.y:n.y2;return t="y"===e.axis||"y2"===e.axis?i.axis_rotated?0:"end"in e?r(e.end):0:i.axis_rotated&&"start"in e?n.x(n.isTimeSeries()?n.parseDate(e.start):e.start):0},l.regionWidth=function(e){var t,n=this,i=n.config,r=n.regionX(e),o="y"===e.axis?n.y:n.y2;return t="y"===e.axis||"y2"===e.axis?i.axis_rotated&&"end"in e?o(e.end):n.width:i.axis_rotated?n.width:"end"in e?n.x(n.isTimeSeries()?n.parseDate(e.end):e.end):n.width,r>t?0:t-r},l.regionHeight=function(e){var t,n=this,i=n.config,r=this.regionY(e),o="y"===e.axis?n.y:n.y2;return t="y"===e.axis||"y2"===e.axis?i.axis_rotated?n.height:"start"in e?o(e.start):n.height:i.axis_rotated&&"end"in e?n.x(n.isTimeSeries()?n.parseDate(e.end):e.end):n.height,r>t?0:t-r},l.isRegionOnX=function(e){return!e.axis||"x"===e.axis},l.drag=function(e){var t,n,i,r,o,a,s,l,u=this,c=u.config,h=u.main,p=u.d3;u.hasArcType()||c.data_selection_enabled&&(!c.zoom_enabled||u.zoom.altDomain)&&c.data_selection_multiple&&(t=u.dragStart[0],n=u.dragStart[1],i=e[0],r=e[1],o=Math.min(t,i),a=Math.max(t,i),s=c.data_selection_grouped?u.margin.top:Math.min(n,r),l=c.data_selection_grouped?u.height:Math.max(n,r),h.select("."+d.dragarea).attr("x",o).attr("y",s).attr("width",a-o).attr("height",l-s),h.selectAll("."+d.shapes).selectAll("."+d.shape).filter(function(e){return c.data_selection_isselectable(e)}).each(function(e,t){var n,i,r,c,h,f,m=p.select(this),g=m.classed(d.SELECTED),v=m.classed(d.INCLUDED),y=!1;if(m.classed(d.circle))n=1*m.attr("cx"),i=1*m.attr("cy"),h=u.togglePoint,y=n>o&&a>n&&i>s&&l>i;else{if(!m.classed(d.bar))return;f=k(this),n=f.x,i=f.y,r=f.width,c=f.height,h=u.togglePath,y=!(n>a||o>n+r||i>l||s>i+c)}y^v&&(m.classed(d.INCLUDED,!v),m.classed(d.SELECTED,!g),h.call(u,!g,m,e,t))}))},l.dragstart=function(e){var t=this,n=t.config;t.hasArcType()||n.data_selection_enabled&&(t.dragStart=e,t.main.select("."+d.chart).append("rect").attr("class",d.dragarea).style("opacity",.1),t.dragging=!0)},l.dragend=function(){var e=this,t=e.config;e.hasArcType()||t.data_selection_enabled&&(e.main.select("."+d.dragarea).transition().duration(100).style("opacity",0).remove(),e.main.selectAll("."+d.shape).classed(d.INCLUDED,!1),e.dragging=!1)},l.selectPoint=function(e,t,n){var i=this,r=i.config,o=(r.axis_rotated?i.circleY:i.circleX).bind(i),a=(r.axis_rotated?i.circleX:i.circleY).bind(i),s=i.pointSelectR.bind(i);r.data_onselected.call(i.api,t,e.node()),i.main.select("."+d.selectedCircles+i.getTargetSelectorSuffix(t.id)).selectAll("."+d.selectedCircle+"-"+n).data([t]).enter().append("circle").attr("class",function(){return i.generateClass(d.selectedCircle,n)}).attr("cx",o).attr("cy",a).attr("stroke",function(){return i.color(t)}).attr("r",function(e){return 1.4*i.pointSelectR(e)}).transition().duration(100).attr("r",s)},l.unselectPoint=function(e,t,n){var i=this;i.config.data_onunselected(t,e.node()),i.main.select("."+d.selectedCircles+i.getTargetSelectorSuffix(t.id)).selectAll("."+d.selectedCircle+"-"+n).transition().duration(100).attr("r",0).remove()},l.togglePoint=function(e,t,n,i){e?this.selectPoint(t,n,i):this.unselectPoint(t,n,i)},l.selectPath=function(e,t){var n=this;n.config.data_onselected.call(n,t,e.node()),e.transition().duration(100).style("fill",function(){return n.d3.rgb(n.color(t)).brighter(.75)})},l.unselectPath=function(e,t){var n=this;n.config.data_onunselected.call(n,t,e.node()),e.transition().duration(100).style("fill",function(){return n.color(t)})},l.togglePath=function(e,t,n,i){e?this.selectPath(t,n,i):this.unselectPath(t,n,i)},l.getToggle=function(e,t){var n,i=this;return"circle"===e.nodeName?n=i.isStepType(t)?function(){}:i.togglePoint:"path"===e.nodeName&&(n=i.togglePath),n},l.toggleShape=function(e,t,n){var i=this,r=i.d3,o=i.config,a=r.select(e),s=a.classed(d.SELECTED),l=i.getToggle(e,t).bind(i);o.data_selection_enabled&&o.data_selection_isselectable(t)&&(o.data_selection_multiple||i.main.selectAll("."+d.shapes+(o.data_selection_grouped?i.getTargetSelectorSuffix(t.id):"")).selectAll("."+d.shape).each(function(e,t){var n=r.select(this);n.classed(d.SELECTED)&&l(!1,n.classed(d.SELECTED,!1),e,t)}),a.classed(d.SELECTED,!s),l(!s,a,t,n))},l.initBrush=function(){var e=this,t=e.d3;e.brush=t.svg.brush().on("brush",function(){e.redrawForBrush()}),e.brush.update=function(){return e.context&&e.context.select("."+d.brush).call(this),this},e.brush.scale=function(t){return e.config.axis_rotated?this.y(t):this.x(t)}},l.initSubchart=function(){var e=this,t=e.config,n=e.context=e.svg.append("g").attr("transform",e.getTranslate("context"));n.style("visibility",t.subchart_show?"visible":"hidden"),n.append("g").attr("clip-path",e.clipPathForSubchart).attr("class",d.chart),n.select("."+d.chart).append("g").attr("class",d.chartBars),n.select("."+d.chart).append("g").attr("class",d.chartLines),n.append("g").attr("clip-path",e.clipPath).attr("class",d.brush).call(e.brush),e.axes.subx=n.append("g").attr("class",d.axisX).attr("transform",e.getTranslate("subx")).attr("clip-path",t.axis_rotated?"":e.clipPathForXAxis)},l.updateTargetsForSubchart=function(e){var t,n,i,r,o=this,a=o.context,s=o.config,l=o.classChartBar.bind(o),u=o.classBars.bind(o),c=o.classChartLine.bind(o),h=o.classLines.bind(o),p=o.classAreas.bind(o);s.subchart_show&&(r=a.select("."+d.chartBars).selectAll("."+d.chartBar).data(e).attr("class",l),i=r.enter().append("g").style("opacity",0).attr("class",l),i.append("g").attr("class",u),n=a.select("."+d.chartLines).selectAll("."+d.chartLine).data(e).attr("class",c),t=n.enter().append("g").style("opacity",0).attr("class",c),t.append("g").attr("class",h),t.append("g").attr("class",p),a.selectAll("."+d.brush+" rect").attr(s.axis_rotated?"width":"height",s.axis_rotated?o.width2:o.height2))},l.updateBarForSubchart=function(e){var t=this;t.contextBar=t.context.selectAll("."+d.bars).selectAll("."+d.bar).data(t.barData.bind(t)),t.contextBar.enter().append("path").attr("class",t.classBar.bind(t)).style("stroke","none").style("fill",t.color),t.contextBar.style("opacity",t.initialOpacity.bind(t)),t.contextBar.exit().transition().duration(e).style("opacity",0).remove()},l.redrawBarForSubchart=function(e,t,n){(t?this.contextBar.transition().duration(n):this.contextBar).attr("d",e).style("opacity",1)},l.updateLineForSubchart=function(e){var t=this;t.contextLine=t.context.selectAll("."+d.lines).selectAll("."+d.line).data(t.lineData.bind(t)),t.contextLine.enter().append("path").attr("class",t.classLine.bind(t)).style("stroke",t.color),t.contextLine.style("opacity",t.initialOpacity.bind(t)),t.contextLine.exit().transition().duration(e).style("opacity",0).remove()},l.redrawLineForSubchart=function(e,t,n){(t?this.contextLine.transition().duration(n):this.contextLine).attr("d",e).style("opacity",1)},l.updateAreaForSubchart=function(e){var t=this,n=t.d3;t.contextArea=t.context.selectAll("."+d.areas).selectAll("."+d.area).data(t.lineData.bind(t)),t.contextArea.enter().append("path").attr("class",t.classArea.bind(t)).style("fill",t.color).style("opacity",function(){return t.orgAreaOpacity=+n.select(this).style("opacity"),0}),t.contextArea.style("opacity",0),t.contextArea.exit().transition().duration(e).style("opacity",0).remove()},l.redrawAreaForSubchart=function(e,t,n){(t?this.contextArea.transition().duration(n):this.contextArea).attr("d",e).style("fill",this.color).style("opacity",this.orgAreaOpacity)},l.redrawSubchart=function(e,t,n,i,r,o,a){var s,l,u,c=this,d=c.d3,h=c.config;c.context.style("visibility",h.subchart_show?"visible":"hidden"),h.subchart_show&&(d.event&&"zoom"===d.event.type&&c.brush.extent(c.x.orgDomain()).update(),e&&(c.brush.empty()||c.brush.extent(c.x.orgDomain()).update(),s=c.generateDrawArea(r,!0),l=c.generateDrawBar(o,!0),u=c.generateDrawLine(a,!0),c.updateBarForSubchart(n),c.updateLineForSubchart(n),c.updateAreaForSubchart(n),c.redrawBarForSubchart(l,n,n),c.redrawLineForSubchart(u,n,n),c.redrawAreaForSubchart(s,n,n)))},l.redrawForBrush=function(){var e=this,t=e.x;e.redraw({withTransition:!1,withY:e.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),e.config.subchart_onbrush.call(e.api,t.orgDomain())},l.transformContext=function(e,t){var n,i=this;t&&t.axisSubX?n=t.axisSubX:(n=i.context.select("."+d.axisX),e&&(n=n.transition())),i.context.attr("transform",i.getTranslate("context")),n.attr("transform",i.getTranslate("subx"))},l.getDefaultExtent=function(){var e=this,t=e.config,n=p(t.axis_x_extent)?t.axis_x_extent(e.getXDomain(e.data.targets)):t.axis_x_extent;return e.isTimeSeries()&&(n=[e.parseDate(n[0]),e.parseDate(n[1])]),n},l.initZoom=function(){var e,t=this,n=t.d3,i=t.config;t.zoom=n.behavior.zoom().on("zoomstart",function(){e=n.event.sourceEvent,t.zoom.altDomain=n.event.sourceEvent.altKey?t.x.orgDomain():null,i.zoom_onzoomstart.call(t.api,n.event.sourceEvent)}).on("zoom",function(){t.redrawForZoom.call(t)}).on("zoomend",function(){var r=n.event.sourceEvent;r&&e.clientX===r.clientX&&e.clientY===r.clientY||(t.redrawEventRect(),t.updateZoom(),i.zoom_onzoomend.call(t.api,t.x.orgDomain()))}),t.zoom.scale=function(e){return i.axis_rotated?this.y(e):this.x(e)},t.zoom.orgScaleExtent=function(){var e=i.zoom_extent?i.zoom_extent:[1,10];return[e[0],Math.max(t.getMaxDataCount()/e[1],e[1])]},t.zoom.updateScaleExtent=function(){var e=_(t.x.orgDomain())/_(t.orgXDomain),n=this.orgScaleExtent();return this.scaleExtent([n[0]*e,n[1]*e]),this}},l.updateZoom=function(){var e=this,t=e.config.zoom_enabled?e.zoom:function(){};e.main.select("."+d.zoomRect).call(t).on("dblclick.zoom",null),e.main.selectAll("."+d.eventRect).call(t).on("dblclick.zoom",null)},l.redrawForZoom=function(){var e=this,t=e.d3,n=e.config,i=e.zoom,r=e.x;if(n.zoom_enabled&&0!==e.filterTargetsToShow(e.data.targets).length){if("mousemove"===t.event.sourceEvent.type&&i.altDomain)return r.domain(i.altDomain),void i.scale(r).updateScaleExtent();e.isCategorized()&&r.orgDomain()[0]===e.orgXDomain[0]&&r.domain([e.orgXDomain[0]-1e-10,r.orgDomain()[1]]),e.redraw({withTransition:!1,withY:n.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),"mousemove"===t.event.sourceEvent.type&&(e.cancelClick=!0),n.zoom_onzoom.call(e.api,r.orgDomain())}},l.generateColor=function(){var e=this,t=e.config,n=e.d3,i=t.data_colors,r=x(t.color_pattern)?t.color_pattern:n.scale.category10().range(),o=t.data_color,a=[];return function(e){var t,n=e.id||e.data&&e.data.id||e;return i[n]instanceof Function?t=i[n](e):i[n]?t=i[n]:(a.indexOf(n)<0&&a.push(n),t=r[a.indexOf(n)%r.length],i[n]=t),o instanceof Function?o(t,e):t}},l.generateLevelColor=function(){var e=this,t=e.config,n=t.color_pattern,i=t.color_threshold,r="value"===i.unit,o=i.values&&i.values.length?i.values:[],a=i.max||100;return x(t.color_threshold)?function(e){var t,i,s=n[n.length-1];for(t=0;t<o.length;t++)if(i=r?e:100*e/a,i<o[t]){s=n[t];break}return s}:null},l.getYFormat=function(e){var t=this,n=e&&!t.hasType("gauge")?t.defaultArcValueFormat:t.yFormat,i=e&&!t.hasType("gauge")?t.defaultArcValueFormat:t.y2Format;return function(e,r,o){var a="y2"===t.axis.getId(o)?i:n;return a.call(t,e,r)}},l.yFormat=function(e){var t=this,n=t.config,i=n.axis_y_tick_format?n.axis_y_tick_format:t.defaultValueFormat;return i(e)},l.y2Format=function(e){var t=this,n=t.config,i=n.axis_y2_tick_format?n.axis_y2_tick_format:t.defaultValueFormat;return i(e)},l.defaultValueFormat=function(e){return h(e)?+e:""},l.defaultArcValueFormat=function(e,t){return(100*t).toFixed(1)+"%"},l.dataLabelFormat=function(e){var t,n=this,i=n.config.data_labels,r=function(e){return h(e)?+e:""};return t="function"==typeof i.format?i.format:"object"==typeof i.format?i.format[e]?i.format[e]===!0?r:i.format[e]:function(){return""}:r},l.hasCaches=function(e){for(var t=0;t<e.length;t++)if(!(e[t]in this.cache))return!1;return!0},l.addCache=function(e,t){this.cache[e]=this.cloneTarget(t)},l.getCaches=function(e){var t,n=[];for(t=0;t<e.length;t++)e[t]in this.cache&&n.push(this.cloneTarget(this.cache[e[t]]));return n};var d=l.CLASS={target:"c3-target",chart:"c3-chart",chartLine:"c3-chart-line",chartLines:"c3-chart-lines",chartBar:"c3-chart-bar",chartBars:"c3-chart-bars",chartText:"c3-chart-text",chartTexts:"c3-chart-texts",chartArc:"c3-chart-arc",chartArcs:"c3-chart-arcs",chartArcsTitle:"c3-chart-arcs-title",chartArcsBackground:"c3-chart-arcs-background",chartArcsGaugeUnit:"c3-chart-arcs-gauge-unit",chartArcsGaugeMax:"c3-chart-arcs-gauge-max",chartArcsGaugeMin:"c3-chart-arcs-gauge-min",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",eventRectsSingle:"c3-event-rects-single",eventRectsMultiple:"c3-event-rects-multiple",zoomRect:"c3-zoom-rect",brush:"c3-brush",focused:"c3-focused",defocused:"c3-defocused",region:"c3-region",regions:"c3-regions",tooltipContainer:"c3-tooltip-container",tooltip:"c3-tooltip",tooltipName:"c3-tooltip-name",shape:"c3-shape",shapes:"c3-shapes",line:"c3-line",lines:"c3-lines",bar:"c3-bar",bars:"c3-bars",circle:"c3-circle",circles:"c3-circles",arc:"c3-arc",arcs:"c3-arcs",area:"c3-area",areas:"c3-areas",empty:"c3-empty",text:"c3-text",texts:"c3-texts",gaugeValue:"c3-gauge-value",grid:"c3-grid",gridLines:"c3-grid-lines",xgrid:"c3-xgrid",xgrids:"c3-xgrids",xgridLine:"c3-xgrid-line",xgridLines:"c3-xgrid-lines",xgridFocus:"c3-xgrid-focus",ygrid:"c3-ygrid",ygrids:"c3-ygrids",ygridLine:"c3-ygrid-line",ygridLines:"c3-ygrid-lines",axis:"c3-axis",axisX:"c3-axis-x",axisXLabel:"c3-axis-x-label",axisY:"c3-axis-y",axisYLabel:"c3-axis-y-label",axisY2:"c3-axis-y2",axisY2Label:"c3-axis-y2-label",legendBackground:"c3-legend-background",legendItem:"c3-legend-item",legendItemEvent:"c3-legend-item-event",legendItemTile:"c3-legend-item-tile",legendItemHidden:"c3-legend-item-hidden",legendItemFocused:"c3-legend-item-focused",dragarea:"c3-dragarea",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"};l.generateClass=function(e,t){return" "+e+" "+e+this.getTargetSelectorSuffix(t)},l.classText=function(e){return this.generateClass(d.text,e.index)},l.classTexts=function(e){return this.generateClass(d.texts,e.id)},l.classShape=function(e){return this.generateClass(d.shape,e.index)},l.classShapes=function(e){return this.generateClass(d.shapes,e.id)},l.classLine=function(e){return this.classShape(e)+this.generateClass(d.line,e.id)},l.classLines=function(e){return this.classShapes(e)+this.generateClass(d.lines,e.id)},l.classCircle=function(e){return this.classShape(e)+this.generateClass(d.circle,e.index)},l.classCircles=function(e){return this.classShapes(e)+this.generateClass(d.circles,e.id)},l.classBar=function(e){return this.classShape(e)+this.generateClass(d.bar,e.index)},l.classBars=function(e){return this.classShapes(e)+this.generateClass(d.bars,e.id)},l.classArc=function(e){return this.classShape(e.data)+this.generateClass(d.arc,e.data.id)},l.classArcs=function(e){return this.classShapes(e.data)+this.generateClass(d.arcs,e.data.id)},l.classArea=function(e){return this.classShape(e)+this.generateClass(d.area,e.id)},l.classAreas=function(e){return this.classShapes(e)+this.generateClass(d.areas,e.id)},l.classRegion=function(e,t){return this.generateClass(d.region,t)+" "+("class"in e?e["class"]:"")},l.classEvent=function(e){return this.generateClass(d.eventRect,e.index)},l.classTarget=function(e){var t=this,n=t.config.data_classes[e],i="";return n&&(i=" "+d.target+"-"+n),t.generateClass(d.target,e)+i},l.classFocus=function(e){return this.classFocused(e)+this.classDefocused(e)},l.classFocused=function(e){return" "+(this.focusedTargetIds.indexOf(e.id)>=0?d.focused:"")},l.classDefocused=function(e){return" "+(this.defocusedTargetIds.indexOf(e.id)>=0?d.defocused:"")},l.classChartText=function(e){return d.chartText+this.classTarget(e.id)},l.classChartLine=function(e){return d.chartLine+this.classTarget(e.id)},l.classChartBar=function(e){return d.chartBar+this.classTarget(e.id)},l.classChartArc=function(e){return d.chartArc+this.classTarget(e.data.id)},l.getTargetSelectorSuffix=function(e){return e||0===e?("-"+e).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},l.selectorTarget=function(e,t){return(t||"")+"."+d.target+this.getTargetSelectorSuffix(e)},l.selectorTargets=function(e,t){var n=this;return e=e||[],e.length?e.map(function(e){return n.selectorTarget(e,t)}):null},l.selectorLegend=function(e){return"."+d.legendItem+this.getTargetSelectorSuffix(e)},l.selectorLegends=function(e){var t=this;return e&&e.length?e.map(function(e){return t.selectorLegend(e)}):null};var h=l.isValue=function(e){return e||0===e},p=l.isFunction=function(e){return"function"==typeof e},f=l.isString=function(e){return"string"==typeof e},m=l.isUndefined=function(e){return"undefined"==typeof e},g=l.isDefined=function(e){return"undefined"!=typeof e},v=l.ceil10=function(e){return 10*Math.ceil(e/10)},y=l.asHalfPixel=function(e){return Math.ceil(e)+.5},_=l.diffDomain=function(e){return e[1]-e[0]},b=l.isEmpty=function(e){return!e||f(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length},x=l.notEmpty=function(e){return Object.keys(e).length>0},w=l.getOption=function(e,t,n){return g(e[t])?e[t]:n},$=l.hasValue=function(e,t){var n=!1;return Object.keys(e).forEach(function(i){e[i]===t&&(n=!0)}),n},k=l.getPathBox=function(e){var t=e.getBoundingClientRect(),n=[e.pathSegList.getItem(0),e.pathSegList.getItem(1)],i=n[0].x,r=Math.min(n[0].y,n[1].y);return{x:i,y:r,width:t.width,height:t.height}};s.focus=function(e){var t,n=this.internal;e=n.mapToTargetIds(e),t=n.svg.selectAll(n.selectorTargets(e.filter(n.isTargetToShow,n))),this.revert(),this.defocus(),t.classed(d.focused,!0).classed(d.defocused,!1),n.hasArcType()&&n.expandArc(e),n.toggleFocusLegend(e,!0),n.focusedTargetIds=e,n.defocusedTargetIds=n.defocusedTargetIds.filter(function(t){return e.indexOf(t)<0})},s.defocus=function(e){var t,n=this.internal;e=n.mapToTargetIds(e),t=n.svg.selectAll(n.selectorTargets(e.filter(n.isTargetToShow,n))),t.classed(d.focused,!1).classed(d.defocused,!0),n.hasArcType()&&n.unexpandArc(e),n.toggleFocusLegend(e,!1),n.focusedTargetIds=n.focusedTargetIds.filter(function(t){return e.indexOf(t)<0}),n.defocusedTargetIds=e},s.revert=function(e){var t,n=this.internal;e=n.mapToTargetIds(e),t=n.svg.selectAll(n.selectorTargets(e)),t.classed(d.focused,!1).classed(d.defocused,!1),n.hasArcType()&&n.unexpandArc(e),n.config.legend_show&&(n.showLegend(e.filter(n.isLegendToShow.bind(n))),n.legend.selectAll(n.selectorLegends(e)).filter(function(){
|
139
|
+
return n.d3.select(this).classed(d.legendItemFocused)}).classed(d.legendItemFocused,!1)),n.focusedTargetIds=[],n.defocusedTargetIds=[]},s.show=function(e,t){var n,i=this.internal;e=i.mapToTargetIds(e),t=t||{},i.removeHiddenTargetIds(e),n=i.svg.selectAll(i.selectorTargets(e)),n.transition().style("opacity",1,"important").call(i.endall,function(){n.style("opacity",null).style("opacity",1)}),t.withLegend&&i.showLegend(e),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},s.hide=function(e,t){var n,i=this.internal;e=i.mapToTargetIds(e),t=t||{},i.addHiddenTargetIds(e),n=i.svg.selectAll(i.selectorTargets(e)),n.transition().style("opacity",0,"important").call(i.endall,function(){n.style("opacity",null).style("opacity",0)}),t.withLegend&&i.hideLegend(e),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},s.toggle=function(e,t){var n=this,i=this.internal;i.mapToTargetIds(e).forEach(function(e){i.isTargetToShow(e)?n.hide(e,t):n.show(e,t)})},s.zoom=function(e){var t=this.internal;return e&&(t.isTimeSeries()&&(e=e.map(function(e){return t.parseDate(e)})),t.brush.extent(e),t.redraw({withUpdateXDomain:!0,withY:t.config.zoom_rescale}),t.config.zoom_onzoom.call(this,t.x.orgDomain())),t.brush.extent()},s.zoom.enable=function(e){var t=this.internal;t.config.zoom_enabled=e,t.updateAndRedraw()},s.unzoom=function(){var e=this.internal;e.brush.clear().update(),e.redraw({withUpdateXDomain:!0})},s.load=function(e){var t=this.internal,n=t.config;return e.xs&&t.addXs(e.xs),"classes"in e&&Object.keys(e.classes).forEach(function(t){n.data_classes[t]=e.classes[t]}),"categories"in e&&t.isCategorized()&&(n.axis_x_categories=e.categories),"axes"in e&&Object.keys(e.axes).forEach(function(t){n.data_axes[t]=e.axes[t]}),"colors"in e&&Object.keys(e.colors).forEach(function(t){n.data_colors[t]=e.colors[t]}),"cacheIds"in e&&t.hasCaches(e.cacheIds)?void t.load(t.getCaches(e.cacheIds),e.done):void("unload"in e?t.unload(t.mapToTargetIds("boolean"==typeof e.unload&&e.unload?null:e.unload),function(){t.loadFromArgs(e)}):t.loadFromArgs(e))},s.unload=function(e){var t=this.internal;e=e||{},e instanceof Array?e={ids:e}:"string"==typeof e&&(e={ids:[e]}),t.unload(t.mapToTargetIds(e.ids),function(){t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.done&&e.done()})},s.flow=function(e){var t,n,i,r,o,a,s,l,u=this.internal,c=[],d=u.getMaxDataCount(),p=0,f=0;if(e.json)n=u.convertJsonToData(e.json,e.keys);else if(e.rows)n=u.convertRowsToData(e.rows);else{if(!e.columns)return;n=u.convertColumnsToData(e.columns)}t=u.convertDataToTargets(n,!0),u.data.targets.forEach(function(e){var n,i,r=!1;for(n=0;n<t.length;n++)if(e.id===t[n].id){for(r=!0,e.values[e.values.length-1]&&(f=e.values[e.values.length-1].index+1),p=t[n].values.length,i=0;p>i;i++)t[n].values[i].index=f+i,u.isTimeSeries()||(t[n].values[i].x=f+i);e.values=e.values.concat(t[n].values),t.splice(n,1);break}r||c.push(e.id)}),u.data.targets.forEach(function(e){var t,n;for(t=0;t<c.length;t++)if(e.id===c[t])for(f=e.values[e.values.length-1].index+1,n=0;p>n;n++)e.values.push({id:e.id,index:f+n,x:u.isTimeSeries()?u.getOtherTargetX(f+n):f+n,value:null})}),u.data.targets.length&&t.forEach(function(e){var t,n=[];for(t=u.data.targets[0].values[0].index;f>t;t++)n.push({id:e.id,index:t,x:u.isTimeSeries()?u.getOtherTargetX(t):t,value:null});e.values.forEach(function(e){e.index+=f,u.isTimeSeries()||(e.x+=f)}),e.values=n.concat(e.values)}),u.data.targets=u.data.targets.concat(t),i=u.getMaxDataCount(),o=u.data.targets[0],a=o.values[0],g(e.to)?(p=0,l=u.isTimeSeries()?u.parseDate(e.to):e.to,o.values.forEach(function(e){e.x<l&&p++})):g(e.length)&&(p=e.length),d?1===d&&u.isTimeSeries()&&(s=(o.values[o.values.length-1].x-a.x)/2,r=[new Date(+a.x-s),new Date(+a.x+s)],u.updateXDomain(null,!0,!0,!1,r)):(s=u.isTimeSeries()?o.values.length>1?o.values[o.values.length-1].x-a.x:a.x-u.getXDomain(u.data.targets)[0]:1,r=[a.x-s,a.x],u.updateXDomain(null,!0,!0,!1,r)),u.updateTargets(u.data.targets),u.redraw({flow:{index:a.index,length:p,duration:h(e.duration)?e.duration:u.config.transition_duration,done:e.done,orgDataCount:d},withLegend:!0,withTransition:d>1,withTrimXDomain:!1,withUpdateXAxis:!0})},l.generateFlow=function(e){var t=this,n=t.config,i=t.d3;return function(){var r,o,a,s=e.targets,l=e.flow,u=e.drawBar,c=e.drawLine,h=e.drawArea,p=e.cx,f=e.cy,m=e.xv,g=e.xForText,v=e.yForText,y=e.duration,b=1,x=l.index,w=l.length,$=t.getValueOnIndex(t.data.targets[0].values,x),k=t.getValueOnIndex(t.data.targets[0].values,x+w),C=t.x.domain(),A=l.duration||y,M=l.done||function(){},T=t.generateWait(),S=t.xgrid||i.selectAll([]),D=t.xgridLines||i.selectAll([]),E=t.mainRegion||i.selectAll([]),L=t.mainText||i.selectAll([]),F=t.mainBar||i.selectAll([]),O=t.mainLine||i.selectAll([]),R=t.mainArea||i.selectAll([]),B=t.mainCircle||i.selectAll([]);t.flowing=!0,t.data.targets.forEach(function(e){e.values.splice(0,w)}),a=t.updateXDomain(s,!0,!0),t.updateXGrid&&t.updateXGrid(!0),l.orgDataCount?r=1===l.orgDataCount||$.x===k.x?t.x(C[0])-t.x(a[0]):t.isTimeSeries()?t.x(C[0])-t.x(a[0]):t.x($.x)-t.x(k.x):1!==t.data.targets[0].values.length?r=t.x(C[0])-t.x(a[0]):t.isTimeSeries()?($=t.getValueOnIndex(t.data.targets[0].values,0),k=t.getValueOnIndex(t.data.targets[0].values,t.data.targets[0].values.length-1),r=t.x($.x)-t.x(k.x)):r=_(a)/2,b=_(C)/_(a),o="translate("+r+",0) scale("+b+",1)",t.hideXGridFocus(),t.hideTooltip(),i.transition().ease("linear").duration(A).each(function(){T.add(t.axes.x.transition().call(t.xAxis)),T.add(F.transition().attr("transform",o)),T.add(O.transition().attr("transform",o)),T.add(R.transition().attr("transform",o)),T.add(B.transition().attr("transform",o)),T.add(L.transition().attr("transform",o)),T.add(E.filter(t.isRegionOnX).transition().attr("transform",o)),T.add(S.transition().attr("transform",o)),T.add(D.transition().attr("transform",o))}).call(T,function(){var e,i=[],r=[],o=[];if(w){for(e=0;w>e;e++)i.push("."+d.shape+"-"+(x+e)),r.push("."+d.text+"-"+(x+e)),o.push("."+d.eventRect+"-"+(x+e));t.svg.selectAll("."+d.shapes).selectAll(i).remove(),t.svg.selectAll("."+d.texts).selectAll(r).remove(),t.svg.selectAll("."+d.eventRects).selectAll(o).remove(),t.svg.select("."+d.xgrid).remove()}S.attr("transform",null).attr(t.xgridAttr),D.attr("transform",null),D.select("line").attr("x1",n.axis_rotated?0:m).attr("x2",n.axis_rotated?t.width:m),D.select("text").attr("x",n.axis_rotated?t.width:0).attr("y",m),F.attr("transform",null).attr("d",u),O.attr("transform",null).attr("d",c),R.attr("transform",null).attr("d",h),B.attr("transform",null).attr("cx",p).attr("cy",f),L.attr("transform",null).attr("x",g).attr("y",v).style("fill-opacity",t.opacityForText.bind(t)),E.attr("transform",null),E.select("rect").filter(t.isRegionOnX).attr("x",t.regionX.bind(t)).attr("width",t.regionWidth.bind(t)),n.interaction_enabled&&t.redrawEventRect(),M(),t.flowing=!1})}},s.selected=function(e){var t=this.internal,n=t.d3;return n.merge(t.main.selectAll("."+d.shapes+t.getTargetSelectorSuffix(e)).selectAll("."+d.shape).filter(function(){return n.select(this).classed(d.SELECTED)}).map(function(e){return e.map(function(e){var t=e.__data__;return t.data?t.data:t})}))},s.select=function(e,t,n){var i=this.internal,r=i.d3,o=i.config;o.data_selection_enabled&&i.main.selectAll("."+d.shapes).selectAll("."+d.shape).each(function(a,s){var l=r.select(this),u=a.data?a.data.id:a.id,c=i.getToggle(this,a).bind(i),h=o.data_selection_grouped||!e||e.indexOf(u)>=0,p=!t||t.indexOf(s)>=0,f=l.classed(d.SELECTED);l.classed(d.line)||l.classed(d.area)||(h&&p?o.data_selection_isselectable(a)&&!f&&c(!0,l.classed(d.SELECTED,!0),a,s):g(n)&&n&&f&&c(!1,l.classed(d.SELECTED,!1),a,s))})},s.unselect=function(e,t){var n=this.internal,i=n.d3,r=n.config;r.data_selection_enabled&&n.main.selectAll("."+d.shapes).selectAll("."+d.shape).each(function(o,a){var s=i.select(this),l=o.data?o.data.id:o.id,u=n.getToggle(this,o).bind(n),c=r.data_selection_grouped||!e||e.indexOf(l)>=0,h=!t||t.indexOf(a)>=0,p=s.classed(d.SELECTED);s.classed(d.line)||s.classed(d.area)||c&&h&&r.data_selection_isselectable(o)&&p&&u(!1,s.classed(d.SELECTED,!1),o,a)})},s.transform=function(e,t){var n=this.internal,i=["pie","donut"].indexOf(e)>=0?{withTransform:!0}:null;n.transformTo(t,e,i)},l.transformTo=function(e,t,n){var i=this,r=!i.hasArcType(),o=n||{withTransitionForAxis:r};o.withTransitionForTransform=!1,i.transiting=!1,i.setTargetType(e,t),i.updateTargets(i.data.targets),i.updateAndRedraw(o)},s.groups=function(e){var t=this.internal,n=t.config;return m(e)?n.data_groups:(n.data_groups=e,t.redraw(),n.data_groups)},s.xgrids=function(e){var t=this.internal,n=t.config;return e?(n.grid_x_lines=e,t.redrawWithoutRescale(),n.grid_x_lines):n.grid_x_lines},s.xgrids.add=function(e){var t=this.internal;return this.xgrids(t.config.grid_x_lines.concat(e?e:[]))},s.xgrids.remove=function(e){var t=this.internal;t.removeGridLines(e,!0)},s.ygrids=function(e){var t=this.internal,n=t.config;return e?(n.grid_y_lines=e,t.redrawWithoutRescale(),n.grid_y_lines):n.grid_y_lines},s.ygrids.add=function(e){var t=this.internal;return this.ygrids(t.config.grid_y_lines.concat(e?e:[]))},s.ygrids.remove=function(e){var t=this.internal;t.removeGridLines(e,!1)},s.regions=function(e){var t=this.internal,n=t.config;return e?(n.regions=e,t.redrawWithoutRescale(),n.regions):n.regions},s.regions.add=function(e){var t=this.internal,n=t.config;return e?(n.regions=n.regions.concat(e),t.redrawWithoutRescale(),n.regions):n.regions},s.regions.remove=function(e){var t,n,i,r=this.internal,o=r.config;return e=e||{},t=r.getOption(e,"duration",o.transition_duration),n=r.getOption(e,"classes",[d.region]),i=r.main.select("."+d.regions).selectAll(n.map(function(e){return"."+e})),(t?i.transition().duration(t):i).style("opacity",0).remove(),o.regions=o.regions.filter(function(e){var t=!1;return e["class"]?(e["class"].split(" ").forEach(function(e){n.indexOf(e)>=0&&(t=!0)}),!t):!0}),o.regions},s.data=function(e){var t=this.internal.data.targets;return"undefined"==typeof e?t:t.filter(function(t){return[].concat(e).indexOf(t.id)>=0})},s.data.shown=function(e){return this.internal.filterTargetsToShow(this.data(e))},s.data.values=function(e){var t,n=null;return e&&(t=this.data(e),n=t[0]?t[0].values.map(function(e){return e.value}):null),n},s.data.names=function(e){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",e)},s.data.colors=function(e){return this.internal.updateDataAttributes("colors",e)},s.data.axes=function(e){return this.internal.updateDataAttributes("axes",e)},s.category=function(e,t){var n=this.internal,i=n.config;return arguments.length>1&&(i.axis_x_categories[e]=t,n.redraw()),i.axis_x_categories[e]},s.categories=function(e){var t=this.internal,n=t.config;return arguments.length?(n.axis_x_categories=e,t.redraw(),n.axis_x_categories):n.axis_x_categories},s.color=function(e){var t=this.internal;return t.color(e)},s.x=function(e){var t=this.internal;return arguments.length&&(t.updateTargetX(t.data.targets,e),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),t.data.xs},s.xs=function(e){var t=this.internal;return arguments.length&&(t.updateTargetXs(t.data.targets,e),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),t.data.xs},s.axis=function(){},s.axis.labels=function(e){var t=this.internal;arguments.length&&(Object.keys(e).forEach(function(n){t.axis.setLabelText(n,e[n])}),t.axis.updateLabels())},s.axis.max=function(e){var t=this.internal,n=t.config;return arguments.length?("object"==typeof e?(h(e.x)&&(n.axis_x_max=e.x),h(e.y)&&(n.axis_y_max=e.y),h(e.y2)&&(n.axis_y2_max=e.y2)):n.axis_y_max=n.axis_y2_max=e,void t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})):{x:n.axis_x_max,y:n.axis_y_max,y2:n.axis_y2_max}},s.axis.min=function(e){var t=this.internal,n=t.config;return arguments.length?("object"==typeof e?(h(e.x)&&(n.axis_x_min=e.x),h(e.y)&&(n.axis_y_min=e.y),h(e.y2)&&(n.axis_y2_min=e.y2)):n.axis_y_min=n.axis_y2_min=e,void t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})):{x:n.axis_x_min,y:n.axis_y_min,y2:n.axis_y2_min}},s.axis.range=function(e){return arguments.length?(g(e.max)&&this.axis.max(e.max),void(g(e.min)&&this.axis.min(e.min))):{max:this.axis.max(),min:this.axis.min()}},s.legend=function(){},s.legend.show=function(e){var t=this.internal;t.showLegend(t.mapToTargetIds(e)),t.updateAndRedraw({withLegend:!0})},s.legend.hide=function(e){var t=this.internal;t.hideLegend(t.mapToTargetIds(e)),t.updateAndRedraw({withLegend:!0})},s.resize=function(e){var t=this.internal,n=t.config;n.size_width=e?e.width:null,n.size_height=e?e.height:null,this.flush()},s.flush=function(){var e=this.internal;e.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},s.destroy=function(){var t=this.internal;return e.clearInterval(t.intervalForObserveInserted),e.onresize=null,t.selectChart.classed("c3",!1).html(""),Object.keys(t).forEach(function(e){t[e]=null}),null},s.tooltip=function(){},s.tooltip.show=function(e){var t,n,i=this.internal;e.mouse&&(n=e.mouse),e.data?i.isMultipleX()?(n=[i.x(e.data.x),i.getYScale(e.data.id)(e.data.value)],t=null):t=h(e.data.index)?e.data.index:i.getIndexByX(e.data.x):"undefined"!=typeof e.x?t=i.getIndexByX(e.x):"undefined"!=typeof e.index&&(t=e.index),i.dispatchEvent("mouseover",t,n),i.dispatchEvent("mousemove",t,n)},s.tooltip.hide=function(){this.internal.dispatchEvent("mouseout",0)};var C;l.isSafari=function(){var t=e.navigator.userAgent;return t.indexOf("Safari")>=0&&t.indexOf("Chrome")<0},l.isChrome=function(){var t=e.navigator.userAgent;return t.indexOf("Chrome")>=0},Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),n=this,i=function(){},r=function(){return n.apply(this instanceof i?this:e,t.concat(Array.prototype.slice.call(arguments)))};return i.prototype=this.prototype,r.prototype=new i,r}),"function"==typeof define&&define.amd?define("c3",["d3"],c):"undefined"!=typeof exports&&"undefined"!=typeof module?module.exports=c:e.c3=c}(window),!function(){function e(e){return e&&(e.ownerDocument||e.document||e).documentElement}function t(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}function n(e,t){return t>e?-1:e>t?1:e>=t?0:NaN}function i(e){return null===e?NaN:+e}function r(e){return!isNaN(e)}function o(e){return{left:function(t,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=t.length);r>i;){var o=i+r>>>1;e(t[o],n)<0?i=o+1:r=o}return i},right:function(t,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=t.length);r>i;){var o=i+r>>>1;e(t[o],n)>0?r=o:i=o+1}return i}}}function a(e){return e.length}function s(e){for(var t=1;e*t%1;)t*=10;return t}function l(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function u(){this._=Object.create(null)}function c(e){return(e+="")===ma||e[0]===ga?ga+e:e}function d(e){return(e+="")[0]===ga?e.slice(1):e}function h(e){return c(e)in this._}function p(e){return(e=c(e))in this._&&delete this._[e]}function f(){var e=[];for(var t in this._)e.push(d(t));return e}function m(){var e=0;for(var t in this._)++e;return e}function g(){for(var e in this._)return!1;return!0}function v(){this._=Object.create(null)}function y(e){return e}function _(e,t,n){return function(){var i=n.apply(t,arguments);return i===t?e:i}}function b(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,i=va.length;i>n;++n){var r=va[n]+t;if(r in e)return r}}function x(){}function w(){}function $(e){function t(){for(var t,i=n,r=-1,o=i.length;++r<o;)(t=i[r].on)&&t.apply(this,arguments);return e}var n=[],i=new u;return t.on=function(t,r){var o,a=i.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,n=n.slice(0,o=n.indexOf(a)).concat(n.slice(o+1)),i.remove(t)),r&&n.push(i.set(t,{on:r})),e)},t}function k(){na.event.preventDefault()}function C(){for(var e,t=na.event;e=t.sourceEvent;)t=e;return t}function A(e){for(var t=new w,n=0,i=arguments.length;++n<i;)t[arguments[n]]=$(t);return t.of=function(n,i){return function(r){try{var o=r.sourceEvent=na.event;r.target=e,na.event=r,t[r.type].apply(n,i)}finally{na.event=o}}},t}function M(e){return _a(e,$a),e}function T(e){return"function"==typeof e?e:function(){return ba(e,this)}}function S(e){return"function"==typeof e?e:function(){return xa(e,this)}}function D(e,t){function n(){this.removeAttribute(e)}function i(){this.removeAttributeNS(e.space,e.local)}function r(){this.setAttribute(e,t)}function o(){this.setAttributeNS(e.space,e.local,t)}function a(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}function s(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=na.ns.qualify(e),null==t?e.local?i:n:"function"==typeof t?e.local?s:a:e.local?o:r}function E(e){return e.trim().replace(/\s+/g," ")}function L(e){return new RegExp("(?:^|\\s+)"+na.requote(e)+"(?:\\s+|$)","g")}function F(e){return(e+"").trim().split(/^|\s+/)}function O(e,t){function n(){for(var n=-1;++n<r;)e[n](this,t)}function i(){for(var n=-1,i=t.apply(this,arguments);++n<r;)e[n](this,i)}e=F(e).map(R);var r=e.length;return"function"==typeof t?i:n}function R(e){var t=L(e);return function(n,i){if(r=n.classList)return i?r.add(e):r.remove(e);var r=n.getAttribute("class")||"";i?(t.lastIndex=0,t.test(r)||n.setAttribute("class",E(r+" "+e))):n.setAttribute("class",E(r.replace(t," ")))}}function B(e,t,n){function i(){this.style.removeProperty(e)}function r(){this.style.setProperty(e,t,n)}function o(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}return null==t?i:"function"==typeof t?o:r}function P(e,t){function n(){delete this[e]}function i(){this[e]=t}function r(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}return null==t?n:"function"==typeof t?r:i}function I(e){function t(){var t=this.ownerDocument,n=this.namespaceURI;return n?t.createElementNS(n,e):t.createElement(e)}function n(){return this.ownerDocument.createElementNS(e.space,e.local)}return"function"==typeof e?e:(e=na.ns.qualify(e)).local?n:t}function Y(){var e=this.parentNode;e&&e.removeChild(this)}function j(e){return{__data__:e}}function N(e){return function(){return wa(this,e)}}function H(e){return arguments.length||(e=n),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function z(e,t){for(var n=0,i=e.length;i>n;n++)for(var r,o=e[n],a=0,s=o.length;s>a;a++)(r=o[a])&&t(r,a,n);return e}function q(e){return _a(e,Ca),e}function W(e){var t,n;return function(i,r,o){var a,s=e[o].update,l=s.length;for(o!=n&&(n=o,t=0),r>=t&&(t=r+1);!(a=s[t])&&++t<l;);return a}}function U(e,t,n){function i(){var t=this[a];t&&(this.removeEventListener(e,t,t.$),delete this[a])}function r(){var r=l(t,ra(arguments));i.call(this),this.addEventListener(e,this[a]=r,r.$=n),r._=t}function o(){var t,n=new RegExp("^__on([^.]+)"+na.requote(e)+"$");for(var i in this)if(t=i.match(n)){var r=this[i];this.removeEventListener(t[1],r,r.$),delete this[i]}}var a="__on"+e,s=e.indexOf("."),l=V;s>0&&(e=e.slice(0,s));var u=Aa.get(e);return u&&(e=u,l=X),s?t?r:i:t?x:o}function V(e,t){return function(n){var i=na.event;na.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{na.event=i}}}function X(e,t){var n=V(e,t);return function(e){var t=this,i=e.relatedTarget;i&&(i===t||8&i.compareDocumentPosition(t))||n.call(t,e)}}function G(n){var i=".dragsuppress-"+ ++Ta,r="click"+i,o=na.select(t(n)).on("touchmove"+i,k).on("dragstart"+i,k).on("selectstart"+i,k);if(null==Ma&&(Ma="onselectstart"in n?!1:b(n.style,"userSelect")),Ma){var a=e(n).style,s=a[Ma];a[Ma]="none"}return function(e){if(o.on(i,null),Ma&&(a[Ma]=s),e){var t=function(){o.on(r,null)};o.on(r,function(){k(),t()},!0),setTimeout(t,0)}}}function K(e,n){n.changedTouches&&(n=n.changedTouches[0]);var i=e.ownerSVGElement||e;if(i.createSVGPoint){var r=i.createSVGPoint();if(0>Sa){var o=t(e);if(o.scrollX||o.scrollY){i=na.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=i[0][0].getScreenCTM();Sa=!(a.f||a.e),i.remove()}}return Sa?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[n.clientX-s.left-e.clientLeft,n.clientY-s.top-e.clientTop]}function J(){return na.event.changedTouches[0].identifier}function Q(e){return e>0?1:0>e?-1:0}function Z(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function ee(e){return e>1?0:-1>e?La:Math.acos(e)}function te(e){return e>1?Ra:-1>e?-Ra:Math.asin(e)}function ne(e){return((e=Math.exp(e))-1/e)/2}function ie(e){return((e=Math.exp(e))+1/e)/2}function re(e){return((e=Math.exp(2*e))-1)/(e+1)}function oe(e){return(e=Math.sin(e/2))*e}function ae(){}function se(e,t,n){return this instanceof se?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof se?new se(e.h,e.s,e.l):xe(""+e,we,se):new se(e,t,n)}function le(e,t,n){function i(e){return e>360?e-=360:0>e&&(e+=360),60>e?o+(a-o)*e/60:180>e?a:240>e?o+(a-o)*(240-e)/60:o}function r(e){return Math.round(255*i(e))}var o,a;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:0>t?0:t>1?1:t,n=0>n?0:n>1?1:n,a=.5>=n?n*(1+t):n+t-n*t,o=2*n-a,new ve(r(e+120),r(e),r(e-120))}function ue(e,t,n){return this instanceof ue?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof ue?new ue(e.h,e.c,e.l):e instanceof de?pe(e.l,e.a,e.b):pe((e=$e((e=na.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new ue(e,t,n)}function ce(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new de(n,Math.cos(e*=Ba)*t,Math.sin(e)*t)}function de(e,t,n){return this instanceof de?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof de?new de(e.l,e.a,e.b):e instanceof ue?ce(e.h,e.c,e.l):$e((e=ve(e)).r,e.g,e.b):new de(e,t,n)}function he(e,t,n){var i=(e+16)/116,r=i+t/500,o=i-n/200;return r=fe(r)*Va,i=fe(i)*Xa,o=fe(o)*Ga,new ve(ge(3.2404542*r-1.5371385*i-.4985314*o),ge(-.969266*r+1.8760108*i+.041556*o),ge(.0556434*r-.2040259*i+1.0572252*o))}function pe(e,t,n){return e>0?new ue(Math.atan2(n,t)*Pa,Math.sqrt(t*t+n*n),e):new ue(NaN,NaN,e)}function fe(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function me(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function ge(e){return Math.round(255*(.00304>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ve(e,t,n){return this instanceof ve?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof ve?new ve(e.r,e.g,e.b):xe(""+e,ve,le):new ve(e,t,n)}function ye(e){return new ve(e>>16,e>>8&255,255&e)}function _e(e){return ye(e)+""}function be(e){return 16>e?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function xe(e,t,n){var i,r,o,a=0,s=0,l=0;if(i=/([a-z]+)\((.*)\)/i.exec(e))switch(r=i[2].split(","),i[1]){case"hsl":return n(parseFloat(r[0]),parseFloat(r[1])/100,parseFloat(r[2])/100);case"rgb":return t(Ce(r[0]),Ce(r[1]),Ce(r[2]))}return(o=Qa.get(e.toLowerCase()))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a=a>>4|a,s=240&o,s=s>>4|s,l=15&o,l=l<<4|l):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function we(e,t,n){var i,r,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,l=(a+o)/2;return s?(r=.5>l?s/(a+o):s/(2-a-o),i=e==a?(t-n)/s+(n>t?6:0):t==a?(n-e)/s+2:(e-t)/s+4,i*=60):(i=NaN,r=l>0&&1>l?0:i),new se(i,r,l)}function $e(e,t,n){e=ke(e),t=ke(t),n=ke(n);var i=me((.4124564*e+.3575761*t+.1804375*n)/Va),r=me((.2126729*e+.7151522*t+.072175*n)/Xa),o=me((.0193339*e+.119192*t+.9503041*n)/Ga);return de(116*r-16,500*(i-r),200*(r-o))}function ke(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ce(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function Ae(e){return"function"==typeof e?e:function(){return e}}function Me(e){return function(t,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=null),Te(t,n,e,i)}}function Te(e,t,n,i){function r(){var e,t=l.status;if(!t&&De(l)||t>=200&&300>t||304===t){try{e=n.call(o,l)}catch(i){return void a.error.call(o,i)}a.load.call(o,e)}else a.error.call(o,l)}var o={},a=na.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(e)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=r:l.onreadystatechange=function(){l.readyState>3&&r()},l.onprogress=function(e){var t=na.event;na.event=e;try{a.progress.call(o,l)}finally{na.event=t}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",o):t},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return n=e,o},["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(ra(arguments)))}}),o.send=function(n,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),l.open(n,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=u&&(l.responseType=u),null!=r&&o.on("error",r).on("load",function(e){r(null,e)}),a.beforesend.call(o,l),l.send(null==i?null:i),o},o.abort=function(){return l.abort(),o},na.rebind(o,a,"on"),null==i?o:o.get(Se(i))}function Se(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function De(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function Ee(){var e=Le(),t=Fe()-e;t>24?(isFinite(t)&&(clearTimeout(ns),ns=setTimeout(Ee,t)),ts=0):(ts=1,rs(Ee))}function Le(){var e=Date.now();for(is=Za;is;)e>=is.t&&(is.f=is.c(e-is.t)),is=is.n;return e}function Fe(){for(var e,t=Za,n=1/0;t;)t.f?t=e?e.n=t.n:Za=t.n:(t.t<n&&(n=t.t),t=(e=t).n);return es=e,n}function Oe(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function Re(e,t){var n=Math.pow(10,3*fa(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Be(e){var t=e.decimal,n=e.thousands,i=e.grouping,r=e.currency,o=i&&n?function(e,t){for(var r=e.length,o=[],a=0,s=i[0],l=0;r>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),o.push(e.substring(r-=s,r+s)),!((l+=s+1)>t));)s=i[a=(a+1)%i.length];return o.reverse().join(n)}:y;return function(e){var n=as.exec(e),i=n[1]||" ",a=n[2]||">",s=n[3]||"-",l=n[4]||"",u=n[5],c=+n[6],d=n[7],h=n[8],p=n[9],f=1,m="",g="",v=!1,y=!0;switch(h&&(h=+h.substring(1)),(u||"0"===i&&"="===a)&&(u=i="0",a="="),p){case"n":d=!0,p="g";break;case"%":f=100,g="%",p="f";break;case"p":f=100,g="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(m="0"+p.toLowerCase());case"c":y=!1;case"d":v=!0,h=0;break;case"s":f=-1,p="r"}"$"===l&&(m=r[0],g=r[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):("e"==p||"f"==p)&&(h=Math.max(0,Math.min(20,h)))),p=ss.get(p)||Pe;var _=u&&d;return function(e){var n=g;if(v&&e%1)return"";var r=0>e||0===e&&0>1/e?(e=-e,"-"):"-"===s?"":s;if(0>f){var l=na.formatPrefix(e,h);e=l.scale(e),n=l.symbol+g}else e*=f;e=p(e,h);var b,x,w=e.lastIndexOf(".");if(0>w){var $=y?e.lastIndexOf("e"):-1;0>$?(b=e,x=""):(b=e.substring(0,$),x=e.substring($))}else b=e.substring(0,w),x=t+e.substring(w+1);!u&&d&&(b=o(b,1/0));var k=m.length+b.length+x.length+(_?0:r.length),C=c>k?new Array(k=c-k+1).join(i):"";return _&&(b=o(C+b,C.length?c-x.length:1/0)),r+=m,e=b+x,("<"===a?r+e+C:">"===a?C+r+e:"^"===a?C.substring(0,k>>=1)+r+e+C.substring(k):r+(_?e:C+e))+n}}}function Pe(e){return e+""}function Ie(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ye(e,t,n){function i(t){var n=e(t),i=o(n,1);return i-t>t-n?n:i}function r(n){return t(n=e(new us(n-1)),1),n}function o(e,n){return t(e=new us(+e),n),e}function a(e,i,o){var a=r(e),s=[];if(o>1)for(;i>a;)n(a)%o||s.push(new Date(+a)),t(a,1);else for(;i>a;)s.push(new Date(+a)),t(a,1);return s}function s(e,t,n){try{us=Ie;var i=new Ie;return i._=e,a(i,t,n)}finally{us=Date}}e.floor=e,e.round=i,e.ceil=r,e.offset=o,e.range=a;var l=e.utc=je(e);return l.floor=l,l.round=je(i),l.ceil=je(r),l.offset=je(o),l.range=s,e}function je(e){return function(t,n){try{us=Ie;var i=new Ie;return i._=t,e(i,n)._}finally{us=Date}}}function Ne(e){function t(e){function t(t){for(var n,r,o,a=[],s=-1,l=0;++s<i;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(r=ds[n=e.charAt(++s)])&&(n=e.charAt(++s)),(o=T[n])&&(n=o(t,null==r?"e"===n?" ":"0":r)),a.push(n),l=s+1);return a.push(e.slice(l,s)),a.join("")}var i=e.length;return t.parse=function(t){var i={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},r=n(i,e,t,0);if(r!=t.length)return null;"p"in i&&(i.H=i.H%12+12*i.p);var o=null!=i.Z&&us!==Ie,a=new(o?Ie:us);return"j"in i?a.setFullYear(i.y,0,i.j):"w"in i&&("W"in i||"U"in i)?(a.setFullYear(i.y,0,1),a.setFullYear(i.y,0,"W"in i?(i.w+6)%7+7*i.W-(a.getDay()+5)%7:i.w+7*i.U-(a.getDay()+6)%7)):a.setFullYear(i.y,i.m,i.d),a.setHours(i.H+(i.Z/100|0),i.M+i.Z%100,i.S,i.L),o?a._:a},t.toString=function(){return e},t}function n(e,t,n,i){for(var r,o,a,s=0,l=t.length,u=n.length;l>s;){if(i>=u)return-1;if(r=t.charCodeAt(s++),37===r){if(a=t.charAt(s++),o=S[a in ds?t.charAt(s++):a],!o||(i=o(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}function i(e,t,n){w.lastIndex=0;var i=w.exec(t.slice(n));return i?(e.w=$.get(i[0].toLowerCase()),n+i[0].length):-1}function r(e,t,n){b.lastIndex=0;var i=b.exec(t.slice(n));return i?(e.w=x.get(i[0].toLowerCase()),n+i[0].length):-1}function o(e,t,n){A.lastIndex=0;var i=A.exec(t.slice(n));return i?(e.m=M.get(i[0].toLowerCase()),n+i[0].length):-1}function a(e,t,n){k.lastIndex=0;var i=k.exec(t.slice(n));return i?(e.m=C.get(i[0].toLowerCase()),n+i[0].length):-1}function s(e,t,i){return n(e,T.c.toString(),t,i)}function l(e,t,i){return n(e,T.x.toString(),t,i)}function u(e,t,i){return n(e,T.X.toString(),t,i)}function c(e,t,n){var i=_.get(t.slice(n,n+=2).toLowerCase());return null==i?-1:(e.p=i,n)}var d=e.dateTime,h=e.date,p=e.time,f=e.periods,m=e.days,g=e.shortDays,v=e.months,y=e.shortMonths;t.utc=function(e){function n(e){try{us=Ie;var t=new us;return t._=e,i(t)}finally{us=Date}}var i=t(e);return n.parse=function(e){try{us=Ie;var t=i.parse(e);return t&&t._}finally{us=Date}},n.toString=i.toString,n},t.multi=t.utc.multi=st;var _=na.map(),b=ze(m),x=qe(m),w=ze(g),$=qe(g),k=ze(v),C=qe(v),A=ze(y),M=qe(y);f.forEach(function(e,t){_.set(e.toLowerCase(),t)});var T={a:function(e){return g[e.getDay()]},A:function(e){return m[e.getDay()]},b:function(e){return y[e.getMonth()]},B:function(e){return v[e.getMonth()]},c:t(d),d:function(e,t){return He(e.getDate(),t,2)},e:function(e,t){return He(e.getDate(),t,2)},H:function(e,t){return He(e.getHours(),t,2)},I:function(e,t){return He(e.getHours()%12||12,t,2)},j:function(e,t){return He(1+ls.dayOfYear(e),t,3)},L:function(e,t){return He(e.getMilliseconds(),t,3)},m:function(e,t){return He(e.getMonth()+1,t,2)},M:function(e,t){return He(e.getMinutes(),t,2)},p:function(e){return f[+(e.getHours()>=12)]},S:function(e,t){return He(e.getSeconds(),t,2)},U:function(e,t){return He(ls.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return He(ls.mondayOfYear(e),t,2)},x:t(h),X:t(p),y:function(e,t){return He(e.getFullYear()%100,t,2)},Y:function(e,t){return He(e.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},S={a:i,A:r,b:o,B:a,c:s,d:Ze,e:Ze,H:tt,I:tt,j:et,L:rt,m:Qe,M:nt,p:c,S:it,U:Ue,w:We,W:Ve,x:l,X:u,y:Ge,Y:Xe,Z:Ke,"%":at};return t}function He(e,t,n){var i=0>e?"-":"",r=(i?-e:e)+"",o=r.length;return i+(n>o?new Array(n-o+1).join(t)+r:r)}function ze(e){return new RegExp("^(?:"+e.map(na.requote).join("|")+")","i")}function qe(e){for(var t=new u,n=-1,i=e.length;++n<i;)t.set(e[n].toLowerCase(),n);return t}function We(e,t,n){hs.lastIndex=0;var i=hs.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function Ue(e,t,n){hs.lastIndex=0;var i=hs.exec(t.slice(n));return i?(e.U=+i[0],n+i[0].length):-1}function Ve(e,t,n){hs.lastIndex=0;var i=hs.exec(t.slice(n));return i?(e.W=+i[0],n+i[0].length):-1}function Xe(e,t,n){hs.lastIndex=0;var i=hs.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function Ge(e,t,n){hs.lastIndex=0;var i=hs.exec(t.slice(n,n+2));return i?(e.y=Je(+i[0]),n+i[0].length):-1}function Ke(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function Je(e){return e+(e>68?1900:2e3)}function Qe(e,t,n){hs.lastIndex=0;var i=hs.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function Ze(e,t,n){hs.lastIndex=0;var i=hs.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function et(e,t,n){hs.lastIndex=0;var i=hs.exec(t.slice(n,n+3));return i?(e.j=+i[0],
|
140
|
+
n+i[0].length):-1}function tt(e,t,n){hs.lastIndex=0;var i=hs.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function nt(e,t,n){hs.lastIndex=0;var i=hs.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function it(e,t,n){hs.lastIndex=0;var i=hs.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function rt(e,t,n){hs.lastIndex=0;var i=hs.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function ot(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",i=fa(t)/60|0,r=fa(t)%60;return n+He(i,"0",2)+He(r,"0",2)}function at(e,t,n){ps.lastIndex=0;var i=ps.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function st(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,i=e[n];!i[1](t);)i=e[++n];return i[0](t)}}function lt(){}function ut(e,t,n){var i=n.s=e+t,r=i-e,o=i-r;n.t=e-o+(t-r)}function ct(e,t){e&&vs.hasOwnProperty(e.type)&&vs[e.type](e,t)}function dt(e,t,n){var i,r=-1,o=e.length-n;for(t.lineStart();++r<o;)i=e[r],t.point(i[0],i[1],i[2]);t.lineEnd()}function ht(e,t){var n=-1,i=e.length;for(t.polygonStart();++n<i;)dt(e[n],t,1);t.polygonEnd()}function pt(){function e(e,t){e*=Ba,t=t*Ba/2+La/4;var n=e-i,a=n>=0?1:-1,s=a*n,l=Math.cos(t),u=Math.sin(t),c=o*u,d=r*l+c*Math.cos(s),h=c*a*Math.sin(s);_s.add(Math.atan2(h,d)),i=e,r=l,o=u}var t,n,i,r,o;bs.point=function(a,s){bs.point=e,i=(t=a)*Ba,r=Math.cos(s=(n=s)*Ba/2+La/4),o=Math.sin(s)},bs.lineEnd=function(){e(t,n)}}function ft(e){var t=e[0],n=e[1],i=Math.cos(n);return[i*Math.cos(t),i*Math.sin(t),Math.sin(n)]}function mt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function gt(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function vt(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function yt(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function _t(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function bt(e){return[Math.atan2(e[1],e[0]),te(e[2])]}function xt(e,t){return fa(e[0]-t[0])<Da&&fa(e[1]-t[1])<Da}function wt(e,t){e*=Ba;var n=Math.cos(t*=Ba);$t(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function $t(e,t,n){++xs,$s+=(e-$s)/xs,ks+=(t-ks)/xs,Cs+=(n-Cs)/xs}function kt(){function e(e,r){e*=Ba;var o=Math.cos(r*=Ba),a=o*Math.cos(e),s=o*Math.sin(e),l=Math.sin(r),u=Math.atan2(Math.sqrt((u=n*l-i*s)*u+(u=i*a-t*l)*u+(u=t*s-n*a)*u),t*a+n*s+i*l);ws+=u,As+=u*(t+(t=a)),Ms+=u*(n+(n=s)),Ts+=u*(i+(i=l)),$t(t,n,i)}var t,n,i;Ls.point=function(r,o){r*=Ba;var a=Math.cos(o*=Ba);t=a*Math.cos(r),n=a*Math.sin(r),i=Math.sin(o),Ls.point=e,$t(t,n,i)}}function Ct(){Ls.point=wt}function At(){function e(e,t){e*=Ba;var n=Math.cos(t*=Ba),a=n*Math.cos(e),s=n*Math.sin(e),l=Math.sin(t),u=r*l-o*s,c=o*a-i*l,d=i*s-r*a,h=Math.sqrt(u*u+c*c+d*d),p=i*a+r*s+o*l,f=h&&-ee(p)/h,m=Math.atan2(h,p);Ss+=f*u,Ds+=f*c,Es+=f*d,ws+=m,As+=m*(i+(i=a)),Ms+=m*(r+(r=s)),Ts+=m*(o+(o=l)),$t(i,r,o)}var t,n,i,r,o;Ls.point=function(a,s){t=a,n=s,Ls.point=e,a*=Ba;var l=Math.cos(s*=Ba);i=l*Math.cos(a),r=l*Math.sin(a),o=Math.sin(s),$t(i,r,o)},Ls.lineEnd=function(){e(t,n),Ls.lineEnd=Ct,Ls.point=wt}}function Mt(e,t){function n(n,i){return n=e(n,i),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,i){return n=t.invert(n,i),n&&e.invert(n[0],n[1])}),n}function Tt(){return!0}function St(e,t,n,i,r){var o=[],a=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],i=e[t];if(xt(n,i)){r.lineStart();for(var s=0;t>s;++s)r.point((n=e[s])[0],n[1]);return void r.lineEnd()}var l=new Et(n,e,null,!0),u=new Et(n,null,l,!1);l.o=u,o.push(l),a.push(u),l=new Et(i,e,null,!1),u=new Et(i,null,l,!0),l.o=u,o.push(l),a.push(u)}}),a.sort(t),Dt(o),Dt(a),o.length){for(var s=0,l=n,u=a.length;u>s;++s)a[s].e=l=!l;for(var c,d,h=o[0];;){for(var p=h,f=!0;p.v;)if((p=p.n)===h)return;c=p.z,r.lineStart();do{if(p.v=p.o.v=!0,p.e){if(f)for(var s=0,u=c.length;u>s;++s)r.point((d=c[s])[0],d[1]);else i(p.x,p.n.x,1,r);p=p.n}else{if(f){c=p.p.z;for(var s=c.length-1;s>=0;--s)r.point((d=c[s])[0],d[1])}else i(p.x,p.p.x,-1,r);p=p.p}p=p.o,c=p.z,f=!f}while(!p.v);r.lineEnd()}}}function Dt(e){if(t=e.length){for(var t,n,i=0,r=e[0];++i<t;)r.n=n=e[i],n.p=r,r=n;r.n=n=e[0],n.p=r}}function Et(e,t,n,i){this.x=e,this.z=t,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function Lt(e,t,n,i){return function(r,o){function a(t,n){var i=r(t,n);e(t=i[0],n=i[1])&&o.point(t,n)}function s(e,t){var n=r(e,t);g.point(n[0],n[1])}function l(){y.point=s,g.lineStart()}function u(){y.point=a,g.lineEnd()}function c(e,t){m.push([e,t]);var n=r(e,t);b.point(n[0],n[1])}function d(){b.lineStart(),m=[]}function h(){c(m[0][0],m[0][1]),b.lineEnd();var e,t=b.clean(),n=_.buffer(),i=n.length;if(m.pop(),f.push(m),m=null,i)if(1&t){e=n[0];var r,i=e.length-1,a=-1;if(i>0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a<i;)o.point((r=e[a])[0],r[1]);o.lineEnd()}}else i>1&&2&t&&n.push(n.pop().concat(n.shift())),p.push(n.filter(Ft))}var p,f,m,g=t(o),v=r.invert(i[0],i[1]),y={point:a,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=d,y.lineEnd=h,p=[],f=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=u,p=na.merge(p);var e=Yt(v,f);p.length?(x||(o.polygonStart(),x=!0),St(p,Rt,e,n,o)):e&&(x||(o.polygonStart(),x=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),p=f=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},_=Ot(),b=t(_),x=!1;return y}}function Ft(e){return e.length>1}function Ot(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:x,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Rt(e,t){return((e=e.x)[0]<0?e[1]-Ra-Da:Ra-e[1])-((t=t.x)[0]<0?t[1]-Ra-Da:Ra-t[1])}function Bt(e){var t,n=NaN,i=NaN,r=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?La:-La,l=fa(o-n);fa(l-La)<Da?(e.point(n,i=(i+a)/2>0?Ra:-Ra),e.point(r,i),e.lineEnd(),e.lineStart(),e.point(s,i),e.point(o,i),t=0):r!==s&&l>=La&&(fa(n-r)<Da&&(n-=r*Da),fa(o-s)<Da&&(o-=s*Da),i=Pt(n,i,o,a),e.point(r,i),e.lineEnd(),e.lineStart(),e.point(s,i),t=0),e.point(n=o,i=a),r=s},lineEnd:function(){e.lineEnd(),n=i=NaN},clean:function(){return 2-t}}}function Pt(e,t,n,i){var r,o,a=Math.sin(e-n);return fa(a)>Da?Math.atan((Math.sin(t)*(o=Math.cos(i))*Math.sin(n)-Math.sin(i)*(r=Math.cos(t))*Math.sin(e))/(r*o*a)):(t+i)/2}function It(e,t,n,i){var r;if(null==e)r=n*Ra,i.point(-La,r),i.point(0,r),i.point(La,r),i.point(La,0),i.point(La,-r),i.point(0,-r),i.point(-La,-r),i.point(-La,0),i.point(-La,r);else if(fa(e[0]-t[0])>Da){var o=e[0]<t[0]?La:-La;r=n*o/2,i.point(-o,r),i.point(0,r),i.point(o,r)}else i.point(t[0],t[1])}function Yt(e,t){var n=e[0],i=e[1],r=[Math.sin(n),-Math.cos(n),0],o=0,a=0;_s.reset();for(var s=0,l=t.length;l>s;++s){var u=t[s],c=u.length;if(c)for(var d=u[0],h=d[0],p=d[1]/2+La/4,f=Math.sin(p),m=Math.cos(p),g=1;;){g===c&&(g=0),e=u[g];var v=e[0],y=e[1]/2+La/4,_=Math.sin(y),b=Math.cos(y),x=v-h,w=x>=0?1:-1,$=w*x,k=$>La,C=f*_;if(_s.add(Math.atan2(C*w*Math.sin($),m*b+C*Math.cos($))),o+=k?x+w*Fa:x,k^h>=n^v>=n){var A=gt(ft(d),ft(e));_t(A);var M=gt(r,A);_t(M);var T=(k^x>=0?-1:1)*te(M[2]);(i>T||i===T&&(A[0]||A[1]))&&(a+=k^x>=0?1:-1)}if(!g++)break;h=v,f=_,m=b,d=e}}return(-Da>o||Da>o&&0>_s)^1&a}function jt(e){function t(e,t){return Math.cos(e)*Math.cos(t)>o}function n(e){var n,o,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(d,h){var p,f=[d,h],m=t(d,h),g=a?m?0:r(d,h):m?r(d+(0>d?La:-La),h):0;if(!n&&(u=l=m)&&e.lineStart(),m!==l&&(p=i(n,f),(xt(n,p)||xt(f,p))&&(f[0]+=Da,f[1]+=Da,m=t(f[0],f[1]))),m!==l)c=0,m?(e.lineStart(),p=i(f,n),e.point(p[0],p[1])):(p=i(n,f),e.point(p[0],p[1]),e.lineEnd()),n=p;else if(s&&n&&a^m){var v;g&o||!(v=i(f,n,!0))||(c=0,a?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!m||n&&xt(n,f)||e.point(f[0],f[1]),n=f,l=m,o=g},lineEnd:function(){l&&e.lineEnd(),n=null},clean:function(){return c|(u&&l)<<1}}}function i(e,t,n){var i=ft(e),r=ft(t),a=[1,0,0],s=gt(i,r),l=mt(s,s),u=s[0],c=l-u*u;if(!c)return!n&&e;var d=o*l/c,h=-o*u/c,p=gt(a,s),f=yt(a,d),m=yt(s,h);vt(f,m);var g=p,v=mt(f,g),y=mt(g,g),_=v*v-y*(mt(f,f)-1);if(!(0>_)){var b=Math.sqrt(_),x=yt(g,(-v-b)/y);if(vt(x,f),x=bt(x),!n)return x;var w,$=e[0],k=t[0],C=e[1],A=t[1];$>k&&(w=$,$=k,k=w);var M=k-$,T=fa(M-La)<Da,S=T||Da>M;if(!T&&C>A&&(w=C,C=A,A=w),S?T?C+A>0^x[1]<(fa(x[0]-$)<Da?C:A):C<=x[1]&&x[1]<=A:M>La^($<=x[0]&&x[0]<=k)){var D=yt(g,(-v+b)/y);return vt(D,f),[x,bt(D)]}}}function r(t,n){var i=a?e:La-e,r=0;return-i>t?r|=1:t>i&&(r|=2),-i>n?r|=4:n>i&&(r|=8),r}var o=Math.cos(e),a=o>0,s=fa(o)>Da,l=fn(e,6*Ba);return Lt(t,n,l,a?[0,-e]:[-La,e-La])}function Nt(e,t,n,i){return function(r){var o,a=r.a,s=r.b,l=a.x,u=a.y,c=s.x,d=s.y,h=0,p=1,f=c-l,m=d-u;if(o=e-l,f||!(o>0)){if(o/=f,0>f){if(h>o)return;p>o&&(p=o)}else if(f>0){if(o>p)return;o>h&&(h=o)}if(o=n-l,f||!(0>o)){if(o/=f,0>f){if(o>p)return;o>h&&(h=o)}else if(f>0){if(h>o)return;p>o&&(p=o)}if(o=t-u,m||!(o>0)){if(o/=m,0>m){if(h>o)return;p>o&&(p=o)}else if(m>0){if(o>p)return;o>h&&(h=o)}if(o=i-u,m||!(0>o)){if(o/=m,0>m){if(o>p)return;o>h&&(h=o)}else if(m>0){if(h>o)return;p>o&&(p=o)}return h>0&&(r.a={x:l+h*f,y:u+h*m}),1>p&&(r.b={x:l+p*f,y:u+p*m}),r}}}}}}function Ht(e,t,n,i){function r(i,r){return fa(i[0]-e)<Da?r>0?0:3:fa(i[0]-n)<Da?r>0?2:1:fa(i[1]-t)<Da?r>0?1:0:r>0?3:2}function o(e,t){return a(e.x,t.x)}function a(e,t){var n=r(e,1),i=r(t,1);return n!==i?n-i:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){function l(e){for(var t=0,n=g.length,i=e[1],r=0;n>r;++r)for(var o,a=1,s=g[r],l=s.length,u=s[0];l>a;++a)o=s[a],u[1]<=i?o[1]>i&&Z(u,o,e)>0&&++t:o[1]<=i&&Z(u,o,e)<0&&--t,u=o;return 0!==t}function u(o,s,l,u){var c=0,d=0;if(null==o||(c=r(o,l))!==(d=r(s,l))||a(o,s)<0^l>0){do u.point(0===c||3===c?e:n,c>1?i:t);while((c=(c+l+4)%4)!==d)}else u.point(s[0],s[1])}function c(r,o){return r>=e&&n>=r&&o>=t&&i>=o}function d(e,t){c(e,t)&&s.point(e,t)}function h(){S.point=f,g&&g.push(v=[]),k=!0,$=!1,x=w=NaN}function p(){m&&(f(y,_),b&&$&&M.rejoin(),m.push(M.buffer())),S.point=d,$&&s.lineEnd()}function f(e,t){e=Math.max(-Os,Math.min(Os,e)),t=Math.max(-Os,Math.min(Os,t));var n=c(e,t);if(g&&v.push([e,t]),k)y=e,_=t,b=n,k=!1,n&&(s.lineStart(),s.point(e,t));else if(n&&$)s.point(e,t);else{var i={a:{x:x,y:w},b:{x:e,y:t}};T(i)?($||(s.lineStart(),s.point(i.a.x,i.a.y)),s.point(i.b.x,i.b.y),n||s.lineEnd(),C=!1):n&&(s.lineStart(),s.point(e,t),C=!1)}x=e,w=t,$=n}var m,g,v,y,_,b,x,w,$,k,C,A=s,M=Ot(),T=Nt(e,t,n,i),S={point:d,lineStart:h,lineEnd:p,polygonStart:function(){s=M,m=[],g=[],C=!0},polygonEnd:function(){s=A,m=na.merge(m);var t=l([e,i]),n=C&&t,r=m.length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),r&&St(m,o,t,u,s),s.polygonEnd()),m=g=v=null}};return S}}function zt(e){var t=0,n=La/3,i=an(e),r=i(t,n);return r.parallels=function(e){return arguments.length?i(t=e[0]*La/180,n=e[1]*La/180):[t/La*180,n/La*180]},r}function qt(e,t){function n(e,t){var n=Math.sqrt(o-2*r*Math.sin(t))/r;return[n*Math.sin(e*=r),a-n*Math.cos(e)]}var i=Math.sin(e),r=(i+Math.sin(t))/2,o=1+i*(2*r-i),a=Math.sqrt(o)/r;return n.invert=function(e,t){var n=a-t;return[Math.atan2(e,n)/r,te((o-(e*e+n*n)*r*r)/(2*r))]},n}function Wt(){function e(e,t){Bs+=r*e-i*t,i=e,r=t}var t,n,i,r;Ns.point=function(o,a){Ns.point=e,t=i=o,n=r=a},Ns.lineEnd=function(){e(t,n)}}function Ut(e,t){Ps>e&&(Ps=e),e>Ys&&(Ys=e),Is>t&&(Is=t),t>js&&(js=t)}function Vt(){function e(e,t){a.push("M",e,",",t,o)}function t(e,t){a.push("M",e,",",t),s.point=n}function n(e,t){a.push("L",e,",",t)}function i(){s.point=e}function r(){a.push("Z")}var o=Xt(4.5),a=[],s={point:e,lineStart:function(){s.point=t},lineEnd:i,polygonStart:function(){s.lineEnd=r},polygonEnd:function(){s.lineEnd=i,s.point=e},pointRadius:function(e){return o=Xt(e),s},result:function(){if(a.length){var e=a.join("");return a=[],e}}};return s}function Xt(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Gt(e,t){$s+=e,ks+=t,++Cs}function Kt(){function e(e,i){var r=e-t,o=i-n,a=Math.sqrt(r*r+o*o);As+=a*(t+e)/2,Ms+=a*(n+i)/2,Ts+=a,Gt(t=e,n=i)}var t,n;zs.point=function(i,r){zs.point=e,Gt(t=i,n=r)}}function Jt(){zs.point=Gt}function Qt(){function e(e,t){var n=e-i,o=t-r,a=Math.sqrt(n*n+o*o);As+=a*(i+e)/2,Ms+=a*(r+t)/2,Ts+=a,a=r*e-i*t,Ss+=a*(i+e),Ds+=a*(r+t),Es+=3*a,Gt(i=e,r=t)}var t,n,i,r;zs.point=function(o,a){zs.point=e,Gt(t=i=o,n=r=a)},zs.lineEnd=function(){e(t,n)}}function Zt(e){function t(t,n){e.moveTo(t+a,n),e.arc(t,n,a,0,Fa)}function n(t,n){e.moveTo(t,n),s.point=i}function i(t,n){e.lineTo(t,n)}function r(){s.point=t}function o(){e.closePath()}var a=4.5,s={point:t,lineStart:function(){s.point=n},lineEnd:r,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=r,s.point=t},pointRadius:function(e){return a=e,s},result:x};return s}function en(e){function t(e){return(s?i:n)(e)}function n(t){return rn(t,function(n,i){n=e(n,i),t.point(n[0],n[1])})}function i(t){function n(n,i){n=e(n,i),t.point(n[0],n[1])}function i(){_=NaN,k.point=o,t.lineStart()}function o(n,i){var o=ft([n,i]),a=e(n,i);r(_,b,y,x,w,$,_=a[0],b=a[1],y=n,x=o[0],w=o[1],$=o[2],s,t),t.point(_,b)}function a(){k.point=n,t.lineEnd()}function l(){i(),k.point=u,k.lineEnd=c}function u(e,t){o(d=e,h=t),p=_,f=b,m=x,g=w,v=$,k.point=o}function c(){r(_,b,y,x,w,$,p,f,d,m,g,v,s,t),k.lineEnd=a,a()}var d,h,p,f,m,g,v,y,_,b,x,w,$,k={point:n,lineStart:i,lineEnd:a,polygonStart:function(){t.polygonStart(),k.lineStart=l},polygonEnd:function(){t.polygonEnd(),k.lineStart=i}};return k}function r(t,n,i,s,l,u,c,d,h,p,f,m,g,v){var y=c-t,_=d-n,b=y*y+_*_;if(b>4*o&&g--){var x=s+p,w=l+f,$=u+m,k=Math.sqrt(x*x+w*w+$*$),C=Math.asin($/=k),A=fa(fa($)-1)<Da||fa(i-h)<Da?(i+h)/2:Math.atan2(w,x),M=e(A,C),T=M[0],S=M[1],D=T-t,E=S-n,L=_*D-y*E;(L*L/b>o||fa((y*D+_*E)/b-.5)>.3||a>s*p+l*f+u*m)&&(r(t,n,i,s,l,u,T,S,A,x/=k,w/=k,$,g,v),v.point(T,S),r(T,S,A,x,w,$,c,d,h,p,f,m,g,v))}}var o=.5,a=Math.cos(30*Ba),s=16;return t.precision=function(e){return arguments.length?(s=(o=e*e)>0&&16,t):Math.sqrt(o)},t}function tn(e){var t=en(function(t,n){return e([t*Pa,n*Pa])});return function(e){return sn(t(e))}}function nn(e){this.stream=e}function rn(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function on(e){return an(function(){return e})()}function an(e){function t(e){return e=s(e[0]*Ba,e[1]*Ba),[e[0]*h+l,u-e[1]*h]}function n(e){return e=s.invert((e[0]-l)/h,(u-e[1])/h),e&&[e[0]*Pa,e[1]*Pa]}function i(){s=Mt(a=cn(v,_,b),o);var e=o(m,g);return l=p-e[0]*h,u=f+e[1]*h,r()}function r(){return c&&(c.valid=!1,c=null),t}var o,a,s,l,u,c,d=en(function(e,t){return e=o(e,t),[e[0]*h+l,u-e[1]*h]}),h=150,p=480,f=250,m=0,g=0,v=0,_=0,b=0,x=Fs,w=y,$=null,k=null;return t.stream=function(e){return c&&(c.valid=!1),c=sn(x(a,d(w(e)))),c.valid=!0,c},t.clipAngle=function(e){return arguments.length?(x=null==e?($=e,Fs):jt(($=+e)*Ba),r()):$},t.clipExtent=function(e){return arguments.length?(k=e,w=e?Ht(e[0][0],e[0][1],e[1][0],e[1][1]):y,r()):k},t.scale=function(e){return arguments.length?(h=+e,i()):h},t.translate=function(e){return arguments.length?(p=+e[0],f=+e[1],i()):[p,f]},t.center=function(e){return arguments.length?(m=e[0]%360*Ba,g=e[1]%360*Ba,i()):[m*Pa,g*Pa]},t.rotate=function(e){return arguments.length?(v=e[0]%360*Ba,_=e[1]%360*Ba,b=e.length>2?e[2]%360*Ba:0,i()):[v*Pa,_*Pa,b*Pa]},na.rebind(t,d,"precision"),function(){return o=e.apply(this,arguments),t.invert=o.invert&&n,i()}}function sn(e){return rn(e,function(t,n){e.point(t*Ba,n*Ba)})}function ln(e,t){return[e,t]}function un(e,t){return[e>La?e-Fa:-La>e?e+Fa:e,t]}function cn(e,t,n){return e?t||n?Mt(hn(e),pn(t,n)):hn(e):t||n?pn(t,n):un}function dn(e){return function(t,n){return t+=e,[t>La?t-Fa:-La>t?t+Fa:t,n]}}function hn(e){var t=dn(e);return t.invert=dn(-e),t}function pn(e,t){function n(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*i+s*r;return[Math.atan2(l*o-c*a,s*i-u*r),te(c*o+l*a)]}var i=Math.cos(e),r=Math.sin(e),o=Math.cos(t),a=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*o-l*a;return[Math.atan2(l*o+u*a,s*i+c*r),te(c*i-s*r)]},n}function fn(e,t){var n=Math.cos(e),i=Math.sin(e);return function(r,o,a,s){var l=a*t;null!=r?(r=mn(n,r),o=mn(n,o),(a>0?o>r:r>o)&&(r+=a*Fa)):(r=e+a*Fa,o=e-.5*l);for(var u,c=r;a>0?c>o:o>c;c-=l)s.point((u=bt([n,-i*Math.cos(c),-i*Math.sin(c)]))[0],u[1])}}function mn(e,t){var n=ft(t);n[0]-=e,_t(n);var i=ee(-n[1]);return((-n[2]<0?-i:i)+2*Math.PI-Da)%(2*Math.PI)}function gn(e,t,n){var i=na.range(e,t-Da,n).concat(t);return function(e){return i.map(function(t){return[e,t]})}}function vn(e,t,n){var i=na.range(e,t-Da,n).concat(t);return function(e){return i.map(function(t){return[t,e]})}}function yn(e){return e.source}function _n(e){return e.target}function bn(e,t,n,i){var r=Math.cos(t),o=Math.sin(t),a=Math.cos(i),s=Math.sin(i),l=r*Math.cos(e),u=r*Math.sin(e),c=a*Math.cos(n),d=a*Math.sin(n),h=2*Math.asin(Math.sqrt(oe(i-t)+r*a*oe(n-e))),p=1/Math.sin(h),f=h?function(e){var t=Math.sin(e*=h)*p,n=Math.sin(h-e)*p,i=n*l+t*c,r=n*u+t*d,a=n*o+t*s;return[Math.atan2(r,i)*Pa,Math.atan2(a,Math.sqrt(i*i+r*r))*Pa]}:function(){return[e*Pa,t*Pa]};return f.distance=h,f}function xn(){function e(e,r){var o=Math.sin(r*=Ba),a=Math.cos(r),s=fa((e*=Ba)-t),l=Math.cos(s);qs+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=i*o-n*a*l)*s),n*o+i*a*l),t=e,n=o,i=a}var t,n,i;Ws.point=function(r,o){t=r*Ba,n=Math.sin(o*=Ba),i=Math.cos(o),Ws.point=e},Ws.lineEnd=function(){Ws.point=Ws.lineEnd=x}}function wn(e,t){function n(t,n){var i=Math.cos(t),r=Math.cos(n),o=e(i*r);return[o*r*Math.sin(t),o*Math.sin(n)]}return n.invert=function(e,n){var i=Math.sqrt(e*e+n*n),r=t(i),o=Math.sin(r),a=Math.cos(r);return[Math.atan2(e*o,i*a),Math.asin(i&&n*o/i)]},n}function $n(e,t){function n(e,t){a>0?-Ra+Da>t&&(t=-Ra+Da):t>Ra-Da&&(t=Ra-Da);var n=a/Math.pow(r(t),o);return[n*Math.sin(o*e),a-n*Math.cos(o*e)]}var i=Math.cos(e),r=function(e){return Math.tan(La/4+e/2)},o=e===t?Math.sin(e):Math.log(i/Math.cos(t))/Math.log(r(t)/r(e)),a=i*Math.pow(r(e),o)/o;return o?(n.invert=function(e,t){var n=a-t,i=Q(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(a/i,1/o))-Ra]},n):Cn}function kn(e,t){function n(e,t){var n=o-t;return[n*Math.sin(r*e),o-n*Math.cos(r*e)]}var i=Math.cos(e),r=e===t?Math.sin(e):(i-Math.cos(t))/(t-e),o=i/r+e;return fa(r)<Da?ln:(n.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/r,o-Q(r)*Math.sqrt(e*e+n*n)]},n)}function Cn(e,t){return[e,Math.log(Math.tan(La/4+t/2))]}function An(e){var t,n=on(e),i=n.scale,r=n.translate,o=n.clipExtent;return n.scale=function(){var e=i.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var a=o.apply(n,arguments);if(a===n){if(t=null==e){var s=La*i(),l=r();o([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else t&&(a=null);return a},n.clipExtent(null)}function Mn(e,t){return[Math.log(Math.tan(La/4+t/2)),-e]}function Tn(e){return e[0]}function Sn(e){return e[1]}function Dn(e){for(var t=e.length,n=[0,1],i=2,r=2;t>r;r++){for(;i>1&&Z(e[n[i-2]],e[n[i-1]],e[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function En(e,t){return e[0]-t[0]||e[1]-t[1]}function Ln(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function Fn(e,t,n,i){var r=e[0],o=n[0],a=t[0]-r,s=i[0]-o,l=e[1],u=n[1],c=t[1]-l,d=i[1]-u,h=(s*(l-u)-d*(r-o))/(d*a-s*c);return[r+h*a,l+h*c]}function On(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function Rn(){ni(this),this.edge=this.site=this.circle=null}function Bn(e){var t=il.pop()||new Rn;return t.site=e,t}function Pn(e){Vn(e),el.remove(e),il.push(e),ni(e)}function In(e){var t=e.circle,n=t.x,i=t.cy,r={x:n,y:i},o=e.P,a=e.N,s=[e];Pn(e);for(var l=o;l.circle&&fa(n-l.circle.x)<Da&&fa(i-l.circle.cy)<Da;)o=l.P,s.unshift(l),Pn(l),l=o;s.unshift(l),Vn(l);for(var u=a;u.circle&&fa(n-u.circle.x)<Da&&fa(i-u.circle.cy)<Da;)a=u.N,s.push(u),Pn(u),u=a;s.push(u),Vn(u);var c,d=s.length;for(c=1;d>c;++c)u=s[c],l=s[c-1],Zn(u.edge,l.site,u.site,r);l=s[0],u=s[d-1],u.edge=Jn(l.site,u.site,null,r),Un(l),Un(u)}function Yn(e){for(var t,n,i,r,o=e.x,a=e.y,s=el._;s;)if(i=jn(s,a)-o,i>Da)s=s.L;else{if(r=o-Nn(s,a),!(r>Da)){i>-Da?(t=s.P,n=s):r>-Da?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=Bn(e);if(el.insert(t,l),t||n){if(t===n)return Vn(t),n=Bn(t.site),el.insert(l,n),l.edge=n.edge=Jn(t.site,l.site),Un(t),void Un(n);if(!n)return void(l.edge=Jn(t.site,l.site));Vn(t),Vn(n);var u=t.site,c=u.x,d=u.y,h=e.x-c,p=e.y-d,f=n.site,m=f.x-c,g=f.y-d,v=2*(h*g-p*m),y=h*h+p*p,_=m*m+g*g,b={x:(g*y-p*_)/v+c,y:(h*_-m*y)/v+d};Zn(n.edge,u,f,b),l.edge=Jn(u,e,null,b),n.edge=Jn(e,f,null,b),Un(t),Un(n)}}function jn(e,t){var n=e.site,i=n.x,r=n.y,o=r-t;if(!o)return i;var a=e.P;if(!a)return-1/0;n=a.site;var s=n.x,l=n.y,u=l-t;if(!u)return s;var c=s-i,d=1/o-1/u,h=c/u;return d?(-h+Math.sqrt(h*h-2*d*(c*c/(-2*u)-l+u/2+r-o/2)))/d+i:(i+s)/2}function Nn(e,t){var n=e.N;if(n)return jn(n,t);var i=e.site;return i.y===t?i.x:1/0}function Hn(e){this.site=e,this.edges=[]}function zn(e){for(var t,n,i,r,o,a,s,l,u,c,d=e[0][0],h=e[1][0],p=e[0][1],f=e[1][1],m=Zs,g=m.length;g--;)if(o=m[g],o&&o.prepare())for(s=o.edges,l=s.length,a=0;l>a;)c=s[a].end(),i=c.x,r=c.y,u=s[++a%l].start(),t=u.x,n=u.y,(fa(i-t)>Da||fa(r-n)>Da)&&(s.splice(a,0,new ei(Qn(o.site,c,fa(i-d)<Da&&f-r>Da?{x:d,y:fa(t-d)<Da?n:f}:fa(r-f)<Da&&h-i>Da?{x:fa(n-f)<Da?t:h,y:f}:fa(i-h)<Da&&r-p>Da?{x:h,y:fa(t-h)<Da?n:p}:fa(r-p)<Da&&i-d>Da?{x:fa(n-p)<Da?t:d,y:p}:null),o.site,null)),++l)}function qn(e,t){return t.angle-e.angle}function Wn(){ni(this),this.x=this.y=this.arc=this.site=this.cy=null}function Un(e){var t=e.P,n=e.N;if(t&&n){var i=t.site,r=e.site,o=n.site;if(i!==o){var a=r.x,s=r.y,l=i.x-a,u=i.y-s,c=o.x-a,d=o.y-s,h=2*(l*d-u*c);if(!(h>=-Ea)){var p=l*l+u*u,f=c*c+d*d,m=(d*p-u*f)/h,g=(l*f-c*p)/h,d=g+s,v=rl.pop()||new Wn;v.arc=e,v.site=r,v.x=m+a,v.y=d+Math.sqrt(m*m+g*g),v.cy=d,e.circle=v;for(var y=null,_=nl._;_;)if(v.y<_.y||v.y===_.y&&v.x<=_.x){if(!_.L){y=_.P;break}_=_.L}else{if(!_.R){y=_;break}_=_.R}nl.insert(y,v),y||(tl=v)}}}}function Vn(e){var t=e.circle;t&&(t.P||(tl=t.N),nl.remove(t),rl.push(t),ni(t),e.circle=null)}function Xn(e){for(var t,n=Qs,i=Nt(e[0][0],e[0][1],e[1][0],e[1][1]),r=n.length;r--;)t=n[r],(!Gn(t,e)||!i(t)||fa(t.a.x-t.b.x)<Da&&fa(t.a.y-t.b.y)<Da)&&(t.a=t.b=null,n.splice(r,1))}function Gn(e,t){var n=e.b;if(n)return!0;var i,r,o=e.a,a=t[0][0],s=t[1][0],l=t[0][1],u=t[1][1],c=e.l,d=e.r,h=c.x,p=c.y,f=d.x,m=d.y,g=(h+f)/2,v=(p+m)/2;if(m===p){if(a>g||g>=s)return;if(h>f){if(o){if(o.y>=u)return}else o={x:g,y:l};n={x:g,y:u}}else{if(o){if(o.y<l)return}else o={x:g,y:u};n={x:g,y:l}}}else if(i=(h-f)/(m-p),r=v-i*g,-1>i||i>1)if(h>f){if(o){if(o.y>=u)return}else o={x:(l-r)/i,y:l};n={x:(u-r)/i,y:u}}else{if(o){if(o.y<l)return}else o={x:(u-r)/i,y:u};n={x:(l-r)/i,y:l}}else if(m>p){if(o){if(o.x>=s)return}else o={x:a,y:i*a+r};n={x:s,y:i*s+r}}else{if(o){if(o.x<a)return}else o={x:s,y:i*s+r};n={x:a,y:i*a+r}}return e.a=o,e.b=n,!0}function Kn(e,t){this.l=e,this.r=t,this.a=this.b=null}function Jn(e,t,n,i){var r=new Kn(e,t);return Qs.push(r),n&&Zn(r,e,t,n),i&&Zn(r,t,e,i),Zs[e.i].edges.push(new ei(r,e,t)),Zs[t.i].edges.push(new ei(r,t,e)),r}function Qn(e,t,n){var i=new Kn(e,null);return i.a=t,i.b=n,Qs.push(i),i}function Zn(e,t,n,i){e.a||e.b?e.l===n?e.b=i:e.a=i:(e.a=i,e.l=t,e.r=n)}function ei(e,t,n){var i=e.a,r=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(r.x-i.x,i.y-r.y):Math.atan2(i.x-r.x,r.y-i.y)}function ti(){this._=null}function ni(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function ii(e,t){var n=t,i=t.R,r=n.U;r?r.L===n?r.L=i:r.R=i:e._=i,i.U=r,n.U=i,n.R=i.L,n.R&&(n.R.U=n),i.L=n}function ri(e,t){var n=t,i=t.L,r=n.U;r?r.L===n?r.L=i:r.R=i:e._=i,i.U=r,n.U=i,n.L=i.R,n.L&&(n.L.U=n),i.R=n}function oi(e){for(;e.L;)e=e.L;return e}function ai(e,t){var n,i,r,o=e.sort(si).pop();for(Qs=[],Zs=new Array(e.length),el=new ti,nl=new ti;;)if(r=tl,o&&(!r||o.y<r.y||o.y===r.y&&o.x<r.x))(o.x!==n||o.y!==i)&&(Zs[o.i]=new Hn(o),Yn(o),n=o.x,i=o.y),o=e.pop();else{if(!r)break;In(r.arc)}t&&(Xn(t),zn(t));var a={cells:Zs,edges:Qs};return el=nl=Qs=Zs=null,a}function si(e,t){return t.y-e.y||t.x-e.x}function li(e,t,n){return(e.x-n.x)*(t.y-e.y)-(e.x-t.x)*(n.y-e.y)}function ui(e){return e.x}function ci(e){return e.y}function di(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function hi(e,t,n,i,r,o){if(!e(t,n,i,r,o)){var a=.5*(n+r),s=.5*(i+o),l=t.nodes;l[0]&&hi(e,l[0],n,i,a,s),l[1]&&hi(e,l[1],a,i,r,s),l[2]&&hi(e,l[2],n,s,a,o),l[3]&&hi(e,l[3],a,s,r,o)}}function pi(e,t,n,i,r,o,a){var s,l=1/0;return function u(e,c,d,h,p){if(!(c>o||d>a||i>h||r>p)){if(f=e.point){var f,m=t-e.x,g=n-e.y,v=m*m+g*g;if(l>v){var y=Math.sqrt(l=v);i=t-y,r=n-y,o=t+y,a=n+y,s=f}}for(var _=e.nodes,b=.5*(c+h),x=.5*(d+p),w=t>=b,$=n>=x,k=$<<1|w,C=k+4;C>k;++k)if(e=_[3&k])switch(3&k){case 0:u(e,c,d,b,x);break;case 1:u(e,b,d,h,x);break;case 2:u(e,c,x,b,p);break;case 3:u(e,b,x,h,p)}}}(e,i,r,o,a),s}function fi(e,t){e=na.rgb(e),t=na.rgb(t);var n=e.r,i=e.g,r=e.b,o=t.r-n,a=t.g-i,s=t.b-r;return function(e){return"#"+be(Math.round(n+o*e))+be(Math.round(i+a*e))+be(Math.round(r+s*e))}}function mi(e,t){var n,i={},r={};for(n in e)n in t?i[n]=yi(e[n],t[n]):r[n]=e[n];for(n in t)n in e||(r[n]=t[n]);return function(e){for(n in i)r[n]=i[n](e);return r}}function gi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function vi(e,t){var n,i,r,o=al.lastIndex=sl.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=al.exec(e))&&(i=sl.exec(t));)(r=i.index)>o&&(r=t.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:gi(n,i)})),o=sl.lastIndex;return o<t.length&&(r=t.slice(o),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?(t=l[0].x,function(e){return t(e)+""}):function(){return t}:(t=l.length,function(e){for(var n,i=0;t>i;++i)s[(n=l[i]).i]=n.x(e);return s.join("")})}function yi(e,t){for(var n,i=na.interpolators.length;--i>=0&&!(n=na.interpolators[i](e,t)););return n}function _i(e,t){var n,i=[],r=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;s>n;++n)i.push(yi(e[n],t[n]));for(;o>n;++n)r[n]=e[n];for(;a>n;++n)r[n]=t[n];return function(e){for(n=0;s>n;++n)r[n]=i[n](e);return r}}function bi(e){return function(t){return 0>=t?0:t>=1?1:e(t)}}function xi(e){return function(t){return 1-e(1-t)}}function wi(e){return function(t){return.5*(.5>t?e(2*t):2-e(2-2*t))}}function $i(e){return e*e}function ki(e){return e*e*e}function Ci(e){if(0>=e)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(.5>e?n:3*(e-t)+n-.75)}function Ai(e){return function(t){return Math.pow(t,e)}}function Mi(e){return 1-Math.cos(e*Ra)}function Ti(e){return Math.pow(2,10*(e-1))}function Si(e){return 1-Math.sqrt(1-e*e)}function Di(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Fa*Math.asin(1/e):(e=1,n=t/4),function(i){return 1+e*Math.pow(2,-10*i)*Math.sin((i-n)*Fa/t)}}function Ei(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function Li(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Fi(e,t){e=na.hcl(e),t=na.hcl(t);var n=e.h,i=e.c,r=e.l,o=t.h-n,a=t.c-i,s=t.l-r;return isNaN(a)&&(a=0,i=isNaN(i)?t.c:i),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:-180>o&&(o+=360),function(e){return ce(n+o*e,i+a*e,r+s*e)+""}}function Oi(e,t){e=na.hsl(e),t=na.hsl(t);var n=e.h,i=e.s,r=e.l,o=t.h-n,a=t.s-i,s=t.l-r;return isNaN(a)&&(a=0,i=isNaN(i)?t.s:i),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:-180>o&&(o+=360),function(e){return le(n+o*e,i+a*e,r+s*e)+""}}function Ri(e,t){e=na.lab(e),t=na.lab(t);var n=e.l,i=e.a,r=e.b,o=t.l-n,a=t.a-i,s=t.b-r;return function(e){return he(n+o*e,i+a*e,r+s*e)+""}}function Bi(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Pi(e){var t=[e.a,e.b],n=[e.c,e.d],i=Yi(t),r=Ii(t,n),o=Yi(ji(n,t,-r))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,i*=-1,r*=-1),this.rotate=(i?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*Pa,this.translate=[e.e,e.f],this.scale=[i,o],this.skew=o?Math.atan2(r,o)*Pa:0}function Ii(e,t){return e[0]*t[0]+e[1]*t[1]}function Yi(e){var t=Math.sqrt(Ii(e,e));return t&&(e[0]/=t,e[1]/=t),t}function ji(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function Ni(e,t){var n,i=[],r=[],o=na.transform(e),a=na.transform(t),s=o.translate,l=a.translate,u=o.rotate,c=a.rotate,d=o.skew,h=a.skew,p=o.scale,f=a.scale;return s[0]!=l[0]||s[1]!=l[1]?(i.push("translate(",null,",",null,")"),r.push({i:1,x:gi(s[0],l[0])},{i:3,x:gi(s[1],l[1])})):i.push(l[0]||l[1]?"translate("+l+")":""),u!=c?(u-c>180?c+=360:c-u>180&&(u+=360),r.push({i:i.push(i.pop()+"rotate(",null,")")-2,x:gi(u,c)})):c&&i.push(i.pop()+"rotate("+c+")"),d!=h?r.push({i:i.push(i.pop()+"skewX(",null,")")-2,x:gi(d,h)}):h&&i.push(i.pop()+"skewX("+h+")"),p[0]!=f[0]||p[1]!=f[1]?(n=i.push(i.pop()+"scale(",null,",",null,")"),r.push({i:n-4,x:gi(p[0],f[0])},{i:n-2,x:gi(p[1],f[1])})):(1!=f[0]||1!=f[1])&&i.push(i.pop()+"scale("+f+")"),n=r.length,function(e){for(var t,o=-1;++o<n;)i[(t=r[o]).i]=t.x(e);return i.join("")}}function Hi(e,t){return t=(t-=e=+e)||1/t,function(n){return(n-e)/t}}function zi(e,t){return t=(t-=e=+e)||1/t,function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function qi(e){for(var t=e.source,n=e.target,i=Ui(t,n),r=[t];t!==i;)t=t.parent,r.push(t);for(var o=r.length;n!==i;)r.splice(o,0,n),n=n.parent;return r}function Wi(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function Ui(e,t){if(e===t)return e;for(var n=Wi(e),i=Wi(t),r=n.pop(),o=i.pop(),a=null;r===o;)a=r,r=n.pop(),o=i.pop();return a}function Vi(e){e.fixed|=2}function Xi(e){e.fixed&=-7}function Gi(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Ki(e){e.fixed&=-5}function Ji(e,t,n){var i=0,r=0;if(e.charge=0,!e.leaf)for(var o,a=e.nodes,s=a.length,l=-1;++l<s;)o=a[l],null!=o&&(Ji(o,t,n),e.charge+=o.charge,i+=o.charge*o.cx,r+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var u=t*n[e.point.index];e.charge+=e.pointCharge=u,i+=u*e.point.x,r+=u*e.point.y}e.cx=i/e.charge,e.cy=r/e.charge}function Qi(e,t){return na.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=rr,e}function Zi(e,t){for(var n=[e];null!=(e=n.pop());)if(t(e),(r=e.children)&&(i=r.length))for(var i,r;--i>=0;)n.push(r[i])}function er(e,t){for(var n=[e],i=[];null!=(e=n.pop());)if(i.push(e),(o=e.children)&&(r=o.length))for(var r,o,a=-1;++a<r;)n.push(o[a]);for(;null!=(e=i.pop());)t(e)}function tr(e){return e.children}function nr(e){return e.value}function ir(e,t){return t.value-e.value}function rr(e){return na.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function or(e){return e.x}function ar(e){return e.y}function sr(e,t,n){e.y0=t,e.y=n}function lr(e){return na.range(e.length)}function ur(e){for(var t=-1,n=e[0].length,i=[];++t<n;)i[t]=0;return i}function cr(e){for(var t,n=1,i=0,r=e[0][1],o=e.length;o>n;++n)(t=e[n][1])>r&&(i=n,r=t);return i}function dr(e){return e.reduce(hr,0)}function hr(e,t){return e+t[1]}function pr(e,t){return fr(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function fr(e,t){for(var n=-1,i=+e[0],r=(e[1]-i)/t,o=[];++n<=t;)o[n]=r*n+i;return o}function mr(e){return[na.min(e),na.max(e)]}function gr(e,t){return e.value-t.value}function vr(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function yr(e,t){e._pack_next=t,t._pack_prev=e}function _r(e,t){var n=t.x-e.x,i=t.y-e.y,r=e.r+t.r;return.999*r*r>n*n+i*i}function br(e){function t(e){c=Math.min(e.x-e.r,c),d=Math.max(e.x+e.r,d),h=Math.min(e.y-e.r,h),p=Math.max(e.y+e.r,p)}if((n=e.children)&&(u=n.length)){var n,i,r,o,a,s,l,u,c=1/0,d=-1/0,h=1/0,p=-1/0;if(n.forEach(xr),i=n[0],i.x=-i.r,i.y=0,t(i),u>1&&(r=n[1],r.x=r.r,r.y=0,t(r),u>2))for(o=n[2],kr(i,r,o),t(o),vr(i,o),i._pack_prev=o,vr(o,r),r=i._pack_next,a=3;u>a;a++){kr(i,r,o=n[a]);var f=0,m=1,g=1;for(s=r._pack_next;s!==r;s=s._pack_next,m++)if(_r(s,o)){f=1;break}if(1==f)for(l=i._pack_prev;l!==s._pack_prev&&!_r(l,o);l=l._pack_prev,g++);f?(g>m||m==g&&r.r<i.r?yr(i,r=s):yr(i=l,r),a--):(vr(i,o),r=o,t(o))}var v=(c+d)/2,y=(h+p)/2,_=0;for(a=0;u>a;a++)o=n[a],o.x-=v,o.y-=y,_=Math.max(_,o.r+Math.sqrt(o.x*o.x+o.y*o.y));e.r=_,n.forEach(wr)}}function xr(e){e._pack_next=e._pack_prev=e}function wr(e){delete e._pack_next,delete e._pack_prev}function $r(e,t,n,i){var r=e.children;if(e.x=t+=i*e.x,e.y=n+=i*e.y,e.r*=i,r)for(var o=-1,a=r.length;++o<a;)$r(r[o],t,n,i)}function kr(e,t,n){var i=e.r+n.r,r=t.x-e.x,o=t.y-e.y;if(i&&(r||o)){var a=t.r+n.r,s=r*r+o*o;a*=a,i*=i;var l=.5+(i-a)/(2*s),u=Math.sqrt(Math.max(0,2*a*(i+s)-(i-=s)*i-a*a))/(2*s);n.x=e.x+l*r+u*o,n.y=e.y+l*o-u*r}else n.x=e.x+i,n.y=e.y}function Cr(e,t){return e.parent==t.parent?1:2}function Ar(e){
|
141
|
+
var t=e.children;return t.length?t[0]:e.t}function Mr(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function Tr(e,t,n){var i=n/(t.i-e.i);t.c-=i,t.s+=n,e.c+=i,t.z+=n,t.m+=n}function Sr(e){for(var t,n=0,i=0,r=e.children,o=r.length;--o>=0;)t=r[o],t.z+=n,t.m+=n,n+=t.s+(i+=t.c)}function Dr(e,t,n){return e.a.parent===t.parent?e.a:n}function Er(e){return 1+na.max(e,function(e){return e.y})}function Lr(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Fr(e){var t=e.children;return t&&t.length?Fr(t[0]):e}function Or(e){var t,n=e.children;return n&&(t=n.length)?Or(n[t-1]):e}function Rr(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Br(e,t){var n=e.x+t[3],i=e.y+t[0],r=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return 0>r&&(n+=r/2,r=0),0>o&&(i+=o/2,o=0),{x:n,y:i,dx:r,dy:o}}function Pr(e){var t=e[0],n=e[e.length-1];return n>t?[t,n]:[n,t]}function Ir(e){return e.rangeExtent?e.rangeExtent():Pr(e.range())}function Yr(e,t,n,i){var r=n(e[0],e[1]),o=i(t[0],t[1]);return function(e){return o(r(e))}}function jr(e,t){var n,i=0,r=e.length-1,o=e[i],a=e[r];return o>a&&(n=i,i=r,r=n,n=o,o=a,a=n),e[i]=t.floor(o),e[r]=t.ceil(a),e}function Nr(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:yl}function Hr(e,t,n,i){var r=[],o=[],a=0,s=Math.min(e.length,t.length)-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<=s;)r.push(n(e[a-1],e[a])),o.push(i(t[a-1],t[a]));return function(t){var n=na.bisect(e,t,1,s)-1;return o[n](r[n](t))}}function zr(e,t,n,i){function r(){var r=Math.min(e.length,t.length)>2?Hr:Yr,l=i?zi:Hi;return a=r(e,t,l,n),s=r(t,e,l,yi),o}function o(e){return a(e)}var a,s;return o.invert=function(e){return s(e)},o.domain=function(t){return arguments.length?(e=t.map(Number),r()):e},o.range=function(e){return arguments.length?(t=e,r()):t},o.rangeRound=function(e){return o.range(e).interpolate(Bi)},o.clamp=function(e){return arguments.length?(i=e,r()):i},o.interpolate=function(e){return arguments.length?(n=e,r()):n},o.ticks=function(t){return Vr(e,t)},o.tickFormat=function(t,n){return Xr(e,t,n)},o.nice=function(t){return Wr(e,t),r()},o.copy=function(){return zr(e,t,n,i)},r()}function qr(e,t){return na.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Wr(e,t){return jr(e,Nr(Ur(e,t)[2]))}function Ur(e,t){null==t&&(t=10);var n=Pr(e),i=n[1]-n[0],r=Math.pow(10,Math.floor(Math.log(i/t)/Math.LN10)),o=t/i*r;return.15>=o?r*=10:.35>=o?r*=5:.75>=o&&(r*=2),n[0]=Math.ceil(n[0]/r)*r,n[1]=Math.floor(n[1]/r)*r+.5*r,n[2]=r,n}function Vr(e,t){return na.range.apply(na,Ur(e,t))}function Xr(e,t,n){var i=Ur(e,t);if(n){var r=as.exec(n);if(r.shift(),"s"===r[8]){var o=na.formatPrefix(Math.max(fa(i[0]),fa(i[1])));return r[7]||(r[7]="."+Gr(o.scale(i[2]))),r[8]="f",n=na.format(r.join("")),function(e){return n(o.scale(e))+o.symbol}}r[7]||(r[7]="."+Kr(r[8],i)),n=r.join("")}else n=",."+Gr(i[2])+"f";return na.format(n)}function Gr(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function Kr(e,t){var n=Gr(t[2]);return e in _l?Math.abs(n-Gr(Math.max(fa(t[0]),fa(t[1]))))+ +("e"!==e):n-2*("%"===e)}function Jr(e,t,n,i){function r(e){return(n?Math.log(0>e?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(r(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((i=t.map(Number)).map(r)),a):i},a.base=function(n){return arguments.length?(t=+n,e.domain(i.map(r)),a):t},a.nice=function(){var t=jr(i.map(r),n?Math:xl);return e.domain(t),i=t.map(o),a},a.ticks=function(){var e=Pr(i),a=[],s=e[0],l=e[1],u=Math.floor(r(s)),c=Math.ceil(r(l)),d=t%1?2:t;if(isFinite(c-u)){if(n){for(;c>u;u++)for(var h=1;d>h;h++)a.push(o(u)*h);a.push(o(u))}else for(a.push(o(u));u++<c;)for(var h=d-1;h>0;h--)a.push(o(u)*h);for(u=0;a[u]<s;u++);for(c=a.length;a[c-1]>l;c--);a=a.slice(u,c)}return a},a.tickFormat=function(e,t){if(!arguments.length)return bl;arguments.length<2?t=bl:"function"!=typeof t&&(t=na.format(t));var i,s=Math.max(.1,e/a.ticks().length),l=n?(i=1e-12,Math.ceil):(i=-1e-12,Math.floor);return function(e){return e/o(l(r(e)+i))<=s?t(e):""}},a.copy=function(){return Jr(e.copy(),t,n,i)},qr(a,e)}function Qr(e,t,n){function i(t){return e(r(t))}var r=Zr(t),o=Zr(1/t);return i.invert=function(t){return o(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(r)),i):n},i.ticks=function(e){return Vr(n,e)},i.tickFormat=function(e,t){return Xr(n,e,t)},i.nice=function(e){return i.domain(Wr(n,e))},i.exponent=function(a){return arguments.length?(r=Zr(t=a),o=Zr(1/t),e.domain(n.map(r)),i):t},i.copy=function(){return Qr(e.copy(),t,n)},qr(i,e)}function Zr(e){return function(t){return 0>t?-Math.pow(-t,e):Math.pow(t,e)}}function eo(e,t){function n(n){return o[((r.get(n)||("range"===t.t?r.set(n,e.push(n)):NaN))-1)%o.length]}function i(t,n){return na.range(e.length).map(function(e){return t+n*e})}var r,o,a;return n.domain=function(i){if(!arguments.length)return e;e=[],r=new u;for(var o,a=-1,s=i.length;++a<s;)r.has(o=i[a])||r.set(o,e.push(o));return n[t.t].apply(n,t.a)},n.range=function(e){return arguments.length?(o=e,a=0,t={t:"range",a:arguments},n):o},n.rangePoints=function(r,s){arguments.length<2&&(s=0);var l=r[0],u=r[1],c=e.length<2?(l=(l+u)/2,0):(u-l)/(e.length-1+s);return o=i(l+c*s/2,c),a=0,t={t:"rangePoints",a:arguments},n},n.rangeRoundPoints=function(r,s){arguments.length<2&&(s=0);var l=r[0],u=r[1],c=e.length<2?(l=u=Math.round((l+u)/2),0):(u-l)/(e.length-1+s)|0;return o=i(l+Math.round(c*s/2+(u-l-(e.length-1+s)*c)/2),c),a=0,t={t:"rangeRoundPoints",a:arguments},n},n.rangeBands=function(r,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var u=r[1]<r[0],c=r[u-0],d=r[1-u],h=(d-c)/(e.length-s+2*l);return o=i(c+h*l,h),u&&o.reverse(),a=h*(1-s),t={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(r,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var u=r[1]<r[0],c=r[u-0],d=r[1-u],h=Math.floor((d-c)/(e.length-s+2*l));return o=i(c+Math.round((d-c-(e.length-s)*h)/2),h),u&&o.reverse(),a=Math.round(h*(1-s)),t={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return a},n.rangeExtent=function(){return Pr(t.a[0])},n.copy=function(){return eo(e,t)},n.domain(e)}function to(e,t){function o(){var n=0,i=t.length;for(s=[];++n<i;)s[n-1]=na.quantile(e,n/i);return a}function a(e){return isNaN(e=+e)?void 0:t[na.bisect(s,e)]}var s;return a.domain=function(t){return arguments.length?(e=t.map(i).filter(r).sort(n),o()):e},a.range=function(e){return arguments.length?(t=e,o()):t},a.quantiles=function(){return s},a.invertExtent=function(n){return n=t.indexOf(n),0>n?[NaN,NaN]:[n>0?s[n-1]:e[0],n<s.length?s[n]:e[e.length-1]]},a.copy=function(){return to(e,t)},o()}function no(e,t,n){function i(t){return n[Math.max(0,Math.min(a,Math.floor(o*(t-e))))]}function r(){return o=n.length/(t-e),a=n.length-1,i}var o,a;return i.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],r()):[e,t]},i.range=function(e){return arguments.length?(n=e,r()):n},i.invertExtent=function(t){return t=n.indexOf(t),t=0>t?NaN:t/o+e,[t,t+1/o]},i.copy=function(){return no(e,t,n)},r()}function io(e,t){function n(n){return n>=n?t[na.bisect(e,n)]:void 0}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.invertExtent=function(n){return n=t.indexOf(n),[e[n-1],e[n]]},n.copy=function(){return io(e,t)},n}function ro(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return Vr(e,t)},t.tickFormat=function(t,n){return Xr(e,t,n)},t.copy=function(){return ro(e)},t}function oo(){return 0}function ao(e){return e.innerRadius}function so(e){return e.outerRadius}function lo(e){return e.startAngle}function uo(e){return e.endAngle}function co(e){return e&&e.padAngle}function ho(e,t,n,i){return(e-n)*t-(t-i)*e>0?0:1}function po(e,t,n,i,r){var o=e[0]-t[0],a=e[1]-t[1],s=(r?i:-i)/Math.sqrt(o*o+a*a),l=s*a,u=-s*o,c=e[0]+l,d=e[1]+u,h=t[0]+l,p=t[1]+u,f=(c+h)/2,m=(d+p)/2,g=h-c,v=p-d,y=g*g+v*v,_=n-i,b=c*p-h*d,x=(0>v?-1:1)*Math.sqrt(_*_*y-b*b),w=(b*v-g*x)/y,$=(-b*g-v*x)/y,k=(b*v+g*x)/y,C=(-b*g+v*x)/y,A=w-f,M=$-m,T=k-f,S=C-m;return A*A+M*M>T*T+S*S&&(w=k,$=C),[[w-l,$-u],[w*n/_,$*n/_]]}function fo(e){function t(t){function a(){u.push("M",o(e(c),s))}for(var l,u=[],c=[],d=-1,h=t.length,p=Ae(n),f=Ae(i);++d<h;)r.call(this,l=t[d],d)?c.push([+p.call(this,l,d),+f.call(this,l,d)]):c.length&&(a(),c=[]);return c.length&&a(),u.length?u.join(""):null}var n=Tn,i=Sn,r=Tt,o=mo,a=o.key,s=.7;return t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(i=e,t):i},t.defined=function(e){return arguments.length?(r=e,t):r},t.interpolate=function(e){return arguments.length?(a="function"==typeof e?o=e:(o=Ml.get(e)||mo).key,t):a},t.tension=function(e){return arguments.length?(s=e,t):s},t}function mo(e){return e.join("L")}function go(e){return mo(e)+"Z"}function vo(e){for(var t=0,n=e.length,i=e[0],r=[i[0],",",i[1]];++t<n;)r.push("H",(i[0]+(i=e[t])[0])/2,"V",i[1]);return n>1&&r.push("H",i[0]),r.join("")}function yo(e){for(var t=0,n=e.length,i=e[0],r=[i[0],",",i[1]];++t<n;)r.push("V",(i=e[t])[1],"H",i[0]);return r.join("")}function _o(e){for(var t=0,n=e.length,i=e[0],r=[i[0],",",i[1]];++t<n;)r.push("H",(i=e[t])[0],"V",i[1]);return r.join("")}function bo(e,t){return e.length<4?mo(e):e[1]+$o(e.slice(1,-1),ko(e,t))}function xo(e,t){return e.length<3?mo(e):e[0]+$o((e.push(e[0]),e),ko([e[e.length-2]].concat(e,[e[1]]),t))}function wo(e,t){return e.length<3?mo(e):e[0]+$o(e,ko(e,t))}function $o(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return mo(e);var n=e.length!=t.length,i="",r=e[0],o=e[1],a=t[0],s=a,l=1;if(n&&(i+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],r=e[1],l=2),t.length>1){s=t[1],o=e[l],l++,i+="C"+(r[0]+a[0])+","+(r[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var u=2;u<t.length;u++,l++)o=e[l],s=t[u],i+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=e[l];i+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return i}function ko(e,t){for(var n,i=[],r=(1-t)/2,o=e[0],a=e[1],s=1,l=e.length;++s<l;)n=o,o=a,a=e[s],i.push([r*(a[0]-n[0]),r*(a[1]-n[1])]);return i}function Co(e){if(e.length<3)return mo(e);var t=1,n=e.length,i=e[0],r=i[0],o=i[1],a=[r,r,r,(i=e[1])[0]],s=[o,o,o,i[1]],l=[r,",",o,"L",So(Dl,a),",",So(Dl,s)];for(e.push(e[n-1]);++t<=n;)i=e[t],a.shift(),a.push(i[0]),s.shift(),s.push(i[1]),Do(l,a,s);return e.pop(),l.push("L",i),l.join("")}function Ao(e){if(e.length<4)return mo(e);for(var t,n=[],i=-1,r=e.length,o=[0],a=[0];++i<3;)t=e[i],o.push(t[0]),a.push(t[1]);for(n.push(So(Dl,o)+","+So(Dl,a)),--i;++i<r;)t=e[i],o.shift(),o.push(t[0]),a.shift(),a.push(t[1]),Do(n,o,a);return n.join("")}function Mo(e){for(var t,n,i=-1,r=e.length,o=r+4,a=[],s=[];++i<4;)n=e[i%r],a.push(n[0]),s.push(n[1]);for(t=[So(Dl,a),",",So(Dl,s)],--i;++i<o;)n=e[i%r],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),Do(t,a,s);return t.join("")}function To(e,t){var n=e.length-1;if(n)for(var i,r,o=e[0][0],a=e[0][1],s=e[n][0]-o,l=e[n][1]-a,u=-1;++u<=n;)i=e[u],r=u/n,i[0]=t*i[0]+(1-t)*(o+r*s),i[1]=t*i[1]+(1-t)*(a+r*l);return Co(e)}function So(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Do(e,t,n){e.push("C",So(Tl,t),",",So(Tl,n),",",So(Sl,t),",",So(Sl,n),",",So(Dl,t),",",So(Dl,n))}function Eo(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Lo(e){for(var t=0,n=e.length-1,i=[],r=e[0],o=e[1],a=i[0]=Eo(r,o);++t<n;)i[t]=(a+(a=Eo(r=o,o=e[t+1])))/2;return i[t]=a,i}function Fo(e){for(var t,n,i,r,o=[],a=Lo(e),s=-1,l=e.length-1;++s<l;)t=Eo(e[s],e[s+1]),fa(t)<Da?a[s]=a[s+1]=0:(n=a[s]/t,i=a[s+1]/t,r=n*n+i*i,r>9&&(r=3*t/Math.sqrt(r),a[s]=r*n,a[s+1]=r*i));for(s=-1;++s<=l;)r=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([r||0,a[s]*r||0]);return o}function Oo(e){return e.length<3?mo(e):e[0]+$o(e,Fo(e))}function Ro(e){for(var t,n,i,r=-1,o=e.length;++r<o;)t=e[r],n=t[0],i=t[1]-Ra,t[0]=n*Math.cos(i),t[1]=n*Math.sin(i);return e}function Bo(e){function t(t){function l(){m.push("M",s(e(v),d),c,u(e(g.reverse()),d),"Z")}for(var h,p,f,m=[],g=[],v=[],y=-1,_=t.length,b=Ae(n),x=Ae(r),w=n===i?function(){return p}:Ae(i),$=r===o?function(){return f}:Ae(o);++y<_;)a.call(this,h=t[y],y)?(g.push([p=+b.call(this,h,y),f=+x.call(this,h,y)]),v.push([+w.call(this,h,y),+$.call(this,h,y)])):g.length&&(l(),g=[],v=[]);return g.length&&l(),m.length?m.join(""):null}var n=Tn,i=Tn,r=0,o=Sn,a=Tt,s=mo,l=s.key,u=s,c="L",d=.7;return t.x=function(e){return arguments.length?(n=i=e,t):i},t.x0=function(e){return arguments.length?(n=e,t):n},t.x1=function(e){return arguments.length?(i=e,t):i},t.y=function(e){return arguments.length?(r=o=e,t):o},t.y0=function(e){return arguments.length?(r=e,t):r},t.y1=function(e){return arguments.length?(o=e,t):o},t.defined=function(e){return arguments.length?(a=e,t):a},t.interpolate=function(e){return arguments.length?(l="function"==typeof e?s=e:(s=Ml.get(e)||mo).key,u=s.reverse||s,c=s.closed?"M":"L",t):l},t.tension=function(e){return arguments.length?(d=e,t):d},t}function Po(e){return e.radius}function Io(e){return[e.x,e.y]}function Yo(e){return function(){var t=e.apply(this,arguments),n=t[0],i=t[1]-Ra;return[n*Math.cos(i),n*Math.sin(i)]}}function jo(){return 64}function No(){return"circle"}function Ho(e){var t=Math.sqrt(e/La);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function zo(e){return function(){var t,n;(t=this[e])&&(n=t[t.active])&&(--t.count?delete t[t.active]:delete this[e],t.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function qo(e,t,n){return _a(e,Pl),e.namespace=t,e.id=n,e}function Wo(e,t,n,i){var r=e.id,o=e.namespace;return z(e,"function"==typeof n?function(e,a,s){e[o][r].tween.set(t,i(n.call(e,e.__data__,a,s)))}:(n=i(n),function(e){e[o][r].tween.set(t,n)}))}function Uo(e){return null==e&&(e=""),function(){this.textContent=e}}function Vo(e){return null==e?"__transition__":"__transition_"+e+"__"}function Xo(e,t,n,i,r){var o=e[n]||(e[n]={active:0,count:0}),a=o[i];if(!a){var s=r.time;a=o[i]={tween:new u,time:s,delay:r.delay,duration:r.duration,ease:r.ease,index:t},r=null,++o.count,na.timer(function(r){function l(n){if(o.active>i)return c();var r=o[o.active];r&&(--o.count,delete o[o.active],r.event&&r.event.interrupt.call(e,e.__data__,r.index)),o.active=i,a.event&&a.event.start.call(e,e.__data__,t),a.tween.forEach(function(n,i){(i=i.call(e,e.__data__,t))&&m.push(i)}),h=a.ease,d=a.duration,na.timer(function(){return f.c=u(n||1)?Tt:u,1},0,s)}function u(n){if(o.active!==i)return 1;for(var r=n/d,s=h(r),l=m.length;l>0;)m[--l].call(e,s);return r>=1?(a.event&&a.event.end.call(e,e.__data__,t),c()):void 0}function c(){return--o.count?delete o[i]:delete e[n],1}var d,h,p=a.delay,f=is,m=[];return f.t=p+s,r>=p?l(r-p):void(f.c=l)},0,s)}}function Go(e,t,n){e.attr("transform",function(e){var i=t(e);return"translate("+(isFinite(i)?i:n(e))+",0)"})}function Ko(e,t,n){e.attr("transform",function(e){var i=t(e);return"translate(0,"+(isFinite(i)?i:n(e))+")"})}function Jo(e){return e.toISOString()}function Qo(e,t,n){function i(t){return e(t)}function r(e,n){var i=e[1]-e[0],r=i/n,o=na.bisect(Ul,r);return o==Ul.length?[t.year,Ur(e.map(function(e){return e/31536e6}),n)[2]]:o?t[r/Ul[o-1]<Ul[o]/r?o-1:o]:[Gl,Ur(e,n)[2]]}return i.invert=function(t){return Zo(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain().map(Zo)},i.nice=function(e,t){function n(n){return!isNaN(n)&&!e.range(n,Zo(+n+1),t).length}var o=i.domain(),a=Pr(o),s=null==e?r(a,10):"number"==typeof e&&r(a,e);return s&&(e=s[0],t=s[1]),i.domain(jr(o,t>1?{floor:function(t){for(;n(t=e.floor(t));)t=Zo(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=Zo(+t+1);return t}}:e))},i.ticks=function(e,t){var n=Pr(i.domain()),o=null==e?r(n,10):"number"==typeof e?r(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],Zo(+n[1]+1),1>t?1:t)},i.tickFormat=function(){return n},i.copy=function(){return Qo(e.copy(),t,n)},qr(i,e)}function Zo(e){return new Date(e)}function ea(e){return JSON.parse(e.responseText)}function ta(e){var t=oa.createRange();return t.selectNode(oa.body),t.createContextualFragment(e.responseText)}var na={version:"3.5.5"},ia=[].slice,ra=function(e){return ia.call(e)},oa=this.document;if(oa)try{ra(oa.documentElement.childNodes)[0].nodeType}catch(aa){ra=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),oa)try{oa.createElement("DIV").style.setProperty("opacity",0,"")}catch(sa){var la=this.Element.prototype,ua=la.setAttribute,ca=la.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ha=da.setProperty;la.setAttribute=function(e,t){ua.call(this,e,t+"")},la.setAttributeNS=function(e,t,n){ca.call(this,e,t,n+"")},da.setProperty=function(e,t,n){ha.call(this,e,t+"",n)}}na.ascending=n,na.descending=function(e,t){return e>t?-1:t>e?1:t>=e?0:NaN},na.min=function(e,t){var n,i,r=-1,o=e.length;if(1===arguments.length){for(;++r<o;)if(null!=(i=e[r])&&i>=i){n=i;break}for(;++r<o;)null!=(i=e[r])&&n>i&&(n=i)}else{for(;++r<o;)if(null!=(i=t.call(e,e[r],r))&&i>=i){n=i;break}for(;++r<o;)null!=(i=t.call(e,e[r],r))&&n>i&&(n=i)}return n},na.max=function(e,t){var n,i,r=-1,o=e.length;if(1===arguments.length){for(;++r<o;)if(null!=(i=e[r])&&i>=i){n=i;break}for(;++r<o;)null!=(i=e[r])&&i>n&&(n=i)}else{for(;++r<o;)if(null!=(i=t.call(e,e[r],r))&&i>=i){n=i;break}for(;++r<o;)null!=(i=t.call(e,e[r],r))&&i>n&&(n=i)}return n},na.extent=function(e,t){var n,i,r,o=-1,a=e.length;if(1===arguments.length){for(;++o<a;)if(null!=(i=e[o])&&i>=i){n=r=i;break}for(;++o<a;)null!=(i=e[o])&&(n>i&&(n=i),i>r&&(r=i))}else{for(;++o<a;)if(null!=(i=t.call(e,e[o],o))&&i>=i){n=r=i;break}for(;++o<a;)null!=(i=t.call(e,e[o],o))&&(n>i&&(n=i),i>r&&(r=i))}return[n,r]},na.sum=function(e,t){var n,i=0,o=e.length,a=-1;if(1===arguments.length)for(;++a<o;)r(n=+e[a])&&(i+=n);else for(;++a<o;)r(n=+t.call(e,e[a],a))&&(i+=n);return i},na.mean=function(e,t){var n,o=0,a=e.length,s=-1,l=a;if(1===arguments.length)for(;++s<a;)r(n=i(e[s]))?o+=n:--l;else for(;++s<a;)r(n=i(t.call(e,e[s],s)))?o+=n:--l;return l?o/l:void 0},na.quantile=function(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),r=+e[i-1],o=n-i;return o?r+o*(e[i]-r):r},na.median=function(e,t){var o,a=[],s=e.length,l=-1;if(1===arguments.length)for(;++l<s;)r(o=i(e[l]))&&a.push(o);else for(;++l<s;)r(o=i(t.call(e,e[l],l)))&&a.push(o);return a.length?na.quantile(a.sort(n),.5):void 0},na.variance=function(e,t){var n,o,a=e.length,s=0,l=0,u=-1,c=0;if(1===arguments.length)for(;++u<a;)r(n=i(e[u]))&&(o=n-s,s+=o/++c,l+=o*(n-s));else for(;++u<a;)r(n=i(t.call(e,e[u],u)))&&(o=n-s,s+=o/++c,l+=o*(n-s));return c>1?l/(c-1):void 0},na.deviation=function(){var e=na.variance.apply(this,arguments);return e?Math.sqrt(e):e};var pa=o(n);na.bisectLeft=pa.left,na.bisect=na.bisectRight=pa.right,na.bisector=function(e){return o(1===e.length?function(t,i){return n(e(t),i)}:e)},na.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,2>o&&(t=0));for(var i,r,o=n-t;o;)r=Math.random()*o--|0,i=e[o+t],e[o+t]=e[r+t],e[r+t]=i;return e},na.permute=function(e,t){for(var n=t.length,i=new Array(n);n--;)i[n]=e[t[n]];return i},na.pairs=function(e){for(var t,n=0,i=e.length-1,r=e[0],o=new Array(0>i?0:i);i>n;)o[n]=[t=r,r=e[++n]];return o},na.zip=function(){if(!(i=arguments.length))return[];for(var e=-1,t=na.min(arguments,a),n=new Array(t);++e<t;)for(var i,r=-1,o=n[e]=new Array(i);++r<i;)o[r]=arguments[r][e];return n},na.transpose=function(e){return na.zip.apply(na,e)},na.keys=function(e){var t=[];for(var n in e)t.push(n);return t},na.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},na.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},na.merge=function(e){for(var t,n,i,r=e.length,o=-1,a=0;++o<r;)a+=e[o].length;for(n=new Array(a);--r>=0;)for(i=e[r],t=i.length;--t>=0;)n[--a]=i[t];return n};var fa=Math.abs;na.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw new Error("infinite range");var i,r=[],o=s(fa(n)),a=-1;if(e*=o,t*=o,n*=o,0>n)for(;(i=e+n*++a)>t;)r.push(i/o);else for(;(i=e+n*++a)<t;)r.push(i/o);return r},na.map=function(e,t){var n=new u;if(e instanceof u)e.forEach(function(e,t){n.set(e,t)});else if(Array.isArray(e)){var i,r=-1,o=e.length;if(1===arguments.length)for(;++r<o;)n.set(r,e[r]);else for(;++r<o;)n.set(t.call(e,i=e[r],r),i)}else for(var a in e)n.set(a,e[a]);return n};var ma="__proto__",ga="\x00";l(u,{has:h,get:function(e){return this._[c(e)]},set:function(e,t){return this._[c(e)]=t},remove:p,keys:f,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:d(t),value:this._[t]});return e},size:m,empty:g,forEach:function(e){for(var t in this._)e.call(this,d(t),this._[t])}}),na.nest=function(){function e(t,a,s){if(s>=o.length)return i?i.call(r,a):n?a.sort(n):a;for(var l,c,d,h,p=-1,f=a.length,m=o[s++],g=new u;++p<f;)(h=g.get(l=m(c=a[p])))?h.push(c):g.set(l,[c]);return t?(c=t(),d=function(n,i){c.set(n,e(t,i,s))}):(c={},d=function(n,i){c[n]=e(t,i,s)}),g.forEach(d),c}function t(e,n){if(n>=o.length)return e;var i=[],r=a[n++];return e.forEach(function(e,r){i.push({key:e,values:t(r,n)})}),r?i.sort(function(e,t){return r(e.key,t.key)}):i}var n,i,r={},o=[],a=[];return r.map=function(t,n){return e(n,t,0)},r.entries=function(n){return t(e(na.map,n,0),0)},r.key=function(e){return o.push(e),r},r.sortKeys=function(e){return a[o.length-1]=e,r},r.sortValues=function(e){return n=e,r},r.rollup=function(e){return i=e,r},r},na.set=function(e){var t=new v;if(e)for(var n=0,i=e.length;i>n;++n)t.add(e[n]);return t},l(v,{has:h,add:function(e){return this._[c(e+="")]=!0,e},remove:p,values:f,size:m,empty:g,forEach:function(e){for(var t in this._)e.call(this,d(t))}}),na.behavior={},na.rebind=function(e,t){for(var n,i=1,r=arguments.length;++i<r;)e[n=arguments[i]]=_(e,t,t[n]);return e};var va=["webkit","ms","moz","Moz","o","O"];na.dispatch=function(){for(var e=new w,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=$(e);return e},w.prototype.on=function(e,t){var n=e.indexOf("."),i="";if(n>=0&&(i=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(i):this[e].on(i,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(i,null);return this}},na.event=null,na.requote=function(e){return e.replace(ya,"\\$&")};var ya=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,_a={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},ba=function(e,t){return t.querySelector(e)},xa=function(e,t){return t.querySelectorAll(e)},wa=function(e,t){var n=e.matches||e[b(e,"matchesSelector")];return(wa=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(ba=function(e,t){return Sizzle(e,t)[0]||null},xa=Sizzle,wa=Sizzle.matchesSelector),na.selection=function(){return na.select(oa.documentElement)};var $a=na.selection.prototype=[];$a.select=function(e){var t,n,i,r,o=[];e=T(e);for(var a=-1,s=this.length;++a<s;){o.push(t=[]),t.parentNode=(i=this[a]).parentNode;for(var l=-1,u=i.length;++l<u;)(r=i[l])?(t.push(n=e.call(r,r.__data__,l,a)),n&&"__data__"in r&&(n.__data__=r.__data__)):t.push(null)}return M(o)},$a.selectAll=function(e){var t,n,i=[];e=S(e);for(var r=-1,o=this.length;++r<o;)for(var a=this[r],s=-1,l=a.length;++s<l;)(n=a[s])&&(i.push(t=ra(e.call(n,n.__data__,s,r))),t.parentNode=n);return M(i)};var ka={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};na.ns={prefix:ka,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&(n=e.slice(0,t),e=e.slice(t+1)),ka.hasOwnProperty(n)?{space:ka[n],local:e}:e}},$a.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=na.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(D(t,e[t]));return this}return this.each(D(e,t))},$a.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),i=(e=F(e)).length,r=-1;if(t=n.classList){for(;++r<i;)if(!t.contains(e[r]))return!1}else for(t=n.getAttribute("class");++r<i;)if(!L(e[r]).test(t))return!1;return!0}for(t in e)this.each(O(t,e[t]));return this}return this.each(O(e,t))},$a.style=function(e,n,i){var r=arguments.length;if(3>r){if("string"!=typeof e){2>r&&(n="");for(i in e)this.each(B(i,e[i],n));return this}if(2>r){var o=this.node();return t(o).getComputedStyle(o,null).getPropertyValue(e)}i=""}return this.each(B(e,n,i))},$a.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(P(t,e[t]));return this}return this.each(P(e,t))},$a.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},$a.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},$a.append=function(e){return e=I(e),this.select(function(){return this.appendChild(e.apply(this,arguments))})},$a.insert=function(e,t){return e=I(e),t=T(t),this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)})},$a.remove=function(){return this.each(Y)},$a.data=function(e,t){function n(e,n){var i,r,o,a=e.length,d=n.length,h=Math.min(a,d),p=new Array(d),f=new Array(d),m=new Array(a);if(t){var g,v=new u,y=new Array(a);for(i=-1;++i<a;)v.has(g=t.call(r=e[i],r.__data__,i))?m[i]=r:v.set(g,r),y[i]=g;for(i=-1;++i<d;)(r=v.get(g=t.call(n,o=n[i],i)))?r!==!0&&(p[i]=r,r.__data__=o):f[i]=j(o),v.set(g,!0);for(i=-1;++i<a;)v.get(y[i])!==!0&&(m[i]=e[i])}else{for(i=-1;++i<h;)r=e[i],o=n[i],r?(r.__data__=o,p[i]=r):f[i]=j(o);for(;d>i;++i)f[i]=j(n[i]);for(;a>i;++i)m[i]=e[i]}f.update=p,f.parentNode=p.parentNode=m.parentNode=e.parentNode,s.push(f),l.push(p),c.push(m)}var i,r,o=-1,a=this.length;if(!arguments.length){for(e=new Array(a=(i=this[0]).length);++o<a;)(r=i[o])&&(e[o]=r.__data__);return e}var s=q([]),l=M([]),c=M([]);if("function"==typeof e)for(;++o<a;)n(i=this[o],e.call(i,i.parentNode.__data__,o));else for(;++o<a;)n(i=this[o],e);return l.enter=function(){return s},l.exit=function(){return c},l},$a.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},$a.filter=function(e){var t,n,i,r=[];"function"!=typeof e&&(e=N(e));for(var o=0,a=this.length;a>o;o++){r.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=0,l=n.length;l>s;s++)(i=n[s])&&e.call(i,i.__data__,s,o)&&t.push(i)}return M(r)},$a.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,i=this[e],r=i.length-1,o=i[r];--r>=0;)(n=i[r])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},$a.sort=function(e){e=H.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},$a.each=function(e){return z(this,function(t,n,i){e.call(t,t.__data__,n,i)})},$a.call=function(e){var t=ra(arguments);return e.apply(t[0]=this,t),this},$a.empty=function(){return!this.node()},$a.node=function(){for(var e=0,t=this.length;t>e;e++)for(var n=this[e],i=0,r=n.length;r>i;i++){var o=n[i];if(o)return o}return null},$a.size=function(){var e=0;return z(this,function(){++e}),e};var Ca=[];na.selection.enter=q,na.selection.enter.prototype=Ca,Ca.append=$a.append,Ca.empty=$a.empty,Ca.node=$a.node,Ca.call=$a.call,Ca.size=$a.size,Ca.select=function(e){for(var t,n,i,r,o,a=[],s=-1,l=this.length;++s<l;){i=(r=this[s]).update,a.push(t=[]),t.parentNode=r.parentNode;for(var u=-1,c=r.length;++u<c;)(o=r[u])?(t.push(i[u]=n=e.call(r.parentNode,o.__data__,u,s)),n.__data__=o.__data__):t.push(null)}return M(a)},Ca.insert=function(e,t){return arguments.length<2&&(t=W(this)),$a.insert.call(this,e,t)},na.select=function(t){var n;return"string"==typeof t?(n=[ba(t,oa)],n.parentNode=oa.documentElement):(n=[t],n.parentNode=e(t)),M([n])},na.selectAll=function(e){var t;return"string"==typeof e?(t=ra(xa(e,oa)),t.parentNode=oa.documentElement):(t=e,t.parentNode=null),M([t])},$a.on=function(e,t,n){var i=arguments.length;if(3>i){if("string"!=typeof e){2>i&&(t=!1);for(n in e)this.each(U(n,e[n],t));return this}if(2>i)return(i=this.node()["__on"+e])&&i._;n=!1}return this.each(U(e,t,n))};var Aa=na.map({mouseenter:"mouseover",mouseleave:"mouseout"});oa&&Aa.forEach(function(e){"on"+e in oa&&Aa.remove(e)});var Ma,Ta=0;na.mouse=function(e){return K(e,C())};var Sa=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;na.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=C().changedTouches),t)for(var i,r=0,o=t.length;o>r;++r)if((i=t[r]).identifier===n)return K(e,i)},na.behavior.drag=function(){function e(){this.on("mousedown.drag",o).on("touchstart.drag",a)}function n(e,t,n,o,a){return function(){function s(){var e,n,i=t(h,m);i&&(e=i[0]-_[0],n=i[1]-_[1],f|=e|n,_=i,p({type:"drag",x:i[0]+u[0],y:i[1]+u[1],dx:e,dy:n}))}function l(){t(h,m)&&(v.on(o+g,null).on(a+g,null),y(f&&na.event.target===d),p({type:"dragend"}))}var u,c=this,d=na.event.target,h=c.parentNode,p=i.of(c,arguments),f=0,m=e(),g=".drag"+(null==m?"":"-"+m),v=na.select(n(d)).on(o+g,s).on(a+g,l),y=G(d),_=t(h,m);r?(u=r.apply(c,arguments),u=[u.x-_[0],u.y-_[1]]):u=[0,0],p({type:"dragstart"})}}var i=A(e,"drag","dragstart","dragend"),r=null,o=n(x,na.mouse,t,"mousemove","mouseup"),a=n(J,na.touch,y,"touchmove","touchend");return e.origin=function(t){return arguments.length?(r=t,e):r},na.rebind(e,i,"on")},na.touches=function(e,t){return arguments.length<2&&(t=C().touches),t?ra(t).map(function(t){var n=K(e,t);return n.identifier=t.identifier,n}):[]};var Da=1e-6,Ea=Da*Da,La=Math.PI,Fa=2*La,Oa=Fa-Da,Ra=La/2,Ba=La/180,Pa=180/La,Ia=Math.SQRT2,Ya=2,ja=4;na.interpolateZoom=function(e,t){function n(e){var t=e*y;if(v){var n=ie(m),a=o/(Ya*h)*(n*re(Ia*t+m)-ne(m));return[i+a*u,r+a*c,o*n/ie(Ia*t+m)]}return[i+e*u,r+e*c,o*Math.exp(Ia*t)]}var i=e[0],r=e[1],o=e[2],a=t[0],s=t[1],l=t[2],u=a-i,c=s-r,d=u*u+c*c,h=Math.sqrt(d),p=(l*l-o*o+ja*d)/(2*o*Ya*h),f=(l*l-o*o-ja*d)/(2*l*Ya*h),m=Math.log(Math.sqrt(p*p+1)-p),g=Math.log(Math.sqrt(f*f+1)-f),v=g-m,y=(v||Math.log(l/o))/Ia;return n.duration=1e3*y,n},na.behavior.zoom=function(){function e(e){e.on(E,d).on(Ha+".zoom",p).on("dblclick.zoom",f).on(O,h)}function n(e){return[(e[0]-C.x)/C.k,(e[1]-C.y)/C.k]}function i(e){return[e[0]*C.k+C.x,e[1]*C.k+C.y]}function r(e){C.k=Math.max(T[0],Math.min(T[1],e))}function o(e,t){t=i(t),C.x+=e[0]-t[0],C.y+=e[1]-t[1]}function a(t,n,i,a){t.__chart__={x:C.x,y:C.y,k:C.k},r(Math.pow(2,a)),o(g=n,i),t=na.select(t),S>0&&(t=t.transition().duration(S)),t.call(e.event)}function s(){x&&x.domain(b.range().map(function(e){return(e-C.x)/C.k}).map(b.invert)),$&&$.domain(w.range().map(function(e){return(e-C.y)/C.k}).map(w.invert))}function l(e){D++||e({type:"zoomstart"})}function u(e){s(),e({type:"zoom",scale:C.k,translate:[C.x,C.y]})}function c(e){--D||e({type:"zoomend"}),g=null}function d(){function e(){d=1,o(na.mouse(r),p),u(s)}function i(){h.on(L,null).on(F,null),f(d&&na.event.target===a),c(s)}var r=this,a=na.event.target,s=R.of(r,arguments),d=0,h=na.select(t(r)).on(L,e).on(F,i),p=n(na.mouse(r)),f=G(r);Bl.call(r),l(s)}function h(){function e(){var e=na.touches(f);return p=C.k,e.forEach(function(e){e.identifier in g&&(g[e.identifier]=n(e))}),e}function t(){var t=na.event.target;na.select(t).on(b,i).on(x,s),w.push(t);for(var n=na.event.changedTouches,r=0,o=n.length;o>r;++r)g[n[r].identifier]=null;var l=e(),u=Date.now();if(1===l.length){if(500>u-_){var c=l[0];a(f,c,g[c.identifier],Math.floor(Math.log(C.k)/Math.LN2)+1),k()}_=u}else if(l.length>1){var c=l[0],d=l[1],h=c[0]-d[0],p=c[1]-d[1];v=h*h+p*p}}function i(){var e,t,n,i,a=na.touches(f);Bl.call(f);for(var s=0,l=a.length;l>s;++s,i=null)if(n=a[s],i=g[n.identifier]){if(t)break;e=n,t=i}if(i){var c=(c=n[0]-e[0])*c+(c=n[1]-e[1])*c,d=v&&Math.sqrt(c/v);e=[(e[0]+n[0])/2,(e[1]+n[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(d*p)}_=null,o(e,t),u(m)}function s(){if(na.event.touches.length){for(var t=na.event.changedTouches,n=0,i=t.length;i>n;++n)delete g[t[n].identifier];for(var r in g)return void e()}na.selectAll(w).on(y,null),$.on(E,d).on(O,h),A(),c(m)}var p,f=this,m=R.of(f,arguments),g={},v=0,y=".zoom-"+na.event.changedTouches[0].identifier,b="touchmove"+y,x="touchend"+y,w=[],$=na.select(f),A=G(f);t(),l(m),$.on(E,null).on(O,t)}function p(){var e=R.of(this,arguments);y?clearTimeout(y):(m=n(g=v||na.mouse(this)),Bl.call(this),l(e)),y=setTimeout(function(){y=null,c(e)},50),k(),r(Math.pow(2,.002*Na())*C.k),
|
142
|
+
o(g,m),u(e)}function f(){var e=na.mouse(this),t=Math.log(C.k)/Math.LN2;a(this,e,n(e),na.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var m,g,v,y,_,b,x,w,$,C={x:0,y:0,k:1},M=[960,500],T=za,S=250,D=0,E="mousedown.zoom",L="mousemove.zoom",F="mouseup.zoom",O="touchstart.zoom",R=A(e,"zoomstart","zoom","zoomend");return Ha||(Ha="onwheel"in oa?(Na=function(){return-na.event.deltaY*(na.event.deltaMode?120:1)},"wheel"):"onmousewheel"in oa?(Na=function(){return na.event.wheelDelta},"mousewheel"):(Na=function(){return-na.event.detail},"MozMousePixelScroll")),e.event=function(e){e.each(function(){var e=R.of(this,arguments),t=C;Ol?na.select(this).transition().each("start.zoom",function(){C=this.__chart__||{x:0,y:0,k:1},l(e)}).tween("zoom:zoom",function(){var n=M[0],i=M[1],r=g?g[0]:n/2,o=g?g[1]:i/2,a=na.interpolateZoom([(r-C.x)/C.k,(o-C.y)/C.k,n/C.k],[(r-t.x)/t.k,(o-t.y)/t.k,n/t.k]);return function(t){var i=a(t),s=n/i[2];this.__chart__=C={x:r-i[0]*s,y:o-i[1]*s,k:s},u(e)}}).each("interrupt.zoom",function(){c(e)}).each("end.zoom",function(){c(e)}):(this.__chart__=C,l(e),u(e),c(e))})},e.translate=function(t){return arguments.length?(C={x:+t[0],y:+t[1],k:C.k},s(),e):[C.x,C.y]},e.scale=function(t){return arguments.length?(C={x:C.x,y:C.y,k:+t},s(),e):C.k},e.scaleExtent=function(t){return arguments.length?(T=null==t?za:[+t[0],+t[1]],e):T},e.center=function(t){return arguments.length?(v=t&&[+t[0],+t[1]],e):v},e.size=function(t){return arguments.length?(M=t&&[+t[0],+t[1]],e):M},e.duration=function(t){return arguments.length?(S=+t,e):S},e.x=function(t){return arguments.length?(x=t,b=t.copy(),C={x:0,y:0,k:1},e):x},e.y=function(t){return arguments.length?($=t,w=t.copy(),C={x:0,y:0,k:1},e):$},na.rebind(e,R,"on")};var Na,Ha,za=[0,1/0];na.color=ae,ae.prototype.toString=function(){return this.rgb()+""},na.hsl=se;var qa=se.prototype=new ae;qa.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new se(this.h,this.s,this.l/e)},qa.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new se(this.h,this.s,e*this.l)},qa.rgb=function(){return le(this.h,this.s,this.l)},na.hcl=ue;var Wa=ue.prototype=new ae;Wa.brighter=function(e){return new ue(this.h,this.c,Math.min(100,this.l+Ua*(arguments.length?e:1)))},Wa.darker=function(e){return new ue(this.h,this.c,Math.max(0,this.l-Ua*(arguments.length?e:1)))},Wa.rgb=function(){return ce(this.h,this.c,this.l).rgb()},na.lab=de;var Ua=18,Va=.95047,Xa=1,Ga=1.08883,Ka=de.prototype=new ae;Ka.brighter=function(e){return new de(Math.min(100,this.l+Ua*(arguments.length?e:1)),this.a,this.b)},Ka.darker=function(e){return new de(Math.max(0,this.l-Ua*(arguments.length?e:1)),this.a,this.b)},Ka.rgb=function(){return he(this.l,this.a,this.b)},na.rgb=ve;var Ja=ve.prototype=new ae;Ja.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,i=this.b,r=30;return t||n||i?(t&&r>t&&(t=r),n&&r>n&&(n=r),i&&r>i&&(i=r),new ve(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,i/e))):new ve(r,r,r)},Ja.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new ve(e*this.r,e*this.g,e*this.b)},Ja.hsl=function(){return we(this.r,this.g,this.b)},Ja.toString=function(){return"#"+be(this.r)+be(this.g)+be(this.b)};var Qa=na.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Qa.forEach(function(e,t){Qa.set(e,ye(t))}),na.functor=Ae,na.xhr=Me(y),na.dsv=function(e,t){function n(e,n,o){arguments.length<3&&(o=n,n=null);var a=Te(e,t,null==n?i:r(n),o);return a.row=function(e){return arguments.length?a.response(null==(n=e)?i:r(e)):n},a}function i(e){return n.parse(e.responseText)}function r(e){return function(t){return n.parse(t.responseText,e)}}function o(t){return t.map(a).join(e)}function a(e){return s.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var s=new RegExp('["'+e+"\n]"),l=e.charCodeAt(0);return n.parse=function(e,t){var i;return n.parseRows(e,function(e,n){if(i)return i(e,n-1);var r=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");i=t?function(e,n){return t(r(e),n)}:r})},n.parseRows=function(e,t){function n(){if(c>=u)return a;if(r)return r=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++<u;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}c=n+2;var i=e.charCodeAt(n+1);return 13===i?(r=!0,10===e.charCodeAt(n+2)&&++c):10===i&&(r=!0),e.slice(t+1,n).replace(/""/g,'"')}for(;u>c;){var i=e.charCodeAt(c++),s=1;if(10===i)r=!0;else if(13===i)r=!0,10===e.charCodeAt(c)&&(++c,++s);else if(i!==l)continue;return e.slice(t,c-s)}return e.slice(t)}for(var i,r,o={},a={},s=[],u=e.length,c=0,d=0;(i=n())!==a;){for(var h=[];i!==o&&i!==a;)h.push(i),i=n();t&&null==(h=t(h,d++))||s.push(h)}return s},n.format=function(t){if(Array.isArray(t[0]))return n.formatRows(t);var i=new v,r=[];return t.forEach(function(e){for(var t in e)i.has(t)||r.push(i.add(t))}),[r.map(a).join(e)].concat(t.map(function(t){return r.map(function(e){return a(t[e])}).join(e)})).join("\n")},n.formatRows=function(e){return e.map(o).join("\n")},n},na.csv=na.dsv(",","text/csv"),na.tsv=na.dsv(" ","text/tab-separated-values");var Za,es,ts,ns,is,rs=this[b(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};na.timer=function(e,t,n){var i=arguments.length;2>i&&(t=0),3>i&&(n=Date.now());var r=n+t,o={c:e,t:r,f:!1,n:null};es?es.n=o:Za=o,es=o,ts||(ns=clearTimeout(ns),ts=1,rs(Ee))},na.timer.flush=function(){Le(),Fe()},na.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var os=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Re);na.formatPrefix=function(e,t){var n=0;return e&&(0>e&&(e*=-1),t&&(e=na.round(e,Oe(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),os[8+n/3]};var as=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ss=na.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=na.round(e,Oe(e,t))).toFixed(Math.max(0,Math.min(20,Oe(e*(1+1e-15),t))))}}),ls=na.time={},us=Date;Ie.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){cs.setUTCDate.apply(this._,arguments)},setDay:function(){cs.setUTCDay.apply(this._,arguments)},setFullYear:function(){cs.setUTCFullYear.apply(this._,arguments)},setHours:function(){cs.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){cs.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){cs.setUTCMinutes.apply(this._,arguments)},setMonth:function(){cs.setUTCMonth.apply(this._,arguments)},setSeconds:function(){cs.setUTCSeconds.apply(this._,arguments)},setTime:function(){cs.setTime.apply(this._,arguments)}};var cs=Date.prototype;ls.year=Ye(function(e){return e=ls.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),ls.years=ls.year.range,ls.years.utc=ls.year.utc.range,ls.day=Ye(function(e){var t=new us(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),ls.days=ls.day.range,ls.days.utc=ls.day.utc.range,ls.dayOfYear=function(e){var t=ls.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=ls[e]=Ye(function(e){return(e=ls.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=ls.year(e).getDay();return Math.floor((ls.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});ls[e+"s"]=n.range,ls[e+"s"].utc=n.utc.range,ls[e+"OfYear"]=function(e){var n=ls.year(e).getDay();return Math.floor((ls.dayOfYear(e)+(n+t)%7)/7)}}),ls.week=ls.sunday,ls.weeks=ls.sunday.range,ls.weeks.utc=ls.sunday.utc.range,ls.weekOfYear=ls.sundayOfYear;var ds={"-":"",_:" ",0:"0"},hs=/^\s*\d+/,ps=/^%/;na.locale=function(e){return{numberFormat:Be(e),timeFormat:Ne(e)}};var fs=na.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});na.format=fs.numberFormat,na.geo={},lt.prototype={s:0,t:0,add:function(e){ut(e,this.t,ms),ut(ms.s,this.s,this),this.s?this.t+=ms.t:this.s=ms.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ms=new lt;na.geo.stream=function(e,t){e&&gs.hasOwnProperty(e.type)?gs[e.type](e,t):ct(e,t)};var gs={Feature:function(e,t){ct(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i<r;)ct(n[i].geometry,t)}},vs={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)e=n[i],t.point(e[0],e[1],e[2])},LineString:function(e,t){dt(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)dt(n[i],t,0)},Polygon:function(e,t){ht(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)ht(n[i],t)},GeometryCollection:function(e,t){for(var n=e.geometries,i=-1,r=n.length;++i<r;)ct(n[i],t)}};na.geo.area=function(e){return ys=0,na.geo.stream(e,bs),ys};var ys,_s=new lt,bs={sphere:function(){ys+=4*La},point:x,lineStart:x,lineEnd:x,polygonStart:function(){_s.reset(),bs.lineStart=pt},polygonEnd:function(){var e=2*_s;ys+=0>e?4*La+e:e,bs.lineStart=bs.lineEnd=bs.point=x}};na.geo.bounds=function(){function e(e,t){_.push(b=[c=e,h=e]),d>t&&(d=t),t>p&&(p=t)}function t(t,n){var i=ft([t*Ba,n*Ba]);if(v){var r=gt(v,i),o=[r[1],-r[0],0],a=gt(o,r);_t(a),a=bt(a);var l=t-f,u=l>0?1:-1,m=a[0]*Pa*u,g=fa(l)>180;if(g^(m>u*f&&u*t>m)){var y=a[1]*Pa;y>p&&(p=y)}else if(m=(m+360)%360-180,g^(m>u*f&&u*t>m)){var y=-a[1]*Pa;d>y&&(d=y)}else d>n&&(d=n),n>p&&(p=n);g?f>t?s(c,t)>s(c,h)&&(h=t):s(t,h)>s(c,h)&&(c=t):h>=c?(c>t&&(c=t),t>h&&(h=t)):t>f?s(c,t)>s(c,h)&&(h=t):s(t,h)>s(c,h)&&(c=t)}else e(t,n);v=i,f=t}function n(){x.point=t}function i(){b[0]=c,b[1]=h,x.point=e,v=null}function r(e,n){if(v){var i=e-f;y+=fa(i)>180?i+(i>0?360:-360):i}else m=e,g=n;bs.point(e,n),t(e,n)}function o(){bs.lineStart()}function a(){r(m,g),bs.lineEnd(),fa(y)>Da&&(c=-(h=180)),b[0]=c,b[1]=h,v=null}function s(e,t){return(t-=e)<0?t+360:t}function l(e,t){return e[0]-t[0]}function u(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var c,d,h,p,f,m,g,v,y,_,b,x={point:e,lineStart:n,lineEnd:i,polygonStart:function(){x.point=r,x.lineStart=o,x.lineEnd=a,y=0,bs.polygonStart()},polygonEnd:function(){bs.polygonEnd(),x.point=e,x.lineStart=n,x.lineEnd=i,0>_s?(c=-(h=180),d=-(p=90)):y>Da?p=90:-Da>y&&(d=-90),b[0]=c,b[1]=h}};return function(e){p=h=-(c=d=1/0),_=[],na.geo.stream(e,x);var t=_.length;if(t){_.sort(l);for(var n,i=1,r=_[0],o=[r];t>i;++i)n=_[i],u(n[0],r)||u(n[1],r)?(s(r[0],n[1])>s(r[0],r[1])&&(r[1]=n[1]),s(n[0],r[1])>s(r[0],r[1])&&(r[0]=n[0])):o.push(r=n);for(var a,n,f=-1/0,t=o.length-1,i=0,r=o[t];t>=i;r=n,++i)n=o[i],(a=s(r[1],n[0]))>f&&(f=a,c=n[0],h=r[1])}return _=b=null,1/0===c||1/0===d?[[NaN,NaN],[NaN,NaN]]:[[c,d],[h,p]]}}(),na.geo.centroid=function(e){xs=ws=$s=ks=Cs=As=Ms=Ts=Ss=Ds=Es=0,na.geo.stream(e,Ls);var t=Ss,n=Ds,i=Es,r=t*t+n*n+i*i;return Ea>r&&(t=As,n=Ms,i=Ts,Da>ws&&(t=$s,n=ks,i=Cs),r=t*t+n*n+i*i,Ea>r)?[NaN,NaN]:[Math.atan2(n,t)*Pa,te(i/Math.sqrt(r))*Pa]};var xs,ws,$s,ks,Cs,As,Ms,Ts,Ss,Ds,Es,Ls={sphere:x,point:wt,lineStart:kt,lineEnd:Ct,polygonStart:function(){Ls.lineStart=At},polygonEnd:function(){Ls.lineStart=kt}},Fs=Lt(Tt,Bt,It,[-La,-La/2]),Os=1e9;na.geo.clipExtent=function(){var e,t,n,i,r,o,a={stream:function(e){return r&&(r.valid=!1),r=o(e),r.valid=!0,r},extent:function(s){return arguments.length?(o=Ht(e=+s[0][0],t=+s[0][1],n=+s[1][0],i=+s[1][1]),r&&(r.valid=!1,r=null),a):[[e,t],[n,i]]}};return a.extent([[0,0],[960,500]])},(na.geo.conicEqualArea=function(){return zt(qt)}).raw=qt,na.geo.albers=function(){return na.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},na.geo.albersUsa=function(){function e(e){var o=e[0],a=e[1];return t=null,n(o,a),t||(i(o,a),t)||r(o,a),t}var t,n,i,r,o=na.geo.albers(),a=na.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=na.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,n){t=[e,n]}};return e.invert=function(e){var t=o.scale(),n=o.translate(),i=(e[0]-n[0])/t,r=(e[1]-n[1])/t;return(r>=.12&&.234>r&&i>=-.425&&-.214>i?a:r>=.166&&.234>r&&i>=-.214&&-.115>i?s:o).invert(e)},e.stream=function(e){var t=o.stream(e),n=a.stream(e),i=s.stream(e);return{point:function(e,r){t.point(e,r),n.point(e,r),i.point(e,r)},sphere:function(){t.sphere(),n.sphere(),i.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),i.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),i.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),i.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),i.polygonEnd()}}},e.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),s.precision(t),e):o.precision()},e.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),s.scale(t),e.translate(o.translate())):o.scale()},e.translate=function(t){if(!arguments.length)return o.translate();var u=o.scale(),c=+t[0],d=+t[1];return n=o.translate(t).clipExtent([[c-.455*u,d-.238*u],[c+.455*u,d+.238*u]]).stream(l).point,i=a.translate([c-.307*u,d+.201*u]).clipExtent([[c-.425*u+Da,d+.12*u+Da],[c-.214*u-Da,d+.234*u-Da]]).stream(l).point,r=s.translate([c-.205*u,d+.212*u]).clipExtent([[c-.214*u+Da,d+.166*u+Da],[c-.115*u-Da,d+.234*u-Da]]).stream(l).point,e},e.scale(1070)};var Rs,Bs,Ps,Is,Ys,js,Ns={point:x,lineStart:x,lineEnd:x,polygonStart:function(){Bs=0,Ns.lineStart=Wt},polygonEnd:function(){Ns.lineStart=Ns.lineEnd=Ns.point=x,Rs+=fa(Bs/2)}},Hs={point:Ut,lineStart:x,lineEnd:x,polygonStart:x,polygonEnd:x},zs={point:Gt,lineStart:Kt,lineEnd:Jt,polygonStart:function(){zs.lineStart=Qt},polygonEnd:function(){zs.point=Gt,zs.lineStart=Kt,zs.lineEnd=Jt}};na.geo.path=function(){function e(e){return e&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=r(o)),na.geo.stream(e,a)),o.result()}function t(){return a=null,e}var n,i,r,o,a,s=4.5;return e.area=function(e){return Rs=0,na.geo.stream(e,r(Ns)),Rs},e.centroid=function(e){return $s=ks=Cs=As=Ms=Ts=Ss=Ds=Es=0,na.geo.stream(e,r(zs)),Es?[Ss/Es,Ds/Es]:Ts?[As/Ts,Ms/Ts]:Cs?[$s/Cs,ks/Cs]:[NaN,NaN]},e.bounds=function(e){return Ys=js=-(Ps=Is=1/0),na.geo.stream(e,r(Hs)),[[Ps,Is],[Ys,js]]},e.projection=function(e){return arguments.length?(r=(n=e)?e.stream||tn(e):y,t()):n},e.context=function(e){return arguments.length?(o=null==(i=e)?new Vt:new Zt(e),"function"!=typeof s&&o.pointRadius(s),t()):i},e.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),e):s},e.projection(na.geo.albersUsa()).context(null)},na.geo.transform=function(e){return{stream:function(t){var n=new nn(t);for(var i in e)n[i]=e[i];return n}}},nn.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},na.geo.projection=on,na.geo.projectionMutator=an,(na.geo.equirectangular=function(){return on(ln)}).raw=ln.invert=ln,na.geo.rotation=function(e){function t(t){return t=e(t[0]*Ba,t[1]*Ba),t[0]*=Pa,t[1]*=Pa,t}return e=cn(e[0]%360*Ba,e[1]*Ba,e.length>2?e[2]*Ba:0),t.invert=function(t){return t=e.invert(t[0]*Ba,t[1]*Ba),t[0]*=Pa,t[1]*=Pa,t},t},un.invert=ln,na.geo.circle=function(){function e(){var e="function"==typeof i?i.apply(this,arguments):i,t=cn(-e[0]*Ba,-e[1]*Ba,0).invert,r=[];return n(null,null,1,{point:function(e,n){r.push(e=t(e,n)),e[0]*=Pa,e[1]*=Pa}}),{type:"Polygon",coordinates:[r]}}var t,n,i=[0,0],r=6;return e.origin=function(t){return arguments.length?(i=t,e):i},e.angle=function(i){return arguments.length?(n=fn((t=+i)*Ba,r*Ba),e):t},e.precision=function(i){return arguments.length?(n=fn(t*Ba,(r=+i)*Ba),e):r},e.angle(90)},na.geo.distance=function(e,t){var n,i=(t[0]-e[0])*Ba,r=e[1]*Ba,o=t[1]*Ba,a=Math.sin(i),s=Math.cos(i),l=Math.sin(r),u=Math.cos(r),c=Math.sin(o),d=Math.cos(o);return Math.atan2(Math.sqrt((n=d*a)*n+(n=u*c-l*d*s)*n),l*c+u*d*s)},na.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return na.range(Math.ceil(o/g)*g,r,g).map(h).concat(na.range(Math.ceil(u/v)*v,l,v).map(p)).concat(na.range(Math.ceil(i/f)*f,n,f).filter(function(e){return fa(e%g)>Da}).map(c)).concat(na.range(Math.ceil(s/m)*m,a,m).filter(function(e){return fa(e%v)>Da}).map(d))}var n,i,r,o,a,s,l,u,c,d,h,p,f=10,m=f,g=90,v=360,y=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(p(l).slice(1),h(r).reverse().slice(1),p(u).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(o=+t[0][0],r=+t[1][0],u=+t[0][1],l=+t[1][1],o>r&&(t=o,o=r,r=t),u>l&&(t=u,u=l,l=t),e.precision(y)):[[o,u],[r,l]]},e.minorExtent=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],i>n&&(t=i,i=n,n=t),s>a&&(t=s,s=a,a=t),e.precision(y)):[[i,s],[n,a]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],e):[g,v]},e.minorStep=function(t){return arguments.length?(f=+t[0],m=+t[1],e):[f,m]},e.precision=function(t){return arguments.length?(y=+t,c=gn(s,a,90),d=vn(i,n,y),h=gn(u,l,90),p=vn(o,r,y),e):y},e.majorExtent([[-180,-90+Da],[180,90-Da]]).minorExtent([[-180,-80-Da],[180,80+Da]])},na.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||i.apply(this,arguments),n||r.apply(this,arguments)]}}var t,n,i=yn,r=_n;return e.distance=function(){return na.geo.distance(t||i.apply(this,arguments),n||r.apply(this,arguments))},e.source=function(n){return arguments.length?(i=n,t="function"==typeof n?null:n,e):i},e.target=function(t){return arguments.length?(r=t,n="function"==typeof t?null:t,e):r},e.precision=function(){return arguments.length?e:0},e},na.geo.interpolate=function(e,t){return bn(e[0]*Ba,e[1]*Ba,t[0]*Ba,t[1]*Ba)},na.geo.length=function(e){return qs=0,na.geo.stream(e,Ws),qs};var qs,Ws={sphere:x,point:x,lineStart:xn,lineEnd:x,polygonStart:x,polygonEnd:x},Us=wn(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(na.geo.azimuthalEqualArea=function(){return on(Us)}).raw=Us;var Vs=wn(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},y);(na.geo.azimuthalEquidistant=function(){return on(Vs)}).raw=Vs,(na.geo.conicConformal=function(){return zt($n)}).raw=$n,(na.geo.conicEquidistant=function(){return zt(kn)}).raw=kn;var Xs=wn(function(e){return 1/e},Math.atan);(na.geo.gnomonic=function(){return on(Xs)}).raw=Xs,Cn.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Ra]},(na.geo.mercator=function(){return An(Cn)}).raw=Cn;var Gs=wn(function(){return 1},Math.asin);(na.geo.orthographic=function(){return on(Gs)}).raw=Gs;var Ks=wn(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(na.geo.stereographic=function(){return on(Ks)}).raw=Ks,Mn.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Ra]},(na.geo.transverseMercator=function(){var e=An(Mn),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90])}).raw=Mn,na.geom={},na.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,r=Ae(n),o=Ae(i),a=e.length,s=[],l=[];for(t=0;a>t;t++)s.push([+r.call(this,e[t],t),+o.call(this,e[t],t),t]);for(s.sort(En),t=0;a>t;t++)l.push([s[t][0],-s[t][1]]);var u=Dn(s),c=Dn(l),d=c[0]===u[0],h=c[c.length-1]===u[u.length-1],p=[];for(t=u.length-1;t>=0;--t)p.push(e[s[u[t]][2]]);for(t=+d;t<c.length-h;++t)p.push(e[s[c[t]][2]]);return p}var n=Tn,i=Sn;return arguments.length?t(e):(t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(i=e,t):i},t)},na.geom.polygon=function(e){return _a(e,Js),e};var Js=na.geom.polygon.prototype=[];Js.area=function(){for(var e,t=-1,n=this.length,i=this[n-1],r=0;++t<n;)e=i,i=this[t],r+=e[1]*i[0]-e[0]*i[1];return.5*r},Js.centroid=function(e){var t,n,i=-1,r=this.length,o=0,a=0,s=this[r-1];for(arguments.length||(e=-1/(6*this.area()));++i<r;)t=s,s=this[i],n=t[0]*s[1]-s[0]*t[1],o+=(t[0]+s[0])*n,a+=(t[1]+s[1])*n;return[o*e,a*e]},Js.clip=function(e){for(var t,n,i,r,o,a,s=On(e),l=-1,u=this.length-On(this),c=this[u-1];++l<u;){for(t=e.slice(),e.length=0,r=this[l],o=t[(i=t.length-s)-1],n=-1;++n<i;)a=t[n],Ln(a,c,r)?(Ln(o,c,r)||e.push(Fn(o,a,c,r)),e.push(a)):Ln(o,c,r)&&e.push(Fn(o,a,c,r)),o=a;s&&e.push(e[0]),c=r}return e};var Qs,Zs,el,tl,nl,il=[],rl=[];Hn.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)e=t[n].edge,e.b&&e.a||t.splice(n,1);return t.sort(qn),t.length},ei.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},ti.prototype={insert:function(e,t){var n,i,r;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=oi(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)i=n.U,n===i.L?(r=i.R,r&&r.C?(n.C=r.C=!1,i.C=!0,e=i):(e===n.R&&(ii(this,n),e=n,n=e.U),n.C=!1,i.C=!0,ri(this,i))):(r=i.L,r&&r.C?(n.C=r.C=!1,i.C=!0,e=i):(e===n.L&&(ri(this,n),e=n,n=e.U),n.C=!1,i.C=!0,ii(this,i))),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,i,r=e.U,o=e.L,a=e.R;if(n=o?a?oi(a):o:a,r?r.L===e?r.L=n:r.R=n:this._=n,o&&a?(i=n.C,n.C=e.C,n.L=o,o.U=n,n!==a?(r=n.U,n.U=e.U,e=n.R,r.L=e,n.R=a,a.U=n):(n.U=r,r=n,e=n.R)):(i=e.C,e=n),e&&(e.U=r),!i){if(e&&e.C)return void(e.C=!1);do{if(e===this._)break;if(e===r.L){if(t=r.R,t.C&&(t.C=!1,r.C=!0,ii(this,r),t=r.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ri(this,t),t=r.R),t.C=r.C,r.C=t.R.C=!1,ii(this,r),e=this._;break}}else if(t=r.L,t.C&&(t.C=!1,r.C=!0,ri(this,r),t=r.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ii(this,t),t=r.L),t.C=r.C,r.C=t.L.C=!1,ri(this,r),e=this._;break}t.C=!0,e=r,r=r.U}while(!e.C);e&&(e.C=!1)}}},na.geom.voronoi=function(e){function t(e){var t=new Array(e.length),i=s[0][0],r=s[0][1],o=s[1][0],a=s[1][1];return ai(n(e),s).cells.forEach(function(n,s){var l=n.edges,u=n.site,c=t[s]=l.length?l.map(function(e){var t=e.start();return[t.x,t.y]}):u.x>=i&&u.x<=o&&u.y>=r&&u.y<=a?[[i,a],[o,a],[o,r],[i,r]]:[];c.point=e[s]}),t}function n(e){return e.map(function(e,t){return{x:Math.round(o(e,t)/Da)*Da,y:Math.round(a(e,t)/Da)*Da,i:t}})}var i=Tn,r=Sn,o=i,a=r,s=ol;return e?t(e):(t.links=function(e){return ai(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},t.triangles=function(e){var t=[];return ai(n(e)).cells.forEach(function(n,i){for(var r,o,a=n.site,s=n.edges.sort(qn),l=-1,u=s.length,c=s[u-1].edge,d=c.l===a?c.r:c.l;++l<u;)r=c,o=d,c=s[l].edge,d=c.l===a?c.r:c.l,i<o.i&&i<d.i&&li(a,o,d)<0&&t.push([e[i],e[o.i],e[d.i]])}),t},t.x=function(e){return arguments.length?(o=Ae(i=e),t):i},t.y=function(e){return arguments.length?(a=Ae(r=e),t):r},t.clipExtent=function(e){return arguments.length?(s=null==e?ol:e,t):s===ol?null:s},t.size=function(e){return arguments.length?t.clipExtent(e&&[[0,0],e]):s===ol?null:s&&s[1]},t)};var ol=[[-1e6,-1e6],[1e6,1e6]];na.geom.delaunay=function(e){return na.geom.voronoi().triangles(e)},na.geom.quadtree=function(e,t,n,i,r){function o(e){function o(e,t,n,i,r,o,a,s){if(!isNaN(n)&&!isNaN(i))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(fa(l-n)+fa(c-i)<.01)u(e,t,n,i,r,o,a,s);else{var d=e.point;e.x=e.y=e.point=null,u(e,d,l,c,r,o,a,s),u(e,t,n,i,r,o,a,s)}else e.x=n,e.y=i,e.point=t}else u(e,t,n,i,r,o,a,s)}function u(e,t,n,i,r,a,s,l){var u=.5*(r+s),c=.5*(a+l),d=n>=u,h=i>=c,p=h<<1|d;e.leaf=!1,e=e.nodes[p]||(e.nodes[p]=di()),d?r=u:s=u,h?a=c:l=c,o(e,t,n,i,r,a,s,l)}var c,d,h,p,f,m,g,v,y,_=Ae(s),b=Ae(l);if(null!=t)m=t,g=n,v=i,y=r;else if(v=y=-(m=g=1/0),d=[],h=[],f=e.length,a)for(p=0;f>p;++p)c=e[p],c.x<m&&(m=c.x),c.y<g&&(g=c.y),c.x>v&&(v=c.x),c.y>y&&(y=c.y),d.push(c.x),h.push(c.y);else for(p=0;f>p;++p){var x=+_(c=e[p],p),w=+b(c,p);m>x&&(m=x),g>w&&(g=w),x>v&&(v=x),w>y&&(y=w),d.push(x),h.push(w)}var $=v-m,k=y-g;$>k?y=g+$:v=m+k;var C=di();if(C.add=function(e){o(C,e,+_(e,++p),+b(e,p),m,g,v,y)},C.visit=function(e){hi(e,C,m,g,v,y)},C.find=function(e){return pi(C,e[0],e[1],m,g,v,y)},p=-1,null==t){for(;++p<f;)o(C,e[p],d[p],h[p],m,g,v,y);--p}else e.forEach(C.add);return d=h=e=c=null,C}var a,s=Tn,l=Sn;return(a=arguments.length)?(s=ui,l=ci,3===a&&(r=n,i=t,n=t=0),o(e)):(o.x=function(e){return arguments.length?(s=e,o):s},o.y=function(e){return arguments.length?(l=e,o):l},o.extent=function(e){return arguments.length?(null==e?t=n=i=r=null:(t=+e[0][0],n=+e[0][1],i=+e[1][0],r=+e[1][1]),o):null==t?null:[[t,n],[i,r]]},o.size=function(e){return arguments.length?(null==e?t=n=i=r=null:(t=n=0,i=+e[0],r=+e[1]),o):null==t?null:[i-t,r-n]},o)},na.interpolateRgb=fi,na.interpolateObject=mi,na.interpolateNumber=gi,na.interpolateString=vi;var al=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sl=new RegExp(al.source,"g");na.interpolate=yi,na.interpolators=[function(e,t){var n=typeof t;return("string"===n?Qa.has(t)||/^(#|rgb\(|hsl\()/.test(t)?fi:vi:t instanceof ae?fi:Array.isArray(t)?_i:"object"===n&&isNaN(t)?mi:gi)(e,t)}],na.interpolateArray=_i;var ll=function(){return y},ul=na.map({linear:ll,poly:Ai,quad:function(){return $i},cubic:function(){return ki},sin:function(){return Mi},exp:function(){return Ti},circle:function(){return Si},elastic:Di,back:Ei,bounce:function(){return Li}}),cl=na.map({"in":y,out:xi,"in-out":wi,"out-in":function(e){return wi(xi(e))}});na.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,i=t>=0?e.slice(t+1):"in";return n=ul.get(n)||ll,i=cl.get(i)||y,bi(i(n.apply(null,ia.call(arguments,1))))},na.interpolateHcl=Fi,na.interpolateHsl=Oi,na.interpolateLab=Ri,na.interpolateRound=Bi,na.transform=function(e){var t=oa.createElementNS(na.ns.prefix.svg,"g");return(na.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Pi(n?n.matrix:dl)})(e)},Pi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var dl={a:1,b:0,c:0,d:1,e:0,f:0};na.interpolateTransform=Ni,na.layout={},na.layout.bundle=function(){return function(e){for(var t=[],n=-1,i=e.length;++n<i;)t.push(qi(e[n]));return t}},na.layout.chord=function(){function e(){var e,u,d,h,p,f={},m=[],g=na.range(o),v=[];for(n=[],i=[],e=0,h=-1;++h<o;){for(u=0,p=-1;++p<o;)u+=r[h][p];m.push(u),v.push(na.range(o)),e+=u}for(a&&g.sort(function(e,t){return a(m[e],m[t])}),s&&v.forEach(function(e,t){e.sort(function(e,n){return s(r[t][e],r[t][n])})}),e=(Fa-c*o)/e,u=0,h=-1;++h<o;){for(d=u,p=-1;++p<o;){var y=g[h],_=v[y][p],b=r[y][_],x=u,w=u+=b*e;f[y+"-"+_]={index:y,subindex:_,startAngle:x,endAngle:w,value:b}}i[y]={index:y,startAngle:d,endAngle:u,value:(u-d)/e},u+=c}for(h=-1;++h<o;)for(p=h-1;++p<o;){var $=f[h+"-"+p],k=f[p+"-"+h];($.value||k.value)&&n.push($.value<k.value?{source:k,target:$}:{source:$,target:k})}l&&t()}function t(){n.sort(function(e,t){return l((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n,i,r,o,a,s,l,u={},c=0;return u.matrix=function(e){return arguments.length?(o=(r=e)&&r.length,n=i=null,u):r},u.padding=function(e){return arguments.length?(c=e,n=i=null,u):c},u.sortGroups=function(e){return arguments.length?(a=e,n=i=null,u):a},u.sortSubgroups=function(e){return arguments.length?(s=e,n=null,u):s},u.sortChords=function(e){return arguments.length?(l=e,n&&t(),u):l},u.chords=function(){return n||e(),n},u.groups=function(){return i||e(),i},u},na.layout.force=function(){function e(e){return function(t,n,i,r){if(t.point!==e){var o=t.cx-e.x,a=t.cy-e.y,s=r-n,l=o*o+a*a;if(l>s*s/g){if(f>l){var u=t.charge/l;e.px-=o*u,e.py-=a*u}return!0}if(t.point&&l&&f>l){var u=t.pointCharge/l;e.px-=o*u,e.py-=a*u}}return!t.charge}}function t(e){e.px=na.event.x,e.py=na.event.y,s.resume()}var n,i,r,o,a,s={},l=na.dispatch("start","tick","end"),u=[1,1],c=.9,d=hl,h=pl,p=-30,f=fl,m=.1,g=.64,v=[],_=[];return s.tick=function(){if((i*=.99)<.005)return l.end({type:"end",alpha:i=0}),!0;var t,n,s,d,h,f,g,y,b,x=v.length,w=_.length;for(n=0;w>n;++n)s=_[n],d=s.source,h=s.target,y=h.x-d.x,b=h.y-d.y,(f=y*y+b*b)&&(f=i*o[n]*((f=Math.sqrt(f))-r[n])/f,y*=f,b*=f,h.x-=y*(g=d.weight/(h.weight+d.weight)),h.y-=b*g,d.x+=y*(g=1-g),d.y+=b*g);if((g=i*m)&&(y=u[0]/2,b=u[1]/2,n=-1,g))for(;++n<x;)s=v[n],s.x+=(y-s.x)*g,s.y+=(b-s.y)*g;if(p)for(Ji(t=na.geom.quadtree(v),i,a),n=-1;++n<x;)(s=v[n]).fixed||t.visit(e(s));for(n=-1;++n<x;)s=v[n],s.fixed?(s.x=s.px,s.y=s.py):(s.x-=(s.px-(s.px=s.x))*c,s.y-=(s.py-(s.py=s.y))*c);l.tick({type:"tick",
|
143
|
+
alpha:i})},s.nodes=function(e){return arguments.length?(v=e,s):v},s.links=function(e){return arguments.length?(_=e,s):_},s.size=function(e){return arguments.length?(u=e,s):u},s.linkDistance=function(e){return arguments.length?(d="function"==typeof e?e:+e,s):d},s.distance=s.linkDistance,s.linkStrength=function(e){return arguments.length?(h="function"==typeof e?e:+e,s):h},s.friction=function(e){return arguments.length?(c=+e,s):c},s.charge=function(e){return arguments.length?(p="function"==typeof e?e:+e,s):p},s.chargeDistance=function(e){return arguments.length?(f=e*e,s):Math.sqrt(f)},s.gravity=function(e){return arguments.length?(m=+e,s):m},s.theta=function(e){return arguments.length?(g=e*e,s):Math.sqrt(g)},s.alpha=function(e){return arguments.length?(e=+e,i?i=e>0?e:0:e>0&&(l.start({type:"start",alpha:i=e}),na.timer(s.tick)),s):i},s.start=function(){function e(e,i){if(!n){for(n=new Array(l),s=0;l>s;++s)n[s]=[];for(s=0;c>s;++s){var r=_[s];n[r.source.index].push(r.target),n[r.target.index].push(r.source)}}for(var o,a=n[t],s=-1,u=a.length;++s<u;)if(!isNaN(o=a[s][e]))return o;return Math.random()*i}var t,n,i,l=v.length,c=_.length,f=u[0],m=u[1];for(t=0;l>t;++t)(i=v[t]).index=t,i.weight=0;for(t=0;c>t;++t)i=_[t],"number"==typeof i.source&&(i.source=v[i.source]),"number"==typeof i.target&&(i.target=v[i.target]),++i.source.weight,++i.target.weight;for(t=0;l>t;++t)i=v[t],isNaN(i.x)&&(i.x=e("x",f)),isNaN(i.y)&&(i.y=e("y",m)),isNaN(i.px)&&(i.px=i.x),isNaN(i.py)&&(i.py=i.y);if(r=[],"function"==typeof d)for(t=0;c>t;++t)r[t]=+d.call(this,_[t],t);else for(t=0;c>t;++t)r[t]=d;if(o=[],"function"==typeof h)for(t=0;c>t;++t)o[t]=+h.call(this,_[t],t);else for(t=0;c>t;++t)o[t]=h;if(a=[],"function"==typeof p)for(t=0;l>t;++t)a[t]=+p.call(this,v[t],t);else for(t=0;l>t;++t)a[t]=p;return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){return n||(n=na.behavior.drag().origin(y).on("dragstart.force",Vi).on("drag.force",t).on("dragend.force",Xi)),arguments.length?void this.on("mouseover.force",Gi).on("mouseout.force",Ki).call(n):n},na.rebind(s,l,"on")};var hl=20,pl=1,fl=1/0;na.layout.hierarchy=function(){function e(r){var o,a=[r],s=[];for(r.depth=0;null!=(o=a.pop());)if(s.push(o),(u=n.call(e,o,o.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)a.push(c=u[l]),c.parent=o,c.depth=o.depth+1;i&&(o.value=0),o.children=u}else i&&(o.value=+i.call(e,o,o.depth)||0),delete o.children;return er(r,function(e){var n,r;t&&(n=e.children)&&n.sort(t),i&&(r=e.parent)&&(r.value+=e.value)}),s}var t=ir,n=tr,i=nr;return e.sort=function(n){return arguments.length?(t=n,e):t},e.children=function(t){return arguments.length?(n=t,e):n},e.value=function(t){return arguments.length?(i=t,e):i},e.revalue=function(t){return i&&(Zi(t,function(e){e.children&&(e.value=0)}),er(t,function(t){var n;t.children||(t.value=+i.call(e,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)})),t},e},na.layout.partition=function(){function e(t,n,i,r){var o=t.children;if(t.x=n,t.y=t.depth*r,t.dx=i,t.dy=r,o&&(a=o.length)){var a,s,l,u=-1;for(i=t.value?i/t.value:0;++u<a;)e(s=o[u],n,l=s.value*i,r),n+=l}}function t(e){var n=e.children,i=0;if(n&&(r=n.length))for(var r,o=-1;++o<r;)i=Math.max(i,t(n[o]));return 1+i}function n(n,o){var a=i.call(this,n,o);return e(a[0],0,r[0],r[1]/t(a[0])),a}var i=na.layout.hierarchy(),r=[1,1];return n.size=function(e){return arguments.length?(r=e,n):r},Qi(n,i)},na.layout.pie=function(){function e(a){var s,l=a.length,u=a.map(function(n,i){return+t.call(e,n,i)}),c=+("function"==typeof i?i.apply(this,arguments):i),d=("function"==typeof r?r.apply(this,arguments):r)-c,h=Math.min(Math.abs(d)/l,+("function"==typeof o?o.apply(this,arguments):o)),p=h*(0>d?-1:1),f=(d-l*p)/na.sum(u),m=na.range(l),g=[];return null!=n&&m.sort(n===ml?function(e,t){return u[t]-u[e]}:function(e,t){return n(a[e],a[t])}),m.forEach(function(e){g[e]={data:a[e],value:s=u[e],startAngle:c,endAngle:c+=s*f+p,padAngle:h}}),g}var t=Number,n=ml,i=0,r=Fa,o=0;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(i=t,e):i},e.endAngle=function(t){return arguments.length?(r=t,e):r},e.padAngle=function(t){return arguments.length?(o=t,e):o},e};var ml={};na.layout.stack=function(){function e(s,l){if(!(h=s.length))return s;var u=s.map(function(n,i){return t.call(e,n,i)}),c=u.map(function(t){return t.map(function(t,n){return[o.call(e,t,n),a.call(e,t,n)]})}),d=n.call(e,c,l);u=na.permute(u,d),c=na.permute(c,d);var h,p,f,m,g=i.call(e,c,l),v=u[0].length;for(f=0;v>f;++f)for(r.call(e,u[0][f],m=g[f],c[0][f][1]),p=1;h>p;++p)r.call(e,u[p][f],m+=c[p-1][f][1],c[p][f][1]);return s}var t=y,n=lr,i=ur,r=sr,o=or,a=ar;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n="function"==typeof t?t:gl.get(t)||lr,e):n},e.offset=function(t){return arguments.length?(i="function"==typeof t?t:vl.get(t)||ur,e):i},e.x=function(t){return arguments.length?(o=t,e):o},e.y=function(t){return arguments.length?(a=t,e):a},e.out=function(t){return arguments.length?(r=t,e):r},e};var gl=na.map({"inside-out":function(e){var t,n,i=e.length,r=e.map(cr),o=e.map(dr),a=na.range(i).sort(function(e,t){return r[e]-r[t]}),s=0,l=0,u=[],c=[];for(t=0;i>t;++t)n=a[t],l>s?(s+=o[n],u.push(n)):(l+=o[n],c.push(n));return c.reverse().concat(u)},reverse:function(e){return na.range(e.length).reverse()},"default":lr}),vl=na.map({silhouette:function(e){var t,n,i,r=e.length,o=e[0].length,a=[],s=0,l=[];for(n=0;o>n;++n){for(t=0,i=0;r>t;t++)i+=e[t][n][1];i>s&&(s=i),a.push(i)}for(n=0;o>n;++n)l[n]=(s-a[n])/2;return l},wiggle:function(e){var t,n,i,r,o,a,s,l,u,c=e.length,d=e[0],h=d.length,p=[];for(p[0]=l=u=0,n=1;h>n;++n){for(t=0,r=0;c>t;++t)r+=e[t][n][1];for(t=0,o=0,s=d[n][0]-d[n-1][0];c>t;++t){for(i=0,a=(e[t][n][1]-e[t][n-1][1])/(2*s);t>i;++i)a+=(e[i][n][1]-e[i][n-1][1])/s;o+=a*e[t][n][1]}p[n]=l-=r?o/r*s:0,u>l&&(u=l)}for(n=0;h>n;++n)p[n]-=u;return p},expand:function(e){var t,n,i,r=e.length,o=e[0].length,a=1/r,s=[];for(n=0;o>n;++n){for(t=0,i=0;r>t;t++)i+=e[t][n][1];if(i)for(t=0;r>t;t++)e[t][n][1]/=i;else for(t=0;r>t;t++)e[t][n][1]=a}for(n=0;o>n;++n)s[n]=0;return s},zero:ur});na.layout.histogram=function(){function e(e,o){for(var a,s,l=[],u=e.map(n,this),c=i.call(this,u,o),d=r.call(this,c,u,o),o=-1,h=u.length,p=d.length-1,f=t?1:1/h;++o<p;)a=l[o]=[],a.dx=d[o+1]-(a.x=d[o]),a.y=0;if(p>0)for(o=-1;++o<h;)s=u[o],s>=c[0]&&s<=c[1]&&(a=l[na.bisect(d,s,1,p)-1],a.y+=f,a.push(e[o]));return l}var t=!0,n=Number,i=mr,r=pr;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(i=Ae(t),e):i},e.bins=function(t){return arguments.length?(r="number"==typeof t?function(e){return fr(e,t)}:Ae(t),e):r},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},na.layout.pack=function(){function e(e,o){var a=n.call(this,e,o),s=a[0],l=r[0],u=r[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,er(s,function(e){e.r=+c(e.value)}),er(s,br),i){var d=i*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;er(s,function(e){e.r+=d}),er(s,br),er(s,function(e){e.r-=d})}return $r(s,l/2,u/2,t?1:1/Math.max(2*s.r/l,2*s.r/u)),a}var t,n=na.layout.hierarchy().sort(gr),i=0,r=[1,1];return e.size=function(t){return arguments.length?(r=t,e):r},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(i=+t,e):i},Qi(e,n)},na.layout.tree=function(){function e(e,r){var c=a.call(this,e,r),d=c[0],h=t(d);if(er(h,n),h.parent.m=-h.z,Zi(h,i),u)Zi(d,o);else{var p=d,f=d,m=d;Zi(d,function(e){e.x<p.x&&(p=e),e.x>f.x&&(f=e),e.depth>m.depth&&(m=e)});var g=s(p,f)/2-p.x,v=l[0]/(f.x+s(f,p)/2+g),y=l[1]/(m.depth||1);Zi(d,function(e){e.x=(e.x+g)*v,e.y=e.depth*y})}return c}function t(e){for(var t,n={A:null,children:[e]},i=[n];null!=(t=i.pop());)for(var r,o=t.children,a=0,s=o.length;s>a;++a)i.push((o[a]=r={_:o[a],parent:t,children:(r=o[a].children)&&r.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=r);return n.children[0]}function n(e){var t=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(t.length){Sr(e);var o=(t[0].z+t[t.length-1].z)/2;i?(e.z=i.z+s(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+s(e._,i._));e.parent.A=r(e,i,e.parent.A||n[0])}function i(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function r(e,t,n){if(t){for(var i,r=e,o=e,a=t,l=r.parent.children[0],u=r.m,c=o.m,d=a.m,h=l.m;a=Mr(a),r=Ar(r),a&&r;)l=Ar(l),o=Mr(o),o.a=e,i=a.z+d-r.z-u+s(a._,r._),i>0&&(Tr(Dr(a,e,n),e,i),u+=i,c+=i),d+=a.m,u+=r.m,h+=l.m,c+=o.m;a&&!Mr(o)&&(o.t=a,o.m+=d-c),r&&!Ar(l)&&(l.t=r,l.m+=u-h,n=e)}return n}function o(e){e.x*=l[0],e.y=e.depth*l[1]}var a=na.layout.hierarchy().sort(null).value(null),s=Cr,l=[1,1],u=null;return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=null==(l=t)?o:null,e):u?null:l},e.nodeSize=function(t){return arguments.length?(u=null==(l=t)?null:o,e):u?l:null},Qi(e,a)},na.layout.cluster=function(){function e(e,o){var a,s=t.call(this,e,o),l=s[0],u=0;er(l,function(e){var t=e.children;t&&t.length?(e.x=Lr(t),e.y=Er(t)):(e.x=a?u+=n(e,a):0,e.y=0,a=e)});var c=Fr(l),d=Or(l),h=c.x-n(c,d)/2,p=d.x+n(d,c)/2;return er(l,r?function(e){e.x=(e.x-l.x)*i[0],e.y=(l.y-e.y)*i[1]}:function(e){e.x=(e.x-h)/(p-h)*i[0],e.y=(1-(l.y?e.y/l.y:1))*i[1]}),s}var t=na.layout.hierarchy().sort(null).value(null),n=Cr,i=[1,1],r=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(r=null==(i=t),e):r?null:i},e.nodeSize=function(t){return arguments.length?(r=null!=(i=t),e):r?i:null},Qi(e,t)},na.layout.treemap=function(){function e(e,t){for(var n,i,r=-1,o=e.length;++r<o;)i=(n=e[r]).value*(0>t?0:t),n.area=isNaN(i)||0>=i?0:i}function t(n){var o=n.children;if(o&&o.length){var a,s,l,u=d(n),c=[],h=o.slice(),f=1/0,m="slice"===p?u.dx:"dice"===p?u.dy:"slice-dice"===p?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);for(e(h,u.dx*u.dy/n.value),c.area=0;(l=h.length)>0;)c.push(a=h[l-1]),c.area+=a.area,"squarify"!==p||(s=i(c,m))<=f?(h.pop(),f=s):(c.area-=c.pop().area,r(c,m,u,!1),m=Math.min(u.dx,u.dy),c.length=c.area=0,f=1/0);c.length&&(r(c,m,u,!0),c.length=c.area=0),o.forEach(t)}}function n(t){var i=t.children;if(i&&i.length){var o,a=d(t),s=i.slice(),l=[];for(e(s,a.dx*a.dy/t.value),l.area=0;o=s.pop();)l.push(o),l.area+=o.area,null!=o.z&&(r(l,o.z?a.dx:a.dy,a,!s.length),l.length=l.area=0);i.forEach(n)}}function i(e,t){for(var n,i=e.area,r=0,o=1/0,a=-1,s=e.length;++a<s;)(n=e[a].area)&&(o>n&&(o=n),n>r&&(r=n));return i*=i,t*=t,i?Math.max(t*r*f/i,i/(t*o*f)):1/0}function r(e,t,n,i){var r,o=-1,a=e.length,s=n.x,u=n.y,c=t?l(e.area/t):0;if(t==n.dx){for((i||c>n.dy)&&(c=n.dy);++o<a;)r=e[o],r.x=s,r.y=u,r.dy=c,s+=r.dx=Math.min(n.x+n.dx-s,c?l(r.area/c):0);r.z=!0,r.dx+=n.x+n.dx-s,n.y+=c,n.dy-=c}else{for((i||c>n.dx)&&(c=n.dx);++o<a;)r=e[o],r.x=s,r.y=u,r.dx=c,u+=r.dy=Math.min(n.y+n.dy-u,c?l(r.area/c):0);r.z=!1,r.dy+=n.y+n.dy-u,n.x+=c,n.dx-=c}}function o(i){var r=a||s(i),o=r[0];return o.x=0,o.y=0,o.dx=u[0],o.dy=u[1],a&&s.revalue(o),e([o],o.dx*o.dy/o.value),(a?n:t)(o),h&&(a=r),r}var a,s=na.layout.hierarchy(),l=Math.round,u=[1,1],c=null,d=Rr,h=!1,p="squarify",f=.5*(1+Math.sqrt(5));return o.size=function(e){return arguments.length?(u=e,o):u},o.padding=function(e){function t(t){var n=e.call(o,t,t.depth);return null==n?Rr(t):Br(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return Br(t,e)}if(!arguments.length)return c;var i;return d=null==(c=e)?Rr:"function"==(i=typeof e)?t:"number"===i?(e=[e,e,e,e],n):n,o},o.round=function(e){return arguments.length?(l=e?Math.round:Number,o):l!=Number},o.sticky=function(e){return arguments.length?(h=e,a=null,o):h},o.ratio=function(e){return arguments.length?(f=e,o):f},o.mode=function(e){return arguments.length?(p=e+"",o):p},Qi(o,s)},na.random={normal:function(e,t){var n=arguments.length;return 2>n&&(t=1),1>n&&(e=0),function(){var n,i,r;do n=2*Math.random()-1,i=2*Math.random()-1,r=n*n+i*i;while(!r||r>1);return e+t*n*Math.sqrt(-2*Math.log(r)/r)}},logNormal:function(){var e=na.random.normal.apply(na,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=na.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;e>n;n++)t+=Math.random();return t}}},na.scale={};var yl={floor:y,ceil:y};na.scale.linear=function(){return zr([0,1],[0,1],yi,!1)};var _l={s:1,g:1,p:1,r:1,e:1};na.scale.log=function(){return Jr(na.scale.linear().domain([0,1]),10,!0,[1,10])};var bl=na.format(".0e"),xl={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};na.scale.pow=function(){return Qr(na.scale.linear(),1,[0,1])},na.scale.sqrt=function(){return na.scale.pow().exponent(.5)},na.scale.ordinal=function(){return eo([],{t:"range",a:[[]]})},na.scale.category10=function(){return na.scale.ordinal().range(wl)},na.scale.category20=function(){return na.scale.ordinal().range($l)},na.scale.category20b=function(){return na.scale.ordinal().range(kl)},na.scale.category20c=function(){return na.scale.ordinal().range(Cl)};var wl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(_e),$l=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(_e),kl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(_e),Cl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(_e);na.scale.quantile=function(){return to([],[])},na.scale.quantize=function(){return no(0,1,[0,1])},na.scale.threshold=function(){return io([.5],[0,1])},na.scale.identity=function(){return ro([0,1])},na.svg={},na.svg.arc=function(){function e(){var e=Math.max(0,+n.apply(this,arguments)),u=Math.max(0,+i.apply(this,arguments)),c=a.apply(this,arguments)-Ra,d=s.apply(this,arguments)-Ra,h=Math.abs(d-c),p=c>d?0:1;if(e>u&&(f=u,u=e,e=f),h>=Oa)return t(u,p)+(e?t(e,1-p):"")+"Z";var f,m,g,v,y,_,b,x,w,$,k,C,A=0,M=0,T=[];if((v=(+l.apply(this,arguments)||0)/2)&&(g=o===Al?Math.sqrt(e*e+u*u):+o.apply(this,arguments),p||(M*=-1),u&&(M=te(g/u*Math.sin(v))),e&&(A=te(g/e*Math.sin(v)))),u){y=u*Math.cos(c+M),_=u*Math.sin(c+M),b=u*Math.cos(d-M),x=u*Math.sin(d-M);var S=Math.abs(d-c-2*M)<=La?0:1;if(M&&ho(y,_,b,x)===p^S){var D=(c+d)/2;y=u*Math.cos(D),_=u*Math.sin(D),b=x=null}}else y=_=0;if(e){w=e*Math.cos(d-A),$=e*Math.sin(d-A),k=e*Math.cos(c+A),C=e*Math.sin(c+A);var E=Math.abs(c-d+2*A)<=La?0:1;if(A&&ho(w,$,k,C)===1-p^E){var L=(c+d)/2;w=e*Math.cos(L),$=e*Math.sin(L),k=C=null}}else w=$=0;if((f=Math.min(Math.abs(u-e)/2,+r.apply(this,arguments)))>.001){m=u>e^p?0:1;var F=null==k?[w,$]:null==b?[y,_]:Fn([y,_],[k,C],[b,x],[w,$]),O=y-F[0],R=_-F[1],B=b-F[0],P=x-F[1],I=1/Math.sin(Math.acos((O*B+R*P)/(Math.sqrt(O*O+R*R)*Math.sqrt(B*B+P*P)))/2),Y=Math.sqrt(F[0]*F[0]+F[1]*F[1]);if(null!=b){var j=Math.min(f,(u-Y)/(I+1)),N=po(null==k?[w,$]:[k,C],[y,_],u,j,p),H=po([b,x],[w,$],u,j,p);f===j?T.push("M",N[0],"A",j,",",j," 0 0,",m," ",N[1],"A",u,",",u," 0 ",1-p^ho(N[1][0],N[1][1],H[1][0],H[1][1]),",",p," ",H[1],"A",j,",",j," 0 0,",m," ",H[0]):T.push("M",N[0],"A",j,",",j," 0 1,",m," ",H[0])}else T.push("M",y,",",_);if(null!=k){var z=Math.min(f,(e-Y)/(I-1)),q=po([y,_],[k,C],e,-z,p),W=po([w,$],null==b?[y,_]:[b,x],e,-z,p);f===z?T.push("L",W[0],"A",z,",",z," 0 0,",m," ",W[1],"A",e,",",e," 0 ",p^ho(W[1][0],W[1][1],q[1][0],q[1][1]),",",1-p," ",q[1],"A",z,",",z," 0 0,",m," ",q[0]):T.push("L",W[0],"A",z,",",z," 0 0,",m," ",q[0])}else T.push("L",w,",",$)}else T.push("M",y,",",_),null!=b&&T.push("A",u,",",u," 0 ",S,",",p," ",b,",",x),T.push("L",w,",",$),null!=k&&T.push("A",e,",",e," 0 ",E,",",1-p," ",k,",",C);return T.push("Z"),T.join("")}function t(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}var n=ao,i=so,r=oo,o=Al,a=lo,s=uo,l=co;return e.innerRadius=function(t){return arguments.length?(n=Ae(t),e):n},e.outerRadius=function(t){return arguments.length?(i=Ae(t),e):i},e.cornerRadius=function(t){return arguments.length?(r=Ae(t),e):r},e.padRadius=function(t){return arguments.length?(o=t==Al?Al:Ae(t),e):o},e.startAngle=function(t){return arguments.length?(a=Ae(t),e):a},e.endAngle=function(t){return arguments.length?(s=Ae(t),e):s},e.padAngle=function(t){return arguments.length?(l=Ae(t),e):l},e.centroid=function(){var e=(+n.apply(this,arguments)+ +i.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +s.apply(this,arguments))/2-Ra;return[Math.cos(t)*e,Math.sin(t)*e]},e};var Al="auto";na.svg.line=function(){return fo(y)};var Ml=na.map({linear:mo,"linear-closed":go,step:vo,"step-before":yo,"step-after":_o,basis:Co,"basis-open":Ao,"basis-closed":Mo,bundle:To,cardinal:wo,"cardinal-open":bo,"cardinal-closed":xo,monotone:Oo});Ml.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var Tl=[0,2/3,1/3,0],Sl=[0,1/3,2/3,0],Dl=[0,1/6,2/3,1/6];na.svg.line.radial=function(){var e=fo(Ro);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},yo.reverse=_o,_o.reverse=yo,na.svg.area=function(){return Bo(y)},na.svg.area.radial=function(){var e=Bo(Ro);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},na.svg.chord=function(){function e(e,s){var l=t(this,o,e,s),u=t(this,a,e,s);return"M"+l.p0+i(l.r,l.p1,l.a1-l.a0)+(n(l,u)?r(l.r,l.p1,l.r,l.p0):r(l.r,l.p1,u.r,u.p0)+i(u.r,u.p1,u.a1-u.a0)+r(u.r,u.p1,l.r,l.p0))+"Z"}function t(e,t,n,i){var r=t.call(e,n,i),o=s.call(e,r,i),a=l.call(e,r,i)-Ra,c=u.call(e,r,i)-Ra;return{r:o,a0:a,a1:c,p0:[o*Math.cos(a),o*Math.sin(a)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function n(e,t){return e.a0==t.a0&&e.a1==t.a1}function i(e,t,n){return"A"+e+","+e+" 0 "+ +(n>La)+",1 "+t}function r(e,t,n,i){return"Q 0,0 "+i}var o=yn,a=_n,s=Po,l=lo,u=uo;return e.radius=function(t){return arguments.length?(s=Ae(t),e):s},e.source=function(t){return arguments.length?(o=Ae(t),e):o},e.target=function(t){return arguments.length?(a=Ae(t),e):a},e.startAngle=function(t){return arguments.length?(l=Ae(t),e):l},e.endAngle=function(t){return arguments.length?(u=Ae(t),e):u},e},na.svg.diagonal=function(){function e(e,r){var o=t.call(this,e,r),a=n.call(this,e,r),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return l=l.map(i),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=yn,n=_n,i=Io;return e.source=function(n){return arguments.length?(t=Ae(n),e):t},e.target=function(t){return arguments.length?(n=Ae(t),e):n},e.projection=function(t){return arguments.length?(i=t,e):i},e},na.svg.diagonal.radial=function(){var e=na.svg.diagonal(),t=Io,n=e.projection;return e.projection=function(e){return arguments.length?n(Yo(t=e)):t},e},na.svg.symbol=function(){function e(e,i){return(El.get(t.call(this,e,i))||Ho)(n.call(this,e,i))}var t=No,n=jo;return e.type=function(n){return arguments.length?(t=Ae(n),e):t},e.size=function(t){return arguments.length?(n=Ae(t),e):n},e};var El=na.map({circle:Ho,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Fl)),n=t*Fl;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Ll),n=t*Ll/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ll),n=t*Ll/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});na.svg.symbolTypes=El.keys();var Ll=Math.sqrt(3),Fl=Math.tan(30*Ba);$a.transition=function(e){for(var t,n,i=Ol||++Il,r=Vo(e),o=[],a=Rl||{time:Date.now(),ease:Ci,delay:0,duration:250},s=-1,l=this.length;++s<l;){o.push(t=[]);for(var u=this[s],c=-1,d=u.length;++c<d;)(n=u[c])&&Xo(n,c,r,i,a),t.push(n)}return qo(o,r,i)},$a.interrupt=function(e){return this.each(null==e?Bl:zo(Vo(e)))};var Ol,Rl,Bl=zo(Vo()),Pl=[],Il=0;Pl.call=$a.call,Pl.empty=$a.empty,Pl.node=$a.node,Pl.size=$a.size,na.transition=function(e,t){return e&&e.transition?Ol?e.transition(t):e:na.selection().transition(e)},na.transition.prototype=Pl,Pl.select=function(e){var t,n,i,r=this.id,o=this.namespace,a=[];e=T(e);for(var s=-1,l=this.length;++s<l;){a.push(t=[]);for(var u=this[s],c=-1,d=u.length;++c<d;)(i=u[c])&&(n=e.call(i,i.__data__,c,s))?("__data__"in i&&(n.__data__=i.__data__),Xo(n,c,o,r,i[o][r]),t.push(n)):t.push(null)}return qo(a,o,r)},Pl.selectAll=function(e){var t,n,i,r,o,a=this.id,s=this.namespace,l=[];e=S(e);for(var u=-1,c=this.length;++u<c;)for(var d=this[u],h=-1,p=d.length;++h<p;)if(i=d[h]){o=i[s][a],n=e.call(i,i.__data__,h,u),l.push(t=[]);for(var f=-1,m=n.length;++f<m;)(r=n[f])&&Xo(r,f,s,a,o),t.push(r)}return qo(l,s,a)},Pl.filter=function(e){var t,n,i,r=[];"function"!=typeof e&&(e=N(e));for(var o=0,a=this.length;a>o;o++){r.push(t=[]);for(var n=this[o],s=0,l=n.length;l>s;s++)(i=n[s])&&e.call(i,i.__data__,s,o)&&t.push(i)}return qo(r,this.namespace,this.id)},Pl.tween=function(e,t){var n=this.id,i=this.namespace;return arguments.length<2?this.node()[i][n].tween.get(e):z(this,null==t?function(t){t[i][n].tween.remove(e)}:function(r){r[i][n].tween.set(e,t)})},Pl.attr=function(e,t){function n(){this.removeAttribute(s)}function i(){this.removeAttributeNS(s.space,s.local)}function r(e){return null==e?n:(e+="",function(){var t,n=this.getAttribute(s);return n!==e&&(t=a(n,e),function(e){this.setAttribute(s,t(e))})})}function o(e){return null==e?i:(e+="",function(){var t,n=this.getAttributeNS(s.space,s.local);return n!==e&&(t=a(n,e),function(e){this.setAttributeNS(s.space,s.local,t(e))})})}if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var a="transform"==e?Ni:yi,s=na.ns.qualify(e);return Wo(this,"attr."+e,t,s.local?o:r)},Pl.attrTween=function(e,t){function n(e,n){var i=t.call(this,e,n,this.getAttribute(r));return i&&function(e){this.setAttribute(r,i(e))}}function i(e,n){var i=t.call(this,e,n,this.getAttributeNS(r.space,r.local));return i&&function(e){this.setAttributeNS(r.space,r.local,i(e))}}var r=na.ns.qualify(e);return this.tween("attr."+e,r.local?i:n)},Pl.style=function(e,n,i){function r(){this.style.removeProperty(e)}function o(n){return null==n?r:(n+="",function(){var r,o=t(this).getComputedStyle(this,null).getPropertyValue(e);return o!==n&&(r=yi(o,n),function(t){this.style.setProperty(e,r(t),i)})})}var a=arguments.length;if(3>a){if("string"!=typeof e){2>a&&(n="");for(i in e)this.style(i,e[i],n);return this}i=""}return Wo(this,"style."+e,n,o)},Pl.styleTween=function(e,n,i){function r(r,o){var a=n.call(this,r,o,t(this).getComputedStyle(this,null).getPropertyValue(e));return a&&function(t){this.style.setProperty(e,a(t),i)}}return arguments.length<3&&(i=""),this.tween("style."+e,r)},Pl.text=function(e){return Wo(this,"text",e,Uo)},Pl.remove=function(){var e=this.namespace;return this.each("end.transition",function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Pl.ease=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].ease:("function"!=typeof e&&(e=na.ease.apply(na,arguments)),z(this,function(i){i[n][t].ease=e}))},Pl.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:z(this,"function"==typeof e?function(i,r,o){i[n][t].delay=+e.call(i,i.__data__,r,o)}:(e=+e,function(i){i[n][t].delay=e}))},Pl.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:z(this,"function"==typeof e?function(i,r,o){i[n][t].duration=Math.max(1,e.call(i,i.__data__,r,o))}:(e=Math.max(1,e),function(i){i[n][t].duration=e}))},Pl.each=function(e,t){var n=this.id,i=this.namespace;if(arguments.length<2){var r=Rl,o=Ol;try{Ol=n,z(this,function(t,r,o){Rl=t[i][n],e.call(t,t.__data__,r,o)})}finally{Rl=r,Ol=o}}else z(this,function(r){var o=r[i][n];(o.event||(o.event=na.dispatch("start","end","interrupt"))).on(e,t)});return this},Pl.transition=function(){for(var e,t,n,i,r=this.id,o=++Il,a=this.namespace,s=[],l=0,u=this.length;u>l;l++){s.push(e=[]);for(var t=this[l],c=0,d=t.length;d>c;c++)(n=t[c])&&(i=n[a][r],Xo(n,c,a,o,{time:i.time,ease:i.ease,delay:i.delay+i.duration,duration:i.duration})),e.push(n)}return qo(s,a,o)},na.svg.axis=function(){function e(e){e.each(function(){var e,u=na.select(this),c=this.__chart__||n,d=this.__chart__=n.copy(),h=null==l?d.ticks?d.ticks.apply(d,s):d.domain():l,p=null==t?d.tickFormat?d.tickFormat.apply(d,s):y:t,f=u.selectAll(".tick").data(h,d),m=f.enter().insert("g",".domain").attr("class","tick").style("opacity",Da),g=na.transition(f.exit()).style("opacity",Da).remove(),v=na.transition(f.order()).style("opacity",1),_=Math.max(r,0)+a,b=Ir(d),x=u.selectAll(".domain").data([0]),w=(x.enter().append("path").attr("class","domain"),na.transition(x));m.append("line"),m.append("text");var $,k,C,A,M=m.select("line"),T=v.select("line"),S=f.select("text").text(p),D=m.select("text"),E=v.select("text"),L="top"===i||"left"===i?-1:1;if("bottom"===i||"top"===i?(e=Go,$="x",C="y",k="x2",A="y2",S.attr("dy",0>L?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+b[0]+","+L*o+"V0H"+b[1]+"V"+L*o)):(e=Ko,$="y",C="x",k="y2",A="x2",S.attr("dy",".32em").style("text-anchor",0>L?"end":"start"),w.attr("d","M"+L*o+","+b[0]+"H0V"+b[1]+"H"+L*o)),M.attr(A,L*r),D.attr(C,L*_),T.attr(k,0).attr(A,L*r),E.attr($,0).attr(C,L*_),d.rangeBand){var F=d,O=F.rangeBand()/2;c=d=function(e){return F(e)+O}}else c.rangeBand?c=d:g.call(e,d,c);m.call(e,c,d),v.call(e,d,d)})}var t,n=na.scale.linear(),i=Yl,r=6,o=6,a=3,s=[10],l=null;return e.scale=function(t){return arguments.length?(n=t,e):n},e.orient=function(t){return arguments.length?(i=t in jl?t+"":Yl,e):i},e.ticks=function(){return arguments.length?(s=arguments,e):s},e.tickValues=function(t){return arguments.length?(l=t,e):l},e.tickFormat=function(n){return arguments.length?(t=n,e):t},e.tickSize=function(t){var n=arguments.length;return n?(r=+t,o=+arguments[n-1],e):r},e.innerTickSize=function(t){return arguments.length?(r=+t,e):r},e.outerTickSize=function(t){return arguments.length?(o=+t,e):o},e.tickPadding=function(t){return arguments.length?(a=+t,e):a},e.tickSubdivide=function(){return arguments.length&&e},e};var Yl="bottom",jl={top:1,right:1,bottom:1,left:1};na.svg.brush=function(){function e(t){t.each(function(){var t=na.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",o).on("touchstart.brush",o),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var s=t.selectAll(".resize").data(m,y);s.exit().remove(),s.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Nl[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),s.style("display",e.empty()?"none":null);var l,d=na.transition(t),h=na.transition(a);u&&(l=Ir(u),h.attr("x",l[0]).attr("width",l[1]-l[0]),i(d)),c&&(l=Ir(c),h.attr("y",l[0]).attr("height",l[1]-l[0]),r(d)),n(d)})}function n(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+d[+/e$/.test(e)]+","+h[+/^s/.test(e)]+")"})}function i(e){e.select(".extent").attr("x",d[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",d[1]-d[0])}function r(e){e.select(".extent").attr("y",h[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function o(){function o(){32==na.event.keyCode&&(S||(_=null,E[0]-=d[1],E[1]-=h[1],S=2),k())}function m(){32==na.event.keyCode&&2==S&&(E[0]+=d[1],E[1]+=h[1],S=0,k())}function g(){var e=na.mouse(x),t=!1;b&&(e[0]+=b[0],e[1]+=b[1]),S||(na.event.altKey?(_||(_=[(d[0]+d[1])/2,(h[0]+h[1])/2]),E[0]=d[+(e[0]<_[0])],E[1]=h[+(e[1]<_[1])]):_=null),M&&v(e,u,0)&&(i(C),t=!0),T&&v(e,c,1)&&(r(C),t=!0),t&&(n(C),$({type:"brush",mode:S?"move":"resize"}))}function v(e,t,n){var i,r,o=Ir(t),l=o[0],u=o[1],c=E[n],m=n?h:d,g=m[1]-m[0];return S&&(l-=c,u-=g+c),i=(n?f:p)?Math.max(l,Math.min(u,e[n])):e[n],S?r=(i+=c)+g:(_&&(c=Math.max(l,Math.min(u,2*_[n]-i))),i>c?(r=i,i=c):r=c),m[0]!=i||m[1]!=r?(n?s=null:a=null,m[0]=i,m[1]=r,!0):void 0}function y(){g(),C.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null),na.select("body").style("cursor",null),L.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),D(),$({type:"brushend"})}var _,b,x=this,w=na.select(na.event.target),$=l.of(x,arguments),C=na.select(x),A=w.datum(),M=!/^(n|s)$/.test(A)&&u,T=!/^(e|w)$/.test(A)&&c,S=w.classed("extent"),D=G(x),E=na.mouse(x),L=na.select(t(x)).on("keydown.brush",o).on("keyup.brush",m);if(na.event.changedTouches?L.on("touchmove.brush",g).on("touchend.brush",y):L.on("mousemove.brush",g).on("mouseup.brush",y),C.interrupt().selectAll("*").interrupt(),S)E[0]=d[0]-E[0],E[1]=h[0]-E[1];else if(A){var F=+/w$/.test(A),O=+/^n/.test(A);b=[d[1-F]-E[0],h[1-O]-E[1]],E[0]=d[F],E[1]=h[O]}else na.event.altKey&&(_=E.slice());C.style("pointer-events","none").selectAll(".resize").style("display",null),na.select("body").style("cursor",w.style("cursor")),$({type:"brushstart"}),g()}var a,s,l=A(e,"brushstart","brush","brushend"),u=null,c=null,d=[0,0],h=[0,0],p=!0,f=!0,m=Hl[0];return e.event=function(e){e.each(function(){var e=l.of(this,arguments),t={x:d,y:h,i:a,j:s},n=this.__chart__||t;this.__chart__=t,Ol?na.select(this).transition().each("start.brush",function(){a=n.i,s=n.j,d=n.x,h=n.y,e({type:"brushstart"})}).tween("brush:brush",function(){var n=_i(d,t.x),i=_i(h,t.y);return a=s=null,function(r){d=t.x=n(r),h=t.y=i(r),e({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,s=t.j,e({type:"brush",mode:"resize"}),e({type:"brushend"})}):(e({type:"brushstart"}),e({type:"brush",mode:"resize"}),e({type:"brushend"}))})},e.x=function(t){return arguments.length?(u=t,m=Hl[!u<<1|!c],e):u},e.y=function(t){return arguments.length?(c=t,m=Hl[!u<<1|!c],e):c},e.clamp=function(t){return arguments.length?(u&&c?(p=!!t[0],f=!!t[1]):u?p=!!t:c&&(f=!!t),e):u&&c?[p,f]:u?p:c?f:null},e.extent=function(t){var n,i,r,o,l;return arguments.length?(u&&(n=t[0],i=t[1],c&&(n=n[0],i=i[0]),a=[n,i],u.invert&&(n=u(n),i=u(i)),n>i&&(l=n,n=i,i=l),(n!=d[0]||i!=d[1])&&(d=[n,i])),c&&(r=t[0],o=t[1],u&&(r=r[1],o=o[1]),s=[r,o],c.invert&&(r=c(r),o=c(o)),r>o&&(l=r,r=o,o=l),(r!=h[0]||o!=h[1])&&(h=[r,o])),e):(u&&(a?(n=a[0],i=a[1]):(n=d[0],i=d[1],u.invert&&(n=u.invert(n),i=u.invert(i)),n>i&&(l=n,n=i,i=l))),c&&(s?(r=s[0],o=s[1]):(r=h[0],o=h[1],c.invert&&(r=c.invert(r),o=c.invert(o)),r>o&&(l=r,r=o,o=l))),u&&c?[[n,r],[i,o]]:u?[n,i]:c&&[r,o])},e.clear=function(){return e.empty()||(d=[0,0],h=[0,0],a=s=null),e},e.empty=function(){return!!u&&d[0]==d[1]||!!c&&h[0]==h[1]},na.rebind(e,l,"on")};var Nl={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Hl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],zl=ls.format=fs.timeFormat,ql=zl.utc,Wl=ql("%Y-%m-%dT%H:%M:%S.%LZ");zl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Jo:Wl,Jo.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Jo.toString=Wl.toString,ls.second=Ye(function(e){return new us(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))},function(e){return e.getSeconds()}),ls.seconds=ls.second.range,ls.seconds.utc=ls.second.utc.range,ls.minute=Ye(function(e){return new us(6e4*Math.floor(e/6e4))},function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))},function(e){return e.getMinutes()}),ls.minutes=ls.minute.range,ls.minutes.utc=ls.minute.utc.range,ls.hour=Ye(function(e){var t=e.getTimezoneOffset()/60;return new us(36e5*(Math.floor(e/36e5-t)+t))},function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))},function(e){return e.getHours()}),ls.hours=ls.hour.range,ls.hours.utc=ls.hour.utc.range,ls.month=Ye(function(e){return e=ls.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),ls.months=ls.month.range,ls.months.utc=ls.month.utc.range;var Ul=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Vl=[[ls.second,1],[ls.second,5],[ls.second,15],[ls.second,30],[ls.minute,1],[ls.minute,5],[ls.minute,15],[ls.minute,30],[ls.hour,1],[ls.hour,3],[ls.hour,6],[ls.hour,12],[ls.day,1],[ls.day,2],[ls.week,1],[ls.month,1],[ls.month,3],[ls.year,1]],Xl=zl.multi([[".%L",function(e){
|
144
|
+
return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",Tt]]),Gl={range:function(e,t,n){return na.range(Math.ceil(e/n)*n,+t,n).map(Zo)},floor:y,ceil:y};Vl.year=ls.year,ls.scale=function(){return Qo(na.scale.linear(),Vl,Xl)};var Kl=Vl.map(function(e){return[e[0].utc,e[1]]}),Jl=ql.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",Tt]]);Kl.year=ls.year.utc,ls.scale.utc=function(){return Qo(na.scale.linear(),Kl,Jl)},na.text=Me(function(e){return e.responseText}),na.json=function(e,t){return Te(e,"application/json",ea,t)},na.html=function(e,t){return Te(e,"text/html",ta,t)},na.xml=Me(function(e){return e.responseXML}),"function"==typeof define&&define.amd?define(na):"object"==typeof module&&module.exports&&(module.exports=na),this.d3=na}();var mod;mod=angular.module("infinite-scroll",[]),mod.value("THROTTLE_MILLISECONDS",null),mod.directive("infiniteScroll",["$rootScope","$window","$interval","THROTTLE_MILLISECONDS",function(e,t,n,i){return{scope:{infiniteScroll:"&",infiniteScrollContainer:"=",infiniteScrollDistance:"=",infiniteScrollDisabled:"=",infiniteScrollUseDocumentBottom:"=",infiniteScrollListenForEvent:"@"},link:function(r,o,a){var s,l,u,c,d,h,p,f,m,g,v,y,_,b,x,w,$,k;return k=angular.element(t),_=null,b=null,l=null,u=null,g=!0,$=!1,w=null,m=function(e){return e=e[0]||e,isNaN(e.offsetHeight)?e.document.documentElement.clientHeight:e.offsetHeight},v=function(e){return e[0].getBoundingClientRect&&!e.css("none")?e[0].getBoundingClientRect().top+y(e):void 0},y=function(e){return e=e[0]||e,isNaN(window.pageYOffset)?e.document.documentElement.scrollTop:e.ownerDocument.defaultView.pageYOffset},f=function(){var t,n,i,a,s;return u===k?(t=m(u)+y(u[0].document.documentElement),i=v(o)+m(o)):(t=m(u),n=0,void 0!==v(u)&&(n=v(u)),i=v(o)-n+m(o)),$&&(i=m((o[0].ownerDocument||o[0].document).documentElement)),a=i-t,s=a<=m(u)*_+1,s?(l=!0,b?r.$$phase||e.$$phase?r.infiniteScroll():r.$apply(r.infiniteScroll):void 0):l=!1},x=function(e,t){var i,r,o;return o=null,r=0,i=function(){var t;return r=(new Date).getTime(),n.cancel(o),o=null,e.call(),t=null},function(){var a,s;return a=(new Date).getTime(),s=t-(a-r),0>=s?(clearTimeout(o),n.cancel(o),o=null,r=a,e.call()):o?void 0:o=n(i,s,1)}},null!=i&&(f=x(f,i)),r.$on("$destroy",function(){return u.unbind("scroll",f),null!=w?(w(),w=null):void 0}),h=function(e){return _=parseFloat(e)||0},r.$watch("infiniteScrollDistance",h),h(r.infiniteScrollDistance),d=function(e){return b=!e,b&&l?(l=!1,f()):void 0},r.$watch("infiniteScrollDisabled",d),d(r.infiniteScrollDisabled),p=function(e){return $=e},r.$watch("infiniteScrollUseDocumentBottom",p),p(r.infiniteScrollUseDocumentBottom),s=function(e){return null!=u&&u.unbind("scroll",f),u=e,null!=e?u.bind("scroll",f):void 0},s(k),r.infiniteScrollListenForEvent&&(w=e.$on(r.infiniteScrollListenForEvent,f)),c=function(e){if(null!=e&&0!==e.length){if(e instanceof HTMLElement?e=angular.element(e):"function"==typeof e.append?e=angular.element(e[e.length-1]):"string"==typeof e&&(e=angular.element(document.querySelector(e))),null!=e)return s(e);throw new Exception("invalid infinite-scroll-container attribute.")}},r.$watch("infiniteScrollContainer",c),c(r.infiniteScrollContainer||[]),null!=a.infiniteScrollParent&&s(angular.element(o.parent())),null!=a.infiniteScrollImmediateCheck&&(g=r.$eval(a.infiniteScrollImmediateCheck)),n(function(){return g?f():void 0},0,1)}}}]),function(e,t,n){"use strict";t.module("ngClipboard",[]).provider("ngClip",function(){var e=this;return this.path="//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.1.6/ZeroClipboard.swf",{setPath:function(t){e.path=t},setConfig:function(t){e.config=t},$get:function(){return{path:e.path,config:e.config}}}}).run(["ngClip",function(e){var n={swfPath:e.path,trustedDomains:["*"],allowScriptAccess:"always",forceHandCursor:!0};ZeroClipboard.config(t.extend(n,e.config||{}))}]).directive("clipCopy",["ngClip",function(e){return{scope:{clipCopy:"&",clipClick:"&",clipClickFallback:"&"},restrict:"A",link:function(e,n,i){if(ZeroClipboard.isFlashUnusable())return void n.bind("click",function(t){e.$apply(e.clipClickFallback({$event:t,copy:e.$eval(e.clipCopy)}))});var r=new ZeroClipboard(n);""===i.clipCopy&&(e.clipCopy=function(e){return n[0].previousElementSibling.innerText}),r.on("ready",function(n){r.on("copy",function(t){var n=t.clipboardData;n.setData(i.clipCopyMimeType||"text/plain",e.$eval(e.clipCopy))}),r.on("aftercopy",function(n){t.isDefined(i.clipClick)&&e.$apply(e.clipClick)}),e.$on("$destroy",function(){r.destroy()})})}}}])}(window,window.angular),/*! ngTagsInput v2.3.0 License: MIT */
|
145
|
+
!function(){"use strict";var e={backspace:8,tab:9,enter:13,escape:27,space:32,up:38,down:40,left:37,right:39,"delete":46,comma:188},t=9007199254740991,n=["text","email","url"],i=angular.module("ngTagsInput",[]);i.directive("tagsInput",["$timeout","$document","$window","tagsInputConfig","tiUtil",function(i,r,o,a,s){function l(e,t,n,i){var r,o,a,l={};return r=function(t){return s.safeToString(t[e.displayProperty])},o=function(t,n){t[e.displayProperty]=n},a=function(t){var i=r(t);return i&&i.length>=e.minLength&&i.length<=e.maxLength&&e.allowedTagsPattern.test(i)&&!s.findInObjectArray(l.items,t,e.keyProperty||e.displayProperty)&&n({$tag:t})},l.items=[],l.addText=function(e){var t={};return o(t,e),l.add(t)},l.add=function(n){var i=r(n);return e.replaceSpacesWithDashes&&(i=s.replaceSpacesWithDashes(i)),o(n,i),a(n)?(l.items.push(n),t.trigger("tag-added",{$tag:n})):i&&t.trigger("invalid-tag",{$tag:n}),n},l.remove=function(e){var n=l.items[e];return i({$tag:n})?(l.items.splice(e,1),l.clearSelection(),t.trigger("tag-removed",{$tag:n}),n):void 0},l.select=function(e){0>e?e=l.items.length-1:e>=l.items.length&&(e=0),l.index=e,l.selected=l.items[e]},l.selectPrior=function(){l.select(--l.index)},l.selectNext=function(){l.select(++l.index)},l.removeSelected=function(){return l.remove(l.index)},l.clearSelection=function(){l.selected=null,l.index=-1},l.clearSelection(),l}function u(e){return-1!==n.indexOf(e)}return{restrict:"E",require:"ngModel",scope:{tags:"=ngModel",onTagAdding:"&",onTagAdded:"&",onInvalidTag:"&",onTagRemoving:"&",onTagRemoved:"&"},replace:!1,transclude:!0,templateUrl:"ngTagsInput/tags-input.html",controller:["$scope","$attrs","$element",function(e,n,i){e.events=s.simplePubSub(),a.load("tagsInput",e,n,{template:[String,"ngTagsInput/tag-item.html"],type:[String,"text",u],placeholder:[String,"Add a tag"],tabindex:[Number,null],removeTagSymbol:[String,String.fromCharCode(215)],replaceSpacesWithDashes:[Boolean,!0],minLength:[Number,3],maxLength:[Number,t],addOnEnter:[Boolean,!0],addOnSpace:[Boolean,!1],addOnComma:[Boolean,!0],addOnBlur:[Boolean,!0],addOnPaste:[Boolean,!1],pasteSplitPattern:[RegExp,/,/],allowedTagsPattern:[RegExp,/.+/],enableEditingLastTag:[Boolean,!1],minTags:[Number,0],maxTags:[Number,t],displayProperty:[String,"text"],keyProperty:[String,""],allowLeftoverText:[Boolean,!1],addFromAutocompleteOnly:[Boolean,!1],spellcheck:[Boolean,!0]}),e.tagList=new l(e.options,e.events,s.handleUndefinedResult(e.onTagAdding,!0),s.handleUndefinedResult(e.onTagRemoving,!0)),this.registerAutocomplete=function(){var t=i.find("input");return{addTag:function(t){return e.tagList.add(t)},focusInput:function(){t[0].focus()},getTags:function(){return e.tags},getCurrentTagText:function(){return e.newTag.text},getOptions:function(){return e.options},on:function(t,n){return e.events.on(t,n),this}}},this.registerTagItem=function(){return{getOptions:function(){return e.options},removeTag:function(t){e.disabled||e.tagList.remove(t)}}}}],link:function(t,n,a,l){var u,c=[e.enter,e.comma,e.space,e.backspace,e["delete"],e.left,e.right],d=t.tagList,h=t.events,p=t.options,f=n.find("input"),m=["minTags","maxTags","allowLeftoverText"];u=function(){l.$setValidity("maxTags",t.tags.length<=p.maxTags),l.$setValidity("minTags",t.tags.length>=p.minTags),l.$setValidity("leftoverText",t.hasFocus||p.allowLeftoverText?!0:!t.newTag.text)},l.$isEmpty=function(e){return!e||!e.length},t.newTag={text:"",invalid:null,setText:function(e){this.text=e,h.trigger("input-change",e)}},t.track=function(e){return e[p.keyProperty||p.displayProperty]},t.$watch("tags",function(e){t.tags=s.makeObjectArray(e,p.displayProperty),d.items=t.tags}),t.$watch("tags.length",function(){u()}),a.$observe("disabled",function(e){t.disabled=e}),t.eventHandlers={input:{change:function(e){h.trigger("input-change",e)},keydown:function(e){h.trigger("input-keydown",e)},focus:function(){t.hasFocus||(t.hasFocus=!0,h.trigger("input-focus"))},blur:function(){i(function(){var e=r.prop("activeElement"),i=e===f[0],o=n[0].contains(e);(i||!o)&&(t.hasFocus=!1,h.trigger("input-blur"))})},paste:function(e){e.getTextData=function(){var t=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData;return t?t.getData("text/plain"):o.clipboardData.getData("Text")},h.trigger("input-paste",e)}},host:{click:function(){t.disabled||f[0].focus()}}},h.on("tag-added",t.onTagAdded).on("invalid-tag",t.onInvalidTag).on("tag-removed",t.onTagRemoved).on("tag-added",function(){t.newTag.setText("")}).on("tag-added tag-removed",function(){l.$setViewValue(t.tags)}).on("invalid-tag",function(){t.newTag.invalid=!0}).on("option-change",function(e){-1!==m.indexOf(e.name)&&u()}).on("input-change",function(){d.clearSelection(),t.newTag.invalid=null}).on("input-focus",function(){n.triggerHandler("focus"),l.$setValidity("leftoverText",!0)}).on("input-blur",function(){p.addOnBlur&&!p.addFromAutocompleteOnly&&d.addText(t.newTag.text),n.triggerHandler("blur"),u()}).on("input-keydown",function(n){var i,r,o,a,s=n.keyCode,l=n.shiftKey||n.altKey||n.ctrlKey||n.metaKey,u={};if(!l&&-1!==c.indexOf(s)){if(u[e.enter]=p.addOnEnter,u[e.comma]=p.addOnComma,u[e.space]=p.addOnSpace,i=!p.addFromAutocompleteOnly&&u[s],r=(s===e.backspace||s===e["delete"])&&d.selected,a=s===e.backspace&&0===t.newTag.text.length&&p.enableEditingLastTag,o=(s===e.backspace||s===e.left||s===e.right)&&0===t.newTag.text.length&&!p.enableEditingLastTag,i)d.addText(t.newTag.text);else if(a){var h;d.selectPrior(),h=d.removeSelected(),h&&t.newTag.setText(h[p.displayProperty])}else r?d.removeSelected():o&&(s===e.left||s===e.backspace?d.selectPrior():s===e.right&&d.selectNext());(i||o||r||a)&&n.preventDefault()}}).on("input-paste",function(e){if(p.addOnPaste){var t=e.getTextData(),n=t.split(p.pasteSplitPattern);n.length>1&&(n.forEach(function(e){d.addText(e)}),e.preventDefault())}})}}}]),i.directive("tiTagItem",["tiUtil",function(e){return{restrict:"E",require:"^tagsInput",template:'<ng-include src="$$template"></ng-include>',scope:{data:"="},link:function(t,n,i,r){var o=r.registerTagItem(),a=o.getOptions();t.$$template=a.template,t.$$removeTagSymbol=a.removeTagSymbol,t.$getDisplayText=function(){return e.safeToString(t.data[a.displayProperty])},t.$removeTag=function(){o.removeTag(t.$index)},t.$watch("$parent.$index",function(e){t.$index=e})}}}]),i.directive("autoComplete",["$document","$timeout","$sce","$q","tagsInputConfig","tiUtil",function(t,n,i,r,o,a){function s(e,t,n){var i,o,s,l={};return s=function(){return t.tagsInput.keyProperty||t.tagsInput.displayProperty},i=function(e,n){return e.filter(function(e){return!a.findInObjectArray(n,e,s(),function(e,n){return t.tagsInput.replaceSpacesWithDashes&&(e=a.replaceSpacesWithDashes(e),n=a.replaceSpacesWithDashes(n)),a.defaultComparer(e,n)})})},l.reset=function(){o=null,l.items=[],l.visible=!1,l.index=-1,l.selected=null,l.query=null},l.show=function(){t.selectFirstMatch?l.select(0):l.selected=null,l.visible=!0},l.load=a.debounce(function(n,u){l.query=n;var c=r.when(e({$query:n}));o=c,c.then(function(e){c===o&&(e=a.makeObjectArray(e.data||e,s()),e=i(e,u),l.items=e.slice(0,t.maxResultsToShow),l.items.length>0?l.show():l.reset())})},t.debounceDelay),l.selectNext=function(){l.select(++l.index)},l.selectPrior=function(){l.select(--l.index)},l.select=function(e){0>e?e=l.items.length-1:e>=l.items.length&&(e=0),l.index=e,l.selected=l.items[e],n.trigger("suggestion-selected",e)},l.reset(),l}function l(e,t){var n=e.find("li").eq(t),i=n.parent(),r=n.prop("offsetTop"),o=n.prop("offsetHeight"),a=i.prop("clientHeight"),s=i.prop("scrollTop");s>r?i.prop("scrollTop",r):r+o>a+s&&i.prop("scrollTop",r+o-a)}return{restrict:"E",require:"^tagsInput",scope:{source:"&"},templateUrl:"ngTagsInput/auto-complete.html",controller:["$scope","$element","$attrs",function(e,t,n){e.events=a.simplePubSub(),o.load("autoComplete",e,n,{template:[String,"ngTagsInput/auto-complete-match.html"],debounceDelay:[Number,100],minLength:[Number,3],highlightMatchedText:[Boolean,!0],maxResultsToShow:[Number,10],loadOnDownArrow:[Boolean,!1],loadOnEmpty:[Boolean,!1],loadOnFocus:[Boolean,!1],selectFirstMatch:[Boolean,!0],displayProperty:[String,""]}),e.suggestionList=new s(e.source,e.options,e.events),this.registerAutocompleteMatch=function(){return{getOptions:function(){return e.options},getQuery:function(){return e.suggestionList.query}}}}],link:function(t,n,i,r){var o,a=[e.enter,e.tab,e.escape,e.up,e.down],s=t.suggestionList,u=r.registerAutocomplete(),c=t.options,d=t.events;c.tagsInput=u.getOptions(),o=function(e){return e&&e.length>=c.minLength||!e&&c.loadOnEmpty},t.addSuggestionByIndex=function(e){s.select(e),t.addSuggestion()},t.addSuggestion=function(){var e=!1;return s.selected&&(u.addTag(angular.copy(s.selected)),s.reset(),u.focusInput(),e=!0),e},t.track=function(e){return e[c.tagsInput.keyProperty||c.tagsInput.displayProperty]},u.on("tag-added invalid-tag input-blur",function(){s.reset()}).on("input-change",function(e){o(e)?s.load(e,u.getTags()):s.reset()}).on("input-focus",function(){var e=u.getCurrentTagText();c.loadOnFocus&&o(e)&&s.load(e,u.getTags())}).on("input-keydown",function(n){var i=n.keyCode,r=!1;return-1!==a.indexOf(i)?(s.visible?i===e.down?(s.selectNext(),r=!0):i===e.up?(s.selectPrior(),r=!0):i===e.escape?(s.reset(),r=!0):(i===e.enter||i===e.tab)&&(r=t.addSuggestion()):i===e.down&&t.options.loadOnDownArrow&&(s.load(u.getCurrentTagText(),u.getTags()),r=!0),r?(n.preventDefault(),n.stopImmediatePropagation(),!1):void 0):void 0}),d.on("suggestion-selected",function(e){l(n,e)})}}}]),i.directive("tiAutocompleteMatch",["$sce","tiUtil",function(e,t){return{restrict:"E",require:"^autoComplete",template:'<ng-include src="$$template"></ng-include>',scope:{data:"="},link:function(n,i,r,o){var a=o.registerAutocompleteMatch(),s=a.getOptions();n.$$template=s.template,n.$index=n.$parent.$index,n.$highlight=function(n){return s.highlightMatchedText&&(n=t.safeHighlight(n,a.getQuery())),e.trustAsHtml(n)},n.$getDisplayText=function(){return t.safeToString(n.data[s.displayProperty||s.tagsInput.displayProperty])}}}}]),i.directive("tiTranscludeAppend",function(){return function(e,t,n,i,r){r(function(e){t.append(e)})}}),i.directive("tiAutosize",["tagsInputConfig",function(e){return{restrict:"A",require:"ngModel",link:function(t,n,i,r){var o,a,s=e.getTextAutosizeThreshold();o=angular.element('<span class="input"></span>'),o.css("display","none").css("visibility","hidden").css("width","auto").css("white-space","pre"),n.parent().append(o),a=function(e){var t,r=e;return angular.isString(r)&&0===r.length&&(r=i.placeholder),r&&(o.text(r),o.css("display",""),t=o.prop("offsetWidth"),o.css("display","none")),n.css("width",t?t+s+"px":""),e},r.$parsers.unshift(a),r.$formatters.unshift(a),i.$observe("placeholder",function(e){r.$modelValue||a(e)})}}}]),i.directive("tiBindAttrs",function(){return function(e,t,n){e.$watch(n.tiBindAttrs,function(e){angular.forEach(e,function(e,t){n.$set(t,e)})},!0)}}),i.provider("tagsInputConfig",function(){var e={},t={},n=3;this.setDefaults=function(t,n){return e[t]=n,this},this.setActiveInterpolation=function(e,n){return t[e]=n,this},this.setTextAutosizeThreshold=function(e){return n=e,this},this.$get=["$interpolate",function(i){var r={};return r[String]=function(e){return e},r[Number]=function(e){return parseInt(e,10)},r[Boolean]=function(e){return"true"===e.toLowerCase()},r[RegExp]=function(e){return new RegExp(e)},{load:function(n,o,a,s){var l=function(){return!0};o.options={},angular.forEach(s,function(s,u){var c,d,h,p,f,m;c=s[0],d=s[1],h=s[2]||l,p=r[c],f=function(){var t=e[n]&&e[n][u];return angular.isDefined(t)?t:d},m=function(e){o.options[u]=e&&h(e)?p(e):f()},t[n]&&t[n][u]?a.$observe(u,function(e){m(e),o.events.trigger("option-change",{name:u,newValue:e})}):m(a[u]&&i(a[u])(o.$parent))})},getTextAutosizeThreshold:function(){return n}}}]}),i.factory("tiUtil",["$timeout",function(e){var t={};return t.debounce=function(t,n){var i;return function(){var r=arguments;e.cancel(i),i=e(function(){t.apply(null,r)},n)}},t.makeObjectArray=function(e,t){return e=e||[],e.length>0&&!angular.isObject(e[0])&&e.forEach(function(n,i){e[i]={},e[i][t]=n}),e},t.findInObjectArray=function(e,n,i,r){var o=null;return r=r||t.defaultComparer,e.some(function(e){return r(e[i],n[i])?(o=e,!0):void 0}),o},t.defaultComparer=function(e,n){return t.safeToString(e).toLowerCase()===t.safeToString(n).toLowerCase()},t.safeHighlight=function(e,n){function i(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}if(!n)return e;e=t.encodeHTML(e),n=t.encodeHTML(n);var r=new RegExp("&[^;]+;|"+i(n),"gi");return e.replace(r,function(e){return e.toLowerCase()===n.toLowerCase()?"<em>"+e+"</em>":e})},t.safeToString=function(e){return angular.isUndefined(e)||null==e?"":e.toString().trim()},t.encodeHTML=function(e){return t.safeToString(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},t.handleUndefinedResult=function(e,t){return function(){var n=e.apply(null,arguments);return angular.isUndefined(n)?t:n}},t.replaceSpacesWithDashes=function(e){return t.safeToString(e).replace(/\s/g,"-")},t.simplePubSub=function(){var e={};return{on:function(t,n){return t.split(" ").forEach(function(t){e[t]||(e[t]=[]),e[t].push(n)}),this},trigger:function(n,i){var r=e[n]||[];return r.every(function(e){return t.handleUndefinedResult(e,!0)(i)}),this}}},t}]),i.run(["$templateCache",function(e){e.put("ngTagsInput/tags-input.html",'<div class="host" tabindex="-1" ng-click="eventHandlers.host.click()" ti-transclude-append=""><div class="tags" ng-class="{focused: hasFocus}"><ul class="tag-list"><li class="tag-item" ng-repeat="tag in tagList.items track by track(tag)" ng-class="{ selected: tag == tagList.selected }"><ti-tag-item data="tag"></ti-tag-item></li></ul><input class="input" autocomplete="off" ng-model="newTag.text" ng-change="eventHandlers.input.change(newTag.text)" ng-keydown="eventHandlers.input.keydown($event)" ng-focus="eventHandlers.input.focus($event)" ng-blur="eventHandlers.input.blur($event)" ng-paste="eventHandlers.input.paste($event)" ng-trim="false" ng-class="{\'invalid-tag\': newTag.invalid}" ng-disabled="disabled" ti-bind-attrs="{type: options.type, placeholder: options.placeholder, tabindex: options.tabindex, spellcheck: options.spellcheck}" ti-autosize=""></div></div>'),e.put("ngTagsInput/tag-item.html",'<span ng-bind="$getDisplayText()"></span> <a class="remove-button" ng-click="$removeTag()" ng-bind="$$removeTagSymbol"></a>'),e.put("ngTagsInput/auto-complete.html",'<div class="autocomplete" ng-if="suggestionList.visible"><ul class="suggestion-list"><li class="suggestion-item" ng-repeat="item in suggestionList.items track by track(item)" ng-class="{selected: item == suggestionList.selected}" ng-click="addSuggestionByIndex($index)" ng-mouseenter="suggestionList.select($index)"><ti-autocomplete-match data="item"></ti-autocomplete-match></li></ul></div>'),e.put("ngTagsInput/auto-complete-match.html",'<span ng-bind-html="$highlight($getDisplayText())"></span>')}])}(),function(e,t){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(function(){return t()}):e.pluralize=t()}(this,function(){function e(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}function t(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function n(t,n){return t===t.toUpperCase()?n.toUpperCase():t[0]===t[0].toUpperCase()?e(n):n.toLowerCase()}function i(e,t){return e.replace(/\$(\d{1,2})/g,function(e,n){return t[n]||""})}function r(e,t,r){if(!e.length||u.hasOwnProperty(e))return t;for(var o=r.length;o--;){var a=r[o];if(a[0].test(t))return t.replace(a[0],function(e,t,r){var o=i(a[1],arguments);return""===e?n(r[t-1],o):n(e,o)})}return t}function o(e,t,i){return function(o){var a=o.toLowerCase();return t.hasOwnProperty(a)?n(o,a):e.hasOwnProperty(a)?n(o,e[a]):r(a,o,i)}}function a(e,t,n){var i=1===t?a.singular(e):a.plural(e);return(n?t+" ":"")+i}var s=[],l=[],u={},c={},d={};return a.plural=o(d,c,s),a.singular=o(c,d,l),a.addPluralRule=function(e,n){s.push([t(e),n])},a.addSingularRule=function(e,n){l.push([t(e),n])},a.addUncountableRule=function(e){return"string"==typeof e?void(u[e.toLowerCase()]=!0):(a.addPluralRule(e,"$0"),void a.addSingularRule(e,"$0"))},a.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),d[e]=t,c[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["thief","thieves"],["genie","genies"],["groove","grooves"],["pickaxe","pickaxes"],["whiskey","whiskies"]].forEach(function(e){return a.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|tlas|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[emjzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/(m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return a.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(?:sis|ses)$/i,"$1sis"],[/(^analy)(?:sis|ses)$/i,"$1sis"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/([^aeiouy]|qu)ies$/i,"$1y"],[/(^[pl]|zomb|^(?:neck)?t|[aeo][lt]|cut)ies$/i,"$1ie"],[/(\b(?:mon|smil))ies$/i,"$1ey"],[/(m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|tlas|gas|(?:her|at|gr)o|ris)(?:es)?$/i,"$1"],[/(e[mn]u)s?$/i,"$1"],[/(movie|twelve)s$/i,"$1"],[/(cris|test|diagnos)(?:is|es)$/i,"$1is"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(e){return a.addSingularRule(e[0],e[1])}),["advice","adulthood","agenda","aid","alcohol","ammo","athletics","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","commerce","cod","cooperation","corps","digestion","debris","diabetes","energy","equipment","elk","excretion","expertise","flounder","fun","gallows","garbage","graffiti","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","media","mews","moose","music","news","pike","plankton","pliers","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","species","staff","swine","trout","traffic","transporation","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pox$/i,/ois$/i,/deer$/i,/fish$/i,/sheep$/i,/measles$/i,/[^aeiou]ese$/i].forEach(a.addUncountableRule),a}),function(){function e(e){function t(t,n,i,r,o,a){for(;o>=0&&a>o;o+=e){var s=r?r[o]:o;i=n(i,t[s],s,t)}return i}return function(n,i,r,o){i=_(i,o,4);var a=!A(n)&&y.keys(n),s=(a||n).length,l=e>0?0:s-1;return arguments.length<3&&(r=n[a?a[l]:l],l+=e),t(n,i,r,a,l,s)}}function t(e){return function(t,n,i){n=b(n,i);for(var r=C(t),o=e>0?0:r-1;o>=0&&r>o;o+=e)if(n(t[o],o,t))return o;return-1}}function n(e,t,n){return function(i,r,o){var a=0,s=C(i);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=t(c.call(i,a,s),y.isNaN),o>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&s>o;o+=e)if(i[o]===r)return o;return-1}}function i(e,t){var n=E.length,i=e.constructor,r=y.isFunction(i)&&i.prototype||s,o="constructor";for(y.has(e,o)&&!y.contains(t,o)&&t.push(o);n--;)o=E[n],o in e&&e[o]!==r[o]&&!y.contains(t,o)&&t.push(o)}var r=this,o=r._,a=Array.prototype,s=Object.prototype,l=Function.prototype,u=a.push,c=a.slice,d=s.toString,h=s.hasOwnProperty,p=Array.isArray,f=Object.keys,m=l.bind,g=Object.create,v=function(){},y=function(e){return e instanceof y?e:this instanceof y?void(this._wrapped=e):new y(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=y),exports._=y):r._=y,y.VERSION="1.8.3";var _=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)};case 4:return function(n,i,r,o){return e.call(t,n,i,r,o)}}return function(){return e.apply(t,arguments)}},b=function(e,t,n){return null==e?y.identity:y.isFunction(e)?_(e,t,n):y.isObject(e)?y.matcher(e):y.property(e)};y.iteratee=function(e,t){return b(e,t,1/0)};var x=function(e,t){return function(n){var i=arguments.length;if(2>i||null==n)return n;for(var r=1;i>r;r++)for(var o=arguments[r],a=e(o),s=a.length,l=0;s>l;l++){var u=a[l];t&&void 0!==n[u]||(n[u]=o[u])}return n}},w=function(e){if(!y.isObject(e))return{};if(g)return g(e);v.prototype=e;var t=new v;return v.prototype=null,t},$=function(e){return function(t){return null==t?void 0:t[e]}},k=Math.pow(2,53)-1,C=$("length"),A=function(e){var t=C(e);return"number"==typeof t&&t>=0&&k>=t};y.each=y.forEach=function(e,t,n){t=_(t,n);var i,r;if(A(e))for(i=0,r=e.length;r>i;i++)t(e[i],i,e);else{var o=y.keys(e);for(i=0,r=o.length;r>i;i++)t(e[o[i]],o[i],e)}return e},y.map=y.collect=function(e,t,n){t=b(t,n);for(var i=!A(e)&&y.keys(e),r=(i||e).length,o=Array(r),a=0;r>a;a++){var s=i?i[a]:a;o[a]=t(e[s],s,e)}return o},y.reduce=y.foldl=y.inject=e(1),y.reduceRight=y.foldr=e(-1),y.find=y.detect=function(e,t,n){var i;return i=A(e)?y.findIndex(e,t,n):y.findKey(e,t,n),void 0!==i&&-1!==i?e[i]:void 0},y.filter=y.select=function(e,t,n){var i=[];return t=b(t,n),y.each(e,function(e,n,r){t(e,n,r)&&i.push(e)}),i},y.reject=function(e,t,n){return y.filter(e,y.negate(b(t)),n)},y.every=y.all=function(e,t,n){t=b(t,n);for(var i=!A(e)&&y.keys(e),r=(i||e).length,o=0;r>o;o++){var a=i?i[o]:o;if(!t(e[a],a,e))return!1}return!0},y.some=y.any=function(e,t,n){t=b(t,n);for(var i=!A(e)&&y.keys(e),r=(i||e).length,o=0;r>o;o++){var a=i?i[o]:o;if(t(e[a],a,e))return!0}return!1},y.contains=y.includes=y.include=function(e,t,n,i){return A(e)||(e=y.values(e)),("number"!=typeof n||i)&&(n=0),y.indexOf(e,t,n)>=0},y.invoke=function(e,t){var n=c.call(arguments,2),i=y.isFunction(t);return y.map(e,function(e){var r=i?t:e[t];return null==r?r:r.apply(e,n)})},y.pluck=function(e,t){return y.map(e,y.property(t))},y.where=function(e,t){return y.filter(e,y.matcher(t))},y.findWhere=function(e,t){return y.find(e,y.matcher(t))},y.max=function(e,t,n){var i,r,o=-(1/0),a=-(1/0);if(null==t&&null!=e){e=A(e)?e:y.values(e);for(var s=0,l=e.length;l>s;s++)i=e[s],i>o&&(o=i)}else t=b(t,n),y.each(e,function(e,n,i){r=t(e,n,i),(r>a||r===-(1/0)&&o===-(1/0))&&(o=e,a=r)});return o},y.min=function(e,t,n){var i,r,o=1/0,a=1/0;if(null==t&&null!=e){e=A(e)?e:y.values(e);for(var s=0,l=e.length;l>s;s++)i=e[s],o>i&&(o=i)}else t=b(t,n),y.each(e,function(e,n,i){r=t(e,n,i),(a>r||r===1/0&&o===1/0)&&(o=e,a=r)});return o},y.shuffle=function(e){for(var t,n=A(e)?e:y.values(e),i=n.length,r=Array(i),o=0;i>o;o++)t=y.random(0,o),t!==o&&(r[o]=r[t]),r[t]=n[o];return r},y.sample=function(e,t,n){return null==t||n?(A(e)||(e=y.values(e)),e[y.random(e.length-1)]):y.shuffle(e).slice(0,Math.max(0,t))},y.sortBy=function(e,t,n){return t=b(t,n),y.pluck(y.map(e,function(e,n,i){return{value:e,index:n,criteria:t(e,n,i)}}).sort(function(e,t){var n=e.criteria,i=t.criteria;if(n!==i){if(n>i||void 0===n)return 1;if(i>n||void 0===i)return-1}return e.index-t.index}),"value")};var M=function(e){return function(t,n,i){var r={};return n=b(n,i),y.each(t,function(i,o){var a=n(i,o,t);e(r,i,a)}),r}};y.groupBy=M(function(e,t,n){y.has(e,n)?e[n].push(t):e[n]=[t]}),y.indexBy=M(function(e,t,n){e[n]=t}),y.countBy=M(function(e,t,n){y.has(e,n)?e[n]++:e[n]=1}),y.toArray=function(e){return e?y.isArray(e)?c.call(e):A(e)?y.map(e,y.identity):y.values(e):[]},y.size=function(e){return null==e?0:A(e)?e.length:y.keys(e).length},y.partition=function(e,t,n){t=b(t,n);var i=[],r=[];return y.each(e,function(e,n,o){(t(e,n,o)?i:r).push(e)}),[i,r]},y.first=y.head=y.take=function(e,t,n){return null==e?void 0:null==t||n?e[0]:y.initial(e,e.length-t)},y.initial=function(e,t,n){return c.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},y.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:y.rest(e,Math.max(0,e.length-t))},y.rest=y.tail=y.drop=function(e,t,n){return c.call(e,null==t||n?1:t)},y.compact=function(e){return y.filter(e,y.identity)};var T=function(e,t,n,i){for(var r=[],o=0,a=i||0,s=C(e);s>a;a++){var l=e[a];if(A(l)&&(y.isArray(l)||y.isArguments(l))){t||(l=T(l,t,n));var u=0,c=l.length;for(r.length+=c;c>u;)r[o++]=l[u++]}else n||(r[o++]=l)}return r};y.flatten=function(e,t){return T(e,t,!1)},y.without=function(e){return y.difference(e,c.call(arguments,1))},y.uniq=y.unique=function(e,t,n,i){y.isBoolean(t)||(i=n,n=t,t=!1),null!=n&&(n=b(n,i));for(var r=[],o=[],a=0,s=C(e);s>a;a++){var l=e[a],u=n?n(l,a,e):l;t?(a&&o===u||r.push(l),o=u):n?y.contains(o,u)||(o.push(u),r.push(l)):y.contains(r,l)||r.push(l)}return r},y.union=function(){return y.uniq(T(arguments,!0,!0))},y.intersection=function(e){for(var t=[],n=arguments.length,i=0,r=C(e);r>i;i++){var o=e[i];if(!y.contains(t,o)){for(var a=1;n>a&&y.contains(arguments[a],o);a++);a===n&&t.push(o)}}return t},y.difference=function(e){var t=T(arguments,!0,!0,1);return y.filter(e,function(e){return!y.contains(t,e)})},y.zip=function(){return y.unzip(arguments)},y.unzip=function(e){for(var t=e&&y.max(e,C).length||0,n=Array(t),i=0;t>i;i++)n[i]=y.pluck(e,i);return n},y.object=function(e,t){for(var n={},i=0,r=C(e);r>i;i++)t?n[e[i]]=t[i]:n[e[i][0]]=e[i][1];return n},y.findIndex=t(1),y.findLastIndex=t(-1),y.sortedIndex=function(e,t,n,i){n=b(n,i,1);for(var r=n(t),o=0,a=C(e);a>o;){var s=Math.floor((o+a)/2);n(e[s])<r?o=s+1:a=s}return o},y.indexOf=n(1,y.findIndex,y.sortedIndex),y.lastIndexOf=n(-1,y.findLastIndex),y.range=function(e,t,n){null==t&&(t=e||0,e=0),n=n||1;for(var i=Math.max(Math.ceil((t-e)/n),0),r=Array(i),o=0;i>o;o++,e+=n)r[o]=e;return r};var S=function(e,t,n,i,r){if(!(i instanceof t))return e.apply(n,r);var o=w(e.prototype),a=e.apply(o,r);return y.isObject(a)?a:o};y.bind=function(e,t){if(m&&e.bind===m)return m.apply(e,c.call(arguments,1));if(!y.isFunction(e))throw new TypeError("Bind must be called on a function");var n=c.call(arguments,2),i=function(){return S(e,i,t,this,n.concat(c.call(arguments)))};return i},y.partial=function(e){var t=c.call(arguments,1),n=function(){for(var i=0,r=t.length,o=Array(r),a=0;r>a;a++)o[a]=t[a]===y?arguments[i++]:t[a];for(;i<arguments.length;)o.push(arguments[i++]);return S(e,n,this,this,o)};return n},y.bindAll=function(e){var t,n,i=arguments.length;if(1>=i)throw new Error("bindAll must be passed function names");for(t=1;i>t;t++)n=arguments[t],e[n]=y.bind(e[n],e);return e},y.memoize=function(e,t){var n=function(i){var r=n.cache,o=""+(t?t.apply(this,arguments):i);return y.has(r,o)||(r[o]=e.apply(this,arguments)),r[o]};return n.cache={},n},y.delay=function(e,t){var n=c.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},y.defer=y.partial(y.delay,y,1),y.throttle=function(e,t,n){var i,r,o,a=null,s=0;n||(n={});var l=function(){s=n.leading===!1?0:y.now(),a=null,o=e.apply(i,r),a||(i=r=null)};return function(){var u=y.now();s||n.leading!==!1||(s=u);var c=t-(u-s);return i=this,r=arguments,0>=c||c>t?(a&&(clearTimeout(a),a=null),s=u,o=e.apply(i,r),a||(i=r=null)):a||n.trailing===!1||(a=setTimeout(l,c)),o}},y.debounce=function(e,t,n){var i,r,o,a,s,l=function(){var u=y.now()-a;t>u&&u>=0?i=setTimeout(l,t-u):(i=null,n||(s=e.apply(o,r),i||(o=r=null)))};return function(){o=this,r=arguments,a=y.now();var u=n&&!i;return i||(i=setTimeout(l,t)),u&&(s=e.apply(o,r),o=r=null),s}},y.wrap=function(e,t){return y.partial(t,e)},y.negate=function(e){return function(){return!e.apply(this,arguments)}},y.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,i=e[t].apply(this,arguments);n--;)i=e[n].call(this,i);return i}},y.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},y.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}},y.once=y.partial(y.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),E=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];y.keys=function(e){if(!y.isObject(e))return[];if(f)return f(e);var t=[];for(var n in e)y.has(e,n)&&t.push(n);return D&&i(e,t),t},y.allKeys=function(e){if(!y.isObject(e))return[];var t=[];for(var n in e)t.push(n);return D&&i(e,t),t},y.values=function(e){for(var t=y.keys(e),n=t.length,i=Array(n),r=0;n>r;r++)i[r]=e[t[r]];return i},y.mapObject=function(e,t,n){t=b(t,n);for(var i,r=y.keys(e),o=r.length,a={},s=0;o>s;s++)i=r[s],a[i]=t(e[i],i,e);return a},y.pairs=function(e){for(var t=y.keys(e),n=t.length,i=Array(n),r=0;n>r;r++)i[r]=[t[r],e[t[r]]];return i},y.invert=function(e){for(var t={},n=y.keys(e),i=0,r=n.length;r>i;i++)t[e[n[i]]]=n[i];return t},y.functions=y.methods=function(e){var t=[];for(var n in e)y.isFunction(e[n])&&t.push(n);return t.sort()},y.extend=x(y.allKeys),y.extendOwn=y.assign=x(y.keys),y.findKey=function(e,t,n){t=b(t,n);for(var i,r=y.keys(e),o=0,a=r.length;a>o;o++)if(i=r[o],t(e[i],i,e))return i},y.pick=function(e,t,n){var i,r,o={},a=e;if(null==a)return o;y.isFunction(t)?(r=y.allKeys(a),i=_(t,n)):(r=T(arguments,!1,!1,1),i=function(e,t,n){return t in n},a=Object(a));for(var s=0,l=r.length;l>s;s++){var u=r[s],c=a[u];i(c,u,a)&&(o[u]=c)}return o},y.omit=function(e,t,n){if(y.isFunction(t))t=y.negate(t);else{var i=y.map(T(arguments,!1,!1,1),String);t=function(e,t){return!y.contains(i,t)}}return y.pick(e,t,n)},y.defaults=x(y.allKeys,!0),y.create=function(e,t){var n=w(e);return t&&y.extendOwn(n,t),n},y.clone=function(e){return y.isObject(e)?y.isArray(e)?e.slice():y.extend({},e):e},y.tap=function(e,t){return t(e),e},y.isMatch=function(e,t){var n=y.keys(t),i=n.length;if(null==e)return!i;for(var r=Object(e),o=0;i>o;o++){var a=n[o];if(t[a]!==r[a]||!(a in r))return!1}return!0};var L=function(e,t,n,i){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof y&&(e=e._wrapped),t instanceof y&&(t=t._wrapped);var r=d.call(e);if(r!==d.call(t))return!1;switch(r){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}var o="[object Array]"===r;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(y.isFunction(a)&&a instanceof a&&y.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],i=i||[];for(var l=n.length;l--;)if(n[l]===e)return i[l]===t;if(n.push(e),i.push(t),o){if(l=e.length,l!==t.length)return!1;for(;l--;)if(!L(e[l],t[l],n,i))return!1}else{var u,c=y.keys(e);if(l=c.length,y.keys(t).length!==l)return!1;for(;l--;)if(u=c[l],!y.has(t,u)||!L(e[u],t[u],n,i))return!1}return n.pop(),i.pop(),!0};y.isEqual=function(e,t){return L(e,t)},y.isEmpty=function(e){return null==e?!0:A(e)&&(y.isArray(e)||y.isString(e)||y.isArguments(e))?0===e.length:0===y.keys(e).length},y.isElement=function(e){
|
146
|
+
return!(!e||1!==e.nodeType)},y.isArray=p||function(e){return"[object Array]"===d.call(e)},y.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},y.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){y["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}}),y.isArguments(arguments)||(y.isArguments=function(e){return y.has(e,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(y.isFunction=function(e){return"function"==typeof e||!1}),y.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},y.isNaN=function(e){return y.isNumber(e)&&e!==+e},y.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===d.call(e)},y.isNull=function(e){return null===e},y.isUndefined=function(e){return void 0===e},y.has=function(e,t){return null!=e&&h.call(e,t)},y.noConflict=function(){return r._=o,this},y.identity=function(e){return e},y.constant=function(e){return function(){return e}},y.noop=function(){},y.property=$,y.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},y.matcher=y.matches=function(e){return e=y.extendOwn({},e),function(t){return y.isMatch(t,e)}},y.times=function(e,t,n){var i=Array(Math.max(0,e));t=_(t,n,1);for(var r=0;e>r;r++)i[r]=t(r);return i},y.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},y.now=Date.now||function(){return(new Date).getTime()};var F={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},O=y.invert(F),R=function(e){var t=function(t){return e[t]},n="(?:"+y.keys(e).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(r,t):e}};y.escape=R(F),y.unescape=R(O),y.result=function(e,t,n){var i=null==e?void 0:e[t];return void 0===i&&(i=n),y.isFunction(i)?i.call(e):i};var B=0;y.uniqueId=function(e){var t=++B+"";return e?e+t:t},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var P=/(.)^/,I={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Y=/\\|'|\r|\n|\u2028|\u2029/g,j=function(e){return"\\"+I[e]};y.template=function(e,t,n){!t&&n&&(t=n),t=y.defaults({},t,y.templateSettings);var i=RegExp([(t.escape||P).source,(t.interpolate||P).source,(t.evaluate||P).source].join("|")+"|$","g"),r=0,o="__p+='";e.replace(i,function(t,n,i,a,s){return o+=e.slice(r,s).replace(Y,j),r=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?o+="'+\n((__t=("+i+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t}),o+="';\n",t.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(t.variable||"obj","_",o)}catch(s){throw s.source=o,s}var l=function(e){return a.call(this,e,y)},u=t.variable||"obj";return l.source="function("+u+"){\n"+o+"}",l},y.chain=function(e){var t=y(e);return t._chain=!0,t};var N=function(e,t){return e._chain?y(t).chain():t};y.mixin=function(e){y.each(y.functions(e),function(t){var n=y[t]=e[t];y.prototype[t]=function(){var e=[this._wrapped];return u.apply(e,arguments),N(this,n.apply(y,e))}})},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=a[e];y.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],N(this,n)}}),y.each(["concat","join","slice"],function(e){var t=a[e];y.prototype[e]=function(){return N(this,t.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return y})}.call(this),KeyBinding.prototype.withKeyFn=function(e){return{name:this.name,bindKey:this.bindKey,keyFn:e,aceKeyCmd:{name:this.name,bindKey:this.bindKey,exec:e},hotKey:{combo:_.toArray(this.bindKey),description:this.name,callback:e}}};var SerializedStorage={set:function(e,t){localStorage.setItem(e,JSON.stringify(t))},get:function(e){return JSON.parse(localStorage.getItem(e))},storage:localStorage},slice=Array.prototype.slice,existy=function(e){return null!=e};_.mixin({cat:function(){return _.flatten(arguments,!0)},cons:function(e,t){return _.cat([e],t)},chunk:function(e,t,n){var i=function(e){if(null==e)return[];var r=_.take(e,t);return t===_.size(r)?_.cons(r,i(_.drop(e,t))):n?[_.take(_.cat(r,n),t)]:[]};return i(e)},chunkAll:function(e,t,n){n=null!=n?n:t;var i=function(e,t,n){return _.isEmpty(e)?[]:_.cons(_.take(e,t),i(_.drop(e,n),t,n))};return i(e,t,n)},mapcat:function(e,t){return _.flatten(_.map(e,t),!0)},interpose:function(e,t){if(!_.isArray(e))throw new TypeError;var n=_.size(e);return 0===n?e:1===n?e:slice.call(_.mapcat(e,function(e){return _.cons(e,[t])}),0,-1)},weave:function(){return _.some(arguments)?1==arguments.length?arguments[0]:_.filter(_.flatten(_.zip.apply(null,arguments),!0),function(e){return null!=e}):[]},interleave:_.weave,repeat:function(e,t){return _.times(e,function(){return t})},cycle:function(e,t){return _.flatten(_.times(e,function(){return t}),!0)},splitAt:function(e,t){return[_.take(e,t),_.drop(e,t)]},iterateUntil:function(e,t,n){for(var i=[],r=e(n);t(r);)i.push(r),r=e(r);return i},takeSkipping:function(e,t){var n=[],i=_.size(e);if(0>=t)return[];if(1===t)return e;for(var r=0;i>r;r+=t)n.push(e[r]);return n},reductions:function(e,t,n){var i=[],r=n;return _.each(e,function(n,o){r=t(r,e[o]),i.push(r)}),i},keepIndexed:function(e,t){return _.filter(_.map(_.range(_.size(e)),function(n){return t(n,e[n])}),existy)},reverseOrder:function(e){if("string"==typeof e)throw new TypeError("Strings cannot be reversed by _.reverseOrder");return slice.call(e).reverse()},combinations:function(){return _.reduce(slice.call(arguments,1),function(e,t){return _.reduce(e,function(e,n){return e.concat(_.map(t,function(e){return n.concat([e])}))},[])},_.map(arguments[0],function(e){return[e]}))}}),_.mixin({isInstanceOf:function(e,t){return e instanceof t},isAssociative:function(e){return _.isArray(e)||_.isObject(e)||_.isArguments(e)},isIndexed:function(e){return _.isArray(e)||_.isString(e)||_.isArguments(e)},isSequential:function(e){return _.isArray(e)||_.isArguments(e)},isPlainObject:function(e){return _.isObject(e)&&e.constructor===Object},isZero:function(e){return 0===e},isEven:function(e){return _.isFinite(e)&&0===(1&e)},isOdd:function(e){return _.isFinite(e)&&!_.isEven(e)},isPositive:function(e){return e>0},isNegative:function(e){return 0>e},isValidDate:function(e){return _.isDate(e)&&!_.isNaN(e.getTime())},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isInteger:function(e){return _.isNumeric(e)&&e%1===0},isFloat:function(e){return _.isNumeric(e)&&!_.isInteger(e)},isJSON:function(e){try{JSON.parse(e)}catch(t){return!1}return!0},isIncreasing:function(){var e=_.size(arguments);if(1===e)return!0;if(2===e)return arguments[0]<arguments[1];for(var t=1;e>t;t++)if(arguments[t-1]>=arguments[t])return!1;return!0},isDecreasing:function(){var e=_.size(arguments);if(1===e)return!0;if(2===e)return arguments[0]>arguments[1];for(var t=1;e>t;t++)if(arguments[t-1]<=arguments[t])return!1;return!0}});var slice=Array.prototype.slice,concat=Array.prototype.concat,existy=function(e){return null!=e},truthy=function(e){return e!==!1&&existy(e)},isAssociative=function(e){return _.isArray(e)||_.isObject(e)},curry2=function(e){return function(t){return function(n){return e(n,t)}}};_.mixin({merge:function(){var e=_.some(arguments)?{}:null;return truthy(e)&&_.extend.apply(null,concat.call([e],_.toArray(arguments))),e},renameKeys:function(e,t){return _.reduce(t,function(t,n,i){return existy(e[i])?(t[n]=e[i],t):t},_.omit.apply(null,concat.call([e],_.keys(t))))},snapshot:function(e){if(null==e||"object"!=typeof e)return e;var t=new e.constructor;for(var n in e)e.hasOwnProperty(n)&&(t[n]=_.snapshot(e[n]));return t},updatePath:function(e,t,n,i){if(!isAssociative(e))throw new TypeError("Attempted to update a non-associative object.");if(!existy(n))return t(e);var r=_.isArray(n),o=r?n:[n],a=r?_.snapshot(e):_.clone(e),s=_.last(o),l=a;return _.each(_.initial(o),function(e){i&&!_.has(l,e)&&(l[e]=_.clone(i)),l=l[e]}),l[s]=t(l[s]),a},setPath:function(e,t,n,i){if(!existy(n))throw new TypeError("Attempted to set a property at a null path.");return _.updatePath(e,function(){return t},n,i)},frequencies:curry2(_.countBy)(_.identity)});var concat=Array.prototype.concat,ArrayProto=Array.prototype,slice=ArrayProto.slice;_.mixin({accessor:function(e){return function(t){return t&&t[e]}},dictionary:function(e){return function(t){return e&&t&&e[t]}},selectKeys:function(e,t){return _.pick.apply(null,concat.call([e],t))},kv:function(e,t){return _.has(e,t)?[t,e[t]]:void 0},getPath:function(e,t){t="string"==typeof t?keysFromPath(t):t;for(var n=-1,i=t.length;++n<i&&null!=e;)e=e[t[n]];return n===i?e:void 0},hasPath:function(e,t){t="string"==typeof t?keysFromPath(t):t;for(var n=-1,i=t.length;++n<i&&_.isObject(e);){if(!(t[n]in e))return!1;e=e[t[n]]}return n===i},keysFromPath:keysFromPath,pickWhen:function(e,t){var n={};return _.each(e,function(i,r){t(e[r])&&(n[r]=e[r])}),n},omitWhen:function(e,t){return _.pickWhen(e,function(e){return!t(e)})}}),_.mixin({exists:function(e){return null!=e},truthy:function(e){return e!==!1&&_.exists(e)},falsey:function(e){return!_.truthy(e)},not:function(e){return!e},firstExisting:function(){for(var e=0;e<arguments.length;e++)if(null!=arguments[e])return arguments[e]}});var Utils=Utils||{};Utils.arrayHelpers={removeItem:function(e,t){var n=_.findIndex(e,t);return e.splice(n,1),e},compare:function(e,t,n){return e.length===t.length&&_.every(e,function(e){return _.some(t,function(t){return _.exists(n)?n(e)===n(t):e===t})})}},Utils.stringHelpers={isPresent:function(e){return!(e||"").match(/^\s*$/)}},!function(e){"use strict";e.module("aleph",["alephControllers","alephDirectives","alephServices","alephFilters","ngAnimate","ngClipboard","ui.bootstrap","infinite-scroll","ngTagsInput","cfp.hotkeys","angular.filter","selectionModel","treasure-overlay-spinner"]).run(["AceCompleters",function(e){e.setCompleters()}]).run(["$rootScope","PageTitleManager",function(e,t){e.pageTitleManager=t}]).value("KeyBindings",{saveQuery:new KeyBinding("Save Query",{mac:"command+shift+s",win:"ctrl+shift+s"}),runQuery:new KeyBinding("Run Query",{mac:"command+shift+k",win:"ctrl+shift+k"}),detectParameters:new KeyBinding("Detect Parameters",{mac:"command+shift+p",win:"ctrl+shift+p"})}).config(["$locationProvider",function(e){e.html5Mode(!0)}]).config(["$animateProvider",function(e){e.classNameFilter(/ng-animate-enabled/)}]).config(["$routeProvider",function(e){e.when("/queries/:query_id",{redirectTo:"/queries/:query_id/query_versions/latest"}).when("/queries",{templateUrl:"queryIndex",controller:"QueryIndexController",controllerAs:"queryIdxCtrl",reloadOnSearch:!1}).when("/schemas/:schemaName",{templateUrl:"schemaShow",controller:"SchemaShowController"}).when("/schemas",{title:"Schemas",templateUrl:"schemaIndex",controller:"SchemaIndexController",controllerAs:"schemaIdxCtrl",reloadOnSearch:!1}).when("/queries/:query_id/query_versions/:query_version_id",{templateUrl:"showQuery",controller:"QueryShowController",controllerAs:"queryShowCtrl"}).when("/alerts",{title:"Alerts",templateUrl:"alertIndex",controller:"AlertIndexController",controllerAs:"alertIdxCtrl",reloadOnSearch:!1}).when("/alerts/:alertId",{templateUrl:"alertShow",controller:"AlertShowController",controllerAs:"alertShowCtrl"}).when("/snippets",{title:"Snippets",templateUrl:"snippetIndex",controller:"SnippetIndexController",controllerAs:"snippetIdxCtrl"}).otherwise("/queries")}])}(angular),!function(e){"use strict";var t={tableRestrictionMet:function(e,t){return 0===t.tableRestrict.length||_.contains(t.tableRestrict,e.table)},schemaRestrictionMet:function(e,t){return 0===t.schemaRestrict.length||_.contains(t.schemaRestrict,e.schema)}};e.module("aleph.schemaCompleterConfig",[]).constant("SCHEMA_MATCHERS",[{nameProperty:"schema",meta:"schema",contextRelevance:{from:1e3}},{nameProperty:"column",meta:"column",contextRelevance:{select:1e3,from:500,where:1e3},contextItemFilters:{select:[t.schemaRestrictionMet,t.tableRestrictionMet],from:[t.schemaRestrictionMet,t.tableRestrictionMet],where:[t.schemaRestrictionMet,t.tableRestrictionMet]}},{nameProperty:"table",meta:"table",contextRelevance:{select:500,from:1e3,where:500},contextItemFilters:{select:[t.schemaRestrictionMet,t.tableRestrictionMet],from:[t.schemaRestrictionMet],where:[t.schemaRestrictionMet,t.tableRestrictionMet]}}])}(angular),!function(e){"use strict";var t=function n(e,t,i,r){_classCallCheck(this,n),this.pagination=new t("Paginated Queries",e.index,i),this.defaultDateFormat=r};t.$inject=["AlertResource","PaginationComponents","Alert","defaultDateFormat"],e.module("alephControllers.alertIndexController",["alephServices"]).controller("AlertIndexController",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n,i,r,o,a,s,l){var u=this;_classCallCheck(this,e),this._openReplService=o,this._$location=l,this.aceLoaded=function(e){new n(e).readOnlyConfig()},this.alert=new r,this.query=new i,"new"===s.alertId?this.alert.initItem().then(this.query.initItem.bind(this.query,null)).then(this._openReplService.open.bind(this._openReplService,{})).then(function(e){var t=e.query;e._;u.query=t,u.alert.item.query_title=t.item.title,u.query.item.tags.push("alert-query")}):this.alert.initItem(s.alertId).then(function(e){return u.query.initItem(e.query_id,"latest")}),this._navigationGuard=new a(t).registerLocationChangeStart(function(e){if(u.alert.isDirty()){var t=confirm("Your alert has not been saved. Are you sure you want to leave this page?");t||e.preventDefault()}}).registerOnBeforeUnload(function(){return u.alert.isDirty()?"Alert has unsaved changes!":void 0})}return _createClass(e,[{key:"togglePaused",value:function(){"Paused"===this.alert.item.status?this.alert.item.status="Pending":this.alert.item.status="Paused",this.alert.save()}},{key:"editAlert",value:function(){var e=this;this._openReplService.open({query:this.query}).then(function(t){var n=t.query,i=t.result;return e.query=n,e.query.save({result_id:i.id})}).then(this.alert.save.bind(this.alert))}},{key:"deleteAlert",value:function(){var e=this;this.alert.destroy().then(function(){return e._$location.path("/alerts")})}},{key:"saveAlert",value:function(){var e=this;this.isPersisted()?this.alert.save():this.query.save().then(function(t){e.alert.item.query_id=t.id,e.alert.save()})}},{key:"isPersisted",value:function(){return this.alert.isPersisted()&&this.query.isPersisted()}}]),e}();t.$inject=["$scope","DefaultAceConfigurator","Query","Alert","OpenReplService","NavigationGuard","$routeParams","$location"],e.module("alephControllers.alertShowController",["alephServices"]).controller("AlertShowController",t)}(angular),!function(e){"use strict";e.module("alephControllers",["alephControllers.schemaIndexController","alephControllers.queryIndexController","alephControllers.queryShowController","alephControllers.queryReplController","alephControllers.alertIndexController","alephControllers.alertShowController","alephControllers.snippetIndexController","alephServices","ui.ace","ngRoute","ui.bootstrap.alert"]).controller("BodyController",["$scope","SpinnerState","ServerConfigurations",function(e,t,n){e.SpinnerState=t,e.ServerConfigurations=n}]).controller("NavBarController",["$scope","$window","$location",function(e,t,n){e.pathIncludes=function(e){return n.path().indexOf(e)>-1},e.signOut=function(){t.location.href="/sign_out"}}]).controller("AlertBarController",["$scope","$rootScope",function(e,t){e.alerts=[],e.dismiss=function(){e.alerts.length=0},t.$on("$routeChangeSuccess",function(){e.scheduledAlert?(e.alerts.push(e.scheduledAlert),e.scheduledAlert=null):e.dismiss()}),t.$on("scheduleAlert",function(t,n){e.scheduledAlert=n}),t.$on("setAlert",function(t,n){e.alerts.push(n)})}])}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n,i,r,o,a,s,l,u,c){_classCallCheck(this,e),this.selectedQueries=[],this.defaultDateFormat=r,this._handler=i,this.tagsSelectionInput=new u({items:this.selectedQueries,itemField:"tags"}),this.rolesSelectionInput=new u({items:this.selectedQueries,itemField:"roles"}),this.pagination=new a("Paginated Queries",t.index,n),this._roleModel=l,this._tagResource=s,this._$q=c,this._openReplService=o,l.initCollection()}return _createClass(e,[{key:"loadTags",value:function(e){return this._tagResource.index({search:e}).$promise}},{key:"loadRoles",value:function(){return this._roleModel.collection}},{key:"onSelection",value:function(){this.tagsSelectionInput.onSelection(),this.rolesSelectionInput.onSelection()}},{key:"deselectAll",value:function(){_.each(this.selectedQueries,function(e){e.selected=!1}),this.selectedQueries.length=0,this.onSelection()}},{key:"save",value:function(){var e=this;this.pagination.save().then(function(){e.deselectAll(),e.pagination.reload()})}},{key:"revert",value:function(){this.pagination.revert(),this.onSelection()}},{key:"openRepl",value:function(){this._openReplService.open().then(function(e){var t=e.query,n=e.result;return t.save({result_id:n.id})}).then(this._handler.navigateToLatestVersion.bind(this._handler)).then(this._handler.success.bind(this._handler,"create",!0))["catch"](this._handler.handleReplExit.bind(this._handler))}}]),e}();t.$inject=["QueryResource","Query","QueryHandler","defaultDateFormat","OpenReplService","PaginationComponents","TagResource","RoleModel","SelectionTagInput","$q"],e.module("alephControllers.queryIndexController",["alephServices"]).controller("QueryIndexController",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n,i,r,o,a,s,l,u,c){var d=this;_classCallCheck(this,e),this._modalInstance=t,this.results=new a,this.query=o,this.resultRunner=new r(this.query,this.results,{sandbox:!0,enablePolling:!0}),this._queryBodyState=this._queryBody(),this._getResultCsv=n,c.$on("$destroy",function(){_.each(d.results.collection,function(e){e.poller.unPoll()})}),this._initKeyBindings(l,u,c),this._navigationGuard=new s(c).registerLocationChangeStart(s.defaultPreventer()).registerOnBeforeUnload(function(){return d._queryBodyState===d._queryBody()||d.downloadFlag?void(d.downloadFlag=!1):"Query has unsaved changes!"});var h={save:this._saveKb,detectParameters:this._detectParametersKb,run:this._runKb};this.aceLoaded=function(e){new i(e).snippetsConfig(),e.focus(),e.commands.addCommand(h.save.aceKeyCmd),e.commands.addCommand(h.detectParameters.aceKeyCmd),e.commands.bindKey(h.run.bindKey,h.run.keyFn),e.setOptions({maxLines:500,minLines:2})}}return _createClass(e,[{key:"runQuery",value:function(){this.resultRunner.run()}},{key:"validToRun",value:function(){var e=this.results.collection[0];return!e||"complete"===e.item.status||"failed"===e.item.status}},{key:"validToSave",value:function(){return""!==this.query.item.title}},{key:"saveToolTipText",value:function(){return""===this.query.item.title?"Please enter a query title":""}},{key:"save",value:function(){this._navigationGuard.disable(),this._setParameterDefaultValues(this.query.item.version.parameters,this.resultRunner.substitutionValues);var e=this.results.collection.shift();this._modalInstance.close({query:this.query,result:_.exists(e)?e.item:{}})}},{key:"exit",value:function(){this._navigationGuard.disable(),this._modalInstance.dismiss("QueryReplExit")}},{key:"getCsv",value:function(e){return this.downloadFlag=!0,this._getResultCsv(e)}},{key:"_queryBody",value:function(){return this.query.item.version.body}},{key:"_setParameterDefaultValues",value:function(e,t){e.forEach(function(e){var n=t[e.name];_.exists(n)&&(e["default"]=n)})}},{key:"_initKeyBindings",value:function(e,t,n){var i=this;this._saveKb=e.saveQuery.withKeyFn(function(){i.validToSave()&&i.save()}),this._runKb=e.runQuery.withKeyFn(function(){i.validToRun()&&i.runQuery()}),this._detectParametersKb=e.detectParameters.withKeyFn(function(){i.query.detectParameters(),n.$digest()}),t.bindTo(n).add(this._saveKb.hotKey).add(this._runKb.hotKey).add(this._detectParametersKb.hotKey)}}]),e}();t.$inject=["$uibModalInstance","getResultCsv","DefaultAceConfigurator","ResultRunner","query","Results","NavigationGuard","KeyBindings","hotkeys","$scope"],e.module("alephControllers.queryReplController",["alephServices"]).controller("QueryReplController",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n,i,r,o){var a=this;_classCallCheck(this,e),this._tabs=r,this._tabs.setActiveTabFromUrl(),this.componentCallbacks=[],this._loader=n,this._loader.initialize(),this._loader.load().then(function(e){i.title=e.query.title,i.onDestroy(t),a.resultRunner=new o(a.query,a.results,{enableAlert:!0}),_.each(a.componentCallbacks,function(t){t(e)})})}return _createClass(e,[{key:"setTabInUrl",value:function(e){e!==this._tabs.getTab()&&this._tabs.setTab(e)}},{key:"query",get:function(){return this._loader.query}},{key:"queryVersions",get:function(){return this._loader.queryVersions}},{key:"results",get:function(){return this._loader.results}},{key:"queryId",get:function(){return this._loader.queryId}},{key:"queryVersionId",get:function(){return this._loader.queryVersionId}},{key:"tabs",get:function(){return this._tabs.state}}]),e}();t.$inject=["$scope","QueryLoader","PageTitleManager","QueryTab","ResultRunner"],e.module("alephControllers.queryShowController",["alephServices"]).controller("QueryShowController",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n,i,r,o){_classCallCheck(this,e),this.pagination=new r("Paginated Schema",t.index,n,{additionalParams:{with_comments:!0},limit:150}),this.columns=new i;var a=o.withContext("SchemaColumns");a.on(),this.columns.initCollection().then(a.off.bind(a))}return _createClass(e,[{key:"directory",value:function(){return _.chain(this.columns.schemaTables).pairs().reduce(function(e,t){return e.concat(_.map(t[1],function(e){return{schema:t[0],table:e}}))},[]).value()}},{key:"typeAheadValues",value:function(e){var t=this,n=/^[A-z]+$/,i=/^[A-z]+\.[A-z]*$/;if(n.test(e))return _.filter(this.columns.uniqueSchemas,function(t){return t.indexOf(e)>-1});if(!i.test(e))return[];var r=function(){var n=e.split(".")[0],i=t.columns.schemaTables[n];return{v:_.chain(i).map(function(e){return n+"."+e}).filter(function(t){return t.indexOf(e)>-1}).value()}}();return"object"==typeof r?r.v:void 0}}]),e}();t.$inject=["SchemaColumnResource","SchemaColumn","SchemaColumns","PaginationComponents","SpinnerState"],e.module("alephControllers.schemaIndexController",["alephServices"]).controller("SchemaIndexController",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n,i,r){var o=this;_classCallCheck(this,e),this._snippetModelClasses=n.forModelName("snippet"),this._Snippet=n.forModelName("snippet").modelClass(),this._Snippets=n.forModelName("snippet").collectionClass(this._Snippet),this.snippets=new this._Snippets,this._loadSnippets(),this.aceLoaded=function(e){new i(e).autoCompleteConfig(),e.setOptions({maxLines:10,minLines:10})},this._navigationGuard=new r(t).registerOnBeforeUnload(function(){return o.revertableSnippetsExist()?"There are unsaved changes":void 0}).registerLocationChangeStart(function(e){o.revertableSnippetsExist()&&!confirm("There are unsaved changes. Leave the page?")&&e.preventDefault()})}return _createClass(e,[{key:"addNewSnippet",value:function(){var e=new this._Snippet;e.initItem(),this.snippets.collection.unshift(e)}},{key:"isValidForSave",value:function(e){return e.isValidForSave()&&""!==e.item.name&&""!==e.item.content}},{key:"savableSnippetsExist",value:function(){var e=this;return _.some(this.snippets.collection,function(t){return e.isValidForSave(t)})}},{key:"revertableSnippetsExist",value:function(){return _.some(this.snippets.collection,function(e){return e.isDirty()||!e.isPersisted()})}},{key:"updatedAt",value:function(e){return _.exists(e.item.updated_at)?Date.parse(e.item.updated_at):Number.MAX_SAFE_INTEGER}},{key:"shouldGrayout",value:function(e){return!_.every(this.snippets.collection,function(e){return e.isPersisted()})&&e.isPersisted()}},{key:"deleteSnippet",value:function(e){e.destroy().then(this._loadSnippets.bind(this))}},{key:"_loadSnippets",value:function(){this.snippets.initCollection()}}]),e}();t.$inject=["$scope","ModelManager","DefaultAceConfigurator","NavigationGuard"],e.module("alephControllers.snippetIndexController",["alephServices"]).controller("SnippetIndexController",t)}(angular),!function(e){"use strict";e.module("alephDirectives",["alephDirectives.visualization","alephDirectives.result","alephDirectives.results","alephDirectives.queryVersionSidebar","alephDirectives.queryDetails"]).directive("ngConfirmClick",[function(){return{priority:-1,restrict:"A",link:function(e,t,n){t.bind("click",function(e){var t=n.ngConfirmClick;t&&!confirm(t)&&(e.stopImmediatePropagation(),e.preventDefault())})}}}])}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(){return{restrict:"E",scope:{resultRunner:"=",query:"="},templateUrl:"queryDetails",controller:"QueryDetailsController",controllerAs:"queryDetailsCtrl",bindToController:!0}}var n=function(){function e(t,n,i,r,o,a,s){_classCallCheck(this,e),this._handler=t,this._repl=a,this._tags=i,this._roles=s,this._tabs=n,this.dateFormat=r,this.aceLoaded=function(e){return new o(e).readOnlyConfig()},s.initCollection(),this._closeCommentDialog()}return _createClass(e,[{key:"openRepl",value:function(){this._repl.open({query:this.query}).then(function(e){var t=e.query,n=e.result;return t.save({result_id:n.id})}).then(this._handler.navigateToLatestVersion.bind(this._handler)).then(this._handler.success.bind(this._handler,"update",!1))["catch"](this._handler.handleReplExit.bind(this._handler))["finally"](this._closeCommentDialog.bind(this))}},{key:"updateQuery",value:function(){this.query.save().then(this._setPristine.bind(this)).then(this._handler.success.bind(this._handler,"update",!1))["finally"](this._closeCommentDialog.bind(this))}},{key:"runQuery",value:function(){this.resultRunner.run().then(this._tabs.navigateToTab.bind(this._tabs,"results"))}},{key:"deleteQuery",value:function(){this.query.destroy().then(this._handler.navigateToIndex.bind(this._handler))}},{key:"loadTags",value:function(e){return this._tags.index({search:e}).$promise}},{key:"loadRoles",value:function(){return this._roles.collection}},{key:"toggleCommentDialog",value:function(){this.commentDialogOpen=!this.commentDialogOpen}},{key:"_closeCommentDialog",value:function(){this.commentDialogOpen=!1}},{key:"_setPristine",value:function(e){return this.form.$setPristine(),e}}]),e}();n.$inject=["QueryHandler","QueryTab","TagResource","defaultDateFormat","DefaultAceConfigurator","OpenReplService","RoleModel"],e.module("alephDirectives.queryDetails",["alephServices"]).controller("QueryDetailsController",n).directive("queryDetails",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(){return{restrict:"E",scope:{query:"=",versions:"=",componentCallbacks:"="},templateUrl:"query-version-sidebar",controller:"QueryVersionSidebarController",controllerAs:"qvSidebarCtrl",bindToController:!0}}var n=function(){function e(t,n){var i=this;_classCallCheck(this,e),this._gitUrl=t,this._$location=n,this.selectedVersions=[],this.componentCallbacks.unshift(function(e){var t=_.map(e.queryVersions,function(e){return e.item});i.currentVersion=_.findWhere(t,{id:i.query.item.version.id}),i.currentVersion.selected=!0,i.currentVersionCommitUrl=i._gitUrl.commit(i.currentVersion),i.githubHistory=i._gitUrl.commits(i.query.item.id)})}return _createClass(e,[{key:"figureGithubUrl",value:function(){if(2===this.selectedVersions.length){var e=_.sortBy(this.selectedVersions,"id");this._githubCompareUrl=this._gitUrl.compare(e[0],e[1])}else 1===this.selectedVersions.length&&(this._githubCommitUrl=this._gitUrl.commit(this.selectedVersions[0]))}},{key:"loadQueryByVersion",value:function(e){this._$location.path("/queries/"+this.query.item.id+"/query_versions/"+e)}},{key:"hasComment",value:function(e){return Utils.stringHelpers.isPresent(e.comment)}},{key:"githubIsEnabled",value:function(){return this._gitUrl.isValid()}},{key:"githubCommit",get:function(){return this._githubCommitUrl||this.currentVersionCommitUrl}},{key:"githubCompare",get:function(){return this._githubCompareUrl}}]),e}();n.$inject=["GithubUrlService","$location"],e.module("alephDirectives.queryVersionSidebar",["alephServices"]).controller("QueryVersionSidebarController",n).directive("queryVersionSidebar",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(){return{restrict:"E",scope:{result:"=",results:"="},templateUrl:"result",controller:"ResultController",controllerAs:"resultCtrl",bindToController:!0}}var n=function(){function e(t,n,i,r){var o=this;_classCallCheck(this,e),this._alertFlash=i,this._$window=r,this.getCsv=function(){return n(o.result.item.id)},this.result.poller.poll(),t.$on("$destroy",function(){o.result.poller.unPoll()})}return _createClass(e,[{key:"resultHasParameters",value:function(){return this.result.item.parameters?_.keys(this.result.item.parameters).length>0:!1}},{key:"deleteResult",value:function(){var e=this;return this.result.destroy().then(function(t){return e._alertFlash.emitInfo("Result id = "+t.id+" has be deleted!"),e.results?void e.results.remove(t):t})}}]),e}();n.$inject=["$scope","getResultCsv","AlertFlash","$window"],e.module("alephDirectives.result",["alephServices"]).controller("ResultController",n).directive("result",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(){return{restrict:"E",scope:{query:"=",results:"=",resultRunner:"="},templateUrl:"results",controller:"ResultsController",controllerAs:"resultsCtrl",bindToController:!0}}var n=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"runQuery",value:function(){this.resultRunner.run()}}]),e}();e.module("alephDirectives.results",["alephServices"]).controller("ResultsController",n).directive("results",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),
|
147
|
+
Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(){return{restrict:"E",scope:{queryId:"=",queryVersionId:"=",results:"="},templateUrl:"visualization",controller:"VisualizationController",controllerAs:"vizShowCtrl",bindToController:!0}}var n=function(){function e(t,n,i){_classCallCheck(this,e),n.initService(),this.visualization=n.visualization,this.visualizations=n.visualizations,this.sourceRenderer=n.sourceRenderer,n.sourceRenderer.setResults(this.results),this.presetDisplayList=function(){return n.presetDisplayList},this._service=n;var r=this;this.aceLoaded=function(e){new i(e),e.setOptions({maxLines:40,minLines:2}),r.aceEditor=e},this._$sce=t}return _createClass(e,[{key:"toggleEditor",value:function(){this.editorSelected=!this.editorSelected,this.editorSelected&&this.aceEditor.setValue(this.visualization.item.html_source,-1)}},{key:"renderedSource",value:function(){return this.sourceRenderer.isValid()?this._$sce.trustAsHtml(this.sourceRenderer.rendered()):""}},{key:"save",value:function(){var e=this;if(!this.visualization.hasTitle()){var t=prompt("Please enter a title for this visualization:");if(null===t||""===t)return;this.visualization.item.title=t}this.visualization.save(this.queryId,this.queryVersionId).then(function(){e.visualizations.initCollection({query_id:e.queryId,query_version_id:e.queryVersionId})})}},{key:"destroy",value:function(){var e=this;this.visualization.destroy().then(function(){e._service.load(e.queryId,e.queryVersionId)})}},{key:"selectVisualization",value:function(e){this.visualization.internalize(e)}},{key:"selectPreset",value:function(e){var t=this;if(this.visualization.isDirty()){var n=confirm("You are about to overwrite some unsaved changes, proceed?");if(!n)return}this.visualization.initItem().then(function(){t.visualization.item.html_source=t._service.presets[e]})}}]),e}();n.$inject=["$sce","VisualizationService","DefaultAceConfigurator"],e.module("alephDirectives.visualization",["alephServices"]).controller("VisualizationController",n).directive("visualization",t)}(angular),!function(e){"use strict";e.module("alephFilters",[]).filter("objectDotKeys",function(){return function(e){return Object.keys(e)}}).filter("humanReadableDuration",function(){return function(e){var t=3600,n=60,i=Math.floor(e/t),r=Math.floor(e%t/n),o=Math.round(e%n);return(e>t?i+" hours ":"")+(e>n?r+" minutes ":"")+o+" seconds"}})}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_get=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;s=u=l=void 0,i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return void 0;e=u,t=o,n=a,i=!0}};!function(e){"use strict";function t(e,t,n){return function(t){function i(){_classCallCheck(this,i),_get(Object.getPrototypeOf(i.prototype),"constructor",this).call(this,"alert",e,{email:"",query_title:"",target:NaN,comparator:"",status:"",description:""},["email","comparator","target","description","query_title"]),this._pollItemKey="alertItem_"+(new Date).getTime()}return _inherits(i,t),_createClass(i,[{key:"save",value:function(){return"Paused"!==this.item.status&&(this.item.status="Pending"),_get(Object.getPrototypeOf(i.prototype),"save",this).call(this).then(this._pollItem.bind(this))}},{key:"_pollItem",value:function(e){return n.unPoll(this._pollItemKey),n.poll(e,this._pollItemKey,function(){return"Pending"!==e.status}),e}}]),i}(t)}t.$inject=["AlertResource","StandardModel","PollService"],e.module("alephServices.alert",[]).service("Alert",t)}(angular),!function(e){"use strict";function t(e){return e.make("/alerts/:id.json",{id:"@id"})}t.$inject=["ResourceFactory"],e.module("alephServices.alertResource",[]).service("AlertResource",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n){_classCallCheck(this,e),this.langTools=ace.require("ace/ext/language_tools"),this.schemaCompleter=new t,this.keywordCompleter=new n}return _createClass(e,[{key:"ensureSchemasData",value:function(){return this.schemaCompleter.isLoaded()?void 0:this.schemaCompleter.loadColumnData()}},{key:"setCompleters",value:function(){this.langTools.setCompleters([this.schemaCompleter,this.keywordCompleter,this.langTools.textCompleter,this.langTools.snippetCompleter])}}]),e}();t.$inject=["SchemaCompleter","KeywordCompleter"],e.module("alephServices.aceCompleters",[]).service("AceCompleters",t)}(angular),!function(e){"use strict";function t(e,t){function n(e){return h.set({needle:e,start:t,wholeWord:!0,backwards:!0,wrap:!1}),r(e)}function i(e){return h.set({needle:e,start:t,wholeWord:!0,backwards:!1,wrap:!1}),r(e)}function r(t){var n=h.find(e);return _.exists(n)?_.merge(n,{type:t}):void 0}function o(e){return e.sort(function(e,t){var n=e.start.row,i=t.start.row,r=e.start.column,o=t.start.column;return n===i?o>r?-1:r>o?1:0:i>n?-1:1})}function a(){_.each(["select","from","where"],function(e){f.push(n(e)),m.push(i(e))}),f=_.compact(f),m=_.compact(m),g=!0}function s(){if(g===!1&&a(),0===f.length)return!1;var e=_.union(f,[{start:t,type:"cursor"}]),n=o(e),i=_.findIndex(n,{type:"cursor"}),r=n[i-1];return y=r.type}function l(){g===!1&&a(),_.exists(y)||s();var t=void 0,n=void 0,i=v[y];_.exists(i)&&(t=_.findWhere(i.start.location,{type:i.start.type}),n=_.findWhere(i.end.location,{type:i.end.type})||_.findWhere(m,{type:"select"})),_.exists(t)||(t=u()),_.exists(n)||(n=c());var r=new p(t.end.row,t.end.column,n.start.row,n.start.column);return e.getTextRange(r)}function u(){return{end:{row:0,column:0}}}function c(){var t=e.getDocument(),n=t.getLength(),i=t.getLine(n-1),r=i.length;return{start:{row:n,column:r}}}var d=ace.require("ace/search").Search,h=new d,p=ace.require("ace/range").Range,f=[],m=[],g=!1,v={select:{start:{location:m,type:"from"},end:{location:m,type:"where"}},from:{start:{location:f,type:"from"},end:{location:m,type:"where"}},where:{start:{location:f,type:"from"},end:{location:f,type:"where"}}},y=void 0;return{currentClause:s(),fromClause:l()}}e.module("alephServices.aceSqlParse",[]).service("aceSqlParse",function(){return t})}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e,t,n){return function(){function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];_classCallCheck(this,i);var n=function(){return void 0};this._modelName=e,this._modelItem=t.modelItem||n,this._modelCollection=t.modelCollection||n,this.wrapFetch=_.partial(this.wrapAction,"fetching"),this.wrapUpdate=_.partial(this.wrapAction,"updating"),this.wrapCreate=_.partial(this.wrapAction,"creating"),this.wrapDestroy=_.partial(this.wrapAction,"deleting"),this.wrapInitCollection=_.partial(this.wrapAction,"loading"),this.wrapCollectionSave=_.partial(this.wrapAction,"saving")}return _createClass(i,[{key:"wrapAction",value:function(e,n){var i=t.withContext(this._modelName+"."+e);return i.on(),n().then(this.onSuccess.bind(this,e))["catch"](this.onError.bind(this,e))["finally"](i.off.bind(i))}},{key:"onError",value:function(t,i){return e.emitDanger(this._msg("Failed",t)),n.reject(i)}},{key:"onSuccess",value:function(e,t){return t}},{key:"_msg",value:function(e,t){return e+" "+t+" "+this._modelName+this._itemSuffix()}},{key:"_itemSuffix",value:function(){var e=this._modelItem(),t=this._modelCollection(),n="";return _.exists(e)?_.exists(e.title)&&0!==e.title.length?n=", title = "+e.title:_.exists(e.id)&&e.id>0&&(n=", id = "+e.id):_.exists(t)&&(n=", count = "+t.length),n}}]),i}()}t.$inject=["AlertFlash","SpinnerState","$q"],e.module("alephServices.actionHandler",[]).service("ActionHandler",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t){_classCallCheck(this,e),this._$rootScope=t,this.emitSuccess=_.partial(this.emit,"success"),this.emitInfo=_.partial(this.emit,"info"),this.emitWarning=_.partial(this.emit,"warning"),this.emitDanger=_.partial(this.emit,"danger")}return _createClass(e,[{key:"emit",value:function(e,t,n){this._$rootScope.$broadcast(n?"scheduleAlert":"setAlert",{type:e,message:t})}},{key:"emitError",value:function(e,t){var n=" => "+(_.exists(t)?t:"");this.emitDanger(e+n)}}]),e}();t.$inject=["$rootScope"],e.module("alephServices.alertFlash",[]).service("AlertFlash",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e,t){return function(){function n(t){_classCallCheck(this,n),this._editor=t,this._defaultConfig(),this._Snippet=e.forModelName("snippet").modelClass(),this._Snippets=e.forModelName("snippet").collectionClass(this._Snippet),this._snippets=new this._Snippets}return _createClass(n,[{key:"readOnlyConfig",value:function(){return this._editor.setReadOnly(!0),this._editor.renderer.$cursorLayer.element.style.opacity=0,this._editor.setOptions({highlightActiveLine:!1,highlightGutterLine:!1,maxLines:25,minLines:2}),this}},{key:"autoCompleteConfig",value:function(){return this._editor.setOptions({enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0}),this}},{key:"snippetsConfig",value:function(){return t.reset(),this._snippets.initCollection().then(function(e){_.each(e,function(e){t.add(e.item.name,e.item.content)})}),this.autoCompleteConfig(),this}},{key:"_defaultConfig",value:function(){var e=this._editor.getSession();e.setTabSize(2),e.setUseSoftTabs(!0),this._editor.setPrintMarginColumn(100),this._editor.setShowPrintMargin(!0),this._editor.setBehavioursEnabled(!0),this._editor.$blockScrolling=1/0,this._editor.setOptions({maxLines:25,minLines:2})}}]),n}()}t.$inject=["ModelManager","AceSnippetManager"],e.module("alephServices.defaultAceConfigurator",[]).service("DefaultAceConfigurator",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t){_classCallCheck(this,e),this._isValid=_.exists(t.configurations.github_owner)&&_.exists(t.configurations.github_repo)&&_.exists(t.configurations.github_ref),this._isValid&&(this._branch=t.configurations.github_ref.split("/")[1],this._githubRoot=["https://github.com",t.configurations.github_owner,t.configurations.github_repo].join("/"))}return _createClass(e,[{key:"commits",value:function(e){return[this._githubRoot,"commits",this._branch,"query_"+e].join("/")}},{key:"commit",value:function(e){return[this._githubRoot,"commit",e.commit_sha].join("/")}},{key:"compare",value:function(e,t){return[this._githubRoot,"compare",e.commit_sha+"..."+t.commit_sha].join("/")}},{key:"isValid",value:function(){return this._isValid}}]),e}();t.$inject=["ServerConfigurations"],e.module("alephServices.githubUrlService",[]).service("GithubUrlService",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e,t){return function(){function n(){_classCallCheck(this,n);var i=[{meta:"keyword",contextRelevance:{all:1e3}}],r=this;(new t).get("keyword_config.json").then(function(t){r._matcherRunner=new e(i,t.data)})}return _createClass(n,[{key:"getCompletions",value:function(e,t,n,i,r){if(0===i.length)return void r(null,[]);if(_.exists(this._matcherRunner)){var o=this._matcherRunner.execute("all",{},i.toUpperCase());r(null,o)}}}]),n}()}t.$inject=["MatcherRunner","LocalResource"],e.module("alephServices.keywordCompleter",[]).service("KeywordCompleter",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e){return function(){function t(){_classCallCheck(this,t);for(var e=arguments.length,n=Array(e),i=0;e>i;i++)n[i]=arguments[i];this.path=["resources"].concat(n)}return _createClass(t,[{key:"get",value:function(t){return e.get(this.path.concat([t]).join("/"))}}]),t}()}t.$inject=["$http"],e.module("alephServices.localResource",[]).service("LocalResource",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(){_classCallCheck(this,e),this._locks={}}return _createClass(e,[{key:"attemptAcquire",value:function(e){return this._locks[e]?!1:(this._locks[e]=!0,!0)}},{key:"release",value:function(e){delete this._locks[e]}},{key:"tryWithLockAsync",value:function(e,t){if(this.attemptAcquire(e))try{return this._locks[e]=!0,t(this.release.bind(this,e))}catch(n){throw this.release(e),n}}},{key:"tryWithLock",value:function(e,t){if(this.attemptAcquire(e))try{return this._locks[e]=!0,t()}finally{this.release(e)}}}]),e}();e.module("alephServices.lockService",[]).service("$lock",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n){_classCallCheck(this,e),this._intervalPromises={},this._$lock=t,this._$interval=n,this.poll=_.wrap(this.pollWithFunction.bind(this),function(e,t,n,i){return e(function(){return t.$get()},n,i)})}return _createClass(e,[{key:"unPoll",value:function(e){this._$interval.cancel(this._intervalPromises[e]),delete this._intervalPromises[e]}},{key:"pollWithFunction",value:function(e,t,n){var i=this;this._intervalPromises[t]=this._$interval(function(){n()?i.unPoll(t):i._$lock.tryWithLockAsync(t,function(t){e().then(t)})},5e3)}}]),e}();t.$inject=["$lock","$interval"],e.module("alephServices.pollService",[]).service("PollService",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n){_classCallCheck(this,e),this._matchers=t,this._items=n}return _createClass(e,[{key:"execute",value:function(e,t,n){var i=this,r=[];return _.each(this._matchers,function(o){if(i._isMatcherRelevant(o,e)){var a=i._uniqueFilteredMatches(o,e,t,n);_.each(a,function(t){r.push({name:t,value:t,score:o.contextRelevance[e],meta:o.meta})})}}),r}},{key:"_uniqueFilteredMatches",value:function(e,t,n,i){var r=this,o=_.map(this._items,function(o){if(!r._matcherFiltersForContext(e,t)||r._itemSatisfiesFilters(e.contextItemFilters[t],o,n)){var a=_.exists(e.nameProperty)?o[e.nameProperty]:o;if(0===a.indexOf(i))return a}});return _.compact(_.uniq(o))}},{key:"_itemSatisfiesFilters",value:function(e,t,n){return _.all(e,function(e){return e(t,n)})}},{key:"_matcherFiltersForContext",value:function(e,t){return _.getPath(e,"contextItemFilters."+t)}},{key:"_isMatcherRelevant",value:function(e,t){return _.any(_.keys(e.contextRelevance),function(e){return e===t})}}]),e}();e.module("alephServices.matcherRunner",[]).service("MatcherRunner",function(){return t})}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e){return function(){function t(n){var i=this;_classCallCheck(this,t),this._$scope=n,this._disabled=!1,this._previousOnBeforeUnload=e.onbeforeunload,n.$on("$destroy",function(){e.onbeforeunload=i._previousOnBeforeUnload})}return _createClass(t,[{key:"registerOnBeforeUnload",value:function(t){var n=this;return e.onbeforeunload=function(){return n._disabled?n._previousOnBeforeUnload():t()},this}},{key:"registerLocationChangeStart",value:function(e){var t=this;return this._$scope.$on("$locationChangeStart",function(n){return t._disabled?void 0:e(n)}),this}},{key:"disable",value:function(){this._disabled=!0}}],[{key:"defaultPreventer",value:function(){return function(e){e.preventDefault()}}}]),t}()}t.$inject=["$window"],e.module("alephServices.navigationGuard",[]).service("NavigationGuard",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function t(e,n,i){_classCallCheck(this,t),this._$modal=e,this._Query=n,this._AceCompleters=i}return _createClass(t,[{key:"open",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this._AceCompleters.ensureSchemasData();var n=this._$modal.open({animation:!0,templateUrl:"queryRepl",controller:"QueryReplController",controllerAs:"queryRepl",bindToController:!0,windowClass:"query-repl-dialog",backdrop:"static",keyboard:!1,resolve:{query:function(){return _.exists(t.query)?e._clone(t.query):e._newQuery()}}});return n.result.then(function(t){var n=t.query,i=t.result;return{query:e._clone(n),result:i}})}},{key:"_clone",value:function(t){var n=e.copy(t.item),i=new this._Query;return i.internalize(n),i}},{key:"_newQuery",value:function(){var e=new this._Query;return e.initItem(),e}}]),t}();t.$inject=["$uibModal","Query","AceCompleters"],e.module("alephServices.openReplService",[]).service("OpenReplService",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n){_classCallCheck(this,e),this._defaultTitle=t,this._$route=n}return _createClass(e,[{key:"onDestroy",value:function(e){var t=this;e.$on("$destroy",this.unset.bind(t))}},{key:"unset",value:function(){this.title=void 0}},{key:"title",set:function(e){this._title=e},get:function(){return Utils.stringHelpers.isPresent(this._title)?this._title:this._$route.current&&Utils.stringHelpers.isPresent(this._$route.current.title)?this._$route.current.title:this._defaultTitle}}]),e}();t.$inject=["ApplicationTitle","$route"],e.module("alephServices.pageTitleManager",[]).service("PageTitleManager",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e,t,n){return function(){function i(e,t,r){var o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];_classCallCheck(this,i),this.search=o.initialSearch,this.sortBy=o.initialSort,this._Model=r,this._resourceAction=t,this._lockKey=e,this._limit=o.limit||30,this._sortDescending=o.sortDescending===!1?!1:!0,this._spinnerOn=_.partial(this._optionalCall,o.spinnerOn),this._spinnerOff=_.partial(this._optionalCall,o.spinnerOff),this._additionalParams=o.additionalParams||{},this._$q=n,this._init()}return _createClass(i,[{key:"reload",value:function(){this._init(),this._fetch()}},{key:"toggleSortOrder",value:function(){this._sortDescending=!this._sortDescending}},{key:"fetch",value:function(){this._done||this._fetch()}},{key:"save",value:function(e){return this._$q.all(_.map(this.dirtyItems(),function(t){return t.save(e)}))}},{key:"dirtyItems",value:function(){return this._collectionDirtyAwareness.dirtyItems()}},{key:"isDirty",value:function(){return this._collectionDirtyAwareness.isDirty()}},{key:"isPristine",value:function(){return this._collectionDirtyAwareness.isPristine()}},{key:"revert",value:function(){return this._collectionDirtyAwareness.revert()}},{key:"_init",value:function(){var e=this;this.collection=[],this._collectionDirtyAwareness=new t(function(){return e.collection}),this._offset=0,this._done=!1,this._spinnerOn()}},{key:"_optionalCall",value:function(e){if(_.exists(e)&&_.isFunction(e)){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];e.apply(n)}}},{key:"_fetch",value:function(){var t=this;e.tryWithLockAsync(this._lockKey,function(e){var n=_.merge({offset:t._offset,limit:t._limit,search:t.search,sort_by:t.sortBy,sort_descending:t._sortDescending},t._additionalParams);t._resourceAction(n,function(n){return 0===n.length?t._done=!0:_.each(n,function(e){var n=new t._Model;n.internalize(e),t.collection.push(n)}),t._offset++,t._spinnerOff(),e(),n},function(n){return t._spinnerOff(),e(),n})})}}]),i}()}t.$inject=["$lock","CollectionDirtyAwareness","$q"],e.module("alephServices.pagination",["models"]).service("Pagination",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e,t,n){return function(){function i(e,r,o){var a=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];_classCallCheck(this,i),this._spinner=n.withContext(e),this.searchText=this._intialSearch();var s=a.additionalParams||{},l=a.sortBy||"updated_at",u=a.limit;this._pagination=new t(e,r,o,{initialSearch:this.searchText,initialSort:l,limit:u,spinnerOn:this._spinner.on.bind(this._spinner),spinnerOff:this._spinner.off.bind(this._spinner),additionalParams:s}),this.reload=this._pagination.reload.bind(this._pagination),this.toggleSortOrder=this._pagination.toggleSortOrder.bind(this._pagination),this.loadMore=this._pagination.fetch.bind(this._pagination),this.dirtyItems=this._pagination.dirtyItems.bind(this._pagination),this.isDirty=this._pagination.isDirty.bind(this._pagination),this.isPristine=this._pagination.isPristine.bind(this._pagination),this.revert=this._pagination.revert.bind(this._pagination),this.save=this._pagination.save.bind(this._pagination)}return _createClass(i,[{key:"items",value:function(){return _.map(this.collection(),function(e){return e.item})}},{key:"collection",value:function(){return this._pagination.collection}},{key:"clearSearch",value:function(){this.searchText&&""!==this.searchText&&(this.searchText=null),this.triggerSearch()}},{key:"setSearch",value:function(e,t){t?this.searchText='"'+e+'"':this.searchText=e,this.triggerSearch()}},{key:"setSort",value:function(e){e===this._pagination.sortBy?this._pagination.toggleSortOrder():this._pagination.sortBy=e,this._pagination.reload()}},{key:"triggerSearch",value:function(){e.search("search",this.searchText),this._pagination.search=this.searchText,this._pagination.reload()}},{key:"_intialSearch",value:function(){var t=e.search();return _.isEmpty(t)?void 0:t.search}}]),i}()}t.$inject=["$location","Pagination","SpinnerState"],e.module("alephServices.paginationComponents",[]).service("PaginationComponents",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(){_classCallCheck(this,e),this._parameterRegex=function(){return/\{\s*([^{}]+?)\s*}/g}}return _createClass(e,[{key:"constructParameter",value:function(e){return{name:e,type:"raw"}}},{key:"detectParameters",value:function(e,t){var n=this,i=e.match(this._parameterRegex());_.exists(i)&&i.forEach(function(e){var i=n._parameterRegex().exec(e)[1];n._parameterExists(t,i)&&t.push(n.constructParameter(i))})}},{key:"_parameterExists",value:function(e,t){return-1===_.findIndex(e,function(e){return e.name===t})}}]),e}();e.module("alephServices.parameterMethods",[]).service("ParameterMethods",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t){_classCallCheck(this,e),this.collection=[],this._resource=t("/roles.json")}return _createClass(e,[{key:"initCollection",value:function(){var e=this;return this._resource.query().$promise.then(function(t){return e.collection=t,t})}}]),e}();t.$inject=["$resource"],e.module("alephServices.roleModel",[]).service("RoleModel",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e,t,n,i){return function(){function r(){_classCallCheck(this,r),this._columns=new t,this.loadColumnData()}return _createClass(r,[{key:"loadColumnData",value:function(){var e=this;this._columns.initCollection().then(function(t){e._rawColumnsData=t,e._matcherRunner=new n(i,_.map(t,function(e){return e.item}))})}},{key:"isLoaded",value:function(){return _.exists(this._rawColumnsData)&&this._rawColumnsData.length>0}},{key:"getCompletions",value:function(t,n,i,r,o){if(0===r.length)return void o(null,[]);var a=e(n,i),s=a.currentClause,l=this._makeIsSubstringFn(a.fromClause),u=_(this._columns.uniqueTables).filter(l),c=_(this._columns.uniqueSchemas).filter(l);if(_.exists(this._matcherRunner)){var d=this._matcherRunner.execute(s,{tableRestrict:u,schemaRestrict:c},r);o(null,d)}}},{key:"_makeIsSubstringFn",value:function(e){return function(t){return _.exists(e)?e.indexOf(t)>-1:!1}}}]),r}()}t.$inject=["aceSqlParse","SchemaColumns","MatcherRunner","SCHEMA_MATCHERS"],e.module("alephServices.schemaCompleter",["aleph.schemaCompleterConfig"]).service("SchemaCompleter",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t){_classCallCheck(this,e),this._items=this._makeItemsFn(t.items,t.iteratee),this._itemField=t.itemField,this.selectedTags=[]}return _createClass(e,[{key:"add",value:function(e){var t=this;_.each(this._items(),function(n){n[t._itemField].unshift(e.text)})}},{key:"remove",value:function(e){var t=this;_.each(this._items(),function(n){n[t._itemField]=_.reject(n[t._itemField],function(t){return e.text===t})})}},{key:"onSelection",value:function(){var e=this;this.selectedTags=_.reduce(this._items(),function(t,n){return _.uniq(t.concat(n[e._itemField]))},[])}},{key:"_makeItemsFn",value:function(e,t){var n=_.isFunction(e)?e:function(){return e},i=t;return _.isFunction(i)?function(){return _.map(n(),i)}:n}}]),e}();e.module("alephServices.selectionTagInput",[]).service("SelectionTagInput",function(){return t})}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(){_classCallCheck(this,e),this.configurations={}}return _createClass(e,[{key:"setConfigs",value:function(e){this.configurations=JSON.parse(e)}}]),e}();e.module("alephServices.serverConfigurations",[]).service("ServerConfigurations",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t){_classCallCheck(this,e),this.context=t,this.active=!1}return _createClass(e,[{key:"on",value:function(){this.active=!0}},{key:"off",value:function(){this.active=!1}}]),e}(),n=function(){function e(){_classCallCheck(this,e),this._spinnersMap={}}return _createClass(e,[{key:"withContext",value:function(e){return _.has(this._spinnersMap,e)||(this._spinnersMap[e]=new t(e)),this._spinnersMap[e]}},{key:"isActive",value:function(){return _.some(this._spinners(),function(e){return e.active})}},{key:"_spinners",value:function(){return _.values(this._spinnersMap)}}]),e}();e.module("alephServices.spinnerState",[]).service("SpinnerState",n)}(angular),function(e){"use strict";e.module("alephServices.tagResource",[]).factory("TagResource",["$resource",function(e){return e("/tags/:id.json",{id:"@id"},{index:{method:"GET",isArray:!0,responseType:"json"}})}])}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t){_classCallCheck(this,e),this._models=t}return _createClass(e,[{key:"dirtyItems",value:function(){return _.filter(this._models(),function(e){return e.isDirty()})}},{key:"isDirty",value:function(){return this.dirtyItems().length>0}},{key:"isPristine",value:function(){return!this.isDirty()}},{key:"revert",value:function(){_.each(this._models(),function(e){e.revert()})}}]),e}();e.module("models.collectionDirtyAwareness",[]).service("CollectionDirtyAwareness",function(){return t})}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e){return function(){function t(e,n){_classCallCheck(this,t),this.collection=[],this._resource=e,this._Model=n}return _createClass(t,[{key:"internalize",value:function(e){_.exists(e)&&_.isArray(e)&&e.length>0?this.collection=_.map(e,this._toModel.bind(this)):this.collection=[]}},{key:"initCollection",value:function(e){var t=this;return this._resource.index(e).$promise.then(function(e){return t.internalize(e),t.collection})}},{key:"save",value:function(e,t){return this._saveCollection(e,t,this.collection)}},{key:"add",value:function(e){var t=this._toModel(e);return this.collection.unshift(t),t}},{key:"remove",value:function(e){var t=_.map(this.collection,function(e){return e.item.id}).indexOf(e.id);return this.collection.splice(t,1)[0]}},{key:"items",value:function(){return _.map(this.collection,function(e){return e.item})}},{key:"_saveCollection",value:function(t,n,i){return e.all(_.map(i,function(e){return e.save(t)})).then(this.initCollection.bind(this,n))}},{key:"_toModel",value:function(e){var t=new this._Model;return t.internalize(e),t}},{key:"Model",get:function(){return this._Model;
|
148
|
+
}}]),t}()}t.$inject=["$q"],e.module("models.collectionModelBase",[]).service("CollectionModelBase",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_get=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;s=u=l=void 0,i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return void 0;e=u,t=o,n=a,i=!0}};!function(e){"use strict";function t(e,t){return function(t){function n(t,i){var r=this;_classCallCheck(this,n),_get(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,t,i),this._collectionDirtyAwareness=new e(function(){return r.collection}),this.dirtyItems=this._collectionDirtyAwareness.dirtyItems.bind(this._collectionDirtyAwareness),this.isDirty=this._collectionDirtyAwareness.isDirty.bind(this._collectionDirtyAwareness),this.isPristine=this._collectionDirtyAwareness.isPristine.bind(this._collectionDirtyAwareness),this.revert=this._collectionDirtyAwareness.revert.bind(this._collectionDirtyAwareness)}return _inherits(n,t),_createClass(n,[{key:"save",value:function(e,t){return this._saveCollection(e,t,this.dirtyItems())}}]),n}(t)}t.$inject=["CollectionDirtyAwareness","CollectionModelBase"],e.module("models.dirtyAwareCollectionModel",[]).service("DirtyAwareCollectionModel",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_get=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;s=u=l=void 0,i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return void 0;e=u,t=o,n=a,i=!0}};!function(e){"use strict";function t(e,t){return function(e){function n(e,i,r){_classCallCheck(this,n),_get(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e),this.modelState=new t(i,r)}return _inherits(n,e),_createClass(n,[{key:"isPristine",value:function(){return this.isNew()?!0:this.isPersisted()?this.modelState.isPristine(this.item):!1}},{key:"isDirty",value:function(){return!this.isPristine()}},{key:"revert",value:function(){this._item=this.modelState.snapshot}},{key:"isValidForSave",value:function(){return this.isNew()||!this.isPersisted()||this.modelState.isDirty(this.item)}},{key:"item",set:function(e){this._item=e,this.modelState&&this.modelState.snapshotItem(this._item)},get:function(){return this._item}}]),n}(e)}t.$inject=["ModelBase","ModelState"],e.module("models.dirtyAwareModel",[]).service("DirtyAwareModel",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e){return function(){function t(e){_classCallCheck(this,t),this._resource=e,this.item={}}return _createClass(t,[{key:"internalize",value:function(e){e?this.item=e:this.item={}}},{key:"initItem",value:function(t){return t?this.fetch({id:t}):(this.item=this._newItem(),e.when(this.item))}},{key:"save",value:function(e){return this.isPersisted()?this.update(_.merge(this.item,e)):this.create(_.merge(this.item,e))}},{key:"destroy",value:function(){return this._resource.destroy({id:this.item.id}).$promise.then(function(e){return e})}},{key:"fetch",value:function(e){var t=this;return this._resource.show(e).$promise.then(function(e){return t.item=e,t.item})}},{key:"update",value:function(e){var t=this;return this._resource.update(e).$promise.then(function(e){return t.item=e,t.item})}},{key:"create",value:function(e){var t=this;return this._resource.create(e).$promise.then(function(e){return t.item=e,t.item})}},{key:"isPersisted",value:function(){return _.exists(this.item.id)}},{key:"isNew",value:function(){return JSON.stringify(this.item)===JSON.stringify(this._newItem())}},{key:"_newItem",value:function(){throw"#_newItem must be implemented in subclasses!"}}]),t}()}t.$inject=["$q"],e.module("models.modelBase",[]).service("ModelBase",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function t(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];_classCallCheck(this,t),this._fields=e,this._comparators=this._defaultComparators(e,n)}return _createClass(t,[{key:"snapshotItem",value:function(t){this._snapshot=e.copy(t)}},{key:"isPristine",value:function(e){var t=this;return _.every(this._fields,function(n){return t._comparators[n](t._resolve(n,e),t._resolve(n,t._snapshot))})}},{key:"isDirty",value:function(e){return!this.isPristine(e)}},{key:"_resolve",value:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?!0:arguments[2];return e.split(".").reduce(function(e,t){return n?e?e[t]:void 0:e[t]},t||this)}},{key:"_defaultComparators",value:function(e,t){var n={};return _.each(e,function(e){n[e]=t[e]||function(e,t){return JSON.stringify(e)===JSON.stringify(t)}}),n}},{key:"snapshot",get:function(){return e.copy(this._snapshot)}}]),t}();e.module("models.modelState",[]).service("ModelState",function(){return t})}(angular),!function(e){"use strict";e.module("models",["models.collectionDirtyAwareness","models.dirtyAwareCollectionModel","models.dirtyAwareModel","models.modelState","models.collectionModelBase","models.modelBase","models.unpersistedModel"])}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(){_classCallCheck(this,e),this.item={}}return _createClass(e,[{key:"internalize",value:function(e){this.item=e}},{key:"save",value:function(){throw"Cannot save an unpersisted model"}}]),e}();e.module("models.unpersistedModel",[]).service("UnpersistedModel",function(){return t})}(angular);var _get=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;s=u=l=void 0,i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return void 0;e=u,t=o,n=a,i=!0}};!function(e){"use strict";function t(e,t){this.makeCollectionModel=function(e,n,i){return function(t){function r(){_classCallCheck(this,r),_get(Object.getPrototypeOf(r.prototype),"constructor",this).call(this,e,i,n)}return _inherits(r,t),r}(t)},this.makeModel=function(t,n,i){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],o=r.dirtyAwareFields||_.keys(n),a=r.dirtyAwareComparators;return function(e){function r(){_classCallCheck(this,r),_get(Object.getPrototypeOf(r.prototype),"constructor",this).call(this,t,i,n,o,a)}return _inherits(r,e),r}(e)}}t.$inject=["StandardModel","StandardCollectionModel"],e.module("modelGeneration.modelFactory",[]).service("ModelFactory",t)}(angular),!function(e){"use strict";e.module("modelGeneration",["modelGeneration.modelFactory","modelGeneration.modelManager","modelGeneration.resourceFactory","modelGeneration.standardModel","modelGeneration.standardCollectionModel"])}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n,i){_classCallCheck(this,e),this._ModelFactory=t,this._ResourceFactory=n,this._definitions=i,this._resources={},this._modelClasses={},this._collectionModelClasses={}}return _createClass(e,[{key:"forModelName",value:function(e){var t=this,n=this._definitions[e],i=this._loadResource(e,n.resource);return{resource:function(){return i},modelClass:function(){return t._loadModelClass(e,n.newItem,i,n.options)},collectionClass:function(n){return t._loadCollectionModelClass(pluralize.plural(e),n,i)}}}},{key:"_loadCollectionModelClass",value:function(e,t,n){return this._load(this._collectionModelClasses,e,this._ModelFactory.makeCollectionModel,this._ModelFactory,e,t,n)}},{key:"_loadModelClass",value:function(e,t,n,i){return this._load(this._modelClasses,e,this._ModelFactory.makeModel,this._ModelFactory,e,t,n,i)}},{key:"_loadResource",value:function(e,t){var n=this._capitalize(e)+"Resource";return this._load(this._resources,n,this._ResourceFactory.make,this._ResourceFactory,t.path,t.parameters,t.actions)}},{key:"_load",value:function(e,t,n,i){var r=e[t];if(!_.exists(r)){for(var o=arguments.length,a=Array(o>4?o-4:0),s=4;o>s;s++)a[s-4]=arguments[s];r=n.apply(i,a),e[t]=r}return r}},{key:"_capitalize",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}}]),e}();t.$inject=["ModelFactory","ResourceFactory","ModelDefinitions"],e.module("modelGeneration.modelManager",[]).service("ModelManager",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t){_classCallCheck(this,e),this._defaultActions={update:{method:"PUT"},create:{method:"POST"},show:{method:"GET"},index:{method:"GET",isArray:!0,responseType:"json"},destroy:{method:"DELETE"}},this._$resource=t}return _createClass(e,[{key:"make",value:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this._$resource(e,t,_.merge(this._defaultActions,n))}}]),e}();t.$inject=["$resource"],e.module("modelGeneration.resourceFactory",[]).service("ResourceFactory",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_get=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;s=u=l=void 0,i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return void 0;e=u,t=o,n=a,i=!0}};!function(e){"use strict";function t(e,t){return function(e){function n(e,i,r){var o=this;_classCallCheck(this,n),_get(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,i,r),this._handler=new t(e,{modelCollection:function(){return o.collection}})}return _inherits(n,e),_createClass(n,[{key:"initCollection",value:function(e){return this._handler.wrapInitCollection(_get(Object.getPrototypeOf(n.prototype),"initCollection",this).bind(this,e))}},{key:"save",value:function(e,t){return this._handler.wrapCollectionSave(_get(Object.getPrototypeOf(n.prototype),"save",this).bind(this,e,t))}}]),n}(e)}t.$inject=["DirtyAwareCollectionModel","ActionHandler"],e.module("modelGeneration.standardCollectionModel",["models"]).service("StandardCollectionModel",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_get=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;s=u=l=void 0,i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return void 0;e=u,t=o,n=a,i=!0}};!function(e){"use strict";function t(t,n){return function(t){function i(e,t,r,o,a){var s=this;_classCallCheck(this,i),_get(Object.getPrototypeOf(i.prototype),"constructor",this).call(this,t,o,a),this._handler=new n(e,{modelItem:function(){return s.item}}),this._newItemObj=r}return _inherits(i,t),_createClass(i,[{key:"fetch",value:function(e){return this._handler.wrapFetch(_get(Object.getPrototypeOf(i.prototype),"fetch",this).bind(this,e))}},{key:"destroy",value:function(){return this._handler.wrapDestroy(_get(Object.getPrototypeOf(i.prototype),"destroy",this).bind(this))}},{key:"update",value:function(e){return this._handler.wrapUpdate(_get(Object.getPrototypeOf(i.prototype),"update",this).bind(this,e))}},{key:"create",value:function(e){return this._handler.wrapCreate(_get(Object.getPrototypeOf(i.prototype),"create",this).bind(this,e))}},{key:"_newItem",value:function(){return e.copy(this._newItemObj)}}]),i}(t)}t.$inject=["DirtyAwareModel","ActionHandler"],e.module("modelGeneration.standardModel",["models"]).service("StandardModel",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_get=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;s=u=l=void 0,i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return void 0;e=u,t=o,n=a,i=!0}};!function(e){"use strict";function t(e,t,n,i){return function(n){function r(){_classCallCheck(this,r),_get(Object.getPrototypeOf(r.prototype),"constructor",this).call(this,"query",e,{title:"",tags:[],version:{body:"",parameters:[]}},["title","version.body","roles","tags"])}return _inherits(r,n),_createClass(r,[{key:"initItem",value:function(e,t){return e&&t?_get(Object.getPrototypeOf(r.prototype),"fetch",this).call(this,{id:e,version_id:t}):(this.item=this._newItem(),i.when(this.item))}},{key:"detectParameters",value:function(){t.detectParameters(this.item.version.body,this.item.version.parameters)}},{key:"addParameter",value:function(e){var n=t.constructParameter(e);this.item.version.parameters.push(n)}}]),r}(n)}t.$inject=["QueryResource","ParameterMethods","StandardModel","$q"],e.module("alephServices.query",[]).service("Query",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n,i){_classCallCheck(this,e),this._alertFlash=n,this._$location=t,this._$q=i}return _createClass(e,[{key:"success",value:function(e,t,n){var i=e||"action",r=_.exists(t)?t:!1;return this._alertFlash.emitSuccess('Query "'+n.title+'" '+i+"d!",r),n}},{key:"handleReplExit",value:function(e){return"QueryReplExit"!==e?this._$q.reject(e):void this._alertFlash.emitInfo("Exited editing REPL without saving",!1)}},{key:"navigateToLatestVersion",value:function(e){return this._$location.path("/queries/"+e.id+"/query_versions/"+e.version.id),e}},{key:"navigateToIndex",value:function(){this._$location.path("/queries")}}]),e}();t.$inject=["$location","AlertFlash","$q"],e.module("alephServices.queryHandler",[]).service("QueryHandler",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n,i,r,o){_classCallCheck(this,e),this._Query=n,this._QueryVersion=i,this._Results=r,this._VisualizationService=o,this._$routeParams=t}return _createClass(e,[{key:"initialize",value:function(){this.query=new this._Query,this.queryVersions=new this._QueryVersion,this.results=new this._Results,this.queryId=this._$routeParams.query_id,this.queryVersionId=this._$routeParams.query_version_id||"latest"}},{key:"load",value:function(){return this.query.initItem(this.queryId,this.queryVersionId).then(this.loadQueryVersions.bind(this)).then(this.loadResults.bind(this)).then(this.loadVisualizations.bind(this))}},{key:"loadQueryVersions",value:function(e){return this.queryVersions.initCollection(e.id).then(function(t){return{query:e,queryVersions:t}})}},{key:"loadResults",value:function(e){var t=e.query;return this.results.initCollection({query_id:t.id,query_version_id:t.version.id}).then(function(t){return _.merge(e,{results:t})})}},{key:"loadVisualizations",value:function(e){var t=e.query;return this._VisualizationService.load(t.id,t.version.id).then(function(t){return _.merge(e,{visualizations:t})})}}]),e}();t.$inject=["$routeParams","Query","QueryVersions","Results","VisualizationService"],e.module("alephServices.queryLoader",[]).service("QueryLoader",t)}(angular),!function(e){"use strict";function t(){function t(e,t){var n=t[e];return _.exists(n)&&(t[e]=_.map(n,function(e){return _.exists(e.text)?e.text:e})),t}var n=["id","title","body","tags","result_id","version","roles"];return[function(e){return t("tags",e)},function(e){return t("roles",e)},function(e){return{query:_.selectKeys(e,n)}},e.toJson]}e.module("alephServices.queryRequestTransformers",[]).service("QueryRequestTransformers",t)}(angular),!function(e){"use strict";function t(e,t){return e.make("/queries/:id.json",{id:"@id"},{update:{method:"PUT",transformRequest:t},create:{method:"POST",transformRequest:t}})}t.$inject=["ResourceFactory","QueryRequestTransformers"],e.module("alephServices.queryResource",[]).service("QueryResource",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t){_classCallCheck(this,e),this._initTabs(),this.$location=t,this._defaultTab="query"}return _createClass(e,[{key:"setActiveTabFromUrl",value:function(){this._activateTab(this.getTab())}},{key:"navigateToTab",value:function(e){this._activateTab(e),this.setTab(e)}},{key:"setTab",value:function(e){this.$location.search("tab",e)}},{key:"getTab",value:function(){var e=this.$location.search().tab;return"visualizations"===e||"results"===e?e:"query"}},{key:"_initTabs",value:function(){this.state={query:{active:!1},results:{active:!1},visualizations:{active:!1}}}},{key:"_activateTab",value:function(e){this._initTabs(),this.state[e].active=!0}},{key:"defaultTag",set:function(e){this._defaultTab=e},get:function(){return this._defaultTab}}]),e}();t.$inject=["$location"],e.module("alephServices.queryTab",[]).service("QueryTab",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_get=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;s=u=l=void 0,i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return void 0;e=u,t=o,n=a,i=!0}};!function(e){"use strict";function t(e,t,n){return function(t){function i(){_classCallCheck(this,i),_get(Object.getPrototypeOf(i.prototype),"constructor",this).call(this,{index:e("/queries/:id/query_versions/:query_version_id.json").query},n)}return _inherits(i,t),_createClass(i,[{key:"initCollection",value:function(e){return _get(Object.getPrototypeOf(i.prototype),"initCollection",this).call(this,{id:e})}}]),i}(t)}t.$inject=["$resource","CollectionModelBase","UnpersistedModel"],e.module("alephServices.queryVersions",[]).service("QueryVersions",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_get=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;s=u=l=void 0,i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return void 0;e=u,t=o,n=a,i=!0}};!function(e){"use strict";function t(e,t){var n=e.forModelName("result").modelClass();return function(e){function n(){_classCallCheck(this,n),_get(Object.getPrototypeOf(n.prototype),"constructor",this).call(this),this.poller=new t(this)}return _inherits(n,e),_createClass(n,[{key:"save",value:function(e,t,i){var r=_.merge({query_id:e,query_version_id:t},i||{});return _get(Object.getPrototypeOf(n.prototype),"create",this).call(this,r)}}]),n}(n)}t.$inject=["ModelManager","ResultPoller"],e.module("alephServices.result",[]).service("Result",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e){return function(){function t(e){_classCallCheck(this,t),this._result=e}return _createClass(t,[{key:"poll",value:function(){var t=this._result.item;this.pollingKey="result_"+t.id+"_"+(new Date).getTime(),e.poll(t,this.pollingKey,function(){return"complete"===t.status||"failed"===t.status?!0:!1})}},{key:"unPoll",value:function(){e.unPoll(this.pollingKey)}}]),t}()}t.$inject=["PollService"],e.module("alephServices.resultPoller",[]).service("ResultPoller",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e){return function(){function t(e,n){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];_classCallCheck(this,t),this.sandbox=i.sandbox,this.substitutionValues=i.substitutionValues||{},this.results=n,this.query=e,this.enableAlert=i.enableAlert||!1,this.enablePolling=i.enablePolling||!1}return _createClass(t,[{key:"run",value:function(){var t=this,n=this.results.Model,i=new n;return i.save(this.queryId,this.queryVersionId,{substitution_values:this.substitutionValues,body:this.body,parameters:this.parameters,sandbox:this.sandbox}).then(function(n){t.enableAlert&&e.emitInfo("Started running result, id = "+n.id);var i=t.results.add(n);return t.enablePolling&&i.poller.poll(),n})}},{key:"queryId",get:function(){return this.sandbox?void 0:this.query.item.id}},{key:"queryVersionId",get:function(){return this.sandbox?void 0:this.query.item.version.id}},{key:"body",get:function(){return this.sandbox?this.query.item.version.body:void 0}},{key:"parameters",get:function(){return this.sandbox?this.query.item.version.parameters:void 0}}]),t}()}t.$inject=["AlertFlash"],e.module("alephServices.resultRunner",[]).service("ResultRunner",t)}(angular),!function(e){"use strict";function t(e,t){return t.forModelName("result").collectionClass(e)}t.$inject=["Result","ModelManager"],e.module("alephServices.results",[]).service("Results",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";function t(e,t,n){return function(){function i(){_classCallCheck(this,i),this.modelState=new t(["comment_text"]),this.item={}}return _createClass(i,[{key:"internalize",value:function(e){this.item=e}},{key:"isPersisted",value:function(){return _.exists(this.item.comment_id)}},{key:"isNew",value:function(){return!_.exists(this.item.comment_text)||0===this.item.comment_text.length}},{key:"isPristine",value:function(){return this.isNew()?!0:this.isPersisted()?this.modelState.isPristine(this.item):!1}},{key:"isDirty",value:function(){return!this.isPristine()}},{key:"isValidForSave",value:function(){return!this.isPersisted()||this.modelState.isDirty(this.item)}},{key:"save",value:function(){var t=this._toCommentObject(),i=n.emitError.bind(n,"Failed to save comment, id = "+t.id);return this.isPersisted()?e.update(t).$promise.then(this._internalizeCommentInfo.bind(this))["catch"](i):this.modelState.isDirty(this.item)?e.create(t).$promise.then(this._internalizeCommentInfo.bind(this))["catch"](i):void 0}},{key:"_internalizeCommentInfo",value:function(e){return this._item.comment_id=e.id,this._item.comment_text=e.text,this.modelState.snapshotItem(this._item),e}},{key:"_toCommentObject",value:function(){return{id:this.item.comment_id,text:this.item.comment_text,schema:this.item.schema,table:this.item.table,column:this.item.column,target_type:this.item.type}}},{key:"item",set:function(e){this._item=e,this.modelState.snapshotItem(this._item)},get:function(){return this._item}}]),i}()}t.$inject=["SchemaCommentResource","ModelState","AlertFlash"],e.module("alephServices.schema.column",[]).service("SchemaColumn",t)}(angular),!function(e){"use strict";function t(e){return e.make("/columns/:id.json",{id:"@id"})}t.$inject=["ResourceFactory"],e.module("alephServices.schema.columnResource",[]).service("SchemaColumnResource",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_get=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;s=u=l=void 0,i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return void 0;e=u,t=o,n=a,i=!0}};!function(e){"use strict";function t(e,t,n){return function(t){function i(){_classCallCheck(this,i),_get(Object.getPrototypeOf(i.prototype),"constructor",this).call(this,e,n),this.uniqueSchemas=[],this.uniqueTables=[],this.uniqueColumns=[],this.schemaTables={}}return _inherits(i,t),_createClass(i,[{key:"initCollection",value:function(){return _get(Object.getPrototypeOf(i.prototype),"initCollection",this).call(this).then(this._processUniqueAttributes.bind(this))}},{key:"_processUniqueAttributes",value:function(e){var t=this,n=[],i=[],r=[];return _.each(e,function(e){n.push(e.item.column),i.push(e.item.table),r.push(e.item.schema),t._addToSchemaTables(e)}),this.uniqueColumns=_.uniq(n),this.uniqueTables=_.uniq(i),this.uniqueSchemas=_.uniq(r),e}},{key:"_addToSchemaTables",value:function(e){var t=this.schemaTables[e.item.schema];t||(t=[],this.schemaTables[e.item.schema]=t),_.contains(t,e.item.table)||t.push(e.item.table)}}]),i}(t)}t.$inject=["SchemaColumnResource","CollectionModelBase","UnpersistedModel"],e.module("alephServices.schema.columns",[]).service("SchemaColumns",t)}(angular),!function(e){"use strict";function t(e){return e.make("/schema_comments/:id.json",{id:"@id"})}t.$inject=["ResourceFactory"],e.module("alephServices.schema.commentResource",[]).service("SchemaCommentResource",t)}(angular),!function(e){"use strict";e.module("alephServices",["ngResource","alephServices.queryRequestTransformers","alephServices.queryResource","alephServices.queryHandler","alephServices.queryVersions","alephServices.queryTab","alephServices.query","alephServices.queryLoader","alephServices.visualizationService","alephServices.visualization","alephServices.visualizations","alephServices.sourceRenderer","alephServices.results","alephServices.result","alephServices.resultRunner","alephServices.resultPoller","alephServices.alertResource","alephServices.alert","alephServices.aceSnippetManager","models","modelGeneration","alephServices.schema.columns","alephServices.schema.columnResource","alephServices.schema.column","alephServices.schema.commentResource","alephServices.roleModel","alephServices.schemaCompleter","alephServices.alertFlash","alephServices.pageTitleManager","alephServices.navigationGuard","alephServices.aceCompleters","alephServices.selectionTagInput","alephServices.paginationComponents","alephServices.pagination","alephServices.openReplService","alephServices.matcherRunner","alephServices.actionHandler","alephServices.aceSqlParse","alephServices.pollService","alephServices.lockService","alephServices.localResource","alephServices.githubUrlService","alephServices.defaultAceConfigurator","alephServices.parameterMethods","alephServices.tagResource","alephServices.keywordCompleter","alephServices.spinnerState","alephServices.serverConfigurations"]).constant("defaultDateFormat","yyyy-MM-dd").constant("ApplicationTitle","Aleph").constant("ModelDefinitions",{result:{newItem:{sample_data:[],row_count:0,parameters:[],headers:[]},resource:{path:"/results/:id.json",parameters:{id:"@id"},actions:{index:{method:"GET",isArray:!0,url:"/queries/:query_id/query_versions/:query_version_id/results.json"}}}},snippet:{newItem:{name:"",content:""},resource:{path:"/snippets/:id.json",parameters:{id:"@id"}}},visualization:{newItem:{html_source:"",title:""},resource:{path:"/visualizations/:id.json",parameters:{id:"@id"},actions:{index:{method:"GET",isArray:!0,url:"/queries/:query_id/query_versions/:query_version_id/visualizations.json"}}}}}).service("getResultCsv",["$http","$window",function(e,t){return function(n){var i=arguments.length<=1||void 0===arguments[1]?"The CSV file for this result was not found.":arguments[1];e.get("/result_csvs/"+n+".json").success(function(e){return t.open(e.url,"_self",""),e}).error(function(){t.alert(i)})}}])}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(){_classCallCheck(this,e),this._context="pgsql",this._aceSnippetManager=ace.require("ace/snippets").snippetManager}return _createClass(e,[{key:"add",value:function(e,t){this._aceSnippetManager.register(this._parseSnippet(e,t),this._context)}},{key:"remove",value:function(e,t){this._aceSnippetManager.unregister(this._parseSnippet(e,t),this._context)}},{key:"reset",value:function(){this._aceSnippetManager.snippetMap={},this._aceSnippetManager.snippetNameMap={}}},{key:"_parseSnippet",value:function(e,t){var n="snippet "+e+" \n "+this._transformNewlines(t);return this._aceSnippetManager.parseSnippetFile(n)}},{key:"_transformNewlines",value:function(e){return e.replace(/(\r\n|\n|\r)/gm,"\n ")}},{key:"context",set:function(e){this._context=e},get:function(){return this._context}}]),e}();e.module("alephServices.aceSnippetManager",[]).service("AceSnippetManager",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t){_classCallCheck(this,e),this._visualization=t}return _createClass(e,[{key:"setTemplate",value:function(e){this._compiledTemplate=_.template(e)}},{key:"setResults",value:function(e){this.results=e}},{key:"latestResult",value:function t(){var t=void 0;return _(this.results.items()).sortBy("id").reverse().forEach(function(e){_.exists(t)||"complete"!==e.status||(t=e)}),t}},{key:"isValid",value:function(){return this._visualization.hasSource()&&this.latestResult()&&_.exists(this._compiledTemplate)}},{key:"rendered",value:function(){var e=this.latestResult();
|
149
|
+
return this._visualization.hasSource()&&e&&_.exists(this._compiledTemplate)?(this._internalizeToLocalStorage(e),this._compiledTemplate({result_id:e.id,panel:"#chart-panel",body:this._visualization.item.html_source})):null}},{key:"_internalizeToLocalStorage",value:function(e){SerializedStorage.set("DATASET",e.sample_data),SerializedStorage.set("COLUMNS",this._toColumns(e.headers,e.sample_data)),SerializedStorage.set("HEADERS",e.headers)}},{key:"_toColumns",value:function(e,t){var n=[];return e.forEach(function(e,i){n.push([e].concat(t.map(function(e){return e[i]})))}),n}}]),e}();e.module("alephServices.sourceRenderer",[]).service("SourceRenderer",function(){return t})}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_get=function(e,t,n){for(var i=!0;i;){var r=e,o=t,a=n;s=u=l=void 0,i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return void 0;e=u,t=o,n=a,i=!0}};!function(e){"use strict";function t(e){var t=e.forModelName("visualization").modelClass();return function(e){function t(){_classCallCheck(this,t),_get(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.hasSource=this.itemHas.bind(this,"html_source"),this.hasTitle=this.itemHas.bind(this,"title")}return _inherits(t,e),_createClass(t,[{key:"itemHas",value:function(e){return Utils.stringHelpers.isPresent(this.item[e])}},{key:"save",value:function(e,t){return this._save(e,t)}},{key:"destroy",value:function(){var e=this;return _get(Object.getPrototypeOf(t.prototype),"destroy",this).call(this).then(function(){return e.initItem()})}},{key:"_save",value:function(e,n){if(this.isPersisted())return _get(Object.getPrototypeOf(t.prototype),"update",this).call(this,this.item);var i=_.merge({query_id:e,query_version_id:n},this.item);return _get(Object.getPrototypeOf(t.prototype),"create",this).call(this,i)}}]),t}(t)}t.$inject=["ModelManager"],e.module("alephServices.visualization",[]).service("Visualization",t)}(angular);var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){"use strict";var t=function(){function e(t,n,i,r,o){_classCallCheck(this,e),this.visualization=new n,this.visualizations=new i,this.sourceRenderer=new t(this.visualization),this.setResults=this.sourceRenderer.setResults.bind(this.sourceRenderer),this.presetDisplayList=[],this.presets={},this._localResource=new r("visualization"),this._$q=o}return _createClass(e,[{key:"load",value:function(e,t){var n=this;return this.visualizations.initCollection({query_id:e,query_version_id:t}).then(function(e){return _.exists(e[0])?n.visualization.internalize(e[0].item):n.visualization.initItem(),e})}},{key:"initService",value:function(){return this._loadPresets().then(this._loadTemplate.bind(this))}},{key:"_loadTemplate",value:function(){var e=this;return this._localResource.get("template.json").then(function(t){e.sourceRenderer.setTemplate(t.data.template.join("\n"))})}},{key:"_loadPresets",value:function(){var e=this;return this._localResource.get("presets.json").then(function(t){return e.presetDisplayList=_.keys(t.data),t.data}).then(function(t){return e._$q.all(_.mapObject(t,function(t,n){e._localResource.get(t).then(function(t){return e.presets[n]=t.data,t.data})}))})}}]),e}();t.$inject=["SourceRenderer","Visualization","Visualizations","LocalResource","$q"],e.module("alephServices.visualizationService",[]).service("VisualizationService",t)}(angular),!function(e){"use strict";function t(e,t){return t.forModelName("visualization").collectionClass(e)}t.$inject=["Visualization","ModelManager"],e.module("alephServices.visualizations",[]).service("Visualizations",t)}(angular);
|