From 587d347178848c6045520327aa97abc8fd5b46bc Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 15 Jan 2016 17:01:30 +0800 Subject: [PATCH 001/209] added wechat --- Gemfile | 1 + app/controllers/wechats_controller.rb | 119 + config/routes.rb | 3 + config/wechat.yml | 33 + db/schema.rb | 6008 ++++++++----------------- 5 files changed, 2153 insertions(+), 4011 deletions(-) create mode 100644 app/controllers/wechats_controller.rb create mode 100644 config/wechat.yml diff --git a/Gemfile b/Gemfile index c739e1085..0e4e456ca 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,7 @@ unless RUBY_PLATFORM =~ /w32/ gem 'iconv' end +gem 'wechat' gem 'grack', path:'lib/grack' gem 'gitlab', path: 'lib/gitlab-cli' gem 'rest-client' diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb new file mode 100644 index 000000000..fd3050e05 --- /dev/null +++ b/app/controllers/wechats_controller.rb @@ -0,0 +1,119 @@ +class WechatsController < ActionController::Base + wechat_responder + + # default text responder when no other match + on :text do |request, content| + request.reply.text "echo: #{content}" # Just echo + end + + # When receive 'help', will trigger this responder + on :text, with: 'help' do |request| + request.reply.text 'help content' + end + + # When receive 'news', will match and will got count as as parameter + on :text, with: /^(\d+) news$/ do |request, count| + # Wechat article can only contain max 10 items, large than 10 will dropped. + news = (1..count.to_i).each_with_object([]) { |n, memo| memo << { title: 'News title', content: "No. #{n} news content" } } + request.reply.news(news) do |article, n, index| # article is return object + article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'http://www.baidu.com/img/bdlogo.gif', url: 'http://www.baidu.com/' + end + end + + on :event, with: 'subscribe' do |request| + request.reply.text "#{request[:FromUserName]} subscribe now" + end + + # When unsubscribe user scan qrcode qrscene_xxxxxx to subscribe in public account + # notice user will subscribe public account at same time, so wechat won't trigger subscribe event any more + on :scan, with: 'qrscene_xxxxxx' do |request, ticket| + request.reply.text "Unsubscribe user #{request[:FromUserName]} Ticket #{ticket}" + end + + # When subscribe user scan scene_id in public account + on :scan, with: 'scene_id' do |request, ticket| + request.reply.text "Subscribe user #{request[:FromUserName]} Ticket #{ticket}" + end + + # When no any on :scan responder can match subscribe user scaned scene_id + on :event, with: 'scan' do |request| + if request[:EventKey].present? + request.reply.text "event scan got EventKey #{request[:EventKey]} Ticket #{request[:Ticket]}" + end + end + + # When enterprise user press menu BINDING_QR_CODE and success to scan bar code + on :scan, with: 'BINDING_QR_CODE' do |request, scan_result, scan_type| + request.reply.text "User #{request[:FromUserName]} ScanResult #{scan_result} ScanType #{scan_type}" + end + + # Except QR code, wechat can also scan CODE_39 bar code in enterprise account + on :scan, with: 'BINDING_BARCODE' do |message, scan_result| + if scan_result.start_with? 'CODE_39,' + message.reply.text "User: #{message[:FromUserName]} scan barcode, result is #{scan_result.split(',')[1]}" + end + end + + # When user click the menu button + on :click, with: 'BOOK_LUNCH' do |request, key| + request.reply.text "User: #{request[:FromUserName]} click #{key}" + end + + # When user view URL in the menu button + on :view, with: 'http://wechat.somewhere.com/view_url' do |request, view| + request.reply.text "#{request[:FromUserName]} view #{view}" + end + + # When user sent the imsage + on :image do |request| + request.reply.image(request[:MediaId]) # Echo the sent image to user + end + + # When user sent the voice + on :voice do |request| + request.reply.voice(request[:MediaId]) # Echo the sent voice to user + end + + # When user sent the video + on :video do |request| + nickname = wechat.user(request[:FromUserName])['nickname'] # Call wechat api to get sender nickname + request.reply.video(request[:MediaId], title: 'Echo', description: "Got #{nickname} sent video") # Echo the sent video to user + end + + # When user sent location + on :location do |request| + request.reply.text("Latitude: #{message[:Latitude]} Longitude: #{message[:Longitude]} Precision: #{message[:Precision]}") + end + + on :event, with: 'unsubscribe' do |request| + request.reply.success # user can not receive this message + end + + # When user enter the app / agent app + on :event, with: 'enter_agent' do |request| + request.reply.text "#{request[:FromUserName]} enter agent app now" + end + + # When batch job create/update user (incremental) finished. + on :batch_job, with: 'sync_user' do |request, batch_job| + request.reply.text "sync_user job #{batch_job[:JobId]} finished, return code #{batch_job[:ErrCode]}, return message #{batch_job[:ErrMsg]}" + end + + # When batch job replace user (full sync) finished. + on :batch_job, with: 'replace_user' do |request, batch_job| + request.reply.text "replace_user job #{batch_job[:JobId]} finished, return code #{batch_job[:ErrCode]}, return message #{batch_job[:ErrMsg]}" + end + + # When batch job invent user finished. + on :batch_job, with: 'invite_user' do |request, batch_job| + request.reply.text "invite_user job #{batch_job[:JobId]} finished, return code #{batch_job[:ErrCode]}, return message #{batch_job[:ErrMsg]}" + end + + # When batch job replace department (full sync) finished. + on :batch_job, with: 'replace_party' do |request, batch_job| + request.reply.text "replace_party job #{batch_job[:JobId]} finished, return code #{batch_job[:ErrCode]}, return message #{batch_job[:ErrMsg]}" + end + + # Any not match above will fail to below + on :fallback, respond: 'fallback message' +end diff --git a/config/routes.rb b/config/routes.rb index 6afd5e011..02220864d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -26,6 +26,7 @@ # Example: :via => :get ====> :via => :get RedmineApp::Application.routes.draw do + mount Mobile::API => '/api' # Enable Grack support @@ -1119,6 +1120,8 @@ RedmineApp::Application.routes.draw do resources :at + resource :wechat, only:[:show, :create] + Dir.glob File.expand_path("plugins/*", Rails.root) do |plugin_dir| file = File.join(plugin_dir, "config/routes.rb") if File.exists?(file) diff --git a/config/wechat.yml b/config/wechat.yml new file mode 100644 index 000000000..af795654f --- /dev/null +++ b/config/wechat.yml @@ -0,0 +1,33 @@ +default: &default + corpid: "corpid" + corpsecret: "corpsecret" + agentid: 1 +# Or if using public account, only need above two line +# appid: "my_appid" +# secret: "my_secret" + token: "my_token" + access_token: "1234567" + encrypt_mode: true # if true must fill encoding_aes_key + encoding_aes_key: "TJP8IMYwdcW1EkBIKIcQ193bCe7uB0RVqZDC2eAmkjz" + jsapi_ticket: "C:/Users/[user_name]/wechat_jsapi_ticket" + +production: + corpid: <%= ENV['WECHAT_CORPID'] %> + corpsecret: <%= ENV['WECHAT_CORPSECRET'] %> + agentid: <%= ENV['WECHAT_AGENTID'] %> +# Or if using public account, only need above two line +# appid: +# secret: + token: <%= ENV['WECHAT_TOKEN'] %> + timeout: 30, + skip_verify_ssl: true + access_token: <%= ENV['WECHAT_ACCESS_TOKEN'] %> + encrypt_mode: false # if true must fill encoding_aes_key + encoding_aes_key: <%= ENV['WECHAT_ENCODING_AES_KEY'] %> + jsapi_ticket: + +development: + <<: *default + +test: + <<: *default \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index 6e599f520..2e0e4d238 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,2018 +1,3 @@ -<<<<<<< HEAD -# encoding: UTF-8 -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended to check this file into your version control system. - -ActiveRecord::Schema.define(:version => 20160113090435) do - - create_table "activities", :force => true do |t| - t.integer "act_id", :null => false - t.string "act_type", :null => false - t.integer "user_id", :null => false - t.integer "activity_container_id" - t.string "activity_container_type", :default => "" - t.datetime "created_at" - end - - add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" - add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" - add_index "activities", ["user_id"], :name => "index_activities_on_user_id" - - create_table "activity_notifies", :force => true do |t| - t.integer "activity_container_id" - t.string "activity_container_type" - t.integer "activity_id" - t.string "activity_type" - t.integer "notify_to" - t.datetime "created_on" - t.integer "is_read" - end - - add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" - add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" - add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" - - create_table "api_keys", :force => true do |t| - t.string "access_token" - t.datetime "expires_at" - t.integer "user_id" - t.boolean "active", :default => true - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" - add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - - create_table "applied_projects", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - end - - create_table "apply_project_masters", :force => true do |t| - t.integer "user_id" - t.string "apply_type" - t.integer "apply_id" - t.integer "status" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "at_messages", :force => true do |t| - t.integer "user_id" - t.integer "at_message_id" - t.string "at_message_type" - t.boolean "viewed", :default => false - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sender_id" - end - - add_index "at_messages", ["user_id"], :name => "index_at_messages_on_user_id" - - create_table "attachment_histories", :force => true do |t| - t.integer "container_id" - t.string "container_type" - t.string "filename", :default => "" - t.string "disk_filename", :default => "" - t.integer "filesize", :default => 0 - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "" - t.integer "downloads", :default => 0 - t.integer "author_id" - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.integer "copy_from" - t.integer "quotes" - t.integer "version" - t.integer "attachment_id" - end - - create_table "attachments", :force => true do |t| - t.integer "container_id" - t.string "container_type", :limit => 30 - t.string "filename", :default => "", :null => false - t.string "disk_filename", :default => "", :null => false - t.integer "filesize", :default => 0, :null => false - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "", :null => false - t.integer "downloads", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype", :default => 1 - t.integer "is_public", :default => 1 - t.integer "copy_from" - t.integer "quotes" - end - - add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" - add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" - add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" - - create_table "attachmentstypes", :force => true do |t| - t.integer "typeId", :null => false - t.string "typeName", :limit => 50 - end - - create_table "auth_sources", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 60, :default => "", :null => false - t.string "host", :limit => 60 - t.integer "port" - t.string "account" - t.string "account_password", :default => "" - t.string "base_dn" - t.string "attr_login", :limit => 30 - t.string "attr_firstname", :limit => 30 - t.string "attr_lastname", :limit => 30 - t.string "attr_mail", :limit => 30 - t.boolean "onthefly_register", :default => false, :null => false - t.boolean "tls", :default => false, :null => false - t.string "filter" - t.integer "timeout" - end - - add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" - - create_table "biding_projects", :force => true do |t| - t.integer "project_id" - t.integer "bid_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "bids", :force => true do |t| - t.string "name" - t.string "budget", :null => false - t.integer "author_id" - t.date "deadline" - t.text "description" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.integer "commit" - t.integer "reward_type" - t.integer "homework_type" - t.integer "parent_id" - t.string "password" - t.integer "is_evaluation" - t.integer "proportion", :default => 60 - t.integer "comment_status", :default => 0 - t.integer "evaluation_num", :default => 3 - t.integer "open_anonymous_evaluation", :default => 1 - end - - create_table "blog_comments", :force => true do |t| - t.integer "blog_id", :null => false - t.integer "parent_id" - t.string "title", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "comments_count", :default => 0, :null => false - t.integer "last_comment_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "reply_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "blogs", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - t.integer "position", :default => 1 - t.integer "article_count", :default => 0, :null => false - t.integer "comments_count", :default => 0, :null => false - t.integer "last_comments_id" - t.integer "parent_id" - t.integer "author_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "homepage_id" - end - - create_table "boards", :force => true do |t| - t.integer "project_id", :null => false - t.string "name", :default => "", :null => false - t.string "description" - t.integer "position", :default => 1 - t.integer "topics_count", :default => 0, :null => false - t.integer "messages_count", :default => 0, :null => false - t.integer "last_message_id" - t.integer "parent_id" - t.integer "course_id" - t.integer "org_subfield_id" - end - - add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" - add_index "boards", ["project_id"], :name => "boards_project_id" - - create_table "bug_to_osps", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "changes", :force => true do |t| - t.integer "changeset_id", :null => false - t.string "action", :limit => 1, :default => "", :null => false - t.text "path", :null => false - t.text "from_path" - t.string "from_revision" - t.string "revision" - t.string "branch" - end - - add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" - - create_table "changeset_parents", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "parent_id", :null => false - end - - add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" - add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" - - create_table "changesets", :force => true do |t| - t.integer "repository_id", :null => false - t.string "revision", :null => false - t.string "committer" - t.datetime "committed_on", :null => false - t.text "comments" - t.date "commit_date" - t.string "scmid" - t.integer "user_id" - end - - add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" - add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true - add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" - add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" - add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" - - create_table "changesets_issues", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "issue_id", :null => false - end - - add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true - - create_table "code_review_assignments", :force => true do |t| - t.integer "issue_id" - t.integer "change_id" - t.integer "attachment_id" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.string "action_type" - t.integer "changeset_id" - end - - create_table "code_review_project_settings", :force => true do |t| - t.integer "project_id" - t.integer "tracker_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "updated_by" - t.boolean "hide_code_review_tab", :default => false - t.integer "auto_relation", :default => 1 - t.integer "assignment_tracker_id" - t.text "auto_assign" - t.integer "lock_version", :default => 0, :null => false - t.boolean "tracker_in_review_dialog", :default => false - end - - create_table "code_review_user_settings", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "mail_notification", :default => 0, :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "code_reviews", :force => true do |t| - t.integer "project_id" - t.integer "change_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "line" - t.integer "updated_by_id" - t.integer "lock_version", :default => 0, :null => false - t.integer "status_changed_from" - t.integer "status_changed_to" - t.integer "issue_id" - t.string "action_type" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.integer "attachment_id" - t.integer "file_count", :default => 0, :null => false - t.boolean "diff_all" - end - - create_table "comments", :force => true do |t| - t.string "commented_type", :limit => 30, :default => "", :null => false - t.integer "commented_id", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.text "comments" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "comments", ["author_id"], :name => "index_comments_on_author_id" - add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" - - create_table "contest_notifications", :force => true do |t| - t.text "title" - t.text "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "contesting_projects", :force => true do |t| - t.integer "project_id" - t.string "contest_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "contesting_softapplications", :force => true do |t| - t.integer "softapplication_id" - t.integer "contest_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "contestnotifications", :force => true do |t| - t.integer "contest_id" - t.string "title" - t.string "summary" - t.text "description" - t.integer "author_id" - t.integer "notificationcomments_count" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "contests", :force => true do |t| - t.string "name" - t.string "budget", :default => "" - t.integer "author_id" - t.date "deadline" - t.string "description" - t.integer "commit" - t.string "password" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - create_table "course_activities", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_act_id" - t.string "course_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_attachments", :force => true do |t| - t.string "filename" - t.string "disk_filename" - t.integer "filesize" - t.string "content_type" - t.string "digest" - t.integer "downloads" - t.string "author_id" - t.string "integer" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "container_id", :default => 0 - end - - create_table "course_contributor_scores", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.integer "message_num" - t.integer "message_reply_num" - t.integer "news_reply_num" - t.integer "resource_num" - t.integer "journal_num" - t.integer "journal_reply_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "total_score" - end - - create_table "course_groups", :force => true do |t| - t.string "name" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_infos", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_messages", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_message_id" - t.string "course_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "content" - t.integer "status" - end - - create_table "course_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "course_id" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "courses", :force => true do |t| - t.integer "tea_id" - t.string "name" - t.integer "state" - t.string "code" - t.integer "time" - t.string "extra" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "location" - t.string "term" - t.string "string" - t.string "password" - t.string "setup_time" - t.string "endup_time" - t.string "class_period" - t.integer "school_id" - t.text "description" - t.integer "status", :default => 1 - t.integer "attachmenttype", :default => 2 - t.integer "lft" - t.integer "rgt" - t.integer "is_public", :limit => 1, :default => 1 - t.integer "inherit_members", :limit => 1, :default => 1 - t.integer "open_student", :default => 0 - t.integer "outline", :default => 0 - t.integer "publish_resource", :default => 0 - t.integer "is_delete", :default => 0 - t.integer "end_time" - t.string "end_term" - end - - create_table "custom_fields", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.string "field_format", :limit => 30, :default => "", :null => false - t.text "possible_values" - t.string "regexp", :default => "" - t.integer "min_length", :default => 0, :null => false - t.integer "max_length", :default => 0, :null => false - t.boolean "is_required", :default => false, :null => false - t.boolean "is_for_all", :default => false, :null => false - t.boolean "is_filter", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "searchable", :default => false - t.text "default_value" - t.boolean "editable", :default => true - t.boolean "visible", :default => true, :null => false - t.boolean "multiple", :default => false - end - - add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" - - create_table "custom_fields_projects", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "project_id", :default => 0, :null => false - end - - add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true - - create_table "custom_fields_trackers", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true - - create_table "custom_values", :force => true do |t| - t.string "customized_type", :limit => 30, :default => "", :null => false - t.integer "customized_id", :default => 0, :null => false - t.integer "custom_field_id", :default => 0, :null => false - t.text "value" - end - - add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" - add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" - - create_table "delayed_jobs", :force => true do |t| - t.integer "priority", :default => 0, :null => false - t.integer "attempts", :default => 0, :null => false - t.text "handler", :null => false - t.text "last_error" - t.datetime "run_at" - t.datetime "locked_at" - t.datetime "failed_at" - t.string "locked_by" - t.string "queue" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" - - create_table "discuss_demos", :force => true do |t| - t.string "title" - t.text "body" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "documents", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "category_id", :default => 0, :null => false - t.string "title", :limit => 60, :default => "", :null => false - t.text "description" - t.datetime "created_on" - t.integer "user_id", :default => 0 - t.integer "is_public", :default => 1 - end - - add_index "documents", ["category_id"], :name => "index_documents_on_category_id" - add_index "documents", ["created_on"], :name => "index_documents_on_created_on" - add_index "documents", ["project_id"], :name => "documents_project_id" - - create_table "dts", :primary_key => "Num", :force => true do |t| - t.string "Defect", :limit => 50 - t.string "Category", :limit => 50 - t.string "File" - t.string "Method" - t.string "Module", :limit => 20 - t.string "Variable", :limit => 50 - t.integer "StartLine" - t.integer "IPLine" - t.string "IPLineCode", :limit => 200 - t.string "Judge", :limit => 15 - t.integer "Review", :limit => 1 - t.string "Description" - t.text "PreConditions", :limit => 2147483647 - t.text "TraceInfo", :limit => 2147483647 - t.text "Code", :limit => 2147483647 - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "id", :null => false - end - - create_table "editor_of_documents", :force => true do |t| - t.integer "editor_id" - t.integer "org_document_comment_id" - t.datetime "created_at" - end - - create_table "enabled_modules", :force => true do |t| - t.integer "project_id" - t.string "name", :null => false - t.integer "course_id" - end - - add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" - - create_table "enumerations", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "is_default", :default => false, :null => false - t.string "type" - t.boolean "active", :default => true, :null => false - t.integer "project_id" - t.integer "parent_id" - t.string "position_name", :limit => 30 - end - - add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" - add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" - - create_table "exercise_answers", :force => true do |t| - t.integer "user_id" - t.integer "exercise_question_id" - t.integer "exercise_choice_id" - t.text "answer_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_choices", :force => true do |t| - t.integer "exercise_question_id" - t.text "choice_text" - t.integer "choice_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_questions", :force => true do |t| - t.text "question_title" - t.integer "question_type" - t.integer "question_number" - t.integer "exercise_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_score" - end - - create_table "exercise_standard_answers", :force => true do |t| - t.integer "exercise_question_id" - t.integer "exercise_choice_id" - t.text "answer_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_users", :force => true do |t| - t.integer "user_id" - t.integer "exercise_id" - t.integer "score" - t.datetime "start_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.datetime "end_at" - t.integer "status" - end - - create_table "exercises", :force => true do |t| - t.text "exercise_name" - t.text "exercise_description" - t.integer "course_id" - t.integer "exercise_status" - t.integer "user_id" - t.integer "time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.datetime "publish_time" - t.datetime "end_time" - t.integer "show_result" - end - - create_table "first_pages", :force => true do |t| - t.string "web_title" - t.string "title" - t.text "description" - t.string "page_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sort_type" - t.integer "image_width", :default => 107 - t.integer "image_height", :default => 63 - t.integer "show_course", :default => 1 - t.integer "show_contest", :default => 1 - end - - create_table "forge_activities", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_act_id" - t.string "forge_act_type" - t.integer "org_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" - - create_table "forge_messages", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_message_id" - t.string "forge_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "secret_key" - t.integer "status" - end - - create_table "forums", :force => true do |t| - t.string "name", :null => false - t.text "description" - t.integer "topic_count", :default => 0 - t.integer "memo_count", :default => 0 - t.integer "last_memo_id", :default => 0 - t.integer "creator_id", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sticky" - t.integer "locked" - end - - create_table "groups_users", :id => false, :force => true do |t| - t.integer "group_id", :null => false - t.integer "user_id", :null => false - end - - add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true - - create_table "homework_attaches", :force => true do |t| - t.integer "bid_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - t.string "name" - t.text "description" - t.integer "state" - t.integer "project_id", :default => 0 - t.float "score", :default => 0.0 - t.integer "is_teacher_score", :default => 0 - end - - add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" - - create_table "homework_commons", :force => true do |t| - t.string "name" - t.integer "user_id" - t.text "description" - t.date "publish_time" - t.date "end_time" - t.integer "homework_type", :default => 1 - t.string "late_penalty" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "teacher_priority", :default => 1 - t.integer "anonymous_comment", :default => 0 - end - - add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id" - - create_table "homework_detail_groups", :force => true do |t| - t.integer "homework_common_id" - t.integer "min_num" - t.integer "max_num" - t.integer "base_on_project" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "homework_detail_groups", ["homework_common_id"], :name => "index_homework_detail_groups_on_homework_common_id" - - create_table "homework_detail_manuals", :force => true do |t| - t.float "ta_proportion" - t.integer "comment_status" - t.date "evaluation_start" - t.date "evaluation_end" - t.integer "evaluation_num" - t.integer "absence_penalty", :default => 1 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_detail_programings", :force => true do |t| - t.string "language" - t.text "standard_code", :limit => 2147483647 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "ta_proportion", :default => 0.1 - t.integer "question_id" - end - - create_table "homework_evaluations", :force => true do |t| - t.string "user_id" - t.string "homework_attach_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_for_courses", :force => true do |t| - t.integer "course_id" - t.integer "bid_id" - end - - add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id" - add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id" - - create_table "homework_tests", :force => true do |t| - t.text "input" - t.text "output" - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "result" - t.text "error_msg" - end - - create_table "homework_users", :force => true do |t| - t.string "homework_attach_id" - t.string "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "invite_lists", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "mail" - end - - create_table "issue_categories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.integer "assigned_to_id" - end - - add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" - add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" - - create_table "issue_relations", :force => true do |t| - t.integer "issue_from_id", :null => false - t.integer "issue_to_id", :null => false - t.string "relation_type", :default => "", :null => false - t.integer "delay" - end - - add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true - add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" - add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" - - create_table "issue_statuses", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_closed", :default => false, :null => false - t.boolean "is_default", :default => false, :null => false - t.integer "position", :default => 1 - t.integer "default_done_ratio" - end - - add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" - add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" - add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" - - create_table "issues", :force => true do |t| - t.integer "tracker_id", :null => false - t.integer "project_id", :null => false - t.string "subject", :default => "", :null => false - t.text "description" - t.date "due_date" - t.integer "category_id" - t.integer "status_id", :null => false - t.integer "assigned_to_id" - t.integer "priority_id", :null => false - t.integer "fixed_version_id" - t.integer "author_id", :null => false - t.integer "lock_version", :default => 0, :null => false - t.datetime "created_on" - t.datetime "updated_on" - t.date "start_date" - t.integer "done_ratio", :default => 0, :null => false - t.float "estimated_hours" - t.integer "parent_id" - t.integer "root_id" - t.integer "lft" - t.integer "rgt" - t.boolean "is_private", :default => false, :null => false - t.datetime "closed_on" - t.integer "project_issues_index" - end - - add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" - add_index "issues", ["author_id"], :name => "index_issues_on_author_id" - add_index "issues", ["category_id"], :name => "index_issues_on_category_id" - add_index "issues", ["created_on"], :name => "index_issues_on_created_on" - add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" - add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" - add_index "issues", ["project_id"], :name => "issues_project_id" - add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" - add_index "issues", ["status_id"], :name => "index_issues_on_status_id" - add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" - - create_table "join_in_competitions", :force => true do |t| - t.integer "user_id" - t.integer "competition_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "join_in_contests", :force => true do |t| - t.integer "user_id" - t.integer "bid_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "journal_details", :force => true do |t| - t.integer "journal_id", :default => 0, :null => false - t.string "property", :limit => 30, :default => "", :null => false - t.string "prop_key", :limit => 30, :default => "", :null => false - t.text "old_value" - t.text "value" - end - - add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" - - create_table "journal_replies", :id => false, :force => true do |t| - t.integer "journal_id" - t.integer "user_id" - t.integer "reply_id" - end - - add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" - add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" - add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" - - create_table "journals", :force => true do |t| - t.integer "journalized_id", :default => 0, :null => false - t.string "journalized_type", :limit => 30, :default => "", :null => false - t.integer "user_id", :default => 0, :null => false - t.text "notes" - t.datetime "created_on", :null => false - t.boolean "private_notes", :default => false, :null => false - end - - add_index "journals", ["created_on"], :name => "index_journals_on_created_on" - add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" - add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" - add_index "journals", ["user_id"], :name => "index_journals_on_user_id" - - create_table "journals_for_messages", :force => true do |t| - t.integer "jour_id" - t.string "jour_type" - t.integer "user_id" - t.text "notes" - t.integer "status" - t.integer "reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.string "m_parent_id" - t.boolean "is_readed" - t.integer "m_reply_count" - t.integer "m_reply_id" - t.integer "is_comprehensive_evaluation" - t.integer "private", :default => 0 - end - - create_table "kindeditor_assets", :force => true do |t| - t.string "asset" - t.integer "file_size" - t.string "file_type" - t.integer "owner_id" - t.string "asset_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "owner_type", :default => 0 - end - - create_table "member_roles", :force => true do |t| - t.integer "member_id", :null => false - t.integer "role_id", :null => false - t.integer "inherited_from" - end - - add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" - add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" - - create_table "members", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "project_id", :default => 0 - t.datetime "created_on" - t.boolean "mail_notification", :default => false, :null => false - t.integer "course_id", :default => -1 - t.integer "course_group_id", :default => 0 - end - - add_index "members", ["project_id"], :name => "index_members_on_project_id" - add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true - add_index "members", ["user_id"], :name => "index_members_on_user_id" - - create_table "memo_messages", :force => true do |t| - t.integer "user_id" - t.integer "forum_id" - t.integer "memo_id" - t.string "memo_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "memos", :force => true do |t| - t.integer "forum_id", :null => false - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :null => false - t.integer "author_id", :null => false - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count", :default => 0 - end - - create_table "message_alls", :force => true do |t| - t.integer "user_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "messages", :force => true do |t| - t.integer "board_id", :null => false - t.integer "parent_id" - t.string "subject", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "replies_count", :default => 0, :null => false - t.integer "last_reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "reply_id" - t.integer "quotes" - end - - add_index "messages", ["author_id"], :name => "index_messages_on_author_id" - add_index "messages", ["board_id"], :name => "messages_board_id" - add_index "messages", ["created_on"], :name => "index_messages_on_created_on" - add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" - add_index "messages", ["parent_id"], :name => "messages_parent_id" - - create_table "news", :force => true do |t| - t.integer "project_id" - t.string "title", :limit => 60, :default => "", :null => false - t.string "summary", :default => "" - t.text "description" - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.integer "comments_count", :default => 0, :null => false - t.integer "course_id" - t.integer "sticky", :default => 0 - end - - add_index "news", ["author_id"], :name => "index_news_on_author_id" - add_index "news", ["created_on"], :name => "index_news_on_created_on" - add_index "news", ["project_id"], :name => "news_project_id" - - create_table "no_uses", :force => true do |t| - t.integer "user_id", :null => false - t.string "no_use_type" - t.integer "no_use_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "notificationcomments", :force => true do |t| - t.string "notificationcommented_type" - t.integer "notificationcommented_id" - t.integer "author_id" - t.text "notificationcomments" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "onclick_times", :force => true do |t| - t.integer "user_id" - t.datetime "onclick_time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "open_id_authentication_associations", :force => true do |t| - t.integer "issued" - t.integer "lifetime" - t.string "handle" - t.string "assoc_type" - t.binary "server_url" - t.binary "secret" - end - - create_table "open_id_authentication_nonces", :force => true do |t| - t.integer "timestamp", :null => false - t.string "server_url" - t.string "salt", :null => false - end - - create_table "open_source_projects", :force => true do |t| - t.string "name" - t.text "description" - t.integer "commit_count", :default => 0 - t.integer "code_line", :default => 0 - t.integer "users_count", :default => 0 - t.date "last_commit_time" - t.string "url" - t.date "date_collected" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "option_numbers", :force => true do |t| - t.integer "user_id" - t.integer "memo" - t.integer "messages_for_issues" - t.integer "issues_status" - t.integer "replay_for_message" - t.integer "replay_for_memo" - t.integer "follow" - t.integer "tread" - t.integer "praise_by_one" - t.integer "praise_by_two" - t.integer "praise_by_three" - t.integer "tread_by_one" - t.integer "tread_by_two" - t.integer "tread_by_three" - t.integer "changeset" - t.integer "document" - t.integer "attachment" - t.integer "issue_done_ratio" - t.integer "post_issue" - t.integer "score_type" - t.integer "total_score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - end - - create_table "org_activities", :force => true do |t| - t.integer "user_id" - t.integer "org_act_id" - t.string "org_act_type" - t.integer "container_id" - t.string "container_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_courses", :force => true do |t| - t.integer "organization_id" - t.integer "course_id" - t.datetime "created_at" - end - - create_table "org_document_comments", :force => true do |t| - t.text "title" - t.text "content" - t.integer "organization_id" - t.integer "creator_id" - t.integer "parent_id" - t.integer "reply_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "org_subfield_id" - end - - create_table "org_member_roles", :force => true do |t| - t.integer "org_member_id" - t.integer "role_id" - end - - create_table "org_members", :force => true do |t| - t.integer "user_id" - t.integer "organization_id" - t.string "role" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_messages", :force => true do |t| - t.integer "user_id" - t.integer "sender_id" - t.integer "organization_id" - t.string "message_type" - t.integer "message_id" - t.integer "viewed" - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_projects", :force => true do |t| - t.integer "organization_id" - t.integer "project_id" - t.datetime "created_at" - end - - create_table "org_subfield_messages", :force => true do |t| - t.integer "org_subfield_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_subfields", :force => true do |t| - t.integer "organization_id" - t.integer "priority" - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "field_type" - t.integer "hide", :default => 0 - end - - create_table "organizations", :force => true do |t| - t.string "name" - t.text "description" - t.integer "creator_id" - t.integer "home_id" - t.string "domain" - t.boolean "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "phone_app_versions", :force => true do |t| - t.string "version" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_answers", :force => true do |t| - t.integer "poll_question_id" - t.text "answer_text" - t.integer "answer_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_questions", :force => true do |t| - t.string "question_title" - t.integer "question_type" - t.integer "is_necessary" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_number" - end - - create_table "poll_users", :force => true do |t| - t.integer "user_id" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_votes", :force => true do |t| - t.integer "user_id" - t.integer "poll_question_id" - t.integer "poll_answer_id" - t.text "vote_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "polls", :force => true do |t| - t.string "polls_name" - t.string "polls_type" - t.integer "polls_group_id" - t.integer "polls_status" - t.integer "user_id" - t.datetime "published_at" - t.datetime "closed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "polls_description" - t.integer "show_result", :default => 1 - end - - create_table "praise_tread_caches", :force => true do |t| - t.integer "object_id", :null => false - t.string "object_type" - t.integer "praise_num" - t.integer "tread_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "praise_treads", :force => true do |t| - t.integer "user_id", :null => false - t.integer "praise_tread_object_id" - t.string "praise_tread_object_type" - t.integer "praise_or_tread" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "principal_activities", :force => true do |t| - t.integer "user_id" - t.integer "principal_id" - t.integer "principal_act_id" - t.string "principal_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_infos", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_scores", :force => true do |t| - t.string "project_id" - t.integer "score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "issue_num", :default => 0 - t.integer "issue_journal_num", :default => 0 - t.integer "news_num", :default => 0 - t.integer "documents_num", :default => 0 - t.integer "changeset_num", :default => 0 - t.integer "board_message_num", :default => 0 - end - - create_table "project_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "project_id" - t.integer "project_type" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - end - - add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" - - create_table "projecting_softapplictions", :force => true do |t| - t.integer "user_id" - t.integer "softapplication_id" - t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "projects", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - t.string "homepage", :default => "" - t.boolean "is_public", :default => true, :null => false - t.integer "parent_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "identifier" - t.integer "status", :default => 1, :null => false - t.integer "lft" - t.integer "rgt" - t.boolean "inherit_members", :default => false, :null => false - t.integer "project_type" - t.boolean "hidden_repo", :default => false, :null => false - t.integer "attachmenttype", :default => 1 - t.integer "user_id" - t.integer "dts_test", :default => 0 - t.string "enterprise_name" - t.integer "organization_id" - t.integer "project_new_type" - t.integer "gpid" - t.integer "forked_from_project_id" - t.integer "forked_count" - t.integer "commits_count", :default => 0 - t.integer "publish_resource", :default => 0 - t.integer "issues_count", :default => 0 - t.integer "attachments_count", :default => 0 - t.integer "boards_count", :default => 0 - t.integer "news_count", :default => 0 - t.integer "acts_count", :default => 0 - t.integer "journals_count", :default => 0 - t.integer "boards_reply_count", :default => 0 - end - - add_index "projects", ["lft"], :name => "index_projects_on_lft" - add_index "projects", ["rgt"], :name => "index_projects_on_rgt" - - create_table "projects_trackers", :id => false, :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true - add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" - - create_table "queries", :force => true do |t| - t.integer "project_id" - t.string "name", :default => "", :null => false - t.text "filters" - t.integer "user_id", :default => 0, :null => false - t.boolean "is_public", :default => false, :null => false - t.text "column_names" - t.text "sort_criteria" - t.string "group_by" - t.string "type" - end - - add_index "queries", ["project_id"], :name => "index_queries_on_project_id" - add_index "queries", ["user_id"], :name => "index_queries_on_user_id" - - create_table "relative_memo_to_open_source_projects", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "relative_memos", :force => true do |t| - t.integer "osp_id" - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :limit => 16777215, :null => false - t.integer "author_id" - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.boolean "is_quote", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count_crawl", :default => 0 - t.integer "viewed_count_local", :default => 0 - t.string "url" - t.string "username" - t.string "userhomeurl" - t.date "date_collected" - t.string "topic_resource" - end - - create_table "repositories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "url", :default => "", :null => false - t.string "login", :limit => 60, :default => "" - t.string "password", :default => "" - t.string "root_url", :default => "" - t.string "type" - t.string "path_encoding", :limit => 64 - t.string "log_encoding", :limit => 64 - t.text "extra_info" - t.string "identifier" - t.boolean "is_default", :default => false - t.boolean "hidden", :default => false - end - - add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" - - create_table "rich_rich_files", :force => true do |t| - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "rich_file_file_name" - t.string "rich_file_content_type" - t.integer "rich_file_file_size" - t.datetime "rich_file_updated_at" - t.string "owner_type" - t.integer "owner_id" - t.text "uri_cache" - t.string "simplified_type", :default => "file" - end - - create_table "roles", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "assignable", :default => true - t.integer "builtin", :default => 0, :null => false - t.text "permissions" - t.string "issues_visibility", :limit => 30, :default => "default", :null => false - end - - create_table "schools", :force => true do |t| - t.string "name" - t.string "province" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "logo_link" - t.string "pinyin" - end - - create_table "seems_rateable_cached_ratings", :force => true do |t| - t.integer "cacheable_id", :limit => 8 - t.string "cacheable_type" - t.float "avg", :null => false - t.integer "cnt", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "seems_rateable_rates", :force => true do |t| - t.integer "rater_id", :limit => 8 - t.integer "rateable_id" - t.string "rateable_type" - t.float "stars", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "is_teacher_score", :default => 0 - end - - create_table "settings", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "value" - t.datetime "updated_on" - end - - add_index "settings", ["name"], :name => "index_settings_on_name" - - create_table "shares", :force => true do |t| - t.date "created_on" - t.string "url" - t.string "title" - t.integer "share_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - t.integer "user_id" - t.string "description" - end - - create_table "shield_activities", :force => true do |t| - t.string "container_type" - t.integer "container_id" - t.string "shield_type" - t.integer "shield_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "softapplications", :force => true do |t| - t.string "name" - t.text "description" - t.integer "app_type_id" - t.string "app_type_name" - t.string "android_min_version_available" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "contest_id" - t.integer "softapplication_id" - t.integer "is_public" - t.string "application_developers" - t.string "deposit_project_url" - t.string "deposit_project" - t.integer "project_id" - end - - create_table "student_work_projects", :force => true do |t| - t.integer "homework_common_id" - t.integer "student_work_id" - t.integer "project_id" - t.integer "user_id" - t.integer "is_leader" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "student_work_projects", ["homework_common_id"], :name => "index_student_work_projects_on_homework_common_id" - add_index "student_work_projects", ["project_id"], :name => "index_student_work_projects_on_project_id" - add_index "student_work_projects", ["student_work_id"], :name => "index_student_work_projects_on_student_work_id" - add_index "student_work_projects", ["user_id"], :name => "index_student_work_projects_on_user_id" - - create_table "student_work_tests", :force => true do |t| - t.integer "student_work_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "status", :default => 9 - t.text "results" - t.text "src" - end - - create_table "student_works", :force => true do |t| - t.string "name" - t.text "description", :limit => 2147483647 - t.integer "homework_common_id" - t.integer "user_id" - t.float "final_score" - t.float "teacher_score" - t.float "student_score" - t.float "teaching_asistant_score" - t.integer "project_id", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "late_penalty", :default => 0 - t.integer "absence_penalty", :default => 0 - t.float "system_score", :default => 0.0 - t.boolean "is_test", :default => false - end - - add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id" - - create_table "student_works_evaluation_distributions", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "student_works_scores", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.integer "score" - t.text "comment" - t.integer "reviewer_role" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "students_for_courses", :force => true do |t| - t.integer "student_id" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" - add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" - - create_table "system_messages", :force => true do |t| - t.integer "user_id" - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "description" - t.string "subject" - end - - create_table "taggings", :force => true do |t| - t.integer "tag_id" - t.integer "taggable_id" - t.string "taggable_type" - t.integer "tagger_id" - t.string "tagger_type" - t.string "context", :limit => 128 - t.datetime "created_at" - end - - add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" - add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" - add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" - - create_table "tags", :force => true do |t| - t.string "name" - end - - create_table "teachers", :force => true do |t| - t.string "tea_name" - t.string "location" - t.integer "couurse_time" - t.integer "course_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "extra" - end - - create_table "time_entries", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - t.integer "issue_id" - t.float "hours", :null => false - t.string "comments" - t.integer "activity_id", :null => false - t.date "spent_on", :null => false - t.integer "tyear", :null => false - t.integer "tmonth", :null => false - t.integer "tweek", :null => false - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" - add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" - add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" - add_index "time_entries", ["project_id"], :name => "time_entries_project_id" - add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" - - create_table "tokens", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.string "action", :limit => 30, :default => "", :null => false - t.string "value", :limit => 40, :default => "", :null => false - t.datetime "created_on", :null => false - end - - add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" - add_index "tokens", ["value"], :name => "tokens_value", :unique => true - - create_table "trackers", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_in_chlog", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "is_in_roadmap", :default => true, :null => false - t.integer "fields_bits", :default => 0 - end - - create_table "user_activities", :force => true do |t| - t.string "act_type" - t.integer "act_id" - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "user_id" - end - - create_table "user_extensions", :force => true do |t| - t.integer "user_id", :null => false - t.date "birthday" - t.string "brief_introduction" - t.integer "gender" - t.string "location" - t.string "occupation" - t.integer "work_experience" - t.integer "zip_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "technical_title" - t.integer "identity" - t.string "student_id" - t.string "teacher_realname" - t.string "student_realname" - t.string "location_city" - t.integer "school_id" - t.string "description", :default => "" - end - - create_table "user_feedback_messages", :force => true do |t| - t.integer "user_id" - t.integer "journals_for_message_id" - t.string "journals_for_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_grades", :force => true do |t| - t.integer "user_id", :null => false - t.integer "project_id", :null => false - t.float "grade", :default => 0.0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" - add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" - add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" - - create_table "user_levels", :force => true do |t| - t.integer "user_id" - t.integer "level" - end - - create_table "user_preferences", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.text "others" - t.boolean "hide_mail", :default => false - t.string "time_zone" - end - - add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" - - create_table "user_score_details", :force => true do |t| - t.integer "current_user_id" - t.integer "target_user_id" - t.string "score_type" - t.string "score_action" - t.integer "user_id" - t.integer "old_score" - t.integer "new_score" - t.integer "current_user_level" - t.integer "target_user_level" - t.integer "score_changeable_obj_id" - t.string "score_changeable_obj_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_scores", :force => true do |t| - t.integer "user_id", :null => false - t.integer "collaboration" - t.integer "influence" - t.integer "skill" - t.integer "active" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "grade", :default => 0.0 - end - - add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" - add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" - add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" - - create_table "users", :force => true do |t| - t.string "login", :default => "", :null => false - t.string "hashed_password", :limit => 40, :default => "", :null => false - t.string "firstname", :limit => 30, :default => "", :null => false - t.string "lastname", :default => "", :null => false - t.string "mail", :limit => 60, :default => "", :null => false - t.boolean "admin", :default => false, :null => false - t.integer "status", :default => 1, :null => false - t.datetime "last_login_on" - t.string "language", :limit => 5, :default => "" - t.integer "auth_source_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "type" - t.string "identity_url" - t.string "mail_notification", :default => "", :null => false - t.string "salt", :limit => 64 - t.integer "gid" - end - - add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" - add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" - add_index "users", ["type"], :name => "index_users_on_type" - - create_table "versions", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :default => "", :null => false - t.string "description", :default => "" - t.date "effective_date" - t.datetime "created_on" - t.datetime "updated_on" - t.string "wiki_page_title" - t.string "status", :default => "open" - t.string "sharing", :default => "none", :null => false - end - - add_index "versions", ["project_id"], :name => "versions_project_id" - add_index "versions", ["sharing"], :name => "index_versions_on_sharing" - - create_table "visitors", :force => true do |t| - t.integer "user_id" - t.integer "master_id" - t.datetime "updated_on" - t.datetime "created_on" - end - - add_index "visitors", ["master_id"], :name => "index_visitors_master_id" - add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" - add_index "visitors", ["user_id"], :name => "index_visitors_user_id" - - create_table "watchers", :force => true do |t| - t.string "watchable_type", :default => "", :null => false - t.integer "watchable_id", :default => 0, :null => false - t.integer "user_id" - end - - add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" - add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" - add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" - - create_table "web_footer_companies", :force => true do |t| - t.string "name" - t.string "logo_size" - t.string "url" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "web_footer_oranizers", :force => true do |t| - t.string "name" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "wiki_content_versions", :force => true do |t| - t.integer "wiki_content_id", :null => false - t.integer "page_id", :null => false - t.integer "author_id" - t.binary "data", :limit => 2147483647 - t.string "compression", :limit => 6, :default => "" - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" - add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" - - create_table "wiki_contents", :force => true do |t| - t.integer "page_id", :null => false - t.integer "author_id" - t.text "text", :limit => 2147483647 - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" - add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" - - create_table "wiki_pages", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title", :null => false - t.datetime "created_on", :null => false - t.boolean "protected", :default => false, :null => false - t.integer "parent_id" - end - - add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" - add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" - add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" - - create_table "wiki_redirects", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title" - t.string "redirects_to" - t.datetime "created_on", :null => false - end - - add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" - add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" - - create_table "wikis", :force => true do |t| - t.integer "project_id", :null => false - t.string "start_page", :null => false - t.integer "status", :default => 1, :null => false - end - - add_index "wikis", ["project_id"], :name => "wikis_project_id" - - create_table "workflows", :force => true do |t| - t.integer "tracker_id", :default => 0, :null => false - t.integer "old_status_id", :default => 0, :null => false - t.integer "new_status_id", :default => 0, :null => false - t.integer "role_id", :default => 0, :null => false - t.boolean "assignee", :default => false, :null => false - t.boolean "author", :default => false, :null => false - t.string "type", :limit => 30 - t.string "field_name", :limit => 30 - t.string "rule", :limit => 30 - end - - add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" - add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" - add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" - add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" - - create_table "works_categories", :force => true do |t| - t.string "category" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "zip_packs", :force => true do |t| - t.integer "user_id" - t.integer "homework_id" - t.string "file_digest" - t.string "file_path" - t.integer "pack_times", :default => 1 - t.integer "pack_size", :default => 0 - t.text "file_digests" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - -end -======= # encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to @@ -2026,1654 +11,1660 @@ end # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160112085834) do - - create_table "activities", :force => true do |t| - t.integer "act_id", :null => false - t.string "act_type", :null => false - t.integer "user_id", :null => false - t.integer "activity_container_id" - t.string "activity_container_type", :default => "" - t.datetime "created_at" - end - - add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" - add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" - add_index "activities", ["user_id"], :name => "index_activities_on_user_id" - - create_table "activity_notifies", :force => true do |t| - t.integer "activity_container_id" - t.string "activity_container_type" - t.integer "activity_id" - t.string "activity_type" - t.integer "notify_to" - t.datetime "created_on" - t.integer "is_read" - end - - add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" - add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" - add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" - - create_table "api_keys", :force => true do |t| - t.string "access_token" - t.datetime "expires_at" - t.integer "user_id" - t.boolean "active", :default => true - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" - add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - - create_table "applied_projects", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - end - - create_table "apply_project_masters", :force => true do |t| - t.integer "user_id" - t.string "apply_type" - t.integer "apply_id" - t.integer "status" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "at_messages", :force => true do |t| - t.integer "user_id" - t.integer "at_message_id" - t.string "at_message_type" - t.boolean "viewed", :default => false - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sender_id" - end - - add_index "at_messages", ["user_id"], :name => "index_at_messages_on_user_id" - - create_table "attachment_histories", :force => true do |t| - t.integer "container_id" - t.string "container_type" - t.string "filename", :default => "" - t.string "disk_filename", :default => "" - t.integer "filesize", :default => 0 - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "" - t.integer "downloads", :default => 0 - t.integer "author_id" - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.integer "copy_from" - t.integer "quotes" - t.integer "version" - t.integer "attachment_id" - end - - create_table "attachments", :force => true do |t| - t.integer "container_id" - t.string "container_type", :limit => 30 - t.string "filename", :default => "", :null => false - t.string "disk_filename", :default => "", :null => false - t.integer "filesize", :default => 0, :null => false - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "", :null => false - t.integer "downloads", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype", :default => 1 - t.integer "is_public", :default => 1 - t.integer "copy_from" - t.integer "quotes" - end - - add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" - add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" - add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" - - create_table "attachmentstypes", :force => true do |t| - t.integer "typeId", :null => false - t.string "typeName", :limit => 50 - end - - create_table "auth_sources", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 60, :default => "", :null => false - t.string "host", :limit => 60 - t.integer "port" - t.string "account" - t.string "account_password", :default => "" - t.string "base_dn" - t.string "attr_login", :limit => 30 - t.string "attr_firstname", :limit => 30 - t.string "attr_lastname", :limit => 30 - t.string "attr_mail", :limit => 30 - t.boolean "onthefly_register", :default => false, :null => false - t.boolean "tls", :default => false, :null => false - t.string "filter" - t.integer "timeout" - end - - add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" - - create_table "biding_projects", :force => true do |t| - t.integer "project_id" - t.integer "bid_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "bids", :force => true do |t| - t.string "name" - t.string "budget", :null => false - t.integer "author_id" - t.date "deadline" - t.text "description" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.integer "commit" - t.integer "reward_type" - t.integer "homework_type" - t.integer "parent_id" - t.string "password" - t.integer "is_evaluation" - t.integer "proportion", :default => 60 - t.integer "comment_status", :default => 0 - t.integer "evaluation_num", :default => 3 - t.integer "open_anonymous_evaluation", :default => 1 - end - - create_table "blog_comments", :force => true do |t| - t.integer "blog_id", :null => false - t.integer "parent_id" - t.string "title", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "comments_count", :default => 0, :null => false - t.integer "last_comment_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "reply_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "blogs", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - t.integer "position", :default => 1 - t.integer "article_count", :default => 0, :null => false - t.integer "comments_count", :default => 0, :null => false - t.integer "last_comments_id" - t.integer "parent_id" - t.integer "author_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "homepage_id" - end - - create_table "boards", :force => true do |t| - t.integer "project_id", :null => false - t.string "name", :default => "", :null => false - t.string "description" - t.integer "position", :default => 1 - t.integer "topics_count", :default => 0, :null => false - t.integer "messages_count", :default => 0, :null => false - t.integer "last_message_id" - t.integer "parent_id" - t.integer "course_id" - t.integer "org_subfield_id" - end - - add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" - add_index "boards", ["project_id"], :name => "boards_project_id" - - create_table "bug_to_osps", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "changes", :force => true do |t| - t.integer "changeset_id", :null => false - t.string "action", :limit => 1, :default => "", :null => false - t.text "path", :null => false - t.text "from_path" - t.string "from_revision" - t.string "revision" - t.string "branch" - end - - add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" - - create_table "changeset_parents", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "parent_id", :null => false - end - - add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" - add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" - - create_table "changesets", :force => true do |t| - t.integer "repository_id", :null => false - t.string "revision", :null => false - t.string "committer" - t.datetime "committed_on", :null => false - t.text "comments" - t.date "commit_date" - t.string "scmid" - t.integer "user_id" - end - - add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" - add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true - add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" - add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" - add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" - - create_table "changesets_issues", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "issue_id", :null => false - end - - add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true - - create_table "code_review_assignments", :force => true do |t| - t.integer "issue_id" - t.integer "change_id" - t.integer "attachment_id" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.string "action_type" - t.integer "changeset_id" - end - - create_table "code_review_project_settings", :force => true do |t| - t.integer "project_id" - t.integer "tracker_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "updated_by" - t.boolean "hide_code_review_tab", :default => false - t.integer "auto_relation", :default => 1 - t.integer "assignment_tracker_id" - t.text "auto_assign" - t.integer "lock_version", :default => 0, :null => false - t.boolean "tracker_in_review_dialog", :default => false - end - - create_table "code_review_user_settings", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "mail_notification", :default => 0, :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "code_reviews", :force => true do |t| - t.integer "project_id" - t.integer "change_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "line" - t.integer "updated_by_id" - t.integer "lock_version", :default => 0, :null => false - t.integer "status_changed_from" - t.integer "status_changed_to" - t.integer "issue_id" - t.string "action_type" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.integer "attachment_id" - t.integer "file_count", :default => 0, :null => false - t.boolean "diff_all" - end - - create_table "comments", :force => true do |t| - t.string "commented_type", :limit => 30, :default => "", :null => false - t.integer "commented_id", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.text "comments" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "comments", ["author_id"], :name => "index_comments_on_author_id" - add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" - - create_table "contest_notifications", :force => true do |t| - t.text "title" - t.text "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "contesting_projects", :force => true do |t| - t.integer "project_id" - t.string "contest_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "contesting_softapplications", :force => true do |t| - t.integer "softapplication_id" - t.integer "contest_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "contestnotifications", :force => true do |t| - t.integer "contest_id" - t.string "title" - t.string "summary" - t.text "description" - t.integer "author_id" - t.integer "notificationcomments_count" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "contests", :force => true do |t| - t.string "name" - t.string "budget", :default => "" - t.integer "author_id" - t.date "deadline" - t.string "description" - t.integer "commit" - t.string "password" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - create_table "course_activities", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_act_id" - t.string "course_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_attachments", :force => true do |t| - t.string "filename" - t.string "disk_filename" - t.integer "filesize" - t.string "content_type" - t.string "digest" - t.integer "downloads" - t.string "author_id" - t.string "integer" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "container_id", :default => 0 - end - - create_table "course_contributor_scores", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.integer "message_num" - t.integer "message_reply_num" - t.integer "news_reply_num" - t.integer "resource_num" - t.integer "journal_num" - t.integer "journal_reply_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "total_score" - end - - create_table "course_groups", :force => true do |t| - t.string "name" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_infos", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_messages", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_message_id" - t.string "course_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "content" - t.integer "status" - end - - create_table "course_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "course_id" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "courses", :force => true do |t| - t.integer "tea_id" - t.string "name" - t.integer "state" - t.string "code" - t.integer "time" - t.string "extra" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "location" - t.string "term" - t.string "string" - t.string "password" - t.string "setup_time" - t.string "endup_time" - t.string "class_period" - t.integer "school_id" - t.text "description" - t.integer "status", :default => 1 - t.integer "attachmenttype", :default => 2 - t.integer "lft" - t.integer "rgt" - t.integer "is_public", :limit => 1, :default => 1 - t.integer "inherit_members", :limit => 1, :default => 1 - t.integer "open_student", :default => 0 - t.integer "outline", :default => 0 - t.integer "publish_resource", :default => 0 - t.integer "is_delete", :default => 0 - t.integer "end_time" - t.string "end_term" - end - - create_table "custom_fields", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.string "field_format", :limit => 30, :default => "", :null => false - t.text "possible_values" - t.string "regexp", :default => "" - t.integer "min_length", :default => 0, :null => false - t.integer "max_length", :default => 0, :null => false - t.boolean "is_required", :default => false, :null => false - t.boolean "is_for_all", :default => false, :null => false - t.boolean "is_filter", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "searchable", :default => false - t.text "default_value" - t.boolean "editable", :default => true - t.boolean "visible", :default => true, :null => false - t.boolean "multiple", :default => false - end - - add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" - - create_table "custom_fields_projects", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "project_id", :default => 0, :null => false - end - - add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true - - create_table "custom_fields_trackers", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true - - create_table "custom_values", :force => true do |t| - t.string "customized_type", :limit => 30, :default => "", :null => false - t.integer "customized_id", :default => 0, :null => false - t.integer "custom_field_id", :default => 0, :null => false - t.text "value" - end - - add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" - add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" - - create_table "delayed_jobs", :force => true do |t| - t.integer "priority", :default => 0, :null => false - t.integer "attempts", :default => 0, :null => false - t.text "handler", :null => false - t.text "last_error" - t.datetime "run_at" - t.datetime "locked_at" - t.datetime "failed_at" - t.string "locked_by" - t.string "queue" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" - - create_table "discuss_demos", :force => true do |t| - t.string "title" - t.text "body" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "documents", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "category_id", :default => 0, :null => false - t.string "title", :limit => 60, :default => "", :null => false - t.text "description" - t.datetime "created_on" - t.integer "user_id", :default => 0 - t.integer "is_public", :default => 1 - end - - add_index "documents", ["category_id"], :name => "index_documents_on_category_id" - add_index "documents", ["created_on"], :name => "index_documents_on_created_on" - add_index "documents", ["project_id"], :name => "documents_project_id" - - create_table "dts", :primary_key => "Num", :force => true do |t| - t.string "Defect", :limit => 50 - t.string "Category", :limit => 50 - t.string "File" - t.string "Method" - t.string "Module", :limit => 20 - t.string "Variable", :limit => 50 - t.integer "StartLine" - t.integer "IPLine" - t.string "IPLineCode", :limit => 200 - t.string "Judge", :limit => 15 - t.integer "Review", :limit => 1 - t.string "Description" - t.text "PreConditions", :limit => 2147483647 - t.text "TraceInfo", :limit => 2147483647 - t.text "Code", :limit => 2147483647 - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "id", :null => false - end - - create_table "editor_of_documents", :force => true do |t| - t.integer "editor_id" - t.integer "org_document_comment_id" - t.datetime "created_at" - end - - create_table "enabled_modules", :force => true do |t| - t.integer "project_id" - t.string "name", :null => false - t.integer "course_id" - end - - add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" - - create_table "enumerations", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "is_default", :default => false, :null => false - t.string "type" - t.boolean "active", :default => true, :null => false - t.integer "project_id" - t.integer "parent_id" - t.string "position_name", :limit => 30 - end - - add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" - add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" - - create_table "exercise_answers", :force => true do |t| - t.integer "user_id" - t.integer "exercise_question_id" - t.integer "exercise_choice_id" - t.text "answer_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_choices", :force => true do |t| - t.integer "exercise_question_id" - t.text "choice_text" - t.integer "choice_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_questions", :force => true do |t| - t.text "question_title" - t.integer "question_type" - t.integer "question_number" - t.integer "exercise_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_score" - end - - create_table "exercise_standard_answers", :force => true do |t| - t.integer "exercise_question_id" - t.integer "exercise_choice_id" - t.text "answer_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_users", :force => true do |t| - t.integer "user_id" - t.integer "exercise_id" - t.integer "score" - t.datetime "start_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.datetime "end_at" - t.integer "status" - end - - create_table "exercises", :force => true do |t| - t.text "exercise_name" - t.text "exercise_description" - t.integer "course_id" - t.integer "exercise_status" - t.integer "user_id" - t.integer "time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.datetime "publish_time" - t.datetime "end_time" - t.integer "show_result" - end - - create_table "first_pages", :force => true do |t| - t.string "web_title" - t.string "title" - t.text "description" - t.string "page_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sort_type" - t.integer "image_width", :default => 107 - t.integer "image_height", :default => 63 - t.integer "show_course", :default => 1 - t.integer "show_contest", :default => 1 - end - - create_table "forge_activities", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_act_id" - t.string "forge_act_type" - t.integer "org_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" - - create_table "forge_messages", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_message_id" - t.string "forge_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "secret_key" - t.integer "status" - end - - create_table "forums", :force => true do |t| - t.string "name", :null => false - t.text "description" - t.integer "topic_count", :default => 0 - t.integer "memo_count", :default => 0 - t.integer "last_memo_id", :default => 0 - t.integer "creator_id", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sticky" - t.integer "locked" - end - - create_table "groups_users", :id => false, :force => true do |t| - t.integer "group_id", :null => false - t.integer "user_id", :null => false - end - - add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true - - create_table "homework_attaches", :force => true do |t| - t.integer "bid_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - t.string "name" - t.text "description" - t.integer "state" - t.integer "project_id", :default => 0 - t.float "score", :default => 0.0 - t.integer "is_teacher_score", :default => 0 - end - - add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" - - create_table "homework_commons", :force => true do |t| - t.string "name" - t.integer "user_id" - t.text "description" - t.date "publish_time" - t.date "end_time" - t.integer "homework_type", :default => 1 - t.string "late_penalty" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "teacher_priority", :default => 1 - t.integer "anonymous_comment", :default => 0 - end - - add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id" - - create_table "homework_detail_groups", :force => true do |t| - t.integer "homework_common_id" - t.integer "min_num" - t.integer "max_num" - t.integer "base_on_project" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "homework_detail_groups", ["homework_common_id"], :name => "index_homework_detail_groups_on_homework_common_id" - - create_table "homework_detail_manuals", :force => true do |t| - t.float "ta_proportion" - t.integer "comment_status" - t.date "evaluation_start" - t.date "evaluation_end" - t.integer "evaluation_num" - t.integer "absence_penalty", :default => 1 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_detail_programings", :force => true do |t| - t.string "language" - t.text "standard_code", :limit => 2147483647 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "ta_proportion", :default => 0.1 - t.integer "question_id" - end - - create_table "homework_evaluations", :force => true do |t| - t.string "user_id" - t.string "homework_attach_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_for_courses", :force => true do |t| - t.integer "course_id" - t.integer "bid_id" - end - - add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id" - add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id" - - create_table "homework_tests", :force => true do |t| - t.text "input" - t.text "output" - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "result" - t.text "error_msg" - end - - create_table "homework_users", :force => true do |t| - t.string "homework_attach_id" - t.string "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "invite_lists", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "mail" - end - - create_table "issue_categories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.integer "assigned_to_id" - end - - add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" - add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" - - create_table "issue_relations", :force => true do |t| - t.integer "issue_from_id", :null => false - t.integer "issue_to_id", :null => false - t.string "relation_type", :default => "", :null => false - t.integer "delay" - end - - add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true - add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" - add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" - - create_table "issue_statuses", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_closed", :default => false, :null => false - t.boolean "is_default", :default => false, :null => false - t.integer "position", :default => 1 - t.integer "default_done_ratio" - end - - add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" - add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" - add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" - - create_table "issues", :force => true do |t| - t.integer "tracker_id", :null => false - t.integer "project_id", :null => false - t.string "subject", :default => "", :null => false - t.text "description" - t.date "due_date" - t.integer "category_id" - t.integer "status_id", :null => false - t.integer "assigned_to_id" - t.integer "priority_id", :null => false - t.integer "fixed_version_id" - t.integer "author_id", :null => false - t.integer "lock_version", :default => 0, :null => false - t.datetime "created_on" - t.datetime "updated_on" - t.date "start_date" - t.integer "done_ratio", :default => 0, :null => false - t.float "estimated_hours" - t.integer "parent_id" - t.integer "root_id" - t.integer "lft" - t.integer "rgt" - t.boolean "is_private", :default => false, :null => false - t.datetime "closed_on" - t.integer "project_issues_index" - end - - add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" - add_index "issues", ["author_id"], :name => "index_issues_on_author_id" - add_index "issues", ["category_id"], :name => "index_issues_on_category_id" - add_index "issues", ["created_on"], :name => "index_issues_on_created_on" - add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" - add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" - add_index "issues", ["project_id"], :name => "issues_project_id" - add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" - add_index "issues", ["status_id"], :name => "index_issues_on_status_id" - add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" - - create_table "join_in_competitions", :force => true do |t| - t.integer "user_id" - t.integer "competition_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "join_in_contests", :force => true do |t| - t.integer "user_id" - t.integer "bid_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "journal_details", :force => true do |t| - t.integer "journal_id", :default => 0, :null => false - t.string "property", :limit => 30, :default => "", :null => false - t.string "prop_key", :limit => 30, :default => "", :null => false - t.text "old_value" - t.text "value" - end - - add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" - - create_table "journal_replies", :id => false, :force => true do |t| - t.integer "journal_id" - t.integer "user_id" - t.integer "reply_id" - end - - add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" - add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" - add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" - - create_table "journals", :force => true do |t| - t.integer "journalized_id", :default => 0, :null => false - t.string "journalized_type", :limit => 30, :default => "", :null => false - t.integer "user_id", :default => 0, :null => false - t.text "notes" - t.datetime "created_on", :null => false - t.boolean "private_notes", :default => false, :null => false - end - - add_index "journals", ["created_on"], :name => "index_journals_on_created_on" - add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" - add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" - add_index "journals", ["user_id"], :name => "index_journals_on_user_id" - - create_table "journals_for_messages", :force => true do |t| - t.integer "jour_id" - t.string "jour_type" - t.integer "user_id" - t.text "notes" - t.integer "status" - t.integer "reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.string "m_parent_id" - t.boolean "is_readed" - t.integer "m_reply_count" - t.integer "m_reply_id" - t.integer "is_comprehensive_evaluation" - t.integer "private", :default => 0 - end - - create_table "kindeditor_assets", :force => true do |t| - t.string "asset" - t.integer "file_size" - t.string "file_type" - t.integer "owner_id" - t.string "asset_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "owner_type", :default => 0 - end - - create_table "member_roles", :force => true do |t| - t.integer "member_id", :null => false - t.integer "role_id", :null => false - t.integer "inherited_from" - end - - add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" - add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" - - create_table "members", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "project_id", :default => 0 - t.datetime "created_on" - t.boolean "mail_notification", :default => false, :null => false - t.integer "course_id", :default => -1 - t.integer "course_group_id", :default => 0 - end - - add_index "members", ["project_id"], :name => "index_members_on_project_id" - add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true - add_index "members", ["user_id"], :name => "index_members_on_user_id" - - create_table "memo_messages", :force => true do |t| - t.integer "user_id" - t.integer "forum_id" - t.integer "memo_id" - t.string "memo_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "memos", :force => true do |t| - t.integer "forum_id", :null => false - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :null => false - t.integer "author_id", :null => false - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count", :default => 0 - end - - create_table "message_alls", :force => true do |t| - t.integer "user_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "messages", :force => true do |t| - t.integer "board_id", :null => false - t.integer "parent_id" - t.string "subject", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "replies_count", :default => 0, :null => false - t.integer "last_reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "reply_id" - t.integer "quotes" - end - - add_index "messages", ["author_id"], :name => "index_messages_on_author_id" - add_index "messages", ["board_id"], :name => "messages_board_id" - add_index "messages", ["created_on"], :name => "index_messages_on_created_on" - add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" - add_index "messages", ["parent_id"], :name => "messages_parent_id" - - create_table "news", :force => true do |t| - t.integer "project_id" - t.string "title", :limit => 60, :default => "", :null => false - t.string "summary", :default => "" - t.text "description" - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.integer "comments_count", :default => 0, :null => false - t.integer "course_id" - t.integer "sticky", :default => 0 - end - - add_index "news", ["author_id"], :name => "index_news_on_author_id" - add_index "news", ["created_on"], :name => "index_news_on_created_on" - add_index "news", ["project_id"], :name => "news_project_id" - - create_table "no_uses", :force => true do |t| - t.integer "user_id", :null => false - t.string "no_use_type" - t.integer "no_use_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "notificationcomments", :force => true do |t| - t.string "notificationcommented_type" - t.integer "notificationcommented_id" - t.integer "author_id" - t.text "notificationcomments" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "onclick_times", :force => true do |t| - t.integer "user_id" - t.datetime "onclick_time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "open_id_authentication_associations", :force => true do |t| - t.integer "issued" - t.integer "lifetime" - t.string "handle" - t.string "assoc_type" - t.binary "server_url" - t.binary "secret" - end - - create_table "open_id_authentication_nonces", :force => true do |t| - t.integer "timestamp", :null => false - t.string "server_url" - t.string "salt", :null => false - end - - create_table "open_source_projects", :force => true do |t| - t.string "name" - t.text "description" - t.integer "commit_count", :default => 0 - t.integer "code_line", :default => 0 - t.integer "users_count", :default => 0 - t.date "last_commit_time" - t.string "url" - t.date "date_collected" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "option_numbers", :force => true do |t| - t.integer "user_id" - t.integer "memo" - t.integer "messages_for_issues" - t.integer "issues_status" - t.integer "replay_for_message" - t.integer "replay_for_memo" - t.integer "follow" - t.integer "tread" - t.integer "praise_by_one" - t.integer "praise_by_two" - t.integer "praise_by_three" - t.integer "tread_by_one" - t.integer "tread_by_two" - t.integer "tread_by_three" - t.integer "changeset" - t.integer "document" - t.integer "attachment" - t.integer "issue_done_ratio" - t.integer "post_issue" - t.integer "score_type" - t.integer "total_score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - end - - create_table "org_activities", :force => true do |t| - t.integer "user_id" - t.integer "org_act_id" - t.string "org_act_type" - t.integer "container_id" - t.string "container_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_courses", :force => true do |t| - t.integer "organization_id" - t.integer "course_id" - t.datetime "created_at" - end - - create_table "org_document_comments", :force => true do |t| - t.text "title" - t.text "content" - t.integer "organization_id" - t.integer "creator_id" - t.integer "parent_id" - t.integer "reply_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "org_subfield_id" - end - - create_table "org_member_roles", :force => true do |t| - t.integer "org_member_id" - t.integer "role_id" - end - - create_table "org_members", :force => true do |t| - t.integer "user_id" - t.integer "organization_id" - t.string "role" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_messages", :force => true do |t| - t.integer "user_id" - t.integer "sender_id" - t.integer "organization_id" - t.string "message_type" - t.integer "message_id" - t.integer "viewed" - t.string "content" +ActiveRecord::Schema.define(:version => 20160114022928) do + + create_table "activities", :force => true do |t| + t.integer "act_id", :null => false + t.string "act_type", :null => false + t.integer "user_id", :null => false + t.integer "activity_container_id" + t.string "activity_container_type", :default => "" + t.datetime "created_at" + end + + add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" + add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" + add_index "activities", ["user_id"], :name => "index_activities_on_user_id" + + create_table "activity_notifies", :force => true do |t| + t.integer "activity_container_id" + t.string "activity_container_type" + t.integer "activity_id" + t.string "activity_type" + t.integer "notify_to" + t.datetime "created_on" + t.integer "is_read" + end + + add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" + add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" + add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" + + create_table "api_keys", :force => true do |t| + t.string "access_token" + t.datetime "expires_at" + t.integer "user_id" + t.boolean "active", :default => true + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" + add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" + + create_table "applied_projects", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + end + + create_table "apply_project_masters", :force => true do |t| + t.integer "user_id" + t.string "apply_type" + t.integer "apply_id" + t.integer "status" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "at_messages", :force => true do |t| + t.integer "user_id" + t.integer "at_message_id" + t.string "at_message_type" + t.boolean "viewed", :default => false + t.string "container_type" + t.integer "container_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sender_id" + end + + add_index "at_messages", ["user_id"], :name => "index_at_messages_on_user_id" + + create_table "attachment_histories", :force => true do |t| + t.integer "container_id" + t.string "container_type" + t.string "filename", :default => "" + t.string "disk_filename", :default => "" + t.integer "filesize", :default => 0 + t.string "content_type", :default => "" + t.string "digest", :limit => 40, :default => "" + t.integer "downloads", :default => 0 + t.integer "author_id" + t.datetime "created_on" + t.string "description" + t.string "disk_directory" + t.integer "attachtype" + t.integer "is_public" + t.integer "copy_from" + t.integer "quotes" + t.integer "version" + t.integer "attachment_id" + end + + create_table "attachments", :force => true do |t| + t.integer "container_id" + t.string "container_type", :limit => 30 + t.string "filename", :default => "", :null => false + t.string "disk_filename", :default => "", :null => false + t.integer "filesize", :default => 0, :null => false + t.string "content_type", :default => "" + t.string "digest", :limit => 40, :default => "", :null => false + t.integer "downloads", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false + t.datetime "created_on" + t.string "description" + t.string "disk_directory" + t.integer "attachtype", :default => 1 + t.integer "is_public", :default => 1 + t.integer "copy_from" + t.integer "quotes" + end + + add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" + add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" + add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" + + create_table "attachmentstypes", :force => true do |t| + t.integer "typeId", :null => false + t.string "typeName", :limit => 50 + end + + create_table "auth_sources", :force => true do |t| + t.string "type", :limit => 30, :default => "", :null => false + t.string "name", :limit => 60, :default => "", :null => false + t.string "host", :limit => 60 + t.integer "port" + t.string "account" + t.string "account_password", :default => "" + t.string "base_dn" + t.string "attr_login", :limit => 30 + t.string "attr_firstname", :limit => 30 + t.string "attr_lastname", :limit => 30 + t.string "attr_mail", :limit => 30 + t.boolean "onthefly_register", :default => false, :null => false + t.boolean "tls", :default => false, :null => false + t.string "filter" + t.integer "timeout" + end + + add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" + + create_table "biding_projects", :force => true do |t| + t.integer "project_id" + t.integer "bid_id" + t.integer "user_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + end + + create_table "bids", :force => true do |t| + t.string "name" + t.string "budget", :null => false + t.integer "author_id" + t.date "deadline" + t.text "description" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.integer "commit" + t.integer "reward_type" + t.integer "homework_type" + t.integer "parent_id" + t.string "password" + t.integer "is_evaluation" + t.integer "proportion", :default => 60 + t.integer "comment_status", :default => 0 + t.integer "evaluation_num", :default => 3 + t.integer "open_anonymous_evaluation", :default => 1 + end + + create_table "blog_comments", :force => true do |t| + t.integer "blog_id", :null => false + t.integer "parent_id" + t.string "title", :default => "", :null => false + t.text "content" + t.integer "author_id" + t.integer "comments_count", :default => 0, :null => false + t.integer "last_comment_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.boolean "locked", :default => false + t.integer "sticky", :default => 0 + t.integer "reply_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "blogs", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "description" + t.integer "position", :default => 1 + t.integer "article_count", :default => 0, :null => false + t.integer "comments_count", :default => 0, :null => false + t.integer "last_comments_id" + t.integer "parent_id" + t.integer "author_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "homepage_id" + end + + create_table "boards", :force => true do |t| + t.integer "project_id", :null => false + t.string "name", :default => "", :null => false + t.string "description" + t.integer "position", :default => 1 + t.integer "topics_count", :default => 0, :null => false + t.integer "messages_count", :default => 0, :null => false + t.integer "last_message_id" + t.integer "parent_id" + t.integer "course_id" + t.integer "org_subfield_id" + end + + add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" + add_index "boards", ["project_id"], :name => "boards_project_id" + + create_table "bug_to_osps", :force => true do |t| + t.integer "osp_id" + t.integer "relative_memo_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "changes", :force => true do |t| + t.integer "changeset_id", :null => false + t.string "action", :limit => 1, :default => "", :null => false + t.text "path", :null => false + t.text "from_path" + t.string "from_revision" + t.string "revision" + t.string "branch" + end + + add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" + + create_table "changeset_parents", :id => false, :force => true do |t| + t.integer "changeset_id", :null => false + t.integer "parent_id", :null => false + end + + add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" + add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" + + create_table "changesets", :force => true do |t| + t.integer "repository_id", :null => false + t.string "revision", :null => false + t.string "committer" + t.datetime "committed_on", :null => false + t.text "comments" + t.date "commit_date" + t.string "scmid" + t.integer "user_id" + end + + add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" + add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true + add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" + add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" + add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" + + create_table "changesets_issues", :id => false, :force => true do |t| + t.integer "changeset_id", :null => false + t.integer "issue_id", :null => false + end + + add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true + + create_table "code_review_assignments", :force => true do |t| + t.integer "issue_id" + t.integer "change_id" + t.integer "attachment_id" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.string "action_type" + t.integer "changeset_id" + end + + create_table "code_review_project_settings", :force => true do |t| + t.integer "project_id" + t.integer "tracker_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "updated_by" + t.boolean "hide_code_review_tab", :default => false + t.integer "auto_relation", :default => 1 + t.integer "assignment_tracker_id" + t.text "auto_assign" + t.integer "lock_version", :default => 0, :null => false + t.boolean "tracker_in_review_dialog", :default => false + end + + create_table "code_review_user_settings", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.integer "mail_notification", :default => 0, :null => false + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "code_reviews", :force => true do |t| + t.integer "project_id" + t.integer "change_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "line" + t.integer "updated_by_id" + t.integer "lock_version", :default => 0, :null => false + t.integer "status_changed_from" + t.integer "status_changed_to" + t.integer "issue_id" + t.string "action_type" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.integer "attachment_id" + t.integer "file_count", :default => 0, :null => false + t.boolean "diff_all" + end + + create_table "comments", :force => true do |t| + t.string "commented_type", :limit => 30, :default => "", :null => false + t.integer "commented_id", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false + t.text "comments" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + add_index "comments", ["author_id"], :name => "index_comments_on_author_id" + add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" + + create_table "contest_notifications", :force => true do |t| + t.text "title" + t.text "content" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "contesting_projects", :force => true do |t| + t.integer "project_id" + t.string "contest_id" + t.integer "user_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + end + + create_table "contesting_softapplications", :force => true do |t| + t.integer "softapplication_id" + t.integer "contest_id" + t.integer "user_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + end + + create_table "contestnotifications", :force => true do |t| + t.integer "contest_id" + t.string "title" + t.string "summary" + t.text "description" + t.integer "author_id" + t.integer "notificationcomments_count" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "contests", :force => true do |t| + t.string "name" + t.string "budget", :default => "" + t.integer "author_id" + t.date "deadline" + t.string "description" + t.integer "commit" + t.string "password" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + create_table "course_activities", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "course_act_id" + t.string "course_act_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_attachments", :force => true do |t| + t.string "filename" + t.string "disk_filename" + t.integer "filesize" + t.string "content_type" + t.string "digest" + t.integer "downloads" + t.string "author_id" + t.string "integer" + t.string "description" + t.string "disk_directory" + t.integer "attachtype" + t.integer "is_public" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "container_id", :default => 0 + end + + create_table "course_contributor_scores", :force => true do |t| + t.integer "course_id" + t.integer "user_id" + t.integer "message_num" + t.integer "message_reply_num" + t.integer "news_reply_num" + t.integer "resource_num" + t.integer "journal_num" + t.integer "journal_reply_num" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "total_score" + end + + create_table "course_groups", :force => true do |t| + t.string "name" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_infos", :force => true do |t| + t.integer "course_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_messages", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "course_message_id" + t.string "course_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "content" + t.integer "status" + end + + create_table "course_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "course_id" + t.float "grade", :default => 0.0 + t.integer "course_ac_para", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "courses", :force => true do |t| + t.integer "tea_id" + t.string "name" + t.integer "state" + t.string "code" + t.integer "time" + t.string "extra" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "location" + t.string "term" + t.string "string" + t.string "password" + t.string "setup_time" + t.string "endup_time" + t.string "class_period" + t.integer "school_id" + t.text "description" + t.integer "status", :default => 1 + t.integer "attachmenttype", :default => 2 + t.integer "lft" + t.integer "rgt" + t.integer "is_public", :limit => 1, :default => 1 + t.integer "inherit_members", :limit => 1, :default => 1 + t.integer "open_student", :default => 0 + t.integer "outline", :default => 0 + t.integer "publish_resource", :default => 0 + t.integer "is_delete", :default => 0 + t.integer "end_time" + t.string "end_term" + end + + create_table "custom_fields", :force => true do |t| + t.string "type", :limit => 30, :default => "", :null => false + t.string "name", :limit => 30, :default => "", :null => false + t.string "field_format", :limit => 30, :default => "", :null => false + t.text "possible_values" + t.string "regexp", :default => "" + t.integer "min_length", :default => 0, :null => false + t.integer "max_length", :default => 0, :null => false + t.boolean "is_required", :default => false, :null => false + t.boolean "is_for_all", :default => false, :null => false + t.boolean "is_filter", :default => false, :null => false + t.integer "position", :default => 1 + t.boolean "searchable", :default => false + t.text "default_value" + t.boolean "editable", :default => true + t.boolean "visible", :default => true, :null => false + t.boolean "multiple", :default => false + end + + add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" + + create_table "custom_fields_projects", :id => false, :force => true do |t| + t.integer "custom_field_id", :default => 0, :null => false + t.integer "project_id", :default => 0, :null => false + end + + add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true + + create_table "custom_fields_trackers", :id => false, :force => true do |t| + t.integer "custom_field_id", :default => 0, :null => false + t.integer "tracker_id", :default => 0, :null => false + end + + add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true + + create_table "custom_values", :force => true do |t| + t.string "customized_type", :limit => 30, :default => "", :null => false + t.integer "customized_id", :default => 0, :null => false + t.integer "custom_field_id", :default => 0, :null => false + t.text "value" + end + + add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" + add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" + + create_table "delayed_jobs", :force => true do |t| + t.integer "priority", :default => 0, :null => false + t.integer "attempts", :default => 0, :null => false + t.text "handler", :null => false + t.text "last_error" + t.datetime "run_at" + t.datetime "locked_at" + t.datetime "failed_at" + t.string "locked_by" + t.string "queue" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" + + create_table "discuss_demos", :force => true do |t| + t.string "title" + t.text "body" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "documents", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.integer "category_id", :default => 0, :null => false + t.string "title", :limit => 60, :default => "", :null => false + t.text "description" + t.datetime "created_on" + t.integer "user_id", :default => 0 + t.integer "is_public", :default => 1 + end + + add_index "documents", ["category_id"], :name => "index_documents_on_category_id" + add_index "documents", ["created_on"], :name => "index_documents_on_created_on" + add_index "documents", ["project_id"], :name => "documents_project_id" + + create_table "dts", :primary_key => "Num", :force => true do |t| + t.string "Defect", :limit => 50 + t.string "Category", :limit => 50 + t.string "File" + t.string "Method" + t.string "Module", :limit => 20 + t.string "Variable", :limit => 50 + t.integer "StartLine" + t.integer "IPLine" + t.string "IPLineCode", :limit => 200 + t.string "Judge", :limit => 15 + t.integer "Review", :limit => 1 + t.string "Description" + t.text "PreConditions", :limit => 2147483647 + t.text "TraceInfo", :limit => 2147483647 + t.text "Code", :limit => 2147483647 + t.integer "project_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "id", :null => false + end + + create_table "editor_of_documents", :force => true do |t| + t.integer "editor_id" + t.integer "org_document_comment_id" + t.datetime "created_at" + end + + create_table "enabled_modules", :force => true do |t| + t.integer "project_id" + t.string "name", :null => false + t.integer "course_id" + end + + add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" + + create_table "enumerations", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "is_default", :default => false, :null => false + t.string "type" + t.boolean "active", :default => true, :null => false + t.integer "project_id" + t.integer "parent_id" + t.string "position_name", :limit => 30 + end + + add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" + add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" + + create_table "exercise_answers", :force => true do |t| + t.integer "user_id" + t.integer "exercise_question_id" + t.integer "exercise_choice_id" + t.text "answer_text" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "exercise_choices", :force => true do |t| + t.integer "exercise_question_id" + t.text "choice_text" + t.integer "choice_position" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "exercise_questions", :force => true do |t| + t.text "question_title" + t.integer "question_type" + t.integer "question_number" + t.integer "exercise_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "question_score" + end + + create_table "exercise_standard_answers", :force => true do |t| + t.integer "exercise_question_id" + t.integer "exercise_choice_id" + t.text "answer_text" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "exercise_users", :force => true do |t| + t.integer "user_id" + t.integer "exercise_id" + t.integer "score" + t.datetime "start_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.datetime "end_at" + t.integer "status" + end + + create_table "exercises", :force => true do |t| + t.text "exercise_name" + t.text "exercise_description" + t.integer "course_id" + t.integer "exercise_status" + t.integer "user_id" + t.integer "time" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.datetime "publish_time" + t.datetime "end_time" + t.integer "show_result" + end + + create_table "first_pages", :force => true do |t| + t.string "web_title" + t.string "title" + t.text "description" + t.string "page_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sort_type" + t.integer "image_width", :default => 107 + t.integer "image_height", :default => 63 + t.integer "show_course", :default => 1 + t.integer "show_contest", :default => 1 + end + + create_table "forge_activities", :force => true do |t| + t.integer "user_id" + t.integer "project_id" + t.integer "forge_act_id" + t.string "forge_act_type" + t.integer "org_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" + + create_table "forge_messages", :force => true do |t| + t.integer "user_id" + t.integer "project_id" + t.integer "forge_message_id" + t.string "forge_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "secret_key" + t.integer "status" + end + + create_table "forums", :force => true do |t| + t.string "name", :null => false + t.text "description" + t.integer "topic_count", :default => 0 + t.integer "memo_count", :default => 0 + t.integer "last_memo_id", :default => 0 + t.integer "creator_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sticky" + t.integer "locked" + end + + create_table "groups_users", :id => false, :force => true do |t| + t.integer "group_id", :null => false + t.integer "user_id", :null => false + end + + add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true + + create_table "homework_attaches", :force => true do |t| + t.integer "bid_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + t.string "name" + t.text "description" + t.integer "state" + t.integer "project_id", :default => 0 + t.float "score", :default => 0.0 + t.integer "is_teacher_score", :default => 0 + end + + add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" + + create_table "homework_commons", :force => true do |t| + t.string "name" + t.integer "user_id" + t.text "description" + t.date "publish_time" + t.date "end_time" + t.integer "homework_type", :default => 1 + t.string "late_penalty" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "teacher_priority", :default => 1 + t.integer "anonymous_comment", :default => 0 + end + + add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id" + + create_table "homework_detail_groups", :force => true do |t| + t.integer "homework_common_id" + t.integer "min_num" + t.integer "max_num" + t.integer "base_on_project" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "homework_detail_groups", ["homework_common_id"], :name => "index_homework_detail_groups_on_homework_common_id" + + create_table "homework_detail_manuals", :force => true do |t| + t.float "ta_proportion" + t.integer "comment_status" + t.date "evaluation_start" + t.date "evaluation_end" + t.integer "evaluation_num" + t.integer "absence_penalty", :default => 1 + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "homework_detail_programings", :force => true do |t| + t.string "language" + t.text "standard_code", :limit => 2147483647 + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "ta_proportion", :default => 0.1 + t.integer "question_id" + end + + create_table "homework_evaluations", :force => true do |t| + t.string "user_id" + t.string "homework_attach_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "homework_for_courses", :force => true do |t| + t.integer "course_id" + t.integer "bid_id" + end + + add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id" + add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id" + + create_table "homework_tests", :force => true do |t| + t.text "input" + t.text "output" + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "result" + t.text "error_msg" + end + + create_table "homework_users", :force => true do |t| + t.string "homework_attach_id" + t.string "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "invite_lists", :force => true do |t| + t.integer "project_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "mail" + end + + create_table "issue_categories", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "name", :limit => 30, :default => "", :null => false + t.integer "assigned_to_id" + end + + add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" + add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" + + create_table "issue_relations", :force => true do |t| + t.integer "issue_from_id", :null => false + t.integer "issue_to_id", :null => false + t.string "relation_type", :default => "", :null => false + t.integer "delay" + end + + add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true + add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" + add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" + + create_table "issue_statuses", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.boolean "is_closed", :default => false, :null => false + t.boolean "is_default", :default => false, :null => false + t.integer "position", :default => 1 + t.integer "default_done_ratio" + end + + add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" + add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" + add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" + + create_table "issues", :force => true do |t| + t.integer "tracker_id", :null => false + t.integer "project_id", :null => false + t.string "subject", :default => "", :null => false + t.text "description" + t.date "due_date" + t.integer "category_id" + t.integer "status_id", :null => false + t.integer "assigned_to_id" + t.integer "priority_id", :null => false + t.integer "fixed_version_id" + t.integer "author_id", :null => false + t.integer "lock_version", :default => 0, :null => false + t.datetime "created_on" + t.datetime "updated_on" + t.date "start_date" + t.integer "done_ratio", :default => 0, :null => false + t.float "estimated_hours" + t.integer "parent_id" + t.integer "root_id" + t.integer "lft" + t.integer "rgt" + t.boolean "is_private", :default => false, :null => false + t.datetime "closed_on" + t.integer "project_issues_index" + end + + add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" + add_index "issues", ["author_id"], :name => "index_issues_on_author_id" + add_index "issues", ["category_id"], :name => "index_issues_on_category_id" + add_index "issues", ["created_on"], :name => "index_issues_on_created_on" + add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" + add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" + add_index "issues", ["project_id"], :name => "issues_project_id" + add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" + add_index "issues", ["status_id"], :name => "index_issues_on_status_id" + add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" + + create_table "join_in_competitions", :force => true do |t| + t.integer "user_id" + t.integer "competition_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "join_in_contests", :force => true do |t| + t.integer "user_id" + t.integer "bid_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "journal_details", :force => true do |t| + t.integer "journal_id", :default => 0, :null => false + t.string "property", :limit => 30, :default => "", :null => false + t.string "prop_key", :limit => 30, :default => "", :null => false + t.text "old_value" + t.text "value" + end + + add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" + + create_table "journal_replies", :id => false, :force => true do |t| + t.integer "journal_id" + t.integer "user_id" + t.integer "reply_id" + end + + add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" + add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" + add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" + + create_table "journals", :force => true do |t| + t.integer "journalized_id", :default => 0, :null => false + t.string "journalized_type", :limit => 30, :default => "", :null => false + t.integer "user_id", :default => 0, :null => false + t.text "notes" + t.datetime "created_on", :null => false + t.boolean "private_notes", :default => false, :null => false + end + + add_index "journals", ["created_on"], :name => "index_journals_on_created_on" + add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" + add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" + add_index "journals", ["user_id"], :name => "index_journals_on_user_id" + + create_table "journals_for_messages", :force => true do |t| + t.integer "jour_id" + t.string "jour_type" + t.integer "user_id" + t.text "notes" + t.integer "status" + t.integer "reply_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.string "m_parent_id" + t.boolean "is_readed" + t.integer "m_reply_count" + t.integer "m_reply_id" + t.integer "is_comprehensive_evaluation" + t.integer "private", :default => 0 + end + + create_table "kindeditor_assets", :force => true do |t| + t.string "asset" + t.integer "file_size" + t.string "file_type" + t.integer "owner_id" + t.string "asset_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "owner_type", :default => 0 + end + + create_table "member_roles", :force => true do |t| + t.integer "member_id", :null => false + t.integer "role_id", :null => false + t.integer "inherited_from" + end + + add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" + add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" + + create_table "members", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.integer "project_id", :default => 0 + t.datetime "created_on" + t.boolean "mail_notification", :default => false, :null => false + t.integer "course_id", :default => -1 + t.integer "course_group_id", :default => 0 + end + + add_index "members", ["project_id"], :name => "index_members_on_project_id" + add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true + add_index "members", ["user_id"], :name => "index_members_on_user_id" + + create_table "memo_messages", :force => true do |t| + t.integer "user_id" + t.integer "forum_id" + t.integer "memo_id" + t.string "memo_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "memos", :force => true do |t| + t.integer "forum_id", :null => false + t.integer "parent_id" + t.string "subject", :null => false + t.text "content", :null => false + t.integer "author_id", :null => false + t.integer "replies_count", :default => 0 + t.integer "last_reply_id" + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count", :default => 0 + end + + create_table "message_alls", :force => true do |t| + t.integer "user_id" + t.integer "message_id" + t.string "message_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "messages", :force => true do |t| + t.integer "board_id", :null => false + t.integer "parent_id" + t.string "subject", :default => "", :null => false + t.text "content" + t.integer "author_id" + t.integer "replies_count", :default => 0, :null => false + t.integer "last_reply_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.boolean "locked", :default => false + t.integer "sticky", :default => 0 + t.integer "reply_id" + t.integer "quotes" + end + + add_index "messages", ["author_id"], :name => "index_messages_on_author_id" + add_index "messages", ["board_id"], :name => "messages_board_id" + add_index "messages", ["created_on"], :name => "index_messages_on_created_on" + add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" + add_index "messages", ["parent_id"], :name => "messages_parent_id" + + create_table "news", :force => true do |t| + t.integer "project_id" + t.string "title", :limit => 60, :default => "", :null => false + t.string "summary", :default => "" + t.text "description" + t.integer "author_id", :default => 0, :null => false + t.datetime "created_on" + t.integer "comments_count", :default => 0, :null => false + t.integer "course_id" + t.integer "sticky", :default => 0 + end + + add_index "news", ["author_id"], :name => "index_news_on_author_id" + add_index "news", ["created_on"], :name => "index_news_on_created_on" + add_index "news", ["project_id"], :name => "news_project_id" + + create_table "no_uses", :force => true do |t| + t.integer "user_id", :null => false + t.string "no_use_type" + t.integer "no_use_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "notificationcomments", :force => true do |t| + t.string "notificationcommented_type" + t.integer "notificationcommented_id" + t.integer "author_id" + t.text "notificationcomments" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "onclick_times", :force => true do |t| + t.integer "user_id" + t.datetime "onclick_time" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "open_id_authentication_associations", :force => true do |t| + t.integer "issued" + t.integer "lifetime" + t.string "handle" + t.string "assoc_type" + t.binary "server_url" + t.binary "secret" + end + + create_table "open_id_authentication_nonces", :force => true do |t| + t.integer "timestamp", :null => false + t.string "server_url" + t.string "salt", :null => false + end + + create_table "open_source_projects", :force => true do |t| + t.string "name" + t.text "description" + t.integer "commit_count", :default => 0 + t.integer "code_line", :default => 0 + t.integer "users_count", :default => 0 + t.date "last_commit_time" + t.string "url" + t.date "date_collected" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "option_numbers", :force => true do |t| + t.integer "user_id" + t.integer "memo" + t.integer "messages_for_issues" + t.integer "issues_status" + t.integer "replay_for_message" + t.integer "replay_for_memo" + t.integer "follow" + t.integer "tread" + t.integer "praise_by_one" + t.integer "praise_by_two" + t.integer "praise_by_three" + t.integer "tread_by_one" + t.integer "tread_by_two" + t.integer "tread_by_three" + t.integer "changeset" + t.integer "document" + t.integer "attachment" + t.integer "issue_done_ratio" + t.integer "post_issue" + t.integer "score_type" + t.integer "total_score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "project_id" + end + + create_table "org_activities", :force => true do |t| + t.integer "user_id" + t.integer "org_act_id" + t.string "org_act_type" + t.integer "container_id" + t.string "container_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "org_courses", :force => true do |t| + t.integer "organization_id" + t.integer "course_id" + t.datetime "created_at" + end + + create_table "org_document_comments", :force => true do |t| + t.text "title" + t.text "content" + t.integer "organization_id" + t.integer "creator_id" + t.integer "parent_id" + t.integer "reply_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.boolean "locked", :default => false + t.integer "sticky", :default => 0 + t.integer "org_subfield_id" + end + + create_table "org_member_roles", :force => true do |t| + t.integer "org_member_id" + t.integer "role_id" + end + + create_table "org_members", :force => true do |t| + t.integer "user_id" + t.integer "organization_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "org_messages", :force => true do |t| + t.integer "user_id" + t.integer "sender_id" + t.integer "organization_id" + t.string "message_type" + t.integer "message_id" + t.integer "viewed" + t.string "content" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "status", :default => 0 - end - - create_table "org_projects", :force => true do |t| - t.integer "organization_id" - t.integer "project_id" - t.datetime "created_at" - end - - create_table "org_subfield_messages", :force => true do |t| - t.integer "org_subfield_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_subfields", :force => true do |t| - t.integer "organization_id" - t.integer "priority" - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "field_type" - t.integer "hide", :default => 0 - end - - create_table "organizations", :force => true do |t| - t.string "name" - t.text "description" - t.integer "creator_id" - t.integer "home_id" - t.string "domain" - t.boolean "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "phone_app_versions", :force => true do |t| - t.string "version" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_answers", :force => true do |t| - t.integer "poll_question_id" - t.text "answer_text" - t.integer "answer_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_questions", :force => true do |t| - t.string "question_title" - t.integer "question_type" - t.integer "is_necessary" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_number" - end - - create_table "poll_users", :force => true do |t| - t.integer "user_id" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_votes", :force => true do |t| - t.integer "user_id" - t.integer "poll_question_id" - t.integer "poll_answer_id" - t.text "vote_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "polls", :force => true do |t| - t.string "polls_name" - t.string "polls_type" - t.integer "polls_group_id" - t.integer "polls_status" - t.integer "user_id" - t.datetime "published_at" - t.datetime "closed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "polls_description" - t.integer "show_result", :default => 1 - end - - create_table "praise_tread_caches", :force => true do |t| - t.integer "object_id", :null => false - t.string "object_type" - t.integer "praise_num" - t.integer "tread_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "praise_treads", :force => true do |t| - t.integer "user_id", :null => false - t.integer "praise_tread_object_id" - t.string "praise_tread_object_type" - t.integer "praise_or_tread" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "principal_activities", :force => true do |t| - t.integer "user_id" - t.integer "principal_id" - t.integer "principal_act_id" - t.string "principal_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_infos", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_scores", :force => true do |t| - t.string "project_id" - t.integer "score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "issue_num", :default => 0 - t.integer "issue_journal_num", :default => 0 - t.integer "news_num", :default => 0 - t.integer "documents_num", :default => 0 - t.integer "changeset_num", :default => 0 - t.integer "board_message_num", :default => 0 + end + + create_table "org_projects", :force => true do |t| + t.integer "organization_id" + t.integer "project_id" + t.datetime "created_at" + end + + create_table "org_subfield_messages", :force => true do |t| + t.integer "org_subfield_id" + t.integer "message_id" + t.string "message_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "org_subfields", :force => true do |t| + t.integer "organization_id" + t.integer "priority" + t.string "name" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "field_type" + t.integer "hide", :default => 0 + end + + create_table "organizations", :force => true do |t| + t.string "name" + t.text "description" + t.integer "creator_id" + t.integer "home_id" + t.string "domain" + t.boolean "is_public" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "phone_app_versions", :force => true do |t| + t.string "version" + t.text "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_answers", :force => true do |t| + t.integer "poll_question_id" + t.text "answer_text" + t.integer "answer_position" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_questions", :force => true do |t| + t.string "question_title" + t.integer "question_type" + t.integer "is_necessary" + t.integer "poll_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "question_number" + end + + create_table "poll_users", :force => true do |t| + t.integer "user_id" + t.integer "poll_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_votes", :force => true do |t| + t.integer "user_id" + t.integer "poll_question_id" + t.integer "poll_answer_id" + t.text "vote_text" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "polls", :force => true do |t| + t.string "polls_name" + t.string "polls_type" + t.integer "polls_group_id" + t.integer "polls_status" + t.integer "user_id" + t.datetime "published_at" + t.datetime "closed_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "polls_description" + t.integer "show_result", :default => 1 + end + + create_table "praise_tread_caches", :force => true do |t| + t.integer "object_id", :null => false + t.string "object_type" + t.integer "praise_num" + t.integer "tread_num" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "praise_treads", :force => true do |t| + t.integer "user_id", :null => false + t.integer "praise_tread_object_id" + t.string "praise_tread_object_type" + t.integer "praise_or_tread" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "principal_activities", :force => true do |t| + t.integer "user_id" + t.integer "principal_id" + t.integer "principal_act_id" + t.string "principal_act_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "project_infos", :force => true do |t| + t.integer "project_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "project_scores", :force => true do |t| + t.string "project_id" + t.integer "score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "issue_num", :default => 0 + t.integer "issue_journal_num", :default => 0 + t.integer "news_num", :default => 0 + t.integer "documents_num", :default => 0 + t.integer "changeset_num", :default => 0 + t.integer "board_message_num", :default => 0 t.integer "board_num", :default => 0 t.integer "attach_num", :default => 0 - end - - create_table "project_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "project_id" - t.integer "project_type" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - end - - add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" - - create_table "projecting_softapplictions", :force => true do |t| - t.integer "user_id" - t.integer "softapplication_id" - t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "projects", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - t.string "homepage", :default => "" - t.boolean "is_public", :default => true, :null => false - t.integer "parent_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "identifier" - t.integer "status", :default => 1, :null => false - t.integer "lft" - t.integer "rgt" - t.boolean "inherit_members", :default => false, :null => false - t.integer "project_type" - t.boolean "hidden_repo", :default => false, :null => false - t.integer "attachmenttype", :default => 1 - t.integer "user_id" - t.integer "dts_test", :default => 0 - t.string "enterprise_name" - t.integer "organization_id" - t.integer "project_new_type" - t.integer "gpid" - t.integer "forked_from_project_id" - t.integer "forked_count" - t.integer "commits_count", :default => 0 - t.integer "publish_resource", :default => 0 - end - - add_index "projects", ["lft"], :name => "index_projects_on_lft" - add_index "projects", ["rgt"], :name => "index_projects_on_rgt" - - create_table "projects_trackers", :id => false, :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true - add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" - - create_table "queries", :force => true do |t| - t.integer "project_id" - t.string "name", :default => "", :null => false - t.text "filters" - t.integer "user_id", :default => 0, :null => false - t.boolean "is_public", :default => false, :null => false - t.text "column_names" - t.text "sort_criteria" - t.string "group_by" - t.string "type" - end - - add_index "queries", ["project_id"], :name => "index_queries_on_project_id" - add_index "queries", ["user_id"], :name => "index_queries_on_user_id" - - create_table "relative_memo_to_open_source_projects", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "relative_memos", :force => true do |t| - t.integer "osp_id" - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :limit => 16777215, :null => false - t.integer "author_id" - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.boolean "is_quote", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count_crawl", :default => 0 - t.integer "viewed_count_local", :default => 0 - t.string "url" - t.string "username" - t.string "userhomeurl" - t.date "date_collected" - t.string "topic_resource" - end - - create_table "repositories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "url", :default => "", :null => false - t.string "login", :limit => 60, :default => "" - t.string "password", :default => "" - t.string "root_url", :default => "" - t.string "type" - t.string "path_encoding", :limit => 64 - t.string "log_encoding", :limit => 64 - t.text "extra_info" - t.string "identifier" - t.boolean "is_default", :default => false - t.boolean "hidden", :default => false - end - - add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" - - create_table "rich_rich_files", :force => true do |t| - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "rich_file_file_name" - t.string "rich_file_content_type" - t.integer "rich_file_file_size" - t.datetime "rich_file_updated_at" - t.string "owner_type" - t.integer "owner_id" - t.text "uri_cache" - t.string "simplified_type", :default => "file" - end - - create_table "roles", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "assignable", :default => true - t.integer "builtin", :default => 0, :null => false - t.text "permissions" - t.string "issues_visibility", :limit => 30, :default => "default", :null => false - end - - create_table "schools", :force => true do |t| - t.string "name" - t.string "province" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "logo_link" - t.string "pinyin" - end - - create_table "seems_rateable_cached_ratings", :force => true do |t| - t.integer "cacheable_id", :limit => 8 - t.string "cacheable_type" - t.float "avg", :null => false - t.integer "cnt", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "seems_rateable_rates", :force => true do |t| - t.integer "rater_id", :limit => 8 - t.integer "rateable_id" - t.string "rateable_type" - t.float "stars", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "is_teacher_score", :default => 0 - end - - create_table "settings", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "value" - t.datetime "updated_on" - end - - add_index "settings", ["name"], :name => "index_settings_on_name" - - create_table "shares", :force => true do |t| - t.date "created_on" - t.string "url" - t.string "title" - t.integer "share_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - t.integer "user_id" - t.string "description" - end - - create_table "shield_activities", :force => true do |t| - t.string "container_type" - t.integer "container_id" - t.string "shield_type" - t.integer "shield_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "softapplications", :force => true do |t| - t.string "name" - t.text "description" - t.integer "app_type_id" - t.string "app_type_name" - t.string "android_min_version_available" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "contest_id" - t.integer "softapplication_id" - t.integer "is_public" - t.string "application_developers" - t.string "deposit_project_url" - t.string "deposit_project" - t.integer "project_id" - end - - create_table "student_work_projects", :force => true do |t| - t.integer "homework_common_id" - t.integer "student_work_id" - t.integer "project_id" - t.integer "user_id" - t.integer "is_leader" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "student_work_projects", ["homework_common_id"], :name => "index_student_work_projects_on_homework_common_id" - add_index "student_work_projects", ["project_id"], :name => "index_student_work_projects_on_project_id" - add_index "student_work_projects", ["student_work_id"], :name => "index_student_work_projects_on_student_work_id" - add_index "student_work_projects", ["user_id"], :name => "index_student_work_projects_on_user_id" - - create_table "student_work_tests", :force => true do |t| - t.integer "student_work_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "status", :default => 9 - t.text "results" - t.text "src" - end - - create_table "student_works", :force => true do |t| - t.string "name" - t.text "description", :limit => 2147483647 - t.integer "homework_common_id" - t.integer "user_id" - t.float "final_score" - t.float "teacher_score" - t.float "student_score" - t.float "teaching_asistant_score" - t.integer "project_id", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "late_penalty", :default => 0 - t.integer "absence_penalty", :default => 0 - t.float "system_score", :default => 0.0 - t.boolean "is_test", :default => false - end - - add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id" - - create_table "student_works_evaluation_distributions", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "student_works_scores", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.integer "score" - t.text "comment" - t.integer "reviewer_role" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "students_for_courses", :force => true do |t| - t.integer "student_id" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" - add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" - + end + + create_table "project_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "project_id" + t.integer "project_type" + t.float "grade", :default => 0.0 + t.integer "course_ac_para", :default => 0 + end + + add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" + + create_table "projecting_softapplictions", :force => true do |t| + t.integer "user_id" + t.integer "softapplication_id" + t.integer "project_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "projects", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "description" + t.string "homepage", :default => "" + t.boolean "is_public", :default => true, :null => false + t.integer "parent_id" + t.datetime "created_on" + t.datetime "updated_on" + t.string "identifier" + t.integer "status", :default => 1, :null => false + t.integer "lft" + t.integer "rgt" + t.boolean "inherit_members", :default => false, :null => false + t.integer "project_type" + t.boolean "hidden_repo", :default => false, :null => false + t.integer "attachmenttype", :default => 1 + t.integer "user_id" + t.integer "dts_test", :default => 0 + t.string "enterprise_name" + t.integer "organization_id" + t.integer "project_new_type" + t.integer "gpid" + t.integer "forked_from_project_id" + t.integer "forked_count" + t.integer "commits_count", :default => 0 + t.integer "publish_resource", :default => 0 + t.integer "issues_count", :default => 0 + t.integer "attachments_count", :default => 0 + t.integer "boards_count", :default => 0 + t.integer "news_count", :default => 0 + t.integer "acts_count", :default => 0 + t.integer "journals_count", :default => 0 + t.integer "boards_reply_count", :default => 0 + end + + add_index "projects", ["lft"], :name => "index_projects_on_lft" + add_index "projects", ["rgt"], :name => "index_projects_on_rgt" + + create_table "projects_trackers", :id => false, :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.integer "tracker_id", :default => 0, :null => false + end + + add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true + add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" + + create_table "queries", :force => true do |t| + t.integer "project_id" + t.string "name", :default => "", :null => false + t.text "filters" + t.integer "user_id", :default => 0, :null => false + t.boolean "is_public", :default => false, :null => false + t.text "column_names" + t.text "sort_criteria" + t.string "group_by" + t.string "type" + end + + add_index "queries", ["project_id"], :name => "index_queries_on_project_id" + add_index "queries", ["user_id"], :name => "index_queries_on_user_id" + + create_table "relative_memo_to_open_source_projects", :force => true do |t| + t.integer "osp_id" + t.integer "relative_memo_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "relative_memos", :force => true do |t| + t.integer "osp_id" + t.integer "parent_id" + t.string "subject", :null => false + t.text "content", :limit => 16777215, :null => false + t.integer "author_id" + t.integer "replies_count", :default => 0 + t.integer "last_reply_id" + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.boolean "is_quote", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count_crawl", :default => 0 + t.integer "viewed_count_local", :default => 0 + t.string "url" + t.string "username" + t.string "userhomeurl" + t.date "date_collected" + t.string "topic_resource" + end + + create_table "repositories", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "url", :default => "", :null => false + t.string "login", :limit => 60, :default => "" + t.string "password", :default => "" + t.string "root_url", :default => "" + t.string "type" + t.string "path_encoding", :limit => 64 + t.string "log_encoding", :limit => 64 + t.text "extra_info" + t.string "identifier" + t.boolean "is_default", :default => false + t.boolean "hidden", :default => false + end + + add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" + + create_table "rich_rich_files", :force => true do |t| + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "rich_file_file_name" + t.string "rich_file_content_type" + t.integer "rich_file_file_size" + t.datetime "rich_file_updated_at" + t.string "owner_type" + t.integer "owner_id" + t.text "uri_cache" + t.string "simplified_type", :default => "file" + end + + create_table "roles", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "assignable", :default => true + t.integer "builtin", :default => 0, :null => false + t.text "permissions" + t.string "issues_visibility", :limit => 30, :default => "default", :null => false + end + + create_table "schools", :force => true do |t| + t.string "name" + t.string "province" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "logo_link" + t.string "pinyin" + end + + create_table "seems_rateable_cached_ratings", :force => true do |t| + t.integer "cacheable_id", :limit => 8 + t.string "cacheable_type" + t.float "avg", :null => false + t.integer "cnt", :null => false + t.string "dimension" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "seems_rateable_rates", :force => true do |t| + t.integer "rater_id", :limit => 8 + t.integer "rateable_id" + t.string "rateable_type" + t.float "stars", :null => false + t.string "dimension" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "is_teacher_score", :default => 0 + end + + create_table "settings", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "value" + t.datetime "updated_on" + end + + add_index "settings", ["name"], :name => "index_settings_on_name" + + create_table "shares", :force => true do |t| + t.date "created_on" + t.string "url" + t.string "title" + t.integer "share_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "project_id" + t.integer "user_id" + t.string "description" + end + + create_table "shield_activities", :force => true do |t| + t.string "container_type" + t.integer "container_id" + t.string "shield_type" + t.integer "shield_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "softapplications", :force => true do |t| + t.string "name" + t.text "description" + t.integer "app_type_id" + t.string "app_type_name" + t.string "android_min_version_available" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "contest_id" + t.integer "softapplication_id" + t.integer "is_public" + t.string "application_developers" + t.string "deposit_project_url" + t.string "deposit_project" + t.integer "project_id" + end + + create_table "student_work_projects", :force => true do |t| + t.integer "homework_common_id" + t.integer "student_work_id" + t.integer "project_id" + t.integer "user_id" + t.integer "is_leader" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "student_work_projects", ["homework_common_id"], :name => "index_student_work_projects_on_homework_common_id" + add_index "student_work_projects", ["project_id"], :name => "index_student_work_projects_on_project_id" + add_index "student_work_projects", ["student_work_id"], :name => "index_student_work_projects_on_student_work_id" + add_index "student_work_projects", ["user_id"], :name => "index_student_work_projects_on_user_id" + + create_table "student_work_tests", :force => true do |t| + t.integer "student_work_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "status", :default => 9 + t.text "results" + t.text "src" + end + + create_table "student_works", :force => true do |t| + t.string "name" + t.text "description", :limit => 2147483647 + t.integer "homework_common_id" + t.integer "user_id" + t.float "final_score" + t.float "teacher_score" + t.float "student_score" + t.float "teaching_asistant_score" + t.integer "project_id", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "late_penalty", :default => 0 + t.integer "absence_penalty", :default => 0 + t.float "system_score", :default => 0.0 + t.boolean "is_test", :default => false + end + + add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id" + + create_table "student_works_evaluation_distributions", :force => true do |t| + t.integer "student_work_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "student_works_scores", :force => true do |t| + t.integer "student_work_id" + t.integer "user_id" + t.integer "score" + t.text "comment" + t.integer "reviewer_role" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "students_for_courses", :force => true do |t| + t.integer "student_id" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" + add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" + create_table "subfield_subdomain_dirs", :force => true do |t| t.integer "org_subfield_id" t.string "name" @@ -3681,356 +1672,351 @@ ActiveRecord::Schema.define(:version => 20160112085834) do t.datetime "updated_at", :null => false end - create_table "system_messages", :force => true do |t| - t.integer "user_id" - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "description" - t.string "subject" - end - - create_table "taggings", :force => true do |t| - t.integer "tag_id" - t.integer "taggable_id" - t.string "taggable_type" - t.integer "tagger_id" - t.string "tagger_type" - t.string "context", :limit => 128 - t.datetime "created_at" - end - - add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" - add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" - add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" - - create_table "tags", :force => true do |t| - t.string "name" - end - - create_table "teachers", :force => true do |t| - t.string "tea_name" - t.string "location" - t.integer "couurse_time" - t.integer "course_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "extra" - end - - create_table "temp", :id => false, :force => true do |t| - t.integer "id", :default => 0, :null => false - end - - create_table "time_entries", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - t.integer "issue_id" - t.float "hours", :null => false - t.string "comments" - t.integer "activity_id", :null => false - t.date "spent_on", :null => false - t.integer "tyear", :null => false - t.integer "tmonth", :null => false - t.integer "tweek", :null => false - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" - add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" - add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" - add_index "time_entries", ["project_id"], :name => "time_entries_project_id" - add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" - - create_table "tokens", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.string "action", :limit => 30, :default => "", :null => false - t.string "value", :limit => 40, :default => "", :null => false - t.datetime "created_on", :null => false - end - - add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" - add_index "tokens", ["value"], :name => "tokens_value", :unique => true - - create_table "trackers", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_in_chlog", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "is_in_roadmap", :default => true, :null => false - t.integer "fields_bits", :default => 0 - end - - create_table "user_activities", :force => true do |t| - t.string "act_type" - t.integer "act_id" - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "user_id" - end - - create_table "user_extensions", :force => true do |t| - t.integer "user_id", :null => false - t.date "birthday" - t.string "brief_introduction" - t.integer "gender" - t.string "location" - t.string "occupation" - t.integer "work_experience" - t.integer "zip_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "technical_title" - t.integer "identity" - t.string "student_id" - t.string "teacher_realname" - t.string "student_realname" - t.string "location_city" - t.integer "school_id" - t.string "description", :default => "" - end - - create_table "user_feedback_messages", :force => true do |t| - t.integer "user_id" - t.integer "journals_for_message_id" - t.string "journals_for_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_grades", :force => true do |t| - t.integer "user_id", :null => false - t.integer "project_id", :null => false - t.float "grade", :default => 0.0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" - add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" - add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" - - create_table "user_levels", :force => true do |t| - t.integer "user_id" - t.integer "level" - end - - create_table "user_preferences", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.text "others" - t.boolean "hide_mail", :default => false - t.string "time_zone" - end - - add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" - - create_table "user_score_details", :force => true do |t| - t.integer "current_user_id" - t.integer "target_user_id" - t.string "score_type" - t.string "score_action" - t.integer "user_id" - t.integer "old_score" - t.integer "new_score" - t.integer "current_user_level" - t.integer "target_user_level" - t.integer "score_changeable_obj_id" - t.string "score_changeable_obj_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_scores", :force => true do |t| - t.integer "user_id", :null => false - t.integer "collaboration" - t.integer "influence" - t.integer "skill" - t.integer "active" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "grade", :default => 0.0 - end - - add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" - add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" - add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" - - create_table "users", :force => true do |t| - t.string "login", :default => "", :null => false - t.string "hashed_password", :limit => 40, :default => "", :null => false - t.string "firstname", :limit => 30, :default => "", :null => false - t.string "lastname", :default => "", :null => false - t.string "mail", :limit => 60, :default => "", :null => false - t.boolean "admin", :default => false, :null => false - t.integer "status", :default => 1, :null => false - t.datetime "last_login_on" - t.string "language", :limit => 5, :default => "" - t.integer "auth_source_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "type" - t.string "identity_url" - t.string "mail_notification", :default => "", :null => false - t.string "salt", :limit => 64 - t.integer "gid" - end - - add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" - add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" - add_index "users", ["type"], :name => "index_users_on_type" - - create_table "versions", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :default => "", :null => false - t.string "description", :default => "" - t.date "effective_date" - t.datetime "created_on" - t.datetime "updated_on" - t.string "wiki_page_title" - t.string "status", :default => "open" - t.string "sharing", :default => "none", :null => false - end - - add_index "versions", ["project_id"], :name => "versions_project_id" - add_index "versions", ["sharing"], :name => "index_versions_on_sharing" - - create_table "visitors", :force => true do |t| - t.integer "user_id" - t.integer "master_id" - t.datetime "updated_on" - t.datetime "created_on" - end - - add_index "visitors", ["master_id"], :name => "index_visitors_master_id" - add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" - add_index "visitors", ["user_id"], :name => "index_visitors_user_id" - - create_table "watchers", :force => true do |t| - t.string "watchable_type", :default => "", :null => false - t.integer "watchable_id", :default => 0, :null => false - t.integer "user_id" - end - - add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" - add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" - add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" - - create_table "web_footer_companies", :force => true do |t| - t.string "name" - t.string "logo_size" - t.string "url" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "web_footer_oranizers", :force => true do |t| - t.string "name" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "wiki_content_versions", :force => true do |t| - t.integer "wiki_content_id", :null => false - t.integer "page_id", :null => false - t.integer "author_id" - t.binary "data", :limit => 2147483647 - t.string "compression", :limit => 6, :default => "" - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" - add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" - - create_table "wiki_contents", :force => true do |t| - t.integer "page_id", :null => false - t.integer "author_id" - t.text "text", :limit => 2147483647 - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" - add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" - - create_table "wiki_pages", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title", :null => false - t.datetime "created_on", :null => false - t.boolean "protected", :default => false, :null => false - t.integer "parent_id" - end - - add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" - add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" - add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" - - create_table "wiki_redirects", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title" - t.string "redirects_to" - t.datetime "created_on", :null => false - end - - add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" - add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" - - create_table "wikis", :force => true do |t| - t.integer "project_id", :null => false - t.string "start_page", :null => false - t.integer "status", :default => 1, :null => false - end - - add_index "wikis", ["project_id"], :name => "wikis_project_id" - - create_table "workflows", :force => true do |t| - t.integer "tracker_id", :default => 0, :null => false - t.integer "old_status_id", :default => 0, :null => false - t.integer "new_status_id", :default => 0, :null => false - t.integer "role_id", :default => 0, :null => false - t.boolean "assignee", :default => false, :null => false - t.boolean "author", :default => false, :null => false - t.string "type", :limit => 30 - t.string "field_name", :limit => 30 - t.string "rule", :limit => 30 - end - - add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" - add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" - add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" - add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" - - create_table "works_categories", :force => true do |t| - t.string "category" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "zip_packs", :force => true do |t| - t.integer "user_id" - t.integer "homework_id" - t.string "file_digest" - t.string "file_path" - t.integer "pack_times", :default => 1 - t.integer "pack_size", :default => 0 - t.text "file_digests" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - -end ->>>>>>> 26631e21991a327974a811851282b7535ab10b1d + create_table "system_messages", :force => true do |t| + t.integer "user_id" + t.string "content" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "description" + t.string "subject" + end + + create_table "taggings", :force => true do |t| + t.integer "tag_id" + t.integer "taggable_id" + t.string "taggable_type" + t.integer "tagger_id" + t.string "tagger_type" + t.string "context", :limit => 128 + t.datetime "created_at" + end + + add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" + add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" + add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" + + create_table "tags", :force => true do |t| + t.string "name" + end + + create_table "teachers", :force => true do |t| + t.string "tea_name" + t.string "location" + t.integer "couurse_time" + t.integer "course_code" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "extra" + end + + create_table "time_entries", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + t.integer "issue_id" + t.float "hours", :null => false + t.string "comments" + t.integer "activity_id", :null => false + t.date "spent_on", :null => false + t.integer "tyear", :null => false + t.integer "tmonth", :null => false + t.integer "tweek", :null => false + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" + add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" + add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" + add_index "time_entries", ["project_id"], :name => "time_entries_project_id" + add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" + + create_table "tokens", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.string "action", :limit => 30, :default => "", :null => false + t.string "value", :limit => 40, :default => "", :null => false + t.datetime "created_on", :null => false + end + + add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" + add_index "tokens", ["value"], :name => "tokens_value", :unique => true + + create_table "trackers", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.boolean "is_in_chlog", :default => false, :null => false + t.integer "position", :default => 1 + t.boolean "is_in_roadmap", :default => true, :null => false + t.integer "fields_bits", :default => 0 + end + + create_table "user_activities", :force => true do |t| + t.string "act_type" + t.integer "act_id" + t.string "container_type" + t.integer "container_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "user_id" + end + + create_table "user_extensions", :force => true do |t| + t.integer "user_id", :null => false + t.date "birthday" + t.string "brief_introduction" + t.integer "gender" + t.string "location" + t.string "occupation" + t.integer "work_experience" + t.integer "zip_code" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "technical_title" + t.integer "identity" + t.string "student_id" + t.string "teacher_realname" + t.string "student_realname" + t.string "location_city" + t.integer "school_id" + t.string "description", :default => "" + end + + create_table "user_feedback_messages", :force => true do |t| + t.integer "user_id" + t.integer "journals_for_message_id" + t.string "journals_for_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_grades", :force => true do |t| + t.integer "user_id", :null => false + t.integer "project_id", :null => false + t.float "grade", :default => 0.0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" + add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" + add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" + + create_table "user_levels", :force => true do |t| + t.integer "user_id" + t.integer "level" + end + + create_table "user_preferences", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.text "others" + t.boolean "hide_mail", :default => false + t.string "time_zone" + end + + add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" + + create_table "user_score_details", :force => true do |t| + t.integer "current_user_id" + t.integer "target_user_id" + t.string "score_type" + t.string "score_action" + t.integer "user_id" + t.integer "old_score" + t.integer "new_score" + t.integer "current_user_level" + t.integer "target_user_level" + t.integer "score_changeable_obj_id" + t.string "score_changeable_obj_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_scores", :force => true do |t| + t.integer "user_id", :null => false + t.integer "collaboration" + t.integer "influence" + t.integer "skill" + t.integer "active" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "grade", :default => 0.0 + end + + add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" + add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" + add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" + + create_table "users", :force => true do |t| + t.string "login", :default => "", :null => false + t.string "hashed_password", :limit => 40, :default => "", :null => false + t.string "firstname", :limit => 30, :default => "", :null => false + t.string "lastname", :default => "", :null => false + t.string "mail", :limit => 60, :default => "", :null => false + t.boolean "admin", :default => false, :null => false + t.integer "status", :default => 1, :null => false + t.datetime "last_login_on" + t.string "language", :limit => 5, :default => "" + t.integer "auth_source_id" + t.datetime "created_on" + t.datetime "updated_on" + t.string "type" + t.string "identity_url" + t.string "mail_notification", :default => "", :null => false + t.string "salt", :limit => 64 + t.integer "gid" + end + + add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" + add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" + add_index "users", ["type"], :name => "index_users_on_type" + + create_table "versions", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "name", :default => "", :null => false + t.string "description", :default => "" + t.date "effective_date" + t.datetime "created_on" + t.datetime "updated_on" + t.string "wiki_page_title" + t.string "status", :default => "open" + t.string "sharing", :default => "none", :null => false + end + + add_index "versions", ["project_id"], :name => "versions_project_id" + add_index "versions", ["sharing"], :name => "index_versions_on_sharing" + + create_table "visitors", :force => true do |t| + t.integer "user_id" + t.integer "master_id" + t.datetime "updated_on" + t.datetime "created_on" + end + + add_index "visitors", ["master_id"], :name => "index_visitors_master_id" + add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" + add_index "visitors", ["user_id"], :name => "index_visitors_user_id" + + create_table "watchers", :force => true do |t| + t.string "watchable_type", :default => "", :null => false + t.integer "watchable_id", :default => 0, :null => false + t.integer "user_id" + end + + add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" + add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" + add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" + + create_table "web_footer_companies", :force => true do |t| + t.string "name" + t.string "logo_size" + t.string "url" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "web_footer_oranizers", :force => true do |t| + t.string "name" + t.text "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "wiki_content_versions", :force => true do |t| + t.integer "wiki_content_id", :null => false + t.integer "page_id", :null => false + t.integer "author_id" + t.binary "data", :limit => 2147483647 + t.string "compression", :limit => 6, :default => "" + t.string "comments", :default => "" + t.datetime "updated_on", :null => false + t.integer "version", :null => false + end + + add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" + add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" + + create_table "wiki_contents", :force => true do |t| + t.integer "page_id", :null => false + t.integer "author_id" + t.text "text", :limit => 2147483647 + t.string "comments", :default => "" + t.datetime "updated_on", :null => false + t.integer "version", :null => false + end + + add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" + add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" + + create_table "wiki_pages", :force => true do |t| + t.integer "wiki_id", :null => false + t.string "title", :null => false + t.datetime "created_on", :null => false + t.boolean "protected", :default => false, :null => false + t.integer "parent_id" + end + + add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" + add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" + add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" + + create_table "wiki_redirects", :force => true do |t| + t.integer "wiki_id", :null => false + t.string "title" + t.string "redirects_to" + t.datetime "created_on", :null => false + end + + add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" + add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" + + create_table "wikis", :force => true do |t| + t.integer "project_id", :null => false + t.string "start_page", :null => false + t.integer "status", :default => 1, :null => false + end + + add_index "wikis", ["project_id"], :name => "wikis_project_id" + + create_table "workflows", :force => true do |t| + t.integer "tracker_id", :default => 0, :null => false + t.integer "old_status_id", :default => 0, :null => false + t.integer "new_status_id", :default => 0, :null => false + t.integer "role_id", :default => 0, :null => false + t.boolean "assignee", :default => false, :null => false + t.boolean "author", :default => false, :null => false + t.string "type", :limit => 30 + t.string "field_name", :limit => 30 + t.string "rule", :limit => 30 + end + + add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" + add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" + add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" + add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" + + create_table "works_categories", :force => true do |t| + t.string "category" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "zip_packs", :force => true do |t| + t.integer "user_id" + t.integer "homework_id" + t.string "file_digest" + t.string "file_path" + t.integer "pack_times", :default => 1 + t.integer "pack_size", :default => 0 + t.text "file_digests" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + +end From 62c2085d61df6c7f5c6f5e26c106ad1b462b2487 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 15 Jan 2016 22:45:16 +0800 Subject: [PATCH 002/209] merge --- db/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/schema.rb b/db/schema.rb index 2e0e4d238..5d1d51c13 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160114022928) do +ActiveRecord::Schema.define(:version => 20160115023749) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false From 744b2469307d912915edac88c953547cd479da2d Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 15 Jan 2016 23:15:06 +0800 Subject: [PATCH 003/209] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/wechat.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/wechat.yml b/config/wechat.yml index af795654f..20b6382c3 100644 --- a/config/wechat.yml +++ b/config/wechat.yml @@ -1,14 +1,14 @@ default: &default - corpid: "corpid" - corpsecret: "corpsecret" - agentid: 1 +# corpid: "corpid" +# corpsecret: "corpsecret" +# agentid: 1 # Or if using public account, only need above two line -# appid: "my_appid" -# secret: "my_secret" - token: "my_token" + appid: "wxc09454f171153c2d" + secret: "dff5b606e34dcafe24163ec82c2715f8" + token: "123456" access_token: "1234567" encrypt_mode: true # if true must fill encoding_aes_key - encoding_aes_key: "TJP8IMYwdcW1EkBIKIcQ193bCe7uB0RVqZDC2eAmkjz" + encoding_aes_key: "QyocNOkRmrT5HzBpCG54EVPUQjk86nJapXNVDQm6Yy6" jsapi_ticket: "C:/Users/[user_name]/wechat_jsapi_ticket" production: From 932b0923b19da204daf743b5b569299abfe11453 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 15 Jan 2016 23:49:03 +0800 Subject: [PATCH 004/209] change wechat to guange2015 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 0e4e456ca..d8d148ec3 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ unless RUBY_PLATFORM =~ /w32/ gem 'iconv' end -gem 'wechat' +gem 'wechat',git: 'https://github.com/guange2015/wechat.git' gem 'grack', path:'lib/grack' gem 'gitlab', path: 'lib/gitlab-cli' gem 'rest-client' From 5f6a3cac04c05c1180b002350c441be98590dbad Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 16 Jan 2016 11:54:59 +0800 Subject: [PATCH 005/209] wechat init --- app/views/wechats/create.html.erb | 0 config/routes.rb | 2 ++ db/migrate/20160116034925_create_wechat_logs.rb | 11 +++++++++++ db/schema.rb | 10 +++++++++- 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 app/views/wechats/create.html.erb create mode 100644 db/migrate/20160116034925_create_wechat_logs.rb diff --git a/app/views/wechats/create.html.erb b/app/views/wechats/create.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/config/routes.rb b/config/routes.rb index 5bccb915c..02f611677 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -27,6 +27,8 @@ RedmineApp::Application.routes.draw do + resource :wechat, only: [:show, :create] + mount Mobile::API => '/api' # Enable Grack support diff --git a/db/migrate/20160116034925_create_wechat_logs.rb b/db/migrate/20160116034925_create_wechat_logs.rb new file mode 100644 index 000000000..a60c68f9f --- /dev/null +++ b/db/migrate/20160116034925_create_wechat_logs.rb @@ -0,0 +1,11 @@ +class CreateWechatLogs < ActiveRecord::Migration + def change + create_table :wechat_logs do |t| + t.string :openid, null: false, index: true + t.text :request_raw + t.text :response_raw + t.text :session_raw + t.datetime :created_at, null: false + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 5d1d51c13..6de03ed54 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160115023749) do +ActiveRecord::Schema.define(:version => 20160116034925) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -1928,6 +1928,14 @@ ActiveRecord::Schema.define(:version => 20160115023749) do t.datetime "updated_at", :null => false end + create_table "wechat_logs", :force => true do |t| + t.string "openid", :null => false + t.text "request_raw" + t.text "response_raw" + t.text "session_raw" + t.datetime "created_at", :null => false + end + create_table "wiki_content_versions", :force => true do |t| t.integer "wiki_content_id", :null => false t.integer "page_id", :null => false From 080cc71912889598bc653abac45c4e44295cac98 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 16 Jan 2016 11:59:09 +0800 Subject: [PATCH 006/209] =?UTF-8?q?wechat=20=E8=B7=AF=E7=94=B1=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/routes.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 02f611677..aa97e84e5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -26,9 +26,6 @@ # Example: :via => :get ====> :via => :get RedmineApp::Application.routes.draw do - - resource :wechat, only: [:show, :create] - mount Mobile::API => '/api' # Enable Grack support From 9f667588c45b61481d6a1d1eb47878ece4cacb5d Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 11:50:59 +0800 Subject: [PATCH 007/209] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/menu.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 config/menu.yml diff --git a/config/menu.yml b/config/menu.yml new file mode 100644 index 000000000..1a4927fbd --- /dev/null +++ b/config/menu.yml @@ -0,0 +1,9 @@ +button: + - + type: "click" + name: "最新动态" + key: "MY_NEWS" + - + type: "view" + name: "进入网站" + url: "http://www.trustie.net/" \ No newline at end of file From 40047ff81866b042c086f36da71ef3666d90fc9c Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 11:51:26 +0800 Subject: [PATCH 008/209] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index fd3050e05..880b5d6de 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -54,6 +54,14 @@ class WechatsController < ActionController::Base end end + on :click, with: 'MY_NEWS' do |request, key| + + news = (1..count.to_i).each_with_object([]) { |n, memo| memo << { title: 'News title', content: "No. #{n} news content" } } + request.reply.news(news) do |article, n, index| # article is return object + article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'http://www.baidu.com/img/bdlogo.gif', url: 'http://www.baidu.com/' + end + end + # When user click the menu button on :click, with: 'BOOK_LUNCH' do |request, key| request.reply.text "User: #{request[:FromUserName]} click #{key}" From 08e193ea3cbca918e4cd0bea3eb9909a67d5216e Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 11:51:37 +0800 Subject: [PATCH 009/209] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user_wechat.rb | 3 +++ .../20160119034447_create_user_wechats.rb | 21 +++++++++++++++++++ db/schema.rb | 21 ++++++++++++++++++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 app/models/user_wechat.rb create mode 100644 db/migrate/20160119034447_create_user_wechats.rb diff --git a/app/models/user_wechat.rb b/app/models/user_wechat.rb new file mode 100644 index 000000000..f77e3273d --- /dev/null +++ b/app/models/user_wechat.rb @@ -0,0 +1,3 @@ +class UserWechat < ActiveRecord::Base + # attr_accessible :title, :body +end diff --git a/db/migrate/20160119034447_create_user_wechats.rb b/db/migrate/20160119034447_create_user_wechats.rb new file mode 100644 index 000000000..e2170f0c1 --- /dev/null +++ b/db/migrate/20160119034447_create_user_wechats.rb @@ -0,0 +1,21 @@ +class CreateUserWechats < ActiveRecord::Migration + def change + create_table :user_wechats do |t| + t.integer :subscribe + t.string :openid + t.string :nickname + t.integer :sex + t.string :language + t.string :city + t.string :province + t.string :country + t.string :headimgurl + t.string :subscribe_time + t.string :unionid + t.string :remark + t.integer :groupid + t.references :user + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 6de03ed54..a7b2af8b2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160116034925) do +ActiveRecord::Schema.define(:version => 20160119034447) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -1853,6 +1853,25 @@ ActiveRecord::Schema.define(:version => 20160116034925) do add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" + create_table "user_wechats", :force => true do |t| + t.integer "subscribe" + t.string "openid" + t.string "nickname" + t.integer "sex" + t.string "language" + t.string "city" + t.string "province" + t.string "country" + t.string "headimgurl" + t.string "subscribe_time" + t.string "unionid" + t.string "remark" + t.integer "groupid" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "users", :force => true do |t| t.string "login", :default => "", :null => false t.string "hashed_password", :limit => 40, :default => "", :null => false From 571196ad2d198f2c97f9b9a14c622c7958883dd3 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 12:00:13 +0800 Subject: [PATCH 010/209] =?UTF-8?q?wechat=20model=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 1 + app/models/user_wechat.rb | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index f3367db59..4a30fcaf0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -179,6 +179,7 @@ class User < Principal ##### has_many :shares ,:dependent => :destroy + has_one :user_wechat # add by zjc has_one :level, :class_name => 'UserLevels', :dependent => :destroy diff --git a/app/models/user_wechat.rb b/app/models/user_wechat.rb index f77e3273d..446655afd 100644 --- a/app/models/user_wechat.rb +++ b/app/models/user_wechat.rb @@ -1,3 +1,6 @@ class UserWechat < ActiveRecord::Base - # attr_accessible :title, :body + attr_accessible :subscribe, :openid, :nickname, :sex, :language, :city, :province, :country, + :headimgurl, :subscribe_time, :unionid, :remark, :groupid, :user + + belongs_to :user end From 96d0b2e717fb345aaff60f88b29f31bdef172699 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 14:07:59 +0800 Subject: [PATCH 011/209] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 38 +++++++++++++++++++++------ config/routes.rb | 8 ++++-- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 880b5d6de..24de889a8 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -1,6 +1,8 @@ class WechatsController < ActionController::Base wechat_responder + + # default text responder when no other match on :text do |request, content| request.reply.text "echo: #{content}" # Just echo @@ -54,14 +56,6 @@ class WechatsController < ActionController::Base end end - on :click, with: 'MY_NEWS' do |request, key| - - news = (1..count.to_i).each_with_object([]) { |n, memo| memo << { title: 'News title', content: "No. #{n} news content" } } - request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'http://www.baidu.com/img/bdlogo.gif', url: 'http://www.baidu.com/' - end - end - # When user click the menu button on :click, with: 'BOOK_LUNCH' do |request, key| request.reply.text "User: #{request[:FromUserName]} click #{key}" @@ -124,4 +118,32 @@ class WechatsController < ActionController::Base # Any not match above will fail to below on :fallback, respond: 'fallback message' + + on :click, with: 'MY_NEWS' do |request, key| + if user_binded? + news = (1..count.to_i).each_with_object([]) { |n, memo| memo << { title: 'News title', content: "No. #{n} news content" } } + request.reply.news(news) do |article, n, index| # article is return object + article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'http://www.baidu.com/img/bdlogo.gif', url: 'http://www.baidu.com/' + end + else + news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } + request.reply.news(news) do |article, n, index| # article is return object + article.item title: "#{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo1.png', url: login_wechat_path + end + end + end + + def bind + + end + + def login + + end + + private + def user_binded? + openid = request[:FromUserName] + uw = UserWechat.where(:openid, open).first + end end diff --git a/config/routes.rb b/config/routes.rb index aa97e84e5..3ed832368 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1122,8 +1122,12 @@ RedmineApp::Application.routes.draw do end resources :at - - resource :wechat, only:[:show, :create] + resource :wechat, only:[:show, :create] do + collection do + get :login + post :bind + end + end Dir.glob File.expand_path("plugins/*", Rails.root) do |plugin_dir| file = File.join(plugin_dir, "config/routes.rb") From 8e66ab6a41c1a97cadf88403bf00abb3eab4bbf3 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 14:28:13 +0800 Subject: [PATCH 012/209] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20bind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 17 ++++++++++---- app/views/wechats/login.html.erb | 32 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 app/views/wechats/login.html.erb diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 24de889a8..40c7d5ff5 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -1,8 +1,6 @@ class WechatsController < ActionController::Base wechat_responder - - # default text responder when no other match on :text do |request, content| request.reply.text "echo: #{content}" # Just echo @@ -134,11 +132,22 @@ class WechatsController < ActionController::Base end def bind - + begin + raise "非法操作, 微信ID不存在" unless params[:openid] + user, last_login_on = User.try_to_login(params[:username], params[:password]) + raise "用户名或密码错误,请重新登录" unless user + #补全用户信息 + puts wechat.user(request[:openid]) + user.user_wechat = UserWechat.new(openid: params[:openid]) + user.save! + rescue Exception=>e + @wechat_bind_errors = e.message + render :login + end end def login - + @openid = request[:FromUserName] #TODO 安全性 end private diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb new file mode 100644 index 000000000..44fc1da32 --- /dev/null +++ b/app/views/wechats/login.html.erb @@ -0,0 +1,32 @@ +
+
+

+ <%= @wechat_bind_errors %> +

+
+ <%= form_tag(bind_wechat_path,:id=>'main_login_form',:method=>'post') do %> + +
+ <%= text_field_tag 'username', params[:username], :tabindex => '1' , + :class=>'loginSignBox',:placeholder=>'请输入邮箱地址或昵称', :onkeypress => "user_name_keypress(event);"%> + +
+ <% if Setting.openid? %> +
+ <%= text_field_tag "openid_url", nil, :tabindex => '3',:placeholder=>'请输入OpenId URL' %> +
+ <% end %> +
+ + <%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码', :onkeypress => "user_name_keypress(event);"%> +
+ + + +
+ <%= submit_tag '绑定' %> +
+ + <% end %> + +
\ No newline at end of file From 80feca0c8c7628df2541505214c7c48c25f8dfe8 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 14:32:22 +0800 Subject: [PATCH 013/209] . --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 40c7d5ff5..9231bb77c 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -153,6 +153,6 @@ class WechatsController < ActionController::Base private def user_binded? openid = request[:FromUserName] - uw = UserWechat.where(:openid, open).first + uw = UserWechat.where(:openid => open).first end end From 2681cc97ddca4da513360dd5c069938ce6b24645 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 14:39:31 +0800 Subject: [PATCH 014/209] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=89=8D=E5=85=88=E5=BD=95=E5=85=A5=E7=94=A8=E6=88=B7=E8=B5=84?= =?UTF-8?q?=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 9231bb77c..75fba6082 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -124,9 +124,11 @@ class WechatsController < ActionController::Base article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'http://www.baidu.com/img/bdlogo.gif', url: 'http://www.baidu.com/' end else + openid = request[:FromUserName] + puts wechat.user(request[:openid]) news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo1.png', url: login_wechat_path + article.item title: "#{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo1.png', url: login_wechat_url end end end @@ -137,7 +139,7 @@ class WechatsController < ActionController::Base user, last_login_on = User.try_to_login(params[:username], params[:password]) raise "用户名或密码错误,请重新登录" unless user #补全用户信息 - puts wechat.user(request[:openid]) + user.user_wechat = UserWechat.new(openid: params[:openid]) user.save! rescue Exception=>e From 0b1b8a4fcd8030d276eba4b9fb126f326f5559be Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 14:40:39 +0800 Subject: [PATCH 015/209] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20bind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 75fba6082..dc3804bf8 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -155,6 +155,6 @@ class WechatsController < ActionController::Base private def user_binded? openid = request[:FromUserName] - uw = UserWechat.where(:openid => open).first + uw = UserWechat.where(openid: openid).first end end From 527b695fabd89abe5cee5215eca85ddd26c87186 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 14:46:16 +0800 Subject: [PATCH 016/209] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20bind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index dc3804bf8..017886194 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -125,10 +125,12 @@ class WechatsController < ActionController::Base end else openid = request[:FromUserName] - puts wechat.user(request[:openid]) + attrs = wechat.user(openid) + UserWechat.delete_all(openid: openid) + uw = UserWechat.create!(attrs) news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo1.png', url: login_wechat_url + article.item title: "#{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo1.png', url: login_wechat_url(openid: uw.id) end end end @@ -140,7 +142,7 @@ class WechatsController < ActionController::Base raise "用户名或密码错误,请重新登录" unless user #补全用户信息 - user.user_wechat = UserWechat.new(openid: params[:openid]) + user.user_wechat = UserWechat.find_by_id(params[:openid]) user.save! rescue Exception=>e @wechat_bind_errors = e.message From 349f511c1210fbc56a759f3a7a2ea0b9d371184d Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 14:56:52 +0800 Subject: [PATCH 017/209] =?UTF-8?q?=E5=BC=80=E5=8F=91=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E4=B8=8D=E8=A6=81=E5=BC=849200=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 4a30fcaf0..502f521d1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1163,17 +1163,17 @@ class User < Principal def create_user_ealasticsearch_index if self.id != 2 && self.id != 4 - self.__elasticsearch__.index_document + self.__elasticsearch__.index_document if Rails.env.production? end end def update_user_ealasticsearch_index if self.id != 2 && self.id != 4 - self.__elasticsearch__.update_document + self.__elasticsearch__.update_document if Rails.env.production? end end def delete_user_ealasticsearch_index if self.id != 2 && self.id != 4 - self.__elasticsearch__.delete_document + self.__elasticsearch__.delete_document if Rails.env.production? end end From babf30af0ae7fbb3cc63c6093bf1bacc8a4cbf00 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 15:06:40 +0800 Subject: [PATCH 018/209] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 5 +++-- app/views/wechats/bind.html.erb | 14 ++++++++++++++ app/views/wechats/login.html.erb | 15 ++++++++++++++- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 app/views/wechats/bind.html.erb diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 017886194..a83969d39 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -142,8 +142,9 @@ class WechatsController < ActionController::Base raise "用户名或密码错误,请重新登录" unless user #补全用户信息 - user.user_wechat = UserWechat.find_by_id(params[:openid]) - user.save! + uw = UserWechat.find_by_id(params[:openid]) + uw.user = user + uw.save! rescue Exception=>e @wechat_bind_errors = e.message render :login diff --git a/app/views/wechats/bind.html.erb b/app/views/wechats/bind.html.erb new file mode 100644 index 000000000..e569162b2 --- /dev/null +++ b/app/views/wechats/bind.html.erb @@ -0,0 +1,14 @@ + + + + Ruby China + + + + + + +

恭喜! 绑定成功.

+ + + \ No newline at end of file diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index 44fc1da32..cbc476f26 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -1,3 +1,13 @@ + + + + Ruby China + + + + + +

@@ -29,4 +39,7 @@ <% end %> -

\ No newline at end of file +
+ + + \ No newline at end of file From f098e5358da34be6f0df2106d2c8b4b3d6830fc9 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 15:12:00 +0800 Subject: [PATCH 019/209] =?UTF-8?q?openid=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index a83969d39..7f589124d 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -152,7 +152,7 @@ class WechatsController < ActionController::Base end def login - @openid = request[:FromUserName] #TODO 安全性 + @openid = params[:openid] #TODO 安全性 end private From 3a0f98ebea5f316c86b9f487b8a5f640c0b65f64 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 15:17:56 +0800 Subject: [PATCH 020/209] =?UTF-8?q?openid=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 7f589124d..3cf0664e4 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -118,7 +118,7 @@ class WechatsController < ActionController::Base on :fallback, respond: 'fallback message' on :click, with: 'MY_NEWS' do |request, key| - if user_binded? + if user_binded?(request[:FromUserName]) news = (1..count.to_i).each_with_object([]) { |n, memo| memo << { title: 'News title', content: "No. #{n} news content" } } request.reply.news(news) do |article, n, index| # article is return object article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'http://www.baidu.com/img/bdlogo.gif', url: 'http://www.baidu.com/' @@ -156,8 +156,7 @@ class WechatsController < ActionController::Base end private - def user_binded? - openid = request[:FromUserName] + def user_binded?(openid) uw = UserWechat.where(openid: openid).first end end From 7f5bb11a5f28cb448995bda653f1c5fa4e87faa3 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 15:25:36 +0800 Subject: [PATCH 021/209] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E5=90=8E=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 3cf0664e4..993007308 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -118,10 +118,15 @@ class WechatsController < ActionController::Base on :fallback, respond: 'fallback message' on :click, with: 'MY_NEWS' do |request, key| - if user_binded?(request[:FromUserName]) - news = (1..count.to_i).each_with_object([]) { |n, memo| memo << { title: 'News title', content: "No. #{n} news content" } } + uw = user_binded?(request[:FromUserName]) + if uw + ua = UserActivity.where(user_id: uw.user.id).order("id desc").limit(5) + news = ua.map do |ua| + {title: "act_type: #{ua.act_type}, act_id: #{ua.act_id}", content: "container_id: #{ua.container_id}, container_type: #{ua.container_type}"} + end + request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'http://www.baidu.com/img/bdlogo.gif', url: 'http://www.baidu.com/' + article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo1.png', url: 'http://www.baidu.com/' end else openid = request[:FromUserName] From f39631169d9cd1e0e29f5fc52cc1abd07ec0caee Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 19 Jan 2016 15:29:03 +0800 Subject: [PATCH 022/209] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E5=90=8E=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- app/models/user_wechat.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 993007308..34dd2e79a 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -148,7 +148,7 @@ class WechatsController < ActionController::Base #补全用户信息 uw = UserWechat.find_by_id(params[:openid]) - uw.user = user + uw.user_id = user.id uw.save! rescue Exception=>e @wechat_bind_errors = e.message diff --git a/app/models/user_wechat.rb b/app/models/user_wechat.rb index 446655afd..49053dbf0 100644 --- a/app/models/user_wechat.rb +++ b/app/models/user_wechat.rb @@ -1,6 +1,6 @@ class UserWechat < ActiveRecord::Base attr_accessible :subscribe, :openid, :nickname, :sex, :language, :city, :province, :country, - :headimgurl, :subscribe_time, :unionid, :remark, :groupid, :user + :headimgurl, :subscribe_time, :unionid, :remark, :groupid, :user, :user_id belongs_to :user end From 3f867a7f83a71d4d9fc5506adac71a1884c02c2e Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 21:40:56 +0800 Subject: [PATCH 023/209] =?UTF-8?q?=E6=B7=BB=E5=8A=A0weui=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/weui/weui.min.css | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 public/stylesheets/weui/weui.min.css diff --git a/public/stylesheets/weui/weui.min.css b/public/stylesheets/weui/weui.min.css new file mode 100644 index 000000000..7b75fa7dd --- /dev/null +++ b/public/stylesheets/weui/weui.min.css @@ -0,0 +1,5 @@ +/*! + * WeUI v0.2.2 (https://github.com/weui/weui) + * Copyright 2016 Tencent, Inc. + * Licensed under the MIT license + */.weui_input,.weui_select,.weui_switch{-webkit-appearance:none}.weui_btn,.weui_btn:after,.weui_grid,.weui_switch{box-sizing:border-box}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{line-height:1.6;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}*{margin:0;padding:0}a img{border:0}a{text-decoration:none}@font-face{font-weight:400;font-style:normal;font-family:weui;src:url(data:application/octet-stream;base64,d09GRgABAAAAAA8oAA4AAAAAGewAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABRAAAAEQAAABWQClLhWNtYXAAAAGIAAAAOgAAAUrUIBe2Y3Z0IAAAAcQAAAAKAAAACgAAAABmcGdtAAAB0AAABZQAAAtwiJCQWWdhc3AAAAdkAAAACAAAAAgAAAAQZ2x5ZgAAB2wAAASuAAAHEkoVOHVoZWFkAAAMHAAAADUAAAA2CDTIZ2hoZWEA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AxNDMgMzIwIDMyMHMtMTQzIDMyMC0zMjAgMzIwLTMyMC0xNDMtMzIwLTMyMCAxNDMtMzIwIDMyMC0zMjB6IiBob3Jpei1hZHYteD0iMTAwMCIgLz4KPC9mb250Pgo8L2RlZnM+Cjwvc3ZnPg==) format('svg')}[class*=" weui_icon_"]:before,[class^=weui_icon_]:before{font-family:weui;font-style:normal;font-weight:400;speak:none;display:inline-block;vertical-align:middle;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin:0}.weui_btn,.weui_dialog_ft a{text-decoration:none;-webkit-tap-highlight-color:transparent}.weui_icon_circle:before{content:"\EA01"}.weui_icon_download:before{content:"\EA02"}.weui_icon_info:before{content:"\EA03"}.weui_icon_safe_success:before{content:"\EA04"}.weui_icon_safe_warn:before{content:"\EA05"}.weui_icon_success:before{content:"\EA06";font-size:23px;color:#09BB07}.weui_icon_success_circle:before{content:"\EA07"}.weui_icon_success_no_circle:before{content:"\EA08"}.weui_icon_waiting:before{content:"\EA09";font-size:23px;color:#10AEFF}.weui_icon_waiting_circle:before{content:"\EA0A"}.weui_icon_warn:before{content:"\EA0B";font-size:23px;color:#F43530}.weui_icon_info_circle:before{content:"\EA0C"}.weui_icon_cancel:before{content:"\EA0D"}.weui_icon_info:before{font-size:23px;color:#10AEFF}.weui_icon_success_circle:before,.weui_icon_success_no_circle:before{font-size:23px;color:#09BB07}.weui_icon_waiting_circle:before{font-size:23px;color:#10AEFF}.weui_icon_circle:before{font-size:23px;color:#C9C9C9}.weui_icon_download:before,.weui_icon_info_circle:before{font-size:23px;color:#09BB07}.weui_icon_safe_success:before{color:#09BB07}.weui_icon_safe_warn:before{color:#FFBE00}.weui_icon_cancel:before{color:#F43530;font-size:22px}.weui_icon_search:before{content:"\EA0E";color:#B2B2B2;font-size:14px}.weui_icon_msg:before,.weui_icon_safe:before{font-size:104px}.weui_icon_warn.weui_icon_msg:before{color:#F76260}.weui_btn.weui_btn_mini{line-height:1.9;font-size:14px;padding:0 .75em;display:inline-block}button.weui_btn,input.weui_btn{width:100%;border-width:0;outline:0;-webkit-appearance:none}button.weui_btn:focus,input.weui_btn:focus{outline:0}button.weui_btn_inline,button.weui_btn_mini,input.weui_btn_inline,input.weui_btn_mini{width:auto}.weui_btn+.weui_btn{margin-top:15px}.weui_btn.weui_btn_inline+.weui_btn.weui_btn_inline{margin-top:auto;margin-left:15px}.weui_btn_area{margin:1.17647059em 15px .3em}.weui_btn_area.weui_btn_area_inline{-webkit-display:-webkit-box;-webkit-display:-webkit-flex;display:-webkit-box;display:-ms-flexbox;display:flex}.weui_btn_area.weui_btn_area_inline .weui_btn{margin-top:auto;margin-right:15px;width:100%;-webkit-flex:1;-webkit-box-flex:1;-ms-flex:1;flex:1}.weui_btn_area.weui_btn_area_inline .weui_btn:last-child{margin-right:0}.weui_btn{position:relative;display:block;margin-left:auto;margin-right:auto;padding-left:14px;padding-right:14px;font-size:18px;text-align:center;color:#FFF;line-height:2.33333333;border-radius:5px;overflow:hidden}.weui_btn:after,.weui_cell:before{content:" ";position:absolute}.weui_btn:after{width:200%;height:200%;top:0;left:0;border:1px solid rgba(0,0,0,.2);-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;border-radius:10px}.weui_btn.weui_btn_inline{display:inline-block}.weui_btn_default{background-color:#F7F7F7;color:#454545}.weui_btn_default:not(.weui_btn_disabled):visited{color:#454545}.weui_btn_default:not(.weui_btn_disabled):active{color:#A1A1A1;background-color:#DEDEDE}.weui_btn_primary{background-color:#04BE02}.weui_btn_primary:not(.weui_btn_disabled):visited{color:#FFF}.weui_btn_primary:not(.weui_btn_disabled):active{color:rgba(255,255,255,.4);background-color:#039702}.weui_btn_warn{background-color:#EF4F4F}.weui_btn_warn:not(.weui_btn_disabled):visited{color:#FFF}.weui_btn_warn:not(.weui_btn_disabled):active{color:rgba(255,255,255,.4);background-color:#C13E3E}.weui_btn_disabled{color:rgba(255,255,255,.6)}.weui_btn_disabled.weui_btn_default{color:#C9C9C9}.weui_btn_plain_primary{color:#04BE02;border:1px solid #04BE02}button.weui_btn_plain_primary,input.weui_btn_plain_primary{border-width:1px;background-color:transparent}.weui_btn_plain_primary:active{border-color:#039702}.weui_btn_plain_primary:after{border-width:0}.weui_btn_plain_default{color:#5A5A5A;border:1px solid #5A5A5A}button.weui_btn_plain_default,input.weui_btn_plain_default{border-width:1px;background-color:transparent}.weui_btn_plain_default:after{border-width:0}.weui_cell:before,.weui_cells:before{top:0;border-top:1px solid #D9D9D9;-webkit-transform:scaleY(.5);-ms-transform:scaleY(.5)}.weui_cell:before{width:100%;height:1px;color:#D9D9D9;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;transform:scaleY(.5);left:15px}.weui_cells:before,.weui_grids:before{-webkit-transform-origin:0 0;-ms-transform-origin:0 0}.weui_cell:first-child:before{display:none}.weui_cells{margin-top:1.17647059em;background-color:#FFF;line-height:1.41176471;font-size:17px;overflow:hidden;position:relative}.weui_cells_access .weui_cell:not(.no_access):active,.weui_cells_checkbox .weui_cell:active,.weui_cells_radio .weui_cell:active{background-color:#ECECEC}.weui_cells_tips,.weui_cells_title{padding-left:15px;padding-right:15px;font-size:14px}.weui_cells:after,.weui_cells:before{position:absolute;left:0;width:100%;height:1px;color:#D9D9D9;content:" "}.weui_cells:before{transform-origin:0 0;transform:scaleY(.5)}.weui_cells:after{bottom:0;border-bottom:1px solid #D9D9D9;-webkit-transform-origin:0 100%;-ms-transform-origin:0 100%;transform-origin:0 100%;-webkit-transform:scaleY(.5);-ms-transform:scaleY(.5);transform:scaleY(.5)}.weui_cells_title{margin-top:.77em;margin-bottom:.3em;color:#888}.weui_cells_title+.weui_cells{margin-top:0}.weui_cells_tips{margin-top:.3em;color:#888}.weui_cell{padding:10px 15px;position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.weui_cell_ft{text-align:right;color:#888}.weui_cell_primary{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.weui_cells_access .weui_cell:not(.no_access){-webkit-tap-highlight-color:transparent}.weui_cells_access a.weui_cell{color:inherit}.weui_cells_access .weui_cell_ft:after{content:" ";display:inline-block;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);height:6px;width:6px;border-width:2px 2px 0 0;border-color:#C8C8CD;border-style:solid;position:relative;top:-2px;top:-1px;margin-left:.3em}.weui_check_label{-webkit-tap-highlight-color:transparent}.weui_check{position:absolute;left:-9999em}.weui_cells_radio .weui_cell_ft{padding-left:.35em}.weui_cells_radio .weui_check:checked+.weui_icon_checked:before{content:'\EA08';color:#09BB07;font-size:16px}.weui_cells_checkbox .weui_cell_hd{padding-right:.35em}.weui_cells_checkbox .weui_icon_checked:before{content:'\EA01';color:#C9C9C9;font-size:23px;display:block}.weui_cells_checkbox .weui_check:checked+.weui_icon_checked:before{content:'\EA06';color:#09BB07}.weui_input,.weui_textarea{border:0;color:inherit;outline:0}.weui_label{display:block;width:3em}.weui_input{width:100%;background-color:transparent;font-size:inherit;height:1.41176471em;line-height:1.41176471}.weui_input::-webkit-inner-spin-button,.weui_input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.weui_textarea{display:block;resize:none;width:100%;font-size:1em;line-height:inherit}.weui_textarea_counter{color:#B2B2B2;text-align:right}.weui_dialog,.weui_grid_label,.weui_msg,.weui_toptips{text-align:center}.weui_cell_warn .weui_textarea_counter{color:#E64340}.weui_toptips{display:none;position:fixed;-webkit-transform:translateZ(0);width:100%;top:0;line-height:2.3;font-size:14px;color:#FFF;z-index:2}.weui_toptips.weui_warn{background-color:#E64340}.weui_cells_form .weui_cell_warn{color:#E64340}.weui_cells_form .weui_cell_warn .weui_icon_warn{display:inline-block}.weui_cells_form .weui_cell_hd{padding-right:.3em}.weui_cells_form .weui_cell_ft{font-size:0}.weui_cells_form .weui_icon_warn{display:none}.weui_cell_select .weui_cell_bd:after,.weui_select_before .weui_cell_hd:before{content:" ";display:inline-block;margin-top:-3px}.weui_cell_select{padding:0}.weui_select,.weui_select_after,.weui_select_before .weui_cell_bd{padding-left:15px}.weui_cell_select .weui_select{padding-right:30px}.weui_cell_select .weui_cell_bd:after{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);height:6px;width:6px;border-width:2px 2px 0 0;border-color:#C8C8CD;border-style:solid;position:absolute;top:50%;right:15px}.weui_grid:before,.weui_select_before .weui_cell_hd:after{-webkit-transform-origin:0 100%;-ms-transform-origin:0 100%}.weui_select,.weui_select_before .weui_cell_hd{position:relative}.weui_select{border:0;outline:0;background-color:transparent;width:100%;font-size:inherit;height:44px;z-index:1}.weui_select_before{padding-right:15px}.weui_select_before .weui_select{width:auto}.weui_select_before .weui_cell_hd:after{content:" ";position:absolute;right:0;top:0;width:1px;height:100%;border-right:1px solid #D9D9D9;color:#D9D9D9;transform-origin:0 100%;-webkit-transform:scaleX(.5);-ms-transform:scaleX(.5);transform:scaleX(.5)}.weui_select_before .weui_cell_hd:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);height:6px;width:6px;border-width:2px 2px 0 0;border-color:#C8C8CD;border-style:solid;position:absolute;top:50%;right:15px}.weui_select_before .weui_cell_bd:after{display:none}.weui_vcode{padding-top:0;padding-right:0;padding-bottom:0}.weui_vcode .weui_cell_ft img{margin-left:5px;height:44px;vertical-align:middle}.weui_cell_switch{padding-top:6px;padding-bottom:6px}.weui_switch{-moz-appearance:none;appearance:none;position:relative;width:52px;height:32px;border:1px solid #DFDFDF;outline:0;border-radius:16px;background:#DFDFDF}.weui_switch:after,.weui_switch:before{position:absolute;height:30px;border-radius:15px;top:0;left:0;content:" "}.weui_switch:before{width:50px;background-color:#FDFDFD;-webkit-transition:-webkit-transform .3s;transition:transform .3s}.weui_switch:after{width:30px;background-color:#FFF;box-shadow:0 1px 3px rgba(0,0,0,.4);-webkit-transition:-webkit-transform .3s;transition:transform .3s}.weui_switch:checked{border-color:#04BE02;background-color:#04BE02}.weui_switch:checked:before{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.weui_switch:checked:after{-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}.weui_uploader_hd{padding-top:0;padding-right:0;padding-left:0}.weui_uploader_hd .weui_cell_ft{font-size:1em}.weui_uploader_bd{margin-bottom:-4px;margin-right:-9px;overflow:hidden}.weui_uploader_file,.weui_uploader_input_wrp{margin-right:9px;margin-bottom:9px;float:left}.weui_uploader_files{list-style:none}.weui_uploader_file{width:79px;height:79px;background:center center no-repeat;background-size:cover}.weui_uploader_status{position:relative}.weui_uploader_status:before{content:" ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.5)}.weui_uploader_status .weui_uploader_status_content{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#FFF}.weui_uploader_status .weui_icon_warn{display:block}.weui_uploader_input_wrp{position:relative;width:77px;height:77px;border:1px solid #D9D9D9}.weui_uploader_input_wrp:after,.weui_uploader_input_wrp:before{content:" ";position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#D9D9D9}.weui_uploader_input_wrp:before{width:2px;height:39.5px}.weui_uploader_input_wrp:after{width:39.5px;height:2px}.weui_uploader_input_wrp:active{border-color:#999}.weui_uploader_input_wrp:active:after,.weui_uploader_input_wrp:active:before{background-color:#999}.weui_uploader_input{position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;opacity:0;-webkit-tap-highlight-color:transparent}.weui_msg{padding-top:36px}.weui_msg .weui_icon_area{margin-bottom:30px}.weui_msg .weui_text_area{margin-bottom:25px;padding:0 20px}.weui_msg .weui_msg_title{margin-bottom:5px;font-weight:400;font-size:20px}.weui_msg .weui_msg_desc{font-size:14px;color:#888}.weui_msg .weui_opr_area{margin-bottom:25px}.weui_msg .weui_extra_area{margin-bottom:15px;font-size:14px;color:#888}.weui_msg .weui_extra_area a{color:#61749B}@media screen and (min-height:438px){.weui_extra_area{position:fixed;left:0;bottom:0;width:100%;text-align:center}}.weui_article{padding:20px 15px;font-size:15px}.weui_article section{margin-bottom:1.5em}.weui_article h1{font-size:17px;font-weight:400;margin-bottom:.75em}.weui_article h2{font-size:16px;font-weight:400;margin-bottom:.3em}.weui_article h3{font-weight:400;font-size:15px}.weui_progress{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.weui_progress_bar{background-color:#EBEBEB;height:3px;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.weui_progress_inner_bar{width:0;height:100%;background-color:#09BB07}.weui_progress_opr{display:block;margin-left:15px;font-size:0}.weui_grids{position:relative;overflow:hidden}.weui_grids:after,.weui_grids:before{content:" ";position:absolute;color:#D9D9D9;top:0;left:0}.weui_grids:before{width:100%;height:1px;border-top:1px solid #D9D9D9;transform-origin:0 0;-webkit-transform:scaleY(.5);-ms-transform:scaleY(.5);transform:scaleY(.5)}.weui_dialog_ft:after,.weui_grids:after{-webkit-transform-origin:0 0;-ms-transform-origin:0 0}.weui_grids:after{width:1px;height:100%;border-left:1px solid #D9D9D9;transform-origin:0 0;-webkit-transform:scaleX(.5);-ms-transform:scaleX(.5);transform:scaleX(.5)}.weui_grid{position:relative;float:left;padding:20px 10px;width:33.33333333%}.weui_grid:after,.weui_grid:before{content:" ";position:absolute;color:#D9D9D9}.weui_grid:before{top:0;width:1px;height:100%;border-right:1px solid #D9D9D9;transform-origin:0 100%;-webkit-transform:scaleX(.5);-ms-transform:scaleX(.5);transform:scaleX(.5);right:-1px}.weui_grid:after{left:0;bottom:0;width:100%;height:1px;border-bottom:1px solid #D9D9D9;-webkit-transform-origin:0 100%;-ms-transform-origin:0 100%;transform-origin:0 100%;-webkit-transform:scaleY(.5);-ms-transform:scaleY(.5);transform:scaleY(.5)}.weui_grid:active{background-color:#E4E4E4}.weui_grid_icon{width:28px;height:28px;margin:0 auto}.weui_grid_icon img{display:block;width:100%;height:100%}.weui_grid_icon+.weui_grid_label{margin-top:5px}.weui_grid_label{display:block;color:#000;font-size:14px}.weui_dialog{position:fixed;z-index:13;width:85%;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#FAFAFC;border-radius:3px}.weui_dialog_confirm .weui_dialog .weui_dialog_hd{padding:1.2em 20px .5em}.weui_dialog_confirm .weui_dialog .weui_dialog_bd{text-align:left}.weui_dialog_hd{padding:1.2em 0 .5em}.weui_dialog_title{font-weight:400;font-size:17px}.weui_dialog_bd{padding:0 20px;font-size:15px;color:#888}.weui_dialog_ft{position:relative;line-height:42px;margin-top:20px;font-size:17px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.weui_dialog_ft a{display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;color:#3CC51F}.weui_dialog_confirm .weui_dialog_ft a:after,.weui_dialog_ft:after{content:" ";left:0;top:0;color:#D5D5D6}.weui_dialog_ft a:active{background-color:#EEE}.weui_dialog_ft:after{position:absolute;width:100%;height:1px;border-top:1px solid #D5D5D6;transform-origin:0 0;-webkit-transform:scaleY(.5);-ms-transform:scaleY(.5);transform:scaleY(.5)}.weui_dialog_confirm .weui_dialog_ft a{position:relative}.weui_dialog_confirm .weui_dialog_ft a:after{position:absolute;width:1px;height:100%;border-left:1px solid #D5D5D6;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleX(.5);-ms-transform:scaleX(.5);transform:scaleX(.5)}.weui_dialog_confirm .weui_dialog_ft a:first-child:after{display:none}.weui_btn_dialog.default{color:#353535}.weui_btn_dialog.primary{color:#0BB20C}@media screen and (min-width:1024px){.weui_dialog{width:35%}}.weui_toast{position:fixed;z-index:3;width:7.6em;min-height:7.6em;top:180px;left:50%;margin-left:-3.8em;background:rgba(40,40,40,.75);text-align:center;border-radius:5px;color:#FFF}.weui_icon_toast{margin:22px 0 0;display:block}.weui_icon_toast:before{content:'\EA08';color:#FFF;font-size:55px}.weui_toast_content{margin:0 0 15px}.weui_loading_toast .weui_toast_content{margin-top:64%;font-size:14px}.weui_loading{position:absolute;width:0;z-index:2000000000;left:50%;top:38%}.weui_loading_leaf{position:absolute;top:-1px;opacity:.25}.weui_loading_leaf:before{content:" ";position:absolute;width:8.14px;height:3.08px;background:#d1d1d5;box-shadow:rgba(0,0,0,.0980392) 0 0 1px;border-radius:1px;-webkit-transform-origin:left 50% 0;-ms-transform-origin:left 50% 0;transform-origin:left 50% 0}.weui_mask,.weui_mask_transition,.weui_mask_transparent{z-index:1;height:100%;position:fixed;left:0;top:0;width:100%}.weui_loading_leaf_0{-webkit-animation:opacity-60-25-0-12 1.25s linear infinite;animation:opacity-60-25-0-12 1.25s linear infinite}.weui_loading_leaf_0:before{-webkit-transform:rotate(0) translate(7.92px,0);-ms-transform:rotate(0) translate(7.92px,0);transform:rotate(0) translate(7.92px,0)}.weui_loading_leaf_1{-webkit-animation:opacity-60-25-1-12 1.25s linear infinite;animation:opacity-60-25-1-12 1.25s linear infinite}.weui_loading_leaf_1:before{-webkit-transform:rotate(30deg) translate(7.92px,0);-ms-transform:rotate(30deg) translate(7.92px,0);transform:rotate(30deg) translate(7.92px,0)}.weui_loading_leaf_2{-webkit-animation:opacity-60-25-2-12 1.25s linear infinite;animation:opacity-60-25-2-12 1.25s linear infinite}.weui_loading_leaf_2:before{-webkit-transform:rotate(60deg) translate(7.92px,0);-ms-transform:rotate(60deg) translate(7.92px,0);transform:rotate(60deg) translate(7.92px,0)}.weui_loading_leaf_3{-webkit-animation:opacity-60-25-3-12 1.25s linear infinite;animation:opacity-60-25-3-12 1.25s linear infinite}.weui_loading_leaf_3:before{-webkit-transform:rotate(90deg) translate(7.92px,0);-ms-transform:rotate(90deg) translate(7.92px,0);transform:rotate(90deg) translate(7.92px,0)}.weui_loading_leaf_4{-webkit-animation:opacity-60-25-4-12 1.25s linear infinite;animation:opacity-60-25-4-12 1.25s linear infinite}.weui_loading_leaf_4:before{-webkit-transform:rotate(120deg) translate(7.92px,0);-ms-transform:rotate(120deg) translate(7.92px,0);transform:rotate(120deg) translate(7.92px,0)}.weui_loading_leaf_5{-webkit-animation:opacity-60-25-5-12 1.25s linear infinite;animation:opacity-60-25-5-12 1.25s linear infinite}.weui_loading_leaf_5:before{-webkit-transform:rotate(150deg) translate(7.92px,0);-ms-transform:rotate(150deg) translate(7.92px,0);transform:rotate(150deg) translate(7.92px,0)}.weui_loading_leaf_6{-webkit-animation:opacity-60-25-6-12 1.25s linear infinite;animation:opacity-60-25-6-12 1.25s linear infinite}.weui_loading_leaf_6:before{-webkit-transform:rotate(180deg) translate(7.92px,0);-ms-transform:rotate(180deg) translate(7.92px,0);transform:rotate(180deg) translate(7.92px,0)}.weui_loading_leaf_7{-webkit-animation:opacity-60-25-7-12 1.25s linear infinite;animation:opacity-60-25-7-12 1.25s linear infinite}.weui_loading_leaf_7:before{-webkit-transform:rotate(210deg) translate(7.92px,0);-ms-transform:rotate(210deg) translate(7.92px,0);transform:rotate(210deg) translate(7.92px,0)}.weui_loading_leaf_8{-webkit-animation:opacity-60-25-8-12 1.25s linear infinite;animation:opacity-60-25-8-12 1.25s linear infinite}.weui_loading_leaf_8:before{-webkit-transform:rotate(240deg) translate(7.92px,0);-ms-transform:rotate(240deg) translate(7.92px,0);transform:rotate(240deg) translate(7.92px,0)}.weui_loading_leaf_9{-webkit-animation:opacity-60-25-9-12 1.25s linear infinite;animation:opacity-60-25-9-12 1.25s linear infinite}.weui_loading_leaf_9:before{-webkit-transform:rotate(270deg) translate(7.92px,0);-ms-transform:rotate(270deg) translate(7.92px,0);transform:rotate(270deg) translate(7.92px,0)}.weui_loading_leaf_10{-webkit-animation:opacity-60-25-10-12 1.25s linear infinite;animation:opacity-60-25-10-12 1.25s linear infinite}.weui_loading_leaf_10:before{-webkit-transform:rotate(300deg) translate(7.92px,0);-ms-transform:rotate(300deg) translate(7.92px,0);transform:rotate(300deg) translate(7.92px,0)}.weui_loading_leaf_11{-webkit-animation:opacity-60-25-11-12 1.25s linear infinite;animation:opacity-60-25-11-12 1.25s linear infinite}.weui_loading_leaf_11:before{-webkit-transform:rotate(330deg) translate(7.92px,0);-ms-transform:rotate(330deg) translate(7.92px,0);transform:rotate(330deg) translate(7.92px,0)}@-webkit-keyframes opacity-60-25-0-12{0%,0.01%{opacity:.25}0.02%{opacity:1}100%,60.01%{opacity:.25}}@-webkit-keyframes opacity-60-25-1-12{0%,8.34333%{opacity:.25}8.35333%{opacity:1}100%,68.3433%{opacity:.25}}@-webkit-keyframes opacity-60-25-2-12{0%,16.6767%{opacity:.25}16.6867%{opacity:1}100%,76.6767%{opacity:.25}}@-webkit-keyframes opacity-60-25-3-12{0%,25.01%{opacity:.25}25.02%{opacity:1}100%,85.01%{opacity:.25}}@-webkit-keyframes opacity-60-25-4-12{0%,33.3433%{opacity:.25}33.3533%{opacity:1}100%,93.3433%{opacity:.25}}@-webkit-keyframes opacity-60-25-5-12{0%{opacity:.270958333333333}41.6767%{opacity:.25}41.6867%{opacity:1}1.67667%{opacity:.25}100%{opacity:.270958333333333}}@-webkit-keyframes opacity-60-25-6-12{0%{opacity:.375125}50.01%{opacity:.25}50.02%{opacity:1}10.01%{opacity:.25}100%{opacity:.375125}}@-webkit-keyframes opacity-60-25-7-12{0%{opacity:.479291666666667}58.3433%{opacity:.25}58.3533%{opacity:1}18.3433%{opacity:.25}100%{opacity:.479291666666667}}@-webkit-keyframes opacity-60-25-8-12{0%{opacity:.583458333333333}66.6767%{opacity:.25}66.6867%{opacity:1}26.6767%{opacity:.25}100%{opacity:.583458333333333}}@-webkit-keyframes opacity-60-25-9-12{0%{opacity:.687625}75.01%{opacity:.25}75.02%{opacity:1}35.01%{opacity:.25}100%{opacity:.687625}}@-webkit-keyframes opacity-60-25-10-12{0%{opacity:.791791666666667}83.3433%{opacity:.25}83.3533%{opacity:1}43.3433%{opacity:.25}100%{opacity:.791791666666667}}@-webkit-keyframes opacity-60-25-11-12{0%{opacity:.895958333333333}91.6767%{opacity:.25}91.6867%{opacity:1}51.6767%{opacity:.25}100%{opacity:.895958333333333}}.weui_mask{background:rgba(0,0,0,.6)}.weui_mask_transition{display:none;background:0 0;-webkit-transition:background .3s;transition:background .3s}.weui_fade_toggle{background:rgba(0,0,0,.6)}.weui_actionsheet{position:fixed;left:0;bottom:0;-webkit-transform:translate(0,100%);-ms-transform:translate(0,100%);transform:translate(0,100%);-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:2;width:100%;background-color:#EFEFF4;-webkit-transition:-webkit-transform .3s;transition:transform .3s}.weui_actionsheet_menu{background-color:#FFF}.weui_actionsheet_action{margin-top:6px;background-color:#FFF}.weui_actionsheet_cell{position:relative;padding:10px 0;text-align:center;font-size:18px}.weui_actionsheet_cell:before{content:" ";position:absolute;left:0;top:0;width:100%;height:1px;border-top:1px solid #D9D9D9;color:#D9D9D9;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleY(.5);-ms-transform:scaleY(.5);transform:scaleY(.5)}.weui_actionsheet_cell:active{background-color:#ECECEC}.weui_actionsheet_cell:first-child:before{display:none}.weui_actionsheet_toggle{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)} \ No newline at end of file From a585d618f174e2bac23f12e624d29fa8e23ada13 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 21:49:22 +0800 Subject: [PATCH 024/209] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/bind.html.erb | 29 +++++++++++++++----- app/views/wechats/login.html.erb | 46 +++++++++++++++++--------------- 2 files changed, 47 insertions(+), 28 deletions(-) diff --git a/app/views/wechats/bind.html.erb b/app/views/wechats/bind.html.erb index e569162b2..755a2df4d 100644 --- a/app/views/wechats/bind.html.erb +++ b/app/views/wechats/bind.html.erb @@ -1,14 +1,31 @@ - + - Ruby China - - - + + + 绑定用户 + -

恭喜! 绑定成功.

+
+
+
+
+

操作成功

+

内容详情,可根据实际需要安排

+
+
+

+ 确定 + 取消 +

+
+ +
+
\ No newline at end of file diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index cbc476f26..f323b0a1d 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -1,12 +1,11 @@ - + - Ruby China - - - - - + + + 绑定用户 + +
@@ -14,27 +13,30 @@ <%= @wechat_bind_errors %>

+ + <%= form_tag(bind_wechat_path,:id=>'main_login_form',:method=>'post') do %> +
+
+
+
+ +
+
-
- <%= text_field_tag 'username', params[:username], :tabindex => '1' , - :class=>'loginSignBox',:placeholder=>'请输入邮箱地址或昵称', :onkeypress => "user_name_keypress(event);"%> - -
- <% if Setting.openid? %> -
- <%= text_field_tag "openid_url", nil, :tabindex => '3',:placeholder=>'请输入OpenId URL' %> +
+
+
+
- <% end %> -
- - <%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码', :onkeypress => "user_name_keypress(event);"%> -
+
-
- <%= submit_tag '绑定' %> +
+ 确定 +
+
<% end %> From a5cc5d376142384518830d373b8f3afce17ae05f Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 21:52:36 +0800 Subject: [PATCH 025/209] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/bind.html.erb | 2 +- app/views/wechats/login.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/wechats/bind.html.erb b/app/views/wechats/bind.html.erb index 755a2df4d..ab35351c4 100644 --- a/app/views/wechats/bind.html.erb +++ b/app/views/wechats/bind.html.erb @@ -4,7 +4,7 @@ 绑定用户 - + diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index f323b0a1d..a079ca6a0 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -4,7 +4,7 @@ 绑定用户 - +
From 9f49a20a698a8153480e1ac3b868b005fde29fca Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 21:55:50 +0800 Subject: [PATCH 026/209] =?UTF-8?q?=E5=81=9C=E7=94=A8miniprofiler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index d8d148ec3..95484139d 100644 --- a/Gemfile +++ b/Gemfile @@ -44,7 +44,7 @@ gem 'elasticsearch-rails' group :development do gem 'grape-swagger' gem 'better_errors', '~> 1.1.0' - gem 'rack-mini-profiler', '~> 0.9.3' + # gem 'rack-mini-profiler', '~> 0.9.3' if RUBY_PLATFORM =~ /w32/ gem 'win32console' end From e576b5a800f75fb8147bce7225efff4d8f855540 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 21:57:48 +0800 Subject: [PATCH 027/209] =?UTF-8?q?=E5=85=B3=E9=97=ADiphone=E9=A6=96?= =?UTF-8?q?=E5=AD=97=E5=A4=A7=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/login.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index a079ca6a0..c305cd9d5 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -20,7 +20,7 @@
- +
From 7e18fe19be8f0db7d0655dc54a5f8d74e3ca425a Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 22:01:45 +0800 Subject: [PATCH 028/209] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=82=E5=90=88?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=9B=BE=E6=96=87=E7=9A=84=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/images/trustie_logo2.png | Bin 0 -> 106513 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 public/stylesheets/images/trustie_logo2.png diff --git a/public/stylesheets/images/trustie_logo2.png b/public/stylesheets/images/trustie_logo2.png new file mode 100644 index 0000000000000000000000000000000000000000..bee75165ee5486e8f02070ebe283d7bc6b5bb4e6 GIT binary patch literal 106513 zcmaI7Wk6ibl0Q7SOYq?C?(XjH4ub@DcXtTx4uRkr+}$C#I|PRygT6d>_ukzP@BYuH zK7Go%TBf?{H&M!pQb_Q)@Bjb+Nk&>+6#xJa1OUKF?TQp63f_`SOQgnCgxsFV?cfY0K&;yUE5V#L7vyl!H&`79~wqaJI7CM0Dxb} z)6vAt2Ixv`3beGg7a+ar=piMxHWwh(;!t2#a1;YtSxb961J%40)y=$Z%y`U6g#?ND zJ$XL`*a2Nlh&}CW?Ok|11xWuTm-n;%Pd5`O@xMr1Z3IaF%P4IHWnwW0XCN^LBL{;S zGYdO07Y`!~2Maql3q3I_GYcCNGaC~N8v_d~FEbA>3kUIkKct`9oXstGRmCO$Ti55C z0I8L$t0ONHlZS@~qX!$KgR>&CqHN{h>fmDK;7BYcMog_>VrFgs&pXY( z7!(wEW$ayCP3+BpGU5WHpQ0J9t<8D4Sy@C_SS5KxxkOl5SR^>OS=i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pT~^HlE+cUB+2iJv4<#V zQlWja*SAz1Ogu>)x_*xlI!lYz!;6-S&`oxAyR~{RX&nKmh0jN*rh=SKP5M=R^=uqr!ly#59(y!j@qo<9#;D{g^E8nFsy zG!cy`OzMD=r8d29H!OVY&}T*|f$I6}PJmKu!|UsP-+o$G?V5{b8`)zQ?J=HX7M9-9 zJJt5C$u=B5CIeu_efwbVy{F*N;s?YSe0^ zsan*J25epJ_ImB6vE+7IEG#_?3Q=P*@erb_n21%Za_>2hLiz1(ob6R9l2SIf;!T0Au`xwVPRomVPWZe!PMWY#rD!W zv9%&?27qStF9d^T1&g2Jh1goL1q%xc3kwSi%Wg_yypA+5hi1DAqi!|@`c>~5+?4hIkX0I>EQU|VmGg@uKMg@uJ> zH{l>P0rlFCjPjLAMfK}#l!m1}Uz@=n3kwSi3kyrXfxz|)k$$X Date: Wed, 20 Jan 2016 22:02:07 +0800 Subject: [PATCH 029/209] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=82=E5=90=88?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=9B=BE=E6=96=87=E7=9A=84=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 34dd2e79a..9f5d2ed04 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -126,7 +126,7 @@ class WechatsController < ActionController::Base end request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo1.png', url: 'http://www.baidu.com/' + article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo2.png', url: 'http://www.baidu.com/' end else openid = request[:FromUserName] @@ -135,7 +135,7 @@ class WechatsController < ActionController::Base uw = UserWechat.create!(attrs) news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo1.png', url: login_wechat_url(openid: uw.id) + article.item title: "#{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo2.png', url: login_wechat_url(openid: uw.id) end end end From 3df2a8a3cc701357d6f9c860d9284f0cc24dd284 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 22:03:18 +0800 Subject: [PATCH 030/209] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=82=E5=90=88?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=9B=BE=E6=96=87=E7=9A=84=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 9f5d2ed04..19644a624 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -126,7 +126,7 @@ class WechatsController < ActionController::Base end request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo2.png', url: 'http://www.baidu.com/' + article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', url: 'http://www.baidu.com/' end else openid = request[:FromUserName] @@ -135,7 +135,7 @@ class WechatsController < ActionController::Base uw = UserWechat.create!(attrs) news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo2.png', url: login_wechat_url(openid: uw.id) + article.item title: "#{n[:title]}", description: n[:content], pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', url: login_wechat_url(openid: uw.id) end end end From 27c2e9eddc06b1b998447f76c81bfff023c1d8b3 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 22:05:19 +0800 Subject: [PATCH 031/209] =?UTF-8?q?=E6=98=AF=E5=90=A6=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 19644a624..78522d1ed 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -119,7 +119,7 @@ class WechatsController < ActionController::Base on :click, with: 'MY_NEWS' do |request, key| uw = user_binded?(request[:FromUserName]) - if uw + if uw && uw.user ua = UserActivity.where(user_id: uw.user.id).order("id desc").limit(5) news = ua.map do |ua| {title: "act_type: #{ua.act_type}, act_id: #{ua.act_id}", content: "container_id: #{ua.container_id}, container_type: #{ua.container_type}"} From 55b61e9e90f45f8b425387a0b52a5e8449982186 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 22:14:47 +0800 Subject: [PATCH 032/209] =?UTF-8?q?=E6=B7=BB=E5=8A=A0js=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/bind.html.erb | 16 +++++++++++----- app/views/wechats/login.html.erb | 11 +++++++++-- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/app/views/wechats/bind.html.erb b/app/views/wechats/bind.html.erb index ab35351c4..29022043e 100644 --- a/app/views/wechats/bind.html.erb +++ b/app/views/wechats/bind.html.erb @@ -5,6 +5,15 @@ 绑定用户 + + + @@ -17,13 +26,10 @@

- +
diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index c305cd9d5..e6a936f4e 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -5,11 +5,18 @@ 绑定用户 + +
-

+

<%= @wechat_bind_errors %>

@@ -34,7 +41,7 @@
From 95070b7e838d3703e0d094246d5fe8e3ebfa3bcc Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 22:21:50 +0800 Subject: [PATCH 033/209] =?UTF-8?q?=E6=B7=BB=E5=8A=A0js=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/bind.html.erb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/views/wechats/bind.html.erb b/app/views/wechats/bind.html.erb index 29022043e..ada22cd69 100644 --- a/app/views/wechats/bind.html.erb +++ b/app/views/wechats/bind.html.erb @@ -5,12 +5,9 @@ 绑定用户 - - @@ -22,7 +19,7 @@

操作成功

-

内容详情,可根据实际需要安排

+

您已成功绑定微信

From 02cf9b56e1e4acd8cb1476f8a7d757c572a12179 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 22:25:14 +0800 Subject: [PATCH 034/209] =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 78522d1ed..85b9ba5ba 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -121,12 +121,16 @@ class WechatsController < ActionController::Base uw = user_binded?(request[:FromUserName]) if uw && uw.user ua = UserActivity.where(user_id: uw.user.id).order("id desc").limit(5) + logo = "trustie_logo2.png" news = ua.map do |ua| - {title: "act_type: #{ua.act_type}, act_id: #{ua.act_id}", content: "container_id: #{ua.container_id}, container_type: #{ua.container_type}"} + {title: "act_type: #{ua.act_type}, act_id: #{ua.act_id}", + content: "container_id: #{ua.container_id}, container_type: #{ua.container_type}", + pic_url:"http://wechat.trustie.net/images/trustie_logo#{logo}.png" } + logo = "trustie_logo1.png" end request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', url: 'http://www.baidu.com/' + article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: n[:pic_url], url: 'http://www.baidu.com/' end else openid = request[:FromUserName] From a72339fe2c91888dae4dfd3d00a40cc3e3789b08 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 22:27:50 +0800 Subject: [PATCH 035/209] =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 85b9ba5ba..2bf75798f 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -125,12 +125,12 @@ class WechatsController < ActionController::Base news = ua.map do |ua| {title: "act_type: #{ua.act_type}, act_id: #{ua.act_id}", content: "container_id: #{ua.container_id}, container_type: #{ua.container_type}", - pic_url:"http://wechat.trustie.net/images/trustie_logo#{logo}.png" } + picurl: "http://wechat.trustie.net/images/#{logo}" } logo = "trustie_logo1.png" end request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: n[:pic_url], url: 'http://www.baidu.com/' + article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: n[:picurl], url: 'http://www.baidu.com/' end else openid = request[:FromUserName] From f644aa114492bd049d2e96233cd24998b6426c01 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 22:31:36 +0800 Subject: [PATCH 036/209] =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 2bf75798f..9ae28abcd 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -122,15 +122,19 @@ class WechatsController < ActionController::Base if uw && uw.user ua = UserActivity.where(user_id: uw.user.id).order("id desc").limit(5) logo = "trustie_logo2.png" + i = 0 news = ua.map do |ua| + i += 1 {title: "act_type: #{ua.act_type}, act_id: #{ua.act_id}", content: "container_id: #{ua.container_id}, container_type: #{ua.container_type}", - picurl: "http://wechat.trustie.net/images/#{logo}" } - logo = "trustie_logo1.png" + picurl: "http://wechat.trustie.net/images/#{i == 1 ? logo : 'trustie_logo1.png'}" } end request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: n[:picurl], url: 'http://www.baidu.com/' + article.item title: "#{index} #{n[:title]}", + description: n[:content], + pic_url: n[:picurl], + url: 'http://www.baidu.com/' end else openid = request[:FromUserName] @@ -139,7 +143,10 @@ class WechatsController < ActionController::Base uw = UserWechat.create!(attrs) news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{n[:title]}", description: n[:content], pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', url: login_wechat_url(openid: uw.id) + article.item title: "#{n[:title]}", + description: n[:content], + pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', + url: login_wechat_url(openid: uw.id) end end end From fce8d853806a4259de71dc414a8b682209bf48f3 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 23:15:22 +0800 Subject: [PATCH 037/209] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 51 ++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 9ae28abcd..06d3fae96 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -120,14 +120,23 @@ class WechatsController < ActionController::Base on :click, with: 'MY_NEWS' do |request, key| uw = user_binded?(request[:FromUserName]) if uw && uw.user - ua = UserActivity.where(user_id: uw.user.id).order("id desc").limit(5) + + ua = user_activity(uw.user) + logo = "trustie_logo2.png" i = 0 - news = ua.map do |ua| + news =[] + ua.each do |ua| i += 1 - {title: "act_type: #{ua.act_type}, act_id: #{ua.act_id}", - content: "container_id: #{ua.container_id}, container_type: #{ua.container_type}", - picurl: "http://wechat.trustie.net/images/#{i == 1 ? logo : 'trustie_logo1.png'}" } + activity = process_activity(ua) + if activity + news << {title: activity[0], + content: activity[1], + picurl: "http://wechat.trustie.net/images/#{i == 1 ? logo : activity[2]}", + url: activity[3] + } + end + end request.reply.news(news) do |article, n, index| # article is return object @@ -175,4 +184,36 @@ class WechatsController < ActionController::Base def user_binded?(openid) uw = UserWechat.where(openid: openid).first end + + def user_activity(user) + @user = user + shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{@user.id} and shield_type='Project'").map(&:shield_id) + shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{@user.id} and shield_type='Course'").map(&:shield_id) + @page = params[:page] ? params[:page].to_i + 1 : 0 + user_project_ids = (@user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")" + user_course_ids = (@user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")" + course_types = "('Message','News','HomeworkCommon','Poll','Course')" + project_types = "('Message','Issue','ProjectCreateInfo')" + principal_types = "JournalsForMessage" + + blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")" + @user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" + + "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+ + "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " + + "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(@page * 10) + + + end + + def process_activity(user_activity) + act= user_activity.act + case user_activity.container_type.to_s + when 'Course' + when 'Project' + case user_activity.act_type.to_s + when 'Issue' + [activity.project.name.to_s+" | 项目问题", activity.subject.to_s, project_issues_path(activity.project), url_to_avatar(activity.author)] + end + end + end end From 6d732ff5ff35650c5e9fa75171b63dcfd1a9fe4c Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 23:17:17 +0800 Subject: [PATCH 038/209] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 06d3fae96..9483043c8 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -122,13 +122,12 @@ class WechatsController < ActionController::Base if uw && uw.user ua = user_activity(uw.user) - logo = "trustie_logo2.png" i = 0 news =[] - ua.each do |ua| + ua.each do |a| i += 1 - activity = process_activity(ua) + activity = process_activity(a) if activity news << {title: activity[0], content: activity[1], From 4607d1a78d741c19eb3e39a77bfb251986f2c24e Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 23:18:21 +0800 Subject: [PATCH 039/209] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 9483043c8..475594687 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -211,7 +211,7 @@ class WechatsController < ActionController::Base when 'Project' case user_activity.act_type.to_s when 'Issue' - [activity.project.name.to_s+" | 项目问题", activity.subject.to_s, project_issues_path(activity.project), url_to_avatar(activity.author)] + [act.project.name.to_s+" | 项目问题", act.subject.to_s, project_issues_path(act.project), url_to_avatar(act.author)] end end end From c439d62a647e2c22682aead0ff5b8b84fc55ffd0 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 23:20:44 +0800 Subject: [PATCH 040/209] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 475594687..33939c140 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -1,6 +1,8 @@ class WechatsController < ActionController::Base wechat_responder + included ApplicationHelper + # default text responder when no other match on :text do |request, content| request.reply.text "echo: #{content}" # Just echo From 22a83bee0e1c99e46691f01adebe62887017ea0b Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 23:26:58 +0800 Subject: [PATCH 041/209] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 33939c140..e44f6acd0 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -1,7 +1,7 @@ class WechatsController < ActionController::Base wechat_responder - included ApplicationHelper + include ApplicationHelper # default text responder when no other match on :text do |request, content| From 472c6acf2b4989ca2650376cb5a284afd3bb3a73 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 23:29:22 +0800 Subject: [PATCH 042/209] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index e44f6acd0..e07e15d51 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -144,7 +144,7 @@ class WechatsController < ActionController::Base article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: n[:picurl], - url: 'http://www.baidu.com/' + url: n[:url] end else openid = request[:FromUserName] @@ -213,7 +213,7 @@ class WechatsController < ActionController::Base when 'Project' case user_activity.act_type.to_s when 'Issue' - [act.project.name.to_s+" | 项目问题", act.subject.to_s, project_issues_path(act.project), url_to_avatar(act.author)] + [act.project.name.to_s+" | 项目问题", act.subject.to_s, url_to_avatar(act.author),project_issues_url(act.project)] end end end From 74b643584fbfb45fc277bcab799c8e3e83e3e1c1 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 23:31:29 +0800 Subject: [PATCH 043/209] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index e07e15d51..025df5f78 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -144,7 +144,7 @@ class WechatsController < ActionController::Base article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: n[:picurl], - url: n[:url] + url: "https://www.turstie.net"+n[:url] end else openid = request[:FromUserName] From 9d33dcf2f38a7310e226c2ea33586b594e703dcf Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 23:32:43 +0800 Subject: [PATCH 044/209] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 025df5f78..0232551be 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -141,8 +141,8 @@ class WechatsController < ActionController::Base end request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{index} #{n[:title]}", - description: n[:content], + article.item title: "#{n[:content]}", + description: n[:title], pic_url: n[:picurl], url: "https://www.turstie.net"+n[:url] end From 6075f4478656bbd9582519f65f81bb4fb959395d Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 23:34:05 +0800 Subject: [PATCH 045/209] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 0232551be..a46ea368e 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -143,8 +143,8 @@ class WechatsController < ActionController::Base request.reply.news(news) do |article, n, index| # article is return object article.item title: "#{n[:content]}", description: n[:title], - pic_url: n[:picurl], - url: "https://www.turstie.net"+n[:url] + pic_url: "https://www.turstie.net#{n[:picurl]}", + url: n[:url] end else openid = request[:FromUserName] From 745b8399d1648e46fe3ed2033f85ceae5dd66bbb Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 23:38:40 +0800 Subject: [PATCH 046/209] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index a46ea368e..72717914c 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -124,7 +124,7 @@ class WechatsController < ActionController::Base if uw && uw.user ua = user_activity(uw.user) - logo = "trustie_logo2.png" + logo = "http://wechat.trustie.net/images/trustie_logo2.png" i = 0 news =[] ua.each do |a| @@ -133,7 +133,7 @@ class WechatsController < ActionController::Base if activity news << {title: activity[0], content: activity[1], - picurl: "http://wechat.trustie.net/images/#{i == 1 ? logo : activity[2]}", + picurl: "#{i == 1 ? logo : 'https://www.trustie.net'+activity[2]}", url: activity[3] } end @@ -143,7 +143,7 @@ class WechatsController < ActionController::Base request.reply.news(news) do |article, n, index| # article is return object article.item title: "#{n[:content]}", description: n[:title], - pic_url: "https://www.turstie.net#{n[:picurl]}", + pic_url: "#{n[:picurl]}", url: n[:url] end else From 769b044df5784c32b268e36ff24be17dd014ea1e Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 23:39:47 +0800 Subject: [PATCH 047/209] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 72717914c..eeb3a8455 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -133,7 +133,7 @@ class WechatsController < ActionController::Base if activity news << {title: activity[0], content: activity[1], - picurl: "#{i == 1 ? logo : 'https://www.trustie.net'+activity[2]}", + picurl: "#{i == 1 ? logo : 'https://www.trustie.net/'+activity[2]}", url: activity[3] } end From 0ab579af98b32e6e3a9d176a7b05009c65a418e1 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sun, 28 Feb 2016 22:22:10 +0800 Subject: [PATCH 048/209] =?UTF-8?q?=E8=AE=A2=E9=98=85=E6=97=B6=E5=8F=91?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 29 ++++++++++++++++----------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index eeb3a8455..b6b6cc237 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -23,7 +23,7 @@ class WechatsController < ActionController::Base end on :event, with: 'subscribe' do |request| - request.reply.text "#{request[:FromUserName]} subscribe now" + sendBind end # When unsubscribe user scan qrcode qrscene_xxxxxx to subscribe in public account @@ -147,17 +147,22 @@ class WechatsController < ActionController::Base url: n[:url] end else - openid = request[:FromUserName] - attrs = wechat.user(openid) - UserWechat.delete_all(openid: openid) - uw = UserWechat.create!(attrs) - news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } - request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{n[:title]}", - description: n[:content], - pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', - url: login_wechat_url(openid: uw.id) - end + sendBind + end + end + + def sendBind + openid = request[:FromUserName] + attrs = wechat.user(openid) + UserWechat.delete_all(openid: openid) + uw = UserWechat.create!(attrs) + news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } + request.reply.news(news) do |article, n, index| # article is return object + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{self.corpid}&redirect_uri=#{login_wechat_url(uid: uw.id)}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" + article.item title: "#{n[:title]}", + description: n[:content], + pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', + url: url end end From 35f9dc6e77b80dd9d6b031accfaf3b734b776e55 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sun, 28 Feb 2016 22:28:44 +0800 Subject: [PATCH 049/209] =?UTF-8?q?=E4=BC=A0request=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index b6b6cc237..ea51059df 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -23,7 +23,7 @@ class WechatsController < ActionController::Base end on :event, with: 'subscribe' do |request| - sendBind + sendBind(request) end # When unsubscribe user scan qrcode qrscene_xxxxxx to subscribe in public account @@ -147,11 +147,11 @@ class WechatsController < ActionController::Base url: n[:url] end else - sendBind + sendBind(request) end end - def sendBind + def sendBind(request) openid = request[:FromUserName] attrs = wechat.user(openid) UserWechat.delete_all(openid: openid) From 60b35a46cea7eb8ddd4d1d44d9b5b3c2ee1e312a Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 14:05:18 +0800 Subject: [PATCH 050/209] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BC=81=E4=B8=9Aid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index ea51059df..0429ebd91 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -158,7 +158,7 @@ class WechatsController < ActionController::Base uw = UserWechat.create!(attrs) news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } request.reply.news(news) do |article, n, index| # article is return object - url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{self.corpid}&redirect_uri=#{login_wechat_url(uid: uw.id)}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.corpid}&redirect_uri=#{login_wechat_url(uid: uw.id)}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" article.item title: "#{n[:title]}", description: n[:content], pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', From 8f5645e5c1b18c7f40908756d8a93601791a6683 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 14:32:10 +0800 Subject: [PATCH 051/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9wechat=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/wechat.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/config/wechat.yml b/config/wechat.yml index 20b6382c3..98941c578 100644 --- a/config/wechat.yml +++ b/config/wechat.yml @@ -12,19 +12,7 @@ default: &default jsapi_ticket: "C:/Users/[user_name]/wechat_jsapi_ticket" production: - corpid: <%= ENV['WECHAT_CORPID'] %> - corpsecret: <%= ENV['WECHAT_CORPSECRET'] %> - agentid: <%= ENV['WECHAT_AGENTID'] %> -# Or if using public account, only need above two line -# appid: -# secret: - token: <%= ENV['WECHAT_TOKEN'] %> - timeout: 30, - skip_verify_ssl: true - access_token: <%= ENV['WECHAT_ACCESS_TOKEN'] %> - encrypt_mode: false # if true must fill encoding_aes_key - encoding_aes_key: <%= ENV['WECHAT_ENCODING_AES_KEY'] %> - jsapi_ticket: + <<: *default development: <<: *default From a7220a535eed78ff9730371ab3c004e306a6f04b Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 14:33:36 +0800 Subject: [PATCH 052/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9wechat=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/wechat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/wechat.yml b/config/wechat.yml index 98941c578..5b528487b 100644 --- a/config/wechat.yml +++ b/config/wechat.yml @@ -7,7 +7,7 @@ default: &default secret: "dff5b606e34dcafe24163ec82c2715f8" token: "123456" access_token: "1234567" - encrypt_mode: true # if true must fill encoding_aes_key + encrypt_mode: false # if true must fill encoding_aes_key encoding_aes_key: "QyocNOkRmrT5HzBpCG54EVPUQjk86nJapXNVDQm6Yy6" jsapi_ticket: "C:/Users/[user_name]/wechat_jsapi_ticket" From dce93c83130192f5adbea99fecd9ce319154704c Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 14:50:05 +0800 Subject: [PATCH 053/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9wechat=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 0429ebd91..5be3c8bdf 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -152,13 +152,14 @@ class WechatsController < ActionController::Base end def sendBind(request) + logger.deb openid = request[:FromUserName] attrs = wechat.user(openid) UserWechat.delete_all(openid: openid) uw = UserWechat.create!(attrs) news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } request.reply.news(news) do |article, n, index| # article is return object - url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.corpid}&redirect_uri=#{login_wechat_url(uid: uw.id)}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{login_wechat_url(uid: uw.id)}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" article.item title: "#{n[:title]}", description: n[:content], pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', From e32fdf6bcb090eabcc5a76aa3d12d973267f76d2 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 15:21:20 +0800 Subject: [PATCH 054/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9wechat=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 6 +++--- app/views/wechats/login.html.erb | 21 ++++++++++++++++----- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 5be3c8bdf..ef5562bf0 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -159,7 +159,7 @@ class WechatsController < ActionController::Base uw = UserWechat.create!(attrs) news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } request.reply.news(news) do |article, n, index| # article is return object - url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{login_wechat_url(uid: uw.id)}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{login_wechat_url}&response_type=code&scope=snsapi_base&state=#{uw.id}#wechat_redirect" article.item title: "#{n[:title]}", description: n[:content], pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', @@ -169,12 +169,12 @@ class WechatsController < ActionController::Base def bind begin - raise "非法操作, 微信ID不存在" unless params[:openid] + raise "非法操作, 微信ID不存在" unless params[:state] user, last_login_on = User.try_to_login(params[:username], params[:password]) raise "用户名或密码错误,请重新登录" unless user #补全用户信息 - uw = UserWechat.find_by_id(params[:openid]) + uw = UserWechat.find_by_id(params[:state]) uw.user_id = user.id uw.save! rescue Exception=>e diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index e6a936f4e..f3fa64a56 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -5,12 +5,23 @@ 绑定用户 + @@ -41,7 +52,7 @@

From e2ecd546639eb206bc3cc4acca9dcd168b29bce6 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 15:24:30 +0800 Subject: [PATCH 055/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9wechat=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/login.html.erb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index f3fa64a56..32b70d1e2 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -7,14 +7,13 @@
@@ -66,5 +47,27 @@
+ + + \ No newline at end of file From b5a8625e40fd549d12ca67e9401eea1edf8b8029 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 15:39:18 +0800 Subject: [PATCH 060/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9wechat=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/login.html.erb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index a9a5d54f3..ddea5af18 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -6,9 +6,7 @@ 绑定用户 -
From 42edbce8f26ee8547566083ab44bc21eae203371 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 15:41:33 +0800 Subject: [PATCH 061/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9wechat=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/login.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index ddea5af18..2614c1b08 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -58,7 +58,7 @@ $.ajax({ type: "POST", - url: $(this).parent("form").attr("action"), + url: $("#submitForm").attr("action"), data:data, dataType: "json" }); From 4d1969e715c4da6025d3d4092d8d7bf268047fbd Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 15:42:37 +0800 Subject: [PATCH 062/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9wechat=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/login.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index 2614c1b08..481b89f7a 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -58,7 +58,7 @@ $.ajax({ type: "POST", - url: $("#submitForm").attr("action"), + url: $("#main_login_form").attr("action"), data:data, dataType: "json" }); From e487b39d16b6ec2ebee296dfb6a1821237254f1d Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 15:46:05 +0800 Subject: [PATCH 063/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9wechat=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index ef5562bf0..5d61667a6 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -177,9 +177,9 @@ class WechatsController < ActionController::Base uw = UserWechat.find_by_id(params[:state]) uw.user_id = user.id uw.save! + render :text => {status:0, msg: "绑定成功"} rescue Exception=>e - @wechat_bind_errors = e.message - render :login + render :text => {status: -1, msg: e.message} end end From 445bae6de9bc7dc4bd3fbf73cc2b6d2818798d53 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 16:13:13 +0800 Subject: [PATCH 064/209] =?UTF-8?q?patch=20mysql5.7=E7=9A=84create=20table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/layout.html.erb | 0 config/initializers/abstract_mysql_adapter.rb | 3 ++ public/javascripts/wechat/alert.js | 38 +++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 app/views/wechats/layout.html.erb create mode 100644 config/initializers/abstract_mysql_adapter.rb create mode 100644 public/javascripts/wechat/alert.js diff --git a/app/views/wechats/layout.html.erb b/app/views/wechats/layout.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/config/initializers/abstract_mysql_adapter.rb b/config/initializers/abstract_mysql_adapter.rb new file mode 100644 index 000000000..5083a562b --- /dev/null +++ b/config/initializers/abstract_mysql_adapter.rb @@ -0,0 +1,3 @@ +class ActiveRecord::ConnectionAdapters::Mysql2Adapter + NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY" +end diff --git a/public/javascripts/wechat/alert.js b/public/javascripts/wechat/alert.js new file mode 100644 index 000000000..bda0150a9 --- /dev/null +++ b/public/javascripts/wechat/alert.js @@ -0,0 +1,38 @@ +$(function(){ + window.byAlert = function(info, title){ + if(typeof title === 'undefined'){ + title = '提示'; + } + $('.weui_dialog_alert .weui_dialog_title').text(title); + $('.weui_dialog_alert .weui_dialog_info').text(info); + + var $dialog = $('#dialog2'); + $dialog.show(); + $dialog.find('.weui_btn_dialog').one('click', function () { + $dialog.hide(); + }); + }; + + + window.byConfirm = function(info, cb){ + var title; + if(typeof title === 'undefined'){ + title = '提示'; + } + $('.weui_dialog_confirm .weui_dialog_title').text(title); + $('.weui_dialog_confirm .weui_dialog_info').text(info); + + var $dialog = $('#dialog1'); + $dialog.show(); + $dialog.find('.weui_btn_dialog.confirm').one('click', function () { + $dialog.hide(); + if(typeof cb === 'function'){ + cb(); + } + }); + + $dialog.find('.weui_btn_dialog.cancel').one('click', function () { + $dialog.hide(); + }); + } +}); \ No newline at end of file From a59f65a45567557417f0706fefbe1efa0c1c6887 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 16:13:37 +0800 Subject: [PATCH 065/209] wechat --- Gemfile | 2 +- app/controllers/wechats_controller.rb | 2 + app/views/wechats/layout.html.erb | 43 + app/views/wechats/login.html.erb | 17 +- db/schema.rb | 2110 +------------------------ 5 files changed, 60 insertions(+), 2114 deletions(-) diff --git a/Gemfile b/Gemfile index 95484139d..e292279ef 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'daemons' gem 'grape', '~> 0.9.0' gem 'grape-entity' gem 'seems_rateable', '~> 1.0.13' -gem "rails", "3.2.13" +gem 'rails', '~> 3.2', '>= 3.2.22' gem "jquery-rails", "~> 2.0.2" gem "i18n", "~> 0.6.0" gem 'coderay', '~> 1.1.0' diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 5d61667a6..1c14aece0 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -1,4 +1,6 @@ class WechatsController < ActionController::Base + layout 'wechat/layout' + wechat_responder include ApplicationHelper diff --git a/app/views/wechats/layout.html.erb b/app/views/wechats/layout.html.erb index e69de29bb..8f93ac9a1 100644 --- a/app/views/wechats/layout.html.erb +++ b/app/views/wechats/layout.html.erb @@ -0,0 +1,43 @@ + + + + + <%= csrf_meta_tag %> + + 绑定用户 + + + + +<%= yield %> + + + + + + + + + + + + \ No newline at end of file diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index 481b89f7a..d0cecb5f9 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -1,13 +1,3 @@ - - - - - <%= csrf_meta_tag %> - - 绑定用户 - - -
@@ -61,11 +51,10 @@ url: $("#main_login_form").attr("action"), data:data, dataType: "json" + }).done(function(data){ + }); }) }); - - - - \ No newline at end of file + \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index d47a676fb..c9b53c6aa 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,8 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160119034447) do +ActiveRecord::Schema.define(:version => 20160225024759) do + create_table "activities", :force => true do |t| t.integer "act_id", :null => false t.string "act_type", :null => false @@ -98,11 +99,8 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.integer "quotes" t.integer "version" t.integer "attachment_id" -<<<<<<< HEAD -======= t.integer "is_publish", :default => 1 t.date "publish_time" ->>>>>>> origin/szzh end create_table "attachments", :force => true do |t| @@ -122,11 +120,8 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.integer "is_public", :default => 1 t.integer "copy_from" t.integer "quotes" -<<<<<<< HEAD -======= t.integer "is_publish", :default => 1 t.date "publish_time" ->>>>>>> origin/szzh end add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" @@ -508,12 +503,9 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.integer "is_delete", :default => 0 t.integer "end_time" t.string "end_term" -<<<<<<< HEAD -======= t.integer "is_excellent", :default => 0 t.integer "excellent_option", :default => 0 t.integer "is_copy", :default => 0 ->>>>>>> origin/szzh end create_table "custom_fields", :force => true do |t| @@ -759,6 +751,14 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.integer "locked" end + create_table "forwards", :force => true do |t| + t.integer "from_id" + t.string "from_type" + t.integer "to_id" + t.string "to_type" + t.datetime "created_at" + end + create_table "groups_users", :id => false, :force => true do |t| t.integer "group_id", :null => false t.integer "user_id", :null => false @@ -795,10 +795,8 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.datetime "updated_at", :null => false t.integer "teacher_priority", :default => 1 t.integer "anonymous_comment", :default => 0 -<<<<<<< HEAD -======= t.integer "quotes", :default => 0 ->>>>>>> origin/szzh + t.integer "is_open", :default => 0 end add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id" @@ -1091,10 +1089,7 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.integer "sticky", :default => 0 t.integer "reply_id" t.integer "quotes" -<<<<<<< HEAD -======= t.integer "status", :default => 0 ->>>>>>> origin/szzh end add_index "messages", ["author_id"], :name => "index_messages_on_author_id" @@ -1105,16 +1100,6 @@ ActiveRecord::Schema.define(:version => 20160119034447) do create_table "news", :force => true do |t| t.integer "project_id" -<<<<<<< HEAD - t.string "title", :limit => 60, :default => "", :null => false - t.string "summary", :default => "" - t.text "description" - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.integer "comments_count", :default => 0, :null => false - t.integer "course_id" - t.integer "sticky", :default => 0 -======= t.string "title", :limit => 60, :default => "", :null => false t.string "summary", :default => "" t.text "description" @@ -1124,7 +1109,6 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.integer "course_id" t.integer "sticky", :default => 0 t.integer "org_subfield_id" ->>>>>>> origin/szzh end add_index "news", ["author_id"], :name => "index_news_on_author_id" @@ -1294,17 +1278,10 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.text "description" t.integer "creator_id" t.integer "home_id" -<<<<<<< HEAD - t.string "domain" - t.boolean "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false -======= t.boolean "is_public" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.boolean "allow_guest_download", :default => true ->>>>>>> origin/szzh end create_table "phone_app_versions", :force => true do |t| @@ -1409,10 +1386,7 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.integer "board_message_num", :default => 0 t.integer "board_num", :default => 0 t.integer "attach_num", :default => 0 -<<<<<<< HEAD -======= t.datetime "commit_time" ->>>>>>> origin/szzh end create_table "project_statuses", :force => true do |t| @@ -1572,8 +1546,6 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.string "pinyin" end -<<<<<<< HEAD -======= create_table "secdomains", :force => true do |t| t.integer "sub_type" t.string "subname" @@ -1583,7 +1555,6 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.datetime "updated_at", :null => false end ->>>>>>> origin/szzh create_table "seems_rateable_cached_ratings", :force => true do |t| t.integer "cacheable_id", :limit => 8 t.string "cacheable_type" @@ -1911,7 +1882,6 @@ ActiveRecord::Schema.define(:version => 20160119034447) do add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" -<<<<<<< HEAD create_table "user_wechats", :force => true do |t| t.integer "subscribe" t.string "openid" @@ -1931,8 +1901,6 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.datetime "updated_at", :null => false end -======= ->>>>>>> origin/szzh create_table "users", :force => true do |t| t.string "login", :default => "", :null => false t.string "hashed_password", :limit => 40, :default => "", :null => false @@ -2008,7 +1976,6 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.datetime "updated_at", :null => false end -<<<<<<< HEAD create_table "wechat_logs", :force => true do |t| t.string "openid", :null => false t.text "request_raw" @@ -2017,2060 +1984,6 @@ ActiveRecord::Schema.define(:version => 20160119034447) do t.datetime "created_at", :null => false end -======= ->>>>>>> origin/szzh - create_table "wiki_content_versions", :force => true do |t| - t.integer "wiki_content_id", :null => false - t.integer "page_id", :null => false - t.integer "author_id" - t.binary "data", :limit => 2147483647 - t.string "compression", :limit => 6, :default => "" - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" - add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" - - create_table "wiki_contents", :force => true do |t| - t.integer "page_id", :null => false - t.integer "author_id" - t.text "text", :limit => 2147483647 - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" - add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" - - create_table "wiki_pages", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title", :null => false - t.datetime "created_on", :null => false - t.boolean "protected", :default => false, :null => false - t.integer "parent_id" - end - - add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" - add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" - add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" - - create_table "wiki_redirects", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title" - t.string "redirects_to" - t.datetime "created_on", :null => false - end - - add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" - add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" - - create_table "wikis", :force => true do |t| - t.integer "project_id", :null => false - t.string "start_page", :null => false - t.integer "status", :default => 1, :null => false - end - - add_index "wikis", ["project_id"], :name => "wikis_project_id" - - create_table "workflows", :force => true do |t| - t.integer "tracker_id", :default => 0, :null => false - t.integer "old_status_id", :default => 0, :null => false - t.integer "new_status_id", :default => 0, :null => false - t.integer "role_id", :default => 0, :null => false - t.boolean "assignee", :default => false, :null => false - t.boolean "author", :default => false, :null => false - t.string "type", :limit => 30 - t.string "field_name", :limit => 30 - t.string "rule", :limit => 30 - end - - add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" - add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" - add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" - add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" - - create_table "works_categories", :force => true do |t| - t.string "category" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "zip_packs", :force => true do |t| - t.integer "user_id" - t.integer "homework_id" - t.string "file_digest" - t.string "file_path" - t.integer "pack_times", :default => 1 - t.integer "pack_size", :default => 0 - t.text "file_digests" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - -end -======= -# encoding: UTF-8 -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended to check this file into your version control system. - -ActiveRecord::Schema.define(:version => 20160225024759) do - - create_table "activities", :force => true do |t| - t.integer "act_id", :null => false - t.string "act_type", :null => false - t.integer "user_id", :null => false - t.integer "activity_container_id" - t.string "activity_container_type", :default => "" - t.datetime "created_at" - end - - add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" - add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" - add_index "activities", ["user_id"], :name => "index_activities_on_user_id" - - create_table "activity_notifies", :force => true do |t| - t.integer "activity_container_id" - t.string "activity_container_type" - t.integer "activity_id" - t.string "activity_type" - t.integer "notify_to" - t.datetime "created_on" - t.integer "is_read" - end - - add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" - add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" - add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" - - create_table "api_keys", :force => true do |t| - t.string "access_token" - t.datetime "expires_at" - t.integer "user_id" - t.boolean "active", :default => true - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" - add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - - create_table "applied_projects", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - end - - create_table "apply_project_masters", :force => true do |t| - t.integer "user_id" - t.string "apply_type" - t.integer "apply_id" - t.integer "status" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "at_messages", :force => true do |t| - t.integer "user_id" - t.integer "at_message_id" - t.string "at_message_type" - t.boolean "viewed", :default => false - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sender_id" - end - - add_index "at_messages", ["user_id"], :name => "index_at_messages_on_user_id" - - create_table "attachment_histories", :force => true do |t| - t.integer "container_id" - t.string "container_type" - t.string "filename", :default => "" - t.string "disk_filename", :default => "" - t.integer "filesize", :default => 0 - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "" - t.integer "downloads", :default => 0 - t.integer "author_id" - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.integer "copy_from" - t.integer "quotes" - t.integer "version" - t.integer "attachment_id" - t.integer "is_publish", :default => 1 - t.date "publish_time" - end - - create_table "attachments", :force => true do |t| - t.integer "container_id" - t.string "container_type", :limit => 30 - t.string "filename", :default => "", :null => false - t.string "disk_filename", :default => "", :null => false - t.integer "filesize", :default => 0, :null => false - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "", :null => false - t.integer "downloads", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype", :default => 1 - t.integer "is_public", :default => 1 - t.integer "copy_from" - t.integer "quotes" - t.integer "is_publish", :default => 1 - t.date "publish_time" - end - - add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" - add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" - add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" - - create_table "attachmentstypes", :force => true do |t| - t.integer "typeId", :null => false - t.string "typeName", :limit => 50 - end - - create_table "auth_sources", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 60, :default => "", :null => false - t.string "host", :limit => 60 - t.integer "port" - t.string "account" - t.string "account_password", :default => "" - t.string "base_dn" - t.string "attr_login", :limit => 30 - t.string "attr_firstname", :limit => 30 - t.string "attr_lastname", :limit => 30 - t.string "attr_mail", :limit => 30 - t.boolean "onthefly_register", :default => false, :null => false - t.boolean "tls", :default => false, :null => false - t.string "filter" - t.integer "timeout" - end - - add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" - - create_table "biding_projects", :force => true do |t| - t.integer "project_id" - t.integer "bid_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "bids", :force => true do |t| - t.string "name" - t.string "budget", :null => false - t.integer "author_id" - t.date "deadline" - t.text "description" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.integer "commit" - t.integer "reward_type" - t.integer "homework_type" - t.integer "parent_id" - t.string "password" - t.integer "is_evaluation" - t.integer "proportion", :default => 60 - t.integer "comment_status", :default => 0 - t.integer "evaluation_num", :default => 3 - t.integer "open_anonymous_evaluation", :default => 1 - end - - create_table "blog_comments", :force => true do |t| - t.integer "blog_id", :null => false - t.integer "parent_id" - t.string "title", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "comments_count", :default => 0, :null => false - t.integer "last_comment_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "reply_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "blogs", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - t.integer "position", :default => 1 - t.integer "article_count", :default => 0, :null => false - t.integer "comments_count", :default => 0, :null => false - t.integer "last_comments_id" - t.integer "parent_id" - t.integer "author_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "homepage_id" - end - - create_table "boards", :force => true do |t| - t.integer "project_id", :null => false - t.string "name", :default => "", :null => false - t.string "description" - t.integer "position", :default => 1 - t.integer "topics_count", :default => 0, :null => false - t.integer "messages_count", :default => 0, :null => false - t.integer "last_message_id" - t.integer "parent_id" - t.integer "course_id" - t.integer "org_subfield_id" - end - - add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" - add_index "boards", ["project_id"], :name => "boards_project_id" - - create_table "bug_to_osps", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "changes", :force => true do |t| - t.integer "changeset_id", :null => false - t.string "action", :limit => 1, :default => "", :null => false - t.text "path", :null => false - t.text "from_path" - t.string "from_revision" - t.string "revision" - t.string "branch" - end - - add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" - - create_table "changeset_parents", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "parent_id", :null => false - end - - add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" - add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" - - create_table "changesets", :force => true do |t| - t.integer "repository_id", :null => false - t.string "revision", :null => false - t.string "committer" - t.datetime "committed_on", :null => false - t.text "comments" - t.date "commit_date" - t.string "scmid" - t.integer "user_id" - end - - add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" - add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true - add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" - add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" - add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" - - create_table "changesets_issues", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "issue_id", :null => false - end - - add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true - - create_table "code_review_assignments", :force => true do |t| - t.integer "issue_id" - t.integer "change_id" - t.integer "attachment_id" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.string "action_type" - t.integer "changeset_id" - end - - create_table "code_review_project_settings", :force => true do |t| - t.integer "project_id" - t.integer "tracker_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "updated_by" - t.boolean "hide_code_review_tab", :default => false - t.integer "auto_relation", :default => 1 - t.integer "assignment_tracker_id" - t.text "auto_assign" - t.integer "lock_version", :default => 0, :null => false - t.boolean "tracker_in_review_dialog", :default => false - end - - create_table "code_review_user_settings", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "mail_notification", :default => 0, :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "code_reviews", :force => true do |t| - t.integer "project_id" - t.integer "change_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "line" - t.integer "updated_by_id" - t.integer "lock_version", :default => 0, :null => false - t.integer "status_changed_from" - t.integer "status_changed_to" - t.integer "issue_id" - t.string "action_type" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.integer "attachment_id" - t.integer "file_count", :default => 0, :null => false - t.boolean "diff_all" - end - - create_table "comments", :force => true do |t| - t.string "commented_type", :limit => 30, :default => "", :null => false - t.integer "commented_id", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.text "comments" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "comments", ["author_id"], :name => "index_comments_on_author_id" - add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" - - create_table "contest_notifications", :force => true do |t| - t.text "title" - t.text "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "contesting_projects", :force => true do |t| - t.integer "project_id" - t.string "contest_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "contesting_softapplications", :force => true do |t| - t.integer "softapplication_id" - t.integer "contest_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "contestnotifications", :force => true do |t| - t.integer "contest_id" - t.string "title" - t.string "summary" - t.text "description" - t.integer "author_id" - t.integer "notificationcomments_count" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "contests", :force => true do |t| - t.string "name" - t.string "budget", :default => "" - t.integer "author_id" - t.date "deadline" - t.string "description" - t.integer "commit" - t.string "password" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - create_table "course_activities", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_act_id" - t.string "course_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_attachments", :force => true do |t| - t.string "filename" - t.string "disk_filename" - t.integer "filesize" - t.string "content_type" - t.string "digest" - t.integer "downloads" - t.string "author_id" - t.string "integer" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "container_id", :default => 0 - end - - create_table "course_contributor_scores", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.integer "message_num" - t.integer "message_reply_num" - t.integer "news_reply_num" - t.integer "resource_num" - t.integer "journal_num" - t.integer "journal_reply_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "total_score" - end - - create_table "course_groups", :force => true do |t| - t.string "name" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_infos", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_messages", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_message_id" - t.string "course_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "content" - t.integer "status" - end - - create_table "course_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "course_id" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "courses", :force => true do |t| - t.integer "tea_id" - t.string "name" - t.integer "state" - t.string "code" - t.integer "time" - t.string "extra" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "location" - t.string "term" - t.string "string" - t.string "password" - t.string "setup_time" - t.string "endup_time" - t.string "class_period" - t.integer "school_id" - t.text "description" - t.integer "status", :default => 1 - t.integer "attachmenttype", :default => 2 - t.integer "lft" - t.integer "rgt" - t.integer "is_public", :limit => 1, :default => 1 - t.integer "inherit_members", :limit => 1, :default => 1 - t.integer "open_student", :default => 0 - t.integer "outline", :default => 0 - t.integer "publish_resource", :default => 0 - t.integer "is_delete", :default => 0 - t.integer "end_time" - t.string "end_term" - t.integer "is_excellent", :default => 0 - t.integer "excellent_option", :default => 0 - t.integer "is_copy", :default => 0 - end - - create_table "custom_fields", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.string "field_format", :limit => 30, :default => "", :null => false - t.text "possible_values" - t.string "regexp", :default => "" - t.integer "min_length", :default => 0, :null => false - t.integer "max_length", :default => 0, :null => false - t.boolean "is_required", :default => false, :null => false - t.boolean "is_for_all", :default => false, :null => false - t.boolean "is_filter", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "searchable", :default => false - t.text "default_value" - t.boolean "editable", :default => true - t.boolean "visible", :default => true, :null => false - t.boolean "multiple", :default => false - end - - add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" - - create_table "custom_fields_projects", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "project_id", :default => 0, :null => false - end - - add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true - - create_table "custom_fields_trackers", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true - - create_table "custom_values", :force => true do |t| - t.string "customized_type", :limit => 30, :default => "", :null => false - t.integer "customized_id", :default => 0, :null => false - t.integer "custom_field_id", :default => 0, :null => false - t.text "value" - end - - add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" - add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" - - create_table "delayed_jobs", :force => true do |t| - t.integer "priority", :default => 0, :null => false - t.integer "attempts", :default => 0, :null => false - t.text "handler", :null => false - t.text "last_error" - t.datetime "run_at" - t.datetime "locked_at" - t.datetime "failed_at" - t.string "locked_by" - t.string "queue" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" - - create_table "discuss_demos", :force => true do |t| - t.string "title" - t.text "body" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "documents", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "category_id", :default => 0, :null => false - t.string "title", :limit => 60, :default => "", :null => false - t.text "description" - t.datetime "created_on" - t.integer "user_id", :default => 0 - t.integer "is_public", :default => 1 - end - - add_index "documents", ["category_id"], :name => "index_documents_on_category_id" - add_index "documents", ["created_on"], :name => "index_documents_on_created_on" - add_index "documents", ["project_id"], :name => "documents_project_id" - - create_table "dts", :primary_key => "Num", :force => true do |t| - t.string "Defect", :limit => 50 - t.string "Category", :limit => 50 - t.string "File" - t.string "Method" - t.string "Module", :limit => 20 - t.string "Variable", :limit => 50 - t.integer "StartLine" - t.integer "IPLine" - t.string "IPLineCode", :limit => 200 - t.string "Judge", :limit => 15 - t.integer "Review", :limit => 1 - t.string "Description" - t.text "PreConditions", :limit => 2147483647 - t.text "TraceInfo", :limit => 2147483647 - t.text "Code", :limit => 2147483647 - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "id", :null => false - end - - create_table "editor_of_documents", :force => true do |t| - t.integer "editor_id" - t.integer "org_document_comment_id" - t.datetime "created_at" - end - - create_table "enabled_modules", :force => true do |t| - t.integer "project_id" - t.string "name", :null => false - t.integer "course_id" - end - - add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" - - create_table "enumerations", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "is_default", :default => false, :null => false - t.string "type" - t.boolean "active", :default => true, :null => false - t.integer "project_id" - t.integer "parent_id" - t.string "position_name", :limit => 30 - end - - add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" - add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" - - create_table "exercise_answers", :force => true do |t| - t.integer "user_id" - t.integer "exercise_question_id" - t.integer "exercise_choice_id" - t.text "answer_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_choices", :force => true do |t| - t.integer "exercise_question_id" - t.text "choice_text" - t.integer "choice_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_questions", :force => true do |t| - t.text "question_title" - t.integer "question_type" - t.integer "question_number" - t.integer "exercise_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_score" - end - - create_table "exercise_standard_answers", :force => true do |t| - t.integer "exercise_question_id" - t.integer "exercise_choice_id" - t.text "answer_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_users", :force => true do |t| - t.integer "user_id" - t.integer "exercise_id" - t.integer "score" - t.datetime "start_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.datetime "end_at" - t.integer "status" - end - - create_table "exercises", :force => true do |t| - t.text "exercise_name" - t.text "exercise_description" - t.integer "course_id" - t.integer "exercise_status" - t.integer "user_id" - t.integer "time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.datetime "publish_time" - t.datetime "end_time" - t.integer "show_result" - end - - create_table "first_pages", :force => true do |t| - t.string "web_title" - t.string "title" - t.text "description" - t.string "page_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sort_type" - t.integer "image_width", :default => 107 - t.integer "image_height", :default => 63 - t.integer "show_course", :default => 1 - t.integer "show_contest", :default => 1 - end - - create_table "forge_activities", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_act_id" - t.string "forge_act_type" - t.integer "org_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" - - create_table "forge_messages", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_message_id" - t.string "forge_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "secret_key" - t.integer "status" - end - - create_table "forums", :force => true do |t| - t.string "name", :null => false - t.text "description" - t.integer "topic_count", :default => 0 - t.integer "memo_count", :default => 0 - t.integer "last_memo_id", :default => 0 - t.integer "creator_id", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sticky" - t.integer "locked" - end - - create_table "forwards", :force => true do |t| - t.integer "from_id" - t.string "from_type" - t.integer "to_id" - t.string "to_type" - t.datetime "created_at" - end - - create_table "groups_users", :id => false, :force => true do |t| - t.integer "group_id", :null => false - t.integer "user_id", :null => false - end - - add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true - - create_table "homework_attaches", :force => true do |t| - t.integer "bid_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - t.string "name" - t.text "description" - t.integer "state" - t.integer "project_id", :default => 0 - t.float "score", :default => 0.0 - t.integer "is_teacher_score", :default => 0 - end - - add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" - - create_table "homework_commons", :force => true do |t| - t.string "name" - t.integer "user_id" - t.text "description" - t.date "publish_time" - t.date "end_time" - t.integer "homework_type", :default => 1 - t.string "late_penalty" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "teacher_priority", :default => 1 - t.integer "anonymous_comment", :default => 0 - t.integer "quotes", :default => 0 - t.integer "is_open", :default => 0 - end - - add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id" - - create_table "homework_detail_groups", :force => true do |t| - t.integer "homework_common_id" - t.integer "min_num" - t.integer "max_num" - t.integer "base_on_project" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "homework_detail_groups", ["homework_common_id"], :name => "index_homework_detail_groups_on_homework_common_id" - - create_table "homework_detail_manuals", :force => true do |t| - t.float "ta_proportion" - t.integer "comment_status" - t.date "evaluation_start" - t.date "evaluation_end" - t.integer "evaluation_num" - t.integer "absence_penalty", :default => 1 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_detail_programings", :force => true do |t| - t.string "language" - t.text "standard_code", :limit => 2147483647 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "ta_proportion", :default => 0.1 - t.integer "question_id" - end - - create_table "homework_evaluations", :force => true do |t| - t.string "user_id" - t.string "homework_attach_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_for_courses", :force => true do |t| - t.integer "course_id" - t.integer "bid_id" - end - - add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id" - add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id" - - create_table "homework_tests", :force => true do |t| - t.text "input" - t.text "output" - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "result" - t.text "error_msg" - end - - create_table "homework_users", :force => true do |t| - t.string "homework_attach_id" - t.string "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "invite_lists", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "mail" - end - - create_table "issue_categories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.integer "assigned_to_id" - end - - add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" - add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" - - create_table "issue_relations", :force => true do |t| - t.integer "issue_from_id", :null => false - t.integer "issue_to_id", :null => false - t.string "relation_type", :default => "", :null => false - t.integer "delay" - end - - add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true - add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" - add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" - - create_table "issue_statuses", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_closed", :default => false, :null => false - t.boolean "is_default", :default => false, :null => false - t.integer "position", :default => 1 - t.integer "default_done_ratio" - end - - add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" - add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" - add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" - - create_table "issues", :force => true do |t| - t.integer "tracker_id", :null => false - t.integer "project_id", :null => false - t.string "subject", :default => "", :null => false - t.text "description" - t.date "due_date" - t.integer "category_id" - t.integer "status_id", :null => false - t.integer "assigned_to_id" - t.integer "priority_id", :null => false - t.integer "fixed_version_id" - t.integer "author_id", :null => false - t.integer "lock_version", :default => 0, :null => false - t.datetime "created_on" - t.datetime "updated_on" - t.date "start_date" - t.integer "done_ratio", :default => 0, :null => false - t.float "estimated_hours" - t.integer "parent_id" - t.integer "root_id" - t.integer "lft" - t.integer "rgt" - t.boolean "is_private", :default => false, :null => false - t.datetime "closed_on" - t.integer "project_issues_index" - end - - add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" - add_index "issues", ["author_id"], :name => "index_issues_on_author_id" - add_index "issues", ["category_id"], :name => "index_issues_on_category_id" - add_index "issues", ["created_on"], :name => "index_issues_on_created_on" - add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" - add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" - add_index "issues", ["project_id"], :name => "issues_project_id" - add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" - add_index "issues", ["status_id"], :name => "index_issues_on_status_id" - add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" - - create_table "join_in_competitions", :force => true do |t| - t.integer "user_id" - t.integer "competition_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "join_in_contests", :force => true do |t| - t.integer "user_id" - t.integer "bid_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "journal_details", :force => true do |t| - t.integer "journal_id", :default => 0, :null => false - t.string "property", :limit => 30, :default => "", :null => false - t.string "prop_key", :limit => 30, :default => "", :null => false - t.text "old_value" - t.text "value" - end - - add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" - - create_table "journal_replies", :id => false, :force => true do |t| - t.integer "journal_id" - t.integer "user_id" - t.integer "reply_id" - end - - add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" - add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" - add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" - - create_table "journals", :force => true do |t| - t.integer "journalized_id", :default => 0, :null => false - t.string "journalized_type", :limit => 30, :default => "", :null => false - t.integer "user_id", :default => 0, :null => false - t.text "notes" - t.datetime "created_on", :null => false - t.boolean "private_notes", :default => false, :null => false - end - - add_index "journals", ["created_on"], :name => "index_journals_on_created_on" - add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" - add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" - add_index "journals", ["user_id"], :name => "index_journals_on_user_id" - - create_table "journals_for_messages", :force => true do |t| - t.integer "jour_id" - t.string "jour_type" - t.integer "user_id" - t.text "notes" - t.integer "status" - t.integer "reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.string "m_parent_id" - t.boolean "is_readed" - t.integer "m_reply_count" - t.integer "m_reply_id" - t.integer "is_comprehensive_evaluation" - t.integer "private", :default => 0 - end - - create_table "kindeditor_assets", :force => true do |t| - t.string "asset" - t.integer "file_size" - t.string "file_type" - t.integer "owner_id" - t.string "asset_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "owner_type", :default => 0 - end - - create_table "member_roles", :force => true do |t| - t.integer "member_id", :null => false - t.integer "role_id", :null => false - t.integer "inherited_from" - end - - add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" - add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" - - create_table "members", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "project_id", :default => 0 - t.datetime "created_on" - t.boolean "mail_notification", :default => false, :null => false - t.integer "course_id", :default => -1 - t.integer "course_group_id", :default => 0 - end - - add_index "members", ["project_id"], :name => "index_members_on_project_id" - add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true - add_index "members", ["user_id"], :name => "index_members_on_user_id" - - create_table "memo_messages", :force => true do |t| - t.integer "user_id" - t.integer "forum_id" - t.integer "memo_id" - t.string "memo_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "memos", :force => true do |t| - t.integer "forum_id", :null => false - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :null => false - t.integer "author_id", :null => false - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count", :default => 0 - end - - create_table "message_alls", :force => true do |t| - t.integer "user_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "messages", :force => true do |t| - t.integer "board_id", :null => false - t.integer "parent_id" - t.string "subject", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "replies_count", :default => 0, :null => false - t.integer "last_reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "reply_id" - t.integer "quotes" - t.integer "status", :default => 0 - end - - add_index "messages", ["author_id"], :name => "index_messages_on_author_id" - add_index "messages", ["board_id"], :name => "messages_board_id" - add_index "messages", ["created_on"], :name => "index_messages_on_created_on" - add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" - add_index "messages", ["parent_id"], :name => "messages_parent_id" - - create_table "news", :force => true do |t| - t.integer "project_id" - t.string "title", :limit => 60, :default => "", :null => false - t.string "summary", :default => "" - t.text "description" - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.integer "comments_count", :default => 0, :null => false - t.integer "course_id" - t.integer "sticky", :default => 0 - t.integer "org_subfield_id" - end - - add_index "news", ["author_id"], :name => "index_news_on_author_id" - add_index "news", ["created_on"], :name => "index_news_on_created_on" - add_index "news", ["project_id"], :name => "news_project_id" - - create_table "no_uses", :force => true do |t| - t.integer "user_id", :null => false - t.string "no_use_type" - t.integer "no_use_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "notificationcomments", :force => true do |t| - t.string "notificationcommented_type" - t.integer "notificationcommented_id" - t.integer "author_id" - t.text "notificationcomments" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "onclick_times", :force => true do |t| - t.integer "user_id" - t.datetime "onclick_time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "open_id_authentication_associations", :force => true do |t| - t.integer "issued" - t.integer "lifetime" - t.string "handle" - t.string "assoc_type" - t.binary "server_url" - t.binary "secret" - end - - create_table "open_id_authentication_nonces", :force => true do |t| - t.integer "timestamp", :null => false - t.string "server_url" - t.string "salt", :null => false - end - - create_table "open_source_projects", :force => true do |t| - t.string "name" - t.text "description" - t.integer "commit_count", :default => 0 - t.integer "code_line", :default => 0 - t.integer "users_count", :default => 0 - t.date "last_commit_time" - t.string "url" - t.date "date_collected" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "option_numbers", :force => true do |t| - t.integer "user_id" - t.integer "memo" - t.integer "messages_for_issues" - t.integer "issues_status" - t.integer "replay_for_message" - t.integer "replay_for_memo" - t.integer "follow" - t.integer "tread" - t.integer "praise_by_one" - t.integer "praise_by_two" - t.integer "praise_by_three" - t.integer "tread_by_one" - t.integer "tread_by_two" - t.integer "tread_by_three" - t.integer "changeset" - t.integer "document" - t.integer "attachment" - t.integer "issue_done_ratio" - t.integer "post_issue" - t.integer "score_type" - t.integer "total_score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - end - - create_table "org_activities", :force => true do |t| - t.integer "user_id" - t.integer "org_act_id" - t.string "org_act_type" - t.integer "container_id" - t.string "container_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_courses", :force => true do |t| - t.integer "organization_id" - t.integer "course_id" - t.datetime "created_at" - end - - create_table "org_document_comments", :force => true do |t| - t.text "title" - t.text "content" - t.integer "organization_id" - t.integer "creator_id" - t.integer "parent_id" - t.integer "reply_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "org_subfield_id" - end - - create_table "org_member_roles", :force => true do |t| - t.integer "org_member_id" - t.integer "role_id" - end - - create_table "org_members", :force => true do |t| - t.integer "user_id" - t.integer "organization_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_messages", :force => true do |t| - t.integer "user_id" - t.integer "sender_id" - t.integer "organization_id" - t.string "message_type" - t.integer "message_id" - t.integer "viewed" - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "status", :default => 0 - end - - create_table "org_projects", :force => true do |t| - t.integer "organization_id" - t.integer "project_id" - t.datetime "created_at" - end - - create_table "org_subfield_messages", :force => true do |t| - t.integer "org_subfield_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_subfields", :force => true do |t| - t.integer "organization_id" - t.integer "priority" - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "field_type" - t.integer "hide", :default => 0 - end - - create_table "organizations", :force => true do |t| - t.string "name" - t.text "description" - t.integer "creator_id" - t.integer "home_id" - t.boolean "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "allow_guest_download", :default => true - end - - create_table "phone_app_versions", :force => true do |t| - t.string "version" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_answers", :force => true do |t| - t.integer "poll_question_id" - t.text "answer_text" - t.integer "answer_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_questions", :force => true do |t| - t.string "question_title" - t.integer "question_type" - t.integer "is_necessary" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_number" - end - - create_table "poll_users", :force => true do |t| - t.integer "user_id" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_votes", :force => true do |t| - t.integer "user_id" - t.integer "poll_question_id" - t.integer "poll_answer_id" - t.text "vote_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "polls", :force => true do |t| - t.string "polls_name" - t.string "polls_type" - t.integer "polls_group_id" - t.integer "polls_status" - t.integer "user_id" - t.datetime "published_at" - t.datetime "closed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "polls_description" - t.integer "show_result", :default => 1 - end - - create_table "praise_tread_caches", :force => true do |t| - t.integer "object_id", :null => false - t.string "object_type" - t.integer "praise_num" - t.integer "tread_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "praise_treads", :force => true do |t| - t.integer "user_id", :null => false - t.integer "praise_tread_object_id" - t.string "praise_tread_object_type" - t.integer "praise_or_tread" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "principal_activities", :force => true do |t| - t.integer "user_id" - t.integer "principal_id" - t.integer "principal_act_id" - t.string "principal_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_infos", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_scores", :force => true do |t| - t.string "project_id" - t.integer "score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "issue_num", :default => 0 - t.integer "issue_journal_num", :default => 0 - t.integer "news_num", :default => 0 - t.integer "documents_num", :default => 0 - t.integer "changeset_num", :default => 0 - t.integer "board_message_num", :default => 0 - t.integer "board_num", :default => 0 - t.integer "attach_num", :default => 0 - t.datetime "commit_time" - end - - create_table "project_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "project_id" - t.integer "project_type" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - end - - add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" - - create_table "projecting_softapplictions", :force => true do |t| - t.integer "user_id" - t.integer "softapplication_id" - t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "projects", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - t.string "homepage", :default => "" - t.boolean "is_public", :default => true, :null => false - t.integer "parent_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "identifier" - t.integer "status", :default => 1, :null => false - t.integer "lft" - t.integer "rgt" - t.boolean "inherit_members", :default => false, :null => false - t.integer "project_type" - t.boolean "hidden_repo", :default => false, :null => false - t.integer "attachmenttype", :default => 1 - t.integer "user_id" - t.integer "dts_test", :default => 0 - t.string "enterprise_name" - t.integer "organization_id" - t.integer "project_new_type" - t.integer "gpid" - t.integer "forked_from_project_id" - t.integer "forked_count" - t.integer "commits_count", :default => 0 - t.integer "publish_resource", :default => 0 - t.integer "issues_count", :default => 0 - t.integer "attachments_count", :default => 0 - t.integer "boards_count", :default => 0 - t.integer "news_count", :default => 0 - t.integer "acts_count", :default => 0 - t.integer "journals_count", :default => 0 - t.integer "boards_reply_count", :default => 0 - end - - add_index "projects", ["lft"], :name => "index_projects_on_lft" - add_index "projects", ["rgt"], :name => "index_projects_on_rgt" - - create_table "projects_trackers", :id => false, :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true - add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" - - create_table "queries", :force => true do |t| - t.integer "project_id" - t.string "name", :default => "", :null => false - t.text "filters" - t.integer "user_id", :default => 0, :null => false - t.boolean "is_public", :default => false, :null => false - t.text "column_names" - t.text "sort_criteria" - t.string "group_by" - t.string "type" - end - - add_index "queries", ["project_id"], :name => "index_queries_on_project_id" - add_index "queries", ["user_id"], :name => "index_queries_on_user_id" - - create_table "relative_memo_to_open_source_projects", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "relative_memos", :force => true do |t| - t.integer "osp_id" - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :limit => 16777215, :null => false - t.integer "author_id" - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.boolean "is_quote", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count_crawl", :default => 0 - t.integer "viewed_count_local", :default => 0 - t.string "url" - t.string "username" - t.string "userhomeurl" - t.date "date_collected" - t.string "topic_resource" - end - - create_table "repositories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "url", :default => "", :null => false - t.string "login", :limit => 60, :default => "" - t.string "password", :default => "" - t.string "root_url", :default => "" - t.string "type" - t.string "path_encoding", :limit => 64 - t.string "log_encoding", :limit => 64 - t.text "extra_info" - t.string "identifier" - t.boolean "is_default", :default => false - t.boolean "hidden", :default => false - end - - add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" - - create_table "rich_rich_files", :force => true do |t| - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "rich_file_file_name" - t.string "rich_file_content_type" - t.integer "rich_file_file_size" - t.datetime "rich_file_updated_at" - t.string "owner_type" - t.integer "owner_id" - t.text "uri_cache" - t.string "simplified_type", :default => "file" - end - - create_table "roles", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "assignable", :default => true - t.integer "builtin", :default => 0, :null => false - t.text "permissions" - t.string "issues_visibility", :limit => 30, :default => "default", :null => false - end - - create_table "schools", :force => true do |t| - t.string "name" - t.string "province" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "logo_link" - t.string "pinyin" - end - - create_table "secdomains", :force => true do |t| - t.integer "sub_type" - t.string "subname" - t.integer "pid", :default => 0 - t.string "desc" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "seems_rateable_cached_ratings", :force => true do |t| - t.integer "cacheable_id", :limit => 8 - t.string "cacheable_type" - t.float "avg", :null => false - t.integer "cnt", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "seems_rateable_rates", :force => true do |t| - t.integer "rater_id", :limit => 8 - t.integer "rateable_id" - t.string "rateable_type" - t.float "stars", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "is_teacher_score", :default => 0 - end - - create_table "settings", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "value" - t.datetime "updated_on" - end - - add_index "settings", ["name"], :name => "index_settings_on_name" - - create_table "shares", :force => true do |t| - t.date "created_on" - t.string "url" - t.string "title" - t.integer "share_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - t.integer "user_id" - t.string "description" - end - - create_table "shield_activities", :force => true do |t| - t.string "container_type" - t.integer "container_id" - t.string "shield_type" - t.integer "shield_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "softapplications", :force => true do |t| - t.string "name" - t.text "description" - t.integer "app_type_id" - t.string "app_type_name" - t.string "android_min_version_available" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "contest_id" - t.integer "softapplication_id" - t.integer "is_public" - t.string "application_developers" - t.string "deposit_project_url" - t.string "deposit_project" - t.integer "project_id" - end - - create_table "student_work_projects", :force => true do |t| - t.integer "homework_common_id" - t.integer "student_work_id" - t.integer "project_id" - t.integer "user_id" - t.integer "is_leader" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "student_work_projects", ["homework_common_id"], :name => "index_student_work_projects_on_homework_common_id" - add_index "student_work_projects", ["project_id"], :name => "index_student_work_projects_on_project_id" - add_index "student_work_projects", ["student_work_id"], :name => "index_student_work_projects_on_student_work_id" - add_index "student_work_projects", ["user_id"], :name => "index_student_work_projects_on_user_id" - - create_table "student_work_tests", :force => true do |t| - t.integer "student_work_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "status", :default => 9 - t.text "results" - t.text "src" - end - - create_table "student_works", :force => true do |t| - t.string "name" - t.text "description", :limit => 2147483647 - t.integer "homework_common_id" - t.integer "user_id" - t.float "final_score" - t.float "teacher_score" - t.float "student_score" - t.float "teaching_asistant_score" - t.integer "project_id", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "late_penalty", :default => 0 - t.integer "absence_penalty", :default => 0 - t.float "system_score", :default => 0.0 - t.boolean "is_test", :default => false - end - - add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id" - - create_table "student_works_evaluation_distributions", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "student_works_scores", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.integer "score" - t.text "comment" - t.integer "reviewer_role" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "students_for_courses", :force => true do |t| - t.integer "student_id" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" - add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" - - create_table "subfield_subdomain_dirs", :force => true do |t| - t.integer "org_subfield_id" - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "system_messages", :force => true do |t| - t.integer "user_id" - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "description" - t.string "subject" - end - - create_table "taggings", :force => true do |t| - t.integer "tag_id" - t.integer "taggable_id" - t.string "taggable_type" - t.integer "tagger_id" - t.string "tagger_type" - t.string "context", :limit => 128 - t.datetime "created_at" - end - - add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" - add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" - add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" - - create_table "tags", :force => true do |t| - t.string "name" - end - - create_table "teachers", :force => true do |t| - t.string "tea_name" - t.string "location" - t.integer "couurse_time" - t.integer "course_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "extra" - end - - create_table "time_entries", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - t.integer "issue_id" - t.float "hours", :null => false - t.string "comments" - t.integer "activity_id", :null => false - t.date "spent_on", :null => false - t.integer "tyear", :null => false - t.integer "tmonth", :null => false - t.integer "tweek", :null => false - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" - add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" - add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" - add_index "time_entries", ["project_id"], :name => "time_entries_project_id" - add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" - - create_table "tokens", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.string "action", :limit => 30, :default => "", :null => false - t.string "value", :limit => 40, :default => "", :null => false - t.datetime "created_on", :null => false - end - - add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" - add_index "tokens", ["value"], :name => "tokens_value", :unique => true - - create_table "trackers", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_in_chlog", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "is_in_roadmap", :default => true, :null => false - t.integer "fields_bits", :default => 0 - end - - create_table "user_activities", :force => true do |t| - t.string "act_type" - t.integer "act_id" - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "user_id" - end - - create_table "user_extensions", :force => true do |t| - t.integer "user_id", :null => false - t.date "birthday" - t.string "brief_introduction" - t.integer "gender" - t.string "location" - t.string "occupation" - t.integer "work_experience" - t.integer "zip_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "technical_title" - t.integer "identity" - t.string "student_id" - t.string "teacher_realname" - t.string "student_realname" - t.string "location_city" - t.integer "school_id" - t.string "description", :default => "" - end - - create_table "user_feedback_messages", :force => true do |t| - t.integer "user_id" - t.integer "journals_for_message_id" - t.string "journals_for_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_grades", :force => true do |t| - t.integer "user_id", :null => false - t.integer "project_id", :null => false - t.float "grade", :default => 0.0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" - add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" - add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" - - create_table "user_levels", :force => true do |t| - t.integer "user_id" - t.integer "level" - end - - create_table "user_preferences", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.text "others" - t.boolean "hide_mail", :default => false - t.string "time_zone" - end - - add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" - - create_table "user_score_details", :force => true do |t| - t.integer "current_user_id" - t.integer "target_user_id" - t.string "score_type" - t.string "score_action" - t.integer "user_id" - t.integer "old_score" - t.integer "new_score" - t.integer "current_user_level" - t.integer "target_user_level" - t.integer "score_changeable_obj_id" - t.string "score_changeable_obj_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_scores", :force => true do |t| - t.integer "user_id", :null => false - t.integer "collaboration" - t.integer "influence" - t.integer "skill" - t.integer "active" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "grade", :default => 0.0 - end - - add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" - add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" - add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" - - create_table "users", :force => true do |t| - t.string "login", :default => "", :null => false - t.string "hashed_password", :limit => 40, :default => "", :null => false - t.string "firstname", :limit => 30, :default => "", :null => false - t.string "lastname", :default => "", :null => false - t.string "mail", :limit => 60, :default => "", :null => false - t.boolean "admin", :default => false, :null => false - t.integer "status", :default => 1, :null => false - t.datetime "last_login_on" - t.string "language", :limit => 5, :default => "" - t.integer "auth_source_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "type" - t.string "identity_url" - t.string "mail_notification", :default => "", :null => false - t.string "salt", :limit => 64 - t.integer "gid" - end - - add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" - add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" - add_index "users", ["type"], :name => "index_users_on_type" - - create_table "versions", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :default => "", :null => false - t.string "description", :default => "" - t.date "effective_date" - t.datetime "created_on" - t.datetime "updated_on" - t.string "wiki_page_title" - t.string "status", :default => "open" - t.string "sharing", :default => "none", :null => false - end - - add_index "versions", ["project_id"], :name => "versions_project_id" - add_index "versions", ["sharing"], :name => "index_versions_on_sharing" - - create_table "visitors", :force => true do |t| - t.integer "user_id" - t.integer "master_id" - t.datetime "updated_on" - t.datetime "created_on" - end - - add_index "visitors", ["master_id"], :name => "index_visitors_master_id" - add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" - add_index "visitors", ["user_id"], :name => "index_visitors_user_id" - - create_table "watchers", :force => true do |t| - t.string "watchable_type", :default => "", :null => false - t.integer "watchable_id", :default => 0, :null => false - t.integer "user_id" - end - - add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" - add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" - add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" - - create_table "web_footer_companies", :force => true do |t| - t.string "name" - t.string "logo_size" - t.string "url" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "web_footer_oranizers", :force => true do |t| - t.string "name" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - create_table "wiki_content_versions", :force => true do |t| t.integer "wiki_content_id", :null => false t.integer "page_id", :null => false @@ -4163,4 +2076,3 @@ ActiveRecord::Schema.define(:version => 20160225024759) do end end ->>>>>>> origin/szzh From 509d4a3df7e56893c0ca00f9f16564b58d96c853 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 16:56:37 +0800 Subject: [PATCH 066/209] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=94=B9=E4=B8=BAajax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 6 +++--- .../base_wechat.html.erb} | 1 + app/views/wechats/login.html.erb | 14 +++++++++++--- public/javascripts/wechat/alert.js | 5 +++++ 4 files changed, 20 insertions(+), 6 deletions(-) rename app/views/{wechats/layout.html.erb => layouts/base_wechat.html.erb} (96%) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 1c14aece0..01dd135be 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -1,5 +1,5 @@ class WechatsController < ActionController::Base - layout 'wechat/layout' + layout 'base_wechat' wechat_responder @@ -179,9 +179,9 @@ class WechatsController < ActionController::Base uw = UserWechat.find_by_id(params[:state]) uw.user_id = user.id uw.save! - render :text => {status:0, msg: "绑定成功"} + render :text => {status:0, msg: "绑定成功"}.to_json rescue Exception=>e - render :text => {status: -1, msg: e.message} + render :text => {status: -1, msg: e.message}.to_json end end diff --git a/app/views/wechats/layout.html.erb b/app/views/layouts/base_wechat.html.erb similarity index 96% rename from app/views/wechats/layout.html.erb rename to app/views/layouts/base_wechat.html.erb index 8f93ac9a1..729f762ac 100644 --- a/app/views/wechats/layout.html.erb +++ b/app/views/layouts/base_wechat.html.erb @@ -7,6 +7,7 @@ 绑定用户 + <%= yield %> diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index d0cecb5f9..3d8037c7c 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -50,9 +50,17 @@ type: "POST", url: $("#main_login_form").attr("action"), data:data, - dataType: "json" - }).done(function(data){ - + dataType: 'json', + success: function(data){ + console.log(data); + if(data.status == 0){ + byConfirm(data.msg, function(){ + window.closeWindow(); + }); + } else { + byAlert(data.msg, "绑定失败"); + } + } }); }) diff --git a/public/javascripts/wechat/alert.js b/public/javascripts/wechat/alert.js index bda0150a9..e41718fc2 100644 --- a/public/javascripts/wechat/alert.js +++ b/public/javascripts/wechat/alert.js @@ -35,4 +35,9 @@ $(function(){ $dialog.hide(); }); } + + + window.closeWindow = function(){ + WeixinJSBridge.call('closeWindow'); + } }); \ No newline at end of file From d5e894561965121d6ab4cd91e9f3002d23ec6822 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 17:06:40 +0800 Subject: [PATCH 067/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 6 +++++- config/menu.yml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 01dd135be..beee86472 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -7,7 +7,7 @@ class WechatsController < ActionController::Base # default text responder when no other match on :text do |request, content| - request.reply.text "echo: #{content}" # Just echo + request.reply.text "您的意见已收到" # Just echo end # When receive 'help', will trigger this responder @@ -121,6 +121,10 @@ class WechatsController < ActionController::Base # Any not match above will fail to below on :fallback, respond: 'fallback message' + on :click, with: 'FEEDBACK' do |request, key| + request.reply.text "如有反馈问题,请直接切入至输入框,发微信给我们即可" + end + on :click, with: 'MY_NEWS' do |request, key| uw = user_binded?(request[:FromUserName]) if uw && uw.user diff --git a/config/menu.yml b/config/menu.yml index 1a4927fbd..2f38a48a9 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -6,4 +6,8 @@ button: - type: "view" name: "进入网站" - url: "http://www.trustie.net/" \ No newline at end of file + url: "http://www.trustie.net/" + - + type: "click" + name: "意见返馈" + url: "FEEDBACK" \ No newline at end of file From c33b35383ddbb8e5148896d678ab345dcf7e7499 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 17:13:06 +0800 Subject: [PATCH 068/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- config/menu.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index beee86472..211979318 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -1,3 +1,4 @@ +#coding=utf-8 class WechatsController < ActionController::Base layout 'base_wechat' @@ -158,7 +159,6 @@ class WechatsController < ActionController::Base end def sendBind(request) - logger.deb openid = request[:FromUserName] attrs = wechat.user(openid) UserWechat.delete_all(openid: openid) diff --git a/config/menu.yml b/config/menu.yml index 2f38a48a9..95bc50cc5 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -10,4 +10,4 @@ button: - type: "click" name: "意见返馈" - url: "FEEDBACK" \ No newline at end of file + key: "FEEDBACK" \ No newline at end of file From b82341326752016d7855dfe16cb962a4b6d2cd40 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 17:16:48 +0800 Subject: [PATCH 069/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 211979318..b05099139 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -1,7 +1,5 @@ #coding=utf-8 class WechatsController < ActionController::Base - layout 'base_wechat' - wechat_responder include ApplicationHelper @@ -191,6 +189,7 @@ class WechatsController < ActionController::Base def login @openid = params[:openid] #TODO 安全性 + render 'wechats/login', layout: 'base_wechat' end private From 1b171e414c9d679fdd38a8fda9d61f71c94bd0ec Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 17:31:44 +0800 Subject: [PATCH 070/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index b05099139..937b6af5f 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -157,10 +157,6 @@ class WechatsController < ActionController::Base end def sendBind(request) - openid = request[:FromUserName] - attrs = wechat.user(openid) - UserWechat.delete_all(openid: openid) - uw = UserWechat.create!(attrs) news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } request.reply.news(news) do |article, n, index| # article is return object url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{login_wechat_url}&response_type=code&scope=snsapi_base&state=#{uw.id}#wechat_redirect" @@ -173,14 +169,21 @@ class WechatsController < ActionController::Base def bind begin - raise "非法操作, 微信ID不存在" unless params[:state] + raise "非法操作, 用户ID不存在" unless params[:state] + raise "非法操作, code不存在" unless params[:code] + openid = get_openid(params[:code]) + raise "无法获取到openid" unless openid + user, last_login_on = User.try_to_login(params[:username], params[:password]) raise "用户名或密码错误,请重新登录" unless user #补全用户信息 - uw = UserWechat.find_by_id(params[:state]) - uw.user_id = user.id - uw.save! + raise "此用户已经绑定了公众号" if user.user_wechat + + UserWechat.create!( + openid: openid, + user: user + ) render :text => {status:0, msg: "绑定成功"}.to_json rescue Exception=>e render :text => {status: -1, msg: e.message}.to_json @@ -193,6 +196,12 @@ class WechatsController < ActionController::Base end private + def get_openid(code) + url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=#{Wechat.config.appid}&secret=#{Wechat.config.secret}&code=#{code}&grant_type=authorization_code" + JSON.parse(URI.parse(url).read)["openid"] + end + + def user_binded?(openid) uw = UserWechat.where(openid: openid).first end From 8e1624fafe4ca21f7b0172c5d5f9567d24639b28 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 17:33:48 +0800 Subject: [PATCH 071/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 937b6af5f..4caf5668f 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -159,7 +159,7 @@ class WechatsController < ActionController::Base def sendBind(request) news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } } request.reply.news(news) do |article, n, index| # article is return object - url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{login_wechat_url}&response_type=code&scope=snsapi_base&state=#{uw.id}#wechat_redirect" + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{login_wechat_url}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" article.item title: "#{n[:title]}", description: n[:content], pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', @@ -169,7 +169,6 @@ class WechatsController < ActionController::Base def bind begin - raise "非法操作, 用户ID不存在" unless params[:state] raise "非法操作, code不存在" unless params[:code] openid = get_openid(params[:code]) raise "无法获取到openid" unless openid From f53d9e19f79a512933b14bab50885fcbac796234 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 17:55:03 +0800 Subject: [PATCH 072/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- app/views/wechats/login.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 4caf5668f..ccb3e4bfb 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -190,7 +190,7 @@ class WechatsController < ActionController::Base end def login - @openid = params[:openid] #TODO 安全性 + @code = params[:code] #TODO 安全性 render 'wechats/login', layout: 'base_wechat' end diff --git a/app/views/wechats/login.html.erb b/app/views/wechats/login.html.erb index 3d8037c7c..27898b690 100644 --- a/app/views/wechats/login.html.erb +++ b/app/views/wechats/login.html.erb @@ -23,7 +23,7 @@
- +
确定 From 697906509b17ed3d7a01bcec0ae50cb387a3c87b Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 17:58:54 +0800 Subject: [PATCH 073/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index ccb3e4bfb..77c737359 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -172,6 +172,7 @@ class WechatsController < ActionController::Base raise "非法操作, code不存在" unless params[:code] openid = get_openid(params[:code]) raise "无法获取到openid" unless openid + raise "此微信号已绑定用户, 不能得复绑定" if UserWechat.where(openid: openid).first user, last_login_on = User.try_to_login(params[:username], params[:password]) raise "用户名或密码错误,请重新登录" unless user From 79004e1328829288543d16ebb59752f55e708e3d Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Thu, 3 Mar 2016 23:27:05 +0800 Subject: [PATCH 074/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 14 +++++++++----- config/menu.yml | 10 +++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 77c737359..ac744106a 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -24,7 +24,7 @@ class WechatsController < ActionController::Base end on :event, with: 'subscribe' do |request| - sendBind(request) + default_msg(request) end # When unsubscribe user scan qrcode qrscene_xxxxxx to subscribe in public account @@ -125,6 +125,10 @@ class WechatsController < ActionController::Base end on :click, with: 'MY_NEWS' do |request, key| + default_msg(req) + end + + def default_msg(request) uw = user_binded?(request[:FromUserName]) if uw && uw.user @@ -137,9 +141,9 @@ class WechatsController < ActionController::Base activity = process_activity(a) if activity news << {title: activity[0], - content: activity[1], - picurl: "#{i == 1 ? logo : 'https://www.trustie.net/'+activity[2]}", - url: activity[3] + content: activity[1], + picurl: "#{i == 1 ? logo : 'https://www.trustie.net/'+activity[2]}", + url: activity[3] } end @@ -172,7 +176,7 @@ class WechatsController < ActionController::Base raise "非法操作, code不存在" unless params[:code] openid = get_openid(params[:code]) raise "无法获取到openid" unless openid - raise "此微信号已绑定用户, 不能得复绑定" if UserWechat.where(openid: openid).first + raise "此微信号已绑定用户, 不能得复绑定" if user_binded?(openid) user, last_login_on = User.try_to_login(params[:username], params[:password]) raise "用户名或密码错误,请重新登录" unless user diff --git a/config/menu.yml b/config/menu.yml index 95bc50cc5..c88e94ec4 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -3,11 +3,11 @@ button: type: "click" name: "最新动态" key: "MY_NEWS" - - - type: "view" - name: "进入网站" - url: "http://www.trustie.net/" - type: "click" name: "意见返馈" - key: "FEEDBACK" \ No newline at end of file + key: "FEEDBACK" + - + type: "view" + name: "进入网站" + url: "http://www.trustie.net/" \ No newline at end of file From 3c513085d2cf3a832911b812eca0744391717204 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 7 Mar 2016 21:43:18 +0800 Subject: [PATCH 075/209] =?UTF-8?q?request=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index ac744106a..131d08b1b 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -125,7 +125,7 @@ class WechatsController < ActionController::Base end on :click, with: 'MY_NEWS' do |request, key| - default_msg(req) + default_msg(request) end def default_msg(request) From fbe1b2dac261a3a8557c25bc4970db50c11a73ad Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 21 Mar 2016 18:17:39 +0800 Subject: [PATCH 076/209] Merge branch 'guange_dev' into weixin_guange # Conflicts: # Gemfile # db/schema.rb --- app/api/mobile/api.rb | 3 + app/api/mobile/apis/issues.rb | 17 + app/api/mobile/entities/issue.rb | 9 + app/controllers/wechats_controller.rb | 2 +- public/javascripts/wechat/CommentBox.jsx | 108 + public/javascripts/wechat/JSXTransformer.js | 15924 +++++++++++++ public/javascripts/wechat/browser.min.js | 44 + public/javascripts/wechat/jquery.min.js | 5 + public/javascripts/wechat/marked.min.js | 6 + public/javascripts/wechat/react-dom.js | 42 + public/javascripts/wechat/react.js | 19535 ++++++++++++++++ public/javascripts/wechat/react.min.js | 15 + public/javascripts/wechat/wechat.jsx | 81 + .../javascripts/code_review.js | 706 +- .../stylesheets/activity.css | 6 +- .../stylesheets/code_review.css | 192 +- .../stylesheets/window_js/MIT-LICENSE | 38 +- .../stylesheets/window_js/alert.css | 238 +- .../stylesheets/window_js/alert_lite.css | 176 +- .../stylesheets/window_js/alphacube.css | 300 +- .../stylesheets/window_js/behavior.htc | 100 +- .../stylesheets/window_js/darkX.css | 242 +- .../stylesheets/window_js/debug.css | 50 +- .../stylesheets/window_js/default.css | 310 +- .../stylesheets/window_js/iefix/iepngfix.css | 6 +- .../stylesheets/window_js/iefix/iepngfix.htc | 106 +- .../stylesheets/window_js/lighting.css | 1920 +- .../window_js/lighting/pngbehavior.htc | 134 +- .../stylesheets/window_js/mac_os_x.css | 666 +- .../stylesheets/window_js/mac_os_x_dialog.css | 320 +- .../stylesheets/window_js/nuncio.css | 328 +- .../stylesheets/window_js/spread.css | 216 +- public/stylesheets/weui/weixin.css | 41 + 33 files changed, 38858 insertions(+), 3028 deletions(-) create mode 100644 app/api/mobile/apis/issues.rb create mode 100644 app/api/mobile/entities/issue.rb create mode 100644 public/javascripts/wechat/CommentBox.jsx create mode 100644 public/javascripts/wechat/JSXTransformer.js create mode 100644 public/javascripts/wechat/browser.min.js create mode 100644 public/javascripts/wechat/jquery.min.js create mode 100644 public/javascripts/wechat/marked.min.js create mode 100644 public/javascripts/wechat/react-dom.js create mode 100644 public/javascripts/wechat/react.js create mode 100644 public/javascripts/wechat/react.min.js create mode 100644 public/javascripts/wechat/wechat.jsx create mode 100644 public/stylesheets/weui/weixin.css diff --git a/app/api/mobile/api.rb b/app/api/mobile/api.rb index a59b01776..91cae64ef 100644 --- a/app/api/mobile/api.rb +++ b/app/api/mobile/api.rb @@ -7,6 +7,8 @@ module Mobile require_relative 'apis/upgrade' require_relative 'apis/homeworks' require_relative 'apis/comments' + require_relative 'apis/issues' + class API < Grape::API version 'v1', using: :path format :json @@ -39,6 +41,7 @@ module Mobile mount Apis::Upgrade mount Apis::Homeworks mount Apis::Comments + mount Apis::Issues #add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'}) #add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development? diff --git a/app/api/mobile/apis/issues.rb b/app/api/mobile/apis/issues.rb new file mode 100644 index 000000000..212a505e7 --- /dev/null +++ b/app/api/mobile/apis/issues.rb @@ -0,0 +1,17 @@ +#coding=utf-8 + +module Mobile + module Apis + class Issues< Grape::API + resources :issues do + + desc "get special issuse" + get ':id' do + issue = Issue.find(params[:id]) + present :data, issue, with: Mobile::Entities::Issue + present :status, 0 + end + end + end + end +end diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb new file mode 100644 index 000000000..08edae5e2 --- /dev/null +++ b/app/api/mobile/entities/issue.rb @@ -0,0 +1,9 @@ +module Mobile + module Entities + class Issue + + +
+ ); + } +}); + +var CommentList = React.createClass({ + render: function(){ + + var commentNodes = this.props.data.map(function(comment){ + return ( + + {comment.text} + + ) + }); + + return ( +
+ {commentNodes} +
+ ); + } +}); + +var CommentForm = React.createClass({ + handleSubmit: function(e){ + e.preventDefault(); + + var author = this.refs.author.value.trim(); + var text = this.refs.text.value.trim(); + if(!text || !author){ + return; + } + + this.props.onCommentSubmit({author: author, text: text}); + + this.refs.author.value = ''; + this.refs.text.value = ''; + return; + }, + render: function(){ + return ( +
+ + + +
+ ); + } +}); + + +var Comment = React.createClass({ + + rawMarkup: function() { + var rawMarkup = marked(this.props.children.toString(), {sanitize: true}); + return { __html: rawMarkup }; + }, + + render: function(){ + return ( +
+

+ {this.props.author} +

+ +
+ ) + } +}) + +React.render(, document.getElementById("example")); \ No newline at end of file diff --git a/public/javascripts/wechat/JSXTransformer.js b/public/javascripts/wechat/JSXTransformer.js new file mode 100644 index 000000000..63608d408 --- /dev/null +++ b/public/javascripts/wechat/JSXTransformer.js @@ -0,0 +1,15924 @@ +/** + * JSXTransformer v0.13.0 + */ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSXTransformer = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o + * @license MIT + */ + +var base64 = _dereq_('base64-js') +var ieee754 = _dereq_('ieee754') +var isArray = _dereq_('is-array') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 +Buffer.poolSize = 8192 // not used by this implementation + +var kMaxLength = 0x3fffffff +var rootParent = {} + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Note: + * + * - Implementation must support adding new properties to `Uint8Array` instances. + * Firefox 4-29 lacked support, fixed in Firefox 30+. + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + * + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will + * get the Object implementation, which is slower but will work correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = (function () { + try { + var buf = new ArrayBuffer(0) + var arr = new Uint8Array(buf) + arr.foo = function () { return 42 } + return arr.foo() === 42 && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +})() + +/** + * Class: Buffer + * ============= + * + * The Buffer constructor returns instances of `Uint8Array` that are augmented + * with function properties for all the node `Buffer` API functions. We use + * `Uint8Array` so that square bracket notation works as expected -- it returns + * a single octet. + * + * By augmenting the instances, we can avoid modifying the `Uint8Array` + * prototype. + */ +function Buffer (subject, encoding, noZero) { + if (!(this instanceof Buffer)) return new Buffer(subject, encoding, noZero) + + var type = typeof subject + var length + + if (type === 'number') { + length = +subject + } else if (type === 'string') { + length = Buffer.byteLength(subject, encoding) + } else if (type === 'object' && subject !== null) { + // assume object is array-like + if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data + length = +subject.length + } else { + throw new TypeError('must start with number, buffer, array or string') + } + + if (length > kMaxLength) { + throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + + kMaxLength.toString(16) + ' bytes') + } + + if (length < 0) length = 0 + else length >>>= 0 // coerce to uint32 + + var self = this + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Preferred: Return an augmented `Uint8Array` instance for best performance + /*eslint-disable consistent-this */ + self = Buffer._augment(new Uint8Array(length)) + /*eslint-enable consistent-this */ + } else { + // Fallback: Return THIS instance of Buffer (created by `new`) + self.length = length + self._isBuffer = true + } + + var i + if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') { + // Speed optimization -- use set if we're copying from a typed array + self._set(subject) + } else if (isArrayish(subject)) { + // Treat array-ish objects as a byte array + if (Buffer.isBuffer(subject)) { + for (i = 0; i < length; i++) { + self[i] = subject.readUInt8(i) + } + } else { + for (i = 0; i < length; i++) { + self[i] = ((subject[i] % 256) + 256) % 256 + } + } + } else if (type === 'string') { + self.write(subject, 0, encoding) + } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) { + for (i = 0; i < length; i++) { + self[i] = 0 + } + } + + if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent + + return self +} + +function SlowBuffer (subject, encoding, noZero) { + if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding, noZero) + + var buf = new Buffer(subject, encoding, noZero) + delete buf.parent + return buf +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + for (var i = 0, len = Math.min(x, y); i < len && a[i] === b[i]; i++) {} + if (i !== len) { + x = a[i] + y = b[i] + } + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'raw': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, totalLength) { + if (!isArray(list)) throw new TypeError('Usage: Buffer.concat(list[, length])') + + if (list.length === 0) { + return new Buffer(0) + } else if (list.length === 1) { + return list[0] + } + + var i + if (totalLength === undefined) { + totalLength = 0 + for (i = 0; i < list.length; i++) { + totalLength += list[i].length + } + } + + var buf = new Buffer(totalLength) + var pos = 0 + for (i = 0; i < list.length; i++) { + var item = list[i] + item.copy(buf, pos) + pos += item.length + } + return buf +} + +Buffer.byteLength = function byteLength (str, encoding) { + var ret + str = str + '' + switch (encoding || 'utf8') { + case 'ascii': + case 'binary': + case 'raw': + ret = str.length + break + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + ret = str.length * 2 + break + case 'hex': + ret = str.length >>> 1 + break + case 'utf8': + case 'utf-8': + ret = utf8ToBytes(str).length + break + case 'base64': + ret = base64ToBytes(str).length + break + default: + ret = str.length + } + return ret +} + +// pre-set for values that may exist in the future +Buffer.prototype.length = undefined +Buffer.prototype.parent = undefined + +// toString(encoding, start=0, end=buffer.length) +Buffer.prototype.toString = function toString (encoding, start, end) { + var loweredCase = false + + start = start >>> 0 + end = end === undefined || end === Infinity ? this.length : end >>> 0 + + if (!encoding) encoding = 'utf8' + if (start < 0) start = 0 + if (end > this.length) end = this.length + if (end <= start) return '' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'binary': + return binarySlice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return 0 + return Buffer.compare(this, b) +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset) { + if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff + else if (byteOffset < -0x80000000) byteOffset = -0x80000000 + byteOffset >>= 0 + + if (this.length === 0) return -1 + if (byteOffset >= this.length) return -1 + + // Negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) + + if (typeof val === 'string') { + if (val.length === 0) return -1 // special case: looking for empty string always fails + return String.prototype.indexOf.call(this, val, byteOffset) + } + if (Buffer.isBuffer(val)) { + return arrayIndexOf(this, val, byteOffset) + } + if (typeof val === 'number') { + if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { + return Uint8Array.prototype.indexOf.call(this, val, byteOffset) + } + return arrayIndexOf(this, [ val ], byteOffset) + } + + function arrayIndexOf (arr, val, byteOffset) { + var foundIndex = -1 + for (var i = 0; byteOffset + i < arr.length; i++) { + if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex + } else { + foundIndex = -1 + } + } + return -1 + } + + throw new TypeError('val must be string, number or Buffer') +} + +// `get` will be removed in Node 0.13+ +Buffer.prototype.get = function get (offset) { + console.log('.get() is deprecated. Access using array indexes instead.') + return this.readUInt8(offset) +} + +// `set` will be removed in Node 0.13+ +Buffer.prototype.set = function set (v, offset) { + console.log('.set() is deprecated. Access using array indexes instead.') + return this.writeUInt8(v, offset) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new Error('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; i++) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) throw new Error('Invalid hex string') + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + var charsWritten = blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) + return charsWritten +} + +function asciiWrite (buf, string, offset, length) { + var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length) + return charsWritten +} + +function binaryWrite (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length) + return charsWritten +} + +function utf16leWrite (buf, string, offset, length) { + var charsWritten = blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) + return charsWritten +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length + length = undefined + } + } else { // legacy + var swap = encoding + encoding = offset + offset = length + length = swap + } + + offset = Number(offset) || 0 + + if (length < 0 || offset < 0 || offset > this.length) { + throw new RangeError('attempt to write outside buffer bounds') + } + + var remaining = this.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + encoding = String(encoding || 'utf8').toLowerCase() + + var ret + switch (encoding) { + case 'hex': + ret = hexWrite(this, string, offset, length) + break + case 'utf8': + case 'utf-8': + ret = utf8Write(this, string, offset, length) + break + case 'ascii': + ret = asciiWrite(this, string, offset, length) + break + case 'binary': + ret = binaryWrite(this, string, offset, length) + break + case 'base64': + ret = base64Write(this, string, offset, length) + break + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + ret = utf16leWrite(this, string, offset, length) + break + default: + throw new TypeError('Unknown encoding: ' + encoding) + } + return ret +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + var res = '' + var tmp = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + if (buf[i] <= 0x7F) { + res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i]) + tmp = '' + } else { + tmp += '%' + buf[i].toString(16) + } + } + + return res + decodeUtf8Char(tmp) +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function binarySlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; i++) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = Buffer._augment(this.subarray(start, end)) + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined, true) + for (var i = 0; i < sliceLen; i++) { + newBuf[i] = this[i + start] + } + } + + if (newBuf.length) newBuf.parent = this.parent || this + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) >>> 0 & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) >>> 0 & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = value + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = value + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = value + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = value + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkInt( + this, value, offset, byteLength, + Math.pow(2, 8 * byteLength - 1) - 1, + -Math.pow(2, 8 * byteLength - 1) + ) + } + + var i = 0 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkInt( + this, value, offset, byteLength, + Math.pow(2, 8 * byteLength - 1) - 1, + -Math.pow(2, 8 * byteLength - 1) + ) + } + + var i = byteLength - 1 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = value + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = value + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = value + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') + if (offset < 0) throw new RangeError('index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, target_start, start, end) { + var self = this // source + + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (target_start >= target.length) target_start = target.length + if (!target_start) target_start = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || self.length === 0) return 0 + + // Fatal error conditions + if (target_start < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= self.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - target_start < end - start) { + end = target.length - target_start + start + } + + var len = end - start + + if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < len; i++) { + target[i + target_start] = this[i + start] + } + } else { + target._set(this.subarray(start, start + len), target_start) + } + + return len +} + +// fill(value, start=0, end=buffer.length) +Buffer.prototype.fill = function fill (value, start, end) { + if (!value) value = 0 + if (!start) start = 0 + if (!end) end = this.length + + if (end < start) throw new RangeError('end < start') + + // Fill 0 bytes; we're done + if (end === start) return + if (this.length === 0) return + + if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') + if (end < 0 || end > this.length) throw new RangeError('end out of bounds') + + var i + if (typeof value === 'number') { + for (i = start; i < end; i++) { + this[i] = value + } + } else { + var bytes = utf8ToBytes(value.toString()) + var len = bytes.length + for (i = start; i < end; i++) { + this[i] = bytes[i % len] + } + } + + return this +} + +/** + * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. + * Added in Node 0.12. Only available in browsers that support ArrayBuffer. + */ +Buffer.prototype.toArrayBuffer = function toArrayBuffer () { + if (typeof Uint8Array !== 'undefined') { + if (Buffer.TYPED_ARRAY_SUPPORT) { + return (new Buffer(this)).buffer + } else { + var buf = new Uint8Array(this.length) + for (var i = 0, len = buf.length; i < len; i += 1) { + buf[i] = this[i] + } + return buf.buffer + } + } else { + throw new TypeError('Buffer.toArrayBuffer not supported in this browser') + } +} + +// HELPER FUNCTIONS +// ================ + +var BP = Buffer.prototype + +/** + * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods + */ +Buffer._augment = function _augment (arr) { + arr.constructor = Buffer + arr._isBuffer = true + + // save reference to original Uint8Array get/set methods before overwriting + arr._get = arr.get + arr._set = arr.set + + // deprecated, will be removed in node 0.13+ + arr.get = BP.get + arr.set = BP.set + + arr.write = BP.write + arr.toString = BP.toString + arr.toLocaleString = BP.toString + arr.toJSON = BP.toJSON + arr.equals = BP.equals + arr.compare = BP.compare + arr.indexOf = BP.indexOf + arr.copy = BP.copy + arr.slice = BP.slice + arr.readUIntLE = BP.readUIntLE + arr.readUIntBE = BP.readUIntBE + arr.readUInt8 = BP.readUInt8 + arr.readUInt16LE = BP.readUInt16LE + arr.readUInt16BE = BP.readUInt16BE + arr.readUInt32LE = BP.readUInt32LE + arr.readUInt32BE = BP.readUInt32BE + arr.readIntLE = BP.readIntLE + arr.readIntBE = BP.readIntBE + arr.readInt8 = BP.readInt8 + arr.readInt16LE = BP.readInt16LE + arr.readInt16BE = BP.readInt16BE + arr.readInt32LE = BP.readInt32LE + arr.readInt32BE = BP.readInt32BE + arr.readFloatLE = BP.readFloatLE + arr.readFloatBE = BP.readFloatBE + arr.readDoubleLE = BP.readDoubleLE + arr.readDoubleBE = BP.readDoubleBE + arr.writeUInt8 = BP.writeUInt8 + arr.writeUIntLE = BP.writeUIntLE + arr.writeUIntBE = BP.writeUIntBE + arr.writeUInt16LE = BP.writeUInt16LE + arr.writeUInt16BE = BP.writeUInt16BE + arr.writeUInt32LE = BP.writeUInt32LE + arr.writeUInt32BE = BP.writeUInt32BE + arr.writeIntLE = BP.writeIntLE + arr.writeIntBE = BP.writeIntBE + arr.writeInt8 = BP.writeInt8 + arr.writeInt16LE = BP.writeInt16LE + arr.writeInt16BE = BP.writeInt16BE + arr.writeInt32LE = BP.writeInt32LE + arr.writeInt32BE = BP.writeInt32BE + arr.writeFloatLE = BP.writeFloatLE + arr.writeFloatBE = BP.writeFloatBE + arr.writeDoubleLE = BP.writeDoubleLE + arr.writeDoubleBE = BP.writeDoubleBE + arr.fill = BP.fill + arr.inspect = BP.inspect + arr.toArrayBuffer = BP.toArrayBuffer + + return arr +} + +var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function isArrayish (subject) { + return isArray(subject) || Buffer.isBuffer(subject) || + subject && typeof subject === 'object' && + typeof subject.length === 'number' +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + var i = 0 + + for (; i < length; i++) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (leadSurrogate) { + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } else { + // valid surrogate pair + codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 + leadSurrogate = null + } + } else { + // no lead yet + + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else { + // valid lead + leadSurrogate = codePoint + continue + } + } + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = null + } + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x200000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; i++) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; i++) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +function decodeUtf8Char (str) { + try { + return decodeURIComponent(str) + } catch (err) { + return String.fromCharCode(0xFFFD) // UTF 8 invalid char + } +} + +},{"base64-js":4,"ieee754":5,"is-array":6}],4:[function(_dereq_,module,exports){ +var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +;(function (exports) { + 'use strict'; + + var Arr = (typeof Uint8Array !== 'undefined') + ? Uint8Array + : Array + + var PLUS = '+'.charCodeAt(0) + var SLASH = '/'.charCodeAt(0) + var NUMBER = '0'.charCodeAt(0) + var LOWER = 'a'.charCodeAt(0) + var UPPER = 'A'.charCodeAt(0) + var PLUS_URL_SAFE = '-'.charCodeAt(0) + var SLASH_URL_SAFE = '_'.charCodeAt(0) + + function decode (elt) { + var code = elt.charCodeAt(0) + if (code === PLUS || + code === PLUS_URL_SAFE) + return 62 // '+' + if (code === SLASH || + code === SLASH_URL_SAFE) + return 63 // '/' + if (code < NUMBER) + return -1 //no match + if (code < NUMBER + 10) + return code - NUMBER + 26 + 26 + if (code < UPPER + 26) + return code - UPPER + if (code < LOWER + 26) + return code - LOWER + 26 + } + + function b64ToByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + + if (b64.length % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + +},{}],5:[function(_dereq_,module,exports){ +exports.read = function(buffer, offset, isLE, mLen, nBytes) { + var e, m, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + nBits = -7, + i = isLE ? (nBytes - 1) : 0, + d = isLE ? -1 : 1, + s = buffer[offset + i]; + + i += d; + + e = s & ((1 << (-nBits)) - 1); + s >>= (-nBits); + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8); + + m = e & ((1 << (-nBits)) - 1); + e >>= (-nBits); + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8); + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity); + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); +}; + +exports.write = function(buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), + i = isLE ? 0 : (nBytes - 1), + d = isLE ? 1 : -1, + s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8); + + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8); + + buffer[offset + i - d] |= s * 128; +}; + +},{}],6:[function(_dereq_,module,exports){ + +/** + * isArray + */ + +var isArray = Array.isArray; + +/** + * toString + */ + +var str = Object.prototype.toString; + +/** + * Whether or not the given `val` + * is an array. + * + * example: + * + * isArray([]); + * // > true + * isArray(arguments); + * // > false + * isArray(''); + * // > false + * + * @param {mixed} val + * @return {bool} + */ + +module.exports = isArray || function (val) { + return !! val && '[object Array]' == str.call(val); +}; + +},{}],7:[function(_dereq_,module,exports){ +(function (process){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +// Split a filename into [root, dir, basename, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; +var splitPath = function(filename) { + return splitPathRe.exec(filename).slice(1); +}; + +// path.resolve([from ...], to) +// posix version +exports.resolve = function() { + var resolvedPath = '', + resolvedAbsolute = false; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : process.cwd(); + + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + + // Normalize the path + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +}; + +// path.normalize(path) +// posix version +exports.normalize = function(path) { + var isAbsolute = exports.isAbsolute(path), + trailingSlash = substr(path, -1) === '/'; + + // Normalize the path + path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isAbsolute).join('/'); + + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + + return (isAbsolute ? '/' : '') + path; +}; + +// posix version +exports.isAbsolute = function(path) { + return path.charAt(0) === '/'; +}; + +// posix version +exports.join = function() { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function(p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); + } + return p; + }).join('/')); +}; + + +// path.relative(from, to) +// posix version +exports.relative = function(from, to) { + from = exports.resolve(from).substr(1); + to = exports.resolve(to).substr(1); + + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + + return outputParts.join('/'); +}; + +exports.sep = '/'; +exports.delimiter = ':'; + +exports.dirname = function(path) { + var result = splitPath(path), + root = result[0], + dir = result[1]; + + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + + return root + dir; +}; + + +exports.basename = function(path, ext) { + var f = splitPath(path)[2]; + // TODO: make this comparison case-insensitive on windows? + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; +}; + + +exports.extname = function(path) { + return splitPath(path)[3]; +}; + +function filter (xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + return res; +} + +// String.prototype.substr - negative index don't work in IE8 +var substr = 'ab'.substr(-1) === 'b' + ? function (str, start, len) { return str.substr(start, len) } + : function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); + } +; + +}).call(this,_dereq_('_process')) +},{"_process":8}],8:[function(_dereq_,module,exports){ +// shim for using process in browser + +var process = module.exports = {}; +var queue = []; +var draining = false; + +function drainQueue() { + if (draining) { + return; + } + draining = true; + var currentQueue; + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + var i = -1; + while (++i < len) { + currentQueue[i](); + } + len = queue.length; + } + draining = false; +} +process.nextTick = function (fun) { + queue.push(fun); + if (!draining) { + setTimeout(drainQueue, 0); + } +}; + +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],9:[function(_dereq_,module,exports){ +/* + Copyright (C) 2013 Ariya Hidayat + Copyright (C) 2013 Thaddee Tyl + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2012 Mathias Bynens + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Kris Kowal + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +(function (root, factory) { + 'use strict'; + + // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, + // Rhino, and plain browser loading. + + /* istanbul ignore next */ + if (typeof define === 'function' && define.amd) { + define(['exports'], factory); + } else if (typeof exports !== 'undefined') { + factory(exports); + } else { + factory((root.esprima = {})); + } +}(this, function (exports) { + 'use strict'; + + var Token, + TokenName, + FnExprTokens, + Syntax, + PropertyKind, + Messages, + Regex, + SyntaxTreeDelegate, + XHTMLEntities, + ClassPropertyType, + source, + strict, + index, + lineNumber, + lineStart, + length, + delegate, + lookahead, + state, + extra; + + Token = { + BooleanLiteral: 1, + EOF: 2, + Identifier: 3, + Keyword: 4, + NullLiteral: 5, + NumericLiteral: 6, + Punctuator: 7, + StringLiteral: 8, + RegularExpression: 9, + Template: 10, + JSXIdentifier: 11, + JSXText: 12 + }; + + TokenName = {}; + TokenName[Token.BooleanLiteral] = 'Boolean'; + TokenName[Token.EOF] = ''; + TokenName[Token.Identifier] = 'Identifier'; + TokenName[Token.Keyword] = 'Keyword'; + TokenName[Token.NullLiteral] = 'Null'; + TokenName[Token.NumericLiteral] = 'Numeric'; + TokenName[Token.Punctuator] = 'Punctuator'; + TokenName[Token.StringLiteral] = 'String'; + TokenName[Token.JSXIdentifier] = 'JSXIdentifier'; + TokenName[Token.JSXText] = 'JSXText'; + TokenName[Token.RegularExpression] = 'RegularExpression'; + + // A function following one of those tokens is an expression. + FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new', + 'return', 'case', 'delete', 'throw', 'void', + // assignment operators + '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=', + '&=', '|=', '^=', ',', + // binary/unary operators + '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&', + '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=', + '<=', '<', '>', '!=', '!==']; + + Syntax = { + AnyTypeAnnotation: 'AnyTypeAnnotation', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrayTypeAnnotation: 'ArrayTypeAnnotation', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AssignmentExpression: 'AssignmentExpression', + BinaryExpression: 'BinaryExpression', + BlockStatement: 'BlockStatement', + BooleanTypeAnnotation: 'BooleanTypeAnnotation', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ClassImplements: 'ClassImplements', + ClassProperty: 'ClassProperty', + ComprehensionBlock: 'ComprehensionBlock', + ComprehensionExpression: 'ComprehensionExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DeclareClass: 'DeclareClass', + DeclareFunction: 'DeclareFunction', + DeclareModule: 'DeclareModule', + DeclareVariable: 'DeclareVariable', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExportDeclaration: 'ExportDeclaration', + ExportBatchSpecifier: 'ExportBatchSpecifier', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForInStatement: 'ForInStatement', + ForOfStatement: 'ForOfStatement', + ForStatement: 'ForStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + FunctionTypeAnnotation: 'FunctionTypeAnnotation', + FunctionTypeParam: 'FunctionTypeParam', + GenericTypeAnnotation: 'GenericTypeAnnotation', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportDeclaration: 'ImportDeclaration', + ImportDefaultSpecifier: 'ImportDefaultSpecifier', + ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', + ImportSpecifier: 'ImportSpecifier', + InterfaceDeclaration: 'InterfaceDeclaration', + InterfaceExtends: 'InterfaceExtends', + IntersectionTypeAnnotation: 'IntersectionTypeAnnotation', + LabeledStatement: 'LabeledStatement', + Literal: 'Literal', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MethodDefinition: 'MethodDefinition', + ModuleSpecifier: 'ModuleSpecifier', + NewExpression: 'NewExpression', + NullableTypeAnnotation: 'NullableTypeAnnotation', + NumberTypeAnnotation: 'NumberTypeAnnotation', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + ObjectTypeAnnotation: 'ObjectTypeAnnotation', + ObjectTypeCallProperty: 'ObjectTypeCallProperty', + ObjectTypeIndexer: 'ObjectTypeIndexer', + ObjectTypeProperty: 'ObjectTypeProperty', + Program: 'Program', + Property: 'Property', + QualifiedTypeIdentifier: 'QualifiedTypeIdentifier', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + SpreadProperty: 'SpreadProperty', + StringLiteralTypeAnnotation: 'StringLiteralTypeAnnotation', + StringTypeAnnotation: 'StringTypeAnnotation', + SwitchCase: 'SwitchCase', + SwitchStatement: 'SwitchStatement', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TupleTypeAnnotation: 'TupleTypeAnnotation', + TryStatement: 'TryStatement', + TypeAlias: 'TypeAlias', + TypeAnnotation: 'TypeAnnotation', + TypeCastExpression: 'TypeCastExpression', + TypeofTypeAnnotation: 'TypeofTypeAnnotation', + TypeParameterDeclaration: 'TypeParameterDeclaration', + TypeParameterInstantiation: 'TypeParameterInstantiation', + UnaryExpression: 'UnaryExpression', + UnionTypeAnnotation: 'UnionTypeAnnotation', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + VoidTypeAnnotation: 'VoidTypeAnnotation', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + JSXIdentifier: 'JSXIdentifier', + JSXNamespacedName: 'JSXNamespacedName', + JSXMemberExpression: 'JSXMemberExpression', + JSXEmptyExpression: 'JSXEmptyExpression', + JSXExpressionContainer: 'JSXExpressionContainer', + JSXElement: 'JSXElement', + JSXClosingElement: 'JSXClosingElement', + JSXOpeningElement: 'JSXOpeningElement', + JSXAttribute: 'JSXAttribute', + JSXSpreadAttribute: 'JSXSpreadAttribute', + JSXText: 'JSXText', + YieldExpression: 'YieldExpression', + AwaitExpression: 'AwaitExpression' + }; + + PropertyKind = { + Data: 1, + Get: 2, + Set: 4 + }; + + ClassPropertyType = { + 'static': 'static', + prototype: 'prototype' + }; + + // Error messages should be identical to V8. + Messages = { + UnexpectedToken: 'Unexpected token %0', + UnexpectedNumber: 'Unexpected number', + UnexpectedString: 'Unexpected string', + UnexpectedIdentifier: 'Unexpected identifier', + UnexpectedReserved: 'Unexpected reserved word', + UnexpectedTemplate: 'Unexpected quasi %0', + UnexpectedEOS: 'Unexpected end of input', + NewlineAfterThrow: 'Illegal newline after throw', + InvalidRegExp: 'Invalid regular expression', + UnterminatedRegExp: 'Invalid regular expression: missing /', + InvalidLHSInAssignment: 'Invalid left-hand side in assignment', + InvalidLHSInFormalsList: 'Invalid left-hand side in formals list', + InvalidLHSInForIn: 'Invalid left-hand side in for-in', + MultipleDefaultsInSwitch: 'More than one default clause in switch statement', + NoCatchOrFinally: 'Missing catch or finally after try', + UnknownLabel: 'Undefined label \'%0\'', + Redeclaration: '%0 \'%1\' has already been declared', + IllegalContinue: 'Illegal continue statement', + IllegalBreak: 'Illegal break statement', + IllegalDuplicateClassProperty: 'Illegal duplicate property in class definition', + IllegalClassConstructorProperty: 'Illegal constructor property in class definition', + IllegalReturn: 'Illegal return statement', + IllegalSpread: 'Illegal spread element', + StrictModeWith: 'Strict mode code may not include a with statement', + StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', + StrictVarName: 'Variable name may not be eval or arguments in strict mode', + StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', + StrictParamDupe: 'Strict mode function may not have duplicate parameter names', + ParameterAfterRestParameter: 'Rest parameter must be final parameter of an argument list', + DefaultRestParameter: 'Rest parameter can not have a default value', + ElementAfterSpreadElement: 'Spread must be the final element of an element list', + PropertyAfterSpreadProperty: 'A rest property must be the final property of an object literal', + ObjectPatternAsRestParameter: 'Invalid rest parameter', + ObjectPatternAsSpread: 'Invalid spread argument', + StrictFunctionName: 'Function name may not be eval or arguments in strict mode', + StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', + StrictDelete: 'Delete of an unqualified identifier in strict mode.', + StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode', + AccessorDataProperty: 'Object literal may not have data and accessor property with the same name', + AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name', + StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', + StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', + StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', + StrictReservedWord: 'Use of future reserved word in strict mode', + MissingFromClause: 'Missing from clause', + NoAsAfterImportNamespace: 'Missing as after import *', + InvalidModuleSpecifier: 'Invalid module specifier', + IllegalImportDeclaration: 'Illegal import declaration', + IllegalExportDeclaration: 'Illegal export declaration', + NoUninitializedConst: 'Const must be initialized', + ComprehensionRequiresBlock: 'Comprehension must have at least one block', + ComprehensionError: 'Comprehension Error', + EachNotAllowed: 'Each is not supported', + InvalidJSXAttributeValue: 'JSX value should be either an expression or a quoted JSX text', + ExpectedJSXClosingTag: 'Expected corresponding JSX closing tag for %0', + AdjacentJSXElements: 'Adjacent JSX elements must be wrapped in an enclosing tag', + ConfusedAboutFunctionType: 'Unexpected token =>. It looks like ' + + 'you are trying to write a function type, but you ended up ' + + 'writing a grouped type followed by an =>, which is a syntax ' + + 'error. Remember, function type parameters are named so function ' + + 'types look like (name1: type1, name2: type2) => returnType. You ' + + 'probably wrote (type1) => returnType' + }; + + // See also tools/generate-unicode-regex.py. + Regex = { + NonAsciiIdentifierStart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'), + NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'), + LeadingZeros: new RegExp('^0+(?!$)') + }; + + // Ensure the condition is true, otherwise throw an error. + // This is only to have a better contract semantic, i.e. another safety net + // to catch a logic error. The condition shall be fulfilled in normal case. + // Do NOT use this to enforce a certain condition on any user input. + + function assert(condition, message) { + /* istanbul ignore if */ + if (!condition) { + throw new Error('ASSERT: ' + message); + } + } + + function StringMap() { + this.$data = {}; + } + + StringMap.prototype.get = function (key) { + key = '$' + key; + return this.$data[key]; + }; + + StringMap.prototype.set = function (key, value) { + key = '$' + key; + this.$data[key] = value; + return this; + }; + + StringMap.prototype.has = function (key) { + key = '$' + key; + return Object.prototype.hasOwnProperty.call(this.$data, key); + }; + + StringMap.prototype["delete"] = function (key) { + key = '$' + key; + return delete this.$data[key]; + }; + + function isDecimalDigit(ch) { + return (ch >= 48 && ch <= 57); // 0..9 + } + + function isHexDigit(ch) { + return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; + } + + function isOctalDigit(ch) { + return '01234567'.indexOf(ch) >= 0; + } + + + // 7.2 White Space + + function isWhiteSpace(ch) { + return (ch === 32) || // space + (ch === 9) || // tab + (ch === 0xB) || + (ch === 0xC) || + (ch === 0xA0) || + (ch >= 0x1680 && '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(String.fromCharCode(ch)) > 0); + } + + // 7.3 Line Terminators + + function isLineTerminator(ch) { + return (ch === 10) || (ch === 13) || (ch === 0x2028) || (ch === 0x2029); + } + + // 7.6 Identifier Names and Identifiers + + function isIdentifierStart(ch) { + return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) + (ch >= 65 && ch <= 90) || // A..Z + (ch >= 97 && ch <= 122) || // a..z + (ch === 92) || // \ (backslash) + ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))); + } + + function isIdentifierPart(ch) { + return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) + (ch >= 65 && ch <= 90) || // A..Z + (ch >= 97 && ch <= 122) || // a..z + (ch >= 48 && ch <= 57) || // 0..9 + (ch === 92) || // \ (backslash) + ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))); + } + + // 7.6.1.2 Future Reserved Words + + function isFutureReservedWord(id) { + switch (id) { + case 'class': + case 'enum': + case 'export': + case 'extends': + case 'import': + case 'super': + return true; + default: + return false; + } + } + + function isStrictModeReservedWord(id) { + switch (id) { + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'yield': + case 'let': + return true; + default: + return false; + } + } + + function isRestrictedWord(id) { + return id === 'eval' || id === 'arguments'; + } + + // 7.6.1.1 Keywords + + function isKeyword(id) { + if (strict && isStrictModeReservedWord(id)) { + return true; + } + + // 'const' is specialized as Keyword in V8. + // 'yield' is only treated as a keyword in strict mode. + // 'let' is for compatiblity with SpiderMonkey and ES.next. + // Some others are from future reserved words. + + switch (id.length) { + case 2: + return (id === 'if') || (id === 'in') || (id === 'do'); + case 3: + return (id === 'var') || (id === 'for') || (id === 'new') || + (id === 'try') || (id === 'let'); + case 4: + return (id === 'this') || (id === 'else') || (id === 'case') || + (id === 'void') || (id === 'with') || (id === 'enum'); + case 5: + return (id === 'while') || (id === 'break') || (id === 'catch') || + (id === 'throw') || (id === 'const') || + (id === 'class') || (id === 'super'); + case 6: + return (id === 'return') || (id === 'typeof') || (id === 'delete') || + (id === 'switch') || (id === 'export') || (id === 'import'); + case 7: + return (id === 'default') || (id === 'finally') || (id === 'extends'); + case 8: + return (id === 'function') || (id === 'continue') || (id === 'debugger'); + case 10: + return (id === 'instanceof'); + default: + return false; + } + } + + // 7.4 Comments + + function addComment(type, value, start, end, loc) { + var comment; + assert(typeof start === 'number', 'Comment must have valid position'); + + // Because the way the actual token is scanned, often the comments + // (if any) are skipped twice during the lexical analysis. + // Thus, we need to skip adding a comment if the comment array already + // handled it. + if (state.lastCommentStart >= start) { + return; + } + state.lastCommentStart = start; + + comment = { + type: type, + value: value + }; + if (extra.range) { + comment.range = [start, end]; + } + if (extra.loc) { + comment.loc = loc; + } + extra.comments.push(comment); + if (extra.attachComment) { + extra.leadingComments.push(comment); + extra.trailingComments.push(comment); + } + } + + function skipSingleLineComment() { + var start, loc, ch, comment; + + start = index - 2; + loc = { + start: { + line: lineNumber, + column: index - lineStart - 2 + } + }; + + while (index < length) { + ch = source.charCodeAt(index); + ++index; + if (isLineTerminator(ch)) { + if (extra.comments) { + comment = source.slice(start + 2, index - 1); + loc.end = { + line: lineNumber, + column: index - lineStart - 1 + }; + addComment('Line', comment, start, index - 1, loc); + } + if (ch === 13 && source.charCodeAt(index) === 10) { + ++index; + } + ++lineNumber; + lineStart = index; + return; + } + } + + if (extra.comments) { + comment = source.slice(start + 2, index); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment('Line', comment, start, index, loc); + } + } + + function skipMultiLineComment() { + var start, loc, ch, comment; + + if (extra.comments) { + start = index - 2; + loc = { + start: { + line: lineNumber, + column: index - lineStart - 2 + } + }; + } + + while (index < length) { + ch = source.charCodeAt(index); + if (isLineTerminator(ch)) { + if (ch === 13 && source.charCodeAt(index + 1) === 10) { + ++index; + } + ++lineNumber; + ++index; + lineStart = index; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else if (ch === 42) { + // Block comment ends with '*/' (char #42, char #47). + if (source.charCodeAt(index + 1) === 47) { + ++index; + ++index; + if (extra.comments) { + comment = source.slice(start + 2, index - 2); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment('Block', comment, start, index, loc); + } + return; + } + ++index; + } else { + ++index; + } + } + + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + function skipComment() { + var ch; + + while (index < length) { + ch = source.charCodeAt(index); + + if (isWhiteSpace(ch)) { + ++index; + } else if (isLineTerminator(ch)) { + ++index; + if (ch === 13 && source.charCodeAt(index) === 10) { + ++index; + } + ++lineNumber; + lineStart = index; + } else if (ch === 47) { // 47 is '/' + ch = source.charCodeAt(index + 1); + if (ch === 47) { + ++index; + ++index; + skipSingleLineComment(); + } else if (ch === 42) { // 42 is '*' + ++index; + ++index; + skipMultiLineComment(); + } else { + break; + } + } else { + break; + } + } + } + + function scanHexEscape(prefix) { + var i, len, ch, code = 0; + + len = (prefix === 'u') ? 4 : 2; + for (i = 0; i < len; ++i) { + if (index < length && isHexDigit(source[index])) { + ch = source[index++]; + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } else { + return ''; + } + } + return String.fromCharCode(code); + } + + function scanUnicodeCodePointEscape() { + var ch, code, cu1, cu2; + + ch = source[index]; + code = 0; + + // At least, one hex digit is required. + if (ch === '}') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + while (index < length) { + ch = source[index++]; + if (!isHexDigit(ch)) { + break; + } + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } + + if (code > 0x10FFFF || ch !== '}') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + // UTF-16 Encoding + if (code <= 0xFFFF) { + return String.fromCharCode(code); + } + cu1 = ((code - 0x10000) >> 10) + 0xD800; + cu2 = ((code - 0x10000) & 1023) + 0xDC00; + return String.fromCharCode(cu1, cu2); + } + + function getEscapedIdentifier() { + var ch, id; + + ch = source.charCodeAt(index++); + id = String.fromCharCode(ch); + + // '\u' (char #92, char #117) denotes an escaped character. + if (ch === 92) { + if (source.charCodeAt(index) !== 117) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + ++index; + ch = scanHexEscape('u'); + if (!ch || ch === '\\' || !isIdentifierStart(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + id = ch; + } + + while (index < length) { + ch = source.charCodeAt(index); + if (!isIdentifierPart(ch)) { + break; + } + ++index; + id += String.fromCharCode(ch); + + // '\u' (char #92, char #117) denotes an escaped character. + if (ch === 92) { + id = id.substr(0, id.length - 1); + if (source.charCodeAt(index) !== 117) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + ++index; + ch = scanHexEscape('u'); + if (!ch || ch === '\\' || !isIdentifierPart(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + id += ch; + } + } + + return id; + } + + function getIdentifier() { + var start, ch; + + start = index++; + while (index < length) { + ch = source.charCodeAt(index); + if (ch === 92) { + // Blackslash (char #92) marks Unicode escape sequence. + index = start; + return getEscapedIdentifier(); + } + if (isIdentifierPart(ch)) { + ++index; + } else { + break; + } + } + + return source.slice(start, index); + } + + function scanIdentifier() { + var start, id, type; + + start = index; + + // Backslash (char #92) starts an escaped character. + id = (source.charCodeAt(index) === 92) ? getEscapedIdentifier() : getIdentifier(); + + // There is no keyword or literal with only one character. + // Thus, it must be an identifier. + if (id.length === 1) { + type = Token.Identifier; + } else if (isKeyword(id)) { + type = Token.Keyword; + } else if (id === 'null') { + type = Token.NullLiteral; + } else if (id === 'true' || id === 'false') { + type = Token.BooleanLiteral; + } else { + type = Token.Identifier; + } + + return { + type: type, + value: id, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + + // 7.7 Punctuators + + function scanPunctuator() { + var start = index, + code = source.charCodeAt(index), + code2, + ch1 = source[index], + ch2, + ch3, + ch4; + + if (state.inJSXTag || state.inJSXChild) { + // Don't need to check for '{' and '}' as it's already handled + // correctly by default. + switch (code) { + case 60: // < + case 62: // > + ++index; + return { + type: Token.Punctuator, + value: String.fromCharCode(code), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + } + + switch (code) { + // Check for most common single-character punctuators. + case 40: // ( open bracket + case 41: // ) close bracket + case 59: // ; semicolon + case 44: // , comma + case 123: // { open curly brace + case 125: // } close curly brace + case 91: // [ + case 93: // ] + case 58: // : + case 63: // ? + case 126: // ~ + ++index; + if (extra.tokenize) { + if (code === 40) { + extra.openParenToken = extra.tokens.length; + } else if (code === 123) { + extra.openCurlyToken = extra.tokens.length; + } + } + return { + type: Token.Punctuator, + value: String.fromCharCode(code), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + + default: + code2 = source.charCodeAt(index + 1); + + // '=' (char #61) marks an assignment or comparison operator. + if (code2 === 61) { + switch (code) { + case 37: // % + case 38: // & + case 42: // *: + case 43: // + + case 45: // - + case 47: // / + case 60: // < + case 62: // > + case 94: // ^ + case 124: // | + index += 2; + return { + type: Token.Punctuator, + value: String.fromCharCode(code) + String.fromCharCode(code2), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + + case 33: // ! + case 61: // = + index += 2; + + // !== and === + if (source.charCodeAt(index) === 61) { + ++index; + } + return { + type: Token.Punctuator, + value: source.slice(start, index), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + default: + break; + } + } + break; + } + + // Peek more characters. + + ch2 = source[index + 1]; + ch3 = source[index + 2]; + ch4 = source[index + 3]; + + // 4-character punctuator: >>>= + + if (ch1 === '>' && ch2 === '>' && ch3 === '>') { + if (ch4 === '=') { + index += 4; + return { + type: Token.Punctuator, + value: '>>>=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + } + + // 3-character punctuators: === !== >>> <<= >>= + + if (ch1 === '>' && ch2 === '>' && ch3 === '>' && !state.inType) { + index += 3; + return { + type: Token.Punctuator, + value: '>>>', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '<' && ch2 === '<' && ch3 === '=') { + index += 3; + return { + type: Token.Punctuator, + value: '<<=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '>' && ch2 === '>' && ch3 === '=') { + index += 3; + return { + type: Token.Punctuator, + value: '>>=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '.' && ch2 === '.' && ch3 === '.') { + index += 3; + return { + type: Token.Punctuator, + value: '...', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // Other 2-character punctuators: ++ -- << >> && || + + // Don't match these tokens if we're in a type, since they never can + // occur and can mess up types like Map> + if (ch1 === ch2 && ('+-<>&|'.indexOf(ch1) >= 0) && !state.inType) { + index += 2; + return { + type: Token.Punctuator, + value: ch1 + ch2, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '=' && ch2 === '>') { + index += 2; + return { + type: Token.Punctuator, + value: '=>', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) { + ++index; + return { + type: Token.Punctuator, + value: ch1, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '.') { + ++index; + return { + type: Token.Punctuator, + value: ch1, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + // 7.8.3 Numeric Literals + + function scanHexLiteral(start) { + var number = ''; + + while (index < length) { + if (!isHexDigit(source[index])) { + break; + } + number += source[index++]; + } + + if (number.length === 0) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (isIdentifierStart(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseInt('0x' + number, 16), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanBinaryLiteral(start) { + var ch, number; + + number = ''; + + while (index < length) { + ch = source[index]; + if (ch !== '0' && ch !== '1') { + break; + } + number += source[index++]; + } + + if (number.length === 0) { + // only 0b or 0B + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (index < length) { + ch = source.charCodeAt(index); + /* istanbul ignore else */ + if (isIdentifierStart(ch) || isDecimalDigit(ch)) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + return { + type: Token.NumericLiteral, + value: parseInt(number, 2), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanOctalLiteral(prefix, start) { + var number, octal; + + if (isOctalDigit(prefix)) { + octal = true; + number = '0' + source[index++]; + } else { + octal = false; + ++index; + number = ''; + } + + while (index < length) { + if (!isOctalDigit(source[index])) { + break; + } + number += source[index++]; + } + + if (!octal && number.length === 0) { + // only 0o or 0O + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseInt(number, 8), + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanNumericLiteral() { + var number, start, ch; + + ch = source[index]; + assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), + 'Numeric literal must start with a decimal digit or a decimal point'); + + start = index; + number = ''; + if (ch !== '.') { + number = source[index++]; + ch = source[index]; + + // Hex number starts with '0x'. + // Octal number starts with '0'. + // Octal number in ES6 starts with '0o'. + // Binary number in ES6 starts with '0b'. + if (number === '0') { + if (ch === 'x' || ch === 'X') { + ++index; + return scanHexLiteral(start); + } + if (ch === 'b' || ch === 'B') { + ++index; + return scanBinaryLiteral(start); + } + if (ch === 'o' || ch === 'O' || isOctalDigit(ch)) { + return scanOctalLiteral(ch, start); + } + // decimal number starts with '0' such as '09' is illegal. + if (ch && isDecimalDigit(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + ch = source[index]; + } + + if (ch === '.') { + number += source[index++]; + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + ch = source[index]; + } + + if (ch === 'e' || ch === 'E') { + number += source[index++]; + + ch = source[index]; + if (ch === '+' || ch === '-') { + number += source[index++]; + } + if (isDecimalDigit(source.charCodeAt(index))) { + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + } else { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + if (isIdentifierStart(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseFloat(number), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // 7.8.4 String Literals + + function scanStringLiteral() { + var str = '', quote, start, ch, code, unescaped, restore, octal = false; + + quote = source[index]; + assert((quote === '\'' || quote === '"'), + 'String literal must starts with a quote'); + + start = index; + ++index; + + while (index < length) { + ch = source[index++]; + + if (ch === quote) { + quote = ''; + break; + } else if (ch === '\\') { + ch = source[index++]; + if (!ch || !isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'n': + str += '\n'; + break; + case 'r': + str += '\r'; + break; + case 't': + str += '\t'; + break; + case 'u': + case 'x': + if (source[index] === '{') { + ++index; + str += scanUnicodeCodePointEscape(); + } else { + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + str += unescaped; + } else { + index = restore; + str += ch; + } + } + break; + case 'b': + str += '\b'; + break; + case 'f': + str += '\f'; + break; + case 'v': + str += '\x0B'; + break; + + default: + if (isOctalDigit(ch)) { + code = '01234567'.indexOf(ch); + + // \0 is not octal escape sequence + if (code !== 0) { + octal = true; + } + + /* istanbul ignore else */ + if (index < length && isOctalDigit(source[index])) { + octal = true; + code = code * 8 + '01234567'.indexOf(source[index++]); + + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && + index < length && + isOctalDigit(source[index])) { + code = code * 8 + '01234567'.indexOf(source[index++]); + } + } + str += String.fromCharCode(code); + } else { + str += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + lineStart = index; + } + } else if (isLineTerminator(ch.charCodeAt(0))) { + break; + } else { + str += ch; + } + } + + if (quote !== '') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.StringLiteral, + value: str, + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanTemplate() { + var cooked = '', ch, start, terminated, tail, restore, unescaped, code, octal; + + terminated = false; + tail = false; + start = index; + + ++index; + + while (index < length) { + ch = source[index++]; + if (ch === '`') { + tail = true; + terminated = true; + break; + } else if (ch === '$') { + if (source[index] === '{') { + ++index; + terminated = true; + break; + } + cooked += ch; + } else if (ch === '\\') { + ch = source[index++]; + if (!isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'n': + cooked += '\n'; + break; + case 'r': + cooked += '\r'; + break; + case 't': + cooked += '\t'; + break; + case 'u': + case 'x': + if (source[index] === '{') { + ++index; + cooked += scanUnicodeCodePointEscape(); + } else { + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + cooked += unescaped; + } else { + index = restore; + cooked += ch; + } + } + break; + case 'b': + cooked += '\b'; + break; + case 'f': + cooked += '\f'; + break; + case 'v': + cooked += '\v'; + break; + + default: + if (isOctalDigit(ch)) { + code = '01234567'.indexOf(ch); + + // \0 is not octal escape sequence + if (code !== 0) { + octal = true; + } + + /* istanbul ignore else */ + if (index < length && isOctalDigit(source[index])) { + octal = true; + code = code * 8 + '01234567'.indexOf(source[index++]); + + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && + index < length && + isOctalDigit(source[index])) { + code = code * 8 + '01234567'.indexOf(source[index++]); + } + } + cooked += String.fromCharCode(code); + } else { + cooked += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + lineStart = index; + } + } else if (isLineTerminator(ch.charCodeAt(0))) { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + lineStart = index; + cooked += '\n'; + } else { + cooked += ch; + } + } + + if (!terminated) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.Template, + value: { + cooked: cooked, + raw: source.slice(start + 1, index - ((tail) ? 1 : 2)) + }, + tail: tail, + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanTemplateElement(option) { + var startsWith, template; + + lookahead = null; + skipComment(); + + startsWith = (option.head) ? '`' : '}'; + + if (source[index] !== startsWith) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + template = scanTemplate(); + + peek(); + + return template; + } + + function testRegExp(pattern, flags) { + var tmp = pattern, + value; + + if (flags.indexOf('u') >= 0) { + // Replace each astral symbol and every Unicode code point + // escape sequence with a single ASCII symbol to avoid throwing on + // regular expressions that are only valid in combination with the + // `/u` flag. + // Note: replacing with the ASCII symbol `x` might cause false + // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a + // perfectly valid pattern that is equivalent to `[a-b]`, but it + // would be replaced by `[x-b]` which throws an error. + tmp = tmp + .replace(/\\u\{([0-9a-fA-F]+)\}/g, function ($0, $1) { + if (parseInt($1, 16) <= 0x10FFFF) { + return 'x'; + } + throwError({}, Messages.InvalidRegExp); + }) + .replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, 'x'); + } + + // First, detect invalid regular expressions. + try { + value = new RegExp(tmp); + } catch (e) { + throwError({}, Messages.InvalidRegExp); + } + + // Return a regular expression object for this pattern-flag pair, or + // `null` in case the current environment doesn't support the flags it + // uses. + try { + return new RegExp(pattern, flags); + } catch (exception) { + return null; + } + } + + function scanRegExpBody() { + var ch, str, classMarker, terminated, body; + + ch = source[index]; + assert(ch === '/', 'Regular expression literal must start with a slash'); + str = source[index++]; + + classMarker = false; + terminated = false; + while (index < length) { + ch = source[index++]; + str += ch; + if (ch === '\\') { + ch = source[index++]; + // ECMA-262 7.8.5 + if (isLineTerminator(ch.charCodeAt(0))) { + throwError({}, Messages.UnterminatedRegExp); + } + str += ch; + } else if (isLineTerminator(ch.charCodeAt(0))) { + throwError({}, Messages.UnterminatedRegExp); + } else if (classMarker) { + if (ch === ']') { + classMarker = false; + } + } else { + if (ch === '/') { + terminated = true; + break; + } else if (ch === '[') { + classMarker = true; + } + } + } + + if (!terminated) { + throwError({}, Messages.UnterminatedRegExp); + } + + // Exclude leading and trailing slash. + body = str.substr(1, str.length - 2); + return { + value: body, + literal: str + }; + } + + function scanRegExpFlags() { + var ch, str, flags, restore; + + str = ''; + flags = ''; + while (index < length) { + ch = source[index]; + if (!isIdentifierPart(ch.charCodeAt(0))) { + break; + } + + ++index; + if (ch === '\\' && index < length) { + ch = source[index]; + if (ch === 'u') { + ++index; + restore = index; + ch = scanHexEscape('u'); + if (ch) { + flags += ch; + for (str += '\\u'; restore < index; ++restore) { + str += source[restore]; + } + } else { + index = restore; + flags += 'u'; + str += '\\u'; + } + throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL'); + } else { + str += '\\'; + throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + flags += ch; + str += ch; + } + } + + return { + value: flags, + literal: str + }; + } + + function scanRegExp() { + var start, body, flags, value; + + lookahead = null; + skipComment(); + start = index; + + body = scanRegExpBody(); + flags = scanRegExpFlags(); + value = testRegExp(body.value, flags.value); + + if (extra.tokenize) { + return { + type: Token.RegularExpression, + value: value, + regex: { + pattern: body.value, + flags: flags.value + }, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + return { + literal: body.literal + flags.literal, + value: value, + regex: { + pattern: body.value, + flags: flags.value + }, + range: [start, index] + }; + } + + function isIdentifierName(token) { + return token.type === Token.Identifier || + token.type === Token.Keyword || + token.type === Token.BooleanLiteral || + token.type === Token.NullLiteral; + } + + function advanceSlash() { + var prevToken, + checkToken; + // Using the following algorithm: + // https://github.com/mozilla/sweet.js/wiki/design + prevToken = extra.tokens[extra.tokens.length - 1]; + if (!prevToken) { + // Nothing before that: it cannot be a division. + return scanRegExp(); + } + if (prevToken.type === 'Punctuator') { + if (prevToken.value === ')') { + checkToken = extra.tokens[extra.openParenToken - 1]; + if (checkToken && + checkToken.type === 'Keyword' && + (checkToken.value === 'if' || + checkToken.value === 'while' || + checkToken.value === 'for' || + checkToken.value === 'with')) { + return scanRegExp(); + } + return scanPunctuator(); + } + if (prevToken.value === '}') { + // Dividing a function by anything makes little sense, + // but we have to check for that. + if (extra.tokens[extra.openCurlyToken - 3] && + extra.tokens[extra.openCurlyToken - 3].type === 'Keyword') { + // Anonymous function. + checkToken = extra.tokens[extra.openCurlyToken - 4]; + if (!checkToken) { + return scanPunctuator(); + } + } else if (extra.tokens[extra.openCurlyToken - 4] && + extra.tokens[extra.openCurlyToken - 4].type === 'Keyword') { + // Named function. + checkToken = extra.tokens[extra.openCurlyToken - 5]; + if (!checkToken) { + return scanRegExp(); + } + } else { + return scanPunctuator(); + } + // checkToken determines whether the function is + // a declaration or an expression. + if (FnExprTokens.indexOf(checkToken.value) >= 0) { + // It is an expression. + return scanPunctuator(); + } + // It is a declaration. + return scanRegExp(); + } + return scanRegExp(); + } + if (prevToken.type === 'Keyword' && prevToken.value !== 'this') { + return scanRegExp(); + } + return scanPunctuator(); + } + + function advance() { + var ch; + + if (!state.inJSXChild) { + skipComment(); + } + + if (index >= length) { + return { + type: Token.EOF, + lineNumber: lineNumber, + lineStart: lineStart, + range: [index, index] + }; + } + + if (state.inJSXChild) { + return advanceJSXChild(); + } + + ch = source.charCodeAt(index); + + // Very common: ( and ) and ; + if (ch === 40 || ch === 41 || ch === 58) { + return scanPunctuator(); + } + + // String literal starts with single quote (#39) or double quote (#34). + if (ch === 39 || ch === 34) { + if (state.inJSXTag) { + return scanJSXStringLiteral(); + } + return scanStringLiteral(); + } + + if (state.inJSXTag && isJSXIdentifierStart(ch)) { + return scanJSXIdentifier(); + } + + if (ch === 96) { + return scanTemplate(); + } + if (isIdentifierStart(ch)) { + return scanIdentifier(); + } + + // Dot (.) char #46 can also start a floating-point number, hence the need + // to check the next character. + if (ch === 46) { + if (isDecimalDigit(source.charCodeAt(index + 1))) { + return scanNumericLiteral(); + } + return scanPunctuator(); + } + + if (isDecimalDigit(ch)) { + return scanNumericLiteral(); + } + + // Slash (/) char #47 can also start a regex. + if (extra.tokenize && ch === 47) { + return advanceSlash(); + } + + return scanPunctuator(); + } + + function lex() { + var token; + + token = lookahead; + index = token.range[1]; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + + lookahead = advance(); + + index = token.range[1]; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + + return token; + } + + function peek() { + var pos, line, start; + + pos = index; + line = lineNumber; + start = lineStart; + lookahead = advance(); + index = pos; + lineNumber = line; + lineStart = start; + } + + function lookahead2() { + var adv, pos, line, start, result; + + // If we are collecting the tokens, don't grab the next one yet. + /* istanbul ignore next */ + adv = (typeof extra.advance === 'function') ? extra.advance : advance; + + pos = index; + line = lineNumber; + start = lineStart; + + // Scan for the next immediate token. + /* istanbul ignore if */ + if (lookahead === null) { + lookahead = adv(); + } + index = lookahead.range[1]; + lineNumber = lookahead.lineNumber; + lineStart = lookahead.lineStart; + + // Grab the token right after. + result = adv(); + index = pos; + lineNumber = line; + lineStart = start; + + return result; + } + + function rewind(token) { + index = token.range[0]; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + lookahead = token; + } + + function markerCreate() { + if (!extra.loc && !extra.range) { + return undefined; + } + skipComment(); + return {offset: index, line: lineNumber, col: index - lineStart}; + } + + function markerCreatePreserveWhitespace() { + if (!extra.loc && !extra.range) { + return undefined; + } + return {offset: index, line: lineNumber, col: index - lineStart}; + } + + function processComment(node) { + var lastChild, + trailingComments, + bottomRight = extra.bottomRightStack, + last = bottomRight[bottomRight.length - 1]; + + if (node.type === Syntax.Program) { + /* istanbul ignore else */ + if (node.body.length > 0) { + return; + } + } + + if (extra.trailingComments.length > 0) { + if (extra.trailingComments[0].range[0] >= node.range[1]) { + trailingComments = extra.trailingComments; + extra.trailingComments = []; + } else { + extra.trailingComments.length = 0; + } + } else { + if (last && last.trailingComments && last.trailingComments[0].range[0] >= node.range[1]) { + trailingComments = last.trailingComments; + delete last.trailingComments; + } + } + + // Eating the stack. + if (last) { + while (last && last.range[0] >= node.range[0]) { + lastChild = last; + last = bottomRight.pop(); + } + } + + if (lastChild) { + if (lastChild.leadingComments && lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= node.range[0]) { + node.leadingComments = lastChild.leadingComments; + delete lastChild.leadingComments; + } + } else if (extra.leadingComments.length > 0 && extra.leadingComments[extra.leadingComments.length - 1].range[1] <= node.range[0]) { + node.leadingComments = extra.leadingComments; + extra.leadingComments = []; + } + + if (trailingComments) { + node.trailingComments = trailingComments; + } + + bottomRight.push(node); + } + + function markerApply(marker, node) { + if (extra.range) { + node.range = [marker.offset, index]; + } + if (extra.loc) { + node.loc = { + start: { + line: marker.line, + column: marker.col + }, + end: { + line: lineNumber, + column: index - lineStart + } + }; + node = delegate.postProcess(node); + } + if (extra.attachComment) { + processComment(node); + } + return node; + } + + SyntaxTreeDelegate = { + + name: 'SyntaxTree', + + postProcess: function (node) { + return node; + }, + + createArrayExpression: function (elements) { + return { + type: Syntax.ArrayExpression, + elements: elements + }; + }, + + createAssignmentExpression: function (operator, left, right) { + return { + type: Syntax.AssignmentExpression, + operator: operator, + left: left, + right: right + }; + }, + + createBinaryExpression: function (operator, left, right) { + var type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression : + Syntax.BinaryExpression; + return { + type: type, + operator: operator, + left: left, + right: right + }; + }, + + createBlockStatement: function (body) { + return { + type: Syntax.BlockStatement, + body: body + }; + }, + + createBreakStatement: function (label) { + return { + type: Syntax.BreakStatement, + label: label + }; + }, + + createCallExpression: function (callee, args) { + return { + type: Syntax.CallExpression, + callee: callee, + 'arguments': args + }; + }, + + createCatchClause: function (param, body) { + return { + type: Syntax.CatchClause, + param: param, + body: body + }; + }, + + createConditionalExpression: function (test, consequent, alternate) { + return { + type: Syntax.ConditionalExpression, + test: test, + consequent: consequent, + alternate: alternate + }; + }, + + createContinueStatement: function (label) { + return { + type: Syntax.ContinueStatement, + label: label + }; + }, + + createDebuggerStatement: function () { + return { + type: Syntax.DebuggerStatement + }; + }, + + createDoWhileStatement: function (body, test) { + return { + type: Syntax.DoWhileStatement, + body: body, + test: test + }; + }, + + createEmptyStatement: function () { + return { + type: Syntax.EmptyStatement + }; + }, + + createExpressionStatement: function (expression) { + return { + type: Syntax.ExpressionStatement, + expression: expression + }; + }, + + createForStatement: function (init, test, update, body) { + return { + type: Syntax.ForStatement, + init: init, + test: test, + update: update, + body: body + }; + }, + + createForInStatement: function (left, right, body) { + return { + type: Syntax.ForInStatement, + left: left, + right: right, + body: body, + each: false + }; + }, + + createForOfStatement: function (left, right, body) { + return { + type: Syntax.ForOfStatement, + left: left, + right: right, + body: body + }; + }, + + createFunctionDeclaration: function (id, params, defaults, body, rest, generator, expression, + isAsync, returnType, typeParameters) { + var funDecl = { + type: Syntax.FunctionDeclaration, + id: id, + params: params, + defaults: defaults, + body: body, + rest: rest, + generator: generator, + expression: expression, + returnType: returnType, + typeParameters: typeParameters + }; + + if (isAsync) { + funDecl.async = true; + } + + return funDecl; + }, + + createFunctionExpression: function (id, params, defaults, body, rest, generator, expression, + isAsync, returnType, typeParameters) { + var funExpr = { + type: Syntax.FunctionExpression, + id: id, + params: params, + defaults: defaults, + body: body, + rest: rest, + generator: generator, + expression: expression, + returnType: returnType, + typeParameters: typeParameters + }; + + if (isAsync) { + funExpr.async = true; + } + + return funExpr; + }, + + createIdentifier: function (name) { + return { + type: Syntax.Identifier, + name: name, + // Only here to initialize the shape of the object to ensure + // that the 'typeAnnotation' key is ordered before others that + // are added later (like 'loc' and 'range'). This just helps + // keep the shape of Identifier nodes consistent with everything + // else. + typeAnnotation: undefined, + optional: undefined + }; + }, + + createTypeAnnotation: function (typeAnnotation) { + return { + type: Syntax.TypeAnnotation, + typeAnnotation: typeAnnotation + }; + }, + + createTypeCast: function (expression, typeAnnotation) { + return { + type: Syntax.TypeCastExpression, + expression: expression, + typeAnnotation: typeAnnotation + }; + }, + + createFunctionTypeAnnotation: function (params, returnType, rest, typeParameters) { + return { + type: Syntax.FunctionTypeAnnotation, + params: params, + returnType: returnType, + rest: rest, + typeParameters: typeParameters + }; + }, + + createFunctionTypeParam: function (name, typeAnnotation, optional) { + return { + type: Syntax.FunctionTypeParam, + name: name, + typeAnnotation: typeAnnotation, + optional: optional + }; + }, + + createNullableTypeAnnotation: function (typeAnnotation) { + return { + type: Syntax.NullableTypeAnnotation, + typeAnnotation: typeAnnotation + }; + }, + + createArrayTypeAnnotation: function (elementType) { + return { + type: Syntax.ArrayTypeAnnotation, + elementType: elementType + }; + }, + + createGenericTypeAnnotation: function (id, typeParameters) { + return { + type: Syntax.GenericTypeAnnotation, + id: id, + typeParameters: typeParameters + }; + }, + + createQualifiedTypeIdentifier: function (qualification, id) { + return { + type: Syntax.QualifiedTypeIdentifier, + qualification: qualification, + id: id + }; + }, + + createTypeParameterDeclaration: function (params) { + return { + type: Syntax.TypeParameterDeclaration, + params: params + }; + }, + + createTypeParameterInstantiation: function (params) { + return { + type: Syntax.TypeParameterInstantiation, + params: params + }; + }, + + createAnyTypeAnnotation: function () { + return { + type: Syntax.AnyTypeAnnotation + }; + }, + + createBooleanTypeAnnotation: function () { + return { + type: Syntax.BooleanTypeAnnotation + }; + }, + + createNumberTypeAnnotation: function () { + return { + type: Syntax.NumberTypeAnnotation + }; + }, + + createStringTypeAnnotation: function () { + return { + type: Syntax.StringTypeAnnotation + }; + }, + + createStringLiteralTypeAnnotation: function (token) { + return { + type: Syntax.StringLiteralTypeAnnotation, + value: token.value, + raw: source.slice(token.range[0], token.range[1]) + }; + }, + + createVoidTypeAnnotation: function () { + return { + type: Syntax.VoidTypeAnnotation + }; + }, + + createTypeofTypeAnnotation: function (argument) { + return { + type: Syntax.TypeofTypeAnnotation, + argument: argument + }; + }, + + createTupleTypeAnnotation: function (types) { + return { + type: Syntax.TupleTypeAnnotation, + types: types + }; + }, + + createObjectTypeAnnotation: function (properties, indexers, callProperties) { + return { + type: Syntax.ObjectTypeAnnotation, + properties: properties, + indexers: indexers, + callProperties: callProperties + }; + }, + + createObjectTypeIndexer: function (id, key, value, isStatic) { + return { + type: Syntax.ObjectTypeIndexer, + id: id, + key: key, + value: value, + "static": isStatic + }; + }, + + createObjectTypeCallProperty: function (value, isStatic) { + return { + type: Syntax.ObjectTypeCallProperty, + value: value, + "static": isStatic + }; + }, + + createObjectTypeProperty: function (key, value, optional, isStatic) { + return { + type: Syntax.ObjectTypeProperty, + key: key, + value: value, + optional: optional, + "static": isStatic + }; + }, + + createUnionTypeAnnotation: function (types) { + return { + type: Syntax.UnionTypeAnnotation, + types: types + }; + }, + + createIntersectionTypeAnnotation: function (types) { + return { + type: Syntax.IntersectionTypeAnnotation, + types: types + }; + }, + + createTypeAlias: function (id, typeParameters, right) { + return { + type: Syntax.TypeAlias, + id: id, + typeParameters: typeParameters, + right: right + }; + }, + + createInterface: function (id, typeParameters, body, extended) { + return { + type: Syntax.InterfaceDeclaration, + id: id, + typeParameters: typeParameters, + body: body, + "extends": extended + }; + }, + + createInterfaceExtends: function (id, typeParameters) { + return { + type: Syntax.InterfaceExtends, + id: id, + typeParameters: typeParameters + }; + }, + + createDeclareFunction: function (id) { + return { + type: Syntax.DeclareFunction, + id: id + }; + }, + + createDeclareVariable: function (id) { + return { + type: Syntax.DeclareVariable, + id: id + }; + }, + + createDeclareModule: function (id, body) { + return { + type: Syntax.DeclareModule, + id: id, + body: body + }; + }, + + createJSXAttribute: function (name, value) { + return { + type: Syntax.JSXAttribute, + name: name, + value: value || null + }; + }, + + createJSXSpreadAttribute: function (argument) { + return { + type: Syntax.JSXSpreadAttribute, + argument: argument + }; + }, + + createJSXIdentifier: function (name) { + return { + type: Syntax.JSXIdentifier, + name: name + }; + }, + + createJSXNamespacedName: function (namespace, name) { + return { + type: Syntax.JSXNamespacedName, + namespace: namespace, + name: name + }; + }, + + createJSXMemberExpression: function (object, property) { + return { + type: Syntax.JSXMemberExpression, + object: object, + property: property + }; + }, + + createJSXElement: function (openingElement, closingElement, children) { + return { + type: Syntax.JSXElement, + openingElement: openingElement, + closingElement: closingElement, + children: children + }; + }, + + createJSXEmptyExpression: function () { + return { + type: Syntax.JSXEmptyExpression + }; + }, + + createJSXExpressionContainer: function (expression) { + return { + type: Syntax.JSXExpressionContainer, + expression: expression + }; + }, + + createJSXOpeningElement: function (name, attributes, selfClosing) { + return { + type: Syntax.JSXOpeningElement, + name: name, + selfClosing: selfClosing, + attributes: attributes + }; + }, + + createJSXClosingElement: function (name) { + return { + type: Syntax.JSXClosingElement, + name: name + }; + }, + + createIfStatement: function (test, consequent, alternate) { + return { + type: Syntax.IfStatement, + test: test, + consequent: consequent, + alternate: alternate + }; + }, + + createLabeledStatement: function (label, body) { + return { + type: Syntax.LabeledStatement, + label: label, + body: body + }; + }, + + createLiteral: function (token) { + var object = { + type: Syntax.Literal, + value: token.value, + raw: source.slice(token.range[0], token.range[1]) + }; + if (token.regex) { + object.regex = token.regex; + } + return object; + }, + + createMemberExpression: function (accessor, object, property) { + return { + type: Syntax.MemberExpression, + computed: accessor === '[', + object: object, + property: property + }; + }, + + createNewExpression: function (callee, args) { + return { + type: Syntax.NewExpression, + callee: callee, + 'arguments': args + }; + }, + + createObjectExpression: function (properties) { + return { + type: Syntax.ObjectExpression, + properties: properties + }; + }, + + createPostfixExpression: function (operator, argument) { + return { + type: Syntax.UpdateExpression, + operator: operator, + argument: argument, + prefix: false + }; + }, + + createProgram: function (body) { + return { + type: Syntax.Program, + body: body + }; + }, + + createProperty: function (kind, key, value, method, shorthand, computed) { + return { + type: Syntax.Property, + key: key, + value: value, + kind: kind, + method: method, + shorthand: shorthand, + computed: computed + }; + }, + + createReturnStatement: function (argument) { + return { + type: Syntax.ReturnStatement, + argument: argument + }; + }, + + createSequenceExpression: function (expressions) { + return { + type: Syntax.SequenceExpression, + expressions: expressions + }; + }, + + createSwitchCase: function (test, consequent) { + return { + type: Syntax.SwitchCase, + test: test, + consequent: consequent + }; + }, + + createSwitchStatement: function (discriminant, cases) { + return { + type: Syntax.SwitchStatement, + discriminant: discriminant, + cases: cases + }; + }, + + createThisExpression: function () { + return { + type: Syntax.ThisExpression + }; + }, + + createThrowStatement: function (argument) { + return { + type: Syntax.ThrowStatement, + argument: argument + }; + }, + + createTryStatement: function (block, guardedHandlers, handlers, finalizer) { + return { + type: Syntax.TryStatement, + block: block, + guardedHandlers: guardedHandlers, + handlers: handlers, + finalizer: finalizer + }; + }, + + createUnaryExpression: function (operator, argument) { + if (operator === '++' || operator === '--') { + return { + type: Syntax.UpdateExpression, + operator: operator, + argument: argument, + prefix: true + }; + } + return { + type: Syntax.UnaryExpression, + operator: operator, + argument: argument, + prefix: true + }; + }, + + createVariableDeclaration: function (declarations, kind) { + return { + type: Syntax.VariableDeclaration, + declarations: declarations, + kind: kind + }; + }, + + createVariableDeclarator: function (id, init) { + return { + type: Syntax.VariableDeclarator, + id: id, + init: init + }; + }, + + createWhileStatement: function (test, body) { + return { + type: Syntax.WhileStatement, + test: test, + body: body + }; + }, + + createWithStatement: function (object, body) { + return { + type: Syntax.WithStatement, + object: object, + body: body + }; + }, + + createTemplateElement: function (value, tail) { + return { + type: Syntax.TemplateElement, + value: value, + tail: tail + }; + }, + + createTemplateLiteral: function (quasis, expressions) { + return { + type: Syntax.TemplateLiteral, + quasis: quasis, + expressions: expressions + }; + }, + + createSpreadElement: function (argument) { + return { + type: Syntax.SpreadElement, + argument: argument + }; + }, + + createSpreadProperty: function (argument) { + return { + type: Syntax.SpreadProperty, + argument: argument + }; + }, + + createTaggedTemplateExpression: function (tag, quasi) { + return { + type: Syntax.TaggedTemplateExpression, + tag: tag, + quasi: quasi + }; + }, + + createArrowFunctionExpression: function (params, defaults, body, rest, expression, isAsync) { + var arrowExpr = { + type: Syntax.ArrowFunctionExpression, + id: null, + params: params, + defaults: defaults, + body: body, + rest: rest, + generator: false, + expression: expression + }; + + if (isAsync) { + arrowExpr.async = true; + } + + return arrowExpr; + }, + + createMethodDefinition: function (propertyType, kind, key, value, computed) { + return { + type: Syntax.MethodDefinition, + key: key, + value: value, + kind: kind, + 'static': propertyType === ClassPropertyType["static"], + computed: computed + }; + }, + + createClassProperty: function (key, typeAnnotation, computed, isStatic) { + return { + type: Syntax.ClassProperty, + key: key, + typeAnnotation: typeAnnotation, + computed: computed, + "static": isStatic + }; + }, + + createClassBody: function (body) { + return { + type: Syntax.ClassBody, + body: body + }; + }, + + createClassImplements: function (id, typeParameters) { + return { + type: Syntax.ClassImplements, + id: id, + typeParameters: typeParameters + }; + }, + + createClassExpression: function (id, superClass, body, typeParameters, superTypeParameters, implemented) { + return { + type: Syntax.ClassExpression, + id: id, + superClass: superClass, + body: body, + typeParameters: typeParameters, + superTypeParameters: superTypeParameters, + "implements": implemented + }; + }, + + createClassDeclaration: function (id, superClass, body, typeParameters, superTypeParameters, implemented) { + return { + type: Syntax.ClassDeclaration, + id: id, + superClass: superClass, + body: body, + typeParameters: typeParameters, + superTypeParameters: superTypeParameters, + "implements": implemented + }; + }, + + createModuleSpecifier: function (token) { + return { + type: Syntax.ModuleSpecifier, + value: token.value, + raw: source.slice(token.range[0], token.range[1]) + }; + }, + + createExportSpecifier: function (id, name) { + return { + type: Syntax.ExportSpecifier, + id: id, + name: name + }; + }, + + createExportBatchSpecifier: function () { + return { + type: Syntax.ExportBatchSpecifier + }; + }, + + createImportDefaultSpecifier: function (id) { + return { + type: Syntax.ImportDefaultSpecifier, + id: id + }; + }, + + createImportNamespaceSpecifier: function (id) { + return { + type: Syntax.ImportNamespaceSpecifier, + id: id + }; + }, + + createExportDeclaration: function (isDefault, declaration, specifiers, src) { + return { + type: Syntax.ExportDeclaration, + 'default': !!isDefault, + declaration: declaration, + specifiers: specifiers, + source: src + }; + }, + + createImportSpecifier: function (id, name) { + return { + type: Syntax.ImportSpecifier, + id: id, + name: name + }; + }, + + createImportDeclaration: function (specifiers, src, isType) { + return { + type: Syntax.ImportDeclaration, + specifiers: specifiers, + source: src, + isType: isType + }; + }, + + createYieldExpression: function (argument, dlg) { + return { + type: Syntax.YieldExpression, + argument: argument, + delegate: dlg + }; + }, + + createAwaitExpression: function (argument) { + return { + type: Syntax.AwaitExpression, + argument: argument + }; + }, + + createComprehensionExpression: function (filter, blocks, body) { + return { + type: Syntax.ComprehensionExpression, + filter: filter, + blocks: blocks, + body: body + }; + } + + }; + + // Return true if there is a line terminator before the next token. + + function peekLineTerminator() { + var pos, line, start, found; + + pos = index; + line = lineNumber; + start = lineStart; + skipComment(); + found = lineNumber !== line; + index = pos; + lineNumber = line; + lineStart = start; + + return found; + } + + // Throw an exception + + function throwError(token, messageFormat) { + var error, + args = Array.prototype.slice.call(arguments, 2), + msg = messageFormat.replace( + /%(\d)/g, + function (whole, idx) { + assert(idx < args.length, 'Message reference must be in range'); + return args[idx]; + } + ); + + if (typeof token.lineNumber === 'number') { + error = new Error('Line ' + token.lineNumber + ': ' + msg); + error.index = token.range[0]; + error.lineNumber = token.lineNumber; + error.column = token.range[0] - lineStart + 1; + } else { + error = new Error('Line ' + lineNumber + ': ' + msg); + error.index = index; + error.lineNumber = lineNumber; + error.column = index - lineStart + 1; + } + + error.description = msg; + throw error; + } + + function throwErrorTolerant() { + try { + throwError.apply(null, arguments); + } catch (e) { + if (extra.errors) { + extra.errors.push(e); + } else { + throw e; + } + } + } + + + // Throw an exception because of the token. + + function throwUnexpected(token) { + if (token.type === Token.EOF) { + throwError(token, Messages.UnexpectedEOS); + } + + if (token.type === Token.NumericLiteral) { + throwError(token, Messages.UnexpectedNumber); + } + + if (token.type === Token.StringLiteral || token.type === Token.JSXText) { + throwError(token, Messages.UnexpectedString); + } + + if (token.type === Token.Identifier) { + throwError(token, Messages.UnexpectedIdentifier); + } + + if (token.type === Token.Keyword) { + if (isFutureReservedWord(token.value)) { + throwError(token, Messages.UnexpectedReserved); + } else if (strict && isStrictModeReservedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictReservedWord); + return; + } + throwError(token, Messages.UnexpectedToken, token.value); + } + + if (token.type === Token.Template) { + throwError(token, Messages.UnexpectedTemplate, token.value.raw); + } + + // BooleanLiteral, NullLiteral, or Punctuator. + throwError(token, Messages.UnexpectedToken, token.value); + } + + // Expect the next token to match the specified punctuator. + // If not, an exception will be thrown. + + function expect(value) { + var token = lex(); + if (token.type !== Token.Punctuator || token.value !== value) { + throwUnexpected(token); + } + } + + // Expect the next token to match the specified keyword. + // If not, an exception will be thrown. + + function expectKeyword(keyword, contextual) { + var token = lex(); + if (token.type !== (contextual ? Token.Identifier : Token.Keyword) || + token.value !== keyword) { + throwUnexpected(token); + } + } + + // Expect the next token to match the specified contextual keyword. + // If not, an exception will be thrown. + + function expectContextualKeyword(keyword) { + return expectKeyword(keyword, true); + } + + // Return true if the next token matches the specified punctuator. + + function match(value) { + return lookahead.type === Token.Punctuator && lookahead.value === value; + } + + // Return true if the next token matches the specified keyword + + function matchKeyword(keyword, contextual) { + var expectedType = contextual ? Token.Identifier : Token.Keyword; + return lookahead.type === expectedType && lookahead.value === keyword; + } + + // Return true if the next token matches the specified contextual keyword + + function matchContextualKeyword(keyword) { + return matchKeyword(keyword, true); + } + + // Return true if the next token is an assignment operator + + function matchAssign() { + var op; + + if (lookahead.type !== Token.Punctuator) { + return false; + } + op = lookahead.value; + return op === '=' || + op === '*=' || + op === '/=' || + op === '%=' || + op === '+=' || + op === '-=' || + op === '<<=' || + op === '>>=' || + op === '>>>=' || + op === '&=' || + op === '^=' || + op === '|='; + } + + // Note that 'yield' is treated as a keyword in strict mode, but a + // contextual keyword (identifier) in non-strict mode, so we need to + // use matchKeyword('yield', false) and matchKeyword('yield', true) + // (i.e. matchContextualKeyword) appropriately. + function matchYield() { + return state.yieldAllowed && matchKeyword('yield', !strict); + } + + function matchAsync() { + var backtrackToken = lookahead, matches = false; + + if (matchContextualKeyword('async')) { + lex(); // Make sure peekLineTerminator() starts after 'async'. + matches = !peekLineTerminator(); + rewind(backtrackToken); // Revert the lex(). + } + + return matches; + } + + function matchAwait() { + return state.awaitAllowed && matchContextualKeyword('await'); + } + + function consumeSemicolon() { + var line, oldIndex = index, oldLineNumber = lineNumber, + oldLineStart = lineStart, oldLookahead = lookahead; + + // Catch the very common case first: immediately a semicolon (char #59). + if (source.charCodeAt(index) === 59) { + lex(); + return; + } + + line = lineNumber; + skipComment(); + if (lineNumber !== line) { + index = oldIndex; + lineNumber = oldLineNumber; + lineStart = oldLineStart; + lookahead = oldLookahead; + return; + } + + if (match(';')) { + lex(); + return; + } + + if (lookahead.type !== Token.EOF && !match('}')) { + throwUnexpected(lookahead); + } + } + + // Return true if provided expression is LeftHandSideExpression + + function isLeftHandSide(expr) { + return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression; + } + + function isAssignableLeftHandSide(expr) { + return isLeftHandSide(expr) || expr.type === Syntax.ObjectPattern || expr.type === Syntax.ArrayPattern; + } + + // 11.1.4 Array Initialiser + + function parseArrayInitialiser() { + var elements = [], blocks = [], filter = null, tmp, possiblecomprehension = true, + marker = markerCreate(); + + expect('['); + while (!match(']')) { + if (lookahead.value === 'for' && + lookahead.type === Token.Keyword) { + if (!possiblecomprehension) { + throwError({}, Messages.ComprehensionError); + } + matchKeyword('for'); + tmp = parseForStatement({ignoreBody: true}); + tmp.of = tmp.type === Syntax.ForOfStatement; + tmp.type = Syntax.ComprehensionBlock; + if (tmp.left.kind) { // can't be let or const + throwError({}, Messages.ComprehensionError); + } + blocks.push(tmp); + } else if (lookahead.value === 'if' && + lookahead.type === Token.Keyword) { + if (!possiblecomprehension) { + throwError({}, Messages.ComprehensionError); + } + expectKeyword('if'); + expect('('); + filter = parseExpression(); + expect(')'); + } else if (lookahead.value === ',' && + lookahead.type === Token.Punctuator) { + possiblecomprehension = false; // no longer allowed. + lex(); + elements.push(null); + } else { + tmp = parseSpreadOrAssignmentExpression(); + elements.push(tmp); + if (tmp && tmp.type === Syntax.SpreadElement) { + if (!match(']')) { + throwError({}, Messages.ElementAfterSpreadElement); + } + } else if (!(match(']') || matchKeyword('for') || matchKeyword('if'))) { + expect(','); // this lexes. + possiblecomprehension = false; + } + } + } + + expect(']'); + + if (filter && !blocks.length) { + throwError({}, Messages.ComprehensionRequiresBlock); + } + + if (blocks.length) { + if (elements.length !== 1) { + throwError({}, Messages.ComprehensionError); + } + return markerApply(marker, delegate.createComprehensionExpression(filter, blocks, elements[0])); + } + return markerApply(marker, delegate.createArrayExpression(elements)); + } + + // 11.1.5 Object Initialiser + + function parsePropertyFunction(options) { + var previousStrict, previousYieldAllowed, previousAwaitAllowed, + params, defaults, body, marker = markerCreate(); + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = options.generator; + previousAwaitAllowed = state.awaitAllowed; + state.awaitAllowed = options.async; + params = options.params || []; + defaults = options.defaults || []; + + body = parseConciseBody(); + if (options.name && strict && isRestrictedWord(params[0].name)) { + throwErrorTolerant(options.name, Messages.StrictParamName); + } + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + state.awaitAllowed = previousAwaitAllowed; + + return markerApply(marker, delegate.createFunctionExpression( + null, + params, + defaults, + body, + options.rest || null, + options.generator, + body.type !== Syntax.BlockStatement, + options.async, + options.returnType, + options.typeParameters + )); + } + + + function parsePropertyMethodFunction(options) { + var previousStrict, tmp, method; + + previousStrict = strict; + strict = true; + + tmp = parseParams(); + + if (tmp.stricted) { + throwErrorTolerant(tmp.stricted, tmp.message); + } + + method = parsePropertyFunction({ + params: tmp.params, + defaults: tmp.defaults, + rest: tmp.rest, + generator: options.generator, + async: options.async, + returnType: tmp.returnType, + typeParameters: options.typeParameters + }); + + strict = previousStrict; + + return method; + } + + + function parseObjectPropertyKey() { + var marker = markerCreate(), + token = lex(), + propertyKey, + result; + + // Note: This function is called only from parseObjectProperty(), where + // EOF and Punctuator tokens are already filtered out. + + if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) { + if (strict && token.octal) { + throwErrorTolerant(token, Messages.StrictOctalLiteral); + } + return markerApply(marker, delegate.createLiteral(token)); + } + + if (token.type === Token.Punctuator && token.value === '[') { + // For computed properties we should skip the [ and ], and + // capture in marker only the assignment expression itself. + marker = markerCreate(); + propertyKey = parseAssignmentExpression(); + result = markerApply(marker, propertyKey); + expect(']'); + return result; + } + + return markerApply(marker, delegate.createIdentifier(token.value)); + } + + function parseObjectProperty() { + var token, key, id, param, computed, + marker = markerCreate(), returnType, typeParameters; + + token = lookahead; + computed = (token.value === '[' && token.type === Token.Punctuator); + + if (token.type === Token.Identifier || computed || matchAsync()) { + id = parseObjectPropertyKey(); + + if (match(':')) { + lex(); + + return markerApply( + marker, + delegate.createProperty( + 'init', + id, + parseAssignmentExpression(), + false, + false, + computed + ) + ); + } + + if (match('(') || match('<')) { + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + return markerApply( + marker, + delegate.createProperty( + 'init', + id, + parsePropertyMethodFunction({ + generator: false, + async: false, + typeParameters: typeParameters + }), + true, + false, + computed + ) + ); + } + + // Property Assignment: Getter and Setter. + + if (token.value === 'get') { + computed = (lookahead.value === '['); + key = parseObjectPropertyKey(); + + expect('('); + expect(')'); + if (match(':')) { + returnType = parseTypeAnnotation(); + } + + return markerApply( + marker, + delegate.createProperty( + 'get', + key, + parsePropertyFunction({ + generator: false, + async: false, + returnType: returnType + }), + false, + false, + computed + ) + ); + } + + if (token.value === 'set') { + computed = (lookahead.value === '['); + key = parseObjectPropertyKey(); + + expect('('); + token = lookahead; + param = [ parseTypeAnnotatableIdentifier() ]; + expect(')'); + if (match(':')) { + returnType = parseTypeAnnotation(); + } + + return markerApply( + marker, + delegate.createProperty( + 'set', + key, + parsePropertyFunction({ + params: param, + generator: false, + async: false, + name: token, + returnType: returnType + }), + false, + false, + computed + ) + ); + } + + if (token.value === 'async') { + computed = (lookahead.value === '['); + key = parseObjectPropertyKey(); + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + return markerApply( + marker, + delegate.createProperty( + 'init', + key, + parsePropertyMethodFunction({ + generator: false, + async: true, + typeParameters: typeParameters + }), + true, + false, + computed + ) + ); + } + + if (computed) { + // Computed properties can only be used with full notation. + throwUnexpected(lookahead); + } + + return markerApply( + marker, + delegate.createProperty('init', id, id, false, true, false) + ); + } + + if (token.type === Token.EOF || token.type === Token.Punctuator) { + if (!match('*')) { + throwUnexpected(token); + } + lex(); + + computed = (lookahead.type === Token.Punctuator && lookahead.value === '['); + + id = parseObjectPropertyKey(); + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + if (!match('(')) { + throwUnexpected(lex()); + } + + return markerApply(marker, delegate.createProperty( + 'init', + id, + parsePropertyMethodFunction({ + generator: true, + typeParameters: typeParameters + }), + true, + false, + computed + )); + } + key = parseObjectPropertyKey(); + if (match(':')) { + lex(); + return markerApply(marker, delegate.createProperty('init', key, parseAssignmentExpression(), false, false, false)); + } + if (match('(') || match('<')) { + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + return markerApply(marker, delegate.createProperty( + 'init', + key, + parsePropertyMethodFunction({ + generator: false, + typeParameters: typeParameters + }), + true, + false, + false + )); + } + throwUnexpected(lex()); + } + + function parseObjectSpreadProperty() { + var marker = markerCreate(); + expect('...'); + return markerApply(marker, delegate.createSpreadProperty(parseAssignmentExpression())); + } + + function getFieldName(key) { + var toString = String; + if (key.type === Syntax.Identifier) { + return key.name; + } + return toString(key.value); + } + + function parseObjectInitialiser() { + var properties = [], property, name, kind, storedKind, map = new StringMap(), + marker = markerCreate(), toString = String; + + expect('{'); + + while (!match('}')) { + if (match('...')) { + property = parseObjectSpreadProperty(); + } else { + property = parseObjectProperty(); + + if (property.key.type === Syntax.Identifier) { + name = property.key.name; + } else { + name = toString(property.key.value); + } + kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set; + + if (map.has(name)) { + storedKind = map.get(name); + if (storedKind === PropertyKind.Data) { + if (strict && kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.StrictDuplicateProperty); + } else if (kind !== PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } + } else { + if (kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } else if (storedKind & kind) { + throwErrorTolerant({}, Messages.AccessorGetSet); + } + } + map.set(name, storedKind | kind); + } else { + map.set(name, kind); + } + } + + properties.push(property); + + if (!match('}')) { + expect(','); + } + } + + expect('}'); + + return markerApply(marker, delegate.createObjectExpression(properties)); + } + + function parseTemplateElement(option) { + var marker = markerCreate(), + token = scanTemplateElement(option); + if (strict && token.octal) { + throwError(token, Messages.StrictOctalLiteral); + } + return markerApply(marker, delegate.createTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail)); + } + + function parseTemplateLiteral() { + var quasi, quasis, expressions, marker = markerCreate(); + + quasi = parseTemplateElement({ head: true }); + quasis = [ quasi ]; + expressions = []; + + while (!quasi.tail) { + expressions.push(parseExpression()); + quasi = parseTemplateElement({ head: false }); + quasis.push(quasi); + } + + return markerApply(marker, delegate.createTemplateLiteral(quasis, expressions)); + } + + // 11.1.6 The Grouping Operator + + function parseGroupExpression() { + var expr, marker, typeAnnotation; + + expect('('); + + ++state.parenthesizedCount; + + marker = markerCreate(); + + expr = parseExpression(); + + if (match(':')) { + typeAnnotation = parseTypeAnnotation(); + expr = markerApply(marker, delegate.createTypeCast( + expr, + typeAnnotation + )); + } + + expect(')'); + + return expr; + } + + function matchAsyncFuncExprOrDecl() { + var token; + + if (matchAsync()) { + token = lookahead2(); + if (token.type === Token.Keyword && token.value === 'function') { + return true; + } + } + + return false; + } + + // 11.1 Primary Expressions + + function parsePrimaryExpression() { + var marker, type, token, expr; + + type = lookahead.type; + + if (type === Token.Identifier) { + marker = markerCreate(); + return markerApply(marker, delegate.createIdentifier(lex().value)); + } + + if (type === Token.StringLiteral || type === Token.NumericLiteral) { + if (strict && lookahead.octal) { + throwErrorTolerant(lookahead, Messages.StrictOctalLiteral); + } + marker = markerCreate(); + return markerApply(marker, delegate.createLiteral(lex())); + } + + if (type === Token.Keyword) { + if (matchKeyword('this')) { + marker = markerCreate(); + lex(); + return markerApply(marker, delegate.createThisExpression()); + } + + if (matchKeyword('function')) { + return parseFunctionExpression(); + } + + if (matchKeyword('class')) { + return parseClassExpression(); + } + + if (matchKeyword('super')) { + marker = markerCreate(); + lex(); + return markerApply(marker, delegate.createIdentifier('super')); + } + } + + if (type === Token.BooleanLiteral) { + marker = markerCreate(); + token = lex(); + token.value = (token.value === 'true'); + return markerApply(marker, delegate.createLiteral(token)); + } + + if (type === Token.NullLiteral) { + marker = markerCreate(); + token = lex(); + token.value = null; + return markerApply(marker, delegate.createLiteral(token)); + } + + if (match('[')) { + return parseArrayInitialiser(); + } + + if (match('{')) { + return parseObjectInitialiser(); + } + + if (match('(')) { + return parseGroupExpression(); + } + + if (match('/') || match('/=')) { + marker = markerCreate(); + expr = delegate.createLiteral(scanRegExp()); + peek(); + return markerApply(marker, expr); + } + + if (type === Token.Template) { + return parseTemplateLiteral(); + } + + if (match('<')) { + return parseJSXElement(); + } + + throwUnexpected(lex()); + } + + // 11.2 Left-Hand-Side Expressions + + function parseArguments() { + var args = [], arg; + + expect('('); + + if (!match(')')) { + while (index < length) { + arg = parseSpreadOrAssignmentExpression(); + args.push(arg); + + if (match(')')) { + break; + } else if (arg.type === Syntax.SpreadElement) { + throwError({}, Messages.ElementAfterSpreadElement); + } + + expect(','); + } + } + + expect(')'); + + return args; + } + + function parseSpreadOrAssignmentExpression() { + if (match('...')) { + var marker = markerCreate(); + lex(); + return markerApply(marker, delegate.createSpreadElement(parseAssignmentExpression())); + } + return parseAssignmentExpression(); + } + + function parseNonComputedProperty() { + var marker = markerCreate(), + token = lex(); + + if (!isIdentifierName(token)) { + throwUnexpected(token); + } + + return markerApply(marker, delegate.createIdentifier(token.value)); + } + + function parseNonComputedMember() { + expect('.'); + + return parseNonComputedProperty(); + } + + function parseComputedMember() { + var expr; + + expect('['); + + expr = parseExpression(); + + expect(']'); + + return expr; + } + + function parseNewExpression() { + var callee, args, marker = markerCreate(); + + expectKeyword('new'); + callee = parseLeftHandSideExpression(); + args = match('(') ? parseArguments() : []; + + return markerApply(marker, delegate.createNewExpression(callee, args)); + } + + function parseLeftHandSideExpressionAllowCall() { + var expr, args, marker = markerCreate(); + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || match('(') || lookahead.type === Token.Template) { + if (match('(')) { + args = parseArguments(); + expr = markerApply(marker, delegate.createCallExpression(expr, args)); + } else if (match('[')) { + expr = markerApply(marker, delegate.createMemberExpression('[', expr, parseComputedMember())); + } else if (match('.')) { + expr = markerApply(marker, delegate.createMemberExpression('.', expr, parseNonComputedMember())); + } else { + expr = markerApply(marker, delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral())); + } + } + + return expr; + } + + function parseLeftHandSideExpression() { + var expr, marker = markerCreate(); + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || lookahead.type === Token.Template) { + if (match('[')) { + expr = markerApply(marker, delegate.createMemberExpression('[', expr, parseComputedMember())); + } else if (match('.')) { + expr = markerApply(marker, delegate.createMemberExpression('.', expr, parseNonComputedMember())); + } else { + expr = markerApply(marker, delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral())); + } + } + + return expr; + } + + // 11.3 Postfix Expressions + + function parsePostfixExpression() { + var marker = markerCreate(), + expr = parseLeftHandSideExpressionAllowCall(), + token; + + if (lookahead.type !== Token.Punctuator) { + return expr; + } + + if ((match('++') || match('--')) && !peekLineTerminator()) { + // 11.3.1, 11.3.2 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPostfix); + } + + if (!isLeftHandSide(expr)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + + token = lex(); + expr = markerApply(marker, delegate.createPostfixExpression(token.value, expr)); + } + + return expr; + } + + // 11.4 Unary Operators + + function parseUnaryExpression() { + var marker, token, expr; + + if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) { + return parsePostfixExpression(); + } + + if (match('++') || match('--')) { + marker = markerCreate(); + token = lex(); + expr = parseUnaryExpression(); + // 11.4.4, 11.4.5 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPrefix); + } + + if (!isLeftHandSide(expr)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + + return markerApply(marker, delegate.createUnaryExpression(token.value, expr)); + } + + if (match('+') || match('-') || match('~') || match('!')) { + marker = markerCreate(); + token = lex(); + expr = parseUnaryExpression(); + return markerApply(marker, delegate.createUnaryExpression(token.value, expr)); + } + + if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { + marker = markerCreate(); + token = lex(); + expr = parseUnaryExpression(); + expr = markerApply(marker, delegate.createUnaryExpression(token.value, expr)); + if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { + throwErrorTolerant({}, Messages.StrictDelete); + } + return expr; + } + + return parsePostfixExpression(); + } + + function binaryPrecedence(token, allowIn) { + var prec = 0; + + if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { + return 0; + } + + switch (token.value) { + case '||': + prec = 1; + break; + + case '&&': + prec = 2; + break; + + case '|': + prec = 3; + break; + + case '^': + prec = 4; + break; + + case '&': + prec = 5; + break; + + case '==': + case '!=': + case '===': + case '!==': + prec = 6; + break; + + case '<': + case '>': + case '<=': + case '>=': + case 'instanceof': + prec = 7; + break; + + case 'in': + prec = allowIn ? 7 : 0; + break; + + case '<<': + case '>>': + case '>>>': + prec = 8; + break; + + case '+': + case '-': + prec = 9; + break; + + case '*': + case '/': + case '%': + prec = 11; + break; + + default: + break; + } + + return prec; + } + + // 11.5 Multiplicative Operators + // 11.6 Additive Operators + // 11.7 Bitwise Shift Operators + // 11.8 Relational Operators + // 11.9 Equality Operators + // 11.10 Binary Bitwise Operators + // 11.11 Binary Logical Operators + + function parseBinaryExpression() { + var expr, token, prec, previousAllowIn, stack, right, operator, left, i, + marker, markers; + + previousAllowIn = state.allowIn; + state.allowIn = true; + + marker = markerCreate(); + left = parseUnaryExpression(); + + token = lookahead; + prec = binaryPrecedence(token, previousAllowIn); + if (prec === 0) { + return left; + } + token.prec = prec; + lex(); + + markers = [marker, markerCreate()]; + right = parseUnaryExpression(); + + stack = [left, token, right]; + + while ((prec = binaryPrecedence(lookahead, previousAllowIn)) > 0) { + + // Reduce: make a binary expression from the three topmost entries. + while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) { + right = stack.pop(); + operator = stack.pop().value; + left = stack.pop(); + expr = delegate.createBinaryExpression(operator, left, right); + markers.pop(); + marker = markers.pop(); + markerApply(marker, expr); + stack.push(expr); + markers.push(marker); + } + + // Shift. + token = lex(); + token.prec = prec; + stack.push(token); + markers.push(markerCreate()); + expr = parseUnaryExpression(); + stack.push(expr); + } + + state.allowIn = previousAllowIn; + + // Final reduce to clean-up the stack. + i = stack.length - 1; + expr = stack[i]; + markers.pop(); + while (i > 1) { + expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr); + i -= 2; + marker = markers.pop(); + markerApply(marker, expr); + } + + return expr; + } + + + // 11.12 Conditional Operator + + function parseConditionalExpression() { + var expr, previousAllowIn, consequent, alternate, marker = markerCreate(); + expr = parseBinaryExpression(); + + if (match('?')) { + lex(); + previousAllowIn = state.allowIn; + state.allowIn = true; + consequent = parseAssignmentExpression(); + state.allowIn = previousAllowIn; + expect(':'); + alternate = parseAssignmentExpression(); + + expr = markerApply(marker, delegate.createConditionalExpression(expr, consequent, alternate)); + } + + return expr; + } + + // 11.13 Assignment Operators + + // 12.14.5 AssignmentPattern + + function reinterpretAsAssignmentBindingPattern(expr) { + var i, len, property, element; + + if (expr.type === Syntax.ObjectExpression) { + expr.type = Syntax.ObjectPattern; + for (i = 0, len = expr.properties.length; i < len; i += 1) { + property = expr.properties[i]; + if (property.type === Syntax.SpreadProperty) { + if (i < len - 1) { + throwError({}, Messages.PropertyAfterSpreadProperty); + } + reinterpretAsAssignmentBindingPattern(property.argument); + } else { + if (property.kind !== 'init') { + throwError({}, Messages.InvalidLHSInAssignment); + } + reinterpretAsAssignmentBindingPattern(property.value); + } + } + } else if (expr.type === Syntax.ArrayExpression) { + expr.type = Syntax.ArrayPattern; + for (i = 0, len = expr.elements.length; i < len; i += 1) { + element = expr.elements[i]; + /* istanbul ignore else */ + if (element) { + reinterpretAsAssignmentBindingPattern(element); + } + } + } else if (expr.type === Syntax.Identifier) { + if (isRestrictedWord(expr.name)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + } else if (expr.type === Syntax.SpreadElement) { + reinterpretAsAssignmentBindingPattern(expr.argument); + if (expr.argument.type === Syntax.ObjectPattern) { + throwError({}, Messages.ObjectPatternAsSpread); + } + } else { + /* istanbul ignore else */ + if (expr.type !== Syntax.MemberExpression && expr.type !== Syntax.CallExpression && expr.type !== Syntax.NewExpression) { + throwError({}, Messages.InvalidLHSInAssignment); + } + } + } + + // 13.2.3 BindingPattern + + function reinterpretAsDestructuredParameter(options, expr) { + var i, len, property, element; + + if (expr.type === Syntax.ObjectExpression) { + expr.type = Syntax.ObjectPattern; + for (i = 0, len = expr.properties.length; i < len; i += 1) { + property = expr.properties[i]; + if (property.type === Syntax.SpreadProperty) { + if (i < len - 1) { + throwError({}, Messages.PropertyAfterSpreadProperty); + } + reinterpretAsDestructuredParameter(options, property.argument); + } else { + if (property.kind !== 'init') { + throwError({}, Messages.InvalidLHSInFormalsList); + } + reinterpretAsDestructuredParameter(options, property.value); + } + } + } else if (expr.type === Syntax.ArrayExpression) { + expr.type = Syntax.ArrayPattern; + for (i = 0, len = expr.elements.length; i < len; i += 1) { + element = expr.elements[i]; + if (element) { + reinterpretAsDestructuredParameter(options, element); + } + } + } else if (expr.type === Syntax.Identifier) { + validateParam(options, expr, expr.name); + } else if (expr.type === Syntax.SpreadElement) { + // BindingRestElement only allows BindingIdentifier + if (expr.argument.type !== Syntax.Identifier) { + throwError({}, Messages.InvalidLHSInFormalsList); + } + validateParam(options, expr.argument, expr.argument.name); + } else { + throwError({}, Messages.InvalidLHSInFormalsList); + } + } + + function reinterpretAsCoverFormalsList(expressions) { + var i, len, param, params, defaults, defaultCount, options, rest; + + params = []; + defaults = []; + defaultCount = 0; + rest = null; + options = { + paramSet: new StringMap() + }; + + for (i = 0, len = expressions.length; i < len; i += 1) { + param = expressions[i]; + if (param.type === Syntax.Identifier) { + params.push(param); + defaults.push(null); + validateParam(options, param, param.name); + } else if (param.type === Syntax.ObjectExpression || param.type === Syntax.ArrayExpression) { + reinterpretAsDestructuredParameter(options, param); + params.push(param); + defaults.push(null); + } else if (param.type === Syntax.SpreadElement) { + assert(i === len - 1, 'It is guaranteed that SpreadElement is last element by parseExpression'); + if (param.argument.type !== Syntax.Identifier) { + throwError({}, Messages.InvalidLHSInFormalsList); + } + reinterpretAsDestructuredParameter(options, param.argument); + rest = param.argument; + } else if (param.type === Syntax.AssignmentExpression) { + params.push(param.left); + defaults.push(param.right); + ++defaultCount; + validateParam(options, param.left, param.left.name); + } else { + return null; + } + } + + if (options.message === Messages.StrictParamDupe) { + throwError( + strict ? options.stricted : options.firstRestricted, + options.message + ); + } + + if (defaultCount === 0) { + defaults = []; + } + + return { + params: params, + defaults: defaults, + rest: rest, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + } + + function parseArrowFunctionExpression(options, marker) { + var previousStrict, previousYieldAllowed, previousAwaitAllowed, body; + + expect('=>'); + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = false; + previousAwaitAllowed = state.awaitAllowed; + state.awaitAllowed = !!options.async; + body = parseConciseBody(); + + if (strict && options.firstRestricted) { + throwError(options.firstRestricted, options.message); + } + if (strict && options.stricted) { + throwErrorTolerant(options.stricted, options.message); + } + + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + state.awaitAllowed = previousAwaitAllowed; + + return markerApply(marker, delegate.createArrowFunctionExpression( + options.params, + options.defaults, + body, + options.rest, + body.type !== Syntax.BlockStatement, + !!options.async + )); + } + + function parseAssignmentExpression() { + var marker, expr, token, params, oldParenthesizedCount, + startsWithParen = false, backtrackToken = lookahead, + possiblyAsync = false; + + if (matchYield()) { + return parseYieldExpression(); + } + + if (matchAwait()) { + return parseAwaitExpression(); + } + + oldParenthesizedCount = state.parenthesizedCount; + + marker = markerCreate(); + + if (matchAsyncFuncExprOrDecl()) { + return parseFunctionExpression(); + } + + if (matchAsync()) { + // We can't be completely sure that this 'async' token is + // actually a contextual keyword modifying a function + // expression, so we might have to un-lex() it later by + // calling rewind(backtrackToken). + possiblyAsync = true; + lex(); + } + + if (match('(')) { + token = lookahead2(); + if ((token.type === Token.Punctuator && token.value === ')') || token.value === '...') { + params = parseParams(); + if (!match('=>')) { + throwUnexpected(lex()); + } + params.async = possiblyAsync; + return parseArrowFunctionExpression(params, marker); + } + startsWithParen = true; + } + + token = lookahead; + + // If the 'async' keyword is not followed by a '(' character or an + // identifier, then it can't be an arrow function modifier, and we + // should interpret it as a normal identifer. + if (possiblyAsync && !match('(') && token.type !== Token.Identifier) { + possiblyAsync = false; + rewind(backtrackToken); + } + + expr = parseConditionalExpression(); + + if (match('=>') && + (state.parenthesizedCount === oldParenthesizedCount || + state.parenthesizedCount === (oldParenthesizedCount + 1))) { + if (expr.type === Syntax.Identifier) { + params = reinterpretAsCoverFormalsList([ expr ]); + } else if (expr.type === Syntax.AssignmentExpression || + expr.type === Syntax.ArrayExpression || + expr.type === Syntax.ObjectExpression) { + if (!startsWithParen) { + throwUnexpected(lex()); + } + params = reinterpretAsCoverFormalsList([ expr ]); + } else if (expr.type === Syntax.SequenceExpression) { + params = reinterpretAsCoverFormalsList(expr.expressions); + } + if (params) { + params.async = possiblyAsync; + return parseArrowFunctionExpression(params, marker); + } + } + + // If we haven't returned by now, then the 'async' keyword was not + // a function modifier, and we should rewind and interpret it as a + // normal identifier. + if (possiblyAsync) { + possiblyAsync = false; + rewind(backtrackToken); + expr = parseConditionalExpression(); + } + + if (matchAssign()) { + // 11.13.1 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant(token, Messages.StrictLHSAssignment); + } + + // ES.next draf 11.13 Runtime Semantics step 1 + if (match('=') && (expr.type === Syntax.ObjectExpression || expr.type === Syntax.ArrayExpression)) { + reinterpretAsAssignmentBindingPattern(expr); + } else if (!isLeftHandSide(expr)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + + expr = markerApply(marker, delegate.createAssignmentExpression(lex().value, expr, parseAssignmentExpression())); + } + + return expr; + } + + // 11.14 Comma Operator + + function parseExpression() { + var marker, expr, expressions, sequence, spreadFound; + + marker = markerCreate(); + expr = parseAssignmentExpression(); + expressions = [ expr ]; + + if (match(',')) { + while (index < length) { + if (!match(',')) { + break; + } + + lex(); + expr = parseSpreadOrAssignmentExpression(); + expressions.push(expr); + + if (expr.type === Syntax.SpreadElement) { + spreadFound = true; + if (!match(')')) { + throwError({}, Messages.ElementAfterSpreadElement); + } + break; + } + } + + sequence = markerApply(marker, delegate.createSequenceExpression(expressions)); + } + + if (spreadFound && lookahead2().value !== '=>') { + throwError({}, Messages.IllegalSpread); + } + + return sequence || expr; + } + + // 12.1 Block + + function parseStatementList() { + var list = [], + statement; + + while (index < length) { + if (match('}')) { + break; + } + statement = parseSourceElement(); + if (typeof statement === 'undefined') { + break; + } + list.push(statement); + } + + return list; + } + + function parseBlock() { + var block, marker = markerCreate(); + + expect('{'); + + block = parseStatementList(); + + expect('}'); + + return markerApply(marker, delegate.createBlockStatement(block)); + } + + // 12.2 Variable Statement + + function parseTypeParameterDeclaration() { + var marker = markerCreate(), paramTypes = []; + + expect('<'); + while (!match('>')) { + paramTypes.push(parseTypeAnnotatableIdentifier()); + if (!match('>')) { + expect(','); + } + } + expect('>'); + + return markerApply(marker, delegate.createTypeParameterDeclaration( + paramTypes + )); + } + + function parseTypeParameterInstantiation() { + var marker = markerCreate(), oldInType = state.inType, paramTypes = []; + + state.inType = true; + + expect('<'); + while (!match('>')) { + paramTypes.push(parseType()); + if (!match('>')) { + expect(','); + } + } + expect('>'); + + state.inType = oldInType; + + return markerApply(marker, delegate.createTypeParameterInstantiation( + paramTypes + )); + } + + function parseObjectTypeIndexer(marker, isStatic) { + var id, key, value; + + expect('['); + id = parseObjectPropertyKey(); + expect(':'); + key = parseType(); + expect(']'); + expect(':'); + value = parseType(); + + return markerApply(marker, delegate.createObjectTypeIndexer( + id, + key, + value, + isStatic + )); + } + + function parseObjectTypeMethodish(marker) { + var params = [], rest = null, returnType, typeParameters = null; + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + expect('('); + while (lookahead.type === Token.Identifier) { + params.push(parseFunctionTypeParam()); + if (!match(')')) { + expect(','); + } + } + + if (match('...')) { + lex(); + rest = parseFunctionTypeParam(); + } + expect(')'); + expect(':'); + returnType = parseType(); + + return markerApply(marker, delegate.createFunctionTypeAnnotation( + params, + returnType, + rest, + typeParameters + )); + } + + function parseObjectTypeMethod(marker, isStatic, key) { + var optional = false, value; + value = parseObjectTypeMethodish(marker); + + return markerApply(marker, delegate.createObjectTypeProperty( + key, + value, + optional, + isStatic + )); + } + + function parseObjectTypeCallProperty(marker, isStatic) { + var valueMarker = markerCreate(); + return markerApply(marker, delegate.createObjectTypeCallProperty( + parseObjectTypeMethodish(valueMarker), + isStatic + )); + } + + function parseObjectType(allowStatic) { + var callProperties = [], indexers = [], marker, optional = false, + properties = [], propertyKey, propertyTypeAnnotation, + token, isStatic, matchStatic; + + expect('{'); + + while (!match('}')) { + marker = markerCreate(); + matchStatic = + strict + ? matchKeyword('static') + : matchContextualKeyword('static'); + + if (allowStatic && matchStatic) { + token = lex(); + isStatic = true; + } + + if (match('[')) { + indexers.push(parseObjectTypeIndexer(marker, isStatic)); + } else if (match('(') || match('<')) { + callProperties.push(parseObjectTypeCallProperty(marker, allowStatic)); + } else { + if (isStatic && match(':')) { + propertyKey = markerApply(marker, delegate.createIdentifier(token)); + throwErrorTolerant(token, Messages.StrictReservedWord); + } else { + propertyKey = parseObjectPropertyKey(); + } + if (match('<') || match('(')) { + // This is a method property + properties.push(parseObjectTypeMethod(marker, isStatic, propertyKey)); + } else { + if (match('?')) { + lex(); + optional = true; + } + expect(':'); + propertyTypeAnnotation = parseType(); + properties.push(markerApply(marker, delegate.createObjectTypeProperty( + propertyKey, + propertyTypeAnnotation, + optional, + isStatic + ))); + } + } + + if (match(';')) { + lex(); + } else if (!match('}')) { + throwUnexpected(lookahead); + } + } + + expect('}'); + + return delegate.createObjectTypeAnnotation( + properties, + indexers, + callProperties + ); + } + + function parseGenericType() { + var marker = markerCreate(), + typeParameters = null, typeIdentifier; + + typeIdentifier = parseVariableIdentifier(); + + while (match('.')) { + expect('.'); + typeIdentifier = markerApply(marker, delegate.createQualifiedTypeIdentifier( + typeIdentifier, + parseVariableIdentifier() + )); + } + + if (match('<')) { + typeParameters = parseTypeParameterInstantiation(); + } + + return markerApply(marker, delegate.createGenericTypeAnnotation( + typeIdentifier, + typeParameters + )); + } + + function parseVoidType() { + var marker = markerCreate(); + expectKeyword('void'); + return markerApply(marker, delegate.createVoidTypeAnnotation()); + } + + function parseTypeofType() { + var argument, marker = markerCreate(); + expectKeyword('typeof'); + argument = parsePrimaryType(); + return markerApply(marker, delegate.createTypeofTypeAnnotation( + argument + )); + } + + function parseTupleType() { + var marker = markerCreate(), types = []; + expect('['); + // We allow trailing commas + while (index < length && !match(']')) { + types.push(parseType()); + if (match(']')) { + break; + } + expect(','); + } + expect(']'); + return markerApply(marker, delegate.createTupleTypeAnnotation( + types + )); + } + + function parseFunctionTypeParam() { + var marker = markerCreate(), name, optional = false, typeAnnotation; + name = parseVariableIdentifier(); + if (match('?')) { + lex(); + optional = true; + } + expect(':'); + typeAnnotation = parseType(); + return markerApply(marker, delegate.createFunctionTypeParam( + name, + typeAnnotation, + optional + )); + } + + function parseFunctionTypeParams() { + var ret = { params: [], rest: null }; + while (lookahead.type === Token.Identifier) { + ret.params.push(parseFunctionTypeParam()); + if (!match(')')) { + expect(','); + } + } + + if (match('...')) { + lex(); + ret.rest = parseFunctionTypeParam(); + } + return ret; + } + + // The parsing of types roughly parallels the parsing of expressions, and + // primary types are kind of like primary expressions...they're the + // primitives with which other types are constructed. + function parsePrimaryType() { + var params = null, returnType = null, + marker = markerCreate(), rest = null, tmp, + typeParameters, token, type, isGroupedType = false; + + switch (lookahead.type) { + case Token.Identifier: + switch (lookahead.value) { + case 'any': + lex(); + return markerApply(marker, delegate.createAnyTypeAnnotation()); + case 'bool': // fallthrough + case 'boolean': + lex(); + return markerApply(marker, delegate.createBooleanTypeAnnotation()); + case 'number': + lex(); + return markerApply(marker, delegate.createNumberTypeAnnotation()); + case 'string': + lex(); + return markerApply(marker, delegate.createStringTypeAnnotation()); + } + return markerApply(marker, parseGenericType()); + case Token.Punctuator: + switch (lookahead.value) { + case '{': + return markerApply(marker, parseObjectType()); + case '[': + return parseTupleType(); + case '<': + typeParameters = parseTypeParameterDeclaration(); + expect('('); + tmp = parseFunctionTypeParams(); + params = tmp.params; + rest = tmp.rest; + expect(')'); + + expect('=>'); + + returnType = parseType(); + + return markerApply(marker, delegate.createFunctionTypeAnnotation( + params, + returnType, + rest, + typeParameters + )); + case '(': + lex(); + // Check to see if this is actually a grouped type + if (!match(')') && !match('...')) { + if (lookahead.type === Token.Identifier) { + token = lookahead2(); + isGroupedType = token.value !== '?' && token.value !== ':'; + } else { + isGroupedType = true; + } + } + + if (isGroupedType) { + type = parseType(); + expect(')'); + + // If we see a => next then someone was probably confused about + // function types, so we can provide a better error message + if (match('=>')) { + throwError({}, Messages.ConfusedAboutFunctionType); + } + + return type; + } + + tmp = parseFunctionTypeParams(); + params = tmp.params; + rest = tmp.rest; + + expect(')'); + + expect('=>'); + + returnType = parseType(); + + return markerApply(marker, delegate.createFunctionTypeAnnotation( + params, + returnType, + rest, + null /* typeParameters */ + )); + } + break; + case Token.Keyword: + switch (lookahead.value) { + case 'void': + return markerApply(marker, parseVoidType()); + case 'typeof': + return markerApply(marker, parseTypeofType()); + } + break; + case Token.StringLiteral: + token = lex(); + if (token.octal) { + throwError(token, Messages.StrictOctalLiteral); + } + return markerApply(marker, delegate.createStringLiteralTypeAnnotation( + token + )); + } + + throwUnexpected(lookahead); + } + + function parsePostfixType() { + var marker = markerCreate(), t = parsePrimaryType(); + if (match('[')) { + expect('['); + expect(']'); + return markerApply(marker, delegate.createArrayTypeAnnotation(t)); + } + return t; + } + + function parsePrefixType() { + var marker = markerCreate(); + if (match('?')) { + lex(); + return markerApply(marker, delegate.createNullableTypeAnnotation( + parsePrefixType() + )); + } + return parsePostfixType(); + } + + + function parseIntersectionType() { + var marker = markerCreate(), type, types; + type = parsePrefixType(); + types = [type]; + while (match('&')) { + lex(); + types.push(parsePrefixType()); + } + + return types.length === 1 ? + type : + markerApply(marker, delegate.createIntersectionTypeAnnotation( + types + )); + } + + function parseUnionType() { + var marker = markerCreate(), type, types; + type = parseIntersectionType(); + types = [type]; + while (match('|')) { + lex(); + types.push(parseIntersectionType()); + } + return types.length === 1 ? + type : + markerApply(marker, delegate.createUnionTypeAnnotation( + types + )); + } + + function parseType() { + var oldInType = state.inType, type; + state.inType = true; + + type = parseUnionType(); + + state.inType = oldInType; + return type; + } + + function parseTypeAnnotation() { + var marker = markerCreate(), type; + + expect(':'); + type = parseType(); + + return markerApply(marker, delegate.createTypeAnnotation(type)); + } + + function parseVariableIdentifier() { + var marker = markerCreate(), + token = lex(); + + if (token.type !== Token.Identifier) { + throwUnexpected(token); + } + + return markerApply(marker, delegate.createIdentifier(token.value)); + } + + function parseTypeAnnotatableIdentifier(requireTypeAnnotation, canBeOptionalParam) { + var marker = markerCreate(), + ident = parseVariableIdentifier(), + isOptionalParam = false; + + if (canBeOptionalParam && match('?')) { + expect('?'); + isOptionalParam = true; + } + + if (requireTypeAnnotation || match(':')) { + ident.typeAnnotation = parseTypeAnnotation(); + ident = markerApply(marker, ident); + } + + if (isOptionalParam) { + ident.optional = true; + ident = markerApply(marker, ident); + } + + return ident; + } + + function parseVariableDeclaration(kind) { + var id, + marker = markerCreate(), + init = null, + typeAnnotationMarker = markerCreate(); + if (match('{')) { + id = parseObjectInitialiser(); + reinterpretAsAssignmentBindingPattern(id); + if (match(':')) { + id.typeAnnotation = parseTypeAnnotation(); + markerApply(typeAnnotationMarker, id); + } + } else if (match('[')) { + id = parseArrayInitialiser(); + reinterpretAsAssignmentBindingPattern(id); + if (match(':')) { + id.typeAnnotation = parseTypeAnnotation(); + markerApply(typeAnnotationMarker, id); + } + } else { + /* istanbul ignore next */ + id = state.allowKeyword ? parseNonComputedProperty() : parseTypeAnnotatableIdentifier(); + // 12.2.1 + if (strict && isRestrictedWord(id.name)) { + throwErrorTolerant({}, Messages.StrictVarName); + } + } + + if (kind === 'const') { + if (!match('=')) { + throwError({}, Messages.NoUninitializedConst); + } + expect('='); + init = parseAssignmentExpression(); + } else if (match('=')) { + lex(); + init = parseAssignmentExpression(); + } + + return markerApply(marker, delegate.createVariableDeclarator(id, init)); + } + + function parseVariableDeclarationList(kind) { + var list = []; + + do { + list.push(parseVariableDeclaration(kind)); + if (!match(',')) { + break; + } + lex(); + } while (index < length); + + return list; + } + + function parseVariableStatement() { + var declarations, marker = markerCreate(); + + expectKeyword('var'); + + declarations = parseVariableDeclarationList(); + + consumeSemicolon(); + + return markerApply(marker, delegate.createVariableDeclaration(declarations, 'var')); + } + + // kind may be `const` or `let` + // Both are experimental and not in the specification yet. + // see http://wiki.ecmascript.org/doku.php?id=harmony:const + // and http://wiki.ecmascript.org/doku.php?id=harmony:let + function parseConstLetDeclaration(kind) { + var declarations, marker = markerCreate(); + + expectKeyword(kind); + + declarations = parseVariableDeclarationList(kind); + + consumeSemicolon(); + + return markerApply(marker, delegate.createVariableDeclaration(declarations, kind)); + } + + // people.mozilla.org/~jorendorff/es6-draft.html + + function parseModuleSpecifier() { + var marker = markerCreate(), + specifier; + + if (lookahead.type !== Token.StringLiteral) { + throwError({}, Messages.InvalidModuleSpecifier); + } + specifier = delegate.createModuleSpecifier(lookahead); + lex(); + return markerApply(marker, specifier); + } + + function parseExportBatchSpecifier() { + var marker = markerCreate(); + expect('*'); + return markerApply(marker, delegate.createExportBatchSpecifier()); + } + + function parseExportSpecifier() { + var id, name = null, marker = markerCreate(), from; + if (matchKeyword('default')) { + lex(); + id = markerApply(marker, delegate.createIdentifier('default')); + // export {default} from "something"; + } else { + id = parseVariableIdentifier(); + } + if (matchContextualKeyword('as')) { + lex(); + name = parseNonComputedProperty(); + } + + return markerApply(marker, delegate.createExportSpecifier(id, name)); + } + + function parseExportDeclaration() { + var declaration = null, + possibleIdentifierToken, sourceElement, + isExportFromIdentifier, + src = null, specifiers = [], + marker = markerCreate(); + + expectKeyword('export'); + + if (matchKeyword('default')) { + // covers: + // export default ... + lex(); + if (matchKeyword('function') || matchKeyword('class')) { + possibleIdentifierToken = lookahead2(); + if (isIdentifierName(possibleIdentifierToken)) { + // covers: + // export default function foo () {} + // export default class foo {} + sourceElement = parseSourceElement(); + return markerApply(marker, delegate.createExportDeclaration(true, sourceElement, [sourceElement.id], null)); + } + // covers: + // export default function () {} + // export default class {} + switch (lookahead.value) { + case 'class': + return markerApply(marker, delegate.createExportDeclaration(true, parseClassExpression(), [], null)); + case 'function': + return markerApply(marker, delegate.createExportDeclaration(true, parseFunctionExpression(), [], null)); + } + } + + if (matchContextualKeyword('from')) { + throwError({}, Messages.UnexpectedToken, lookahead.value); + } + + // covers: + // export default {}; + // export default []; + if (match('{')) { + declaration = parseObjectInitialiser(); + } else if (match('[')) { + declaration = parseArrayInitialiser(); + } else { + declaration = parseAssignmentExpression(); + } + consumeSemicolon(); + return markerApply(marker, delegate.createExportDeclaration(true, declaration, [], null)); + } + + // non-default export + if (lookahead.type === Token.Keyword || matchContextualKeyword('type')) { + // covers: + // export var f = 1; + switch (lookahead.value) { + case 'type': + case 'let': + case 'const': + case 'var': + case 'class': + case 'function': + return markerApply(marker, delegate.createExportDeclaration(false, parseSourceElement(), specifiers, null)); + } + } + + if (match('*')) { + // covers: + // export * from "foo"; + specifiers.push(parseExportBatchSpecifier()); + + if (!matchContextualKeyword('from')) { + throwError({}, lookahead.value ? + Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); + } + lex(); + src = parseModuleSpecifier(); + consumeSemicolon(); + + return markerApply(marker, delegate.createExportDeclaration(false, null, specifiers, src)); + } + + expect('{'); + if (!match('}')) { + do { + isExportFromIdentifier = isExportFromIdentifier || matchKeyword('default'); + specifiers.push(parseExportSpecifier()); + } while (match(',') && lex()); + } + expect('}'); + + if (matchContextualKeyword('from')) { + // covering: + // export {default} from "foo"; + // export {foo} from "foo"; + lex(); + src = parseModuleSpecifier(); + consumeSemicolon(); + } else if (isExportFromIdentifier) { + // covering: + // export {default}; // missing fromClause + throwError({}, lookahead.value ? + Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); + } else { + // cover + // export {foo}; + consumeSemicolon(); + } + return markerApply(marker, delegate.createExportDeclaration(false, declaration, specifiers, src)); + } + + + function parseImportSpecifier() { + // import {} ...; + var id, name = null, marker = markerCreate(); + + id = parseNonComputedProperty(); + if (matchContextualKeyword('as')) { + lex(); + name = parseVariableIdentifier(); + } + + return markerApply(marker, delegate.createImportSpecifier(id, name)); + } + + function parseNamedImports() { + var specifiers = []; + // {foo, bar as bas} + expect('{'); + if (!match('}')) { + do { + specifiers.push(parseImportSpecifier()); + } while (match(',') && lex()); + } + expect('}'); + return specifiers; + } + + function parseImportDefaultSpecifier() { + // import ...; + var id, marker = markerCreate(); + + id = parseNonComputedProperty(); + + return markerApply(marker, delegate.createImportDefaultSpecifier(id)); + } + + function parseImportNamespaceSpecifier() { + // import <* as foo> ...; + var id, marker = markerCreate(); + + expect('*'); + if (!matchContextualKeyword('as')) { + throwError({}, Messages.NoAsAfterImportNamespace); + } + lex(); + id = parseNonComputedProperty(); + + return markerApply(marker, delegate.createImportNamespaceSpecifier(id)); + } + + function parseImportDeclaration() { + var specifiers, src, marker = markerCreate(), isType = false, token2; + + expectKeyword('import'); + + if (matchContextualKeyword('type')) { + token2 = lookahead2(); + if ((token2.type === Token.Identifier && token2.value !== 'from') || + (token2.type === Token.Punctuator && + (token2.value === '{' || token2.value === '*'))) { + isType = true; + lex(); + } + } + + specifiers = []; + + if (lookahead.type === Token.StringLiteral) { + // covers: + // import "foo"; + src = parseModuleSpecifier(); + consumeSemicolon(); + return markerApply(marker, delegate.createImportDeclaration(specifiers, src, isType)); + } + + if (!matchKeyword('default') && isIdentifierName(lookahead)) { + // covers: + // import foo + // import foo, ... + specifiers.push(parseImportDefaultSpecifier()); + if (match(',')) { + lex(); + } + } + if (match('*')) { + // covers: + // import foo, * as foo + // import * as foo + specifiers.push(parseImportNamespaceSpecifier()); + } else if (match('{')) { + // covers: + // import foo, {bar} + // import {bar} + specifiers = specifiers.concat(parseNamedImports()); + } + + if (!matchContextualKeyword('from')) { + throwError({}, lookahead.value ? + Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); + } + lex(); + src = parseModuleSpecifier(); + consumeSemicolon(); + + return markerApply(marker, delegate.createImportDeclaration(specifiers, src, isType)); + } + + // 12.3 Empty Statement + + function parseEmptyStatement() { + var marker = markerCreate(); + expect(';'); + return markerApply(marker, delegate.createEmptyStatement()); + } + + // 12.4 Expression Statement + + function parseExpressionStatement() { + var marker = markerCreate(), expr = parseExpression(); + consumeSemicolon(); + return markerApply(marker, delegate.createExpressionStatement(expr)); + } + + // 12.5 If statement + + function parseIfStatement() { + var test, consequent, alternate, marker = markerCreate(); + + expectKeyword('if'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + consequent = parseStatement(); + + if (matchKeyword('else')) { + lex(); + alternate = parseStatement(); + } else { + alternate = null; + } + + return markerApply(marker, delegate.createIfStatement(test, consequent, alternate)); + } + + // 12.6 Iteration Statements + + function parseDoWhileStatement() { + var body, test, oldInIteration, marker = markerCreate(); + + expectKeyword('do'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + expectKeyword('while'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + if (match(';')) { + lex(); + } + + return markerApply(marker, delegate.createDoWhileStatement(body, test)); + } + + function parseWhileStatement() { + var test, body, oldInIteration, marker = markerCreate(); + + expectKeyword('while'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + return markerApply(marker, delegate.createWhileStatement(test, body)); + } + + function parseForVariableDeclaration() { + var marker = markerCreate(), + token = lex(), + declarations = parseVariableDeclarationList(); + + return markerApply(marker, delegate.createVariableDeclaration(declarations, token.value)); + } + + function parseForStatement(opts) { + var init, test, update, left, right, body, operator, oldInIteration, + marker = markerCreate(); + init = test = update = null; + expectKeyword('for'); + + // http://wiki.ecmascript.org/doku.php?id=proposals:iterators_and_generators&s=each + if (matchContextualKeyword('each')) { + throwError({}, Messages.EachNotAllowed); + } + + expect('('); + + if (match(';')) { + lex(); + } else { + if (matchKeyword('var') || matchKeyword('let') || matchKeyword('const')) { + state.allowIn = false; + init = parseForVariableDeclaration(); + state.allowIn = true; + + if (init.declarations.length === 1) { + if (matchKeyword('in') || matchContextualKeyword('of')) { + operator = lookahead; + if (!((operator.value === 'in' || init.kind !== 'var') && init.declarations[0].init)) { + lex(); + left = init; + right = parseExpression(); + init = null; + } + } + } + } else { + state.allowIn = false; + init = parseExpression(); + state.allowIn = true; + + if (matchContextualKeyword('of')) { + operator = lex(); + left = init; + right = parseExpression(); + init = null; + } else if (matchKeyword('in')) { + // LeftHandSideExpression + if (!isAssignableLeftHandSide(init)) { + throwError({}, Messages.InvalidLHSInForIn); + } + operator = lex(); + left = init; + right = parseExpression(); + init = null; + } + } + + if (typeof left === 'undefined') { + expect(';'); + } + } + + if (typeof left === 'undefined') { + + if (!match(';')) { + test = parseExpression(); + } + expect(';'); + + if (!match(')')) { + update = parseExpression(); + } + } + + expect(')'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + if (!(opts !== undefined && opts.ignoreBody)) { + body = parseStatement(); + } + + state.inIteration = oldInIteration; + + if (typeof left === 'undefined') { + return markerApply(marker, delegate.createForStatement(init, test, update, body)); + } + + if (operator.value === 'in') { + return markerApply(marker, delegate.createForInStatement(left, right, body)); + } + return markerApply(marker, delegate.createForOfStatement(left, right, body)); + } + + // 12.7 The continue statement + + function parseContinueStatement() { + var label = null, marker = markerCreate(); + + expectKeyword('continue'); + + // Optimize the most common form: 'continue;'. + if (source.charCodeAt(index) === 59) { + lex(); + + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return markerApply(marker, delegate.createContinueStatement(null)); + } + + if (peekLineTerminator()) { + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return markerApply(marker, delegate.createContinueStatement(null)); + } + + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + + if (!state.labelSet.has(label.name)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return markerApply(marker, delegate.createContinueStatement(label)); + } + + // 12.8 The break statement + + function parseBreakStatement() { + var label = null, marker = markerCreate(); + + expectKeyword('break'); + + // Catch the very common case first: immediately a semicolon (char #59). + if (source.charCodeAt(index) === 59) { + lex(); + + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return markerApply(marker, delegate.createBreakStatement(null)); + } + + if (peekLineTerminator()) { + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return markerApply(marker, delegate.createBreakStatement(null)); + } + + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + + if (!state.labelSet.has(label.name)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return markerApply(marker, delegate.createBreakStatement(label)); + } + + // 12.9 The return statement + + function parseReturnStatement() { + var argument = null, marker = markerCreate(); + + expectKeyword('return'); + + if (!state.inFunctionBody) { + throwErrorTolerant({}, Messages.IllegalReturn); + } + + // 'return' followed by a space and an identifier is very common. + if (source.charCodeAt(index) === 32) { + if (isIdentifierStart(source.charCodeAt(index + 1))) { + argument = parseExpression(); + consumeSemicolon(); + return markerApply(marker, delegate.createReturnStatement(argument)); + } + } + + if (peekLineTerminator()) { + return markerApply(marker, delegate.createReturnStatement(null)); + } + + if (!match(';')) { + if (!match('}') && lookahead.type !== Token.EOF) { + argument = parseExpression(); + } + } + + consumeSemicolon(); + + return markerApply(marker, delegate.createReturnStatement(argument)); + } + + // 12.10 The with statement + + function parseWithStatement() { + var object, body, marker = markerCreate(); + + if (strict) { + throwErrorTolerant({}, Messages.StrictModeWith); + } + + expectKeyword('with'); + + expect('('); + + object = parseExpression(); + + expect(')'); + + body = parseStatement(); + + return markerApply(marker, delegate.createWithStatement(object, body)); + } + + // 12.10 The swith statement + + function parseSwitchCase() { + var test, + consequent = [], + sourceElement, + marker = markerCreate(); + + if (matchKeyword('default')) { + lex(); + test = null; + } else { + expectKeyword('case'); + test = parseExpression(); + } + expect(':'); + + while (index < length) { + if (match('}') || matchKeyword('default') || matchKeyword('case')) { + break; + } + sourceElement = parseSourceElement(); + if (typeof sourceElement === 'undefined') { + break; + } + consequent.push(sourceElement); + } + + return markerApply(marker, delegate.createSwitchCase(test, consequent)); + } + + function parseSwitchStatement() { + var discriminant, cases, clause, oldInSwitch, defaultFound, marker = markerCreate(); + + expectKeyword('switch'); + + expect('('); + + discriminant = parseExpression(); + + expect(')'); + + expect('{'); + + cases = []; + + if (match('}')) { + lex(); + return markerApply(marker, delegate.createSwitchStatement(discriminant, cases)); + } + + oldInSwitch = state.inSwitch; + state.inSwitch = true; + defaultFound = false; + + while (index < length) { + if (match('}')) { + break; + } + clause = parseSwitchCase(); + if (clause.test === null) { + if (defaultFound) { + throwError({}, Messages.MultipleDefaultsInSwitch); + } + defaultFound = true; + } + cases.push(clause); + } + + state.inSwitch = oldInSwitch; + + expect('}'); + + return markerApply(marker, delegate.createSwitchStatement(discriminant, cases)); + } + + // 12.13 The throw statement + + function parseThrowStatement() { + var argument, marker = markerCreate(); + + expectKeyword('throw'); + + if (peekLineTerminator()) { + throwError({}, Messages.NewlineAfterThrow); + } + + argument = parseExpression(); + + consumeSemicolon(); + + return markerApply(marker, delegate.createThrowStatement(argument)); + } + + // 12.14 The try statement + + function parseCatchClause() { + var param, body, marker = markerCreate(); + + expectKeyword('catch'); + + expect('('); + if (match(')')) { + throwUnexpected(lookahead); + } + + param = parseExpression(); + // 12.14.1 + if (strict && param.type === Syntax.Identifier && isRestrictedWord(param.name)) { + throwErrorTolerant({}, Messages.StrictCatchVariable); + } + + expect(')'); + body = parseBlock(); + return markerApply(marker, delegate.createCatchClause(param, body)); + } + + function parseTryStatement() { + var block, handlers = [], finalizer = null, marker = markerCreate(); + + expectKeyword('try'); + + block = parseBlock(); + + if (matchKeyword('catch')) { + handlers.push(parseCatchClause()); + } + + if (matchKeyword('finally')) { + lex(); + finalizer = parseBlock(); + } + + if (handlers.length === 0 && !finalizer) { + throwError({}, Messages.NoCatchOrFinally); + } + + return markerApply(marker, delegate.createTryStatement(block, [], handlers, finalizer)); + } + + // 12.15 The debugger statement + + function parseDebuggerStatement() { + var marker = markerCreate(); + expectKeyword('debugger'); + + consumeSemicolon(); + + return markerApply(marker, delegate.createDebuggerStatement()); + } + + // 12 Statements + + function parseStatement() { + var type = lookahead.type, + marker, + expr, + labeledBody; + + if (type === Token.EOF) { + throwUnexpected(lookahead); + } + + if (type === Token.Punctuator) { + switch (lookahead.value) { + case ';': + return parseEmptyStatement(); + case '{': + return parseBlock(); + case '(': + return parseExpressionStatement(); + default: + break; + } + } + + if (type === Token.Keyword) { + switch (lookahead.value) { + case 'break': + return parseBreakStatement(); + case 'continue': + return parseContinueStatement(); + case 'debugger': + return parseDebuggerStatement(); + case 'do': + return parseDoWhileStatement(); + case 'for': + return parseForStatement(); + case 'function': + return parseFunctionDeclaration(); + case 'class': + return parseClassDeclaration(); + case 'if': + return parseIfStatement(); + case 'return': + return parseReturnStatement(); + case 'switch': + return parseSwitchStatement(); + case 'throw': + return parseThrowStatement(); + case 'try': + return parseTryStatement(); + case 'var': + return parseVariableStatement(); + case 'while': + return parseWhileStatement(); + case 'with': + return parseWithStatement(); + default: + break; + } + } + + if (matchAsyncFuncExprOrDecl()) { + return parseFunctionDeclaration(); + } + + marker = markerCreate(); + expr = parseExpression(); + + // 12.12 Labelled Statements + if ((expr.type === Syntax.Identifier) && match(':')) { + lex(); + + if (state.labelSet.has(expr.name)) { + throwError({}, Messages.Redeclaration, 'Label', expr.name); + } + + state.labelSet.set(expr.name, true); + labeledBody = parseStatement(); + state.labelSet["delete"](expr.name); + return markerApply(marker, delegate.createLabeledStatement(expr, labeledBody)); + } + + consumeSemicolon(); + + return markerApply(marker, delegate.createExpressionStatement(expr)); + } + + // 13 Function Definition + + function parseConciseBody() { + if (match('{')) { + return parseFunctionSourceElements(); + } + return parseAssignmentExpression(); + } + + function parseFunctionSourceElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted, + oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, oldParenthesizedCount, + marker = markerCreate(); + + expect('{'); + + while (index < length) { + if (lookahead.type !== Token.StringLiteral) { + break; + } + token = lookahead; + + sourceElement = parseSourceElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = source.slice(token.range[0] + 1, token.range[1] - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + + oldLabelSet = state.labelSet; + oldInIteration = state.inIteration; + oldInSwitch = state.inSwitch; + oldInFunctionBody = state.inFunctionBody; + oldParenthesizedCount = state.parenthesizedCount; + + state.labelSet = new StringMap(); + state.inIteration = false; + state.inSwitch = false; + state.inFunctionBody = true; + state.parenthesizedCount = 0; + + while (index < length) { + if (match('}')) { + break; + } + sourceElement = parseSourceElement(); + if (typeof sourceElement === 'undefined') { + break; + } + sourceElements.push(sourceElement); + } + + expect('}'); + + state.labelSet = oldLabelSet; + state.inIteration = oldInIteration; + state.inSwitch = oldInSwitch; + state.inFunctionBody = oldInFunctionBody; + state.parenthesizedCount = oldParenthesizedCount; + + return markerApply(marker, delegate.createBlockStatement(sourceElements)); + } + + function validateParam(options, param, name) { + if (strict) { + if (isRestrictedWord(name)) { + options.stricted = param; + options.message = Messages.StrictParamName; + } + if (options.paramSet.has(name)) { + options.stricted = param; + options.message = Messages.StrictParamDupe; + } + } else if (!options.firstRestricted) { + if (isRestrictedWord(name)) { + options.firstRestricted = param; + options.message = Messages.StrictParamName; + } else if (isStrictModeReservedWord(name)) { + options.firstRestricted = param; + options.message = Messages.StrictReservedWord; + } else if (options.paramSet.has(name)) { + options.firstRestricted = param; + options.message = Messages.StrictParamDupe; + } + } + options.paramSet.set(name, true); + } + + function parseParam(options) { + var marker, token, rest, param, def; + + token = lookahead; + if (token.value === '...') { + token = lex(); + rest = true; + } + + if (match('[')) { + marker = markerCreate(); + param = parseArrayInitialiser(); + reinterpretAsDestructuredParameter(options, param); + if (match(':')) { + param.typeAnnotation = parseTypeAnnotation(); + markerApply(marker, param); + } + } else if (match('{')) { + marker = markerCreate(); + if (rest) { + throwError({}, Messages.ObjectPatternAsRestParameter); + } + param = parseObjectInitialiser(); + reinterpretAsDestructuredParameter(options, param); + if (match(':')) { + param.typeAnnotation = parseTypeAnnotation(); + markerApply(marker, param); + } + } else { + param = + rest + ? parseTypeAnnotatableIdentifier( + false, /* requireTypeAnnotation */ + false /* canBeOptionalParam */ + ) + : parseTypeAnnotatableIdentifier( + false, /* requireTypeAnnotation */ + true /* canBeOptionalParam */ + ); + + validateParam(options, token, token.value); + } + + if (match('=')) { + if (rest) { + throwErrorTolerant(lookahead, Messages.DefaultRestParameter); + } + lex(); + def = parseAssignmentExpression(); + ++options.defaultCount; + } + + if (rest) { + if (!match(')')) { + throwError({}, Messages.ParameterAfterRestParameter); + } + options.rest = param; + return false; + } + + options.params.push(param); + options.defaults.push(def); + return !match(')'); + } + + function parseParams(firstRestricted) { + var options, marker = markerCreate(); + + options = { + params: [], + defaultCount: 0, + defaults: [], + rest: null, + firstRestricted: firstRestricted + }; + + expect('('); + + if (!match(')')) { + options.paramSet = new StringMap(); + while (index < length) { + if (!parseParam(options)) { + break; + } + expect(','); + } + } + + expect(')'); + + if (options.defaultCount === 0) { + options.defaults = []; + } + + if (match(':')) { + options.returnType = parseTypeAnnotation(); + } + + return markerApply(marker, options); + } + + function parseFunctionDeclaration() { + var id, body, token, tmp, firstRestricted, message, generator, isAsync, + previousStrict, previousYieldAllowed, previousAwaitAllowed, + marker = markerCreate(), typeParameters; + + isAsync = false; + if (matchAsync()) { + lex(); + isAsync = true; + } + + expectKeyword('function'); + + generator = false; + if (match('*')) { + lex(); + generator = true; + } + + token = lookahead; + + id = parseVariableIdentifier(); + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + + tmp = parseParams(firstRestricted); + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = generator; + previousAwaitAllowed = state.awaitAllowed; + state.awaitAllowed = isAsync; + + body = parseFunctionSourceElements(); + + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && tmp.stricted) { + throwErrorTolerant(tmp.stricted, message); + } + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + state.awaitAllowed = previousAwaitAllowed; + + return markerApply( + marker, + delegate.createFunctionDeclaration( + id, + tmp.params, + tmp.defaults, + body, + tmp.rest, + generator, + false, + isAsync, + tmp.returnType, + typeParameters + ) + ); + } + + function parseFunctionExpression() { + var token, id = null, firstRestricted, message, tmp, body, generator, isAsync, + previousStrict, previousYieldAllowed, previousAwaitAllowed, + marker = markerCreate(), typeParameters; + + isAsync = false; + if (matchAsync()) { + lex(); + isAsync = true; + } + + expectKeyword('function'); + + generator = false; + + if (match('*')) { + lex(); + generator = true; + } + + if (!match('(')) { + if (!match('<')) { + token = lookahead; + id = parseVariableIdentifier(); + + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + } + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + } + + tmp = parseParams(firstRestricted); + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = generator; + previousAwaitAllowed = state.awaitAllowed; + state.awaitAllowed = isAsync; + + body = parseFunctionSourceElements(); + + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && tmp.stricted) { + throwErrorTolerant(tmp.stricted, message); + } + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + state.awaitAllowed = previousAwaitAllowed; + + return markerApply( + marker, + delegate.createFunctionExpression( + id, + tmp.params, + tmp.defaults, + body, + tmp.rest, + generator, + false, + isAsync, + tmp.returnType, + typeParameters + ) + ); + } + + function parseYieldExpression() { + var delegateFlag, expr, marker = markerCreate(); + + expectKeyword('yield', !strict); + + delegateFlag = false; + if (match('*')) { + lex(); + delegateFlag = true; + } + + expr = parseAssignmentExpression(); + + return markerApply(marker, delegate.createYieldExpression(expr, delegateFlag)); + } + + function parseAwaitExpression() { + var expr, marker = markerCreate(); + expectContextualKeyword('await'); + expr = parseAssignmentExpression(); + return markerApply(marker, delegate.createAwaitExpression(expr)); + } + + // 14 Functions and classes + + // 14.1 Functions is defined above (13 in ES5) + // 14.2 Arrow Functions Definitions is defined in (7.3 assignments) + + // 14.3 Method Definitions + // 14.3.7 + function specialMethod(methodDefinition) { + return methodDefinition.kind === 'get' || + methodDefinition.kind === 'set' || + methodDefinition.value.generator; + } + + function parseMethodDefinition(key, isStatic, generator, computed) { + var token, param, propType, + isAsync, typeParameters, tokenValue, returnType; + + propType = isStatic ? ClassPropertyType["static"] : ClassPropertyType.prototype; + + if (generator) { + return delegate.createMethodDefinition( + propType, + '', + key, + parsePropertyMethodFunction({ generator: true }), + computed + ); + } + + tokenValue = key.type === 'Identifier' && key.name; + + if (tokenValue === 'get' && !match('(')) { + key = parseObjectPropertyKey(); + + expect('('); + expect(')'); + if (match(':')) { + returnType = parseTypeAnnotation(); + } + return delegate.createMethodDefinition( + propType, + 'get', + key, + parsePropertyFunction({ generator: false, returnType: returnType }), + computed + ); + } + if (tokenValue === 'set' && !match('(')) { + key = parseObjectPropertyKey(); + + expect('('); + token = lookahead; + param = [ parseTypeAnnotatableIdentifier() ]; + expect(')'); + if (match(':')) { + returnType = parseTypeAnnotation(); + } + return delegate.createMethodDefinition( + propType, + 'set', + key, + parsePropertyFunction({ + params: param, + generator: false, + name: token, + returnType: returnType + }), + computed + ); + } + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + isAsync = tokenValue === 'async' && !match('('); + if (isAsync) { + key = parseObjectPropertyKey(); + } + + return delegate.createMethodDefinition( + propType, + '', + key, + parsePropertyMethodFunction({ + generator: false, + async: isAsync, + typeParameters: typeParameters + }), + computed + ); + } + + function parseClassProperty(key, computed, isStatic) { + var typeAnnotation; + + typeAnnotation = parseTypeAnnotation(); + expect(';'); + + return delegate.createClassProperty( + key, + typeAnnotation, + computed, + isStatic + ); + } + + function parseClassElement() { + var computed = false, generator = false, key, marker = markerCreate(), + isStatic = false, possiblyOpenBracketToken; + if (match(';')) { + lex(); + return undefined; + } + + if (lookahead.value === 'static') { + lex(); + isStatic = true; + } + + if (match('*')) { + lex(); + generator = true; + } + + possiblyOpenBracketToken = lookahead; + if (matchContextualKeyword('get') || matchContextualKeyword('set')) { + possiblyOpenBracketToken = lookahead2(); + } + + if (possiblyOpenBracketToken.type === Token.Punctuator + && possiblyOpenBracketToken.value === '[') { + computed = true; + } + + key = parseObjectPropertyKey(); + + if (!generator && lookahead.value === ':') { + return markerApply(marker, parseClassProperty(key, computed, isStatic)); + } + + return markerApply(marker, parseMethodDefinition( + key, + isStatic, + generator, + computed + )); + } + + function parseClassBody() { + var classElement, classElements = [], existingProps = {}, + marker = markerCreate(), propName, propType; + + existingProps[ClassPropertyType["static"]] = new StringMap(); + existingProps[ClassPropertyType.prototype] = new StringMap(); + + expect('{'); + + while (index < length) { + if (match('}')) { + break; + } + classElement = parseClassElement(existingProps); + + if (typeof classElement !== 'undefined') { + classElements.push(classElement); + + propName = !classElement.computed && getFieldName(classElement.key); + if (propName !== false) { + propType = classElement["static"] ? + ClassPropertyType["static"] : + ClassPropertyType.prototype; + + if (classElement.type === Syntax.MethodDefinition) { + if (propName === 'constructor' && !classElement["static"]) { + if (specialMethod(classElement)) { + throwError(classElement, Messages.IllegalClassConstructorProperty); + } + if (existingProps[ClassPropertyType.prototype].has('constructor')) { + throwError(classElement.key, Messages.IllegalDuplicateClassProperty); + } + } + existingProps[propType].set(propName, true); + } + } + } + } + + expect('}'); + + return markerApply(marker, delegate.createClassBody(classElements)); + } + + function parseClassImplements() { + var id, implemented = [], marker, typeParameters; + if (strict) { + expectKeyword('implements'); + } else { + expectContextualKeyword('implements'); + } + while (index < length) { + marker = markerCreate(); + id = parseVariableIdentifier(); + if (match('<')) { + typeParameters = parseTypeParameterInstantiation(); + } else { + typeParameters = null; + } + implemented.push(markerApply(marker, delegate.createClassImplements( + id, + typeParameters + ))); + if (!match(',')) { + break; + } + expect(','); + } + return implemented; + } + + function parseClassExpression() { + var id, implemented, previousYieldAllowed, superClass = null, + superTypeParameters, marker = markerCreate(), typeParameters, + matchImplements; + + expectKeyword('class'); + + matchImplements = + strict + ? matchKeyword('implements') + : matchContextualKeyword('implements'); + + if (!matchKeyword('extends') && !matchImplements && !match('{')) { + id = parseVariableIdentifier(); + } + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + if (matchKeyword('extends')) { + expectKeyword('extends'); + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = false; + superClass = parseLeftHandSideExpressionAllowCall(); + if (match('<')) { + superTypeParameters = parseTypeParameterInstantiation(); + } + state.yieldAllowed = previousYieldAllowed; + } + + if (strict ? matchKeyword('implements') : matchContextualKeyword('implements')) { + implemented = parseClassImplements(); + } + + return markerApply(marker, delegate.createClassExpression( + id, + superClass, + parseClassBody(), + typeParameters, + superTypeParameters, + implemented + )); + } + + function parseClassDeclaration() { + var id, implemented, previousYieldAllowed, superClass = null, + superTypeParameters, marker = markerCreate(), typeParameters; + + expectKeyword('class'); + + id = parseVariableIdentifier(); + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + if (matchKeyword('extends')) { + expectKeyword('extends'); + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = false; + superClass = parseLeftHandSideExpressionAllowCall(); + if (match('<')) { + superTypeParameters = parseTypeParameterInstantiation(); + } + state.yieldAllowed = previousYieldAllowed; + } + + if (strict ? matchKeyword('implements') : matchContextualKeyword('implements')) { + implemented = parseClassImplements(); + } + + return markerApply(marker, delegate.createClassDeclaration( + id, + superClass, + parseClassBody(), + typeParameters, + superTypeParameters, + implemented + )); + } + + // 15 Program + + function parseSourceElement() { + var token; + if (lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case 'const': + case 'let': + return parseConstLetDeclaration(lookahead.value); + case 'function': + return parseFunctionDeclaration(); + case 'export': + throwErrorTolerant({}, Messages.IllegalExportDeclaration); + return parseExportDeclaration(); + case 'import': + throwErrorTolerant({}, Messages.IllegalImportDeclaration); + return parseImportDeclaration(); + case 'interface': + if (lookahead2().type === Token.Identifier) { + return parseInterface(); + } + return parseStatement(); + default: + return parseStatement(); + } + } + + if (matchContextualKeyword('type') + && lookahead2().type === Token.Identifier) { + return parseTypeAlias(); + } + + if (matchContextualKeyword('interface') + && lookahead2().type === Token.Identifier) { + return parseInterface(); + } + + if (matchContextualKeyword('declare')) { + token = lookahead2(); + if (token.type === Token.Keyword) { + switch (token.value) { + case 'class': + return parseDeclareClass(); + case 'function': + return parseDeclareFunction(); + case 'var': + return parseDeclareVariable(); + } + } else if (token.type === Token.Identifier + && token.value === 'module') { + return parseDeclareModule(); + } + } + + if (lookahead.type !== Token.EOF) { + return parseStatement(); + } + } + + function parseProgramElement() { + var isModule = extra.sourceType === 'module' || extra.sourceType === 'nonStrictModule'; + + if (isModule && lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case 'export': + return parseExportDeclaration(); + case 'import': + return parseImportDeclaration(); + } + } + + return parseSourceElement(); + } + + function parseProgramElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted; + + while (index < length) { + token = lookahead; + if (token.type !== Token.StringLiteral) { + break; + } + + sourceElement = parseProgramElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = source.slice(token.range[0] + 1, token.range[1] - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + + while (index < length) { + sourceElement = parseProgramElement(); + if (typeof sourceElement === 'undefined') { + break; + } + sourceElements.push(sourceElement); + } + return sourceElements; + } + + function parseProgram() { + var body, marker = markerCreate(); + strict = extra.sourceType === 'module'; + peek(); + body = parseProgramElements(); + return markerApply(marker, delegate.createProgram(body)); + } + + // 16 JSX + + XHTMLEntities = { + quot: '\u0022', + amp: '&', + apos: '\u0027', + lt: '<', + gt: '>', + nbsp: '\u00A0', + iexcl: '\u00A1', + cent: '\u00A2', + pound: '\u00A3', + curren: '\u00A4', + yen: '\u00A5', + brvbar: '\u00A6', + sect: '\u00A7', + uml: '\u00A8', + copy: '\u00A9', + ordf: '\u00AA', + laquo: '\u00AB', + not: '\u00AC', + shy: '\u00AD', + reg: '\u00AE', + macr: '\u00AF', + deg: '\u00B0', + plusmn: '\u00B1', + sup2: '\u00B2', + sup3: '\u00B3', + acute: '\u00B4', + micro: '\u00B5', + para: '\u00B6', + middot: '\u00B7', + cedil: '\u00B8', + sup1: '\u00B9', + ordm: '\u00BA', + raquo: '\u00BB', + frac14: '\u00BC', + frac12: '\u00BD', + frac34: '\u00BE', + iquest: '\u00BF', + Agrave: '\u00C0', + Aacute: '\u00C1', + Acirc: '\u00C2', + Atilde: '\u00C3', + Auml: '\u00C4', + Aring: '\u00C5', + AElig: '\u00C6', + Ccedil: '\u00C7', + Egrave: '\u00C8', + Eacute: '\u00C9', + Ecirc: '\u00CA', + Euml: '\u00CB', + Igrave: '\u00CC', + Iacute: '\u00CD', + Icirc: '\u00CE', + Iuml: '\u00CF', + ETH: '\u00D0', + Ntilde: '\u00D1', + Ograve: '\u00D2', + Oacute: '\u00D3', + Ocirc: '\u00D4', + Otilde: '\u00D5', + Ouml: '\u00D6', + times: '\u00D7', + Oslash: '\u00D8', + Ugrave: '\u00D9', + Uacute: '\u00DA', + Ucirc: '\u00DB', + Uuml: '\u00DC', + Yacute: '\u00DD', + THORN: '\u00DE', + szlig: '\u00DF', + agrave: '\u00E0', + aacute: '\u00E1', + acirc: '\u00E2', + atilde: '\u00E3', + auml: '\u00E4', + aring: '\u00E5', + aelig: '\u00E6', + ccedil: '\u00E7', + egrave: '\u00E8', + eacute: '\u00E9', + ecirc: '\u00EA', + euml: '\u00EB', + igrave: '\u00EC', + iacute: '\u00ED', + icirc: '\u00EE', + iuml: '\u00EF', + eth: '\u00F0', + ntilde: '\u00F1', + ograve: '\u00F2', + oacute: '\u00F3', + ocirc: '\u00F4', + otilde: '\u00F5', + ouml: '\u00F6', + divide: '\u00F7', + oslash: '\u00F8', + ugrave: '\u00F9', + uacute: '\u00FA', + ucirc: '\u00FB', + uuml: '\u00FC', + yacute: '\u00FD', + thorn: '\u00FE', + yuml: '\u00FF', + OElig: '\u0152', + oelig: '\u0153', + Scaron: '\u0160', + scaron: '\u0161', + Yuml: '\u0178', + fnof: '\u0192', + circ: '\u02C6', + tilde: '\u02DC', + Alpha: '\u0391', + Beta: '\u0392', + Gamma: '\u0393', + Delta: '\u0394', + Epsilon: '\u0395', + Zeta: '\u0396', + Eta: '\u0397', + Theta: '\u0398', + Iota: '\u0399', + Kappa: '\u039A', + Lambda: '\u039B', + Mu: '\u039C', + Nu: '\u039D', + Xi: '\u039E', + Omicron: '\u039F', + Pi: '\u03A0', + Rho: '\u03A1', + Sigma: '\u03A3', + Tau: '\u03A4', + Upsilon: '\u03A5', + Phi: '\u03A6', + Chi: '\u03A7', + Psi: '\u03A8', + Omega: '\u03A9', + alpha: '\u03B1', + beta: '\u03B2', + gamma: '\u03B3', + delta: '\u03B4', + epsilon: '\u03B5', + zeta: '\u03B6', + eta: '\u03B7', + theta: '\u03B8', + iota: '\u03B9', + kappa: '\u03BA', + lambda: '\u03BB', + mu: '\u03BC', + nu: '\u03BD', + xi: '\u03BE', + omicron: '\u03BF', + pi: '\u03C0', + rho: '\u03C1', + sigmaf: '\u03C2', + sigma: '\u03C3', + tau: '\u03C4', + upsilon: '\u03C5', + phi: '\u03C6', + chi: '\u03C7', + psi: '\u03C8', + omega: '\u03C9', + thetasym: '\u03D1', + upsih: '\u03D2', + piv: '\u03D6', + ensp: '\u2002', + emsp: '\u2003', + thinsp: '\u2009', + zwnj: '\u200C', + zwj: '\u200D', + lrm: '\u200E', + rlm: '\u200F', + ndash: '\u2013', + mdash: '\u2014', + lsquo: '\u2018', + rsquo: '\u2019', + sbquo: '\u201A', + ldquo: '\u201C', + rdquo: '\u201D', + bdquo: '\u201E', + dagger: '\u2020', + Dagger: '\u2021', + bull: '\u2022', + hellip: '\u2026', + permil: '\u2030', + prime: '\u2032', + Prime: '\u2033', + lsaquo: '\u2039', + rsaquo: '\u203A', + oline: '\u203E', + frasl: '\u2044', + euro: '\u20AC', + image: '\u2111', + weierp: '\u2118', + real: '\u211C', + trade: '\u2122', + alefsym: '\u2135', + larr: '\u2190', + uarr: '\u2191', + rarr: '\u2192', + darr: '\u2193', + harr: '\u2194', + crarr: '\u21B5', + lArr: '\u21D0', + uArr: '\u21D1', + rArr: '\u21D2', + dArr: '\u21D3', + hArr: '\u21D4', + forall: '\u2200', + part: '\u2202', + exist: '\u2203', + empty: '\u2205', + nabla: '\u2207', + isin: '\u2208', + notin: '\u2209', + ni: '\u220B', + prod: '\u220F', + sum: '\u2211', + minus: '\u2212', + lowast: '\u2217', + radic: '\u221A', + prop: '\u221D', + infin: '\u221E', + ang: '\u2220', + and: '\u2227', + or: '\u2228', + cap: '\u2229', + cup: '\u222A', + 'int': '\u222B', + there4: '\u2234', + sim: '\u223C', + cong: '\u2245', + asymp: '\u2248', + ne: '\u2260', + equiv: '\u2261', + le: '\u2264', + ge: '\u2265', + sub: '\u2282', + sup: '\u2283', + nsub: '\u2284', + sube: '\u2286', + supe: '\u2287', + oplus: '\u2295', + otimes: '\u2297', + perp: '\u22A5', + sdot: '\u22C5', + lceil: '\u2308', + rceil: '\u2309', + lfloor: '\u230A', + rfloor: '\u230B', + lang: '\u2329', + rang: '\u232A', + loz: '\u25CA', + spades: '\u2660', + clubs: '\u2663', + hearts: '\u2665', + diams: '\u2666' + }; + + function getQualifiedJSXName(object) { + if (object.type === Syntax.JSXIdentifier) { + return object.name; + } + if (object.type === Syntax.JSXNamespacedName) { + return object.namespace.name + ':' + object.name.name; + } + /* istanbul ignore else */ + if (object.type === Syntax.JSXMemberExpression) { + return ( + getQualifiedJSXName(object.object) + '.' + + getQualifiedJSXName(object.property) + ); + } + /* istanbul ignore next */ + throwUnexpected(object); + } + + function isJSXIdentifierStart(ch) { + // exclude backslash (\) + return (ch !== 92) && isIdentifierStart(ch); + } + + function isJSXIdentifierPart(ch) { + // exclude backslash (\) and add hyphen (-) + return (ch !== 92) && (ch === 45 || isIdentifierPart(ch)); + } + + function scanJSXIdentifier() { + var ch, start, value = ''; + + start = index; + while (index < length) { + ch = source.charCodeAt(index); + if (!isJSXIdentifierPart(ch)) { + break; + } + value += source[index++]; + } + + return { + type: Token.JSXIdentifier, + value: value, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanJSXEntity() { + var ch, str = '', start = index, count = 0, code; + ch = source[index]; + assert(ch === '&', 'Entity must start with an ampersand'); + index++; + while (index < length && count++ < 10) { + ch = source[index++]; + if (ch === ';') { + break; + } + str += ch; + } + + // Well-formed entity (ending was found). + if (ch === ';') { + // Numeric entity. + if (str[0] === '#') { + if (str[1] === 'x') { + code = +('0' + str.substr(1)); + } else { + // Removing leading zeros in order to avoid treating as octal in old browsers. + code = +str.substr(1).replace(Regex.LeadingZeros, ''); + } + + if (!isNaN(code)) { + return String.fromCharCode(code); + } + /* istanbul ignore else */ + } else if (XHTMLEntities[str]) { + return XHTMLEntities[str]; + } + } + + // Treat non-entity sequences as regular text. + index = start + 1; + return '&'; + } + + function scanJSXText(stopChars) { + var ch, str = '', start; + start = index; + while (index < length) { + ch = source[index]; + if (stopChars.indexOf(ch) !== -1) { + break; + } + if (ch === '&') { + str += scanJSXEntity(); + } else { + index++; + if (ch === '\r' && source[index] === '\n') { + str += ch; + ch = source[index]; + index++; + } + if (isLineTerminator(ch.charCodeAt(0))) { + ++lineNumber; + lineStart = index; + } + str += ch; + } + } + return { + type: Token.JSXText, + value: str, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanJSXStringLiteral() { + var innerToken, quote, start; + + quote = source[index]; + assert((quote === '\'' || quote === '"'), + 'String literal must starts with a quote'); + + start = index; + ++index; + + innerToken = scanJSXText([quote]); + + if (quote !== source[index]) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + ++index; + + innerToken.range = [start, index]; + + return innerToken; + } + + /** + * Between JSX opening and closing tags (e.g. HERE), anything that + * is not another JSX tag and is not an expression wrapped by {} is text. + */ + function advanceJSXChild() { + var ch = source.charCodeAt(index); + + // '<' 60, '>' 62, '{' 123, '}' 125 + if (ch !== 60 && ch !== 62 && ch !== 123 && ch !== 125) { + return scanJSXText(['<', '>', '{', '}']); + } + + return scanPunctuator(); + } + + function parseJSXIdentifier() { + var token, marker = markerCreate(); + + if (lookahead.type !== Token.JSXIdentifier) { + throwUnexpected(lookahead); + } + + token = lex(); + return markerApply(marker, delegate.createJSXIdentifier(token.value)); + } + + function parseJSXNamespacedName() { + var namespace, name, marker = markerCreate(); + + namespace = parseJSXIdentifier(); + expect(':'); + name = parseJSXIdentifier(); + + return markerApply(marker, delegate.createJSXNamespacedName(namespace, name)); + } + + function parseJSXMemberExpression() { + var marker = markerCreate(), + expr = parseJSXIdentifier(); + + while (match('.')) { + lex(); + expr = markerApply(marker, delegate.createJSXMemberExpression(expr, parseJSXIdentifier())); + } + + return expr; + } + + function parseJSXElementName() { + if (lookahead2().value === ':') { + return parseJSXNamespacedName(); + } + if (lookahead2().value === '.') { + return parseJSXMemberExpression(); + } + + return parseJSXIdentifier(); + } + + function parseJSXAttributeName() { + if (lookahead2().value === ':') { + return parseJSXNamespacedName(); + } + + return parseJSXIdentifier(); + } + + function parseJSXAttributeValue() { + var value, marker; + if (match('{')) { + value = parseJSXExpressionContainer(); + if (value.expression.type === Syntax.JSXEmptyExpression) { + throwError( + value, + 'JSX attributes must only be assigned a non-empty ' + + 'expression' + ); + } + } else if (match('<')) { + value = parseJSXElement(); + } else if (lookahead.type === Token.JSXText) { + marker = markerCreate(); + value = markerApply(marker, delegate.createLiteral(lex())); + } else { + throwError({}, Messages.InvalidJSXAttributeValue); + } + return value; + } + + function parseJSXEmptyExpression() { + var marker = markerCreatePreserveWhitespace(); + while (source.charAt(index) !== '}') { + index++; + } + return markerApply(marker, delegate.createJSXEmptyExpression()); + } + + function parseJSXExpressionContainer() { + var expression, origInJSXChild, origInJSXTag, marker = markerCreate(); + + origInJSXChild = state.inJSXChild; + origInJSXTag = state.inJSXTag; + state.inJSXChild = false; + state.inJSXTag = false; + + expect('{'); + + if (match('}')) { + expression = parseJSXEmptyExpression(); + } else { + expression = parseExpression(); + } + + state.inJSXChild = origInJSXChild; + state.inJSXTag = origInJSXTag; + + expect('}'); + + return markerApply(marker, delegate.createJSXExpressionContainer(expression)); + } + + function parseJSXSpreadAttribute() { + var expression, origInJSXChild, origInJSXTag, marker = markerCreate(); + + origInJSXChild = state.inJSXChild; + origInJSXTag = state.inJSXTag; + state.inJSXChild = false; + state.inJSXTag = false; + + expect('{'); + expect('...'); + + expression = parseAssignmentExpression(); + + state.inJSXChild = origInJSXChild; + state.inJSXTag = origInJSXTag; + + expect('}'); + + return markerApply(marker, delegate.createJSXSpreadAttribute(expression)); + } + + function parseJSXAttribute() { + var name, marker; + + if (match('{')) { + return parseJSXSpreadAttribute(); + } + + marker = markerCreate(); + + name = parseJSXAttributeName(); + + // HTML empty attribute + if (match('=')) { + lex(); + return markerApply(marker, delegate.createJSXAttribute(name, parseJSXAttributeValue())); + } + + return markerApply(marker, delegate.createJSXAttribute(name)); + } + + function parseJSXChild() { + var token, marker; + if (match('{')) { + token = parseJSXExpressionContainer(); + } else if (lookahead.type === Token.JSXText) { + marker = markerCreatePreserveWhitespace(); + token = markerApply(marker, delegate.createLiteral(lex())); + } else if (match('<')) { + token = parseJSXElement(); + } else { + throwUnexpected(lookahead); + } + return token; + } + + function parseJSXClosingElement() { + var name, origInJSXChild, origInJSXTag, marker = markerCreate(); + origInJSXChild = state.inJSXChild; + origInJSXTag = state.inJSXTag; + state.inJSXChild = false; + state.inJSXTag = true; + expect('<'); + expect('/'); + name = parseJSXElementName(); + // Because advance() (called by lex() called by expect()) expects there + // to be a valid token after >, it needs to know whether to look for a + // standard JS token or an JSX text node + state.inJSXChild = origInJSXChild; + state.inJSXTag = origInJSXTag; + expect('>'); + return markerApply(marker, delegate.createJSXClosingElement(name)); + } + + function parseJSXOpeningElement() { + var name, attributes = [], selfClosing = false, origInJSXChild, origInJSXTag, marker = markerCreate(); + + origInJSXChild = state.inJSXChild; + origInJSXTag = state.inJSXTag; + state.inJSXChild = false; + state.inJSXTag = true; + + expect('<'); + + name = parseJSXElementName(); + + while (index < length && + lookahead.value !== '/' && + lookahead.value !== '>') { + attributes.push(parseJSXAttribute()); + } + + state.inJSXTag = origInJSXTag; + + if (lookahead.value === '/') { + expect('/'); + // Because advance() (called by lex() called by expect()) expects + // there to be a valid token after >, it needs to know whether to + // look for a standard JS token or an JSX text node + state.inJSXChild = origInJSXChild; + expect('>'); + selfClosing = true; + } else { + state.inJSXChild = true; + expect('>'); + } + return markerApply(marker, delegate.createJSXOpeningElement(name, attributes, selfClosing)); + } + + function parseJSXElement() { + var openingElement, closingElement = null, children = [], origInJSXChild, origInJSXTag, marker = markerCreate(); + + origInJSXChild = state.inJSXChild; + origInJSXTag = state.inJSXTag; + openingElement = parseJSXOpeningElement(); + + if (!openingElement.selfClosing) { + while (index < length) { + state.inJSXChild = false; // Call lookahead2() with inJSXChild = false because one
two
; + // + // the default error message is a bit incomprehensible. Since it's + // rarely (never?) useful to write a less-than sign after an JSX + // element, we disallow it here in the parser in order to provide a + // better error message. (In the rare case that the less-than operator + // was intended, the left tag can be wrapped in parentheses.) + if (!origInJSXChild && match('<')) { + throwError(lookahead, Messages.AdjacentJSXElements); + } + + return markerApply(marker, delegate.createJSXElement(openingElement, closingElement, children)); + } + + function parseTypeAlias() { + var id, marker = markerCreate(), typeParameters = null, right; + expectContextualKeyword('type'); + id = parseVariableIdentifier(); + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + expect('='); + right = parseType(); + consumeSemicolon(); + return markerApply(marker, delegate.createTypeAlias(id, typeParameters, right)); + } + + function parseInterfaceExtends() { + var marker = markerCreate(), id, typeParameters = null; + + id = parseVariableIdentifier(); + if (match('<')) { + typeParameters = parseTypeParameterInstantiation(); + } + + return markerApply(marker, delegate.createInterfaceExtends( + id, + typeParameters + )); + } + + function parseInterfaceish(marker, allowStatic) { + var body, bodyMarker, extended = [], id, + typeParameters = null; + + id = parseVariableIdentifier(); + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + if (matchKeyword('extends')) { + expectKeyword('extends'); + + while (index < length) { + extended.push(parseInterfaceExtends()); + if (!match(',')) { + break; + } + expect(','); + } + } + + bodyMarker = markerCreate(); + body = markerApply(bodyMarker, parseObjectType(allowStatic)); + + return markerApply(marker, delegate.createInterface( + id, + typeParameters, + body, + extended + )); + } + + function parseInterface() { + var marker = markerCreate(); + + if (strict) { + expectKeyword('interface'); + } else { + expectContextualKeyword('interface'); + } + + return parseInterfaceish(marker, /* allowStatic */false); + } + + function parseDeclareClass() { + var marker = markerCreate(), ret; + expectContextualKeyword('declare'); + expectKeyword('class'); + + ret = parseInterfaceish(marker, /* allowStatic */true); + ret.type = Syntax.DeclareClass; + return ret; + } + + function parseDeclareFunction() { + var id, idMarker, + marker = markerCreate(), params, returnType, rest, tmp, + typeParameters = null, value, valueMarker; + + expectContextualKeyword('declare'); + expectKeyword('function'); + idMarker = markerCreate(); + id = parseVariableIdentifier(); + + valueMarker = markerCreate(); + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + expect('('); + tmp = parseFunctionTypeParams(); + params = tmp.params; + rest = tmp.rest; + expect(')'); + + expect(':'); + returnType = parseType(); + + value = markerApply(valueMarker, delegate.createFunctionTypeAnnotation( + params, + returnType, + rest, + typeParameters + )); + + id.typeAnnotation = markerApply(valueMarker, delegate.createTypeAnnotation( + value + )); + markerApply(idMarker, id); + + consumeSemicolon(); + + return markerApply(marker, delegate.createDeclareFunction( + id + )); + } + + function parseDeclareVariable() { + var id, marker = markerCreate(); + expectContextualKeyword('declare'); + expectKeyword('var'); + id = parseTypeAnnotatableIdentifier(); + + consumeSemicolon(); + + return markerApply(marker, delegate.createDeclareVariable( + id + )); + } + + function parseDeclareModule() { + var body = [], bodyMarker, id, idMarker, marker = markerCreate(), token; + expectContextualKeyword('declare'); + expectContextualKeyword('module'); + + if (lookahead.type === Token.StringLiteral) { + if (strict && lookahead.octal) { + throwErrorTolerant(lookahead, Messages.StrictOctalLiteral); + } + idMarker = markerCreate(); + id = markerApply(idMarker, delegate.createLiteral(lex())); + } else { + id = parseVariableIdentifier(); + } + + bodyMarker = markerCreate(); + expect('{'); + while (index < length && !match('}')) { + token = lookahead2(); + switch (token.value) { + case 'class': + body.push(parseDeclareClass()); + break; + case 'function': + body.push(parseDeclareFunction()); + break; + case 'var': + body.push(parseDeclareVariable()); + break; + default: + throwUnexpected(lookahead); + } + } + expect('}'); + + return markerApply(marker, delegate.createDeclareModule( + id, + markerApply(bodyMarker, delegate.createBlockStatement(body)) + )); + } + + function collectToken() { + var loc, token, range, value, entry; + + /* istanbul ignore else */ + if (!state.inJSXChild) { + skipComment(); + } + + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + + token = extra.advance(); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + + if (token.type !== Token.EOF) { + range = [token.range[0], token.range[1]]; + value = source.slice(token.range[0], token.range[1]); + entry = { + type: TokenName[token.type], + value: value, + range: range, + loc: loc + }; + if (token.regex) { + entry.regex = { + pattern: token.regex.pattern, + flags: token.regex.flags + }; + } + extra.tokens.push(entry); + } + + return token; + } + + function collectRegex() { + var pos, loc, regex, token; + + skipComment(); + + pos = index; + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + + regex = extra.scanRegExp(); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + + if (!extra.tokenize) { + /* istanbul ignore next */ + // Pop the previous token, which is likely '/' or '/=' + if (extra.tokens.length > 0) { + token = extra.tokens[extra.tokens.length - 1]; + if (token.range[0] === pos && token.type === 'Punctuator') { + if (token.value === '/' || token.value === '/=') { + extra.tokens.pop(); + } + } + } + + extra.tokens.push({ + type: 'RegularExpression', + value: regex.literal, + regex: regex.regex, + range: [pos, index], + loc: loc + }); + } + + return regex; + } + + function filterTokenLocation() { + var i, entry, token, tokens = []; + + for (i = 0; i < extra.tokens.length; ++i) { + entry = extra.tokens[i]; + token = { + type: entry.type, + value: entry.value + }; + if (entry.regex) { + token.regex = { + pattern: entry.regex.pattern, + flags: entry.regex.flags + }; + } + if (extra.range) { + token.range = entry.range; + } + if (extra.loc) { + token.loc = entry.loc; + } + tokens.push(token); + } + + extra.tokens = tokens; + } + + function patch() { + if (typeof extra.tokens !== 'undefined') { + extra.advance = advance; + extra.scanRegExp = scanRegExp; + + advance = collectToken; + scanRegExp = collectRegex; + } + } + + function unpatch() { + if (typeof extra.scanRegExp === 'function') { + advance = extra.advance; + scanRegExp = extra.scanRegExp; + } + } + + // This is used to modify the delegate. + + function extend(object, properties) { + var entry, result = {}; + + for (entry in object) { + /* istanbul ignore else */ + if (object.hasOwnProperty(entry)) { + result[entry] = object[entry]; + } + } + + for (entry in properties) { + /* istanbul ignore else */ + if (properties.hasOwnProperty(entry)) { + result[entry] = properties[entry]; + } + } + + return result; + } + + function tokenize(code, options) { + var toString, + token, + tokens; + + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } + + delegate = SyntaxTreeDelegate; + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + length = source.length; + lookahead = null; + state = { + allowKeyword: true, + allowIn: true, + labelSet: new StringMap(), + inFunctionBody: false, + inIteration: false, + inSwitch: false, + lastCommentStart: -1 + }; + + extra = {}; + + // Options matching. + options = options || {}; + + // Of course we collect tokens here. + options.tokens = true; + extra.tokens = []; + extra.tokenize = true; + // The following two fields are necessary to compute the Regex tokens. + extra.openParenToken = -1; + extra.openCurlyToken = -1; + + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; + + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } + + patch(); + + try { + peek(); + if (lookahead.type === Token.EOF) { + return extra.tokens; + } + + token = lex(); + while (lookahead.type !== Token.EOF) { + try { + token = lex(); + } catch (lexError) { + token = lookahead; + if (extra.errors) { + extra.errors.push(lexError); + // We have to break on the first error + // to avoid infinite loops. + break; + } else { + throw lexError; + } + } + } + + filterTokenLocation(); + tokens = extra.tokens; + if (typeof extra.comments !== 'undefined') { + tokens.comments = extra.comments; + } + if (typeof extra.errors !== 'undefined') { + tokens.errors = extra.errors; + } + } catch (e) { + throw e; + } finally { + unpatch(); + extra = {}; + } + return tokens; + } + + function parse(code, options) { + var program, toString; + + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } + + delegate = SyntaxTreeDelegate; + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + length = source.length; + lookahead = null; + state = { + allowKeyword: false, + allowIn: true, + labelSet: new StringMap(), + parenthesizedCount: 0, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + inJSXChild: false, + inJSXTag: false, + inType: false, + lastCommentStart: -1, + yieldAllowed: false, + awaitAllowed: false + }; + + extra = {}; + if (typeof options !== 'undefined') { + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; + extra.attachComment = (typeof options.attachComment === 'boolean') && options.attachComment; + + if (extra.loc && options.source !== null && options.source !== undefined) { + delegate = extend(delegate, { + 'postProcess': function (node) { + node.loc.source = toString(options.source); + return node; + } + }); + } + + extra.sourceType = options.sourceType; + if (typeof options.tokens === 'boolean' && options.tokens) { + extra.tokens = []; + } + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } + if (extra.attachComment) { + extra.range = true; + extra.comments = []; + extra.bottomRightStack = []; + extra.trailingComments = []; + extra.leadingComments = []; + } + } + + patch(); + try { + program = parseProgram(); + if (typeof extra.comments !== 'undefined') { + program.comments = extra.comments; + } + if (typeof extra.tokens !== 'undefined') { + filterTokenLocation(); + program.tokens = extra.tokens; + } + if (typeof extra.errors !== 'undefined') { + program.errors = extra.errors; + } + } catch (e) { + throw e; + } finally { + unpatch(); + extra = {}; + } + + return program; + } + + // Sync with *.json manifests. + exports.version = '13001.1001.0-dev-harmony-fb'; + + exports.tokenize = tokenize; + + exports.parse = parse; + + // Deep copy. + /* istanbul ignore next */ + exports.Syntax = (function () { + var name, types = {}; + + if (typeof Object.create === 'function') { + types = Object.create(null); + } + + for (name in Syntax) { + if (Syntax.hasOwnProperty(name)) { + types[name] = Syntax[name]; + } + } + + if (typeof Object.freeze === 'function') { + Object.freeze(types); + } + + return types; + }()); + +})); +/* vim: set sw=4 ts=4 et tw=80 : */ + +},{}],10:[function(_dereq_,module,exports){ +var Base62 = (function (my) { + my.chars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] + + my.encode = function(i){ + if (i === 0) {return '0'} + var s = '' + while (i > 0) { + s = this.chars[i % 62] + s + i = Math.floor(i/62) + } + return s + }; + my.decode = function(a,b,c,d){ + for ( + b = c = ( + a === (/\W|_|^$/.test(a += "") || a) + ) - 1; + d = a.charCodeAt(c++); + ) + b = b * 62 + d - [, 48, 29, 87][d >> 5]; + return b + }; + + return my; +}({})); + +module.exports = Base62 +},{}],11:[function(_dereq_,module,exports){ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = _dereq_('./source-map/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = _dereq_('./source-map/source-map-consumer').SourceMapConsumer; +exports.SourceNode = _dereq_('./source-map/source-node').SourceNode; + +},{"./source-map/source-map-consumer":16,"./source-map/source-map-generator":17,"./source-map/source-node":18}],12:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + var util = _dereq_('./util'); + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = {}; + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var isDuplicate = this.has(aStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[util.toSetString(aStr)] = idx; + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + return Object.prototype.hasOwnProperty.call(this._set, + util.toSetString(aStr)); + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (this.has(aStr)) { + return this._set[util.toSetString(aStr)]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + +}); + +},{"./util":19,"amdefine":20}],13:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + var base64 = _dereq_('./base64'); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * is placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * is placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string. + */ + exports.decode = function base64VLQ_decode(aStr) { + var i = 0; + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (i >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charAt(i++)); + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + return { + value: fromVLQSigned(result), + rest: aStr.slice(i) + }; + }; + +}); + +},{"./base64":14,"amdefine":20}],14:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + var charToIntMap = {}; + var intToCharMap = {}; + + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + .split('') + .forEach(function (ch, index) { + charToIntMap[ch] = index; + intToCharMap[index] = ch; + }); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function base64_encode(aNumber) { + if (aNumber in intToCharMap) { + return intToCharMap[aNumber]; + } + throw new TypeError("Must be between 0 and 63: " + aNumber); + }; + + /** + * Decode a single base 64 digit to an integer. + */ + exports.decode = function base64_decode(aChar) { + if (aChar in charToIntMap) { + return charToIntMap[aChar]; + } + throw new TypeError("Not a valid base 64 digit: " + aChar); + }; + +}); + +},{"amdefine":20}],15:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the next + // closest element that is less than that element. + // + // 3. We did not find the exact element, and there is no next-closest + // element which is less than the one we are searching for, so we + // return null. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return aHaystack[mid]; + } + else if (cmp > 0) { + // aHaystack[mid] is greater than our needle. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare); + } + // We did not find an exact match, return the next closest one + // (termination case 2). + return aHaystack[mid]; + } + else { + // aHaystack[mid] is less than our needle. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare); + } + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (2) or (3) and return the appropriate thing. + return aLow < 0 + ? null + : aHaystack[aLow]; + } + } + + /** + * This is an implementation of binary search which will always try and return + * the next lowest value checked if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + */ + exports.search = function search(aNeedle, aHaystack, aCompare) { + return aHaystack.length > 0 + ? recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare) + : null; + }; + +}); + +},{"amdefine":20}],16:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + var util = _dereq_('./util'); + var binarySearch = _dereq_('./binary-search'); + var ArraySet = _dereq_('./array-set').ArraySet; + var base64VLQ = _dereq_('./base64-vlq'); + + /** + * A SourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names, true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + /** + * Create a SourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns SourceMapConsumer + */ + SourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(SourceMapConsumer.prototype); + + smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + smc.__generatedMappings = aSourceMap._mappings.slice() + .sort(util.compareByGeneratedPositions); + smc.__originalMappings = aSourceMap._mappings.slice() + .sort(util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(SourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var mappingSeparator = /^[,;]/; + var str = aStr; + var mapping; + var temp; + + while (str.length > 0) { + if (str.charAt(0) === ';') { + generatedLine++; + str = str.slice(1); + previousGeneratedColumn = 0; + } + else if (str.charAt(0) === ',') { + str = str.slice(1); + } + else { + mapping = {}; + mapping.generatedLine = generatedLine; + + // Generated column. + temp = base64VLQ.decode(str); + mapping.generatedColumn = previousGeneratedColumn + temp.value; + previousGeneratedColumn = mapping.generatedColumn; + str = temp.rest; + + if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { + // Original source. + temp = base64VLQ.decode(str); + mapping.source = this._sources.at(previousSource + temp.value); + previousSource += temp.value; + str = temp.rest; + if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { + throw new Error('Found a source, but no line and column'); + } + + // Original line. + temp = base64VLQ.decode(str); + mapping.originalLine = previousOriginalLine + temp.value; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + str = temp.rest; + if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { + throw new Error('Found a source and line, but no column'); + } + + // Original column. + temp = base64VLQ.decode(str); + mapping.originalColumn = previousOriginalColumn + temp.value; + previousOriginalColumn = mapping.originalColumn; + str = temp.rest; + + if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { + // Original name. + temp = base64VLQ.decode(str); + mapping.name = this._names.at(previousName + temp.value); + previousName += temp.value; + str = temp.rest; + } + } + + this.__generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + this.__originalMappings.push(mapping); + } + } + } + + this.__originalMappings.sort(util.compareByOriginalPositions); + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + SourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator); + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + SourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var mapping = this._findMapping(needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositions); + + if (mapping) { + var source = util.getArg(mapping, 'source', null); + if (source && this.sourceRoot) { + source = util.join(this.sourceRoot, source); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: util.getArg(mapping, 'name', null) + }; + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * availible. + */ + SourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + throw new Error('"' + aSource + '" is not in the SourceMap.'); + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + if (this.sourceRoot) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + + var mapping = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions); + + if (mapping) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null) + }; + } + + return { + line: null, + column: null + }; + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source; + if (source && sourceRoot) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name + }; + }).forEach(aCallback, context); + }; + + exports.SourceMapConsumer = SourceMapConsumer; + +}); + +},{"./array-set":12,"./base64-vlq":13,"./binary-search":15,"./util":19,"amdefine":20}],17:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + var base64VLQ = _dereq_('./base64-vlq'); + var util = _dereq_('./util'); + var ArraySet = _dereq_('./array-set').ArraySet; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. To create a new one, you must pass an object + * with the following properties: + * + * - file: The filename of the generated source. + * - sourceRoot: An optional root for all URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + this._file = util.getArg(aArgs, 'file'); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = []; + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source) { + newMapping.source = mapping.source; + if (sourceRoot) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + this._validateMapping(generated, original, source, name); + + if (source && !this._sources.has(source)) { + this._sources.add(source); + } + + if (name && !this._names.has(name)) { + this._names.add(name); + } + + this._mappings.push({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent !== null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = {}; + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile) { + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (!aSourceFile) { + aSourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "aSourceFile" relative if an absolute Url is passed. + if (sourceRoot) { + aSourceFile = util.relative(sourceRoot, aSourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "aSourceFile" + this._mappings.forEach(function (mapping) { + if (mapping.source === aSourceFile && mapping.originalLine) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source !== null) { + // Copy mapping + if (sourceRoot) { + mapping.source = util.relative(sourceRoot, original.source); + } else { + mapping.source = original.source; + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name !== null && mapping.name !== null) { + // Only use the identifier name if it's an identifier + // in both SourceMaps + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content) { + if (sourceRoot) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + orginal: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var mapping; + + // The mappings must be guaranteed to be in sorted order before we start + // serializing them or else the generated line numbers (which are defined + // via the ';' separators) will be all messed up. Note: it might be more + // performant to maintain the sorting as we insert them, rather than as we + // serialize them, but the big O is the same either way. + this._mappings.sort(util.compareByGeneratedPositions); + + for (var i = 0, len = this._mappings.length; i < len; i++) { + mapping = this._mappings[i]; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + result += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositions(mapping, this._mappings[i - 1])) { + continue; + } + result += ','; + } + } + + result += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source) { + result += base64VLQ.encode(this._sources.indexOf(mapping.source) + - previousSource); + previousSource = this._sources.indexOf(mapping.source); + + // lines are stored 0-based in SourceMap spec version 3 + result += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + result += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name) { + result += base64VLQ.encode(this._names.indexOf(mapping.name) + - previousName); + previousName = this._names.indexOf(mapping.name); + } + } + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, + key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + file: this._file, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._sourceRoot) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + +}); + +},{"./array-set":12,"./base64-vlq":13,"./util":19,"amdefine":20}],18:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + var SourceMapGenerator = _dereq_('./source-map-generator').SourceMapGenerator; + var util = _dereq_('./util'); + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine === undefined ? null : aLine; + this.column = aColumn === undefined ? null : aColumn; + this.source = aSource === undefined ? null : aSource; + this.name = aName === undefined ? null : aName; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // The generated code + // Processed fragments are removed from this array. + var remainingLines = aGeneratedCode.split('\n'); + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping === null) { + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(remainingLines.shift() + "\n"); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + } else { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + var code = ""; + // Associate full lines with "lastMapping" + do { + code += remainingLines.shift() + "\n"; + lastGeneratedLine++; + lastGeneratedColumn = 0; + } while (lastGeneratedLine < mapping.generatedLine); + // When we reached the correct line, we add code until we + // reach the correct column too. + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + code += nextLine.substr(0, mapping.generatedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + // Create the SourceNode. + addMappingWithCode(lastMapping, code); + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + } + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + // Associate the remaining code in the current line with "lastMapping" + // and add the remaining lines without any mapping + addMappingWithCode(lastMapping, remainingLines.join("\n")); + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content) { + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + mapping.source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk instanceof SourceNode || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk instanceof SourceNode || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk instanceof SourceNode) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild instanceof SourceNode) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i] instanceof SourceNode) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + chunk.split('').forEach(function (ch) { + if (ch === '\n') { + generated.line++; + generated.column = 0; + } else { + generated.column++; + } + }); + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + +}); + +},{"./source-map-generator":17,"./util":19,"amdefine":20}],19:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/; + var dataUrlRegexp = /^data:.+\,.+/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[3], + host: match[4], + port: match[6], + path: match[7] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = aParsedUrl.scheme + "://"; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + "@" + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + function join(aRoot, aPath) { + var url; + + if (aPath.match(urlRegexp) || aPath.match(dataUrlRegexp)) { + return aPath; + } + + if (aPath.charAt(0) === '/' && (url = urlParse(aRoot))) { + url.path = aPath; + return urlGenerate(url); + } + + return aRoot.replace(/\/$/, '') + '/' + aPath; + } + exports.join = join; + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + return '$' + aStr; + } + exports.toSetString = toSetString; + + function fromSetString(aStr) { + return aStr.substr(1); + } + exports.fromSetString = fromSetString; + + function relative(aRoot, aPath) { + aRoot = aRoot.replace(/\/$/, ''); + + var url = urlParse(aRoot); + if (aPath.charAt(0) == "/" && url && url.path == "/") { + return aPath.slice(1); + } + + return aPath.indexOf(aRoot + '/') === 0 + ? aPath.substr(aRoot.length + 1) + : aPath; + } + exports.relative = relative; + + function strcmp(aStr1, aStr2) { + var s1 = aStr1 || ""; + var s2 = aStr2 || ""; + return (s1 > s2) - (s1 < s2); + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp; + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp || onlyCompareOriginal) { + return cmp; + } + + cmp = strcmp(mappingA.name, mappingB.name); + if (cmp) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } + + return mappingA.generatedColumn - mappingB.generatedColumn; + }; + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings where the generated positions are + * compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { + var cmp; + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + }; + exports.compareByGeneratedPositions = compareByGeneratedPositions; + +}); + +},{"amdefine":20}],20:[function(_dereq_,module,exports){ +(function (process,__filename){ +/** vim: et:ts=4:sw=4:sts=4 + * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/amdefine for details + */ + +/*jslint node: true */ +/*global module, process */ +'use strict'; + +/** + * Creates a define for node. + * @param {Object} module the "module" object that is defined by Node for the + * current module. + * @param {Function} [requireFn]. Node's require function for the current module. + * It only needs to be passed in Node versions before 0.5, when module.require + * did not exist. + * @returns {Function} a define function that is usable for the current node + * module. + */ +function amdefine(module, requireFn) { + 'use strict'; + var defineCache = {}, + loaderCache = {}, + alreadyCalled = false, + path = _dereq_('path'), + makeRequire, stringRequire; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { + var i, part; + for (i = 0; ary[i]; i+= 1) { + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { + //End of the line. Keep at least one non-dot + //path segment at the front so it can be mapped + //correctly to disk. Otherwise, there is likely + //no path mapping for a path starting with '..'. + //This can still fail, but catches the most reasonable + //uses of .. + break; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; + } + } + } + } + + function normalize(name, baseName) { + var baseParts; + + //Adjust any relative paths. + if (name && name.charAt(0) === '.') { + //If have a base name, try to normalize against it, + //otherwise, assume it is a top-level require that will + //be relative to baseUrl in the end. + if (baseName) { + baseParts = baseName.split('/'); + baseParts = baseParts.slice(0, baseParts.length - 1); + baseParts = baseParts.concat(name.split('/')); + trimDots(baseParts); + name = baseParts.join('/'); + } + } + + return name; + } + + /** + * Create the normalize() function passed to a loader plugin's + * normalize method. + */ + function makeNormalize(relName) { + return function (name) { + return normalize(name, relName); + }; + } + + function makeLoad(id) { + function load(value) { + loaderCache[id] = value; + } + + load.fromText = function (id, text) { + //This one is difficult because the text can/probably uses + //define, and any relative paths and requires should be relative + //to that id was it would be found on disk. But this would require + //bootstrapping a module/require fairly deeply from node core. + //Not sure how best to go about that yet. + throw new Error('amdefine does not implement load.fromText'); + }; + + return load; + } + + makeRequire = function (systemRequire, exports, module, relId) { + function amdRequire(deps, callback) { + if (typeof deps === 'string') { + //Synchronous, single module require('') + return stringRequire(systemRequire, exports, module, deps, relId); + } else { + //Array of dependencies with a callback. + + //Convert the dependencies to modules. + deps = deps.map(function (depName) { + return stringRequire(systemRequire, exports, module, depName, relId); + }); + + //Wait for next tick to call back the require call. + process.nextTick(function () { + callback.apply(null, deps); + }); + } + } + + amdRequire.toUrl = function (filePath) { + if (filePath.indexOf('.') === 0) { + return normalize(filePath, path.dirname(module.filename)); + } else { + return filePath; + } + }; + + return amdRequire; + }; + + //Favor explicit value, passed in if the module wants to support Node 0.4. + requireFn = requireFn || function req() { + return module.require.apply(module, arguments); + }; + + function runFactory(id, deps, factory) { + var r, e, m, result; + + if (id) { + e = loaderCache[id] = {}; + m = { + id: id, + uri: __filename, + exports: e + }; + r = makeRequire(requireFn, e, m, id); + } else { + //Only support one define call per file + if (alreadyCalled) { + throw new Error('amdefine with no module ID cannot be called more than once per file.'); + } + alreadyCalled = true; + + //Use the real variables from node + //Use module.exports for exports, since + //the exports in here is amdefine exports. + e = module.exports; + m = module; + r = makeRequire(requireFn, e, m, module.id); + } + + //If there are dependencies, they are strings, so need + //to convert them to dependency values. + if (deps) { + deps = deps.map(function (depName) { + return r(depName); + }); + } + + //Call the factory with the right dependencies. + if (typeof factory === 'function') { + result = factory.apply(m.exports, deps); + } else { + result = factory; + } + + if (result !== undefined) { + m.exports = result; + if (id) { + loaderCache[id] = m.exports; + } + } + } + + stringRequire = function (systemRequire, exports, module, id, relId) { + //Split the ID by a ! so that + var index = id.indexOf('!'), + originalId = id, + prefix, plugin; + + if (index === -1) { + id = normalize(id, relId); + + //Straight module lookup. If it is one of the special dependencies, + //deal with it, otherwise, delegate to node. + if (id === 'require') { + return makeRequire(systemRequire, exports, module, relId); + } else if (id === 'exports') { + return exports; + } else if (id === 'module') { + return module; + } else if (loaderCache.hasOwnProperty(id)) { + return loaderCache[id]; + } else if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } else { + if(systemRequire) { + return systemRequire(originalId); + } else { + throw new Error('No module with ID: ' + id); + } + } + } else { + //There is a plugin in play. + prefix = id.substring(0, index); + id = id.substring(index + 1, id.length); + + plugin = stringRequire(systemRequire, exports, module, prefix, relId); + + if (plugin.normalize) { + id = plugin.normalize(id, makeNormalize(relId)); + } else { + //Normalize the ID normally. + id = normalize(id, relId); + } + + if (loaderCache[id]) { + return loaderCache[id]; + } else { + plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); + + return loaderCache[id]; + } + } + }; + + //Create a define function specific to the module asking for amdefine. + function define(id, deps, factory) { + if (Array.isArray(id)) { + factory = deps; + deps = id; + id = undefined; + } else if (typeof id !== 'string') { + factory = id; + id = deps = undefined; + } + + if (deps && !Array.isArray(deps)) { + factory = deps; + deps = undefined; + } + + if (!deps) { + deps = ['require', 'exports', 'module']; + } + + //Set up properties for this module. If an ID, then use + //internal cache. If no ID, then use the external variables + //for this node module. + if (id) { + //Put the module in deep freeze until there is a + //require call for it. + defineCache[id] = [id, deps, factory]; + } else { + runFactory(id, deps, factory); + } + } + + //define.require, which has access to all the values in the + //cache. Useful for AMD modules that all have IDs in the file, + //but need to finally export a value to node based on one of those + //IDs. + define.require = function (id) { + if (loaderCache[id]) { + return loaderCache[id]; + } + + if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } + }; + + define.amd = {}; + + return define; +} + +module.exports = amdefine; + +}).call(this,_dereq_('_process'),"/node_modules/jstransform/node_modules/source-map/node_modules/amdefine/amdefine.js") +},{"_process":8,"path":7}],21:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var docblockRe = /^\s*(\/\*\*(.|\r?\n)*?\*\/)/; +var ltrimRe = /^\s*/; +/** + * @param {String} contents + * @return {String} + */ +function extract(contents) { + var match = contents.match(docblockRe); + if (match) { + return match[0].replace(ltrimRe, '') || ''; + } + return ''; +} + + +var commentStartRe = /^\/\*\*?/; +var commentEndRe = /\*+\/$/; +var wsRe = /[\t ]+/g; +var stringStartRe = /(\r?\n|^) *\*/g; +var multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *([^@\r\n\s][^@\r\n]+?) *\r?\n/g; +var propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g; + +/** + * @param {String} contents + * @return {Array} + */ +function parse(docblock) { + docblock = docblock + .replace(commentStartRe, '') + .replace(commentEndRe, '') + .replace(wsRe, ' ') + .replace(stringStartRe, '$1'); + + // Normalize multi-line directives + var prev = ''; + while (prev != docblock) { + prev = docblock; + docblock = docblock.replace(multilineRe, "\n$1 $2\n"); + } + docblock = docblock.trim(); + + var result = []; + var match; + while (match = propertyRe.exec(docblock)) { + result.push([match[1], match[2]]); + } + + return result; +} + +/** + * Same as parse but returns an object of prop: value instead of array of paris + * If a property appers more than once the last one will be returned + * + * @param {String} contents + * @return {Object} + */ +function parseAsObject(docblock) { + var pairs = parse(docblock); + var result = {}; + for (var i = 0; i < pairs.length; i++) { + result[pairs[i][0]] = pairs[i][1]; + } + return result; +} + + +exports.extract = extract; +exports.parse = parse; +exports.parseAsObject = parseAsObject; + +},{}],22:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*jslint node: true*/ +"use strict"; + +var esprima = _dereq_('esprima-fb'); +var utils = _dereq_('./utils'); + +var getBoundaryNode = utils.getBoundaryNode; +var declareIdentInScope = utils.declareIdentInLocalScope; +var initScopeMetadata = utils.initScopeMetadata; +var Syntax = esprima.Syntax; + +/** + * @param {object} node + * @param {object} parentNode + * @return {boolean} + */ +function _nodeIsClosureScopeBoundary(node, parentNode) { + if (node.type === Syntax.Program) { + return true; + } + + var parentIsFunction = + parentNode.type === Syntax.FunctionDeclaration + || parentNode.type === Syntax.FunctionExpression + || parentNode.type === Syntax.ArrowFunctionExpression; + + var parentIsCurlylessArrowFunc = + parentNode.type === Syntax.ArrowFunctionExpression + && node === parentNode.body; + + return parentIsFunction + && (node.type === Syntax.BlockStatement || parentIsCurlylessArrowFunc); +} + +function _nodeIsBlockScopeBoundary(node, parentNode) { + if (node.type === Syntax.Program) { + return false; + } + + return node.type === Syntax.BlockStatement + && parentNode.type === Syntax.CatchClause; +} + +/** + * @param {object} node + * @param {array} path + * @param {object} state + */ +function traverse(node, path, state) { + /*jshint -W004*/ + // Create a scope stack entry if this is the first node we've encountered in + // its local scope + var startIndex = null; + var parentNode = path[0]; + if (!Array.isArray(node) && state.localScope.parentNode !== parentNode) { + if (_nodeIsClosureScopeBoundary(node, parentNode)) { + var scopeIsStrict = state.scopeIsStrict; + if (!scopeIsStrict + && (node.type === Syntax.BlockStatement + || node.type === Syntax.Program)) { + scopeIsStrict = + node.body.length > 0 + && node.body[0].type === Syntax.ExpressionStatement + && node.body[0].expression.type === Syntax.Literal + && node.body[0].expression.value === 'use strict'; + } + + if (node.type === Syntax.Program) { + startIndex = state.g.buffer.length; + state = utils.updateState(state, { + scopeIsStrict: scopeIsStrict + }); + } else { + startIndex = state.g.buffer.length + 1; + state = utils.updateState(state, { + localScope: { + parentNode: parentNode, + parentScope: state.localScope, + identifiers: {}, + tempVarIndex: 0, + tempVars: [] + }, + scopeIsStrict: scopeIsStrict + }); + + // All functions have an implicit 'arguments' object in scope + declareIdentInScope('arguments', initScopeMetadata(node), state); + + // Include function arg identifiers in the scope boundaries of the + // function + if (parentNode.params.length > 0) { + var param; + var metadata = initScopeMetadata(parentNode, path.slice(1), path[0]); + for (var i = 0; i < parentNode.params.length; i++) { + param = parentNode.params[i]; + if (param.type === Syntax.Identifier) { + declareIdentInScope(param.name, metadata, state); + } + } + } + + // Include rest arg identifiers in the scope boundaries of their + // functions + if (parentNode.rest) { + var metadata = initScopeMetadata( + parentNode, + path.slice(1), + path[0] + ); + declareIdentInScope(parentNode.rest.name, metadata, state); + } + + // Named FunctionExpressions scope their name within the body block of + // themselves only + if (parentNode.type === Syntax.FunctionExpression && parentNode.id) { + var metaData = + initScopeMetadata(parentNode, path.parentNodeslice, parentNode); + declareIdentInScope(parentNode.id.name, metaData, state); + } + } + + // Traverse and find all local identifiers in this closure first to + // account for function/variable declaration hoisting + collectClosureIdentsAndTraverse(node, path, state); + } + + if (_nodeIsBlockScopeBoundary(node, parentNode)) { + startIndex = state.g.buffer.length; + state = utils.updateState(state, { + localScope: { + parentNode: parentNode, + parentScope: state.localScope, + identifiers: {}, + tempVarIndex: 0, + tempVars: [] + } + }); + + if (parentNode.type === Syntax.CatchClause) { + var metadata = initScopeMetadata( + parentNode, + path.slice(1), + parentNode + ); + declareIdentInScope(parentNode.param.name, metadata, state); + } + collectBlockIdentsAndTraverse(node, path, state); + } + } + + // Only catchup() before and after traversing a child node + function traverser(node, path, state) { + node.range && utils.catchup(node.range[0], state); + traverse(node, path, state); + node.range && utils.catchup(node.range[1], state); + } + + utils.analyzeAndTraverse(walker, traverser, node, path, state); + + // Inject temp variables into the scope. + if (startIndex !== null) { + utils.injectTempVarDeclarations(state, startIndex); + } +} + +function collectClosureIdentsAndTraverse(node, path, state) { + utils.analyzeAndTraverse( + visitLocalClosureIdentifiers, + collectClosureIdentsAndTraverse, + node, + path, + state + ); +} + +function collectBlockIdentsAndTraverse(node, path, state) { + utils.analyzeAndTraverse( + visitLocalBlockIdentifiers, + collectBlockIdentsAndTraverse, + node, + path, + state + ); +} + +function visitLocalClosureIdentifiers(node, path, state) { + var metaData; + switch (node.type) { + case Syntax.ArrowFunctionExpression: + case Syntax.FunctionExpression: + // Function expressions don't get their names (if there is one) added to + // the closure scope they're defined in + return false; + case Syntax.ClassDeclaration: + case Syntax.ClassExpression: + case Syntax.FunctionDeclaration: + if (node.id) { + metaData = initScopeMetadata(getBoundaryNode(path), path.slice(), node); + declareIdentInScope(node.id.name, metaData, state); + } + return false; + case Syntax.VariableDeclarator: + // Variables have function-local scope + if (path[0].kind === 'var') { + metaData = initScopeMetadata(getBoundaryNode(path), path.slice(), node); + declareIdentInScope(node.id.name, metaData, state); + } + break; + } +} + +function visitLocalBlockIdentifiers(node, path, state) { + // TODO: Support 'let' here...maybe...one day...or something... + if (node.type === Syntax.CatchClause) { + return false; + } +} + +function walker(node, path, state) { + var visitors = state.g.visitors; + for (var i = 0; i < visitors.length; i++) { + if (visitors[i].test(node, path, state)) { + return visitors[i](traverse, node, path, state); + } + } +} + +var _astCache = {}; + +function getAstForSource(source, options) { + if (_astCache[source] && !options.disableAstCache) { + return _astCache[source]; + } + var ast = esprima.parse(source, { + comment: true, + loc: true, + range: true, + sourceType: options.sourceType + }); + if (!options.disableAstCache) { + _astCache[source] = ast; + } + return ast; +} + +/** + * Applies all available transformations to the source + * @param {array} visitors + * @param {string} source + * @param {?object} options + * @return {object} + */ +function transform(visitors, source, options) { + options = options || {}; + var ast; + try { + ast = getAstForSource(source, options); + } catch (e) { + e.message = 'Parse Error: ' + e.message; + throw e; + } + var state = utils.createState(source, ast, options); + state.g.visitors = visitors; + + if (options.sourceMap) { + var SourceMapGenerator = _dereq_('source-map').SourceMapGenerator; + state.g.sourceMap = new SourceMapGenerator({file: options.filename || 'transformed.js'}); + } + + traverse(ast, [], state); + utils.catchup(source.length, state); + + var ret = {code: state.g.buffer, extra: state.g.extra}; + if (options.sourceMap) { + ret.sourceMap = state.g.sourceMap; + ret.sourceMapFilename = options.filename || 'source.js'; + } + return ret; +} + +exports.transform = transform; +exports.Syntax = Syntax; + +},{"./utils":23,"esprima-fb":9,"source-map":11}],23:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*jslint node: true*/ +var Syntax = _dereq_('esprima-fb').Syntax; +var leadingIndentRegexp = /(^|\n)( {2}|\t)/g; +var nonWhiteRegexp = /(\S)/g; + +/** + * A `state` object represents the state of the parser. It has "local" and + * "global" parts. Global contains parser position, source, etc. Local contains + * scope based properties like current class name. State should contain all the + * info required for transformation. It's the only mandatory object that is + * being passed to every function in transform chain. + * + * @param {string} source + * @param {object} transformOptions + * @return {object} + */ +function createState(source, rootNode, transformOptions) { + return { + /** + * A tree representing the current local scope (and its lexical scope chain) + * Useful for tracking identifiers from parent scopes, etc. + * @type {Object} + */ + localScope: { + parentNode: rootNode, + parentScope: null, + identifiers: {}, + tempVarIndex: 0, + tempVars: [] + }, + /** + * The name (and, if applicable, expression) of the super class + * @type {Object} + */ + superClass: null, + /** + * The namespace to use when munging identifiers + * @type {String} + */ + mungeNamespace: '', + /** + * Ref to the node for the current MethodDefinition + * @type {Object} + */ + methodNode: null, + /** + * Ref to the node for the FunctionExpression of the enclosing + * MethodDefinition + * @type {Object} + */ + methodFuncNode: null, + /** + * Name of the enclosing class + * @type {String} + */ + className: null, + /** + * Whether we're currently within a `strict` scope + * @type {Bool} + */ + scopeIsStrict: null, + /** + * Indentation offset + * @type {Number} + */ + indentBy: 0, + /** + * Global state (not affected by updateState) + * @type {Object} + */ + g: { + /** + * A set of general options that transformations can consider while doing + * a transformation: + * + * - minify + * Specifies that transformation steps should do their best to minify + * the output source when possible. This is useful for places where + * minification optimizations are possible with higher-level context + * info than what jsxmin can provide. + * + * For example, the ES6 class transform will minify munged private + * variables if this flag is set. + */ + opts: transformOptions, + /** + * Current position in the source code + * @type {Number} + */ + position: 0, + /** + * Auxiliary data to be returned by transforms + * @type {Object} + */ + extra: {}, + /** + * Buffer containing the result + * @type {String} + */ + buffer: '', + /** + * Source that is being transformed + * @type {String} + */ + source: source, + + /** + * Cached parsed docblock (see getDocblock) + * @type {object} + */ + docblock: null, + + /** + * Whether the thing was used + * @type {Boolean} + */ + tagNamespaceUsed: false, + + /** + * If using bolt xjs transformation + * @type {Boolean} + */ + isBolt: undefined, + + /** + * Whether to record source map (expensive) or not + * @type {SourceMapGenerator|null} + */ + sourceMap: null, + + /** + * Filename of the file being processed. Will be returned as a source + * attribute in the source map + */ + sourceMapFilename: 'source.js', + + /** + * Only when source map is used: last line in the source for which + * source map was generated + * @type {Number} + */ + sourceLine: 1, + + /** + * Only when source map is used: last line in the buffer for which + * source map was generated + * @type {Number} + */ + bufferLine: 1, + + /** + * The top-level Program AST for the original file. + */ + originalProgramAST: null, + + sourceColumn: 0, + bufferColumn: 0 + } + }; +} + +/** + * Updates a copy of a given state with "update" and returns an updated state. + * + * @param {object} state + * @param {object} update + * @return {object} + */ +function updateState(state, update) { + var ret = Object.create(state); + Object.keys(update).forEach(function(updatedKey) { + ret[updatedKey] = update[updatedKey]; + }); + return ret; +} + +/** + * Given a state fill the resulting buffer from the original source up to + * the end + * + * @param {number} end + * @param {object} state + * @param {?function} contentTransformer Optional callback to transform newly + * added content. + */ +function catchup(end, state, contentTransformer) { + if (end < state.g.position) { + // cannot move backwards + return; + } + var source = state.g.source.substring(state.g.position, end); + var transformed = updateIndent(source, state); + if (state.g.sourceMap && transformed) { + // record where we are + state.g.sourceMap.addMapping({ + generated: { line: state.g.bufferLine, column: state.g.bufferColumn }, + original: { line: state.g.sourceLine, column: state.g.sourceColumn }, + source: state.g.sourceMapFilename + }); + + // record line breaks in transformed source + var sourceLines = source.split('\n'); + var transformedLines = transformed.split('\n'); + // Add line break mappings between last known mapping and the end of the + // added piece. So for the code piece + // (foo, bar); + // > var x = 2; + // > var b = 3; + // var c = + // only add lines marked with ">": 2, 3. + for (var i = 1; i < sourceLines.length - 1; i++) { + state.g.sourceMap.addMapping({ + generated: { line: state.g.bufferLine, column: 0 }, + original: { line: state.g.sourceLine, column: 0 }, + source: state.g.sourceMapFilename + }); + state.g.sourceLine++; + state.g.bufferLine++; + } + // offset for the last piece + if (sourceLines.length > 1) { + state.g.sourceLine++; + state.g.bufferLine++; + state.g.sourceColumn = 0; + state.g.bufferColumn = 0; + } + state.g.sourceColumn += sourceLines[sourceLines.length - 1].length; + state.g.bufferColumn += + transformedLines[transformedLines.length - 1].length; + } + state.g.buffer += + contentTransformer ? contentTransformer(transformed) : transformed; + state.g.position = end; +} + +/** + * Returns original source for an AST node. + * @param {object} node + * @param {object} state + * @return {string} + */ +function getNodeSourceText(node, state) { + return state.g.source.substring(node.range[0], node.range[1]); +} + +function _replaceNonWhite(value) { + return value.replace(nonWhiteRegexp, ' '); +} + +/** + * Removes all non-whitespace characters + */ +function _stripNonWhite(value) { + return value.replace(nonWhiteRegexp, ''); +} + +/** + * Finds the position of the next instance of the specified syntactic char in + * the pending source. + * + * NOTE: This will skip instances of the specified char if they sit inside a + * comment body. + * + * NOTE: This function also assumes that the buffer's current position is not + * already within a comment or a string. This is rarely the case since all + * of the buffer-advancement utility methods tend to be used on syntactic + * nodes' range values -- but it's a small gotcha that's worth mentioning. + */ +function getNextSyntacticCharOffset(char, state) { + var pendingSource = state.g.source.substring(state.g.position); + var pendingSourceLines = pendingSource.split('\n'); + + var charOffset = 0; + var line; + var withinBlockComment = false; + var withinString = false; + lineLoop: while ((line = pendingSourceLines.shift()) !== undefined) { + var lineEndPos = charOffset + line.length; + charLoop: for (; charOffset < lineEndPos; charOffset++) { + var currChar = pendingSource[charOffset]; + if (currChar === '"' || currChar === '\'') { + withinString = !withinString; + continue charLoop; + } else if (withinString) { + continue charLoop; + } else if (charOffset + 1 < lineEndPos) { + var nextTwoChars = currChar + line[charOffset + 1]; + if (nextTwoChars === '//') { + charOffset = lineEndPos + 1; + continue lineLoop; + } else if (nextTwoChars === '/*') { + withinBlockComment = true; + charOffset += 1; + continue charLoop; + } else if (nextTwoChars === '*/') { + withinBlockComment = false; + charOffset += 1; + continue charLoop; + } + } + + if (!withinBlockComment && currChar === char) { + return charOffset + state.g.position; + } + } + + // Account for '\n' + charOffset++; + withinString = false; + } + + throw new Error('`' + char + '` not found!'); +} + +/** + * Catches up as `catchup` but replaces non-whitespace chars with spaces. + */ +function catchupWhiteOut(end, state) { + catchup(end, state, _replaceNonWhite); +} + +/** + * Catches up as `catchup` but removes all non-whitespace characters. + */ +function catchupWhiteSpace(end, state) { + catchup(end, state, _stripNonWhite); +} + +/** + * Removes all non-newline characters + */ +var reNonNewline = /[^\n]/g; +function stripNonNewline(value) { + return value.replace(reNonNewline, function() { + return ''; + }); +} + +/** + * Catches up as `catchup` but removes all non-newline characters. + * + * Equivalent to appending as many newlines as there are in the original source + * between the current position and `end`. + */ +function catchupNewlines(end, state) { + catchup(end, state, stripNonNewline); +} + + +/** + * Same as catchup but does not touch the buffer + * + * @param {number} end + * @param {object} state + */ +function move(end, state) { + // move the internal cursors + if (state.g.sourceMap) { + if (end < state.g.position) { + state.g.position = 0; + state.g.sourceLine = 1; + state.g.sourceColumn = 0; + } + + var source = state.g.source.substring(state.g.position, end); + var sourceLines = source.split('\n'); + if (sourceLines.length > 1) { + state.g.sourceLine += sourceLines.length - 1; + state.g.sourceColumn = 0; + } + state.g.sourceColumn += sourceLines[sourceLines.length - 1].length; + } + state.g.position = end; +} + +/** + * Appends a string of text to the buffer + * + * @param {string} str + * @param {object} state + */ +function append(str, state) { + if (state.g.sourceMap && str) { + state.g.sourceMap.addMapping({ + generated: { line: state.g.bufferLine, column: state.g.bufferColumn }, + original: { line: state.g.sourceLine, column: state.g.sourceColumn }, + source: state.g.sourceMapFilename + }); + var transformedLines = str.split('\n'); + if (transformedLines.length > 1) { + state.g.bufferLine += transformedLines.length - 1; + state.g.bufferColumn = 0; + } + state.g.bufferColumn += + transformedLines[transformedLines.length - 1].length; + } + state.g.buffer += str; +} + +/** + * Update indent using state.indentBy property. Indent is measured in + * double spaces. Updates a single line only. + * + * @param {string} str + * @param {object} state + * @return {string} + */ +function updateIndent(str, state) { + /*jshint -W004*/ + var indentBy = state.indentBy; + if (indentBy < 0) { + for (var i = 0; i < -indentBy; i++) { + str = str.replace(leadingIndentRegexp, '$1'); + } + } else { + for (var i = 0; i < indentBy; i++) { + str = str.replace(leadingIndentRegexp, '$1$2$2'); + } + } + return str; +} + +/** + * Calculates indent from the beginning of the line until "start" or the first + * character before start. + * @example + * " foo.bar()" + * ^ + * start + * indent will be " " + * + * @param {number} start + * @param {object} state + * @return {string} + */ +function indentBefore(start, state) { + var end = start; + start = start - 1; + + while (start > 0 && state.g.source[start] != '\n') { + if (!state.g.source[start].match(/[ \t]/)) { + end = start; + } + start--; + } + return state.g.source.substring(start + 1, end); +} + +function getDocblock(state) { + if (!state.g.docblock) { + var docblock = _dereq_('./docblock'); + state.g.docblock = + docblock.parseAsObject(docblock.extract(state.g.source)); + } + return state.g.docblock; +} + +function identWithinLexicalScope(identName, state, stopBeforeNode) { + var currScope = state.localScope; + while (currScope) { + if (currScope.identifiers[identName] !== undefined) { + return true; + } + + if (stopBeforeNode && currScope.parentNode === stopBeforeNode) { + break; + } + + currScope = currScope.parentScope; + } + return false; +} + +function identInLocalScope(identName, state) { + return state.localScope.identifiers[identName] !== undefined; +} + +/** + * @param {object} boundaryNode + * @param {?array} path + * @return {?object} node + */ +function initScopeMetadata(boundaryNode, path, node) { + return { + boundaryNode: boundaryNode, + bindingPath: path, + bindingNode: node + }; +} + +function declareIdentInLocalScope(identName, metaData, state) { + state.localScope.identifiers[identName] = { + boundaryNode: metaData.boundaryNode, + path: metaData.bindingPath, + node: metaData.bindingNode, + state: Object.create(state) + }; +} + +function getLexicalBindingMetadata(identName, state) { + var currScope = state.localScope; + while (currScope) { + if (currScope.identifiers[identName] !== undefined) { + return currScope.identifiers[identName]; + } + + currScope = currScope.parentScope; + } +} + +function getLocalBindingMetadata(identName, state) { + return state.localScope.identifiers[identName]; +} + +/** + * Apply the given analyzer function to the current node. If the analyzer + * doesn't return false, traverse each child of the current node using the given + * traverser function. + * + * @param {function} analyzer + * @param {function} traverser + * @param {object} node + * @param {array} path + * @param {object} state + */ +function analyzeAndTraverse(analyzer, traverser, node, path, state) { + if (node.type) { + if (analyzer(node, path, state) === false) { + return; + } + path.unshift(node); + } + + getOrderedChildren(node).forEach(function(child) { + traverser(child, path, state); + }); + + node.type && path.shift(); +} + +/** + * It is crucial that we traverse in order, or else catchup() on a later + * node that is processed out of order can move the buffer past a node + * that we haven't handled yet, preventing us from modifying that node. + * + * This can happen when a node has multiple properties containing children. + * For example, XJSElement nodes have `openingElement`, `closingElement` and + * `children`. If we traverse `openingElement`, then `closingElement`, then + * when we get to `children`, the buffer has already caught up to the end of + * the closing element, after the children. + * + * This is basically a Schwartzian transform. Collects an array of children, + * each one represented as [child, startIndex]; sorts the array by start + * index; then traverses the children in that order. + */ +function getOrderedChildren(node) { + var queue = []; + for (var key in node) { + if (node.hasOwnProperty(key)) { + enqueueNodeWithStartIndex(queue, node[key]); + } + } + queue.sort(function(a, b) { return a[1] - b[1]; }); + return queue.map(function(pair) { return pair[0]; }); +} + +/** + * Helper function for analyzeAndTraverse which queues up all of the children + * of the given node. + * + * Children can also be found in arrays, so we basically want to merge all of + * those arrays together so we can sort them and then traverse the children + * in order. + * + * One example is the Program node. It contains `body` and `comments`, both + * arrays. Lexographically, comments are interspersed throughout the body + * nodes, but esprima's AST groups them together. + */ +function enqueueNodeWithStartIndex(queue, node) { + if (typeof node !== 'object' || node === null) { + return; + } + if (node.range) { + queue.push([node, node.range[0]]); + } else if (Array.isArray(node)) { + for (var ii = 0; ii < node.length; ii++) { + enqueueNodeWithStartIndex(queue, node[ii]); + } + } +} + +/** + * Checks whether a node or any of its sub-nodes contains + * a syntactic construct of the passed type. + * @param {object} node - AST node to test. + * @param {string} type - node type to lookup. + */ +function containsChildOfType(node, type) { + return containsChildMatching(node, function(node) { + return node.type === type; + }); +} + +function containsChildMatching(node, matcher) { + var foundMatchingChild = false; + function nodeTypeAnalyzer(node) { + if (matcher(node) === true) { + foundMatchingChild = true; + return false; + } + } + function nodeTypeTraverser(child, path, state) { + if (!foundMatchingChild) { + foundMatchingChild = containsChildMatching(child, matcher); + } + } + analyzeAndTraverse( + nodeTypeAnalyzer, + nodeTypeTraverser, + node, + [] + ); + return foundMatchingChild; +} + +var scopeTypes = {}; +scopeTypes[Syntax.ArrowFunctionExpression] = true; +scopeTypes[Syntax.FunctionExpression] = true; +scopeTypes[Syntax.FunctionDeclaration] = true; +scopeTypes[Syntax.Program] = true; + +function getBoundaryNode(path) { + for (var ii = 0; ii < path.length; ++ii) { + if (scopeTypes[path[ii].type]) { + return path[ii]; + } + } + throw new Error( + 'Expected to find a node with one of the following types in path:\n' + + JSON.stringify(Object.keys(scopeTypes)) + ); +} + +function getTempVar(tempVarIndex) { + return '$__' + tempVarIndex; +} + +function injectTempVar(state) { + var tempVar = '$__' + (state.localScope.tempVarIndex++); + state.localScope.tempVars.push(tempVar); + return tempVar; +} + +function injectTempVarDeclarations(state, index) { + if (state.localScope.tempVars.length) { + state.g.buffer = + state.g.buffer.slice(0, index) + + 'var ' + state.localScope.tempVars.join(', ') + ';' + + state.g.buffer.slice(index); + state.localScope.tempVars = []; + } +} + +exports.analyzeAndTraverse = analyzeAndTraverse; +exports.append = append; +exports.catchup = catchup; +exports.catchupNewlines = catchupNewlines; +exports.catchupWhiteOut = catchupWhiteOut; +exports.catchupWhiteSpace = catchupWhiteSpace; +exports.containsChildMatching = containsChildMatching; +exports.containsChildOfType = containsChildOfType; +exports.createState = createState; +exports.declareIdentInLocalScope = declareIdentInLocalScope; +exports.getBoundaryNode = getBoundaryNode; +exports.getDocblock = getDocblock; +exports.getLexicalBindingMetadata = getLexicalBindingMetadata; +exports.getLocalBindingMetadata = getLocalBindingMetadata; +exports.getNextSyntacticCharOffset = getNextSyntacticCharOffset; +exports.getNodeSourceText = getNodeSourceText; +exports.getOrderedChildren = getOrderedChildren; +exports.getTempVar = getTempVar; +exports.identInLocalScope = identInLocalScope; +exports.identWithinLexicalScope = identWithinLexicalScope; +exports.indentBefore = indentBefore; +exports.initScopeMetadata = initScopeMetadata; +exports.injectTempVar = injectTempVar; +exports.injectTempVarDeclarations = injectTempVarDeclarations; +exports.move = move; +exports.scopeTypes = scopeTypes; +exports.updateIndent = updateIndent; +exports.updateState = updateState; + +},{"./docblock":21,"esprima-fb":9}],24:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*global exports:true*/ + +/** + * Desugars ES6 Arrow functions to ES3 function expressions. + * If the function contains `this` expression -- automatically + * binds the function to current value of `this`. + * + * Single parameter, simple expression: + * + * [1, 2, 3].map(x => x * x); + * + * [1, 2, 3].map(function(x) { return x * x; }); + * + * Several parameters, complex block: + * + * this.users.forEach((user, idx) => { + * return this.isActive(idx) && this.send(user); + * }); + * + * this.users.forEach(function(user, idx) { + * return this.isActive(idx) && this.send(user); + * }.bind(this)); + * + */ +var restParamVisitors = _dereq_('./es6-rest-param-visitors'); +var destructuringVisitors = _dereq_('./es6-destructuring-visitors'); + +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + +/** + * @public + */ +function visitArrowFunction(traverse, node, path, state) { + var notInExpression = (path[0].type === Syntax.ExpressionStatement); + + // Wrap a function into a grouping operator, if it's not + // in the expression position. + if (notInExpression) { + utils.append('(', state); + } + + utils.append('function', state); + renderParams(traverse, node, path, state); + + // Skip arrow. + utils.catchupWhiteSpace(node.body.range[0], state); + + var renderBody = node.body.type == Syntax.BlockStatement + ? renderStatementBody + : renderExpressionBody; + + path.unshift(node); + renderBody(traverse, node, path, state); + path.shift(); + + // Bind the function only if `this` value is used + // inside it or inside any sub-expression. + var containsBindingSyntax = + utils.containsChildMatching(node.body, function(node) { + return node.type === Syntax.ThisExpression + || (node.type === Syntax.Identifier + && node.name === "super"); + }); + + if (containsBindingSyntax) { + utils.append('.bind(this)', state); + } + + utils.catchupWhiteSpace(node.range[1], state); + + // Close wrapper if not in the expression. + if (notInExpression) { + utils.append(')', state); + } + + return false; +} + +function renderParams(traverse, node, path, state) { + // To preserve inline typechecking directives, we + // distinguish between parens-free and paranthesized single param. + if (isParensFreeSingleParam(node, state) || !node.params.length) { + utils.append('(', state); + } + if (node.params.length !== 0) { + path.unshift(node); + traverse(node.params, path, state); + path.unshift(); + } + utils.append(')', state); +} + +function isParensFreeSingleParam(node, state) { + return node.params.length === 1 && + state.g.source[state.g.position] !== '('; +} + +function renderExpressionBody(traverse, node, path, state) { + // Wrap simple expression bodies into a block + // with explicit return statement. + utils.append('{', state); + + // Special handling of rest param. + if (node.rest) { + utils.append( + restParamVisitors.renderRestParamSetup(node, state), + state + ); + } + + // Special handling of destructured params. + destructuringVisitors.renderDestructuredComponents( + node, + utils.updateState(state, { + localScope: { + parentNode: state.parentNode, + parentScope: state.parentScope, + identifiers: state.identifiers, + tempVarIndex: 0 + } + }) + ); + + utils.append('return ', state); + renderStatementBody(traverse, node, path, state); + utils.append(';}', state); +} + +function renderStatementBody(traverse, node, path, state) { + traverse(node.body, path, state); + utils.catchup(node.body.range[1], state); +} + +visitArrowFunction.test = function(node, path, state) { + return node.type === Syntax.ArrowFunctionExpression; +}; + +exports.visitorList = [ + visitArrowFunction +]; + + +},{"../src/utils":23,"./es6-destructuring-visitors":27,"./es6-rest-param-visitors":30,"esprima-fb":9}],25:[function(_dereq_,module,exports){ +/** + * Copyright 2004-present Facebook. All Rights Reserved. + */ +/*global exports:true*/ + +/** + * Implements ES6 call spread. + * + * instance.method(a, b, c, ...d) + * + * instance.method.apply(instance, [a, b, c].concat(d)) + * + */ + +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + +function process(traverse, node, path, state) { + utils.move(node.range[0], state); + traverse(node, path, state); + utils.catchup(node.range[1], state); +} + +function visitCallSpread(traverse, node, path, state) { + utils.catchup(node.range[0], state); + + if (node.type === Syntax.NewExpression) { + // Input = new Set(1, 2, ...list) + // Output = new (Function.prototype.bind.apply(Set, [null, 1, 2].concat(list))) + utils.append('new (Function.prototype.bind.apply(', state); + process(traverse, node.callee, path, state); + } else if (node.callee.type === Syntax.MemberExpression) { + // Input = get().fn(1, 2, ...more) + // Output = (_ = get()).fn.apply(_, [1, 2].apply(more)) + var tempVar = utils.injectTempVar(state); + utils.append('(' + tempVar + ' = ', state); + process(traverse, node.callee.object, path, state); + utils.append(')', state); + if (node.callee.property.type === Syntax.Identifier) { + utils.append('.', state); + process(traverse, node.callee.property, path, state); + } else { + utils.append('[', state); + process(traverse, node.callee.property, path, state); + utils.append(']', state); + } + utils.append('.apply(' + tempVar, state); + } else { + // Input = max(1, 2, ...list) + // Output = max.apply(null, [1, 2].concat(list)) + var needsToBeWrappedInParenthesis = + node.callee.type === Syntax.FunctionDeclaration || + node.callee.type === Syntax.FunctionExpression; + if (needsToBeWrappedInParenthesis) { + utils.append('(', state); + } + process(traverse, node.callee, path, state); + if (needsToBeWrappedInParenthesis) { + utils.append(')', state); + } + utils.append('.apply(null', state); + } + utils.append(', ', state); + + var args = node.arguments.slice(); + var spread = args.pop(); + if (args.length || node.type === Syntax.NewExpression) { + utils.append('[', state); + if (node.type === Syntax.NewExpression) { + utils.append('null' + (args.length ? ', ' : ''), state); + } + while (args.length) { + var arg = args.shift(); + utils.move(arg.range[0], state); + traverse(arg, path, state); + if (args.length) { + utils.catchup(args[0].range[0], state); + } else { + utils.catchup(arg.range[1], state); + } + } + utils.append('].concat(', state); + process(traverse, spread.argument, path, state); + utils.append(')', state); + } else { + process(traverse, spread.argument, path, state); + } + utils.append(node.type === Syntax.NewExpression ? '))' : ')', state); + + utils.move(node.range[1], state); + return false; +} + +visitCallSpread.test = function(node, path, state) { + return ( + ( + node.type === Syntax.CallExpression || + node.type === Syntax.NewExpression + ) && + node.arguments.length > 0 && + node.arguments[node.arguments.length - 1].type === Syntax.SpreadElement + ); +}; + +exports.visitorList = [ + visitCallSpread +]; + +},{"../src/utils":23,"esprima-fb":9}],26:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint node:true*/ + +/** + * @typechecks + */ +'use strict'; + +var base62 = _dereq_('base62'); +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); +var reservedWordsHelper = _dereq_('./reserved-words-helper'); + +var declareIdentInLocalScope = utils.declareIdentInLocalScope; +var initScopeMetadata = utils.initScopeMetadata; + +var SUPER_PROTO_IDENT_PREFIX = '____SuperProtoOf'; + +var _anonClassUUIDCounter = 0; +var _mungedSymbolMaps = {}; + +function resetSymbols() { + _anonClassUUIDCounter = 0; + _mungedSymbolMaps = {}; +} + +/** + * Used to generate a unique class for use with code-gens for anonymous class + * expressions. + * + * @param {object} state + * @return {string} + */ +function _generateAnonymousClassName(state) { + var mungeNamespace = state.mungeNamespace || ''; + return '____Class' + mungeNamespace + base62.encode(_anonClassUUIDCounter++); +} + +/** + * Given an identifier name, munge it using the current state's mungeNamespace. + * + * @param {string} identName + * @param {object} state + * @return {string} + */ +function _getMungedName(identName, state) { + var mungeNamespace = state.mungeNamespace; + var shouldMinify = state.g.opts.minify; + + if (shouldMinify) { + if (!_mungedSymbolMaps[mungeNamespace]) { + _mungedSymbolMaps[mungeNamespace] = { + symbolMap: {}, + identUUIDCounter: 0 + }; + } + + var symbolMap = _mungedSymbolMaps[mungeNamespace].symbolMap; + if (!symbolMap[identName]) { + symbolMap[identName] = + base62.encode(_mungedSymbolMaps[mungeNamespace].identUUIDCounter++); + } + identName = symbolMap[identName]; + } + return '$' + mungeNamespace + identName; +} + +/** + * Extracts super class information from a class node. + * + * Information includes name of the super class and/or the expression string + * (if extending from an expression) + * + * @param {object} node + * @param {object} state + * @return {object} + */ +function _getSuperClassInfo(node, state) { + var ret = { + name: null, + expression: null + }; + if (node.superClass) { + if (node.superClass.type === Syntax.Identifier) { + ret.name = node.superClass.name; + } else { + // Extension from an expression + ret.name = _generateAnonymousClassName(state); + ret.expression = state.g.source.substring( + node.superClass.range[0], + node.superClass.range[1] + ); + } + } + return ret; +} + +/** + * Used with .filter() to find the constructor method in a list of + * MethodDefinition nodes. + * + * @param {object} classElement + * @return {boolean} + */ +function _isConstructorMethod(classElement) { + return classElement.type === Syntax.MethodDefinition && + classElement.key.type === Syntax.Identifier && + classElement.key.name === 'constructor'; +} + +/** + * @param {object} node + * @param {object} state + * @return {boolean} + */ +function _shouldMungeIdentifier(node, state) { + return ( + !!state.methodFuncNode && + !utils.getDocblock(state).hasOwnProperty('preventMunge') && + /^_(?!_)/.test(node.name) + ); +} + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitClassMethod(traverse, node, path, state) { + if (!state.g.opts.es5 && (node.kind === 'get' || node.kind === 'set')) { + throw new Error( + 'This transform does not support ' + node.kind + 'ter methods for ES6 ' + + 'classes. (line: ' + node.loc.start.line + ', col: ' + + node.loc.start.column + ')' + ); + } + state = utils.updateState(state, { + methodNode: node + }); + utils.catchup(node.range[0], state); + path.unshift(node); + traverse(node.value, path, state); + path.shift(); + return false; +} +visitClassMethod.test = function(node, path, state) { + return node.type === Syntax.MethodDefinition; +}; + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitClassFunctionExpression(traverse, node, path, state) { + var methodNode = path[0]; + var isGetter = methodNode.kind === 'get'; + var isSetter = methodNode.kind === 'set'; + + state = utils.updateState(state, { + methodFuncNode: node + }); + + if (methodNode.key.name === 'constructor') { + utils.append('function ' + state.className, state); + } else { + var methodAccessorComputed = false; + var methodAccessor; + var prototypeOrStatic = methodNode["static"] ? '' : '.prototype'; + var objectAccessor = state.className + prototypeOrStatic; + + if (methodNode.key.type === Syntax.Identifier) { + // foo() {} + methodAccessor = methodNode.key.name; + if (_shouldMungeIdentifier(methodNode.key, state)) { + methodAccessor = _getMungedName(methodAccessor, state); + } + if (isGetter || isSetter) { + methodAccessor = JSON.stringify(methodAccessor); + } else if (reservedWordsHelper.isReservedWord(methodAccessor)) { + methodAccessorComputed = true; + methodAccessor = JSON.stringify(methodAccessor); + } + } else if (methodNode.key.type === Syntax.Literal) { + // 'foo bar'() {} | get 'foo bar'() {} | set 'foo bar'() {} + methodAccessor = JSON.stringify(methodNode.key.value); + methodAccessorComputed = true; + } + + if (isSetter || isGetter) { + utils.append( + 'Object.defineProperty(' + + objectAccessor + ',' + + methodAccessor + ',' + + '{configurable:true,' + + methodNode.kind + ':function', + state + ); + } else { + if (state.g.opts.es3) { + if (methodAccessorComputed) { + methodAccessor = '[' + methodAccessor + ']'; + } else { + methodAccessor = '.' + methodAccessor; + } + utils.append( + objectAccessor + + methodAccessor + '=function' + (node.generator ? '*' : ''), + state + ); + } else { + if (!methodAccessorComputed) { + methodAccessor = JSON.stringify(methodAccessor); + } + utils.append( + 'Object.defineProperty(' + + objectAccessor + ',' + + methodAccessor + ',' + + '{writable:true,configurable:true,' + + 'value:function' + (node.generator ? '*' : ''), + state + ); + } + } + } + utils.move(methodNode.key.range[1], state); + utils.append('(', state); + + var params = node.params; + if (params.length > 0) { + utils.catchupNewlines(params[0].range[0], state); + for (var i = 0; i < params.length; i++) { + utils.catchup(node.params[i].range[0], state); + path.unshift(node); + traverse(params[i], path, state); + path.shift(); + } + } + + var closingParenPosition = utils.getNextSyntacticCharOffset(')', state); + utils.catchupWhiteSpace(closingParenPosition, state); + + var openingBracketPosition = utils.getNextSyntacticCharOffset('{', state); + utils.catchup(openingBracketPosition + 1, state); + + if (!state.scopeIsStrict) { + utils.append('"use strict";', state); + state = utils.updateState(state, { + scopeIsStrict: true + }); + } + utils.move(node.body.range[0] + '{'.length, state); + + path.unshift(node); + traverse(node.body, path, state); + path.shift(); + utils.catchup(node.body.range[1], state); + + if (methodNode.key.name !== 'constructor') { + if (isGetter || isSetter || !state.g.opts.es3) { + utils.append('})', state); + } + utils.append(';', state); + } + return false; +} +visitClassFunctionExpression.test = function(node, path, state) { + return node.type === Syntax.FunctionExpression + && path[0].type === Syntax.MethodDefinition; +}; + +function visitClassMethodParam(traverse, node, path, state) { + var paramName = node.name; + if (_shouldMungeIdentifier(node, state)) { + paramName = _getMungedName(node.name, state); + } + utils.append(paramName, state); + utils.move(node.range[1], state); +} +visitClassMethodParam.test = function(node, path, state) { + if (!path[0] || !path[1]) { + return; + } + + var parentFuncExpr = path[0]; + var parentClassMethod = path[1]; + + return parentFuncExpr.type === Syntax.FunctionExpression + && parentClassMethod.type === Syntax.MethodDefinition + && node.type === Syntax.Identifier; +}; + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function _renderClassBody(traverse, node, path, state) { + var className = state.className; + var superClass = state.superClass; + + // Set up prototype of constructor on same line as `extends` for line-number + // preservation. This relies on function-hoisting if a constructor function is + // defined in the class body. + if (superClass.name) { + // If the super class is an expression, we need to memoize the output of the + // expression into the generated class name variable and use that to refer + // to the super class going forward. Example: + // + // class Foo extends mixin(Bar, Baz) {} + // --transforms to-- + // function Foo() {} var ____Class0Blah = mixin(Bar, Baz); + if (superClass.expression !== null) { + utils.append( + 'var ' + superClass.name + '=' + superClass.expression + ';', + state + ); + } + + var keyName = superClass.name + '____Key'; + var keyNameDeclarator = ''; + if (!utils.identWithinLexicalScope(keyName, state)) { + keyNameDeclarator = 'var '; + declareIdentInLocalScope(keyName, initScopeMetadata(node), state); + } + utils.append( + 'for(' + keyNameDeclarator + keyName + ' in ' + superClass.name + '){' + + 'if(' + superClass.name + '.hasOwnProperty(' + keyName + ')){' + + className + '[' + keyName + ']=' + + superClass.name + '[' + keyName + '];' + + '}' + + '}', + state + ); + + var superProtoIdentStr = SUPER_PROTO_IDENT_PREFIX + superClass.name; + if (!utils.identWithinLexicalScope(superProtoIdentStr, state)) { + utils.append( + 'var ' + superProtoIdentStr + '=' + superClass.name + '===null?' + + 'null:' + superClass.name + '.prototype;', + state + ); + declareIdentInLocalScope(superProtoIdentStr, initScopeMetadata(node), state); + } + + utils.append( + className + '.prototype=Object.create(' + superProtoIdentStr + ');', + state + ); + utils.append( + className + '.prototype.constructor=' + className + ';', + state + ); + utils.append( + className + '.__superConstructor__=' + superClass.name + ';', + state + ); + } + + // If there's no constructor method specified in the class body, create an + // empty constructor function at the top (same line as the class keyword) + if (!node.body.body.filter(_isConstructorMethod).pop()) { + utils.append('function ' + className + '(){', state); + if (!state.scopeIsStrict) { + utils.append('"use strict";', state); + } + if (superClass.name) { + utils.append( + 'if(' + superClass.name + '!==null){' + + superClass.name + '.apply(this,arguments);}', + state + ); + } + utils.append('}', state); + } + + utils.move(node.body.range[0] + '{'.length, state); + traverse(node.body, path, state); + utils.catchupWhiteSpace(node.range[1], state); +} + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitClassDeclaration(traverse, node, path, state) { + var className = node.id.name; + var superClass = _getSuperClassInfo(node, state); + + state = utils.updateState(state, { + mungeNamespace: className, + className: className, + superClass: superClass + }); + + _renderClassBody(traverse, node, path, state); + + return false; +} +visitClassDeclaration.test = function(node, path, state) { + return node.type === Syntax.ClassDeclaration; +}; + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitClassExpression(traverse, node, path, state) { + var className = node.id && node.id.name || _generateAnonymousClassName(state); + var superClass = _getSuperClassInfo(node, state); + + utils.append('(function(){', state); + + state = utils.updateState(state, { + mungeNamespace: className, + className: className, + superClass: superClass + }); + + _renderClassBody(traverse, node, path, state); + + utils.append('return ' + className + ';})()', state); + return false; +} +visitClassExpression.test = function(node, path, state) { + return node.type === Syntax.ClassExpression; +}; + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitPrivateIdentifier(traverse, node, path, state) { + utils.append(_getMungedName(node.name, state), state); + utils.move(node.range[1], state); +} +visitPrivateIdentifier.test = function(node, path, state) { + if (node.type === Syntax.Identifier && _shouldMungeIdentifier(node, state)) { + // Always munge non-computed properties of MemberExpressions + // (a la preventing access of properties of unowned objects) + if (path[0].type === Syntax.MemberExpression && path[0].object !== node + && path[0].computed === false) { + return true; + } + + // Always munge identifiers that were declared within the method function + // scope + if (utils.identWithinLexicalScope(node.name, state, state.methodFuncNode)) { + return true; + } + + // Always munge private keys on object literals defined within a method's + // scope. + if (path[0].type === Syntax.Property + && path[1].type === Syntax.ObjectExpression) { + return true; + } + + // Always munge function parameters + if (path[0].type === Syntax.FunctionExpression + || path[0].type === Syntax.FunctionDeclaration + || path[0].type === Syntax.ArrowFunctionExpression) { + for (var i = 0; i < path[0].params.length; i++) { + if (path[0].params[i] === node) { + return true; + } + } + } + } + return false; +}; + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitSuperCallExpression(traverse, node, path, state) { + var superClassName = state.superClass.name; + + if (node.callee.type === Syntax.Identifier) { + if (_isConstructorMethod(state.methodNode)) { + utils.append(superClassName + '.call(', state); + } else { + var protoProp = SUPER_PROTO_IDENT_PREFIX + superClassName; + if (state.methodNode.key.type === Syntax.Identifier) { + protoProp += '.' + state.methodNode.key.name; + } else if (state.methodNode.key.type === Syntax.Literal) { + protoProp += '[' + JSON.stringify(state.methodNode.key.value) + ']'; + } + utils.append(protoProp + ".call(", state); + } + utils.move(node.callee.range[1], state); + } else if (node.callee.type === Syntax.MemberExpression) { + utils.append(SUPER_PROTO_IDENT_PREFIX + superClassName, state); + utils.move(node.callee.object.range[1], state); + + if (node.callee.computed) { + // ["a" + "b"] + utils.catchup(node.callee.property.range[1] + ']'.length, state); + } else { + // .ab + utils.append('.' + node.callee.property.name, state); + } + + utils.append('.call(', state); + utils.move(node.callee.range[1], state); + } + + utils.append('this', state); + if (node.arguments.length > 0) { + utils.append(',', state); + utils.catchupWhiteSpace(node.arguments[0].range[0], state); + traverse(node.arguments, path, state); + } + + utils.catchupWhiteSpace(node.range[1], state); + utils.append(')', state); + return false; +} +visitSuperCallExpression.test = function(node, path, state) { + if (state.superClass && node.type === Syntax.CallExpression) { + var callee = node.callee; + if (callee.type === Syntax.Identifier && callee.name === 'super' + || callee.type == Syntax.MemberExpression + && callee.object.name === 'super') { + return true; + } + } + return false; +}; + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitSuperMemberExpression(traverse, node, path, state) { + var superClassName = state.superClass.name; + + utils.append(SUPER_PROTO_IDENT_PREFIX + superClassName, state); + utils.move(node.object.range[1], state); +} +visitSuperMemberExpression.test = function(node, path, state) { + return state.superClass + && node.type === Syntax.MemberExpression + && node.object.type === Syntax.Identifier + && node.object.name === 'super'; +}; + +exports.resetSymbols = resetSymbols; + +exports.visitorList = [ + visitClassDeclaration, + visitClassExpression, + visitClassFunctionExpression, + visitClassMethod, + visitClassMethodParam, + visitPrivateIdentifier, + visitSuperCallExpression, + visitSuperMemberExpression +]; + +},{"../src/utils":23,"./reserved-words-helper":34,"base62":10,"esprima-fb":9}],27:[function(_dereq_,module,exports){ +/** + * Copyright 2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/*global exports:true*/ + +/** + * Implements ES6 destructuring assignment and pattern matchng. + * + * function init({port, ip, coords: [x, y]}) { + * return (x && y) ? {id, port} : {ip}; + * }; + * + * function init($__0) { + * var + * port = $__0.port, + * ip = $__0.ip, + * $__1 = $__0.coords, + * x = $__1[0], + * y = $__1[1]; + * return (x && y) ? {id, port} : {ip}; + * } + * + * var x, {ip, port} = init({ip, port}); + * + * var x, $__0 = init({ip, port}), ip = $__0.ip, port = $__0.port; + * + */ +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + +var reservedWordsHelper = _dereq_('./reserved-words-helper'); +var restParamVisitors = _dereq_('./es6-rest-param-visitors'); +var restPropertyHelpers = _dereq_('./es7-rest-property-helpers'); + +// ------------------------------------------------------- +// 1. Structured variable declarations. +// +// var [a, b] = [b, a]; +// var {x, y} = {y, x}; +// ------------------------------------------------------- + +function visitStructuredVariable(traverse, node, path, state) { + // Allocate new temp for the pattern. + utils.append(utils.getTempVar(state.localScope.tempVarIndex) + '=', state); + // Skip the pattern and assign the init to the temp. + utils.catchupWhiteSpace(node.init.range[0], state); + traverse(node.init, path, state); + utils.catchup(node.init.range[1], state); + // Render the destructured data. + utils.append(',' + getDestructuredComponents(node.id, state), state); + state.localScope.tempVarIndex++; + return false; +} + +visitStructuredVariable.test = function(node, path, state) { + return node.type === Syntax.VariableDeclarator && + isStructuredPattern(node.id); +}; + +function isStructuredPattern(node) { + return node.type === Syntax.ObjectPattern || + node.type === Syntax.ArrayPattern; +} + +// Main function which does actual recursive destructuring +// of nested complex structures. +function getDestructuredComponents(node, state) { + var tmpIndex = state.localScope.tempVarIndex; + var components = []; + var patternItems = getPatternItems(node); + + for (var idx = 0; idx < patternItems.length; idx++) { + var item = patternItems[idx]; + if (!item) { + continue; + } + + if (item.type === Syntax.SpreadElement) { + // Spread/rest of an array. + // TODO(dmitrys): support spread in the middle of a pattern + // and also for function param patterns: [x, ...xs, y] + components.push(item.argument.name + + '=Array.prototype.slice.call(' + + utils.getTempVar(tmpIndex) + ',' + idx + ')' + ); + continue; + } + + if (item.type === Syntax.SpreadProperty) { + var restExpression = restPropertyHelpers.renderRestExpression( + utils.getTempVar(tmpIndex), + patternItems + ); + components.push(item.argument.name + '=' + restExpression); + continue; + } + + // Depending on pattern type (Array or Object), we get + // corresponding pattern item parts. + var accessor = getPatternItemAccessor(node, item, tmpIndex, idx); + var value = getPatternItemValue(node, item); + + // TODO(dmitrys): implement default values: {x, y=5} + if (value.type === Syntax.Identifier) { + // Simple pattern item. + components.push(value.name + '=' + accessor); + } else { + // Complex sub-structure. + components.push( + utils.getTempVar(++state.localScope.tempVarIndex) + '=' + accessor + + ',' + getDestructuredComponents(value, state) + ); + } + } + + return components.join(','); +} + +function getPatternItems(node) { + return node.properties || node.elements; +} + +function getPatternItemAccessor(node, patternItem, tmpIndex, idx) { + var tmpName = utils.getTempVar(tmpIndex); + if (node.type === Syntax.ObjectPattern) { + if (reservedWordsHelper.isReservedWord(patternItem.key.name)) { + return tmpName + '["' + patternItem.key.name + '"]'; + } else if (patternItem.key.type === Syntax.Literal) { + return tmpName + '[' + JSON.stringify(patternItem.key.value) + ']'; + } else if (patternItem.key.type === Syntax.Identifier) { + return tmpName + '.' + patternItem.key.name; + } + } else if (node.type === Syntax.ArrayPattern) { + return tmpName + '[' + idx + ']'; + } +} + +function getPatternItemValue(node, patternItem) { + return node.type === Syntax.ObjectPattern + ? patternItem.value + : patternItem; +} + +// ------------------------------------------------------- +// 2. Assignment expression. +// +// [a, b] = [b, a]; +// ({x, y} = {y, x}); +// ------------------------------------------------------- + +function visitStructuredAssignment(traverse, node, path, state) { + var exprNode = node.expression; + utils.append('var ' + utils.getTempVar(state.localScope.tempVarIndex) + '=', state); + + utils.catchupWhiteSpace(exprNode.right.range[0], state); + traverse(exprNode.right, path, state); + utils.catchup(exprNode.right.range[1], state); + + utils.append( + ';' + getDestructuredComponents(exprNode.left, state) + ';', + state + ); + + utils.catchupWhiteSpace(node.range[1], state); + state.localScope.tempVarIndex++; + return false; +} + +visitStructuredAssignment.test = function(node, path, state) { + // We consider the expression statement rather than just assignment + // expression to cover case with object patters which should be + // wrapped in grouping operator: ({x, y} = {y, x}); + return node.type === Syntax.ExpressionStatement && + node.expression.type === Syntax.AssignmentExpression && + isStructuredPattern(node.expression.left); +}; + +// ------------------------------------------------------- +// 3. Structured parameter. +// +// function foo({x, y}) { ... } +// ------------------------------------------------------- + +function visitStructuredParameter(traverse, node, path, state) { + utils.append(utils.getTempVar(getParamIndex(node, path)), state); + utils.catchupWhiteSpace(node.range[1], state); + return true; +} + +function getParamIndex(paramNode, path) { + var funcNode = path[0]; + var tmpIndex = 0; + for (var k = 0; k < funcNode.params.length; k++) { + var param = funcNode.params[k]; + if (param === paramNode) { + break; + } + if (isStructuredPattern(param)) { + tmpIndex++; + } + } + return tmpIndex; +} + +visitStructuredParameter.test = function(node, path, state) { + return isStructuredPattern(node) && isFunctionNode(path[0]); +}; + +function isFunctionNode(node) { + return (node.type == Syntax.FunctionDeclaration || + node.type == Syntax.FunctionExpression || + node.type == Syntax.MethodDefinition || + node.type == Syntax.ArrowFunctionExpression); +} + +// ------------------------------------------------------- +// 4. Function body for structured parameters. +// +// function foo({x, y}) { x; y; } +// ------------------------------------------------------- + +function visitFunctionBodyForStructuredParameter(traverse, node, path, state) { + var funcNode = path[0]; + + utils.catchup(funcNode.body.range[0] + 1, state); + renderDestructuredComponents(funcNode, state); + + if (funcNode.rest) { + utils.append( + restParamVisitors.renderRestParamSetup(funcNode, state), + state + ); + } + + return true; +} + +function renderDestructuredComponents(funcNode, state) { + var destructuredComponents = []; + + for (var k = 0; k < funcNode.params.length; k++) { + var param = funcNode.params[k]; + if (isStructuredPattern(param)) { + destructuredComponents.push( + getDestructuredComponents(param, state) + ); + state.localScope.tempVarIndex++; + } + } + + if (destructuredComponents.length) { + utils.append('var ' + destructuredComponents.join(',') + ';', state); + } +} + +visitFunctionBodyForStructuredParameter.test = function(node, path, state) { + return node.type === Syntax.BlockStatement && isFunctionNode(path[0]); +}; + +exports.visitorList = [ + visitStructuredVariable, + visitStructuredAssignment, + visitStructuredParameter, + visitFunctionBodyForStructuredParameter +]; + +exports.renderDestructuredComponents = renderDestructuredComponents; + + +},{"../src/utils":23,"./es6-rest-param-visitors":30,"./es7-rest-property-helpers":32,"./reserved-words-helper":34,"esprima-fb":9}],28:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint node:true*/ + +/** + * Desugars concise methods of objects to function expressions. + * + * var foo = { + * method(x, y) { ... } + * }; + * + * var foo = { + * method: function(x, y) { ... } + * }; + * + */ + +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); +var reservedWordsHelper = _dereq_('./reserved-words-helper'); + +function visitObjectConciseMethod(traverse, node, path, state) { + var isGenerator = node.value.generator; + if (isGenerator) { + utils.catchupWhiteSpace(node.range[0] + 1, state); + } + if (node.computed) { // []() { ...} + utils.catchup(node.key.range[1] + 1, state); + } else if (reservedWordsHelper.isReservedWord(node.key.name)) { + utils.catchup(node.key.range[0], state); + utils.append('"', state); + utils.catchup(node.key.range[1], state); + utils.append('"', state); + } + + utils.catchup(node.key.range[1], state); + utils.append( + ':function' + (isGenerator ? '*' : ''), + state + ); + path.unshift(node); + traverse(node.value, path, state); + path.shift(); + return false; +} + +visitObjectConciseMethod.test = function(node, path, state) { + return node.type === Syntax.Property && + node.value.type === Syntax.FunctionExpression && + node.method === true; +}; + +exports.visitorList = [ + visitObjectConciseMethod +]; + +},{"../src/utils":23,"./reserved-words-helper":34,"esprima-fb":9}],29:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint node: true*/ + +/** + * Desugars ES6 Object Literal short notations into ES3 full notation. + * + * // Easier return values. + * function foo(x, y) { + * return {x, y}; // {x: x, y: y} + * }; + * + * // Destructuring. + * function init({port, ip, coords: {x, y}}) { ... } + * + */ +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + +/** + * @public + */ +function visitObjectLiteralShortNotation(traverse, node, path, state) { + utils.catchup(node.key.range[1], state); + utils.append(':' + node.key.name, state); + return false; +} + +visitObjectLiteralShortNotation.test = function(node, path, state) { + return node.type === Syntax.Property && + node.kind === 'init' && + node.shorthand === true && + path[0].type !== Syntax.ObjectPattern; +}; + +exports.visitorList = [ + visitObjectLiteralShortNotation +]; + + +},{"../src/utils":23,"esprima-fb":9}],30:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint node:true*/ + +/** + * Desugars ES6 rest parameters into an ES3 arguments array. + * + * function printf(template, ...args) { + * args.forEach(...); + * } + * + * We could use `Array.prototype.slice.call`, but that usage of arguments causes + * functions to be deoptimized in V8, so instead we use a for-loop. + * + * function printf(template) { + * for (var args = [], $__0 = 1, $__1 = arguments.length; $__0 < $__1; $__0++) + * args.push(arguments[$__0]); + * args.forEach(...); + * } + * + */ +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + + + +function _nodeIsFunctionWithRestParam(node) { + return (node.type === Syntax.FunctionDeclaration + || node.type === Syntax.FunctionExpression + || node.type === Syntax.ArrowFunctionExpression) + && node.rest; +} + +function visitFunctionParamsWithRestParam(traverse, node, path, state) { + if (node.parametricType) { + utils.catchup(node.parametricType.range[0], state); + path.unshift(node); + traverse(node.parametricType, path, state); + path.shift(); + } + + // Render params. + if (node.params.length) { + path.unshift(node); + traverse(node.params, path, state); + path.shift(); + } else { + // -3 is for ... of the rest. + utils.catchup(node.rest.range[0] - 3, state); + } + utils.catchupWhiteSpace(node.rest.range[1], state); + + path.unshift(node); + traverse(node.body, path, state); + path.shift(); + + return false; +} + +visitFunctionParamsWithRestParam.test = function(node, path, state) { + return _nodeIsFunctionWithRestParam(node); +}; + +function renderRestParamSetup(functionNode, state) { + var idx = state.localScope.tempVarIndex++; + var len = state.localScope.tempVarIndex++; + + return 'for (var ' + functionNode.rest.name + '=[],' + + utils.getTempVar(idx) + '=' + functionNode.params.length + ',' + + utils.getTempVar(len) + '=arguments.length;' + + utils.getTempVar(idx) + '<' + utils.getTempVar(len) + ';' + + utils.getTempVar(idx) + '++) ' + + functionNode.rest.name + '.push(arguments[' + utils.getTempVar(idx) + ']);'; +} + +function visitFunctionBodyWithRestParam(traverse, node, path, state) { + utils.catchup(node.range[0] + 1, state); + var parentNode = path[0]; + utils.append(renderRestParamSetup(parentNode, state), state); + return true; +} + +visitFunctionBodyWithRestParam.test = function(node, path, state) { + return node.type === Syntax.BlockStatement + && _nodeIsFunctionWithRestParam(path[0]); +}; + +exports.renderRestParamSetup = renderRestParamSetup; +exports.visitorList = [ + visitFunctionParamsWithRestParam, + visitFunctionBodyWithRestParam +]; + +},{"../src/utils":23,"esprima-fb":9}],31:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint node:true*/ + +/** + * @typechecks + */ +'use strict'; + +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + +/** + * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-12.1.9 + */ +function visitTemplateLiteral(traverse, node, path, state) { + var templateElements = node.quasis; + + utils.append('(', state); + for (var ii = 0; ii < templateElements.length; ii++) { + var templateElement = templateElements[ii]; + if (templateElement.value.raw !== '') { + utils.append(getCookedValue(templateElement), state); + if (!templateElement.tail) { + // + between element and substitution + utils.append(' + ', state); + } + // maintain line numbers + utils.move(templateElement.range[0], state); + utils.catchupNewlines(templateElement.range[1], state); + } else { // templateElement.value.raw === '' + // Concatenat adjacent substitutions, e.g. `${x}${y}`. Empty templates + // appear before the first and after the last element - nothing to add in + // those cases. + if (ii > 0 && !templateElement.tail) { + // + between substitution and substitution + utils.append(' + ', state); + } + } + + utils.move(templateElement.range[1], state); + if (!templateElement.tail) { + var substitution = node.expressions[ii]; + if (substitution.type === Syntax.Identifier || + substitution.type === Syntax.MemberExpression || + substitution.type === Syntax.CallExpression) { + utils.catchup(substitution.range[1], state); + } else { + utils.append('(', state); + traverse(substitution, path, state); + utils.catchup(substitution.range[1], state); + utils.append(')', state); + } + // if next templateElement isn't empty... + if (templateElements[ii + 1].value.cooked !== '') { + utils.append(' + ', state); + } + } + } + utils.move(node.range[1], state); + utils.append(')', state); + return false; +} + +visitTemplateLiteral.test = function(node, path, state) { + return node.type === Syntax.TemplateLiteral; +}; + +/** + * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-12.2.6 + */ +function visitTaggedTemplateExpression(traverse, node, path, state) { + var template = node.quasi; + var numQuasis = template.quasis.length; + + // print the tag + utils.move(node.tag.range[0], state); + traverse(node.tag, path, state); + utils.catchup(node.tag.range[1], state); + + // print array of template elements + utils.append('(function() { var siteObj = [', state); + for (var ii = 0; ii < numQuasis; ii++) { + utils.append(getCookedValue(template.quasis[ii]), state); + if (ii !== numQuasis - 1) { + utils.append(', ', state); + } + } + utils.append(']; siteObj.raw = [', state); + for (ii = 0; ii < numQuasis; ii++) { + utils.append(getRawValue(template.quasis[ii]), state); + if (ii !== numQuasis - 1) { + utils.append(', ', state); + } + } + utils.append( + ']; Object.freeze(siteObj.raw); Object.freeze(siteObj); return siteObj; }()', + state + ); + + // print substitutions + if (numQuasis > 1) { + for (ii = 0; ii < template.expressions.length; ii++) { + var expression = template.expressions[ii]; + utils.append(', ', state); + + // maintain line numbers by calling catchupWhiteSpace over the whole + // previous TemplateElement + utils.move(template.quasis[ii].range[0], state); + utils.catchupNewlines(template.quasis[ii].range[1], state); + + utils.move(expression.range[0], state); + traverse(expression, path, state); + utils.catchup(expression.range[1], state); + } + } + + // print blank lines to push the closing ) down to account for the final + // TemplateElement. + utils.catchupNewlines(node.range[1], state); + + utils.append(')', state); + + return false; +} + +visitTaggedTemplateExpression.test = function(node, path, state) { + return node.type === Syntax.TaggedTemplateExpression; +}; + +function getCookedValue(templateElement) { + return JSON.stringify(templateElement.value.cooked); +} + +function getRawValue(templateElement) { + return JSON.stringify(templateElement.value.raw); +} + +exports.visitorList = [ + visitTemplateLiteral, + visitTaggedTemplateExpression +]; + +},{"../src/utils":23,"esprima-fb":9}],32:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint node:true*/ + +/** + * Desugars ES7 rest properties into ES5 object iteration. + */ + +var Syntax = _dereq_('esprima-fb').Syntax; + +// TODO: This is a pretty massive helper, it should only be defined once, in the +// transform's runtime environment. We don't currently have a runtime though. +var restFunction = + '(function(source, exclusion) {' + + 'var rest = {};' + + 'var hasOwn = Object.prototype.hasOwnProperty;' + + 'if (source == null) {' + + 'throw new TypeError();' + + '}' + + 'for (var key in source) {' + + 'if (hasOwn.call(source, key) && !hasOwn.call(exclusion, key)) {' + + 'rest[key] = source[key];' + + '}' + + '}' + + 'return rest;' + + '})'; + +function getPropertyNames(properties) { + var names = []; + for (var i = 0; i < properties.length; i++) { + var property = properties[i]; + if (property.type === Syntax.SpreadProperty) { + continue; + } + if (property.type === Syntax.Identifier) { + names.push(property.name); + } else { + names.push(property.key.name); + } + } + return names; +} + +function getRestFunctionCall(source, exclusion) { + return restFunction + '(' + source + ',' + exclusion + ')'; +} + +function getSimpleShallowCopy(accessorExpression) { + // This could be faster with 'Object.assign({}, ' + accessorExpression + ')' + // but to unify code paths and avoid a ES6 dependency we use the same + // helper as for the exclusion case. + return getRestFunctionCall(accessorExpression, '{}'); +} + +function renderRestExpression(accessorExpression, excludedProperties) { + var excludedNames = getPropertyNames(excludedProperties); + if (!excludedNames.length) { + return getSimpleShallowCopy(accessorExpression); + } + return getRestFunctionCall( + accessorExpression, + '{' + excludedNames.join(':1,') + ':1}' + ); +} + +exports.renderRestExpression = renderRestExpression; + +},{"esprima-fb":9}],33:[function(_dereq_,module,exports){ +/** + * Copyright 2004-present Facebook. All Rights Reserved. + */ +/*global exports:true*/ + +/** + * Implements ES7 object spread property. + * https://gist.github.com/sebmarkbage/aa849c7973cb4452c547 + * + * { ...a, x: 1 } + * + * Object.assign({}, a, {x: 1 }) + * + */ + +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + +function visitObjectLiteralSpread(traverse, node, path, state) { + utils.catchup(node.range[0], state); + + utils.append('Object.assign({', state); + + // Skip the original { + utils.move(node.range[0] + 1, state); + + var previousWasSpread = false; + + for (var i = 0; i < node.properties.length; i++) { + var property = node.properties[i]; + if (property.type === Syntax.SpreadProperty) { + + // Close the previous object or initial object + if (!previousWasSpread) { + utils.append('}', state); + } + + if (i === 0) { + // Normally there will be a comma when we catch up, but not before + // the first property. + utils.append(',', state); + } + + utils.catchup(property.range[0], state); + + // skip ... + utils.move(property.range[0] + 3, state); + + traverse(property.argument, path, state); + + utils.catchup(property.range[1], state); + + previousWasSpread = true; + + } else { + + utils.catchup(property.range[0], state); + + if (previousWasSpread) { + utils.append('{', state); + } + + traverse(property, path, state); + + utils.catchup(property.range[1], state); + + previousWasSpread = false; + + } + } + + // Strip any non-whitespace between the last item and the end. + // We only catch up on whitespace so that we ignore any trailing commas which + // are stripped out for IE8 support. Unfortunately, this also strips out any + // trailing comments. + utils.catchupWhiteSpace(node.range[1] - 1, state); + + // Skip the trailing } + utils.move(node.range[1], state); + + if (!previousWasSpread) { + utils.append('}', state); + } + + utils.append(')', state); + return false; +} + +visitObjectLiteralSpread.test = function(node, path, state) { + if (node.type !== Syntax.ObjectExpression) { + return false; + } + // Tight loop optimization + var hasAtLeastOneSpreadProperty = false; + for (var i = 0; i < node.properties.length; i++) { + var property = node.properties[i]; + if (property.type === Syntax.SpreadProperty) { + hasAtLeastOneSpreadProperty = true; + } else if (property.kind !== 'init') { + return false; + } + } + return hasAtLeastOneSpreadProperty; +}; + +exports.visitorList = [ + visitObjectLiteralSpread +]; + +},{"../src/utils":23,"esprima-fb":9}],34:[function(_dereq_,module,exports){ +/** + * Copyright 2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var KEYWORDS = [ + 'break', 'do', 'in', 'typeof', 'case', 'else', 'instanceof', 'var', 'catch', + 'export', 'new', 'void', 'class', 'extends', 'return', 'while', 'const', + 'finally', 'super', 'with', 'continue', 'for', 'switch', 'yield', 'debugger', + 'function', 'this', 'default', 'if', 'throw', 'delete', 'import', 'try' +]; + +var FUTURE_RESERVED_WORDS = [ + 'enum', 'await', 'implements', 'package', 'protected', 'static', 'interface', + 'private', 'public' +]; + +var LITERALS = [ + 'null', + 'true', + 'false' +]; + +// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-reserved-words +var RESERVED_WORDS = [].concat( + KEYWORDS, + FUTURE_RESERVED_WORDS, + LITERALS +); + +var reservedWordsMap = Object.create(null); +RESERVED_WORDS.forEach(function(k) { + reservedWordsMap[k] = true; +}); + +/** + * This list should not grow as new reserved words are introdued. This list is + * of words that need to be quoted because ES3-ish browsers do not allow their + * use as identifier names. + */ +var ES3_FUTURE_RESERVED_WORDS = [ + 'enum', 'implements', 'package', 'protected', 'static', 'interface', + 'private', 'public' +]; + +var ES3_RESERVED_WORDS = [].concat( + KEYWORDS, + ES3_FUTURE_RESERVED_WORDS, + LITERALS +); + +var es3ReservedWordsMap = Object.create(null); +ES3_RESERVED_WORDS.forEach(function(k) { + es3ReservedWordsMap[k] = true; +}); + +exports.isReservedWord = function(word) { + return !!reservedWordsMap[word]; +}; + +exports.isES3ReservedWord = function(word) { + return !!es3ReservedWordsMap[word]; +}; + +},{}],35:[function(_dereq_,module,exports){ +/** + * Copyright 2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +/*global exports:true*/ + +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); +var reserverdWordsHelper = _dereq_('./reserved-words-helper'); + +/** + * Code adapted from https://github.com/spicyj/es3ify + * The MIT License (MIT) + * Copyright (c) 2014 Ben Alpert + */ + +function visitProperty(traverse, node, path, state) { + utils.catchup(node.key.range[0], state); + utils.append('"', state); + utils.catchup(node.key.range[1], state); + utils.append('"', state); + utils.catchup(node.value.range[0], state); + traverse(node.value, path, state); + return false; +} + +visitProperty.test = function(node) { + return node.type === Syntax.Property && + node.key.type === Syntax.Identifier && + !node.method && + !node.shorthand && + !node.computed && + reserverdWordsHelper.isES3ReservedWord(node.key.name); +}; + +function visitMemberExpression(traverse, node, path, state) { + traverse(node.object, path, state); + utils.catchup(node.property.range[0] - 1, state); + utils.append('[', state); + utils.catchupWhiteSpace(node.property.range[0], state); + utils.append('"', state); + utils.catchup(node.property.range[1], state); + utils.append('"]', state); + return false; +} + +visitMemberExpression.test = function(node) { + return node.type === Syntax.MemberExpression && + node.property.type === Syntax.Identifier && + reserverdWordsHelper.isES3ReservedWord(node.property.name); +}; + +exports.visitorList = [ + visitProperty, + visitMemberExpression +]; + +},{"../src/utils":23,"./reserved-words-helper":34,"esprima-fb":9}],36:[function(_dereq_,module,exports){ +var esprima = _dereq_('esprima-fb'); +var utils = _dereq_('../src/utils'); + +var Syntax = esprima.Syntax; + +function _isFunctionNode(node) { + return node.type === Syntax.FunctionDeclaration + || node.type === Syntax.FunctionExpression + || node.type === Syntax.ArrowFunctionExpression; +} + +function visitClassProperty(traverse, node, path, state) { + utils.catchup(node.range[0], state); + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitClassProperty.test = function(node, path, state) { + return node.type === Syntax.ClassProperty; +}; + +function visitTypeAlias(traverse, node, path, state) { + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitTypeAlias.test = function(node, path, state) { + return node.type === Syntax.TypeAlias; +}; + +function visitTypeCast(traverse, node, path, state) { + path.unshift(node); + traverse(node.expression, path, state); + path.shift(); + + utils.catchup(node.typeAnnotation.range[0], state); + utils.catchupWhiteOut(node.typeAnnotation.range[1], state); + return false; +} +visitTypeCast.test = function(node, path, state) { + return node.type === Syntax.TypeCastExpression; +}; + +function visitInterfaceDeclaration(traverse, node, path, state) { + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitInterfaceDeclaration.test = function(node, path, state) { + return node.type === Syntax.InterfaceDeclaration; +}; + +function visitDeclare(traverse, node, path, state) { + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitDeclare.test = function(node, path, state) { + switch (node.type) { + case Syntax.DeclareVariable: + case Syntax.DeclareFunction: + case Syntax.DeclareClass: + case Syntax.DeclareModule: + return true; + } + return false; +}; + +function visitFunctionParametricAnnotation(traverse, node, path, state) { + utils.catchup(node.range[0], state); + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitFunctionParametricAnnotation.test = function(node, path, state) { + return node.type === Syntax.TypeParameterDeclaration + && path[0] + && _isFunctionNode(path[0]) + && node === path[0].typeParameters; +}; + +function visitFunctionReturnAnnotation(traverse, node, path, state) { + utils.catchup(node.range[0], state); + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitFunctionReturnAnnotation.test = function(node, path, state) { + return path[0] && _isFunctionNode(path[0]) && node === path[0].returnType; +}; + +function visitOptionalFunctionParameterAnnotation(traverse, node, path, state) { + utils.catchup(node.range[0] + node.name.length, state); + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitOptionalFunctionParameterAnnotation.test = function(node, path, state) { + return node.type === Syntax.Identifier + && node.optional + && path[0] + && _isFunctionNode(path[0]); +}; + +function visitTypeAnnotatedIdentifier(traverse, node, path, state) { + utils.catchup(node.typeAnnotation.range[0], state); + utils.catchupWhiteOut(node.typeAnnotation.range[1], state); + return false; +} +visitTypeAnnotatedIdentifier.test = function(node, path, state) { + return node.type === Syntax.Identifier && node.typeAnnotation; +}; + +function visitTypeAnnotatedObjectOrArrayPattern(traverse, node, path, state) { + utils.catchup(node.typeAnnotation.range[0], state); + utils.catchupWhiteOut(node.typeAnnotation.range[1], state); + return false; +} +visitTypeAnnotatedObjectOrArrayPattern.test = function(node, path, state) { + var rightType = node.type === Syntax.ObjectPattern + || node.type === Syntax.ArrayPattern; + return rightType && node.typeAnnotation; +}; + +/** + * Methods cause trouble, since esprima parses them as a key/value pair, where + * the location of the value starts at the method body. For example + * { bar(x:number,...y:Array):number {} } + * is parsed as + * { bar: function(x: number, ...y:Array): number {} } + * except that the location of the FunctionExpression value is 40-something, + * which is the location of the function body. This means that by the time we + * visit the params, rest param, and return type organically, we've already + * catchup()'d passed them. + */ +function visitMethod(traverse, node, path, state) { + path.unshift(node); + traverse(node.key, path, state); + + path.unshift(node.value); + traverse(node.value.params, path, state); + node.value.rest && traverse(node.value.rest, path, state); + node.value.returnType && traverse(node.value.returnType, path, state); + traverse(node.value.body, path, state); + + path.shift(); + + path.shift(); + return false; +} + +visitMethod.test = function(node, path, state) { + return (node.type === "Property" && (node.method || node.kind === "set" || node.kind === "get")) + || (node.type === "MethodDefinition"); +}; + +function visitImportType(traverse, node, path, state) { + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitImportType.test = function(node, path, state) { + return node.type === 'ImportDeclaration' + && node.isType; +}; + +exports.visitorList = [ + visitClassProperty, + visitDeclare, + visitImportType, + visitInterfaceDeclaration, + visitFunctionParametricAnnotation, + visitFunctionReturnAnnotation, + visitMethod, + visitOptionalFunctionParameterAnnotation, + visitTypeAlias, + visitTypeCast, + visitTypeAnnotatedIdentifier, + visitTypeAnnotatedObjectOrArrayPattern +]; + +},{"../src/utils":23,"esprima-fb":9}],37:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ +/*global exports:true*/ +'use strict'; +var Syntax = _dereq_('jstransform').Syntax; +var utils = _dereq_('jstransform/src/utils'); + +function renderJSXLiteral(object, isLast, state, start, end) { + var lines = object.value.split(/\r\n|\n|\r/); + + if (start) { + utils.append(start, state); + } + + var lastNonEmptyLine = 0; + + lines.forEach(function(line, index) { + if (line.match(/[^ \t]/)) { + lastNonEmptyLine = index; + } + }); + + lines.forEach(function(line, index) { + var isFirstLine = index === 0; + var isLastLine = index === lines.length - 1; + var isLastNonEmptyLine = index === lastNonEmptyLine; + + // replace rendered whitespace tabs with spaces + var trimmedLine = line.replace(/\t/g, ' '); + + // trim whitespace touching a newline + if (!isFirstLine) { + trimmedLine = trimmedLine.replace(/^[ ]+/, ''); + } + if (!isLastLine) { + trimmedLine = trimmedLine.replace(/[ ]+$/, ''); + } + + if (!isFirstLine) { + utils.append(line.match(/^[ \t]*/)[0], state); + } + + if (trimmedLine || isLastNonEmptyLine) { + utils.append( + JSON.stringify(trimmedLine) + + (!isLastNonEmptyLine ? ' + \' \' +' : ''), + state); + + if (isLastNonEmptyLine) { + if (end) { + utils.append(end, state); + } + if (!isLast) { + utils.append(', ', state); + } + } + + // only restore tail whitespace if line had literals + if (trimmedLine && !isLastLine) { + utils.append(line.match(/[ \t]*$/)[0], state); + } + } + + if (!isLastLine) { + utils.append('\n', state); + } + }); + + utils.move(object.range[1], state); +} + +function renderJSXExpressionContainer(traverse, object, isLast, path, state) { + // Plus 1 to skip `{`. + utils.move(object.range[0] + 1, state); + utils.catchup(object.expression.range[0], state); + traverse(object.expression, path, state); + + if (!isLast && object.expression.type !== Syntax.JSXEmptyExpression) { + // If we need to append a comma, make sure to do so after the expression. + utils.catchup(object.expression.range[1], state, trimLeft); + utils.append(', ', state); + } + + // Minus 1 to skip `}`. + utils.catchup(object.range[1] - 1, state, trimLeft); + utils.move(object.range[1], state); + return false; +} + +function quoteAttrName(attr) { + // Quote invalid JS identifiers. + if (!/^[a-z_$][a-z\d_$]*$/i.test(attr)) { + return '"' + attr + '"'; + } + return attr; +} + +function trimLeft(value) { + return value.replace(/^[ ]+/, ''); +} + +exports.renderJSXExpressionContainer = renderJSXExpressionContainer; +exports.renderJSXLiteral = renderJSXLiteral; +exports.quoteAttrName = quoteAttrName; +exports.trimLeft = trimLeft; + +},{"jstransform":22,"jstransform/src/utils":23}],38:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ +/*global exports:true*/ +'use strict'; + +var Syntax = _dereq_('jstransform').Syntax; +var utils = _dereq_('jstransform/src/utils'); + +var renderJSXExpressionContainer = + _dereq_('./jsx').renderJSXExpressionContainer; +var renderJSXLiteral = _dereq_('./jsx').renderJSXLiteral; +var quoteAttrName = _dereq_('./jsx').quoteAttrName; + +var trimLeft = _dereq_('./jsx').trimLeft; + +/** + * Customized desugar processor for React JSX. Currently: + * + * => React.createElement(X, null) + * => React.createElement(X, {prop: '1'}, null) + * => React.createElement(X, {prop:'2'}, + * React.createElement(Y, null) + * ) + *
=> React.createElement("div", null) + */ + +/** + * Removes all non-whitespace/parenthesis characters + */ +var reNonWhiteParen = /([^\s\(\)])/g; +function stripNonWhiteParen(value) { + return value.replace(reNonWhiteParen, ''); +} + +var tagConvention = /^[a-z]|\-/; +function isTagName(name) { + return tagConvention.test(name); +} + +function visitReactTag(traverse, object, path, state) { + var openingElement = object.openingElement; + var nameObject = openingElement.name; + var attributesObject = openingElement.attributes; + + utils.catchup(openingElement.range[0], state, trimLeft); + + if (nameObject.type === Syntax.JSXNamespacedName && nameObject.namespace) { + throw new Error('Namespace tags are not supported. ReactJSX is not XML.'); + } + + // We assume that the React runtime is already in scope + utils.append('React.createElement(', state); + + if (nameObject.type === Syntax.JSXIdentifier && isTagName(nameObject.name)) { + utils.append('"' + nameObject.name + '"', state); + utils.move(nameObject.range[1], state); + } else { + // Use utils.catchup in this case so we can easily handle + // JSXMemberExpressions which look like Foo.Bar.Baz. This also handles + // JSXIdentifiers that aren't fallback tags. + utils.move(nameObject.range[0], state); + utils.catchup(nameObject.range[1], state); + } + + utils.append(', ', state); + + var hasAttributes = attributesObject.length; + + var hasAtLeastOneSpreadProperty = attributesObject.some(function(attr) { + return attr.type === Syntax.JSXSpreadAttribute; + }); + + // if we don't have any attributes, pass in null + if (hasAtLeastOneSpreadProperty) { + utils.append('React.__spread({', state); + } else if (hasAttributes) { + utils.append('{', state); + } else { + utils.append('null', state); + } + + // keep track of if the previous attribute was a spread attribute + var previousWasSpread = false; + + // write attributes + attributesObject.forEach(function(attr, index) { + var isLast = index === attributesObject.length - 1; + + if (attr.type === Syntax.JSXSpreadAttribute) { + // Close the previous object or initial object + if (!previousWasSpread) { + utils.append('}, ', state); + } + + // Move to the expression start, ignoring everything except parenthesis + // and whitespace. + utils.catchup(attr.range[0], state, stripNonWhiteParen); + // Plus 1 to skip `{`. + utils.move(attr.range[0] + 1, state); + utils.catchup(attr.argument.range[0], state, stripNonWhiteParen); + + traverse(attr.argument, path, state); + + utils.catchup(attr.argument.range[1], state); + + // Move to the end, ignoring parenthesis and the closing `}` + utils.catchup(attr.range[1] - 1, state, stripNonWhiteParen); + + if (!isLast) { + utils.append(', ', state); + } + + utils.move(attr.range[1], state); + + previousWasSpread = true; + + return; + } + + // If the next attribute is a spread, we're effective last in this object + if (!isLast) { + isLast = attributesObject[index + 1].type === Syntax.JSXSpreadAttribute; + } + + if (attr.name.namespace) { + throw new Error( + 'Namespace attributes are not supported. ReactJSX is not XML.'); + } + var name = attr.name.name; + + utils.catchup(attr.range[0], state, trimLeft); + + if (previousWasSpread) { + utils.append('{', state); + } + + utils.append(quoteAttrName(name), state); + utils.append(': ', state); + + if (!attr.value) { + state.g.buffer += 'true'; + state.g.position = attr.name.range[1]; + if (!isLast) { + utils.append(', ', state); + } + } else { + utils.move(attr.name.range[1], state); + // Use catchupNewlines to skip over the '=' in the attribute + utils.catchupNewlines(attr.value.range[0], state); + if (attr.value.type === Syntax.Literal) { + renderJSXLiteral(attr.value, isLast, state); + } else { + renderJSXExpressionContainer(traverse, attr.value, isLast, path, state); + } + } + + utils.catchup(attr.range[1], state, trimLeft); + + previousWasSpread = false; + + }); + + if (!openingElement.selfClosing) { + utils.catchup(openingElement.range[1] - 1, state, trimLeft); + utils.move(openingElement.range[1], state); + } + + if (hasAttributes && !previousWasSpread) { + utils.append('}', state); + } + + if (hasAtLeastOneSpreadProperty) { + utils.append(')', state); + } + + // filter out whitespace + var childrenToRender = object.children.filter(function(child) { + return !(child.type === Syntax.Literal + && typeof child.value === 'string' + && child.value.match(/^[ \t]*[\r\n][ \t\r\n]*$/)); + }); + if (childrenToRender.length > 0) { + var lastRenderableIndex; + + childrenToRender.forEach(function(child, index) { + if (child.type !== Syntax.JSXExpressionContainer || + child.expression.type !== Syntax.JSXEmptyExpression) { + lastRenderableIndex = index; + } + }); + + if (lastRenderableIndex !== undefined) { + utils.append(', ', state); + } + + childrenToRender.forEach(function(child, index) { + utils.catchup(child.range[0], state, trimLeft); + + var isLast = index >= lastRenderableIndex; + + if (child.type === Syntax.Literal) { + renderJSXLiteral(child, isLast, state); + } else if (child.type === Syntax.JSXExpressionContainer) { + renderJSXExpressionContainer(traverse, child, isLast, path, state); + } else { + traverse(child, path, state); + if (!isLast) { + utils.append(', ', state); + } + } + + utils.catchup(child.range[1], state, trimLeft); + }); + } + + if (openingElement.selfClosing) { + // everything up to /> + utils.catchup(openingElement.range[1] - 2, state, trimLeft); + utils.move(openingElement.range[1], state); + } else { + // everything up to + utils.catchup(object.closingElement.range[0], state, trimLeft); + utils.move(object.closingElement.range[1], state); + } + + utils.append(')', state); + return false; +} + +visitReactTag.test = function(object, path, state) { + return object.type === Syntax.JSXElement; +}; + +exports.visitorList = [ + visitReactTag +]; + +},{"./jsx":37,"jstransform":22,"jstransform/src/utils":23}],39:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ +/*global exports:true*/ +'use strict'; + +var Syntax = _dereq_('jstransform').Syntax; +var utils = _dereq_('jstransform/src/utils'); + +function addDisplayName(displayName, object, state) { + if (object && + object.type === Syntax.CallExpression && + object.callee.type === Syntax.MemberExpression && + object.callee.object.type === Syntax.Identifier && + object.callee.object.name === 'React' && + object.callee.property.type === Syntax.Identifier && + object.callee.property.name === 'createClass' && + object.arguments.length === 1 && + object.arguments[0].type === Syntax.ObjectExpression) { + // Verify that the displayName property isn't already set + var properties = object.arguments[0].properties; + var safe = properties.every(function(property) { + var value = property.key.type === Syntax.Identifier ? + property.key.name : + property.key.value; + return value !== 'displayName'; + }); + + if (safe) { + utils.catchup(object.arguments[0].range[0] + 1, state); + utils.append('displayName: "' + displayName + '",', state); + } + } +} + +/** + * Transforms the following: + * + * var MyComponent = React.createClass({ + * render: ... + * }); + * + * into: + * + * var MyComponent = React.createClass({ + * displayName: 'MyComponent', + * render: ... + * }); + * + * Also catches: + * + * MyComponent = React.createClass(...); + * exports.MyComponent = React.createClass(...); + * module.exports = {MyComponent: React.createClass(...)}; + */ +function visitReactDisplayName(traverse, object, path, state) { + var left, right; + + if (object.type === Syntax.AssignmentExpression) { + left = object.left; + right = object.right; + } else if (object.type === Syntax.Property) { + left = object.key; + right = object.value; + } else if (object.type === Syntax.VariableDeclarator) { + left = object.id; + right = object.init; + } + + if (left && left.type === Syntax.MemberExpression) { + left = left.property; + } + if (left && left.type === Syntax.Identifier) { + addDisplayName(left.name, right, state); + } +} + +visitReactDisplayName.test = function(object, path, state) { + return ( + object.type === Syntax.AssignmentExpression || + object.type === Syntax.Property || + object.type === Syntax.VariableDeclarator + ); +}; + +exports.visitorList = [ + visitReactDisplayName +]; + +},{"jstransform":22,"jstransform/src/utils":23}],40:[function(_dereq_,module,exports){ +/*global exports:true*/ + +'use strict'; + +var es6ArrowFunctions = + _dereq_('jstransform/visitors/es6-arrow-function-visitors'); +var es6Classes = _dereq_('jstransform/visitors/es6-class-visitors'); +var es6Destructuring = + _dereq_('jstransform/visitors/es6-destructuring-visitors'); +var es6ObjectConciseMethod = + _dereq_('jstransform/visitors/es6-object-concise-method-visitors'); +var es6ObjectShortNotation = + _dereq_('jstransform/visitors/es6-object-short-notation-visitors'); +var es6RestParameters = _dereq_('jstransform/visitors/es6-rest-param-visitors'); +var es6Templates = _dereq_('jstransform/visitors/es6-template-visitors'); +var es6CallSpread = + _dereq_('jstransform/visitors/es6-call-spread-visitors'); +var es7SpreadProperty = + _dereq_('jstransform/visitors/es7-spread-property-visitors'); +var react = _dereq_('./transforms/react'); +var reactDisplayName = _dereq_('./transforms/reactDisplayName'); +var reservedWords = _dereq_('jstransform/visitors/reserved-words-visitors'); + +/** + * Map from transformName => orderedListOfVisitors. + */ +var transformVisitors = { + 'es6-arrow-functions': es6ArrowFunctions.visitorList, + 'es6-classes': es6Classes.visitorList, + 'es6-destructuring': es6Destructuring.visitorList, + 'es6-object-concise-method': es6ObjectConciseMethod.visitorList, + 'es6-object-short-notation': es6ObjectShortNotation.visitorList, + 'es6-rest-params': es6RestParameters.visitorList, + 'es6-templates': es6Templates.visitorList, + 'es6-call-spread': es6CallSpread.visitorList, + 'es7-spread-property': es7SpreadProperty.visitorList, + 'react': react.visitorList.concat(reactDisplayName.visitorList), + 'reserved-words': reservedWords.visitorList +}; + +var transformSets = { + 'harmony': [ + 'es6-arrow-functions', + 'es6-object-concise-method', + 'es6-object-short-notation', + 'es6-classes', + 'es6-rest-params', + 'es6-templates', + 'es6-destructuring', + 'es6-call-spread', + 'es7-spread-property' + ], + 'es3': [ + 'reserved-words' + ], + 'react': [ + 'react' + ] +}; + +/** + * Specifies the order in which each transform should run. + */ +var transformRunOrder = [ + 'reserved-words', + 'es6-arrow-functions', + 'es6-object-concise-method', + 'es6-object-short-notation', + 'es6-classes', + 'es6-rest-params', + 'es6-templates', + 'es6-destructuring', + 'es6-call-spread', + 'es7-spread-property', + 'react' +]; + +/** + * Given a list of transform names, return the ordered list of visitors to be + * passed to the transform() function. + * + * @param {array?} excludes + * @return {array} + */ +function getAllVisitors(excludes) { + var ret = []; + for (var i = 0, il = transformRunOrder.length; i < il; i++) { + if (!excludes || excludes.indexOf(transformRunOrder[i]) === -1) { + ret = ret.concat(transformVisitors[transformRunOrder[i]]); + } + } + return ret; +} + +/** + * Given a list of visitor set names, return the ordered list of visitors to be + * passed to jstransform. + * + * @param {array} + * @return {array} + */ +function getVisitorsBySet(sets) { + var visitorsToInclude = sets.reduce(function(visitors, set) { + if (!transformSets.hasOwnProperty(set)) { + throw new Error('Unknown visitor set: ' + set); + } + transformSets[set].forEach(function(visitor) { + visitors[visitor] = true; + }); + return visitors; + }, {}); + + var visitorList = []; + for (var i = 0; i < transformRunOrder.length; i++) { + if (visitorsToInclude.hasOwnProperty(transformRunOrder[i])) { + visitorList = visitorList.concat(transformVisitors[transformRunOrder[i]]); + } + } + + return visitorList; +} + +exports.getVisitorsBySet = getVisitorsBySet; +exports.getAllVisitors = getAllVisitors; +exports.transformVisitors = transformVisitors; + +},{"./transforms/react":38,"./transforms/reactDisplayName":39,"jstransform/visitors/es6-arrow-function-visitors":24,"jstransform/visitors/es6-call-spread-visitors":25,"jstransform/visitors/es6-class-visitors":26,"jstransform/visitors/es6-destructuring-visitors":27,"jstransform/visitors/es6-object-concise-method-visitors":28,"jstransform/visitors/es6-object-short-notation-visitors":29,"jstransform/visitors/es6-rest-param-visitors":30,"jstransform/visitors/es6-template-visitors":31,"jstransform/visitors/es7-spread-property-visitors":33,"jstransform/visitors/reserved-words-visitors":35}],41:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +'use strict'; +/*eslint-disable no-undef*/ +var Buffer = _dereq_('buffer').Buffer; + +function inlineSourceMap(sourceMap, sourceCode, sourceFilename) { + // This can be used with a sourcemap that has already has toJSON called on it. + // Check first. + var json = sourceMap; + if (typeof sourceMap.toJSON === 'function') { + json = sourceMap.toJSON(); + } + json.sources = [sourceFilename]; + json.sourcesContent = [sourceCode]; + var base64 = Buffer(JSON.stringify(json)).toString('base64'); + return '//# sourceMappingURL=data:application/json;base64,' + base64; +} + +module.exports = inlineSourceMap; + +},{"buffer":3}]},{},[1])(1) +}); \ No newline at end of file diff --git a/public/javascripts/wechat/browser.min.js b/public/javascripts/wechat/browser.min.js new file mode 100644 index 000000000..7566e1a59 --- /dev/null +++ b/public/javascripts/wechat/browser.min.js @@ -0,0 +1,44 @@ + +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.babel=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};util.inherits(assert.AssertionError,Error);function replacer(key,value){if(util.isUndefined(value)){return""+value}if(util.isNumber(value)&&!isFinite(value)){return value.toString()}if(util.isFunction(value)||util.isRegExp(value)){return value.toString()}return value}function truncate(s,n){if(util.isString(s)){return s.length=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};assert.notStrictEqual=function notStrictEqual(actual,expected,message){if(actual===expected){fail(actual,expected,message,"!==",assert.notStrictEqual)}};function expectedException(actual,expected){if(!actual||!expected){return false}if(Object.prototype.toString.call(expected)=="[object RegExp]"){return expected.test(actual)}else if(actual instanceof expected){return true}else if(expected.call({},actual)===true){return true}return false}function _throws(shouldThrow,block,expected,message){var actual;if(util.isString(expected)){message=expected;expected=null}try{block()}catch(e){actual=e}message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:".");if(shouldThrow&&!actual){fail(actual,expected,"Missing expected exception"+message)}if(!shouldThrow&&expectedException(actual,expected)){fail(actual,expected,"Got unwanted exception"+message)}if(shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual){throw actual}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,message){_throws.apply(this,[false].concat(pSlice.call(arguments)))};assert.ifError=function(err){if(err){throw err}};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){if(hasOwn.call(obj,key))keys.push(key)}return keys}},{"util/":30}],3:[function(require,module,exports){arguments[4][1][0].apply(exports,arguments)},{dup:1}],4:[function(require,module,exports){var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("is-array");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){function Bar(){}try{var arr=new Uint8Array(1);arr.foo=function(){return 42};arr.constructor=Bar;return arr.foo()===42&&arr.constructor===Bar&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}();function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Buffer(arg){if(!(this instanceof Buffer)){if(arguments.length>1)return new Buffer(arg,arguments[1]);return new Buffer(arg)}this.length=0;this.parent=undefined;if(typeof arg==="number"){return fromNumber(this,arg)}if(typeof arg==="string"){return fromString(this,arg,arguments.length>1?arguments[1]:"utf8")}return fromObject(this,arg)}function fromNumber(that,length){that=allocate(that,length<0?0:checked(length)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i>>1;if(fromPool)that.parent=rootParent;return that}function checked(length){if(length>=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;var i=0;var len=Math.min(x,y);while(i>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined;function slowToString(encoding,start,end){var loweredCase=false;start=start|0;end=end===undefined||end===Infinity?this.length:end|0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype.toString=function toString(){var length=this.length|0;if(length===0)return"";if(arguments.length===0)return utf8Slice(this,0,length);return slowToString.apply(this,arguments)};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.indexOf=function indexOf(val,byteOffset){if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset>>=0;if(this.length===0)return-1;if(byteOffset>=this.length)return-1;if(byteOffset<0)byteOffset=Math.max(this.length+byteOffset,0);if(typeof val==="string"){if(val.length===0)return-1;return String.prototype.indexOf.call(this,val,byteOffset)}if(Buffer.isBuffer(val)){return arrayIndexOf(this,val,byteOffset)}if(typeof val==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,val,byteOffset)}return arrayIndexOf(this,[val],byteOffset)}function arrayIndexOf(arr,val,byteOffset){var foundIndex=-1;for(var i=0;byteOffset+iremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"binary":return binaryWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){var res="";var tmp="";end=Math.min(buf.length,end);for(var i=start;ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||valuebuf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||valuebuf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=0;i--){target[i+targetStart]=this[i+start]}}else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i55295&&codePoint<57344){if(leadSurrogate){if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}else{codePoint=leadSurrogate-55296<<10|codePoint-56320|65536;leadSurrogate=null}}else{if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}else{leadSurrogate=codePoint;continue}}}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null}if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<2097152){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}},{"base64-js":5,ieee754:6,"is-array":7}],5:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],6:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],7:[function(require,module,exports){var isArray=Array.isArray;var str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],8:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}throw TypeError('Uncaught, unspecified "error" event.')}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:len=arguments.length;args=new Array(len-1);for(i=1;i0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-->0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1)}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else{while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.listenerCount=function(emitter,type){var ret;if(!emitter._events||!emitter._events[type])ret=0;else if(isFunction(emitter._events[type]))ret=1;else ret=emitter._events[type].length;return ret};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],9:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],10:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],11:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i1){for(var i=1;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(!addToFront)state.reading=false;if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(n===null||isNaN(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else{return state.length}}return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(typeof n!=="number"||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(ret!==null)this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==null&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;processNextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}}function forEach(xs,f){for(var i=0,l=xs.length;i-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string"){chunk=new Buffer(chunk,encoding)}return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding);if(Buffer.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:4}],28:[function(require,module,exports){exports.isatty=function(){return false};function ReadStream(){throw new Error("tty.ReadStream is not implemented")}exports.ReadStream=ReadStream;function WriteStream(){throw new Error("tty.ReadStream is not implemented")}exports.WriteStream=WriteStream},{}],29:[function(require,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],30:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i-1){if(array){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=require("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":29,_process:12,inherits:9}],31:[function(require,module,exports){(function(global){"use strict";require("./node");var transform=module.exports=require("../transformation");transform.options=require("../transformation/file/options");transform.version=require("../../package").version;transform.transform=transform;transform.run=function(code){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];opts.sourceMaps="inline";return new Function(transform(code,opts).code)()};transform.load=function(url,callback,opts,hold){if(opts===undefined)opts={};opts.filename=opts.filename||url;var xhr=global.ActiveXObject?new global.ActiveXObject("Microsoft.XMLHTTP"):new global.XMLHttpRequest;xhr.open("GET",url,true);if("overrideMimeType"in xhr)xhr.overrideMimeType("text/plain");xhr.onreadystatechange=function(){if(xhr.readyState!==4)return;var status=xhr.status;if(status===0||status===200){var param=[xhr.responseText,opts];if(!hold)transform.run.apply(transform,param);if(callback)callback(param)}else{throw new Error("Could not load "+url)}};xhr.send(null)};var runScripts=function runScripts(){var scripts=[];var types=["text/ecmascript-6","text/6to5","text/babel","module"];var index=0;var exec=function exec(){var param=scripts[index];if(param instanceof Array){transform.run.apply(transform,param);index++;exec()}};var run=function run(script,i){var opts={};if(script.src){transform.load(script.src,function(param){scripts[i]=param;exec()},opts,true)}else{opts.filename="embedded";scripts[i]=[script.innerHTML,opts]}};var _scripts=global.document.getElementsByTagName("script");for(var i=0;i<_scripts.length;++i){var _script=_scripts[i];if(types.indexOf(_script.type)>=0)scripts.push(_script)}for(i in scripts){run(scripts[i],i)}exec()};if(global.addEventListener){global.addEventListener("DOMContentLoaded",runScripts,false)}else if(global.attachEvent){global.attachEvent("onload",runScripts)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../../package":631,"../transformation":83,"../transformation/file/options":66,"./node":32}],32:[function(require,module,exports){"use strict";exports.__esModule=true;exports.register=register;exports.polyfill=polyfill;exports.transformFile=transformFile;exports.transformFileSync=transformFileSync;exports.parse=parse;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashLangIsFunction=require("lodash/lang/isFunction");var _lodashLangIsFunction2=_interopRequireDefault(_lodashLangIsFunction);var _transformation=require("../transformation");var _transformation2=_interopRequireDefault(_transformation);var _babylon=require("babylon");var babylon=_interopRequireWildcard(_babylon);var _util=require("../util");var util=_interopRequireWildcard(_util);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _types=require("../types");var t=_interopRequireWildcard(_types);exports.util=util;exports.acorn=babylon;exports.transform=_transformation2["default"];exports.pipeline=_transformation.pipeline;exports.canCompile=_util.canCompile;var _transformationFile=require("../transformation/file");exports.File=_interopRequire(_transformationFile);var _transformationFileOptionsConfig=require("../transformation/file/options/config");exports.options=_interopRequire(_transformationFileOptionsConfig);var _transformationPlugin=require("../transformation/plugin");exports.Plugin=_interopRequire(_transformationPlugin);var _transformationTransformer=require("../transformation/transformer");exports.Transformer=_interopRequire(_transformationTransformer);var _transformationPipeline=require("../transformation/pipeline");exports.Pipeline=_interopRequire(_transformationPipeline);var _traversal=require("../traversal");exports.traverse=_interopRequire(_traversal);var _toolsBuildExternalHelpers=require("../tools/build-external-helpers");exports.buildExternalHelpers=_interopRequire(_toolsBuildExternalHelpers);var _package=require("../../package");exports.version=_package.version; +exports.types=t;function register(opts){var callback=require("./register/node-polyfill");if(opts!=null)callback(opts);return callback}function polyfill(){require("../polyfill")}function transformFile(filename,opts,callback){if(_lodashLangIsFunction2["default"](opts)){callback=opts;opts={}}opts.filename=filename;_fs2["default"].readFile(filename,function(err,code){if(err)return callback(err);var result;try{result=_transformation2["default"](code,opts)}catch(err){return callback(err)}callback(null,result)})}function transformFileSync(filename){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];opts.filename=filename;return _transformation2["default"](_fs2["default"].readFileSync(filename,"utf8"),opts)}function parse(code){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];opts.allowHashBang=true;opts.sourceType="module";opts.ecmaVersion=Infinity;opts.plugins={jsx:true,flow:true};opts.features={};for(var key in _transformation2["default"].pipeline.transformers){opts.features[key]=true}var ast=babylon.parse(code,opts);if(opts.onToken){var _opts$onToken;(_opts$onToken=opts.onToken).push.apply(_opts$onToken,ast.tokens)}if(opts.onComment){var _opts$onComment;(_opts$onComment=opts.onComment).push.apply(_opts$onComment,ast.comments)}return ast.program}},{"../../package":631,"../polyfill":61,"../tools/build-external-helpers":62,"../transformation":83,"../transformation/file":63,"../transformation/file/options/config":65,"../transformation/pipeline":97,"../transformation/plugin":99,"../transformation/transformer":100,"../traversal":165,"../types":196,"../util":199,"./register/node-polyfill":34,babylon:633,fs:1,"lodash/lang/isFunction":526}],33:[function(require,module,exports){"use strict";exports.__esModule=true;require("../../polyfill");exports["default"]=function(){};module.exports=exports["default"]},{"../../polyfill":61}],34:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}require("../../polyfill");var _node=require("./node");exports["default"]=_interopRequire(_node);module.exports=exports["default"]},{"../../polyfill":61,"./node":33}],35:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _trimRight=require("trim-right");var _trimRight2=_interopRequireDefault(_trimRight);var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var Buffer=function(){function Buffer(position,format){_classCallCheck(this,Buffer);this.parenPushNewlineState=null;this.position=position;this._indent=format.indent.base;this.format=format;this.buf=""}Buffer.prototype.get=function get(){return _trimRight2["default"](this.buf)};Buffer.prototype.getIndent=function getIndent(){if(this.format.compact||this.format.concise){return""}else{return _repeating2["default"](this.format.indent.style,this._indent)}};Buffer.prototype.indentSize=function indentSize(){return this.getIndent().length};Buffer.prototype.indent=function indent(){this._indent++};Buffer.prototype.dedent=function dedent(){this._indent--};Buffer.prototype.semicolon=function semicolon(){this.push(";")};Buffer.prototype.ensureSemicolon=function ensureSemicolon(){if(!this.isLast(";"))this.semicolon()};Buffer.prototype.rightBrace=function rightBrace(){this.newline(true);this.push("}")};Buffer.prototype.keyword=function keyword(name){this.push(name);this.space()};Buffer.prototype.space=function space(force){if(!force&&this.format.compact)return;if(force||this.buf&&!this.isLast(" ")&&!this.isLast("\n")){this.push(" ")}};Buffer.prototype.removeLast=function removeLast(cha){if(this.format.compact)return;if(!this.isLast(cha))return;this.buf=this.buf.substr(0,this.buf.length-1);this.position.unshift(cha)};Buffer.prototype.startTerminatorless=function startTerminatorless(){return this.parenPushNewlineState={printed:false}};Buffer.prototype.endTerminatorless=function endTerminatorless(state){if(state.printed){this.dedent();this.newline();this.push(")")}};Buffer.prototype.newline=function newline(i,removeLast){if(this.format.compact||this.format.retainLines)return;if(this.format.concise){this.space();return}removeLast=removeLast||false;if(_lodashLangIsNumber2["default"](i)){i=Math.min(2,i);if(this.endsWith("{\n")||this.endsWith(":\n"))i--;if(i<=0)return;while(i>0){this._newline(removeLast);i--}return}if(_lodashLangIsBoolean2["default"](i)){removeLast=i}this._newline(removeLast)};Buffer.prototype._newline=function _newline(removeLast){if(this.endsWith("\n\n"))return;if(removeLast&&this.isLast("\n"))this.removeLast("\n");this.removeLast(" ");this._removeSpacesAfterLastNewline();this._push("\n")};Buffer.prototype._removeSpacesAfterLastNewline=function _removeSpacesAfterLastNewline(){var lastNewlineIndex=this.buf.lastIndexOf("\n");if(lastNewlineIndex===-1){return}var index=this.buf.length-1;while(index>lastNewlineIndex){if(this.buf[index]!==" "){break}index--}if(index===lastNewlineIndex){this.buf=this.buf.substring(0,index+1)}};Buffer.prototype.push=function push(str,noIndent){if(!this.format.compact&&this._indent&&!noIndent&&str!=="\n"){var indent=this.getIndent();str=str.replace(/\n/g,"\n"+indent);if(this.isLast("\n"))this._push(indent)}this._push(str)};Buffer.prototype._push=function _push(str){var parenPushNewlineState=this.parenPushNewlineState;if(parenPushNewlineState){for(var i=0;i")}this.space();print.plain(node.returnType)}function FunctionTypeParam(node,print){print.plain(node.name);if(node.optional)this.push("?");this.push(":");this.space();print.plain(node.typeAnnotation)}function InterfaceExtends(node,print){print.plain(node.id);print.plain(node.typeParameters)}exports.ClassImplements=InterfaceExtends;exports.GenericTypeAnnotation=InterfaceExtends;function _interfaceish(node,print){print.plain(node.id);print.plain(node.typeParameters);if(node["extends"].length){this.push(" extends ");print.join(node["extends"],{separator:", "})}this.space();print.plain(node.body)}function InterfaceDeclaration(node,print){this.push("interface ");this._interfaceish(node,print)}function IntersectionTypeAnnotation(node,print){print.join(node.types,{separator:" & "})}function MixedTypeAnnotation(){this.push("mixed")}function NullableTypeAnnotation(node,print){this.push("?");print.plain(node.typeAnnotation)}var _types2=require("./types");exports.NumberLiteralTypeAnnotation=_types2.Literal;function NumberTypeAnnotation(){this.push("number")}function StringLiteralTypeAnnotation(node){this.push(this._stringLiteral(node.value))}function StringTypeAnnotation(){this.push("string")}function TupleTypeAnnotation(node,print){this.push("[");print.join(node.types,{separator:", "});this.push("]")}function TypeofTypeAnnotation(node,print){this.push("typeof ");print.plain(node.argument)}function TypeAlias(node,print){this.push("type ");print.plain(node.id);print.plain(node.typeParameters);this.space();this.push("=");this.space();print.plain(node.right);this.semicolon()}function TypeAnnotation(node,print){this.push(":");this.space();if(node.optional)this.push("?");print.plain(node.typeAnnotation)}function TypeParameterInstantiation(node,print){this.push("<");print.join(node.params,{separator:", ",iterator:function iterator(node){print.plain(node.typeAnnotation)}});this.push(">")}exports.TypeParameterDeclaration=TypeParameterInstantiation;function ObjectTypeAnnotation(node,print){var _this=this;this.push("{");var props=node.properties.concat(node.callProperties,node.indexers);if(props.length){this.space();print.list(props,{separator:false,indent:true,iterator:function iterator(){if(props.length!==1){_this.semicolon();_this.space()}}});this.space()}this.push("}")}function ObjectTypeCallProperty(node,print){if(node["static"])this.push("static ");print.plain(node.value)}function ObjectTypeIndexer(node,print){if(node["static"])this.push("static ");this.push("[");print.plain(node.id);this.push(":");this.space();print.plain(node.key);this.push("]");this.push(":");this.space();print.plain(node.value)}function ObjectTypeProperty(node,print){if(node["static"])this.push("static ");print.plain(node.key);if(node.optional)this.push("?");if(!t.isFunctionTypeAnnotation(node.value)){this.push(":");this.space()}print.plain(node.value)}function QualifiedTypeIdentifier(node,print){print.plain(node.qualification);this.push(".");print.plain(node.id)}function UnionTypeAnnotation(node,print){print.join(node.types,{separator:" | "})}function TypeCastExpression(node,print){this.push("(");print.plain(node.expression);print.plain(node.typeAnnotation);this.push(")")}function VoidTypeAnnotation(){this.push("void")}},{"../../types":196,"./types":46}],41:[function(require,module,exports){"use strict";exports.__esModule=true;exports.JSXAttribute=JSXAttribute;exports.JSXIdentifier=JSXIdentifier;exports.JSXNamespacedName=JSXNamespacedName;exports.JSXMemberExpression=JSXMemberExpression;exports.JSXSpreadAttribute=JSXSpreadAttribute;exports.JSXExpressionContainer=JSXExpressionContainer;exports.JSXElement=JSXElement;exports.JSXOpeningElement=JSXOpeningElement;exports.JSXClosingElement=JSXClosingElement;exports.JSXEmptyExpression=JSXEmptyExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function JSXAttribute(node,print){print.plain(node.name);if(node.value){this.push("=");print.plain(node.value)}}function JSXIdentifier(node){this.push(node.name)}function JSXNamespacedName(node,print){print.plain(node.namespace);this.push(":");print.plain(node.name)}function JSXMemberExpression(node,print){print.plain(node.object);this.push(".");print.plain(node.property)}function JSXSpreadAttribute(node,print){this.push("{...");print.plain(node.argument);this.push("}")}function JSXExpressionContainer(node,print){this.push("{");print.plain(node.expression);this.push("}")}function JSXElement(node,print){var open=node.openingElement;print.plain(open);if(open.selfClosing)return;this.indent();var _arr=node.children;for(var _i=0;_i<_arr.length;_i++){var child=_arr[_i];if(t.isLiteral(child)){this.push(child.value,true)}else{print.plain(child)}}this.dedent();print.plain(node.closingElement)}function JSXOpeningElement(node,print){this.push("<");print.plain(node.name);if(node.attributes.length>0){this.push(" ");print.join(node.attributes,{separator:" "})}this.push(node.selfClosing?" />":">")}function JSXClosingElement(node,print){this.push("")}function JSXEmptyExpression(){}},{"../../types":196}],42:[function(require,module,exports){"use strict";exports.__esModule=true;exports._params=_params;exports._method=_method;exports.FunctionExpression=FunctionExpression;exports.ArrowFunctionExpression=ArrowFunctionExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function _params(node,print){var _this=this;print.plain(node.typeParameters);this.push("(");print.list(node.params,{iterator:function iterator(node){if(node.optional)_this.push("?");print.plain(node.typeAnnotation)}});this.push(")");if(node.returnType){print.plain(node.returnType)}}function _method(node,print){var value=node.value;var kind=node.kind;var key=node.key;if(kind==="method"||kind==="init"){if(value.generator){this.push("*")}}if(kind==="get"||kind==="set"){this.push(kind+" ")}if(value.async)this.push("async ");if(node.computed){this.push("[");print.plain(key);this.push("]")}else{print.plain(key)}this._params(value,print);this.space();print.plain(value.body)}function FunctionExpression(node,print){if(node.async)this.push("async ");this.push("function");if(node.generator)this.push("*");if(node.id){this.push(" ");print.plain(node.id)}else{this.space()}this._params(node,print);this.space();print.plain(node.body)}exports.FunctionDeclaration=FunctionExpression;function ArrowFunctionExpression(node,print){if(node.async)this.push("async ");if(node.params.length===1&&t.isIdentifier(node.params[0])){print.plain(node.params[0])}else{this._params(node,print)}this.push(" => ");var bodyNeedsParens=t.isObjectExpression(node.body);if(bodyNeedsParens){this.push("(")}print.plain(node.body);if(bodyNeedsParens){this.push(")")}}},{"../../types":196}],43:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ImportSpecifier=ImportSpecifier;exports.ImportDefaultSpecifier=ImportDefaultSpecifier;exports.ExportDefaultSpecifier=ExportDefaultSpecifier;exports.ExportSpecifier=ExportSpecifier;exports.ExportNamespaceSpecifier=ExportNamespaceSpecifier;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ImportDeclaration=ImportDeclaration;exports.ImportNamespaceSpecifier=ImportNamespaceSpecifier;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function ImportSpecifier(node,print){print.plain(node.imported);if(node.local&&node.local.name!==node.imported.name){this.push(" as ");print.plain(node.local)}}function ImportDefaultSpecifier(node,print){print.plain(node.local)}function ExportDefaultSpecifier(node,print){print.plain(node.exported)}function ExportSpecifier(node,print){print.plain(node.local);if(node.exported&&node.local.name!==node.exported.name){this.push(" as ");print.plain(node.exported)}}function ExportNamespaceSpecifier(node,print){this.push("* as ");print.plain(node.exported)}function ExportAllDeclaration(node,print){this.push("export *");if(node.exported){this.push(" as ");print.plain(node.exported)}this.push(" from ");print.plain(node.source);this.semicolon()}function ExportNamedDeclaration(node,print){this.push("export ");ExportDeclaration.call(this,node,print)}function ExportDefaultDeclaration(node,print){this.push("export default ");ExportDeclaration.call(this,node,print)}function ExportDeclaration(node,print){var specifiers=node.specifiers;if(node.declaration){var declar=node.declaration;print.plain(declar);if(t.isStatement(declar)||t.isFunction(declar)||t.isClass(declar))return}else{if(node.exportKind==="type"){this.push("type ")}var first=specifiers[0];var hasSpecial=false;if(t.isExportDefaultSpecifier(first)||t.isExportNamespaceSpecifier(first)){hasSpecial=true;print.plain(specifiers.shift());if(specifiers.length){this.push(", ")}}if(specifiers.length||!specifiers.length&&!hasSpecial){this.push("{");if(specifiers.length){this.space();print.join(specifiers,{separator:", "});this.space()}this.push("}")}if(node.source){this.push(" from ");print.plain(node.source)}}this.ensureSemicolon()}function ImportDeclaration(node,print){this.push("import ");if(node.importKind==="type"||node.importKind==="typeof"){this.push(node.importKind+" ")}var specfiers=node.specifiers;if(specfiers&&specfiers.length){var first=node.specifiers[0];if(t.isImportDefaultSpecifier(first)||t.isImportNamespaceSpecifier(first)){print.plain(node.specifiers.shift());if(node.specifiers.length){this.push(", ")}}if(node.specifiers.length){this.push("{");this.space();print.join(node.specifiers,{separator:", "});this.space();this.push("}")}this.push(" from ")}print.plain(node.source);this.semicolon()}function ImportNamespaceSpecifier(node,print){this.push("* as ");print.plain(node.local)}},{"../../types":196}],44:[function(require,module,exports){"use strict";exports.__esModule=true;exports.WithStatement=WithStatement;exports.IfStatement=IfStatement;exports.ForStatement=ForStatement;exports.WhileStatement=WhileStatement;exports.DoWhileStatement=DoWhileStatement;exports.LabeledStatement=LabeledStatement;exports.TryStatement=TryStatement;exports.CatchClause=CatchClause;exports.SwitchStatement=SwitchStatement;exports.SwitchCase=SwitchCase;exports.DebuggerStatement=DebuggerStatement;exports.VariableDeclaration=VariableDeclaration;exports.VariableDeclarator=VariableDeclarator;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _types=require("../../types");var t=_interopRequireWildcard(_types);function WithStatement(node,print){this.keyword("with");this.push("(");print.plain(node.object);this.push(")");print.block(node.body)}function IfStatement(node,print){this.keyword("if");this.push("(");print.plain(node.test);this.push(")");this.space();print.indentOnComments(node.consequent);if(node.alternate){if(this.isLast("}"))this.space();this.push("else ");print.indentOnComments(node.alternate)}}function ForStatement(node,print){this.keyword("for");this.push("(");print.plain(node.init);this.push(";");if(node.test){this.space();print.plain(node.test)}this.push(";");if(node.update){this.space();print.plain(node.update)}this.push(")");print.block(node.body)}function WhileStatement(node,print){this.keyword("while");this.push("(");print.plain(node.test);this.push(")");print.block(node.body)}var buildForXStatement=function buildForXStatement(op){return function(node,print){this.keyword("for");this.push("(");print.plain(node.left);this.push(" "+op+" ");print.plain(node.right);this.push(")");print.block(node.body)}};var ForInStatement=buildForXStatement("in");exports.ForInStatement=ForInStatement;var ForOfStatement=buildForXStatement("of");exports.ForOfStatement=ForOfStatement;function DoWhileStatement(node,print){this.push("do ");print.plain(node.body);this.space();this.keyword("while");this.push("(");print.plain(node.test);this.push(");")}var buildLabelStatement=function buildLabelStatement(prefix){var key=arguments.length<=1||arguments[1]===undefined?"label":arguments[1];return function(node,print){this.push(prefix);var label=node[key];if(label){this.push(" ");var terminatorState=this.startTerminatorless();print.plain(label);this.endTerminatorless(terminatorState)}this.semicolon()}};var ContinueStatement=buildLabelStatement("continue");exports.ContinueStatement=ContinueStatement;var ReturnStatement=buildLabelStatement("return","argument");exports.ReturnStatement=ReturnStatement;var BreakStatement=buildLabelStatement("break");exports.BreakStatement=BreakStatement;var ThrowStatement=buildLabelStatement("throw","argument");exports.ThrowStatement=ThrowStatement;function LabeledStatement(node,print){print.plain(node.label);this.push(": ");print.plain(node.body)}function TryStatement(node,print){this.keyword("try");print.plain(node.block);this.space();if(node.handlers){print.plain(node.handlers[0])}else{print.plain(node.handler)}if(node.finalizer){this.space();this.push("finally ");print.plain(node.finalizer)}}function CatchClause(node,print){this.keyword("catch");this.push("(");print.plain(node.param);this.push(") ");print.plain(node.body)}function SwitchStatement(node,print){this.keyword("switch");this.push("(");print.plain(node.discriminant);this.push(")");this.space();this.push("{");print.sequence(node.cases,{indent:true,addNewlines:function addNewlines(leading,cas){if(!leading&&node.cases[node.cases.length-1]===cas)return-1}});this.push("}"); +}function SwitchCase(node,print){if(node.test){this.push("case ");print.plain(node.test);this.push(":")}else{this.push("default:")}if(node.consequent.length){this.newline();print.sequence(node.consequent,{indent:true})}}function DebuggerStatement(){this.push("debugger;")}function VariableDeclaration(node,print,parent){this.push(node.kind+" ");var hasInits=false;if(!t.isFor(parent)){var _arr=node.declarations;for(var _i=0;_i<_arr.length;_i++){var declar=_arr[_i];if(declar.init){hasInits=true}}}var sep;if(!this.format.compact&&!this.format.concise&&hasInits&&!this.format.retainLines){sep=",\n"+_repeating2["default"](" ",node.kind.length+1)}print.list(node.declarations,{separator:sep});if(t.isFor(parent)){if(parent.left===node||parent.init===node)return}this.semicolon()}function VariableDeclarator(node,print){print.plain(node.id);print.plain(node.id.typeAnnotation);if(node.init){this.space();this.push("=");this.space();print.plain(node.init)}}},{"../../types":196,repeating:611}],45:[function(require,module,exports){"use strict";exports.__esModule=true;exports.TaggedTemplateExpression=TaggedTemplateExpression;exports.TemplateElement=TemplateElement;exports.TemplateLiteral=TemplateLiteral;function TaggedTemplateExpression(node,print){print.plain(node.tag);print.plain(node.quasi)}function TemplateElement(node){this._push(node.value.raw)}function TemplateLiteral(node,print){this.push("`");var quasis=node.quasis;var len=quasis.length;for(var i=0;i0)this.space();print.plain(elem);if(i1e5;if(format.compact){console.error("[BABEL] "+messages.get("codeGeneratorDeopt",opts.filename,"100KB"))}}if(format.compact){format.indent.adjustMultilineComment=false}return format};CodeGenerator.findCommonStringDelimiter=function findCommonStringDelimiter(code,tokens){var occurences={single:0,"double":0};var checked=0;for(var i=0;i=3)break}if(occurences.single>occurences.double){return"single"}else{return"double"}};CodeGenerator.prototype.generate=function generate(){var ast=this.ast;this.print(ast);if(ast.comments){var comments=[];var _arr=ast.comments;for(var _i=0;_i<_arr.length;_i++){var comment=_arr[_i];if(!comment._displayed)comments.push(comment)}this._printComments(comments)}return{map:this.map.get(),code:this.buffer.get()}};CodeGenerator.prototype.buildPrint=function buildPrint(parent){return new _nodePrinter2["default"](this,parent)};CodeGenerator.prototype.catchUp=function catchUp(node){if(node.loc&&this.format.retainLines&&this.buffer.buf){while(this.position.line=0||comment.value.indexOf("@preserve")>=0){return true}else{return this.format.comments}}};CodeGenerator.prototype._printComments=function _printComments(comments){if(!comments||!comments.length)return;var _arr3=comments;for(var _i3=0;_i3<_arr3.length;_i3++){var comment=_arr3[_i3];if(!this.shouldPrintComment(comment))continue;if(comment._displayed)continue;comment._displayed=true;this.catchUp(comment);this.newline(this.whitespace.getNewlinesBefore(comment));var column=this.position.column;var val=this.generateComment(comment);if(column&&!this.isLast(["\n"," ","[","{"])){this._push(" ");column++}if(comment.type==="CommentBlock"&&this.format.indent.adjustMultilineComment){var offset=comment.loc&&comment.loc.start.column;if(offset){var newlineRegex=new RegExp("\\n\\s{1,"+offset+"}","g");val=val.replace(newlineRegex,"\n")}var indent=Math.max(this.indentSize(),column);val=val.replace(/\n/g,"\n"+_repeating2["default"](" ",indent))}if(column===0){val=this.getIndent()+val}if((this.format.compact||this.format.retainLines)&&comment.type==="CommentLine"){val+="\n"}this._push(val);this.newline(this.whitespace.getNewlinesAfter(comment))}};_createClass(CodeGenerator,null,[{key:"generators",value:{templateLiterals:require("./generators/template-literals"),comprehensions:require("./generators/comprehensions"),expressions:require("./generators/expressions"),statements:require("./generators/statements"),classes:require("./generators/classes"),methods:require("./generators/methods"),modules:require("./generators/modules"),types:require("./generators/types"),flow:require("./generators/flow"),base:require("./generators/base"),jsx:require("./generators/jsx")},enumerable:true}]);return CodeGenerator}();_lodashCollectionEach2["default"](_buffer2["default"].prototype,function(fn,key){CodeGenerator.prototype[key]=function(){return fn.apply(this.buffer,arguments)}});_lodashCollectionEach2["default"](CodeGenerator.generators,function(generator){_lodashObjectExtend2["default"](CodeGenerator.prototype,generator)});module.exports=function(ast,opts,code){var gen=new CodeGenerator(ast,opts,code);return gen.generate()};module.exports.CodeGenerator=CodeGenerator},{"../messages":60,"../types":196,"./buffer":35,"./generators/base":36,"./generators/classes":37,"./generators/comprehensions":38,"./generators/expressions":39,"./generators/flow":40,"./generators/jsx":41,"./generators/methods":42,"./generators/modules":43,"./generators/statements":44,"./generators/template-literals":45,"./generators/types":46,"./node":48,"./node/printer":50,"./position":52,"./source-map":53,"./whitespace":54,"detect-indent":409,"lodash/collection/each":437,"lodash/object/extend":537,repeating:611}],48:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _whitespace=require("./whitespace");var _whitespace2=_interopRequireDefault(_whitespace);var _parentheses=require("./parentheses");var parens=_interopRequireWildcard(_parentheses);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashCollectionSome=require("lodash/collection/some");var _lodashCollectionSome2=_interopRequireDefault(_lodashCollectionSome);var _types=require("../../types");var t=_interopRequireWildcard(_types);var find=function find(obj,node,parent){if(!obj)return;var result;var types=Object.keys(obj);for(var i=0;i","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(tier,i){_lodashCollectionEach2["default"](tier,function(op){PRECEDENCE[op]=i})});function NullableTypeAnnotation(node,parent){return t.isArrayTypeAnnotation(parent)}exports.FunctionTypeAnnotation=NullableTypeAnnotation;function UpdateExpression(node,parent){if(t.isMemberExpression(parent)&&parent.object===node){return true}}function ObjectExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function Binary(node,parent){if((t.isCallExpression(parent)||t.isNewExpression(parent))&&parent.callee===node){return true}if(t.isUnaryLike(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isBinary(parent)){var parentOp=parent.operator;var parentPos=PRECEDENCE[parentOp];var nodeOp=node.operator;var nodePos=PRECEDENCE[nodeOp];if(parentPos>nodePos){return true}if(parentPos===nodePos&&parent.right===node){return true}}}function BinaryExpression(node,parent){if(node.operator==="in"){if(t.isVariableDeclarator(parent)){return true}if(t.isFor(parent)){return true}}}function SequenceExpression(node,parent){if(t.isForStatement(parent)){return false}if(t.isExpressionStatement(parent)&&parent.expression===node){return false}return true}function YieldExpression(node,parent){return t.isBinary(parent)||t.isUnaryLike(parent)||t.isCallExpression(parent)||t.isMemberExpression(parent)||t.isNewExpression(parent)||t.isConditionalExpression(parent)||t.isYieldExpression(parent)}function ClassExpression(node,parent){return t.isExpressionStatement(parent)}function UnaryLike(node,parent){return t.isMemberExpression(parent)&&parent.object===node}function FunctionExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isCallExpression(parent)&&parent.callee===node){return true}}function ConditionalExpression(node,parent){if(t.isUnaryLike(parent)){return true}if(t.isBinary(parent)){return true}if(t.isCallExpression(parent)||t.isNewExpression(parent)){if(parent.callee===node){return true}}if(t.isConditionalExpression(parent)&&parent.test===node){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function AssignmentExpression(node){if(t.isObjectPattern(node.left)){return true}else{return ConditionalExpression.apply(undefined,arguments)}}},{"../../types":196,"lodash/collection/each":437}],50:[function(require,module,exports){"use strict";exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var NodePrinter=function(){function NodePrinter(generator,parent){_classCallCheck(this,NodePrinter);this.generator=generator;this.parent=parent}NodePrinter.prototype.printInnerComments=function printInnerComments(){if(!this.parent.innerComments)return;var gen=this.generator;gen.indent();gen._printComments(this.parent.innerComments);gen.dedent()};NodePrinter.prototype.plain=function plain(node,opts){return this.generator.print(node,this.parent,opts)};NodePrinter.prototype.sequence=function sequence(nodes){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];opts.statement=true;return this.generator.printJoin(this,nodes,opts)};NodePrinter.prototype.join=function join(nodes,opts){return this.generator.printJoin(this,nodes,opts)};NodePrinter.prototype.list=function list(items){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];if(opts.separator==null){opts.separator=",";if(!this.generator.format.compact)opts.separator+=" "}return this.join(items,opts)};NodePrinter.prototype.block=function block(node){return this.generator.printBlock(this,node)};NodePrinter.prototype.indentOnComments=function indentOnComments(node){return this.generator.printAndIndentOnComments(this,node)};return NodePrinter}();exports["default"]=NodePrinter;module.exports=exports["default"]},{}],51:[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashCollectionMap=require("lodash/collection/map");var _lodashCollectionMap2=_interopRequireDefault(_lodashCollectionMap);var _types=require("../../types");var t=_interopRequireWildcard(_types);function crawl(node){var state=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];if(t.isMemberExpression(node)){crawl(node.object,state);if(node.computed)crawl(node.property,state)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){crawl(node.left,state);crawl(node.right,state)}else if(t.isCallExpression(node)){state.hasCall=true;crawl(node.callee,state)}else if(t.isFunction(node)){state.hasFunction=true}else if(t.isIdentifier(node)){state.hasHelper=state.hasHelper||isHelper(node.callee)}return state}function isHelper(node){if(t.isMemberExpression(node)){return isHelper(node.object)||isHelper(node.property)}else if(t.isIdentifier(node)){return node.name==="require"||node.name[0]==="_"}else if(t.isCallExpression(node)){return isHelper(node.callee)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){return t.isIdentifier(node.left)&&isHelper(node.left)||isHelper(node.right)}else{return false}}function isType(node){return t.isLiteral(node)||t.isObjectExpression(node)||t.isArrayExpression(node)||t.isIdentifier(node)||t.isMemberExpression(node)}exports.nodes={AssignmentExpression:function AssignmentExpression(node){var state=crawl(node.right);if(state.hasCall&&state.hasHelper||state.hasFunction){return{before:state.hasFunction,after:true}}},SwitchCase:function SwitchCase(node,parent){return{before:node.consequent.length||parent.cases[0]===node}},LogicalExpression:function LogicalExpression(node){if(t.isFunction(node.left)||t.isFunction(node.right)){return{after:true}}},Literal:function Literal(node){if(node.value==="use strict"){return{after:true}}},CallExpression:function CallExpression(node){if(t.isFunction(node.callee)||isHelper(node)){return{before:true,after:true}}},VariableDeclaration:function VariableDeclaration(node){for(var i=0;i=max){i-=max}return i}var Whitespace=function(){function Whitespace(tokens){_classCallCheck(this,Whitespace);this.tokens=tokens;this.used={};this._lastFoundIndex=0}Whitespace.prototype.getNewlinesBefore=function getNewlinesBefore(node){var startToken;var endToken;var tokens=this.tokens;for(var j=0;j")}}).join("\n");if(highlighted){return _chalk2["default"].reset(frame)}else{return frame}};module.exports=exports["default"]},{chalk:217,esutils:413,"js-tokens":427,"line-numbers":429,repeating:611}],56:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashObjectMerge=require("lodash/object/merge");var _lodashObjectMerge2=_interopRequireDefault(_lodashObjectMerge);exports["default"]=function(dest,src){if(!dest||!src)return;return _lodashObjectMerge2["default"](dest,src,function(a,b){if(b&&Array.isArray(a)){var c=a.slice(0);for(var _iterator=b,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[Symbol.iterator]();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var v=_ref;if(a.indexOf(v)<0){c.push(v)}}return c}})};module.exports=exports["default"]},{"lodash/object/merge":541}],57:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../types");var t=_interopRequireWildcard(_types);exports["default"]=function(ast,comments,tokens){if(ast&&ast.type==="Program"){return t.file(ast,comments||[],tokens||[])}else{throw new Error("Not a valid ast?")}};module.exports=exports["default"]},{"../types":196}],58:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]=function(){return Object.create(null)};module.exports=exports["default"]},{}],59:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _babylon=require("babylon");var babylon=_interopRequireWildcard(_babylon);exports["default"]=function(code){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var parseOpts={allowImportExportEverywhere:opts.looseModules,allowReturnOutsideFunction:opts.looseModules,allowHashBang:true,ecmaVersion:6,strictMode:opts.strictMode,sourceType:opts.sourceType,locations:true,features:opts.features||{},plugins:opts.plugins||{}};if(opts.nonStandard){parseOpts.plugins.jsx=true;parseOpts.plugins.flow=true}return babylon.parse(code,parseOpts)};module.exports=exports["default"]},{babylon:633}],60:[function(require,module,exports){"use strict";exports.__esModule=true;exports.get=get;exports.parseArgs=parseArgs;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _util=require("util");var util=_interopRequireWildcard(_util);var MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File got a $1 node",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginIllegalKind:"Illegal kind $1 for plugin $2",pluginIllegalPosition:"Illegal position $1 for plugin $2",pluginKeyCollision:"The plugin $1 collides with another of the same name",pluginNotTransformer:"The plugin $1 didn't export a Plugin instance",pluginUnknown:"Unknown plugin $1",pluginNotFile:"Plugin $1 is resolving to a different Babel version than what is performing the transformation.",pluginInvalidProperty:"Plugin $1 provided an invalid property of $2.",pluginInvalidPropertyVisitor:'Define your visitor methods inside a `visitor` property like so:\n\n new Plugin("foobar", {\n visitor: {\n // define your visitor methods here!\n }\n });\n'};exports.MESSAGES=MESSAGES;function get(key){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var msg=MESSAGES[key];if(!msg)throw new ReferenceError("Unknown message "+JSON.stringify(key));args=parseArgs(args);return msg.replace(/\$(\d+)/g,function(str,i){return args[--i]})}function parseArgs(args){return args.map(function(val){if(val!=null&&val.inspect){return val.inspect()}else{try{return JSON.stringify(val)||val+""}catch(e){return util.inspect(val)}}})}},{util:30}],61:[function(require,module,exports){(function(global){"use strict";require("core-js/shim");require("regenerator/runtime");if(global._babelPolyfill){throw new Error("only one instance of babel/polyfill is allowed")}global._babelPolyfill=true}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"core-js/shim":405,"regenerator/runtime":604}],62:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _generation=require("../generation");var _generation2=_interopRequireDefault(_generation);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _util=require("../util");var util=_interopRequireWildcard(_util);var _transformationFile=require("../transformation/file");var _transformationFile2=_interopRequireDefault(_transformationFile);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _types=require("../types");var t=_interopRequireWildcard(_types);function buildGlobal(namespace,builder){var body=[];var container=t.functionExpression(null,[t.identifier("global")],t.blockStatement(body));var tree=t.program([t.expressionStatement(t.callExpression(container,[util.template("helper-self-global")]))]);body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.assignmentExpression("=",t.memberExpression(t.identifier("global"),namespace),t.objectExpression([])))]));builder(body);return tree}function buildUmd(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.identifier("global"))]));builder(body);var container=util.template("umd-commonjs-strict",{FACTORY_PARAMETERS:t.identifier("global"),BROWSER_ARGUMENTS:t.assignmentExpression("=",t.memberExpression(t.identifier("root"),namespace),t.objectExpression({})),COMMON_ARGUMENTS:t.identifier("exports"),AMD_ARGUMENTS:t.arrayExpression([t.literal("exports")]),FACTORY_BODY:body,UMD_ROOT:t.identifier("this")});return t.program([container])}function buildVar(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.objectExpression({}))]));builder(body);return t.program(body)}function buildHelpers(body,namespace,whitelist){_lodashCollectionEach2["default"](_transformationFile2["default"].helpers,function(name){if(whitelist&&whitelist.indexOf(name)===-1)return;var key=t.identifier(t.toIdentifier(name));body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(namespace,key),util.template("helper-"+name))))})}exports["default"]=function(whitelist){var outputType=arguments.length<=1||arguments[1]===undefined?"global":arguments[1];var namespace=t.identifier("babelHelpers");var builder=function builder(body){return buildHelpers(body,namespace,whitelist)};var tree;var build={global:buildGlobal,umd:buildUmd,"var":buildVar}[outputType];if(build){tree=build(namespace,builder)}else{throw new Error(messages.get("unsupportedOutputType",outputType))}return _generation2["default"](tree).code};module.exports=exports["default"]},{"../generation":47,"../messages":60,"../transformation/file":63,"../types":196,"../util":199,"lodash/collection/each":437}],63:[function(require,module,exports){(function(process){"use strict";exports.__esModule=true;var _createClass=function(){function defineProperties(target,props){for(var i=0;i=0)continue;var group=pass.plugin.metadata.group;if(!pass.canTransform()||!group){stack.push(pass);continue}var mergeStack=[];var _arr4=_stack;for(var _i4=0;_i4<_arr4.length;_i4++){var _pass=_arr4[_i4];if(_pass.plugin.metadata.group===group){mergeStack.push(_pass);ignore.push(_pass)}}var visitors=[];var _arr5=mergeStack;for(var _i5=0;_i5<_arr5.length;_i5++){var _pass2=_arr5[_i5];visitors.push(_pass2.plugin.visitor)}var visitor=_traversal2["default"].visitors.merge(visitors);var mergePlugin=new _plugin2["default"](group,{visitor:visitor});stack.push(mergePlugin.buildPass(this))}return stack};File.prototype.set=function set(key,val){return this.data[key]=val};File.prototype.setDynamic=function setDynamic(key,fn){this.dynamicData[key]=fn};File.prototype.get=function get(key){var data=this.data[key];if(data){return data}else{var dynamic=this.dynamicData[key];if(dynamic){return this.set(key,dynamic())}}};File.prototype.resolveModuleSource=function resolveModuleSource(source){var resolveModuleSource=this.opts.resolveModuleSource;if(resolveModuleSource)source=resolveModuleSource(source,this.opts.filename);return source};File.prototype.addImport=function addImport(source,name,type){name=name||source;var id=this.dynamicImportIds[name];if(!id){source=this.resolveModuleSource(source);id=this.dynamicImportIds[name]=this.scope.generateUidIdentifier(name);var specifiers=[t.importDefaultSpecifier(id)];var declar=t.importDeclaration(specifiers,t.literal(source));declar._blockHoist=3;if(type){var modules=this.dynamicImportTypes[type]=this.dynamicImportTypes[type]||[];modules.push(declar)}if(this.transformers["es6.modules"].canTransform()){this.moduleFormatter.importSpecifier(specifiers[0],declar,this.dynamicImports,this.scope);this.moduleFormatter.hasLocalImports=true}else{this.dynamicImports.push(declar)}}return id};File.prototype.attachAuxiliaryComment=function attachAuxiliaryComment(node){var beforeComment=this.opts.auxiliaryCommentBefore;if(beforeComment){node.leadingComments=node.leadingComments||[];node.leadingComments.push({type:"CommentLine",value:" "+beforeComment})}var afterComment=this.opts.auxiliaryCommentAfter;if(afterComment){node.trailingComments=node.trailingComments||[];node.trailingComments.push({type:"CommentLine",value:" "+afterComment})}return node};File.prototype.addHelper=function addHelper(name){var isSolo=_lodashCollectionIncludes2["default"](File.soloHelpers,name);if(!isSolo&&!_lodashCollectionIncludes2["default"](File.helpers,name)){throw new ReferenceError("Unknown helper "+name)}var declar=this.declarations[name];if(declar)return declar;this.usedHelpers[name]=true;if(!isSolo){var generator=this.get("helperGenerator");var runtime=this.get("helpersNamespace");if(generator){return generator(name)}else if(runtime){var id=t.identifier(t.toIdentifier(name));return t.memberExpression(runtime,id)}}var ref=util.template("helper-"+name);var uid=this.declarations[name]=this.scope.generateUidIdentifier(name);if(t.isFunctionExpression(ref)&&!ref.id){ref.body._compact=true;ref._generated=true;ref.id=uid;ref.type="FunctionDeclaration";this.attachAuxiliaryComment(ref);this.path.unshiftContainer("body",ref)}else{ref._compact=true;this.scope.push({id:uid,init:ref,unique:true})}return uid};File.prototype.addTemplateObject=function addTemplateObject(helperName,strings,raw){var stringIds=raw.elements.map(function(string){return string.value});var name=helperName+"_"+raw.elements.length+"_"+stringIds.join(",");var declar=this.declarations[name];if(declar)return declar;var uid=this.declarations[name]=this.scope.generateUidIdentifier("templateObject");var helperId=this.addHelper(helperName);var init=t.callExpression(helperId,[strings,raw]);init._compact=true;this.scope.push({id:uid,init:init,_blockHoist:1.9});return uid};File.prototype.errorWithNode=function errorWithNode(node,msg){var Error=arguments.length<=2||arguments[2]===undefined?SyntaxError:arguments[2];var err;var loc=node&&(node.loc||node._loc);if(loc){err=new Error("Line "+loc.start.line+": "+msg);err.loc=loc.start}else{err=new Error("There's been an error on a dynamic node. This is almost certainly an internal error. Please report it.")}return err};File.prototype.mergeSourceMap=function mergeSourceMap(map){var opts=this.opts;var inputMap=opts.inputSourceMap;if(inputMap){map.sources[0]=inputMap.file;var inputMapConsumer=new _sourceMap2["default"].SourceMapConsumer(inputMap);var outputMapConsumer=new _sourceMap2["default"].SourceMapConsumer(map);var outputMapGenerator=_sourceMap2["default"].SourceMapGenerator.fromSourceMap(outputMapConsumer);outputMapGenerator.applySourceMap(inputMapConsumer);var mergedMap=outputMapGenerator.toJSON();mergedMap.sources=inputMap.sources;mergedMap.file=inputMap.file;return mergedMap}return map};File.prototype.getModuleFormatter=function getModuleFormatter(type){if(_lodashLangIsFunction2["default"](type)||!_modules2["default"][type]){this.log.deprecate("Custom module formatters are deprecated and will be removed in the next major. Please use Babel plugins instead.")}var ModuleFormatter=_lodashLangIsFunction2["default"](type)?type:_modules2["default"][type];if(!ModuleFormatter){var loc=_tryResolve2["default"].relative(type);if(loc)ModuleFormatter=require(loc)}if(!ModuleFormatter){throw new ReferenceError("Unknown module formatter type "+JSON.stringify(type))}return new ModuleFormatter(this)};File.prototype.parse=function parse(code){var opts=this.opts;var parseOpts={highlightCode:opts.highlightCode,nonStandard:opts.nonStandard,sourceType:opts.sourceType,filename:opts.filename,plugins:{}};var features=parseOpts.features={};for(var key in this.transformers){var transformer=this.transformers[key];features[key]=transformer.canTransform()}parseOpts.looseModules=this.isLoose("es6.modules");parseOpts.strictMode=features.strict;this.log.debug("Parse start");var ast=_helpersParse2["default"](code,parseOpts);this.log.debug("Parse stop");return ast};File.prototype._addAst=function _addAst(ast){this.path=_traversalPath2["default"].get({hub:this.hub,parentPath:null,parent:ast,container:ast,key:"program"}).setContext();this.scope=this.path.scope;this.ast=ast};File.prototype.addAst=function addAst(ast){this.log.debug("Start set AST");this._addAst(ast);this.log.debug("End set AST");this.log.debug("Start module formatter init");var modFormatter=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);if(modFormatter.init&&this.transformers["es6.modules"].canTransform()){modFormatter.init()}this.log.debug("End module formatter init")};File.prototype.transform=function transform(){this.call("pre");var _arr6=this.transformerStack;for(var _i6=0;_i6<_arr6.length;_i6++){var pass=_arr6[_i6];pass.transform()}this.call("post");return this.generate()};File.prototype.wrap=function wrap(code,callback){code=code+"";try{if(this.shouldIgnore()){return this.makeResult({code:code,ignored:true})}else{return callback()}}catch(err){if(err._babel){throw err}else{err._babel=true}var message=err.message=this.opts.filename+": "+err.message;var loc=err.loc;if(loc){err.codeFrame=_helpersCodeFrame2["default"](code,loc.line,loc.column+1,this.opts);message+="\n"+err.codeFrame}if(process.browser){err.message=message}if(err.stack){var newStack=err.stack.replace(err.message,message);try{err.stack=newStack}catch(e){}}throw err}};File.prototype.addCode=function addCode(code){code=(code||"")+"";code=this.parseInputSourceMap(code);this.code=code};File.prototype.parseCode=function parseCode(){this.parseShebang();var ast=this.parse(this.code);this.addAst(ast)};File.prototype.shouldIgnore=function shouldIgnore(){var opts=this.opts;return util.shouldIgnore(opts.filename,opts.ignore,opts.only)};File.prototype.call=function call(key){var _arr7=this.uncollapsedTransformerStack;for(var _i7=0;_i7<_arr7.length;_i7++){var pass=_arr7[_i7];var fn=pass.plugin[key];if(fn)fn(this)}};File.prototype.parseInputSourceMap=function parseInputSourceMap(code){var opts=this.opts;if(opts.inputSourceMap!==false){var inputMap=_convertSourceMap2["default"].fromSource(code);if(inputMap){opts.inputSourceMap=inputMap.toObject();code=_convertSourceMap2["default"].removeComments(code)}}return code};File.prototype.parseShebang=function parseShebang(){var shebangMatch=_shebangRegex2["default"].exec(this.code);if(shebangMatch){this.shebang=shebangMatch[0];this.code=this.code.replace(_shebangRegex2["default"],"")}};File.prototype.makeResult=function makeResult(_ref){var code=_ref.code;var _ref$map=_ref.map;var map=_ref$map===undefined?null:_ref$map;var ast=_ref.ast;var ignored=_ref.ignored;var result={metadata:null,ignored:!!ignored,code:null,ast:null,map:map};if(this.opts.code){result.code=code}if(this.opts.ast){result.ast=ast}if(this.opts.metadata){result.metadata=this.metadata;result.metadata.usedHelpers=Object.keys(this.usedHelpers)}return result};File.prototype.generate=function generate(){var opts=this.opts;var ast=this.ast;var result={ast:ast};if(!opts.code)return this.makeResult(result);this.log.debug("Generation start");var _result=_generation2["default"](ast,opts,this.code);result.code=_result.code;result.map=_result.map;this.log.debug("Generation end");if(this.shebang){result.code=this.shebang+"\n"+result.code}if(result.map){result.map=this.mergeSourceMap(result.map)}if(opts.sourceMaps==="inline"||opts.sourceMaps==="both"){result.code+="\n"+_convertSourceMap2["default"].fromObject(result.map).toComment()}if(opts.sourceMaps==="inline"){result.map=null}return this.makeResult(result)};_createClass(File,null,[{key:"helpers",value:["inherits","defaults","create-class","create-decorated-class","create-decorated-object","define-decorated-property-descriptor","tagged-template-literal","tagged-template-literal-loose","to-array","to-consumable-array","sliced-to-array","sliced-to-array-loose","object-without-properties","has-own","slice","bind","define-property","async-to-generator","interop-export-wildcard","interop-require-wildcard","interop-require-default","typeof","extends","get","set","new-arrow-check","class-call-check","object-destructuring-empty","temporal-undefined","temporal-assert-defined","self-global","default-props","instanceof","interop-require"],enumerable:true},{key:"soloHelpers",value:[],enumerable:true}]);return File}();exports["default"]=File;module.exports=exports["default"]}).call(this,require("_process"))},{"../../generation":47,"../../helpers/code-frame":55,"../../helpers/parse":59,"../../traversal":165,"../../traversal/hub":164,"../../traversal/path":172,"../../types":196,"../../util":199,"../modules":91,"../plugin":99,"./logger":64,"./options/option-manager":67,"./plugin-manager":69,_process:12,"convert-source-map":225,"lodash/collection/includes":439,"lodash/lang/isFunction":526,"lodash/object/defaults":536,path:11,"shebang-regex":614,"source-map":616,"try-resolve":630}],64:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _debugNode=require("debug/node");var _debugNode2=_interopRequireDefault(_debugNode);var verboseDebug=_debugNode2["default"]("babel:verbose");var generalDebug=_debugNode2["default"]("babel");var seenDeprecatedMessages=[];var Logger=function(){function Logger(file,filename){_classCallCheck(this,Logger);this.filename=filename;this.file=file}Logger.prototype._buildMessage=function _buildMessage(msg){var parts="[BABEL] "+this.filename;if(msg)parts+=": "+msg;return parts};Logger.prototype.warn=function warn(msg){console.warn(this._buildMessage(msg))};Logger.prototype.error=function error(msg){var Constructor=arguments.length<=1||arguments[1]===undefined?Error:arguments[1];throw new Constructor(this._buildMessage(msg))};Logger.prototype.deprecate=function deprecate(msg){if(this.file.opts&&this.file.opts.suppressDeprecationMessages)return;msg=this._buildMessage(msg);if(seenDeprecatedMessages.indexOf(msg)>=0)return;seenDeprecatedMessages.push(msg);console.error(msg)};Logger.prototype.verbose=function verbose(msg){if(verboseDebug.enabled)verboseDebug(this._buildMessage(msg))};Logger.prototype.debug=function debug(msg){if(generalDebug.enabled)generalDebug(this._buildMessage(msg))};Logger.prototype.deopt=function deopt(node,msg){this.debug(msg)};return Logger}();exports["default"]=Logger;module.exports=exports["default"]},{"debug/node":407}],65:[function(require,module,exports){module.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc","default":"unknown",shorthand:"f"},filenameRelative:{hidden:true,type:"string"},inputSourceMap:{hidden:true},extra:{hidden:true,"default":{}},env:{hidden:true,"default":{}},moduleId:{description:"specify a custom name for module ids",type:"string"},getModuleId:{hidden:true},retainLines:{type:"boolean","default":false,description:"retain line numbers - will result in really ugly code"},nonStandard:{type:"boolean","default":true,description:"enable/disable support for JSX and Flow (on by default)"},experimental:{type:"boolean",description:"allow use of experimental transformers","default":false},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean","default":true},suppressDeprecationMessages:{type:"boolean","default":false,hidden:true},resolveModuleSource:{hidden:true},stage:{description:"ECMAScript proposal stage version to allow [0-4]",shorthand:"e",type:"number","default":2},blacklist:{type:"transformerList",description:"blacklist of transformers to NOT use",shorthand:"b","default":[]},whitelist:{type:"transformerList",optional:true,description:"whitelist of transformers to ONLY use",shorthand:"l"},optional:{type:"transformerList",description:"list of optional transformers to enable","default":[]},modules:{type:"string",description:"module formatter type to use [common]","default":"common",shorthand:"m"},moduleIds:{type:"boolean","default":false,shorthand:"M",description:"insert an explicit id for modules"},loose:{type:"transformerList",description:"list of transformers to enable loose mode ON",shorthand:"L"},jsxPragma:{type:"string",description:"custom pragma to use with JSX (same functionality as @jsx comments)", +"default":"React.createElement",shorthand:"P"},plugins:{type:"list",description:"","default":[]},ignore:{type:"list",description:"list of glob paths to **not** compile","default":[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:true,"default":true,type:"boolean"},metadata:{hidden:true,"default":true,type:"boolean"},ast:{hidden:true,"default":true,type:"boolean"},comments:{type:"boolean","default":true,description:"strip/output comments in generated output (on by default)"},shouldPrintComment:{hidden:true,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},compact:{type:"booleanString","default":"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},keepModuleIdExtensions:{type:"boolean",description:"keep extensions when generating module ids","default":false,shorthand:"k"},auxiliaryComment:{deprecated:"renamed to auxiliaryCommentBefore",shorthand:"a",alias:"auxiliaryCommentBefore"},auxiliaryCommentBefore:{type:"string","default":"",description:"attach a comment before all helper declarations and auxiliary code"},auxiliaryCommentAfter:{type:"string","default":"",description:"attach a comment after all helper declarations and auxiliary code"},externalHelpers:{type:"boolean","default":false,shorthand:"r",description:"uses a reference to `babelHelpers` instead of placing helpers at the top of your code."},metadataUsedHelpers:{deprecated:"Not required anymore as this is enabled by default",type:"boolean","default":false,hidden:true},sourceMap:{alias:"sourceMaps",hidden:true},sourceMaps:{type:"booleanString",description:"[true|false|inline]","default":false,shorthand:"s"},sourceMapName:{alias:"sourceMapTarget",description:"DEPRECATED - Please use sourceMapTarget"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},breakConfig:{type:"boolean","default":false,hidden:true,description:"stop trying to load .babelrc files"},babelrc:{description:"Specify a custom list of babelrc files to use",type:"list"},sourceType:{description:"","default":"module"}}},{}],66:[function(require,module,exports){"use strict";exports.__esModule=true;exports.validateOption=validateOption;exports.normaliseOptions=normaliseOptions;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _parsers=require("./parsers");var parsers=_interopRequireWildcard(_parsers);var _config=require("./config");var _config2=_interopRequireDefault(_config);exports.config=_config2["default"];function validateOption(key,val,pipeline){var opt=_config2["default"][key];var parser=opt&&parsers[opt.type];if(parser&&parser.validate){return parser.validate(key,val,pipeline)}else{return val}}function normaliseOptions(){var options=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];for(var key in options){var val=options[key];if(val==null)continue;var opt=_config2["default"][key];if(!opt)continue;var parser=parsers[opt.type];if(parser)val=parser(val);options[key]=val}return options}},{"./config":65,"./parsers":68}],67:[function(require,module,exports){(function(process){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _index=require("./index");var _json5=require("json5");var _json52=_interopRequireDefault(_json5);var _pathIsAbsolute=require("path-is-absolute");var _pathIsAbsolute2=_interopRequireDefault(_pathIsAbsolute);var _pathExists=require("path-exists");var _pathExists2=_interopRequireDefault(_pathExists);var _lodashLangClone=require("lodash/lang/clone");var _lodashLangClone2=_interopRequireDefault(_lodashLangClone);var _helpersMerge=require("../../../helpers/merge");var _helpersMerge2=_interopRequireDefault(_helpersMerge);var _config=require("./config");var _config2=_interopRequireDefault(_config);var _path=require("path");var _path2=_interopRequireDefault(_path);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var existsCache={};var jsonCache={};var BABELIGNORE_FILENAME=".babelignore";var BABELRC_FILENAME=".babelrc";var PACKAGE_FILENAME="package.json";function exists(filename){var cached=existsCache[filename];if(cached!=null){return cached}else{return existsCache[filename]=_pathExists2["default"].sync(filename)}}var OptionManager=function(){function OptionManager(log,pipeline){_classCallCheck(this,OptionManager);this.resolvedConfigs=[];this.options=OptionManager.createBareOptions();this.pipeline=pipeline;this.log=log}OptionManager.createBareOptions=function createBareOptions(){var opts={};for(var key in _config2["default"]){var opt=_config2["default"][key];opts[key]=_lodashLangClone2["default"](opt["default"])}return opts};OptionManager.prototype.addConfig=function addConfig(loc,key){var json=arguments.length<=2||arguments[2]===undefined?_json52["default"]:arguments[2];if(this.resolvedConfigs.indexOf(loc)>=0)return;var content=_fs2["default"].readFileSync(loc,"utf8");var opts;try{opts=jsonCache[content]=jsonCache[content]||json.parse(content);if(key)opts=opts[key]}catch(err){err.message=loc+": Error while parsing JSON - "+err.message;throw err}this.mergeOptions(opts,loc);this.resolvedConfigs.push(loc)};OptionManager.prototype.mergeOptions=function mergeOptions(opts){var alias=arguments.length<=1||arguments[1]===undefined?"foreign":arguments[1];if(!opts)return;for(var key in opts){if(key[0]==="_")continue;var option=_config2["default"][key];if(!option)this.log.error("Unknown option: "+alias+"."+key,ReferenceError)}_index.normaliseOptions(opts);_helpersMerge2["default"](this.options,opts)};OptionManager.prototype.addIgnoreConfig=function addIgnoreConfig(loc){var file=_fs2["default"].readFileSync(loc,"utf8");var lines=file.split("\n");lines=lines.map(function(line){return line.replace(/#(.*?)$/,"").trim()}).filter(function(line){return!!line});this.mergeOptions({ignore:lines},loc)};OptionManager.prototype.findConfigs=function findConfigs(loc){if(!loc)return;if(!_pathIsAbsolute2["default"](loc)){loc=_path2["default"].join(process.cwd(),loc)}while(loc!==(loc=_path2["default"].dirname(loc))){if(this.options.breakConfig)return;var configLoc=_path2["default"].join(loc,BABELRC_FILENAME);if(exists(configLoc))this.addConfig(configLoc);var pkgLoc=_path2["default"].join(loc,PACKAGE_FILENAME);if(exists(pkgLoc))this.addConfig(pkgLoc,"babel",JSON);var ignoreLoc=_path2["default"].join(loc,BABELIGNORE_FILENAME);if(exists(ignoreLoc))this.addIgnoreConfig(ignoreLoc)}};OptionManager.prototype.normaliseOptions=function normaliseOptions(){var opts=this.options;for(var key in _config2["default"]){var option=_config2["default"][key];var val=opts[key];if(!val&&option.optional)continue;if(this.log&&val&&option.deprecated){this.log.deprecate("Deprecated option "+key+": "+option.deprecated)}if(this.pipeline&&val){val=_index.validateOption(key,val,this.pipeline)}if(option.alias){opts[option.alias]=opts[option.alias]||val}else{opts[key]=val}}};OptionManager.prototype.init=function init(opts){this.mergeOptions(opts,"direct");if(opts.babelrc){var _arr=opts.babelrc;for(var _i=0;_i<_arr.length;_i++){var loc=_arr[_i];this.addConfig(loc)}}if(opts.babelrc!==false){this.findConfigs(opts.filename)}var envKey=process.env.BABEL_ENV||process.env.NODE_ENV||"development";if(this.options.env){this.mergeOptions(this.options.env[envKey],"direct.env."+envKey)}this.normaliseOptions(opts);return this.options};return OptionManager}();exports["default"]=OptionManager;module.exports=exports["default"]}).call(this,require("_process"))},{"../../../helpers/merge":56,"./config":65,"./index":66,_process:12,fs:1,json5:428,"lodash/lang/clone":520,path:11,"path-exists":552,"path-is-absolute":553}],68:[function(require,module,exports){"use strict";exports.__esModule=true;exports.transformerList=transformerList;exports.number=number;exports.boolean=boolean;exports.booleanString=booleanString;exports.list=list;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _slash=require("slash");var _slash2=_interopRequireDefault(_slash);var _util=require("../../../util");var util=_interopRequireWildcard(_util);function transformerList(val){return util.arrayify(val)}transformerList.validate=function(key,val,pipeline){if(val.indexOf("all")>=0||val.indexOf(true)>=0){val=Object.keys(pipeline.transformers)}return pipeline._ensureTransformerNames(key,val)};function number(val){return+val}var filename=_slash2["default"];exports.filename=filename;function boolean(val){return!!val}function booleanString(val){return util.booleanify(val)}function list(val){return util.list(val)}},{"../../../util":199,slash:615}],69:[function(require,module,exports){"use strict";exports.__esModule=true;var _createClass=function(){function defineProperties(target,props){for(var i=0;i=3){callExpr._prettyCall=true}return t.inherits(callExpr,node)}};return visitor};module.exports=exports["default"]},{"../../messages":60,"../../types":196,"./react":79,esutils:413,"lodash/lang/isString":532}],73:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);var visitor={enter:function enter(node,parent,scope,state){if(this.isThisExpression()||this.isReferencedIdentifier({name:"arguments"})){state.found=true;this.stop()}},Function:function Function(){this.skip()}};exports["default"]=function(node,scope){var container=t.functionExpression(null,[],node.body,node.generator,node.async);var callee=container;var args=[];var state={found:false};scope.traverse(node,visitor,state);if(state.found){callee=t.memberExpression(container,t.identifier("apply"));args=[t.thisExpression(),t.identifier("arguments")]}var call=t.callExpression(callee,args);if(node.generator)call=t.yieldExpression(call,true);return t.returnStatement(call)};module.exports=exports["default"]},{"../../types":196}],74:[function(require,module,exports){"use strict";exports.__esModule=true;exports.push=push;exports.hasComputed=hasComputed;exports.toComputedObjectFromClass=toComputedObjectFromClass;exports.toClassObject=toClassObject;exports.toDefineObject=toDefineObject;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashObjectHas=require("lodash/object/has");var _lodashObjectHas2=_interopRequireDefault(_lodashObjectHas);var _types=require("../../types");var t=_interopRequireWildcard(_types);function push(mutatorMap,node,kind,file){var alias=t.toKeyAlias(node);var map={};if(_lodashObjectHas2["default"](mutatorMap,alias))map=mutatorMap[alias];mutatorMap[alias]=map;map._inherits=map._inherits||[];map._inherits.push(node);map._key=node.key;if(node.computed){map._computed=true}if(node.decorators){var decorators=map.decorators=map.decorators||t.arrayExpression([]);decorators.elements=decorators.elements.concat(node.decorators.map(function(dec){return dec.expression}).reverse())}if(map.value||map.initializer){throw file.errorWithNode(node,"Key conflict with sibling node")}if(node.value){if(node.kind==="init")kind="value";if(node.kind==="get")kind="get";if(node.kind==="set")kind="set";t.inheritsComments(node.value,node);map[kind]=node.value}return map}function hasComputed(mutatorMap){for(var key in mutatorMap){if(mutatorMap[key]._computed){return true}}return false}function toComputedObjectFromClass(obj){var objExpr=t.arrayExpression([]);for(var i=0;i=0}function pullFlag(node,flag){var flags=node.regex.flags.split("");if(node.regex.flags.indexOf(flag)<0)return;_lodashArrayPull2["default"](flags,flag);node.regex.flags=flags.join("")}},{"../../types":196,"lodash/array/pull":434}],81:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);var awaitVisitor={Function:function Function(){this.skip()},AwaitExpression:function AwaitExpression(node){node.type="YieldExpression";if(node.all){node.all=false;node.argument=t.callExpression(t.memberExpression(t.identifier("Promise"),t.identifier("all")),[node.argument])}}};var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){var name=state.id.name;if(node.name===name&&scope.bindingIdentifierEquals(name,state.id)){return state.ref=state.ref||scope.generateUidIdentifier(name)}}};exports["default"]=function(path,callId){var node=path.node;node.async=false;node.generator=true;path.traverse(awaitVisitor,state);var call=t.callExpression(callId,[node]);var id=node.id;node.id=null;if(t.isFunctionDeclaration(node)){var declar=t.variableDeclaration("let",[t.variableDeclarator(id,call)]);declar._blockHoist=true;return declar}else{if(id){var state={id:id};path.traverse(referenceVisitor,state);if(state.ref){path.scope.parent.push({id:state.ref});return t.assignmentExpression("=",state.ref,call)}}return call}};module.exports=exports["default"]},{"../../types":196}],82:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _messages=require("../../messages");var messages=_interopRequireWildcard(_messages);var _types=require("../../types");var t=_interopRequireWildcard(_types);function isIllegalBareSuper(node,parent){if(!t.isSuper(node))return false;if(t.isMemberExpression(parent,{computed:false}))return false;if(t.isCallExpression(parent,{callee:node}))return false;return true}function isMemberExpressionSuper(node){return t.isMemberExpression(node)&&t.isSuper(node.object)}var visitor={enter:function enter(node,parent,scope,state){var topLevel=state.topLevel;var self=state.self;if(t.isFunction(node)&&!t.isArrowFunctionExpression(node)){self.traverseLevel(this,false);return this.skip()}if(t.isProperty(node,{method:true})||t.isMethodDefinition(node)){return this.skip()}var getThisReference=topLevel?t.thisExpression:self.getThisReference.bind(self);var callback=self.specHandle;if(self.isLoose)callback=self.looseHandle;var result=callback.call(self,this,getThisReference);if(result)this.hasSuper=true;if(result===true)return;return result}};var ReplaceSupers=function(){function ReplaceSupers(opts){var inClass=arguments.length<=1||arguments[1]===undefined?false:arguments[1];_classCallCheck(this,ReplaceSupers);this.topLevelThisReference=opts.topLevelThisReference;this.methodPath=opts.methodPath;this.methodNode=opts.methodNode;this.superRef=opts.superRef;this.isStatic=opts.isStatic;this.hasSuper=false;this.inClass=inClass;this.isLoose=opts.isLoose;this.scope=opts.scope;this.file=opts.file;this.opts=opts}ReplaceSupers.prototype.getObjectRef=function getObjectRef(){return this.opts.objectRef||this.opts.getObjectRef()};ReplaceSupers.prototype.setSuperProperty=function setSuperProperty(property,value,isComputed,thisExpression){return t.callExpression(this.file.addHelper("set"),[t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():t.memberExpression(this.getObjectRef(),t.identifier("prototype"))]),isComputed?property:t.literal(property.name),value,thisExpression])};ReplaceSupers.prototype.getSuperProperty=function getSuperProperty(property,isComputed,thisExpression){return t.callExpression(this.file.addHelper("get"),[t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():t.memberExpression(this.getObjectRef(),t.identifier("prototype"))]),isComputed?property:t.literal(property.name),thisExpression])};ReplaceSupers.prototype.replace=function replace(){this.traverseLevel(this.methodPath.get("value"),true)};ReplaceSupers.prototype.traverseLevel=function traverseLevel(path,topLevel){var state={self:this,topLevel:topLevel};path.traverse(visitor,state)};ReplaceSupers.prototype.getThisReference=function getThisReference(){if(this.topLevelThisReference){return this.topLevelThisReference}else{var ref=this.topLevelThisReference=this.scope.generateUidIdentifier("this");this.methodNode.value.body.body.unshift(t.variableDeclaration("var",[t.variableDeclarator(this.topLevelThisReference,t.thisExpression())]));return ref}};ReplaceSupers.prototype.getLooseSuperProperty=function getLooseSuperProperty(id,parent){var methodNode=this.methodNode;var methodName=methodNode.key;var superRef=this.superRef||t.identifier("Function");if(parent.property===id){return}else if(t.isCallExpression(parent,{callee:id})){parent.arguments.unshift(t.thisExpression());if(methodName.name==="constructor"){if(parent.arguments.length===2&&t.isSpreadElement(parent.arguments[1])&&t.isIdentifier(parent.arguments[1].argument,{name:"arguments"})){parent.arguments[1]=parent.arguments[1].argument;return t.memberExpression(superRef,t.identifier("apply"))}else{return t.memberExpression(superRef,t.identifier("call"))}}else{id=superRef;if(!methodNode["static"]){id=t.memberExpression(id,t.identifier("prototype"))}id=t.memberExpression(id,methodName,methodNode.computed);return t.memberExpression(id,t.identifier("call"))}}else if(t.isMemberExpression(parent)&&!methodNode["static"]){return t.memberExpression(superRef,t.identifier("prototype"))}else{return superRef}};ReplaceSupers.prototype.looseHandle=function looseHandle(path,getThisReference){var node=path.node;if(path.isSuper()){return this.getLooseSuperProperty(node,path.parent)}else if(path.isCallExpression()){var callee=node.callee;if(!t.isMemberExpression(callee))return;if(!t.isSuper(callee.object))return;t.appendToMemberExpression(callee,t.identifier("call"));node.arguments.unshift(getThisReference());return true}};ReplaceSupers.prototype.specHandleAssignmentExpression=function specHandleAssignmentExpression(ref,path,node,getThisReference){if(node.operator==="="){return this.setSuperProperty(node.left.property,node.right,node.left.computed,getThisReference())}else{ref=ref||path.scope.generateUidIdentifier("ref");return[t.variableDeclaration("var",[t.variableDeclarator(ref,node.left)]),t.expressionStatement(t.assignmentExpression("=",node.left,t.binaryExpression(node.operator[0],ref,node.right)))]}};ReplaceSupers.prototype.specHandle=function specHandle(path,getThisReference){var methodNode=this.methodNode;var property;var computed;var args;var thisReference;var parent=path.parent;var node=path.node;if(isIllegalBareSuper(node,parent)){throw path.errorWithNode(messages.get("classesIllegalBareSuper"))}if(t.isCallExpression(node)){var callee=node.callee;if(t.isSuper(callee)){property=methodNode.key;computed=methodNode.computed;args=node.arguments;if(methodNode.key.name!=="constructor"||!this.inClass){var methodName=methodNode.key.name||"METHOD_NAME";throw this.file.errorWithNode(node,messages.get("classesIllegalSuperCall",methodName))}}else if(isMemberExpressionSuper(callee)){property=callee.property;computed=callee.computed;args=node.arguments}}else if(t.isMemberExpression(node)&&t.isSuper(node.object)){property=node.property;computed=node.computed}else if(t.isUpdateExpression(node)&&isMemberExpressionSuper(node.argument)){var binary=t.binaryExpression(node.operator[0],node.argument,t.literal(1));if(node.prefix){return this.specHandleAssignmentExpression(null,path,binary,getThisReference)}else{var ref=path.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(ref,path,binary,getThisReference).concat(t.expressionStatement(ref))}}else if(t.isAssignmentExpression(node)&&isMemberExpressionSuper(node.left)){return this.specHandleAssignmentExpression(null,path,node,getThisReference)}if(!property)return;thisReference=getThisReference();var superProperty=this.getSuperProperty(property,computed,thisReference);if(args){if(args.length===1&&t.isSpreadElement(args[0])){return t.callExpression(t.memberExpression(superProperty,t.identifier("apply")),[thisReference,args[0].argument])}else{return t.callExpression(t.memberExpression(superProperty,t.identifier("call")),[thisReference].concat(args))}}else{return superProperty}};return ReplaceSupers}();exports["default"]=ReplaceSupers;module.exports=exports["default"]},{"../../messages":60,"../../types":196}],83:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _pipeline=require("./pipeline");var _pipeline2=_interopRequireDefault(_pipeline);var _transformers=require("./transformers");var _transformers2=_interopRequireDefault(_transformers);var _transformersDeprecated=require("./transformers/deprecated");var _transformersDeprecated2=_interopRequireDefault(_transformersDeprecated);var _transformersAliases=require("./transformers/aliases");var _transformersAliases2=_interopRequireDefault(_transformersAliases);var _transformersFilters=require("./transformers/filters");var filters=_interopRequireWildcard(_transformersFilters);var pipeline=new _pipeline2["default"];for(var key in _transformers2["default"]){var transformer=_transformers2["default"][key];if(typeof transformer==="object"){var metadata=transformer.metadata=transformer.metadata||{};metadata.group=metadata.group||"builtin-basic"}}pipeline.addTransformers(_transformers2["default"]);pipeline.addDeprecated(_transformersDeprecated2["default"]);pipeline.addAliases(_transformersAliases2["default"]);pipeline.addFilter(filters.internal);pipeline.addFilter(filters.blacklist);pipeline.addFilter(filters.whitelist);pipeline.addFilter(filters.stage);pipeline.addFilter(filters.optional);var transform=pipeline.transform.bind(pipeline);transform.fromAst=pipeline.transformFromAst.bind(pipeline);transform.pipeline=pipeline;exports["default"]=transform;module.exports=exports["default"]},{"./pipeline":97,"./transformers":143,"./transformers/aliases":101,"./transformers/deprecated":102,"./transformers/filters":142}],84:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _libMetadata=require("./lib/metadata");var metadataVisitor=_interopRequireWildcard(_libMetadata);var _messages=require("../../messages");var messages=_interopRequireWildcard(_messages);var _libRemaps=require("./lib/remaps");var _libRemaps2=_interopRequireDefault(_libRemaps);var _helpersObject=require("../../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _util=require("../../util");var util=_interopRequireWildcard(_util);var _types=require("../../types");var t=_interopRequireWildcard(_types);var DefaultFormatter=function(){function DefaultFormatter(file){_classCallCheck(this,DefaultFormatter);this.sourceScopes=_helpersObject2["default"]();this.defaultIds=_helpersObject2["default"]();this.ids=_helpersObject2["default"]();this.remaps=new _libRemaps2["default"](file,this);this.scope=file.scope;this.file=file;this.hasNonDefaultExports=false;this.hasLocalExports=false;this.hasLocalImports=false;this.localExports=_helpersObject2["default"]();this.localImports=_helpersObject2["default"]();this.metadata=file.metadata.modules;this.getMetadata()}DefaultFormatter.prototype.addScope=function addScope(path){var source=path.node.source&&path.node.source.value;if(!source)return;var existingScope=this.sourceScopes[source];if(existingScope&&existingScope!==path.scope){throw path.errorWithNode(messages.get("modulesDuplicateDeclarations"))}this.sourceScopes[source]=path.scope};DefaultFormatter.prototype.isModuleType=function isModuleType(node,type){var modules=this.file.dynamicImportTypes[type];return modules&&modules.indexOf(node)>=0};DefaultFormatter.prototype.transform=function transform(){this.remapAssignments()};DefaultFormatter.prototype.doDefaultExportInterop=function doDefaultExportInterop(node){return(t.isExportDefaultDeclaration(node)||t.isSpecifierDefault(node))&&!this.noInteropRequireExport&&!this.hasNonDefaultExports};DefaultFormatter.prototype.getMetadata=function getMetadata(){var has=false;var _arr=this.file.ast.program.body;for(var _i=0;_i<_arr.length;_i++){var node=_arr[_i];if(t.isModuleDeclaration(node)){has=true;break}}if(has||this.isLoose()){this.file.path.traverse(metadataVisitor,this)}};DefaultFormatter.prototype.remapAssignments=function remapAssignments(){if(this.hasLocalExports||this.hasLocalImports){this.remaps.run()}};DefaultFormatter.prototype.remapExportAssignment=function remapExportAssignment(node,exported){var assign=node;for(var i=0;i=0)continue;var msgType="pluginInvalidProperty";if(t.TYPES.indexOf(key)>=0)msgType="pluginInvalidPropertyVisitor";throw new Error(messages.get(msgType,name,key))}for(var key in plugin.metadata){if(VALID_METADATA_PROPERTES.indexOf(key)>=0)continue;throw new Error(messages.get("pluginInvalidProperty",name,"metadata."+key))}};Plugin.prototype.normalize=function normalize(visitor){_traversal2["default"].explode(visitor);return visitor};Plugin.prototype.buildPass=function buildPass(file){if(!(file instanceof _file2["default"])){throw new TypeError(messages.get("pluginNotFile",this.key))}return new _pluginPass2["default"](file,this)};return Plugin}();exports["default"]=Plugin;module.exports=exports["default"]},{"../messages":60,"../traversal":165,"../types":196,"./file":63,"./plugin-pass":98,"lodash/lang/clone":520,"lodash/object/assign":535}],100:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _plugin=require("./plugin");var _plugin2=_interopRequireDefault(_plugin);var Transformer=function Transformer(key,obj){_classCallCheck(this,Transformer);var plugin={};plugin.metadata=obj.metadata;delete obj.metadata;plugin.visitor=obj;return new _plugin2["default"](key,plugin)};exports["default"]=Transformer;module.exports=exports["default"]},{"./plugin":99}],101:[function(require,module,exports){module.exports={useStrict:"strict","es5.runtime":"runtime","es6.runtime":"runtime","minification.inlineExpressions":"minification.constantFolding"}},{}],102:[function(require,module,exports){module.exports={selfContained:"runtime","unicode-regex":"regex.unicode","spec.typeofSymbol":"es6.spec.symbols","es6.symbols":"es6.spec.symbols","es6.blockScopingTDZ":"es6.spec.blockScoping","utility.inlineExpressions":"minification.constantFolding","utility.deadCodeElimination":"minification.deadCodeElimination","utility.removeConsoleCalls":"minification.removeConsole","utility.removeDebugger":"minification.removeDebugger","es6.parameters.rest":"es6.parameters","es6.parameters.default":"es6.parameters"}},{}],103:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-trailing"};exports.metadata=metadata;var visitor={MemberExpression:{exit:function exit(node){var prop=node.property;if(!node.computed&&t.isIdentifier(prop)&&!t.isValidIdentifier(prop.name)){node.property=t.literal(prop.name);node.computed=true}}}};exports.visitor=visitor},{"../../../types":196}],104:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-trailing"};exports.metadata=metadata;var visitor={Property:{exit:function exit(node){var key=node.key;if(!node.computed&&t.isIdentifier(key)&&!t.isValidIdentifier(key.name)){node.key=t.literal(key.name)}}}};exports.visitor=visitor},{"../../../types":196}],105:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _helpersDefineMap=require("../../helpers/define-map");var defineMap=_interopRequireWildcard(_helpersDefineMap);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var visitor={ObjectExpression:function ObjectExpression(node,parent,scope,file){var hasAny=false;var _arr=node.properties;for(var _i=0;_i<_arr.length;_i++){var prop=_arr[_i];if(prop.kind==="get"||prop.kind==="set"){hasAny=true;break}}if(!hasAny)return;var mutatorMap={};node.properties=node.properties.filter(function(prop){if(prop.kind==="get"||prop.kind==="set"){defineMap.push(mutatorMap,prop,prop.kind,file);return false}else{return true}});return t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("defineProperties")),[node,defineMap.toDefineObject(mutatorMap)])}};exports.visitor=visitor},{"../../../types":196,"../../helpers/define-map":74}],106:[function(require,module,exports){"use strict";exports.__esModule=true;var visitor={ArrowFunctionExpression:function ArrowFunctionExpression(node){this.ensureBlock();node.expression=false;node.type="FunctionExpression";node.shadow=node.shadow||true}};exports.visitor=visitor; +},{}],107:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _traversal=require("../../../traversal");var _traversal2=_interopRequireDefault(_traversal);var _helpersObject=require("../../../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var _lodashObjectValues=require("lodash/object/values");var _lodashObjectValues2=_interopRequireDefault(_lodashObjectValues);var _lodashObjectExtend=require("lodash/object/extend");var _lodashObjectExtend2=_interopRequireDefault(_lodashObjectExtend);function isLet(node,parent){if(!t.isVariableDeclaration(node))return false;if(node._let)return true;if(node.kind!=="let")return false;if(isLetInitable(node,parent)){for(var i=0;i=0){return}loopText=loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(state.inSwitchCase)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.literal(loopText)}if(this.isReturnStatement()){state.hasReturn=true;replace=t.objectExpression([t.property("init",t.identifier("v"),node.argument||t.identifier("undefined"))])}if(replace){replace=t.returnStatement(replace);this.skip();return t.inherits(replace,node)}}};var BlockScoping=function(){function BlockScoping(loopPath,blockPath,parent,scope,file){_classCallCheck(this,BlockScoping);this.parent=parent;this.scope=scope;this.file=file;this.blockPath=blockPath;this.block=blockPath.node;this.outsideLetReferences=_helpersObject2["default"]();this.hasLetReferences=false;this.letReferences=this.block._letReferences=_helpersObject2["default"]();this.body=[];if(loopPath){this.loopParent=loopPath.parent;this.loopLabel=t.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=loopPath;this.loop=loopPath.node}}BlockScoping.prototype.run=function run(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block))return;if(!this.hasLetReferences)return;if(needsClosure){this.wrapClosure()}else{this.remap()}if(this.loopLabel&&!t.isLabeledStatement(this.loopParent)){return t.labeledStatement(this.loopLabel,this.loop)}};BlockScoping.prototype.remap=function remap(){var hasRemaps=false;var letRefs=this.letReferences;var scope=this.scope;var remaps=_helpersObject2["default"]();for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasBinding(key)||scope.hasGlobal(key)){var uid=scope.generateUidIdentifier(ref.name).name;ref.name=uid;hasRemaps=true;remaps[key]=remaps[uid]={binding:ref,uid:uid}}}if(!hasRemaps)return;var loop=this.loop;if(loop){traverseReplace(loop.right,loop,scope,remaps);traverseReplace(loop.test,loop,scope,remaps);traverseReplace(loop.update,loop,scope,remaps)}this.blockPath.traverse(replaceVisitor,remaps)};BlockScoping.prototype.wrapClosure=function wrapClosure(){var block=this.block;var outsideRefs=this.outsideLetReferences;if(this.loop){for(var name in outsideRefs){var id=outsideRefs[name];if(this.scope.hasGlobal(id.name)||this.scope.parentHasBinding(id.name)){delete outsideRefs[id.name];delete this.letReferences[id.name];this.scope.rename(id.name);this.letReferences[id.name]=id;outsideRefs[id.name]=id}}}this.has=this.checkLoop();this.hoistVarDeclarations();var params=_lodashObjectValues2["default"](outsideRefs);var args=_lodashObjectValues2["default"](outsideRefs);var fn=t.functionExpression(null,params,t.blockStatement(block.body));fn.shadow=true;this.addContinuations(fn);block.body=this.body;var ref=fn;if(this.loop){ref=this.scope.generateUidIdentifier("loop");this.loopPath.insertBefore(t.variableDeclaration("var",[t.variableDeclarator(ref,fn)]))}var call=t.callExpression(ref,args);var ret=this.scope.generateUidIdentifier("ret");var hasYield=_traversal2["default"].hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=_traversal2["default"].hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call)}this.buildClosure(ret,call)};BlockScoping.prototype.buildClosure=function buildClosure(ret,call){var has=this.has;if(has.hasReturn||has.hasBreakContinue){this.buildHas(ret,call)}else{this.body.push(t.expressionStatement(call))}};BlockScoping.prototype.addContinuations=function addContinuations(fn){var state={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(fn,continuationVisitor,state);for(var i=0;i=spreadPropIndex)break;if(t.isSpreadProperty(prop))continue;var key=prop.key;if(t.isIdentifier(key)&&!prop.computed)key=t.literal(prop.key.name);keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("object-without-properties"),[objRef,keys]);this.nodes.push(this.buildVariableAssignment(spreadProp.argument,value))};DestructuringTransformer.prototype.pushObjectProperty=function pushObjectProperty(prop,propRef){if(t.isLiteral(prop.key))prop.computed=true;var pattern=prop.value;var objRef=t.memberExpression(propRef,prop.key,prop.computed);if(t.isPattern(pattern)){this.push(pattern,objRef)}else{this.nodes.push(this.buildVariableAssignment(pattern,objRef))}};DestructuringTransformer.prototype.pushObjectPattern=function pushObjectPattern(pattern,objRef){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("object-destructuring-empty"),[objRef])))}if(pattern.properties.length>1&&!this.scope.isStatic(objRef)){var temp=this.scope.generateUidIdentifierBasedOnNode(objRef);this.nodes.push(this.buildVariableDeclaration(temp,objRef));objRef=temp}for(var i=0;iarr.elements.length)return;if(pattern.elements.length0){elemRef=t.callExpression(t.memberExpression(elemRef,t.identifier("slice")),[t.literal(i)])}elem=elem.argument}else{elemRef=t.memberExpression(arrayRef,t.literal(i),true)}this.push(elem,elemRef)}};DestructuringTransformer.prototype.init=function init(pattern,ref){if(!t.isArrayExpression(ref)&&!t.isMemberExpression(ref)){var memo=this.scope.maybeGenerateMemoised(ref,true);if(memo){this.nodes.push(this.buildVariableDeclaration(memo,ref));ref=memo}}this.push(pattern,ref);return this.nodes};return DestructuringTransformer}()},{"../../../messages":60,"../../../types":196}],113:[function(require,module,exports){"use strict";exports.__esModule=true;exports._ForOfStatementArray=_ForOfStatementArray;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _messages=require("../../../messages");var messages=_interopRequireWildcard(_messages);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var visitor={ForOfStatement:function ForOfStatement(node,parent,scope,file){if(this.get("right").isArrayExpression()){return _ForOfStatementArray.call(this,node,scope,file)}var callback=spec;if(file.isLoose("es6.forOf"))callback=loose;var build=callback(node,parent,scope,file);var declar=build.declar;var loop=build.loop;var block=loop.body;this.ensureBlock();if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);t.inherits(loop.body,node.body);if(build.replaceParent){this.parentPath.replaceWithMultiple(build.node);this.dangerouslyRemove()}else{return build.node}}};exports.visitor=visitor;function _ForOfStatementArray(node,scope){var nodes=[];var right=node.right;if(!t.isIdentifier(right)||!scope.hasBinding(right.name)){var uid=scope.generateUidIdentifier("arr");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,right)]));right=uid}var iterationKey=scope.generateUidIdentifier("i");var loop=util.template("for-of-array",{BODY:node.body,KEY:iterationKey,ARR:right});t.inherits(loop,node);t.ensureBlock(loop);var iterationValue=t.memberExpression(right,iterationKey,true);var left=node.left;if(t.isVariableDeclaration(left)){left.declarations[0].init=iterationValue;loop.body.body.unshift(left)}else{loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=",left,iterationValue)))}if(this.parentPath.isLabeledStatement()){loop=t.labeledStatement(this.parentPath.node.label,loop)}nodes.push(loop);return nodes}var loose=function loose(node,parent,scope,file){var left=node.left;var declar,id;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var isArrayKey=scope.generateUidIdentifier("isArray");var loop=util.template("for-of-loose",{LOOP_OBJECT:iteratorKey,IS_ARRAY:isArrayKey,OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}return{declar:declar,node:loop,loop:loop}};var spec=function spec(node,parent,scope,file){var left=node.left;var declar;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var template=util.template("for-of",{ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:iteratorKey,STEP_KEY:stepKey,OBJECT:node.right,BODY:null});var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}return{replaceParent:isLabeledParent,declar:declar,loop:loop,node:template}}},{"../../../messages":60,"../../../types":196,"../../../util":199}],114:[function(require,module,exports){"use strict";exports.__esModule=true;var metadata={group:"builtin-pre"};exports.metadata=metadata;var visitor={Literal:function Literal(node){if(typeof node.value==="number"&&/^0[ob]/i.test(node.raw)){node.raw=undefined}if(typeof node.value==="string"&&/\\[u]/gi.test(node.raw)){node.raw=undefined}}};exports.visitor=visitor},{}],115:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function keepBlockHoist(node,nodes){if(node._blockHoist){for(var i=0;ilastNonDefaultParam}var lastNonDefaultParam=_helpersGetFunctionArity2["default"](node);var params=this.get("params");for(var i=0;i",len,start),t.binaryExpression("-",len,start),t.literal(0))}var loop=util.template("rest",{ARRAY_TYPE:restParam.typeAnnotation,ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});if(state.deopted){loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)}else{loop._blockHoist=1;var target=this.getEarliestCommonAncestorFrom(state.references).getStatementParent();var highestLoop;target.findParent(function(path){if(path.isLoop()){highestLoop=path}else if(path.isFunction()){return true}});if(highestLoop)target=highestLoop;target.insertBefore(loop)}}};exports.visitor=visitor},{"../../../../types":196,"../../../../util":199}],120:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function loose(node,body,objId){var _arr=node.properties;for(var _i=0;_i<_arr.length;_i++){var prop=_arr[_i];body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(objId,prop.key,prop.computed||t.isLiteral(prop.key)),prop.value)))}}function spec(node,body,objId,initProps,file){var _arr2=node.properties;for(var _i2=0;_i2<_arr2.length;_i2++){var prop=_arr2[_i2];if(t.isLiteral(t.toComputedKey(prop),{value:"__proto__"})){initProps.push(prop);continue}var key=prop.key;if(t.isIdentifier(key)&&!prop.computed){key=t.literal(key.name)}var bodyNode=t.callExpression(file.addHelper("define-property"),[objId,key,prop.value]);body.push(t.expressionStatement(bodyNode))}if(body.length===1){var first=body[0].expression;if(t.isCallExpression(first)){first.arguments[0]=t.objectExpression(initProps);return first}}}var visitor={ObjectExpression:{exit:function exit(node,parent,scope,file){var hasComputed=false;var _arr3=node.properties;for(var _i3=0;_i3<_arr3.length;_i3++){var prop=_arr3[_i3];hasComputed=t.isProperty(prop,{computed:true,kind:"init"});if(hasComputed)break}if(!hasComputed)return;var initProps=[];var stopInits=false;node.properties=node.properties.filter(function(prop){if(prop.computed){stopInits=true}if(prop.kind!=="init"||!stopInits){initProps.push(prop);return false}else{return true}});var objId=scope.generateUidIdentifierBasedOnNode(parent);var body=[];var callback=spec;if(file.isLoose("es6.properties.computed"))callback=loose;var result=callback(node,body,objId,initProps,file);if(result)return result;body.unshift(t.variableDeclaration("var",[t.variableDeclarator(objId,t.objectExpression(initProps))]));body.push(t.expressionStatement(objId));return body}}};exports.visitor=visitor},{"../../../types":196}],121:[function(require,module,exports){"use strict";exports.__esModule=true;var visitor={Property:function Property(node){if(node.method){node.method=false}if(node.shorthand){node.shorthand=false}}};exports.visitor=visitor},{}],122:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _helpersRegex=require("../../helpers/regex");var regex=_interopRequireWildcard(_helpersRegex);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var visitor={Literal:function Literal(node){if(!regex.is(node,"y"))return;return t.newExpression(t.identifier("RegExp"),[t.literal(node.regex.pattern),t.literal(node.regex.flags)])}};exports.visitor=visitor},{"../../../types":196,"../../helpers/regex":80}],123:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _regexpuRewritePattern=require("regexpu/rewrite-pattern");var _regexpuRewritePattern2=_interopRequireDefault(_regexpuRewritePattern);var _helpersRegex=require("../../helpers/regex");var regex=_interopRequireWildcard(_helpersRegex);var visitor={Literal:function Literal(node){if(!regex.is(node,"u"))return;node.regex.pattern=_regexpuRewritePattern2["default"](node.regex.pattern,node.regex.flags);regex.pullFlag(node,"u")}};exports.visitor=visitor},{"../../helpers/regex":80,"regexpu/rewrite-pattern":610}],124:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-pre",optional:true};exports.metadata=metadata;var visitor={ArrowFunctionExpression:function ArrowFunctionExpression(node,parent,scope,file){if(node.shadow)return;node.shadow={"this":false};var boundThis=t.thisExpression();boundThis._forceShadow=this;t.ensureBlock(node);this.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(file.addHelper("new-arrow-check"),[t.thisExpression(),boundThis])));return t.callExpression(t.memberExpression(node,t.identifier("bind")),[t.thisExpression()])}};exports.visitor=visitor},{"../../../types":196}],125:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function buildAssert(node,file){return t.callExpression(file.addHelper("temporal-assert-defined"),[node,t.literal(node.name),file.addHelper("temporal-undefined")])}function references(node,scope,state){var declared=state.letRefs[node.name];if(!declared)return false;return scope.getBindingIdentifier(node.name)===declared}var refVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){if(t.isFor(parent)&&parent.left===node)return;if(!references(node,scope,state))return;var assert=buildAssert(node,state.file);this.skip();if(t.isUpdateExpression(parent)){if(parent._ignoreBlockScopingTDZ)return;this.parentPath.replaceWith(t.sequenceExpression([assert,parent]))}else{return t.logicalExpression("&&",assert,node)}},AssignmentExpression:{exit:function exit(node,parent,scope,state){if(node._ignoreBlockScopingTDZ)return;var nodes=[];var ids=this.getBindingIdentifiers();for(var name in ids){var id=ids[name];if(references(id,scope,state)){nodes.push(buildAssert(id,state.file))}}if(nodes.length){node._ignoreBlockScopingTDZ=true;nodes.push(node);return nodes.map(t.expressionStatement)}}}};var metadata={optional:true,group:"builtin-advanced"};exports.metadata=metadata;var visitor={"Program|Loop|BlockStatement":{exit:function exit(node,parent,scope,file){var letRefs=node._letReferences;if(!letRefs)return;this.traverse(refVisitor,{letRefs:letRefs,file:file})}}};exports.visitor=visitor},{"../../../types":196}],126:[function(require,module,exports){"use strict";exports.__esModule=true; +function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-pre",optional:true};exports.metadata=metadata;var visitor={Program:function Program(){var id=this.scope.generateUidIdentifier("null");this.unshiftContainer("body",[t.variableDeclaration("var",[t.variableDeclarator(id,t.literal(null))]),t.exportNamedDeclaration(null,[t.exportSpecifier(id,t.identifier("__proto__"))])])}};exports.visitor=visitor},{"../../../types":196}],127:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={optional:true};exports.metadata=metadata;var visitor={UnaryExpression:function UnaryExpression(node,parent,scope,file){if(node._ignoreSpecSymbols)return;if(this.parentPath.isBinaryExpression()&&t.EQUALITY_BINARY_OPERATORS.indexOf(parent.operator)>=0){var opposite=this.getOpposite();if(opposite.isLiteral()&&opposite.node.value!=="symbol"&&opposite.node.value!=="object")return}if(node.operator==="typeof"){var call=t.callExpression(file.addHelper("typeof"),[node.argument]);if(this.get("argument").isIdentifier()){var undefLiteral=t.literal("undefined");var unary=t.unaryExpression("typeof",node.argument);unary._ignoreSpecSymbols=true;return t.conditionalExpression(t.binaryExpression("===",unary,undefLiteral),undefLiteral,call)}else{return call}}},BinaryExpression:function BinaryExpression(node,parent,scope,file){if(node.operator==="instanceof"){return t.callExpression(file.addHelper("instanceof"),[node.left,node.right])}},"VariableDeclaration|FunctionDeclaration":function VariableDeclarationFunctionDeclaration(node){if(node._generated)this.skip()}};exports.visitor=visitor},{"../../../types":196}],128:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={optional:true,group:"builtin-pre"};exports.metadata=metadata;var visitor={TemplateLiteral:function TemplateLiteral(node,parent){if(t.isTaggedTemplateExpression(parent))return;for(var i=0;i0){var declarations=_lodashArrayFlatten2["default"](_lodashCollectionMap2["default"](this.vars,function(decl){return decl.declarations}));var assignment=_lodashCollectionReduceRight2["default"](declarations,function(expr,decl){return t.assignmentExpression("=",decl.id,expr)},t.identifier("undefined"));var statement=t.expressionStatement(assignment);statement._blockHoist=Infinity;body.unshift(statement)}var paramDecls=this.paramDecls;if(paramDecls.length>0){var paramDecl=t.variableDeclaration("var",paramDecls);paramDecl._blockHoist=Infinity;body.unshift(paramDecl)}body.unshift(t.expressionStatement(t.assignmentExpression("=",this.getAgainId(),t.literal(false))));node.body=util.template("tail-call-body",{FUNCTION_ID:this.getFunctionId(),AGAIN_ID:this.getAgainId(),BLOCK:node.body});var topVars=[];if(this.needsThis){var _arr=this.thisPaths;for(var _i=0;_i<_arr.length;_i++){var path=_arr[_i];path.replaceWith(this.getThisId())}topVars.push(t.variableDeclarator(this.getThisId(),t.thisExpression()))}if(this.needsArguments||this.setsArguments){var _arr2=this.argumentsPaths;for(var _i2=0;_i2<_arr2.length;_i2++){var _path=_arr2[_i2];_path.replaceWith(this.argumentsId)}var decl=t.variableDeclarator(this.argumentsId);if(this.argumentsId){decl.init=t.identifier("arguments");decl.init._shadowedFunctionLiteral=this.path}topVars.push(decl)}var leftId=this.leftId;if(leftId){topVars.push(t.variableDeclarator(leftId))}if(topVars.length>0){node.body.body.unshift(t.variableDeclaration("var",topVars))}};TailCallTransformer.prototype.subTransform=function subTransform(node){if(!node)return;var handler=this["subTransform"+node.type];if(handler)return handler.call(this,node)};TailCallTransformer.prototype.subTransformConditionalExpression=function subTransformConditionalExpression(node){var callConsequent=this.subTransform(node.consequent);var callAlternate=this.subTransform(node.alternate);if(!callConsequent&&!callAlternate){return}node.type="IfStatement";node.consequent=callConsequent?t.toBlock(callConsequent):returnBlock(node.consequent);if(callAlternate){node.alternate=t.isIfStatement(callAlternate)?callAlternate:t.toBlock(callAlternate)}else{node.alternate=returnBlock(node.alternate)}return[node]};TailCallTransformer.prototype.subTransformLogicalExpression=function subTransformLogicalExpression(node){var callRight=this.subTransform(node.right);if(!callRight)return;var leftId=this.getLeftId();var testExpr=t.assignmentExpression("=",leftId,node.left);if(node.operator==="&&"){testExpr=t.unaryExpression("!",testExpr)}return[t.ifStatement(testExpr,returnBlock(leftId))].concat(callRight)};TailCallTransformer.prototype.subTransformSequenceExpression=function subTransformSequenceExpression(node){var seq=node.expressions;var lastCall=this.subTransform(seq[seq.length-1]);if(!lastCall){return}if(--seq.length===1){node=seq[0]}return[t.expressionStatement(node)].concat(lastCall)};TailCallTransformer.prototype.subTransformCallExpression=function subTransformCallExpression(node){var callee=node.callee;var thisBinding,args;if(t.isMemberExpression(callee,{computed:false})&&t.isIdentifier(callee.property)){switch(callee.property.name){case"call":args=t.arrayExpression(node.arguments.slice(1));break;case"apply":args=node.arguments[1]||t.identifier("undefined");this.needsArguments=true;break;default:return}thisBinding=node.arguments[0];callee=callee.object}if(!t.isIdentifier(callee)||!this.scope.bindingIdentifierEquals(callee.name,this.ownerId)){return}this.hasTailRecursion=true;if(this.hasDeopt())return;var body=[];if(this.needsThis&&!t.isThisExpression(thisBinding)){body.push(t.expressionStatement(t.assignmentExpression("=",this.getThisId(),thisBinding||t.identifier("undefined"))))}if(!args){args=t.arrayExpression(node.arguments)}var argumentsId=this.getArgumentsId();var params=this.getParams();if(this.needsArguments){body.push(t.expressionStatement(t.assignmentExpression("=",argumentsId,args)))}if(t.isArrayExpression(args)){var elems=args.elements;while(elems.length1){var root=buildBinaryExpression(nodes.shift(),nodes.shift());var _arr3=nodes;for(var _i3=0;_i3<_arr3.length;_i3++){var _node=_arr3[_i3];root=buildBinaryExpression(root,_node)}this.replaceWith(root)}else{return nodes[0]}}};exports.visitor=visitor},{"../../../types":196}],132:[function(require,module,exports){"use strict";exports.__esModule=true;var metadata={stage:2};exports.metadata=metadata},{}],133:[function(require,module,exports){"use strict";exports.__esModule=true;var metadata={stage:0,dependencies:["es6.classes"]};exports.metadata=metadata},{}],134:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _helpersBuildComprehension=require("../../helpers/build-comprehension");var _helpersBuildComprehension2=_interopRequireDefault(_helpersBuildComprehension);var _traversal=require("../../../traversal");var _traversal2=_interopRequireDefault(_traversal);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={stage:0};exports.metadata=metadata;var visitor={ComprehensionExpression:function ComprehensionExpression(node,parent,scope){var callback=array;if(node.generator)callback=generator;return callback(node,parent,scope)}};exports.visitor=visitor;function generator(node){var body=[];var container=t.functionExpression(null,[],t.blockStatement(body),true);container.shadow=true;body.push(_helpersBuildComprehension2["default"](node,function(){return t.expressionStatement(t.yieldExpression(node.body))}));return t.callExpression(container,[])}function array(node,parent,scope){var uid=scope.generateUidIdentifierBasedOnNode(parent);var container=util.template("array-comprehension-container",{KEY:uid});container.callee.shadow=true;var block=container.callee.body;var body=block.body;if(_traversal2["default"].hasType(node,scope,"YieldExpression",t.FUNCTION_TYPES)){container.callee.generator=true;container=t.yieldExpression(container,true)}var returnStatement=body.pop();body.push(_helpersBuildComprehension2["default"](node,function(){return util.template("array-push",{STATEMENT:node.body,KEY:uid},true)}));body.push(returnStatement);return container}},{"../../../traversal":165,"../../../types":196,"../../../util":199,"../../helpers/build-comprehension":71}],135:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _helpersMemoiseDecorators=require("../../helpers/memoise-decorators");var _helpersMemoiseDecorators2=_interopRequireDefault(_helpersMemoiseDecorators);var _helpersDefineMap=require("../../helpers/define-map");var defineMap=_interopRequireWildcard(_helpersDefineMap);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={dependencies:["es6.classes"],optional:true,stage:1};exports.metadata=metadata;var visitor={ObjectExpression:function ObjectExpression(node,parent,scope,file){var hasDecorators=false;for(var i=0;i=1){nodes.push(node)}return nodes}};exports.visitor=visitor},{"../../../types":196}],139:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={optional:true,stage:0};exports.metadata=metadata;function getTempId(scope){var id=scope.path.getData("functionBind");if(id)return id;id=scope.generateDeclaredUidIdentifier("context");return scope.path.setData("functionBind",id)}function getStaticContext(bind,scope){var object=bind.object||bind.callee.object;return scope.isStatic(object)&&object}function inferBindContext(bind,scope){var staticContext=getStaticContext(bind,scope);if(staticContext)return staticContext;var tempId=getTempId(scope);if(bind.object){bind.callee=t.sequenceExpression([t.assignmentExpression("=",tempId,bind.object),bind.callee])}else{bind.callee.object=t.assignmentExpression("=",tempId,bind.callee.object)}return tempId}var visitor={CallExpression:function CallExpression(node,parent,scope){var bind=node.callee;if(!t.isBindExpression(bind))return;var context=inferBindContext(bind,scope);node.callee=t.memberExpression(bind.callee,t.identifier("call"));node.arguments.unshift(context)},BindExpression:function BindExpression(node,parent,scope){var context=inferBindContext(node,scope);return t.callExpression(t.memberExpression(node.callee,t.identifier("bind")),[context])}};exports.visitor=visitor},{"../../../types":196}],140:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={stage:2,dependencies:["es6.destructuring"]};exports.metadata=metadata;var hasSpread=function hasSpread(node){for(var i=0;i=opts.stage)return true}function optional(transformer,opts){if(transformer.metadata.optional&&!_lodashCollectionIncludes2["default"](opts.optional,transformer.key))return false}},{"lodash/collection/includes":439}],143:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]={"minification.constantFolding":require("babel-plugin-constant-folding"),strict:require("./other/strict"),eval:require("babel-plugin-eval"),_validation:require("./internal/validation"),_hoistDirectives:require("./internal/hoist-directives"),"minification.removeDebugger":require("babel-plugin-remove-debugger"),"minification.removeConsole":require("babel-plugin-remove-console"),"utility.inlineEnvironmentVariables":require("babel-plugin-inline-environment-variables"),"minification.deadCodeElimination":require("babel-plugin-dead-code-elimination"),_modules:require("./internal/modules"),"react.displayName":require("babel-plugin-react-display-name"),"es6.spec.modules":require("./es6/spec.modules"),"es6.spec.arrowFunctions":require("./es6/spec.arrow-functions"),"es6.spec.templateLiterals":require("./es6/spec.template-literals"),"es6.templateLiterals":require("./es6/template-literals"),"es6.literals":require("./es6/literals"),"validation.undeclaredVariableCheck":require("babel-plugin-undeclared-variables-check"),"spec.functionName":require("./spec/function-name"),"es7.classProperties":require("./es7/class-properties"),"es7.trailingFunctionCommas":require("./es7/trailing-function-commas"),"es7.asyncFunctions":require("./es7/async-functions"),"es7.decorators":require("./es7/decorators"),"validation.react":require("./validation/react"),"es6.arrowFunctions":require("./es6/arrow-functions"),"spec.blockScopedFunctions":require("./spec/block-scoped-functions"),"optimisation.react.constantElements":require("babel-plugin-react-constant-elements"),"optimisation.react.inlineElements":require("./optimisation/react.inline-elements"),"es7.comprehensions":require("./es7/comprehensions"),"es6.classes":require("./es6/classes"),asyncToGenerator:require("./other/async-to-generator"),bluebirdCoroutines:require("./other/bluebird-coroutines"),"es6.objectSuper":require("./es6/object-super"),"es7.objectRestSpread":require("./es7/object-rest-spread"),"es7.exponentiationOperator":require("./es7/exponentiation-operator"),"es5.properties.mutators":require("./es5/properties.mutators"),"es6.properties.shorthand":require("./es6/properties.shorthand"),"es6.properties.computed":require("./es6/properties.computed"),"optimisation.flow.forOf":require("./optimisation/flow.for-of"),"es6.forOf":require("./es6/for-of"),"es6.regex.sticky":require("./es6/regex.sticky"),"es6.regex.unicode":require("./es6/regex.unicode"),"es6.constants":require("./es6/constants"),"es7.exportExtensions":require("./es7/export-extensions"),"spec.protoToAssign":require("babel-plugin-proto-to-assign"),"es7.doExpressions":require("./es7/do-expressions"),"es6.spec.symbols":require("./es6/spec.symbols"),"es7.functionBind":require("./es7/function-bind"),"spec.undefinedToVoid":require("babel-plugin-undefined-to-void"),"es6.spread":require("./es6/spread"),"es6.parameters":require("./es6/parameters"),"es6.destructuring":require("./es6/destructuring"),"es6.blockScoping":require("./es6/block-scoping"),"es6.spec.blockScoping":require("./es6/spec.block-scoping"),reactCompat:require("./other/react-compat"),react:require("./other/react"),regenerator:require("./other/regenerator"),runtime:require("babel-plugin-runtime"),"es6.modules":require("./es6/modules"),_moduleFormatter:require("./internal/module-formatter"), +"es6.tailCall":require("./es6/tail-call"),_shadowFunctions:require("./internal/shadow-functions"),"es3.propertyLiterals":require("./es3/property-literals"),"es3.memberExpressionLiterals":require("./es3/member-expression-literals"),"minification.memberExpressionLiterals":require("babel-plugin-member-expression-literals"),"minification.propertyLiterals":require("babel-plugin-property-literals"),_blockHoist:require("./internal/block-hoist"),jscript:require("babel-plugin-jscript"),flow:require("./other/flow"),"optimisation.modules.system":require("./optimisation/modules.system")};module.exports=exports["default"]},{"./es3/member-expression-literals":103,"./es3/property-literals":104,"./es5/properties.mutators":105,"./es6/arrow-functions":106,"./es6/block-scoping":107,"./es6/classes":108,"./es6/constants":111,"./es6/destructuring":112,"./es6/for-of":113,"./es6/literals":114,"./es6/modules":115,"./es6/object-super":116,"./es6/parameters":118,"./es6/properties.computed":120,"./es6/properties.shorthand":121,"./es6/regex.sticky":122,"./es6/regex.unicode":123,"./es6/spec.arrow-functions":124,"./es6/spec.block-scoping":125,"./es6/spec.modules":126,"./es6/spec.symbols":127,"./es6/spec.template-literals":128,"./es6/spread":129,"./es6/tail-call":130,"./es6/template-literals":131,"./es7/async-functions":132,"./es7/class-properties":133,"./es7/comprehensions":134,"./es7/decorators":135,"./es7/do-expressions":136,"./es7/exponentiation-operator":137,"./es7/export-extensions":138,"./es7/function-bind":139,"./es7/object-rest-spread":140,"./es7/trailing-function-commas":141,"./internal/block-hoist":144,"./internal/hoist-directives":145,"./internal/module-formatter":146,"./internal/modules":147,"./internal/shadow-functions":148,"./internal/validation":149,"./optimisation/flow.for-of":150,"./optimisation/modules.system":151,"./optimisation/react.inline-elements":152,"./other/async-to-generator":153,"./other/bluebird-coroutines":154,"./other/flow":155,"./other/react":157,"./other/react-compat":156,"./other/regenerator":158,"./other/strict":159,"./spec/block-scoped-functions":160,"./spec/function-name":161,"./validation/react":162,"babel-plugin-constant-folding":200,"babel-plugin-dead-code-elimination":201,"babel-plugin-eval":202,"babel-plugin-inline-environment-variables":203,"babel-plugin-jscript":204,"babel-plugin-member-expression-literals":205,"babel-plugin-property-literals":206,"babel-plugin-proto-to-assign":207,"babel-plugin-react-constant-elements":208,"babel-plugin-react-display-name":209,"babel-plugin-remove-console":210,"babel-plugin-remove-debugger":211,"babel-plugin-runtime":213,"babel-plugin-undeclared-variables-check":214,"babel-plugin-undefined-to-void":216}],144:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashCollectionSortBy=require("lodash/collection/sortBy");var _lodashCollectionSortBy2=_interopRequireDefault(_lodashCollectionSortBy);var metadata={group:"builtin-trailing"};exports.metadata=metadata;var visitor={Block:{exit:function exit(node){var hasChange=false;for(var i=0;i=0){comment.value=comment.value.replace(FLOW_DIRECTIVE,"");if(!comment.value.replace(/\*/g,"").trim())comment._displayed=true}}},Flow:function Flow(){this.dangerouslyRemove()},ClassProperty:function ClassProperty(node){node.typeAnnotation=null;if(!node.value)this.dangerouslyRemove()},Class:function Class(node){node["implements"]=null},Function:function Function(node){for(var i=0;i0){nodePath=nodePath.get(keysAlongPath.pop())}return nodePath}},{"../../../types":196,regenerator:561}],159:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-pre"};exports.metadata=metadata;var THIS_BREAK_KEYS=["FunctionExpression","FunctionDeclaration","ClassProperty"];function isUseStrict(node){if(!t.isLiteral(node))return false;if(node.raw&&node.rawValue===node.value){return node.rawValue==="use strict"}else{return node.value==="use strict"}}var visitor={Program:{enter:function enter(program){var first=program.body[0];var directive;if(t.isExpressionStatement(first)&&isUseStrict(first.expression)){directive=first}else{directive=t.expressionStatement(t.literal("use strict"));this.unshiftContainer("body",directive);if(first){directive.leadingComments=first.leadingComments;first.leadingComments=[]}}directive._blockHoist=Infinity}},ThisExpression:function ThisExpression(){if(!this.findParent(function(path){return!path.is("shadow")&&THIS_BREAK_KEYS.indexOf(path.type)>=0})){return t.identifier("undefined")}}};exports.visitor=visitor},{"../../../types":196}],160:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function statementList(key,path){var paths=path.get(key);for(var i=0;i=0)continue;visited.push(path.node);if(path.visit()){stop=true;break}}var _arr3=queue;for(var _i3=0;_i3<_arr3.length;_i3++){var path=_arr3[_i3];path.shiftContext()}this.queue=null;return stop};TraversalContext.prototype.visitSingle=function visitSingle(node,key){if(this.shouldVisit(node[key])){var path=this.create(node,node,key);path.visit();path.shiftContext()}};TraversalContext.prototype.visit=function visit(node,key){var nodes=node[key];if(!nodes)return;if(Array.isArray(nodes)){return this.visitMultiple(nodes,node,key)}else{return this.visitSingle(node,key)}};return TraversalContext}();exports["default"]=TraversalContext;module.exports=exports["default"]},{"../types":196,"./path":172}],164:[function(require,module,exports){"use strict";exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var Hub=function Hub(file){_classCallCheck(this,Hub);this.file=file};exports["default"]=Hub;module.exports=exports["default"]},{}],165:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]=traverse;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _context=require("./context");var _context2=_interopRequireDefault(_context);var _visitors=require("./visitors");var visitors=_interopRequireWildcard(_visitors);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _types=require("../types");var t=_interopRequireWildcard(_types);function traverse(parent,opts,scope,state,parentPath){if(!parent)return;if(!opts)opts={};if(!opts.noScope&&!scope){if(parent.type!=="Program"&&parent.type!=="File"){throw new Error(messages.get("traverseNeedsParent",parent.type))}}visitors.explode(opts);if(Array.isArray(parent)){for(var i=0;icurrentKeyIndex){earliest=path}}return earliest})}function getDeepestCommonAncestorFrom(paths,filter){var _this=this;if(!paths.length){return this}if(paths.length===1){return paths[0]}var minDepth=Infinity;var lastCommonIndex,lastCommon;var ancestries=paths.map(function(path){var ancestry=[];do{ancestry.unshift(path)}while((path=path.parentPath)&&path!==_this);if(ancestry.length-1}function visit(){if(this.isBlacklisted())return false;if(this.opts.shouldSkip&&this.opts.shouldSkip(this))return false;this.call("enter");if(this.shouldSkip){return this.shouldStop}var node=this.node;var opts=this.opts;if(node){if(Array.isArray(node)){for(var i=0;i":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right}}if(path.isCallExpression()){var callee=path.get("callee");var context;var func;if(callee.isIdentifier()&&!path.scope.getBinding(callee.node.name,true)&&VALID_CALLEES.indexOf(callee.node.name)>=0){func=global[node.callee.name]}if(callee.isMemberExpression()){var object=callee.get("object");var property=callee.get("property");if(object.isIdentifier()&&property.isIdentifier()&&VALID_CALLEES.indexOf(object.node.name)>=0){context=global[object.node.name];func=context[property.node.name]}if(object.isLiteral()&&property.isIdentifier()){var type=typeof object.node.value;if(type==="string"||type==="number"){context=object.node.value;func=context[property.node.name]}}}if(func){var args=path.get("arguments").map(evaluate);if(!confident)return;return func.apply(context,args)}}confident=false}}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],171:[function(require,module,exports){"use strict";exports.__esModule=true;exports.getStatementParent=getStatementParent;exports.getOpposite=getOpposite;exports.getCompletionRecords=getCompletionRecords;exports.getSibling=getSibling;exports.get=get;exports._getKey=_getKey;exports._getPattern=_getPattern;exports.getBindingIdentifiers=getBindingIdentifiers;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _index=require("./index");var _index2=_interopRequireDefault(_index);var _types=require("../../types");var t=_interopRequireWildcard(_types);function getStatementParent(){var path=this;do{if(!path.parentPath||Array.isArray(path.container)&&path.isStatement()){break}else{path=path.parentPath}}while(path);if(path&&(path.isProgram()||path.isFile())){throw new Error("File/Program node, we can't possibly find a statement parent to this")}return path}function getOpposite(){if(this.key==="left"){return this.getSibling("right")}else if(this.key==="right"){return this.getSibling("left")}}function getCompletionRecords(){var paths=[];var add=function add(path){if(path)paths=paths.concat(path.getCompletionRecords())};if(this.isIfStatement()){add(this.get("consequent"));add(this.get("alternate"))}else if(this.isDoExpression()||this.isFor()||this.isWhile()){add(this.get("body"))}else if(this.isProgram()||this.isBlockStatement()){add(this.get("body").pop())}else if(this.isFunction()){return this.get("body").getCompletionRecords()}else if(this.isTryStatement()){add(this.get("block"));add(this.get("handler"));add(this.get("finalizer"))}else{paths.push(this)}return paths}function getSibling(key){return _index2["default"].get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:key})}function get(key,context){if(context===true)context=this.context;var parts=key.split(".");if(parts.length===1){return this._getKey(key,context)}else{return this._getPattern(parts,context)}}function _getKey(key,context){var _this=this;var node=this.node;var container=node[key];if(Array.isArray(container)){return container.map(function(_,i){return _index2["default"].get({listKey:key,parentPath:_this,parent:node,container:container,key:i}).setContext(context)})}else{return _index2["default"].get({parentPath:this,parent:node,container:node,key:key}).setContext(context)}}function _getPattern(parts,context){var path=this;var _arr=parts;for(var _i=0;_i<_arr.length;_i++){var part=_arr[_i];if(part==="."){path=path.parentPath}else{if(Array.isArray(path)){path=path[part]}else{path=path.get(part,context)}}}return path}function getBindingIdentifiers(duplicates){return t.getBindingIdentifiers(this.node,duplicates)}},{"../../types":196,"./index":172}],172:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _libVirtualTypes=require("./lib/virtual-types");var virtualTypes=_interopRequireWildcard(_libVirtualTypes);var _index=require("../index");var _index2=_interopRequireDefault(_index);var _lodashObjectAssign=require("lodash/object/assign");var _lodashObjectAssign2=_interopRequireDefault(_lodashObjectAssign);var _scope=require("../scope");var _scope2=_interopRequireDefault(_scope);var _types=require("../../types");var t=_interopRequireWildcard(_types);var NodePath=function(){function NodePath(hub,parent){_classCallCheck(this,NodePath);this.contexts=[];this.parent=parent;this.data={};this.hub=hub;this.shouldSkip=false;this.shouldStop=false;this.removed=false;this.state=null;this.opts=null;this.skipKeys=null;this.parentPath=null;this.context=null;this.container=null;this.listKey=null;this.inList=false;this.parentKey=null;this.key=null;this.node=null;this.scope=null;this.type=null;this.typeAnnotation=null}NodePath.get=function get(_ref){var hub=_ref.hub;var parentPath=_ref.parentPath;var parent=_ref.parent;var container=_ref.container;var listKey=_ref.listKey;var key=_ref.key;if(!hub&&parentPath){hub=parentPath.hub}var targetNode=container[key];var paths=parent._paths=parent._paths||[];var path;for(var i=0;i=0)continue;visitedScopes.push(violationScope);constantViolations.push(violation);if(violationScope===path.scope){constantViolations=[violation];break}}constantViolations=constantViolations.concat(functionConstantViolations);var _arr2=constantViolations;for(var _i2=0;_i2<_arr2.length;_i2++){var violation=_arr2[_i2];types.push(violation.getTypeAnnotation())}}if(types.length){return t.createUnionTypeAnnotation(types)}}function getConstantViolationsBefore(binding,path,functions){var violations=binding.constantViolations.slice();violations.unshift(binding.path);return violations.filter(function(violation){violation=violation.resolve();var status=violation._guessExecutionStatusRelativeTo(path);if(functions&&status==="function")functions.push(violation);return status==="before"})}function inferAnnotationFromBinaryExpression(name,path){var operator=path.node.operator;var right=path.get("right").resolve();var left=path.get("left").resolve();var target;if(left.isIdentifier({name:name})){target=right}else if(right.isIdentifier({name:name})){target=left}if(target){if(operator==="==="){return target.getTypeAnnotation()}else if(t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else{return}}else{if(operator!=="===")return}var typeofPath;var typePath;if(left.isUnaryExpression({operator:"typeof"})){typeofPath=left;typePath=right}else if(right.isUnaryExpression({operator:"typeof"})){typeofPath=right;typePath=left}if(!typePath&&!typeofPath)return;typePath=typePath.resolve();if(!typePath.isLiteral())return;var typeValue=typePath.node.value;if(typeof typeValue!=="string")return;if(!typeofPath.get("argument").isIdentifier({name:name}))return;return t.createTypeAnnotationBasedOnTypeof(typePath.node.value)}function getParentConditionalPath(path){var parentPath;while(parentPath=path.parentPath){if(parentPath.isIfStatement()||parentPath.isConditionalExpression()){if(path.key==="test"){return}else{return parentPath}}else{path=parentPath}}}function getConditionalAnnotation(path,name){var ifStatement=getParentConditionalPath(path);if(!ifStatement)return;var test=ifStatement.get("test");var paths=[test];var types=[];do{var _path=paths.shift().resolve();if(_path.isLogicalExpression()){paths.push(_path.get("left"));paths.push(_path.get("right"))}if(_path.isBinaryExpression()){var type=inferAnnotationFromBinaryExpression(name,_path);if(type)types.push(type)}}while(paths.length);if(types.length){return{typeAnnotation:t.createUnionTypeAnnotation(types),ifStatement:ifStatement}}else{return getConditionalAnnotation(ifStatement,name)}}module.exports=exports["default"]},{"../../../types":196}],175:[function(require,module,exports){"use strict";exports.__esModule=true;exports.VariableDeclarator=VariableDeclarator;exports.TypeCastExpression=TypeCastExpression;exports.NewExpression=NewExpression;exports.TemplateLiteral=TemplateLiteral;exports.UnaryExpression=UnaryExpression;exports.BinaryExpression=BinaryExpression;exports.LogicalExpression=LogicalExpression;exports.ConditionalExpression=ConditionalExpression;exports.SequenceExpression=SequenceExpression;exports.AssignmentExpression=AssignmentExpression;exports.UpdateExpression=UpdateExpression;exports.Literal=Literal;exports.ObjectExpression=ObjectExpression;exports.ArrayExpression=ArrayExpression;exports.RestElement=RestElement;exports.CallExpression=CallExpression;exports.TaggedTemplateExpression=TaggedTemplateExpression;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var _infererReference=require("./inferer-reference");exports.Identifier=_interopRequire(_infererReference);function VariableDeclarator(){var id=this.get("id");if(id.isIdentifier()){return this.get("init").getTypeAnnotation()}else{return}}function TypeCastExpression(node){return node.typeAnnotation}TypeCastExpression.validParent=true;function NewExpression(node){if(this.get("callee").isIdentifier()){return t.genericTypeAnnotation(node.callee)}}function TemplateLiteral(){return t.stringTypeAnnotation()}function UnaryExpression(node){var operator=node.operator;if(operator==="void"){return t.voidTypeAnnotation()}else if(t.NUMBER_UNARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.STRING_UNARY_OPERATORS.indexOf(operator)>=0){return t.stringTypeAnnotation()}else if(t.BOOLEAN_UNARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}}function BinaryExpression(node){var operator=node.operator;if(t.NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.BOOLEAN_BINARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}else if(operator==="+"){var right=this.get("right");var left=this.get("left");if(left.isBaseType("number")&&right.isBaseType("number")){return t.numberTypeAnnotation()}else if(left.isBaseType("string")||right.isBaseType("string")){return t.stringTypeAnnotation()}return t.unionTypeAnnotation([t.stringTypeAnnotation(),t.numberTypeAnnotation()])}}function LogicalExpression(){return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function ConditionalExpression(){return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function SequenceExpression(){return this.get("expressions").pop().getTypeAnnotation()}function AssignmentExpression(){return this.get("right").getTypeAnnotation()}function UpdateExpression(node){var operator=node.operator;if(operator==="++"||operator==="--"){return t.numberTypeAnnotation()}}function Literal(node){var value=node.value;if(typeof value==="string")return t.stringTypeAnnotation();if(typeof value==="number")return t.numberTypeAnnotation();if(typeof value==="boolean")return t.booleanTypeAnnotation();if(value===null)return t.voidTypeAnnotation();if(node.regex)return t.genericTypeAnnotation(t.identifier("RegExp"))}function ObjectExpression(){return t.genericTypeAnnotation(t.identifier("Object"))}function ArrayExpression(){return t.genericTypeAnnotation(t.identifier("Array"))}function RestElement(){return ArrayExpression()}RestElement.validParent=true;function Func(){return t.genericTypeAnnotation(t.identifier("Function"))}exports.Function=Func;exports.Class=Func;function CallExpression(){return resolveCall(this.get("callee"))}function TaggedTemplateExpression(){return resolveCall(this.get("tag"))}function resolveCall(callee){callee=callee.resolve();if(callee.isFunction()){if(callee.is("async")){if(callee.is("generator")){return t.genericTypeAnnotation(t.identifier("AsyncIterator"))}else{return t.genericTypeAnnotation(t.identifier("Promise"))}}else{if(callee.node.returnType){return callee.node.returnType}else{}}}}},{"../../../types":196,"./inferer-reference":174}],176:[function(require,module,exports){"use strict";exports.__esModule=true;exports.matchesPattern=matchesPattern;exports.has=has;exports.isnt=isnt;exports.equals=equals;exports.isNodeType=isNodeType;exports.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;exports.isCompletionRecord=isCompletionRecord;exports.isStatementOrBlock=isStatementOrBlock;exports.referencesImport=referencesImport;exports.getSource=getSource;exports.willIMaybeExecuteBefore=willIMaybeExecuteBefore;exports._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;exports.resolve=resolve;exports._resolve=_resolve;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _types=require("../../types");var t=_interopRequireWildcard(_types); +function matchesPattern(pattern,allowPartial){if(!this.isMemberExpression())return false;var parts=pattern.split(".");var search=[this.node];var i=0;function matches(name){var part=parts[i];return part==="*"||name===part}while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(!matches(node.name))return false}else if(t.isLiteral(node)){if(!matches(node.value))return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.unshift(node.property);search.unshift(node.object);continue}}else if(t.isThisExpression(node)){if(!matches("this"))return false}else{return false}if(++i>parts.length){return false}}return i===parts.length}function has(key){var val=this.node[key];if(val&&Array.isArray(val)){return!!val.length}else{return!!val}}var is=has;exports.is=is;function isnt(key){return!this.has(key)}function equals(key,value){return this.node[key]===value}function isNodeType(type){return t.isType(this.type,type)}function canHaveVariableDeclarationOrExpression(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function isCompletionRecord(allowInsideFunction){var path=this;var first=true;do{var container=path.container;if(path.isFunction()&&!first){return!!allowInsideFunction}first=false;if(Array.isArray(container)&&path.key!==container.length-1){return false}}while((path=path.parentPath)&&!path.isProgram());return true}function isStatementOrBlock(){if(this.parentPath.isLabeledStatement()||t.isBlockStatement(this.container)){return false}else{return _lodashCollectionIncludes2["default"](t.STATEMENT_OR_BLOCK_KEYS,this.key)}}function referencesImport(moduleSource,importName){if(!this.isReferencedIdentifier())return false;var binding=this.scope.getBinding(this.node.name);if(!binding||binding.kind!=="module")return false;var path=binding.path;var parent=path.parentPath;if(!parent.isImportDeclaration())return false;if(parent.node.source.value===moduleSource){if(!importName)return true}else{return false}if(path.isImportDefaultSpecifier()&&importName==="default"){return true}if(path.isImportNamespaceSpecifier()&&importName==="*"){return true}if(path.isImportSpecifier()&&path.node.imported.name===importName){return true}return false}function getSource(){var node=this.node;if(node.end){return this.hub.file.code.slice(node.start,node.end)}else{return""}}function willIMaybeExecuteBefore(target){return this._guessExecutionStatusRelativeTo(target)!=="after"}function _guessExecutionStatusRelativeTo(target){var targetFuncParent=target.scope.getFunctionParent();var selfFuncParent=this.scope.getFunctionParent();if(targetFuncParent!==selfFuncParent){return"function"}var targetPaths=target.getAncestry();var selfPaths=this.getAncestry();var commonPath;var targetIndex;var selfIndex;for(selfIndex=0;selfIndex=0){commonPath=selfPath;break}}if(!commonPath){return"before"}var targetRelationship=targetPaths[targetIndex-1];var selfRelationship=selfPaths[selfIndex-1];if(!targetRelationship||!selfRelationship){return"before"}if(targetRelationship.listKey&&targetRelationship.container===selfRelationship.container){return targetRelationship.key>selfRelationship.key?"before":"after"}var targetKeyPosition=t.VISITOR_KEYS[targetRelationship.type].indexOf(targetRelationship.key);var selfKeyPosition=t.VISITOR_KEYS[selfRelationship.type].indexOf(selfRelationship.key);return targetKeyPosition>selfKeyPosition?"before":"after"}function resolve(dangerous,resolved){return this._resolve(dangerous,resolved)||this}function _resolve(dangerous,resolved){if(resolved&&resolved.indexOf(this)>=0)return;resolved=resolved||[];resolved.push(this);if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve(dangerous,resolved)}else{}}else if(this.isReferencedIdentifier()){var binding=this.scope.getBinding(this.node.name);if(!binding)return;if(!binding.constant)return;if(binding.kind==="module")return;if(binding.path!==this){return binding.path.resolve(dangerous,resolved)}}else if(this.isTypeCastExpression()){return this.get("expression").resolve(dangerous,resolved)}else if(dangerous&&this.isMemberExpression()){var targetKey=this.toComputedKey();if(!t.isLiteral(targetKey))return;var targetName=targetKey.value;var target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){var props=target.get("properties");var _arr=props;for(var _i=0;_i<_arr.length;_i++){var prop=_arr[_i];if(!prop.isProperty())continue;var key=prop.get("key");var match=prop.isnt("computed")&&key.isIdentifier({name:targetName});match=match||key.isLiteral({value:targetName});if(match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){var elems=target.get("elements");var elem=elems[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}},{"../../types":196,"lodash/collection/includes":439}],177:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _transformationHelpersReact=require("../../../transformation/helpers/react");var react=_interopRequireWildcard(_transformationHelpersReact);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){if(this.isJSXIdentifier()&&react.isCompatTag(node.name)){return}var binding=scope.getBinding(node.name);if(!binding)return;if(binding!==state.scope.getBinding(node.name))return;if(binding.constant){state.bindings[node.name]=binding}else{var _arr=binding.constantViolations;for(var _i=0;_i<_arr.length;_i++){var violationPath=_arr[_i];state.breakOnScopePaths=state.breakOnScopePaths.concat(violationPath.getAncestry())}}}};var PathHoister=function(){function PathHoister(path,scope){_classCallCheck(this,PathHoister);this.breakOnScopePaths=[];this.bindings={};this.scopes=[];this.scope=scope;this.path=path}PathHoister.prototype.isCompatibleScope=function isCompatibleScope(scope){for(var key in this.bindings){var binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier)){return false}}return true};PathHoister.prototype.getCompatibleScopes=function getCompatibleScopes(){var scope=this.path.scope;do{if(this.isCompatibleScope(scope)){this.scopes.push(scope)}else{break}if(this.breakOnScopePaths.indexOf(scope.path)>=0){break}}while(scope=scope.parent)};PathHoister.prototype.getAttachmentPath=function getAttachmentPath(){var scopes=this.scopes;var scope=scopes.pop();if(!scope)return;if(scope.path.isFunction()){if(this.hasOwnParamBindings(scope)){if(this.scope===scope)return;return scope.path.get("body").get("body")[0]}else{return this.getNextScopeStatementParent()}}else if(scope.path.isProgram()){return this.getNextScopeStatementParent()}};PathHoister.prototype.getNextScopeStatementParent=function getNextScopeStatementParent(){var scope=this.scopes.pop();if(scope)return scope.path.getStatementParent()};PathHoister.prototype.hasOwnParamBindings=function hasOwnParamBindings(scope){for(var name in this.bindings){if(!scope.hasOwnBinding(name))continue;var binding=this.bindings[name];if(binding.kind==="param")return true}return false};PathHoister.prototype.run=function run(){var node=this.path.node;if(node._hoisted)return;node._hoisted=true;this.path.traverse(referenceVisitor,this);this.getCompatibleScopes();var attachTo=this.getAttachmentPath();if(!attachTo)return;if(attachTo.getFunctionParent()===this.path.getFunctionParent())return;var uid=attachTo.scope.generateUidIdentifier("ref");attachTo.insertBefore([t.variableDeclaration("var",[t.variableDeclarator(uid,this.path.node)])]);var parent=this.path.parentPath;if(parent.isJSXElement()&&this.path.container===parent.node.children){uid=t.JSXExpressionContainer(uid)}this.path.replaceWith(uid)};return PathHoister}();exports["default"]=PathHoister;module.exports=exports["default"]},{"../../../transformation/helpers/react":79,"../../../types":196}],178:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var pre=[function(self){if(self.key==="body"&&(self.isBlockStatement()||self.isClassBody())){self.node.body=[];return true}},function(self,parent){var replace=false;replace=replace||self.key==="body"&&parent.isArrowFunctionExpression();replace=replace||self.key==="argument"&&parent.isThrowStatement();if(replace){self.replaceWith(t.identifier("undefined"));return true}}];exports.pre=pre;var post=[function(self,parent){var removeParent=false;removeParent=removeParent||self.key==="test"&&(parent.isWhile()||parent.isSwitchCase());removeParent=removeParent||self.key==="declaration"&&parent.isExportDeclaration();removeParent=removeParent||self.key==="body"&&parent.isLabeledStatement();removeParent=removeParent||self.listKey==="declarations"&&parent.isVariableDeclaration()&&parent.node.declarations.length===0;removeParent=removeParent||self.key==="expression"&&parent.isExpressionStatement();removeParent=removeParent||self.key==="test"&&parent.isIfStatement();if(removeParent){parent.dangerouslyRemove();return true}},function(self,parent){if(parent.isSequenceExpression()&&parent.node.expressions.length===1){parent.replaceWith(parent.node.expressions[0]);return true}},function(self,parent){if(parent.isBinary()){if(self.key==="left"){parent.replaceWith(parent.node.right)}else{parent.replaceWith(parent.node.left)}return true}}];exports.post=post},{"../../../types":196}],179:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _transformationHelpersReact=require("../../../transformation/helpers/react");var react=_interopRequireWildcard(_transformationHelpersReact);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function checkPath(_ref,opts){var node=_ref.node;var parent=_ref.parent;if(!t.isIdentifier(node,opts)){if(t.isJSXIdentifier(node,opts)){if(react.isCompatTag(node.name))return false}else{return false}}return t.isReferenced(node,parent)}};exports.ReferencedIdentifier=ReferencedIdentifier;var BindingIdentifier={types:["Identifier"],checkPath:function checkPath(_ref2){var node=_ref2.node;var parent=_ref2.parent;return t.isBinding(node,parent)}};exports.BindingIdentifier=BindingIdentifier;var Statement={types:["Statement"],checkPath:function checkPath(_ref3){var node=_ref3.node;var parent=_ref3.parent;if(t.isStatement(node)){if(t.isVariableDeclaration(node)){if(t.isForXStatement(parent,{left:node}))return false;if(t.isForStatement(parent,{init:node}))return false}return true}else{return false}}};exports.Statement=Statement;var Expression={types:["Expression"],checkPath:function checkPath(path){if(path.isIdentifier()){return path.isReferencedIdentifier()}else{return t.isExpression(path.node)}}};exports.Expression=Expression;var Scope={types:["Scopable"],checkPath:function checkPath(path){return t.isScope(path.node,path.parent)}};exports.Scope=Scope;var Referenced={checkPath:function checkPath(path){return t.isReferenced(path.node,path.parent)}};exports.Referenced=Referenced;var BlockScoped={checkPath:function checkPath(path){return t.isBlockScoped(path.node)}};exports.BlockScoped=BlockScoped;var Var={types:["VariableDeclaration"],checkPath:function checkPath(path){return t.isVar(path.node)}};exports.Var=Var;var DirectiveLiteral={types:["Literal"],checkPath:function checkPath(path){return path.isLiteral()&&path.parentPath.isExpressionStatement()}};exports.DirectiveLiteral=DirectiveLiteral;var Directive={types:["ExpressionStatement"],checkPath:function checkPath(path){return path.get("expression").isLiteral()}};exports.Directive=Directive;var User={checkPath:function checkPath(path){return path.node&&!!path.node.loc}};exports.User=User;var Generated={checkPath:function checkPath(path){return!path.isUser()}};exports.Generated=Generated;var Flow={types:["Flow","ImportDeclaration","ExportDeclaration"],checkPath:function checkPath(_ref4){var node=_ref4.node;if(t.isFlow(node)){return true}else if(t.isImportDeclaration(node)){return node.importKind==="type"||node.importKind==="typeof"}else if(t.isExportDeclaration(node)){return node.exportKind==="type"}else{return false}}};exports.Flow=Flow},{"../../../transformation/helpers/react":79,"../../../types":196}],180:[function(require,module,exports){"use strict";exports.__esModule=true;exports.insertBefore=insertBefore;exports._containerInsert=_containerInsert;exports._containerInsertBefore=_containerInsertBefore;exports._containerInsertAfter=_containerInsertAfter;exports._maybePopFromStatements=_maybePopFromStatements;exports.insertAfter=insertAfter;exports.updateSiblingKeys=updateSiblingKeys;exports._verifyNodeList=_verifyNodeList;exports.unshiftContainer=unshiftContainer;exports.pushContainer=pushContainer;exports.hoist=hoist;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _libHoister=require("./lib/hoister");var _libHoister2=_interopRequireDefault(_libHoister);var _index=require("./index");var _index2=_interopRequireDefault(_index);var _types=require("../../types");var t=_interopRequireWildcard(_types);function insertBefore(nodes){this._assertUnremoved();nodes=this._verifyNodeList(nodes);if(this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement()){return this.parentPath.insertBefore(nodes)}else if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&this.key==="init"){if(this.node)nodes.push(this.node);this.replaceExpressionWithStatements(nodes)}else{this._maybePopFromStatements(nodes);if(Array.isArray(this.container)){return this._containerInsertBefore(nodes)}else if(this.isStatementOrBlock()){if(this.node)nodes.push(this.node);this.node=this.container[this.key]=t.blockStatement(nodes)}else{throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}return[this]}function _containerInsert(from,nodes){this.updateSiblingKeys(from,nodes.length);var paths=[];for(var i=0;i=fromIndex){path.key+=incrementBy}}}function _verifyNodeList(nodes){if(nodes.constructor!==Array){nodes=[nodes]}for(var i=0;i1)id+=i;return"_"+id};Scope.prototype.generateUidIdentifierBasedOnNode=function generateUidIdentifierBasedOnNode(parent,defaultName){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isProperty(node)){node=node.key}var parts=[];var add=function add(node){if(t.isModuleDeclaration(node)){if(node.source){add(node.source)}else if(node.specifiers&&node.specifiers.length){var _arr4=node.specifiers;for(var _i4=0;_i4<_arr4.length;_i4++){var specifier=_arr4[_i4];add(specifier)}}else if(node.declaration){add(node.declaration)}}else if(t.isModuleSpecifier(node)){add(node.local)}else if(t.isMemberExpression(node)){add(node.object);add(node.property)}else if(t.isIdentifier(node)){parts.push(node.name)}else if(t.isLiteral(node)){parts.push(node.value)}else if(t.isCallExpression(node)){add(node.callee)}else if(t.isObjectExpression(node)||t.isObjectPattern(node)){var _arr5=node.properties;for(var _i5=0;_i5<_arr5.length;_i5++){var prop=_arr5[_i5];add(prop.key||prop.argument)}}};add(node);var id=parts.join("$");id=id.replace(/^_/,"")||defaultName||"ref";return this.generateUidIdentifier(id)};Scope.prototype.isStatic=function isStatic(node){if(t.isThisExpression(node)||t.isSuper(node)){return true}if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(binding){return binding.constant}else{return this.hasBinding(node.name)}}return false};Scope.prototype.maybeGenerateMemoised=function maybeGenerateMemoised(node,dontPush){if(this.isStatic(node)){return null}else{var id=this.generateUidIdentifierBasedOnNode(node);if(!dontPush)this.push({id:id});return id}};Scope.prototype.checkBlockScopedCollisions=function checkBlockScopedCollisions(local,kind,name,id){if(kind==="param")return;if(kind==="hoisted"&&local.kind==="let")return;var duplicate=false;if(!duplicate)duplicate=kind==="let"||local.kind==="let"||local.kind==="const"||local.kind==="module";if(!duplicate)duplicate=local.kind==="param"&&(kind==="let"||kind==="const");if(duplicate){throw this.hub.file.errorWithNode(id,messages.get("scopeDuplicateDeclaration",name),TypeError)}};Scope.prototype.rename=function rename(oldName,newName,block){newName=newName||this.generateUidIdentifier(oldName).name;var info=this.getBinding(oldName);if(!info)return;var state={newName:newName,oldName:oldName,binding:info.identifier,info:info};var scope=info.scope;scope.traverse(block||scope.block,renameVisitor,state);if(!block){scope.removeOwnBinding(oldName);scope.bindings[newName]=info;state.binding.name=newName}var file=this.hub.file;if(file){this._renameFromMap(file.moduleFormatter.localImports,oldName,newName,state.binding)}};Scope.prototype._renameFromMap=function _renameFromMap(map,oldName,newName,value){if(map[oldName]){map[newName]=value;map[oldName]=null}};Scope.prototype.dump=function dump(){var sep=_repeating2["default"]("-",60);console.log(sep);var scope=this;do{console.log("#",scope.block.type);for(var name in scope.bindings){var binding=scope.bindings[name];console.log(" -",name,{constant:binding.constant,references:binding.references,kind:binding.kind})}}while(scope=scope.parent);console.log(sep)};Scope.prototype.toArray=function toArray(node,i){var file=this.hub.file;if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(binding&&binding.constant&&binding.path.isGenericType("Array"))return node}if(t.isArrayExpression(node)){return node}if(t.isIdentifier(node,{name:"arguments"})){return t.callExpression(t.memberExpression(file.addHelper("slice"),t.identifier("call")),[node])}var helperName="to-array";var args=[node];if(i===true){helperName="to-consumable-array"}else if(i){args.push(t.literal(i));helperName="sliced-to-array";if(this.hub.file.isLoose("es6.forOf"))helperName+="-loose"}return t.callExpression(file.addHelper(helperName),args)};Scope.prototype.registerDeclaration=function registerDeclaration(path){if(path.isLabeledStatement()){this.registerBinding("label",path)}else if(path.isFunctionDeclaration()){this.registerBinding("hoisted",path)}else if(path.isVariableDeclaration()){var declarations=path.get("declarations");var _arr6=declarations;for(var _i6=0;_i6<_arr6.length;_i6++){var declar=_arr6[_i6];this.registerBinding(path.node.kind,declar)}}else if(path.isClassDeclaration()){this.registerBinding("let",path)}else if(path.isImportDeclaration()){var specifiers=path.get("specifiers");var _arr7=specifiers;for(var _i7=0;_i7<_arr7.length;_i7++){var specifier=_arr7[_i7];this.registerBinding("module",specifier)}}else if(path.isExportDeclaration()){var declar=path.get("declaration");if(declar.isClassDeclaration()||declar.isFunctionDeclaration()||declar.isVariableDeclaration()){this.registerDeclaration(declar)}}else{this.registerBinding("unknown",path)}};Scope.prototype.registerConstantViolation=function registerConstantViolation(root,left,right){var ids=left.getBindingIdentifiers();for(var name in ids){var binding=this.getBinding(name);if(binding)binding.reassign(root,left,right)}};Scope.prototype.registerBinding=function registerBinding(kind,path){if(!kind)throw new ReferenceError("no `kind`");if(path.isVariableDeclaration()){var declarators=path.get("declarations");var _arr8=declarators;for(var _i8=0;_i8<_arr8.length;_i8++){var declar=_arr8[_i8];this.registerBinding(kind,declar)}return}var parent=this.getProgramParent();var ids=path.getBindingIdentifiers(true);for(var name in ids){var _arr9=ids[name];for(var _i9=0;_i9<_arr9.length;_i9++){var id=_arr9[_i9];var local=this.getOwnBinding(name);if(local){if(local.identifier===id)continue;this.checkBlockScopedCollisions(local,kind,name,id)}parent.references[name]=true;this.bindings[name]=new _binding2["default"]({identifier:id,existing:local,scope:this,path:path,kind:kind})}}};Scope.prototype.addGlobal=function addGlobal(node){this.globals[node.name]=node};Scope.prototype.hasUid=function hasUid(name){var scope=this;do{if(scope.uids[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasGlobal=function hasGlobal(name){var scope=this;do{if(scope.globals[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasReference=function hasReference(name){var scope=this;do{if(scope.references[name])return true}while(scope=scope.parent);return false};Scope.prototype.isPure=function isPure(node,constantsOnly){if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(!binding)return false;if(constantsOnly)return binding.constant;return true}else if(t.isClass(node)){return!node.superClass||this.isPure(node.superClass,constantsOnly)}else if(t.isBinary(node)){return this.isPure(node.left,constantsOnly)&&this.isPure(node.right,constantsOnly)}else if(t.isArrayExpression(node)){var _arr10=node.elements;for(var _i10=0;_i10<_arr10.length;_i10++){var elem=_arr10[_i10];if(!this.isPure(elem,constantsOnly))return false}return true}else if(t.isObjectExpression(node)){var _arr11=node.properties;for(var _i11=0;_i11<_arr11.length;_i11++){var prop=_arr11[_i11];if(!this.isPure(prop,constantsOnly))return false}return true}else if(t.isProperty(node)){if(node.computed&&!this.isPure(node.key,constantsOnly))return false;return this.isPure(node.value,constantsOnly)}else{return t.isPure(node)}};Scope.prototype.setData=function setData(key,val){return this.data[key]=val};Scope.prototype.getData=function getData(key){var scope=this;do{var data=scope.data[key];if(data!=null)return data}while(scope=scope.parent)};Scope.prototype.removeData=function removeData(key){var scope=this;do{var data=scope.data[key];if(data!=null)scope.data[key]=null}while(scope=scope.parent)};Scope.prototype.init=function init(){if(!this.references)this.crawl()};Scope.prototype.crawl=function crawl(){var path=this.path;var info=this.block._scopeInfo;if(info)return _lodashObjectExtend2["default"](this,info);info=this.block._scopeInfo={references:_helpersObject2["default"](),bindings:_helpersObject2["default"](),globals:_helpersObject2["default"](),uids:_helpersObject2["default"](),data:_helpersObject2["default"]()};_lodashObjectExtend2["default"](this,info);if(path.isLoop()){var _arr12=t.FOR_INIT_KEYS;for(var _i12=0;_i12<_arr12.length;_i12++){var key=_arr12[_i12];var node=path.get(key);if(node.isBlockScoped())this.registerBinding(node.node.kind,node)}}if(path.isFunctionExpression()&&path.has("id")){if(!t.isProperty(path.parent,{method:true})){this.registerBinding("var",path)}}if(path.isClassExpression()&&path.has("id")){this.registerBinding("var",path)}if(path.isFunction()){var params=path.get("params");var _arr13=params;for(var _i13=0;_i13<_arr13.length;_i13++){var param=_arr13[_i13];this.registerBinding("param",param)}}if(path.isCatchClause()){this.registerBinding("let",path)}if(path.isComprehensionExpression()){this.registerBinding("let",path)}var parent=this.getProgramParent();if(parent.crawling)return;this.crawling=true;path.traverse(collectorVisitor);this.crawling=false};Scope.prototype.push=function push(opts){var path=this.path;if(path.isSwitchStatement()){path=this.getFunctionParent().path}if(path.isLoop()||path.isCatchClause()||path.isFunction()){t.ensureBlock(path.node);path=path.get("body")}if(!path.isBlockStatement()&&!path.isProgram()){path=this.getBlockParent().path}var unique=opts.unique;var kind=opts.kind||"var";var blockHoist=opts._blockHoist==null?2:opts._blockHoist;var dataKey="declaration:"+kind+":"+blockHoist;var declarPath=!unique&&path.getData(dataKey);if(!declarPath){var declar=t.variableDeclaration(kind,[]);declar._generated=true;declar._blockHoist=blockHoist;this.hub.file.attachAuxiliaryComment(declar);var _path$unshiftContainer=path.unshiftContainer("body",[declar]);declarPath=_path$unshiftContainer[0];if(!unique)path.setData(dataKey,declarPath)}var declarator=t.variableDeclarator(opts.id,opts.init);declarPath.node.declarations.push(declarator);this.registerBinding(kind,declarPath.get("declarations").pop())};Scope.prototype.getProgramParent=function getProgramParent(){var scope=this;do{if(scope.path.isProgram()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getFunctionParent=function getFunctionParent(){var scope=this;do{if(scope.path.isFunctionParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getBlockParent=function getBlockParent(){var scope=this;do{if(scope.path.isBlockParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")};Scope.prototype.getAllBindings=function getAllBindings(){var ids=_helpersObject2["default"]();var scope=this;do{_lodashObjectDefaults2["default"](ids,scope.bindings);scope=scope.parent}while(scope);return ids};Scope.prototype.getAllBindingsOfKind=function getAllBindingsOfKind(){var ids=_helpersObject2["default"]();var _arr14=arguments;for(var _i14=0;_i14<_arr14.length;_i14++){var kind=_arr14[_i14];var scope=this;do{for(var name in scope.bindings){var binding=scope.bindings[name];if(binding.kind===kind)ids[name]=binding}scope=scope.parent}while(scope)}return ids};Scope.prototype.bindingIdentifierEquals=function bindingIdentifierEquals(name,node){return this.getBindingIdentifier(name)===node};Scope.prototype.getBinding=function getBinding(name){var scope=this;do{var binding=scope.getOwnBinding(name);if(binding)return binding}while(scope=scope.parent)};Scope.prototype.getOwnBinding=function getOwnBinding(name){return this.bindings[name]};Scope.prototype.getBindingIdentifier=function getBindingIdentifier(name){var info=this.getBinding(name);return info&&info.identifier};Scope.prototype.getOwnBindingIdentifier=function getOwnBindingIdentifier(name){var binding=this.bindings[name];return binding&&binding.identifier};Scope.prototype.hasOwnBinding=function hasOwnBinding(name){return!!this.getOwnBinding(name)};Scope.prototype.hasBinding=function hasBinding(name,noGlobals){if(!name)return false;if(this.hasOwnBinding(name))return true;if(this.parentHasBinding(name,noGlobals))return true;if(this.hasUid(name))return true;if(!noGlobals&&_lodashCollectionIncludes2["default"](Scope.globals,name))return true;if(!noGlobals&&_lodashCollectionIncludes2["default"](Scope.contextVariables,name))return true;return false};Scope.prototype.parentHasBinding=function parentHasBinding(name,noGlobals){return this.parent&&this.parent.hasBinding(name,noGlobals)};Scope.prototype.moveBindingTo=function moveBindingTo(name,scope){var info=this.getBinding(name);if(info){info.scope.removeOwnBinding(name);info.scope=scope;scope.bindings[name]=info}};Scope.prototype.removeOwnBinding=function removeOwnBinding(name){delete this.bindings[name]};Scope.prototype.removeBinding=function removeBinding(name){var info=this.getBinding(name);if(info){info.scope.removeOwnBinding(name)}var scope=this;do{if(scope.uids[name]){scope.uids[name]=false}}while(scope=scope.parent)};_createClass(Scope,null,[{key:"globals",value:_lodashArrayFlatten2["default"]([_globals2["default"].builtin,_globals2["default"].browser,_globals2["default"].node].map(Object.keys)),enumerable:true},{key:"contextVariables",value:["arguments","undefined","Infinity","NaN"],enumerable:true}]);return Scope}();exports["default"]=Scope;module.exports=exports["default"]},{"../../helpers/object":58,"../../messages":60,"../../types":196,"../index":165,"./binding":183,globals:415,"lodash/array/flatten":432,"lodash/collection/includes":439,"lodash/object/defaults":536,"lodash/object/extend":537,repeating:611}],185:[function(require,module,exports){"use strict";exports.__esModule=true;exports.explode=explode;exports.verify=verify;exports.merge=merge;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _pathLibVirtualTypes=require("./path/lib/virtual-types");var virtualTypes=_interopRequireWildcard(_pathLibVirtualTypes);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _types=require("../types");var t=_interopRequireWildcard(_types);var _lodashLangClone=require("lodash/lang/clone");var _lodashLangClone2=_interopRequireDefault(_lodashLangClone);function explode(visitor){if(visitor._exploded)return visitor;visitor._exploded=true;for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var parts=nodeType.split("|");if(parts.length===1)continue;var fns=visitor[nodeType];delete visitor[nodeType];var _arr=parts;for(var _i=0;_i<_arr.length;_i++){var part=_arr[_i];visitor[part]=fns}}verify(visitor);delete visitor.__esModule;ensureEntranceObjects(visitor);ensureCallbackArrays(visitor);var _arr2=Object.keys(visitor);for(var _i2=0;_i2<_arr2.length;_i2++){var nodeType=_arr2[_i2];if(shouldIgnoreKey(nodeType))continue;var wrapper=virtualTypes[nodeType];if(!wrapper)continue;var fns=visitor[nodeType];for(var type in fns){fns[type]=wrapCheck(wrapper,fns[type])}delete visitor[nodeType];if(wrapper.types){var _arr4=wrapper.types;for(var _i4=0;_i4<_arr4.length;_i4++){var type=_arr4[_i4];if(visitor[type]){mergePair(visitor[type],fns)}else{visitor[type]=fns}}}else{mergePair(visitor,fns)}}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var fns=visitor[nodeType];var aliases=t.FLIPPED_ALIAS_KEYS[nodeType];if(!aliases)continue;delete visitor[nodeType];var _arr3=aliases;for(var _i3=0;_i3<_arr3.length;_i3++){var alias=_arr3[_i3];var existing=visitor[alias];if(existing){mergePair(existing,fns)}else{visitor[alias]=_lodashLangClone2["default"](fns)}}}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;ensureCallbackArrays(visitor[nodeType])}return visitor}function verify(visitor){if(visitor._verified)return;if(typeof visitor==="function"){throw new Error(messages.get("traverseVerifyRootFunction"))}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;if(t.TYPES.indexOf(nodeType)<0){throw new Error(messages.get("traverseVerifyNodeType",nodeType))}var visitors=visitor[nodeType];if(typeof visitors==="object"){for(var visitorKey in visitors){if(visitorKey==="enter"||visitorKey==="exit")continue;throw new Error(messages.get("traverseVerifyVisitorProperty",nodeType,visitorKey))}}}visitor._verified=true}function merge(visitors){var rootVisitor={};var _arr5=visitors;for(var _i5=0;_i5<_arr5.length;_i5++){var visitor=_arr5[_i5];explode(visitor);for(var type in visitor){var nodeVisitor=rootVisitor[type]=rootVisitor[type]||{};mergePair(nodeVisitor,visitor[type])}}return rootVisitor}function ensureEntranceObjects(obj){for(var key in obj){if(shouldIgnoreKey(key))continue;var fns=obj[key];if(typeof fns==="function"){obj[key]={enter:fns}}}}function ensureCallbackArrays(obj){if(obj.enter&&!Array.isArray(obj.enter))obj.enter=[obj.enter];if(obj.exit&&!Array.isArray(obj.exit))obj.exit=[obj.exit]}function wrapCheck(wrapper,fn){return function(){if(wrapper.checkPath(this)){return fn.apply(this,arguments)}}}function shouldIgnoreKey(key){if(key[0]==="_")return true;if(key==="enter"||key==="exit"||key==="shouldSkip")return true;if(key==="blacklist"||key==="noScope"||key==="skipKeys")return true;return false}function mergePair(dest,src){for(var key in src){dest[key]=[].concat(dest[key]||[],src[key])}}},{"../messages":60,"../types":196,"./path/lib/virtual-types":179,"lodash/lang/clone":520}],186:[function(require,module,exports){"use strict";exports.__esModule=true;exports.toComputedKey=toComputedKey;exports.toSequenceExpression=toSequenceExpression;exports.toKeyAlias=toKeyAlias;exports.toIdentifier=toIdentifier;exports.toBindingIdentifierName=toBindingIdentifierName;exports.toStatement=toStatement;exports.toExpression=toExpression;exports.toBlock=toBlock;exports.valueToNode=valueToNode;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashLangIsPlainObject=require("lodash/lang/isPlainObject");var _lodashLangIsPlainObject2=_interopRequireDefault(_lodashLangIsPlainObject);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _traversal=require("../traversal");var _traversal2=_interopRequireDefault(_traversal);var _index=require("./index");var t=_interopRequireWildcard(_index);function toComputedKey(node){var key=arguments.length<=1||arguments[1]===undefined?node.key||node.property:arguments[1];return function(){if(!node.computed){if(t.isIdentifier(key))key=t.literal(key.name)}return key}()}function toSequenceExpression(nodes,scope){var declars=[];var bailed=false;var result=convert(nodes);if(bailed)return;for(var i=0;i=0){continue}if(t.isAnyTypeAnnotation(node)){return[node]}if(t.isFlowBaseAnnotation(node)){bases[node.type]=node;continue}if(t.isUnionTypeAnnotation(node)){if(typeGroups.indexOf(node.types)<0){nodes=nodes.concat(node.types);typeGroups.push(node.types)}continue}if(t.isGenericTypeAnnotation(node)){var _name=node.id.name;if(generics[_name]){var existing=generics[_name];if(existing.typeParameters){if(node.typeParameters){existing.typeParameters.params=removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params))}}else{existing=node.typeParameters}}else{generics[_name]=node}continue}types.push(node)}for(var type in bases){types.push(bases[type])}for(var _name2 in generics){types.push(generics[_name2])}return types}function createTypeAnnotationBasedOnTypeof(type){if(type==="string"){return t.stringTypeAnnotation()}else if(type==="number"){return t.numberTypeAnnotation()}else if(type==="undefined"){return t.voidTypeAnnotation()}else if(type==="boolean"){return t.booleanTypeAnnotation()}else if(type==="function"){return t.genericTypeAnnotation(t.identifier("Function"))}else if(type==="object"){return t.genericTypeAnnotation(t.identifier("Object"))}else if(type==="symbol"){return t.genericTypeAnnotation(t.identifier("Symbol"))}else{throw new Error("Invalid typeof value")}}},{"./index":196}],196:[function(require,module,exports){"use strict";exports.__esModule=true;exports.is=is;exports.isType=isType;exports.shallowEqual=shallowEqual;exports.appendToMemberExpression=appendToMemberExpression;exports.prependToMemberExpression=prependToMemberExpression;exports.ensureBlock=ensureBlock;exports.clone=clone;exports.cloneDeep=cloneDeep;exports.buildMatchMemberExpression=buildMatchMemberExpression;exports.removeComments=removeComments;exports.inheritsComments=inheritsComments;exports.inheritTrailingComments=inheritTrailingComments;exports.inheritLeadingComments=inheritLeadingComments;exports.inheritInnerComments=inheritInnerComments;exports.inherits=inherits;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _toFastProperties=require("to-fast-properties");var _toFastProperties2=_interopRequireDefault(_toFastProperties);var _lodashArrayCompact=require("lodash/array/compact");var _lodashArrayCompact2=_interopRequireDefault(_lodashArrayCompact);var _lodashObjectAssign=require("lodash/object/assign");var _lodashObjectAssign2=_interopRequireDefault(_lodashObjectAssign);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashArrayUniq=require("lodash/array/uniq");var _lodashArrayUniq2=_interopRequireDefault(_lodashArrayUniq);require("./definitions/init");var _definitions=require("./definitions");var t=exports;function registerType(type,skipAliasCheck){var is=t["is"+type]=function(node,opts){return t.is(type,node,opts,skipAliasCheck)};t["assert"+type]=function(node,opts){opts=opts||{};if(!is(node,opts)){throw new Error("Expected type "+JSON.stringify(type)+" with option "+JSON.stringify(opts))}}}var STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"];exports.STATEMENT_OR_BLOCK_KEYS=STATEMENT_OR_BLOCK_KEYS;var FLATTENABLE_KEYS=["body","expressions"];exports.FLATTENABLE_KEYS=FLATTENABLE_KEYS;var FOR_INIT_KEYS=["left","init"];exports.FOR_INIT_KEYS=FOR_INIT_KEYS;var COMMENT_KEYS=["leadingComments","trailingComments","innerComments"];exports.COMMENT_KEYS=COMMENT_KEYS;var INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["_scopeInfo","_paths","start","loc","end"]};exports.INHERIT_KEYS=INHERIT_KEYS;var BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="];exports.BOOLEAN_NUMBER_BINARY_OPERATORS=BOOLEAN_NUMBER_BINARY_OPERATORS;var EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="];exports.EQUALITY_BINARY_OPERATORS=EQUALITY_BINARY_OPERATORS;var COMPARISON_BINARY_OPERATORS=EQUALITY_BINARY_OPERATORS.concat(["in","instanceof"]);exports.COMPARISON_BINARY_OPERATORS=COMPARISON_BINARY_OPERATORS;var BOOLEAN_BINARY_OPERATORS=[].concat(COMPARISON_BINARY_OPERATORS,BOOLEAN_NUMBER_BINARY_OPERATORS);exports.BOOLEAN_BINARY_OPERATORS=BOOLEAN_BINARY_OPERATORS;var NUMBER_BINARY_OPERATORS=["-","/","*","**","&","|",">>",">>>","<<","^"];exports.NUMBER_BINARY_OPERATORS=NUMBER_BINARY_OPERATORS;var BOOLEAN_UNARY_OPERATORS=["delete","!"];exports.BOOLEAN_UNARY_OPERATORS=BOOLEAN_UNARY_OPERATORS;var NUMBER_UNARY_OPERATORS=["+","-","++","--","~"];exports.NUMBER_UNARY_OPERATORS=NUMBER_UNARY_OPERATORS;var STRING_UNARY_OPERATORS=["typeof"];exports.STRING_UNARY_OPERATORS=STRING_UNARY_OPERATORS;exports.VISITOR_KEYS=_definitions.VISITOR_KEYS;exports.BUILDER_KEYS=_definitions.BUILDER_KEYS;exports.ALIAS_KEYS=_definitions.ALIAS_KEYS;_lodashCollectionEach2["default"](t.VISITOR_KEYS,function(keys,type){registerType(type,true)});t.FLIPPED_ALIAS_KEYS={};_lodashCollectionEach2["default"](t.ALIAS_KEYS,function(aliases,type){_lodashCollectionEach2["default"](aliases,function(alias){var types=t.FLIPPED_ALIAS_KEYS[alias]=t.FLIPPED_ALIAS_KEYS[alias]||[];types.push(type)})});_lodashCollectionEach2["default"](t.FLIPPED_ALIAS_KEYS,function(types,type){t[type.toUpperCase()+"_TYPES"]=types;registerType(type,false)});var TYPES=Object.keys(t.VISITOR_KEYS).concat(Object.keys(t.FLIPPED_ALIAS_KEYS));exports.TYPES=TYPES;function is(type,node,opts,skipAliasCheck){if(!node)return false;var matches=isType(node.type,type);if(!matches)return false;if(typeof opts==="undefined"){return true}else{return t.shallowEqual(node,opts)}}function isType(nodeType,targetType){if(nodeType===targetType)return true;var aliases=t.FLIPPED_ALIAS_KEYS[targetType];if(aliases){if(aliases[0]===nodeType)return true;var _arr=aliases;for(var _i=0;_i<_arr.length;_i++){var alias=_arr[_i];if(nodeType===alias)return true}}return false}_lodashCollectionEach2["default"](t.VISITOR_KEYS,function(keys,type){if(t.BUILDER_KEYS[type])return;var defs={};_lodashCollectionEach2["default"](keys,function(key){defs[key]=null});t.BUILDER_KEYS[type]=defs});_lodashCollectionEach2["default"](t.BUILDER_KEYS,function(keys,type){var builder=function builder(){var node={};node.type=type;var i=0;for(var key in keys){var arg=arguments[i++];if(arg===undefined)arg=keys[key];node[key]=arg}return node};t[type]=builder;t[type[0].toLowerCase()+type.slice(1)]=builder});function shallowEqual(actual,expected){var keys=Object.keys(expected);var _arr2=keys;for(var _i2=0;_i2<_arr2.length;_i2++){var key=_arr2[_i2];if(actual[key]!==expected[key]){return false}}return true}function appendToMemberExpression(member,append,computed){member.object=t.memberExpression(member.object,member.property,member.computed);member.property=append;member.computed=!!computed;return member}function prependToMemberExpression(member,prepend){member.object=t.memberExpression(prepend,member.object);return member}function ensureBlock(node){var key=arguments.length<=1||arguments[1]===undefined?"body":arguments[1];return node[key]=t.toBlock(node[key],node)}function clone(node){var newNode={};for(var key in node){if(key[0]==="_")continue;newNode[key]=node[key]}return newNode}function cloneDeep(node){var newNode={};for(var key in node){if(key[0]==="_")continue;var val=node[key];if(val){if(val.type){val=t.cloneDeep(val)}else if(Array.isArray(val)){val=val.map(t.cloneDeep)}}newNode[key]=val}return newNode}function buildMatchMemberExpression(match,allowPartial){var parts=match.split(".");return function(member){if(!t.isMemberExpression(member))return false;var search=[member];var i=0;while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(parts[i]!==node.name)return false}else if(t.isLiteral(node)){if(parts[i]!==node.value)return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.push(node.object);search.push(node.property);continue}}else{return false}if(++i>parts.length){return false}}return true}}function removeComments(node){var _arr3=COMMENT_KEYS;for(var _i3=0;_i3<_arr3.length;_i3++){var key=_arr3[_i3];delete node[key]}return node}function inheritsComments(child,parent){inheritTrailingComments(child,parent);inheritLeadingComments(child,parent);inheritInnerComments(child,parent);return child}function inheritTrailingComments(child,parent){_inheritComments("trailingComments",child,parent)}function inheritLeadingComments(child,parent){_inheritComments("leadingComments",child,parent)}function inheritInnerComments(child,parent){_inheritComments("innerComments",child,parent)}function _inheritComments(key,child,parent){if(child&&parent){child[key]=_lodashArrayUniq2["default"](_lodashArrayCompact2["default"]([].concat(child[key],parent[key])))}}function inherits(child,parent){if(!child||!parent)return child;var _arr4=t.INHERIT_KEYS.optional;for(var _i4=0;_i4<_arr4.length;_i4++){var key=_arr4[_i4];if(child[key]==null){child[key]=parent[key]}}var _arr5=t.INHERIT_KEYS.force;for(var _i5=0;_i5<_arr5.length;_i5++){var key=_arr5[_i5];child[key]=parent[key]}t.inheritsComments(child,parent);return child}_toFastProperties2["default"](t);_toFastProperties2["default"](t.VISITOR_KEYS);_lodashObjectAssign2["default"](t,require("./retrievers"));_lodashObjectAssign2["default"](t,require("./validators"));_lodashObjectAssign2["default"](t,require("./converters"));_lodashObjectAssign2["default"](t,require("./flow"))},{"./converters":186,"./definitions":191,"./definitions/init":192,"./flow":195,"./retrievers":197,"./validators":198,"lodash/array/compact":431,"lodash/array/uniq":435,"lodash/collection/each":437,"lodash/object/assign":535,"to-fast-properties":628}],197:[function(require,module,exports){"use strict";exports.__esModule=true;exports.getBindingIdentifiers=getBindingIdentifiers;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _helpersObject=require("../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _index=require("./index");var t=_interopRequireWildcard(_index);function getBindingIdentifiers(node,duplicates){var search=[].concat(node);var ids=_helpersObject2["default"]();while(search.length){var id=search.shift();if(!id)continue;var key=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){if(duplicates){var _ids=ids[id.name]=ids[id.name]||[];_ids.push(id)}else{ids[id.name]=id}}else if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}}else if(key&&id[key]){search=search.concat(id[key])}}return ids}getBindingIdentifiers.keys={DeclareClass:"id",DeclareFunction:"id",DeclareModule:"id",DeclareVariable:"id",InterfaceDeclaration:"id",TypeAlias:"id",ComprehensionExpression:"blocks",ComprehensionBlock:"left",CatchClause:"param",LabeledStatement:"label",UnaryExpression:"argument",AssignmentExpression:"left",ImportSpecifier:"local",ImportNamespaceSpecifier:"local",ImportDefaultSpecifier:"local",ImportDeclaration:"specifiers",FunctionDeclaration:"id",FunctionExpression:"id",ClassDeclaration:"id",ClassExpression:"id",RestElement:"argument",UpdateExpression:"argument",SpreadProperty:"argument",Property:"value",AssignmentPattern:"left",ArrayPattern:"elements",ObjectPattern:"properties",VariableDeclaration:"declarations",VariableDeclarator:"id"}},{"../helpers/object":58,"./index":196}],198:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isBinding=isBinding;exports.isReferenced=isReferenced;exports.isValidIdentifier=isValidIdentifier;exports.isLet=isLet;exports.isBlockScoped=isBlockScoped;exports.isVar=isVar;exports.isSpecifierDefault=isSpecifierDefault;exports.isScope=isScope;exports.isImmutable=isImmutable;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _retrievers=require("./retrievers");var _esutils=require("esutils");var _esutils2=_interopRequireDefault(_esutils);var _index=require("./index");var t=_interopRequireWildcard(_index);function isBinding(node,parent){var bindingKey=_retrievers.getBindingIdentifiers.keys[parent.type];if(bindingKey){return parent[bindingKey]===node}else{return false}}function isReferenced(node,parent){switch(parent.type){case"MemberExpression":case"JSXMemberExpression":if(parent.property===node&&parent.computed){return true}else if(parent.object===node){return true}else{return false}case"MetaProperty":return false;case"Property":if(parent.key===node){return parent.computed}case"VariableDeclarator":return parent.id!==node;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":var _arr=parent.params;for(var _i=0;_i<_arr.length;_i++){var param=_arr[_i];if(param===node)return false}return parent.id!==node;case"ExportSpecifier":if(parent.source){return false}else{return parent.local===node}case"JSXAttribute":return parent.name!==node;case"ClassProperty":return parent.value===node;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return false;case"ClassDeclaration":case"ClassExpression":return parent.id!==node;case"MethodDefinition":return parent.key===node&&parent.computed;case"LabeledStatement":return false;case"CatchClause":return parent.param!==node;case"RestElement":return false;case"AssignmentExpression":return parent.right===node;case"AssignmentPattern":return false;case"ObjectPattern":case"ArrayPattern":return false}return true}function isValidIdentifier(name){if(typeof name!=="string"||_esutils2["default"].keyword.isReservedWordES6(name,true)){return false}else{return _esutils2["default"].keyword.isIdentifierNameES6(name)}}function isLet(node){return t.isVariableDeclaration(node)&&(node.kind!=="var"||node._let)}function isBlockScoped(node){return t.isFunctionDeclaration(node)||t.isClassDeclaration(node)||t.isLet(node)}function isVar(node){return t.isVariableDeclaration(node,{kind:"var"})&&!node._let}function isSpecifierDefault(specifier){return t.isImportDefaultSpecifier(specifier)||t.isIdentifier(specifier.imported||specifier.exported,{name:"default"})}function isScope(node,parent){if(t.isBlockStatement(node)&&t.isFunction(parent,{body:node})){return false}return t.isScopable(node)}function isImmutable(node){if(t.isType(node.type,"Immutable"))return true;if(t.isLiteral(node)){if(node.regex){return false}else{return true}}else if(t.isIdentifier(node)){if(node.name==="undefined"){return true}else{return false}}return false}},{"./index":196,"./retrievers":197,esutils:413}],199:[function(require,module,exports){(function(__dirname){"use strict";exports.__esModule=true;exports.canCompile=canCompile;exports.list=list;exports.regexify=regexify;exports.arrayify=arrayify;exports.booleanify=booleanify;exports.shouldIgnore=shouldIgnore;exports.template=template;exports.parseTemplate=parseTemplate;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashStringEscapeRegExp=require("lodash/string/escapeRegExp");var _lodashStringEscapeRegExp2=_interopRequireDefault(_lodashStringEscapeRegExp);var _lodashStringStartsWith=require("lodash/string/startsWith");var _lodashStringStartsWith2=_interopRequireDefault(_lodashStringStartsWith);var _lodashLangCloneDeep=require("lodash/lang/cloneDeep");var _lodashLangCloneDeep2=_interopRequireDefault(_lodashLangCloneDeep);var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _messages=require("./messages");var messages=_interopRequireWildcard(_messages);var _minimatch=require("minimatch");var _minimatch2=_interopRequireDefault(_minimatch);var _lodashCollectionContains=require("lodash/collection/contains");var _lodashCollectionContains2=_interopRequireDefault(_lodashCollectionContains);var _traversal=require("./traversal");var _traversal2=_interopRequireDefault(_traversal);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _lodashLangIsEmpty=require("lodash/lang/isEmpty");var _lodashLangIsEmpty2=_interopRequireDefault(_lodashLangIsEmpty);var _helpersParse=require("./helpers/parse");var _helpersParse2=_interopRequireDefault(_helpersParse);var _path=require("path");var _path2=_interopRequireDefault(_path);var _lodashObjectHas=require("lodash/object/has");var _lodashObjectHas2=_interopRequireDefault(_lodashObjectHas);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _types=require("./types");var t=_interopRequireWildcard(_types);var _slash=require("slash");var _slash2=_interopRequireDefault(_slash);var _pathExists=require("path-exists");var _pathExists2=_interopRequireDefault(_pathExists);var _util=require("util");exports.inherits=_util.inherits;exports.inspect=_util.inspect;function canCompile(filename,altExts){var exts=altExts||canCompile.EXTENSIONS;var ext=_path2["default"].extname(filename);return _lodashCollectionContains2["default"](exts,ext)}canCompile.EXTENSIONS=[".js",".jsx",".es6",".es"];function list(val){if(!val){return[]}else if(Array.isArray(val)){return val}else if(typeof val==="string"){return val.split(",")}else{return[val]}}function regexify(val){if(!val)return new RegExp(/.^/);if(Array.isArray(val))val=new RegExp(val.map(_lodashStringEscapeRegExp2["default"]).join("|"),"i");if(_lodashLangIsString2["default"](val)){val=_slash2["default"](val);if(_lodashStringStartsWith2["default"](val,"./")||_lodashStringStartsWith2["default"](val,"*/"))val=val.slice(2);if(_lodashStringStartsWith2["default"](val,"**/"))val=val.slice(3);var regex=_minimatch2["default"].makeRe(val,{nocase:true});return new RegExp(regex.source.slice(1,-1),"i")}if(_lodashLangIsRegExp2["default"](val))return val;throw new TypeError("illegal type for regexify")}function arrayify(val,mapFn){if(!val)return[];if(_lodashLangIsBoolean2["default"](val))return arrayify([val],mapFn);if(_lodashLangIsString2["default"](val))return arrayify(list(val),mapFn);if(Array.isArray(val)){if(mapFn)val=val.map(mapFn);return val}return[val]}function booleanify(val){if(val==="true")return true;if(val==="false")return false;return val}function shouldIgnore(filename,ignore,only){filename=_slash2["default"](filename);if(only){var _arr=only;for(var _i=0;_i<_arr.length;_i++){var pattern=_arr[_i];if(_shouldIgnore(pattern,filename))return false}return true}else if(ignore.length){var _arr2=ignore;for(var _i2=0;_i2<_arr2.length;_i2++){var pattern=_arr2[_i2];if(_shouldIgnore(pattern,filename))return true}}return false}function _shouldIgnore(pattern,filename){if(typeof pattern==="function"){return pattern(filename)}else{return pattern.test(filename)}}var templateVisitor={noScope:true,enter:function enter(node,parent,scope,nodes){if(t.isExpressionStatement(node)){node=node.expression}if(t.isIdentifier(node)&&_lodashObjectHas2["default"](nodes,node.name)){this.skip();this.replaceInline(nodes[node.name])}},exit:function exit(node){_traversal2["default"].clearNode(node)}};function template(name,nodes,keepExpression){var ast=exports.templates[name];if(!ast)throw new ReferenceError("unknown template "+name);if(nodes===true){keepExpression=true;nodes=null}ast=_lodashLangCloneDeep2["default"](ast);if(!_lodashLangIsEmpty2["default"](nodes)){_traversal2["default"](ast,templateVisitor,null,nodes)}if(ast.body.length>1)return ast.body;var node=ast.body[0];if(!keepExpression&&t.isExpressionStatement(node)){return node.expression}else{return node}}function parseTemplate(loc,code){var ast=_helpersParse2["default"](code,{filename:loc,looseModules:true}).program;ast=_traversal2["default"].removeProperties(ast);return ast}function loadTemplates(){var templates={};var templatesLoc=_path2["default"].join(__dirname,"transformation/templates");if(!_pathExists2["default"].sync(templatesLoc)){throw new ReferenceError(messages.get("missingTemplatesDirectory"))}var _arr3=_fs2["default"].readdirSync(templatesLoc);for(var _i3=0;_i3<_arr3.length;_i3++){var name=_arr3[_i3];if(name[0]===".")return;var key=_path2["default"].basename(name,_path2["default"].extname(name));var loc=_path2["default"].join(templatesLoc,name);var code=_fs2["default"].readFileSync(loc,"utf8");templates[key]=parseTemplate(loc,code)}return templates}try{exports.templates=require("../templates.json")}catch(err){if(err.code!=="MODULE_NOT_FOUND")throw err;exports.templates=loadTemplates()}}).call(this,"/lib")},{"../templates.json":632,"./helpers/parse":59,"./messages":60,"./traversal":165,"./types":196,fs:1,"lodash/collection/contains":436,"lodash/lang/cloneDeep":521,"lodash/lang/isBoolean":524,"lodash/lang/isEmpty":525,"lodash/lang/isRegExp":531,"lodash/lang/isString":532,"lodash/object/has":538,"lodash/string/escapeRegExp":544,"lodash/string/startsWith":545,minimatch:548,path:11,"path-exists":552,slash:615,util:30}],200:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=function(_ref){var Plugin=_ref.Plugin;var t=_ref.types;return new Plugin("constant-folding",{metadata:{group:"builtin-prepass",experimental:true},visitor:{AssignmentExpression:function AssignmentExpression(){var left=this.get("left");if(!left.isIdentifier())return;var binding=this.scope.getBinding(left.node.name);if(!binding||binding.hasDeoptValue)return;var evaluated=this.get("right").evaluate();if(evaluated.confident){binding.setValue(evaluated.value)}else{binding.deoptValue()}},IfStatement:function IfStatement(){var evaluated=this.get("test").evaluate();if(!evaluated.confident){return this.skip()}if(evaluated.value){this.skipKey("alternate")}else{this.skipKey("consequent")}},Scopable:{enter:function enter(){var funcScope=this.scope.getFunctionParent();for(var name in this.scope.bindings){var binding=this.scope.bindings[name];var deopt=false;var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=binding.constantViolations[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var path=_step.value;var funcViolationScope=path.scope.getFunctionParent();if(funcViolationScope!==funcScope){deopt=true;break}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator["return"]){_iterator["return"]()}}finally{if(_didIteratorError){throw _iteratorError}}}if(deopt)binding.deoptValue()}},exit:function exit(){for(var name in this.scope.bindings){var binding=this.scope.bindings[name];binding.clearValue()}}},Expression:{exit:function exit(){var res=this.evaluate();if(res.confident)return t.valueToNode(res.value)}}}})};module.exports=exports["default"]},{}],201:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=function(_ref){var Plugin=_ref.Plugin;var t=_ref.types;function toStatements(node){ +if(t.isBlockStatement(node)){var hasBlockScoped=false;for(var i=0;i1||!binding.constant)return;if(binding.kind==="param"||binding.kind==="module")return;var replacement=binding.path.node;if(t.isVariableDeclarator(replacement)){replacement=replacement.init}if(!replacement)return;if(!scope.isPure(replacement,true))return;if(t.isClass(replacement)||t.isFunction(replacement)){if(binding.path.scope.parent!==scope)return}if(this.findParent(function(path){return path.node===replacement})){return}t.toExpression(replacement);scope.removeBinding(node.name);binding.path.dangerouslyRemove();return replacement},"ClassDeclaration|FunctionDeclaration":function ClassDeclarationFunctionDeclaration(node,parent,scope){var binding=scope.getBinding(node.id.name);if(binding&&!binding.referenced){this.dangerouslyRemove()}},VariableDeclarator:function VariableDeclarator(node,parent,scope){if(!t.isIdentifier(node.id)||!scope.isPure(node.init,true))return;visitor["ClassDeclaration|FunctionDeclaration"].apply(this,arguments)},ConditionalExpression:function ConditionalExpression(node){var evaluateTest=this.get("test").evaluateTruthy();if(evaluateTest===true){return node.consequent}else if(evaluateTest===false){return node.alternate}},BlockStatement:function BlockStatement(){var paths=this.get("body");var purge=false;for(var i=0;i3)continue;if(distance<=shortest)continue;closest=name;shortest=distance}var msg;if(closest){msg=messages.get("undeclaredVariableSuggestion",node.name,closest)}else{msg=messages.get("undeclaredVariable",node.name)}throw this.errorWithNode(msg,ReferenceError)}}})};module.exports=exports["default"]},{leven:215}],215:[function(require,module,exports){"use strict";var arr=[];var charCodeCache=[];module.exports=function(a,b){if(a===b){return 0}var aLen=a.length;var bLen=b.length;if(aLen===0){return bLen}if(bLen===0){return aLen}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(iret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2}}return ret}},{}],216:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=function(_ref){var Plugin=_ref.Plugin;var t=_ref.types;return new Plugin("undefined-to-void",{metadata:{group:"builtin-basic"},visitor:{ReferencedIdentifier:function ReferencedIdentifier(node,parent){if(node.name==="undefined"){return t.unaryExpression("void",t.literal(0),true)}}}})};module.exports=exports["default"]},{}],217:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;var isSimpleWindowsTerm=process.platform==="win32"&&!/^xterm/i.test(process.env.TERM);function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(isSimpleWindowsTerm){ansiStyles.blue.open=""}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function build(_styles){var builder=function(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a<]/g}},{}],222:[function(require,module,exports){"use strict";var ansiRegex=require("ansi-regex")();module.exports=function(str){return typeof str==="string"?str.replace(ansiRegex,""):str}},{"ansi-regex":223}],223:[function(require,module,exports){arguments[4][221][0].apply(exports,arguments)},{dup:221}],224:[function(require,module,exports){(function(process){"use strict";var argv=process.argv;var terminator=argv.indexOf("--");var hasFlag=function(flag){flag="--"+flag;var pos=argv.indexOf(flag);return pos!==-1&&(terminator!==-1?pos0;i--){line=lines[i];if(~line.indexOf("sourceMappingURL=data:"))return exports.fromComment(line)}}Converter.prototype.toJSON=function(space){return JSON.stringify(this.sourcemap,null,space)};Converter.prototype.toBase64=function(){var json=this.toJSON();return new Buffer(json).toString("base64")};Converter.prototype.toComment=function(options){var base64=this.toBase64();var data="sourceMappingURL=data:application/json;base64,"+base64;return options&&options.multiline?"/*# "+data+" */":"//# "+data};Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())};Converter.prototype.addProperty=function(key,value){if(this.sourcemap.hasOwnProperty(key))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(key,value)};Converter.prototype.setProperty=function(key,value){this.sourcemap[key]=value;return this};Converter.prototype.getProperty=function(key){return this.sourcemap[key]};exports.fromObject=function(obj){return new Converter(obj)};exports.fromJSON=function(json){return new Converter(json,{isJSON:true})};exports.fromBase64=function(base64){return new Converter(base64,{isEncoded:true})};exports.fromComment=function(comment){comment=comment.replace(/^\/\*/g,"//").replace(/\*\/$/g,"");return new Converter(comment,{isEncoded:true,hasComment:true})};exports.fromMapFileComment=function(comment,dir){return new Converter(comment,{commentFileDir:dir,isFileComment:true,isJSON:true})};exports.fromSource=function(content,largeSource){if(largeSource)return convertFromLargeSource(content);var m=content.match(commentRx);commentRx.lastIndex=0;return m?exports.fromComment(m.pop()):null};exports.fromMapFileSource=function(content,dir){var m=content.match(mapFileCommentRx);mapFileCommentRx.lastIndex=0;return m?exports.fromMapFileComment(m.pop(),dir):null};exports.removeComments=function(src){commentRx.lastIndex=0;return src.replace(commentRx,"")};exports.removeMapFileComments=function(src){mapFileCommentRx.lastIndex=0;return src.replace(mapFileCommentRx,"")};Object.defineProperty(exports,"commentRegex",{get:function getCommentRegex(){commentRx.lastIndex=0;return commentRx}});Object.defineProperty(exports,"mapFileCommentRegex",{get:function getMapFileCommentRegex(){mapFileCommentRx.lastIndex=0;return mapFileCommentRx}})}).call(this,require("buffer").Buffer)},{buffer:4,fs:1,path:11}],226:[function(require,module,exports){module.exports=function(it){if(typeof it!="function")throw TypeError(it+" is not a function!");return it}},{}],227:[function(require,module,exports){var isObject=require("./$.is-object");module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},{"./$.is-object":257}],228:[function(require,module,exports){var toIObject=require("./$.to-iobject"),toLength=require("./$.to-length"),toIndex=require("./$.to-index");module.exports=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIObject($this),length=toLength(O.length),index=toIndex(fromIndex,length),value;if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];if(value!=value)return true}else for(;length>index;index++)if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index}return!IS_INCLUDES&&-1}}},{"./$.to-index":293,"./$.to-iobject":295,"./$.to-length":296}],229:[function(require,module,exports){var ctx=require("./$.ctx"),IObject=require("./$.iobject"),toObject=require("./$.to-object"),toLength=require("./$.to-length");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function($this,callbackfn,that){var O=toObject($this),self=IObject(O),f=ctx(callbackfn,that,3),length=toLength(self.length),index=0,result=IS_MAP?Array(length):IS_FILTER?[]:undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$.ctx":238,"./$.iobject":254,"./$.to-length":296,"./$.to-object":297}],230:[function(require,module,exports){var toObject=require("./$.to-object"),IObject=require("./$.iobject"),enumKeys=require("./$.enum-keys");module.exports=Object.assign||function assign(target,source){var T=toObject(target),l=arguments.length,i=1;while(l>i){var S=IObject(arguments[i++]),keys=enumKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T}},{"./$.enum-keys":242,"./$.iobject":254,"./$.to-object":297}],231:[function(require,module,exports){var cof=require("./$.cof"),TAG=require("./$.wks")("toStringTag"),ARG=cof(function(){return arguments}())=="Arguments";module.exports=function(it){var O,T,B;return it===undefined?"Undefined":it===null?"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:ARG?cof(O):(B=cof(O))=="Object"&&typeof O.callee=="function"?"Arguments":B}},{"./$.cof":232,"./$.wks":300}],232:[function(require,module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},{}],233:[function(require,module,exports){"use strict";var $=require("./$"),hide=require("./$.hide"),ctx=require("./$.ctx"),species=require("./$.species"),strictNew=require("./$.strict-new"),defined=require("./$.defined"),forOf=require("./$.for-of"),step=require("./$.iter-step"),ID=require("./$.uid")("id"),$has=require("./$.has"),isObject=require("./$.is-object"),isExtensible=Object.isExtensible||isObject,SUPPORT_DESC=require("./$.support-desc"),SIZE=SUPPORT_DESC?"_s":"size",id=0;var fastKey=function(it,create){if(!isObject(it))return typeof it=="symbol"?it:(typeof it=="string"?"S":"P")+it;if(!$has(it,ID)){if(!isExtensible(it))return"F";if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]};var getEntry=function(that,key){var index=fastKey(key),entry;if(index!=="F")return that._i[index];for(entry=that._f;entry;entry=entry.n){if(entry.k==key)return entry}};module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){strictNew(that,C,NAME);that._i=$.create(null);that._f=undefined;that._l=undefined;that[SIZE]=0;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});require("./$.mix")(C.prototype,{clear:function clear(){for(var that=this,data=that._i,entry=that._f;entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined; +delete data[entry.i]}that._f=that._l=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that._i[entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that._f==entry)that._f=next;if(that._l==entry)that._l=prev;that[SIZE]--}return!!entry},forEach:function forEach(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this._f){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function has(key){return!!getEntry(this,key)}});if(SUPPORT_DESC)$.setDesc(C.prototype,"size",{get:function(){return defined(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that._l=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that._l,n:undefined,r:false};if(!that._f)that._f=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!=="F")that._i[index]=entry}return that},getEntry:getEntry,setStrong:function(C,NAME,IS_MAP){require("./$.iter-define")(C,NAME,function(iterated,kind){this._t=iterated;this._k=kind;this._l=undefined},function(){var that=this,kind=that._k,entry=that._l;while(entry&&entry.r)entry=entry.p;if(!that._t||!(that._l=entry=entry?entry.n:that._t._f)){that._t=undefined;return step(1)}if(kind=="keys")return step(0,entry.k);if(kind=="values")return step(0,entry.v);return step(0,[entry.k,entry.v])},IS_MAP?"entries":"values",!IS_MAP,true);species(C);species(require("./$.core")[NAME])}}},{"./$":265,"./$.core":237,"./$.ctx":238,"./$.defined":240,"./$.for-of":247,"./$.has":250,"./$.hide":251,"./$.is-object":257,"./$.iter-define":261,"./$.iter-step":263,"./$.mix":270,"./$.species":283,"./$.strict-new":284,"./$.support-desc":290,"./$.uid":298}],234:[function(require,module,exports){var forOf=require("./$.for-of"),classof=require("./$.classof");module.exports=function(NAME){return function toJSON(){if(classof(this)!=NAME)throw TypeError(NAME+"#toJSON isn't generic");var arr=[];forOf(this,false,arr.push,arr);return arr}}},{"./$.classof":231,"./$.for-of":247}],235:[function(require,module,exports){"use strict";var hide=require("./$.hide"),anObject=require("./$.an-object"),strictNew=require("./$.strict-new"),forOf=require("./$.for-of"),method=require("./$.array-methods"),WEAK=require("./$.uid")("weak"),isObject=require("./$.is-object"),$has=require("./$.has"),isExtensible=Object.isExtensible||isObject,find=method(5),findIndex=method(6),id=0;var frozenStore=function(that){return that._l||(that._l=new FrozenStore)};var FrozenStore=function(){this.a=[]};var findFrozen=function(store,key){return find(store.a,function(it){return it[0]===key})};FrozenStore.prototype={get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.a.push([key,value])},"delete":function(key){var index=findIndex(this.a,function(it){return it[0]===key});if(~index)this.a.splice(index,1);return!!~index}};module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){strictNew(that,C,NAME);that._i=id++;that._l=undefined;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});require("./$.mix")(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(!isExtensible(key))return frozenStore(this)["delete"](key);return $has(key,WEAK)&&$has(key[WEAK],this._i)&&delete key[WEAK][this._i]},has:function has(key){if(!isObject(key))return false;if(!isExtensible(key))return frozenStore(this).has(key);return $has(key,WEAK)&&$has(key[WEAK],this._i)}});return C},def:function(that,key,value){if(!isExtensible(anObject(key))){frozenStore(that).set(key,value)}else{$has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that._i]=value}return that},frozenStore:frozenStore,WEAK:WEAK}},{"./$.an-object":227,"./$.array-methods":229,"./$.for-of":247,"./$.has":250,"./$.hide":251,"./$.is-object":257,"./$.mix":270,"./$.strict-new":284,"./$.uid":298}],236:[function(require,module,exports){"use strict";var global=require("./$.global"),$def=require("./$.def"),BUGGY=require("./$.iter-buggy"),forOf=require("./$.for-of"),strictNew=require("./$.strict-new");module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=global[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};var fixMethod=function(KEY){var fn=proto[KEY];require("./$.redef")(proto,KEY,KEY=="delete"?function(a){return fn.call(this,a===0?0:a)}:KEY=="has"?function has(a){return fn.call(this,a===0?0:a)}:KEY=="get"?function get(a){return fn.call(this,a===0?0:a)}:KEY=="add"?function add(a){fn.call(this,a===0?0:a);return this}:function set(a,b){fn.call(this,a===0?0:a,b);return this})};if(typeof C!="function"||!(IS_WEAK||!BUGGY&&proto.forEach&&proto.entries)){C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER);require("./$.mix")(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](IS_WEAK?{}:-0,1),buggyZero;if(!require("./$.iter-detect")(function(iter){new C(iter)})){C=wrapper(function(target,iterable){strictNew(target,C,NAME);var that=new Base;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that);return that});C.prototype=proto;proto.constructor=C}IS_WEAK||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER);if(IS_WEAK&&proto.clear)delete proto.clear}require("./$.tag")(C,NAME);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);if(!IS_WEAK)common.setStrong(C,NAME,IS_MAP);return C}},{"./$.def":239,"./$.for-of":247,"./$.global":249,"./$.iter-buggy":258,"./$.iter-detect":262,"./$.mix":270,"./$.redef":277,"./$.strict-new":284,"./$.tag":291}],237:[function(require,module,exports){var core=module.exports={};if(typeof __e=="number")__e=core},{}],238:[function(require,module,exports){var aFunction=require("./$.a-function");module.exports=function(fn,that,length){aFunction(fn);if(that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.a-function":226}],239:[function(require,module,exports){var global=require("./$.global"),core=require("./$.core"),hide=require("./$.hide"),$redef=require("./$.redef"),PROTOTYPE="prototype";var ctx=function(fn,that){return function(){return fn.apply(that,arguments)}};var $def=function(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,isProto=type&$def.P,target=isGlobal?global:type&$def.S?global[name]||(global[name]={}):(global[name]||{})[PROTOTYPE],exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;out=(own?target:source)[key];if(type&$def.B&&own)exp=ctx(out,global);else exp=isProto&&typeof out=="function"?ctx(Function.call,out):out;if(target&&!own)$redef(target,key,out);if(exports[key]!=out)hide(exports,key,exp);if(isProto)(exports[PROTOTYPE]||(exports[PROTOTYPE]={}))[key]=out}};global.core=core;$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;module.exports=$def},{"./$.core":237,"./$.global":249,"./$.hide":251,"./$.redef":277}],240:[function(require,module,exports){module.exports=function(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}},{}],241:[function(require,module,exports){var isObject=require("./$.is-object"),document=require("./$.global").document,is=isObject(document)&&isObject(document.createElement);module.exports=function(it){return is?document.createElement(it):{}}},{"./$.global":249,"./$.is-object":257}],242:[function(require,module,exports){var $=require("./$");module.exports=function(it){var keys=$.getKeys(it),getSymbols=$.getSymbols;if(getSymbols){var symbols=getSymbols(it),isEnum=$.isEnum,i=0,key;while(symbols.length>i)if(isEnum.call(it,key=symbols[i++]))keys.push(key)}return keys}},{"./$":265}],243:[function(require,module,exports){module.exports=Math.expm1||function expm1(x){return(x=+x)==0?x:x>-1e-6&&x<1e-6?x+x*x/2:Math.exp(x)-1}},{}],244:[function(require,module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return true}}},{}],245:[function(require,module,exports){"use strict";module.exports=function(KEY,length,exec){var defined=require("./$.defined"),SYMBOL=require("./$.wks")(KEY),original=""[KEY];if(require("./$.fails")(function(){var O={};O[SYMBOL]=function(){return 7};return""[KEY](O)!=7})){require("./$.redef")(String.prototype,KEY,exec(defined,SYMBOL,original));require("./$.hide")(RegExp.prototype,SYMBOL,length==2?function(string,arg){return original.call(string,this,arg)}:function(string){return original.call(string,this)})}}},{"./$.defined":240,"./$.fails":244,"./$.hide":251,"./$.redef":277,"./$.wks":300}],246:[function(require,module,exports){"use strict";var anObject=require("./$.an-object");module.exports=function(){var that=anObject(this),result="";if(that.global)result+="g";if(that.ignoreCase)result+="i";if(that.multiline)result+="m";if(that.unicode)result+="u";if(that.sticky)result+="y";return result}},{"./$.an-object":227}],247:[function(require,module,exports){var ctx=require("./$.ctx"),call=require("./$.iter-call"),isArrayIter=require("./$.is-array-iter"),anObject=require("./$.an-object"),toLength=require("./$.to-length"),getIterFn=require("./core.get-iterator-method");module.exports=function(iterable,entries,fn,that){var iterFn=getIterFn(iterable),f=ctx(fn,that,entries?2:1),index=0,length,step,iterator;if(typeof iterFn!="function")throw TypeError(iterable+" is not iterable!");if(isArrayIter(iterFn))for(length=toLength(iterable.length);length>index;index++){entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index])}else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;){call(iterator,f,step.value,entries)}}},{"./$.an-object":227,"./$.ctx":238,"./$.is-array-iter":255,"./$.iter-call":259,"./$.to-length":296,"./core.get-iterator-method":301}],248:[function(require,module,exports){var toString={}.toString,toIObject=require("./$.to-iobject"),getNames=require("./$").getNames;var windowNames=typeof window=="object"&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];var getWindowNames=function(it){try{return getNames(it)}catch(e){return windowNames.slice()}};module.exports.get=function getOwnPropertyNames(it){if(windowNames&&toString.call(it)=="[object Window]")return getWindowNames(it);return getNames(toIObject(it))}},{"./$":265,"./$.to-iobject":295}],249:[function(require,module,exports){var global=typeof self!="undefined"&&self.Math==Math?self:Function("return this")();module.exports=global;if(typeof __g=="number")__g=global},{}],250:[function(require,module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},{}],251:[function(require,module,exports){var $=require("./$"),createDesc=require("./$.property-desc");module.exports=require("./$.support-desc")?function(object,key,value){return $.setDesc(object,key,createDesc(1,value))}:function(object,key,value){object[key]=value;return object}},{"./$":265,"./$.property-desc":276,"./$.support-desc":290}],252:[function(require,module,exports){module.exports=require("./$.global").document&&document.documentElement},{"./$.global":249}],253:[function(require,module,exports){module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3])}return fn.apply(that,args)}},{}],254:[function(require,module,exports){var cof=require("./$.cof");module.exports=0 in Object("z")?Object:function(it){return cof(it)=="String"?it.split(""):Object(it)}},{"./$.cof":232}],255:[function(require,module,exports){var Iterators=require("./$.iterators"),ITERATOR=require("./$.wks")("iterator");module.exports=function(it){return(Iterators.Array||Array.prototype[ITERATOR])===it}},{"./$.iterators":264,"./$.wks":300}],256:[function(require,module,exports){var isObject=require("./$.is-object"),floor=Math.floor;module.exports=function isInteger(it){return!isObject(it)&&isFinite(it)&&floor(it)===it}},{"./$.is-object":257}],257:[function(require,module,exports){module.exports=function(it){return it!==null&&(typeof it=="object"||typeof it=="function")}},{}],258:[function(require,module,exports){module.exports="keys"in[]&&!("next"in[].keys())},{}],259:[function(require,module,exports){var anObject=require("./$.an-object");module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value)}catch(e){var ret=iterator["return"];if(ret!==undefined)anObject(ret.call(iterator));throw e}}},{"./$.an-object":227}],260:[function(require,module,exports){"use strict";var $=require("./$"),IteratorPrototype={};require("./$.hide")(IteratorPrototype,require("./$.wks")("iterator"),function(){return this});module.exports=function(Constructor,NAME,next){Constructor.prototype=$.create(IteratorPrototype,{next:require("./$.property-desc")(1,next)});require("./$.tag")(Constructor,NAME+" Iterator")}},{"./$":265,"./$.hide":251,"./$.property-desc":276,"./$.tag":291,"./$.wks":300}],261:[function(require,module,exports){"use strict";var LIBRARY=require("./$.library"),$def=require("./$.def"),$redef=require("./$.redef"),hide=require("./$.hide"),has=require("./$.has"),SYMBOL_ITERATOR=require("./$.wks")("iterator"),Iterators=require("./$.iterators"),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values";var returnThis=function(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){require("./$.iter-create")(Constructor,NAME,next);var createMethod=function(kind){switch(kind){case KEYS:return function keys(){return new Constructor(this,kind)};case VALUES:return function values(){return new Constructor(this,kind)}}return function entries(){return new Constructor(this,kind)}};var TAG=NAME+" Iterator",proto=Base.prototype,_native=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],_default=_native||createMethod(DEFAULT),methods,key;if(_native){var IteratorPrototype=require("./$").getProto(_default.call(new Base));require("./$.tag")(IteratorPrototype,TAG,true);if(!LIBRARY&&has(proto,FF_ITERATOR))hide(IteratorPrototype,SYMBOL_ITERATOR,returnThis)}if(!LIBRARY||FORCE)hide(proto,SYMBOL_ITERATOR,_default);Iterators[NAME]=_default;Iterators[TAG]=returnThis;if(DEFAULT){methods={keys:IS_SET?_default:createMethod(KEYS),values:DEFAULT==VALUES?_default:createMethod(VALUES),entries:DEFAULT!=VALUES?_default:createMethod("entries")};if(FORCE)for(key in methods){if(!(key in proto))$redef(proto,key,methods[key])}else $def($def.P+$def.F*require("./$.iter-buggy"),NAME,methods)}}},{"./$":265,"./$.def":239,"./$.has":250,"./$.hide":251,"./$.iter-buggy":258,"./$.iter-create":260,"./$.iterators":264,"./$.library":267,"./$.redef":277,"./$.tag":291,"./$.wks":300}],262:[function(require,module,exports){var SYMBOL_ITERATOR=require("./$.wks")("iterator"),SAFE_CLOSING=false;try{var riter=[7][SYMBOL_ITERATOR]();riter["return"]=function(){SAFE_CLOSING=true};Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec){if(!SAFE_CLOSING)return false;var safe=false;try{var arr=[7],iter=arr[SYMBOL_ITERATOR]();iter.next=function(){safe=true};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return safe}},{"./$.wks":300}],263:[function(require,module,exports){module.exports=function(done,value){return{value:value,done:!!done}}},{}],264:[function(require,module,exports){module.exports={}},{}],265:[function(require,module,exports){var $Object=Object;module.exports={create:$Object.create,getProto:$Object.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:$Object.getOwnPropertyDescriptor,setDesc:$Object.defineProperty,setDescs:$Object.defineProperties,getKeys:$Object.keys,getNames:$Object.getOwnPropertyNames,getSymbols:$Object.getOwnPropertySymbols,each:[].forEach}},{}],266:[function(require,module,exports){var $=require("./$"),toIObject=require("./$.to-iobject");module.exports=function(object,el){var O=toIObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":265,"./$.to-iobject":295}],267:[function(require,module,exports){module.exports=false},{}],268:[function(require,module,exports){module.exports=Math.log1p||function log1p(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:Math.log(1+x)}},{}],269:[function(require,module,exports){var global=require("./$.global"),macrotask=require("./$.task").set,Observer=global.MutationObserver||global.WebKitMutationObserver,process=global.process,head,last,notify;function flush(){while(head){head.fn.call();head=head.next}last=undefined}if(require("./$.cof")(process)=="process"){notify=function(){process.nextTick(flush)}}else if(Observer){var toggle=1,node=document.createTextNode("");new Observer(flush).observe(node,{characterData:true});notify=function(){node.data=toggle=-toggle}}else{notify=function(){macrotask.call(global,flush)}}module.exports=function asap(fn){var task={fn:fn,next:undefined};if(last)last.next=task;if(!head){head=task;notify()}last=task}},{"./$.cof":232,"./$.global":249,"./$.task":292}],270:[function(require,module,exports){var $redef=require("./$.redef");module.exports=function(target,src){for(var key in src)$redef(target,key,src[key]);return target}},{"./$.redef":277}],271:[function(require,module,exports){module.exports=function(KEY,exec){var $def=require("./$.def"),fn=(require("./$.core").Object||{})[KEY]||Object[KEY],exp={};exp[KEY]=exec(fn);$def($def.S+$def.F*require("./$.fails")(function(){fn(1)}),"Object",exp)}},{"./$.core":237,"./$.def":239,"./$.fails":244}],272:[function(require,module,exports){var $=require("./$"),toIObject=require("./$.to-iobject");module.exports=function(isEntries){return function(it){var O=toIObject(it),keys=$.getKeys(O),length=keys.length,i=0,result=Array(length),key;if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}},{"./$":265,"./$.to-iobject":295}],273:[function(require,module,exports){var $=require("./$"),anObject=require("./$.an-object");module.exports=function ownKeys(it){var keys=$.getNames(anObject(it)),getSymbols=$.getSymbols;return getSymbols?keys.concat(getSymbols(it)):keys}},{"./$":265,"./$.an-object":227}],274:[function(require,module,exports){"use strict";var path=require("./$.path"),invoke=require("./$.invoke"),aFunction=require("./$.a-function");module.exports=function(){var fn=aFunction(this),length=arguments.length,pargs=Array(length),i=0,_=path._,holder=false;while(length>i)if((pargs[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,j=0,k=0,args;if(!holder&&!_length)return invoke(fn,pargs,that);args=pargs.slice();if(holder)for(;length>j;j++)if(args[j]===_)args[j]=arguments[k++];while(_length>k)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./$.a-function":226,"./$.invoke":253,"./$.path":275}],275:[function(require,module,exports){module.exports=require("./$.global")},{"./$.global":249}],276:[function(require,module,exports){module.exports=function(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}},{}],277:[function(require,module,exports){var global=require("./$.global"),hide=require("./$.hide"),SRC=require("./$.uid")("src"),TO_STRING="toString",$toString=Function[TO_STRING],TPL=(""+$toString).split(TO_STRING);require("./$.core").inspectSource=function(it){return $toString.call(it)};(module.exports=function(O,key,val,safe){if(typeof val=="function"){hide(val,SRC,O[key]?""+O[key]:TPL.join(String(key)));if(!("name"in val))val.name=key}if(O===global){O[key]=val}else{if(!safe)delete O[key];hide(O,key,val)}})(Function.prototype,TO_STRING,function toString(){return typeof this=="function"&&this[SRC]||$toString.call(this)})},{"./$.core":237,"./$.global":249,"./$.hide":251,"./$.uid":298}],278:[function(require,module,exports){module.exports=function(regExp,replace){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(it).replace(regExp,replacer)}}},{}],279:[function(require,module,exports){module.exports=Object.is||function is(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}},{}],280:[function(require,module,exports){var getDesc=require("./$").getDesc,isObject=require("./$.is-object"),anObject=require("./$.an-object");var check=function(O,proto){anObject(O);if(!isObject(proto)&&proto!==null)throw TypeError(proto+": can't set as prototype!")};module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(buggy,set){try{set=require("./$.ctx")(Function.call,getDesc(Object.prototype,"__proto__").set,2);set({},[])}catch(e){buggy=true}return function setPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;else set(O,proto);return O}}():undefined),check:check}},{"./$":265,"./$.an-object":227,"./$.ctx":238,"./$.is-object":257}],281:[function(require,module,exports){var global=require("./$.global"),SHARED="__core-js_shared__",store=global[SHARED]||(global[SHARED]={});module.exports=function(key){return store[key]||(store[key]={})}},{"./$.global":249}],282:[function(require,module,exports){module.exports=Math.sign||function sign(x){return(x=+x)==0||x!=x?x:x<0?-1:1}},{}],283:[function(require,module,exports){"use strict";var $=require("./$"),SPECIES=require("./$.wks")("species");module.exports=function(C){if(require("./$.support-desc")&&!(SPECIES in C))$.setDesc(C,SPECIES,{configurable:true,get:function(){return this}})}},{"./$":265,"./$.support-desc":290,"./$.wks":300}],284:[function(require,module,exports){module.exports=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it}},{}],285:[function(require,module,exports){var toInteger=require("./$.to-integer"),defined=require("./$.defined");module.exports=function(TO_STRING){return function(that,pos){var s=String(defined(that)),i=toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$.defined":240,"./$.to-integer":294}],286:[function(require,module,exports){var defined=require("./$.defined"),cof=require("./$.cof");module.exports=function(that,searchString,NAME){if(cof(searchString)=="RegExp")throw TypeError("String#"+NAME+" doesn't accept regex!");return String(defined(that))}},{"./$.cof":232,"./$.defined":240}],287:[function(require,module,exports){var toLength=require("./$.to-length"),repeat=require("./$.string-repeat"),defined=require("./$.defined");module.exports=function(that,maxLength,fillString,left){var S=String(defined(that)),stringLength=S.length,fillStr=fillString===undefined?" ":String(fillString),intMaxLength=toLength(maxLength);if(intMaxLength<=stringLength)return S;if(fillStr=="")fillStr=" ";var fillLen=intMaxLength-stringLength,stringFiller=repeat.call(fillStr,Math.ceil(fillLen/fillStr.length));if(stringFiller.length>fillLen)stringFiller=left?stringFiller.slice(stringFiller.length-fillLen):stringFiller.slice(0,fillLen);return left?stringFiller+S:S+stringFiller}},{"./$.defined":240,"./$.string-repeat":288,"./$.to-length":296}],288:[function(require,module,exports){"use strict";var toInteger=require("./$.to-integer"),defined=require("./$.defined");module.exports=function repeat(count){var str=String(defined(this)),res="",n=toInteger(count);if(n<0||n==Infinity)throw RangeError("Count can't be negative");for(;n>0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}},{"./$.defined":240,"./$.to-integer":294}],289:[function(require,module,exports){var trim=function(string,TYPE){string=String(defined(string));if(TYPE&1)string=string.replace(ltrim,"");if(TYPE&2)string=string.replace(rtrim,"");return string};var $def=require("./$.def"),defined=require("./$.defined"),spaces=" \n \f\r   ᠎    "+"          \u2028\u2029\ufeff",space="["+spaces+"]",non="​…",ltrim=RegExp("^"+space+space+"*"),rtrim=RegExp(space+space+"*$");module.exports=function(KEY,exec){var exp={};exp[KEY]=exec(trim);$def($def.P+$def.F*require("./$.fails")(function(){return!!spaces[KEY]()||non[KEY]()!=non}),"String",exp)}},{"./$.def":239,"./$.defined":240,"./$.fails":244}],290:[function(require,module,exports){module.exports=!require("./$.fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./$.fails":244}],291:[function(require,module,exports){var has=require("./$.has"),hide=require("./$.hide"),TAG=require("./$.wks")("toStringTag");module.exports=function(it,tag,stat){if(it&&!has(it=stat?it:it.prototype,TAG))hide(it,TAG,tag)}},{"./$.has":250,"./$.hide":251,"./$.wks":300}],292:[function(require,module,exports){"use strict";var ctx=require("./$.ctx"),invoke=require("./$.invoke"),html=require("./$.html"),cel=require("./$.dom-create"),global=require("./$.global"),process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port;var run=function(){var id=+this;if(queue.hasOwnProperty(id)){var fn=queue[id];delete queue[id];fn()}};var listner=function(event){run.call(event.data)};if(!setTask||!clearTask){setTask=function setImmediate(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(typeof fn=="function"?fn:Function(fn),args)};defer(counter);return counter};clearTask=function clearImmediate(id){delete queue[id]};if(require("./$.cof")(process)=="process"){defer=function(id){process.nextTick(ctx(run,id,1))}}else if(MessageChannel){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if(global.addEventListener&&typeof postMessage=="function"&&!global.importScript){defer=function(id){global.postMessage(id+"","*")};global.addEventListener("message",listner,false)}else if(ONREADYSTATECHANGE in cel("script")){defer=function(id){html.appendChild(cel("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run.call(id)}}}else{defer=function(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}},{"./$.cof":232,"./$.ctx":238,"./$.dom-create":241,"./$.global":249,"./$.html":252,"./$.invoke":253}],293:[function(require,module,exports){var toInteger=require("./$.to-integer"),max=Math.max,min=Math.min;module.exports=function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)}},{"./$.to-integer":294}],294:[function(require,module,exports){var ceil=Math.ceil,floor=Math.floor;module.exports=function(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}},{}],295:[function(require,module,exports){var IObject=require("./$.iobject"),defined=require("./$.defined");module.exports=function(it){return IObject(defined(it))}},{"./$.defined":240,"./$.iobject":254}],296:[function(require,module,exports){var toInteger=require("./$.to-integer"),min=Math.min;module.exports=function(it){return it>0?min(toInteger(it),9007199254740991):0}},{"./$.to-integer":294}],297:[function(require,module,exports){var defined=require("./$.defined");module.exports=function(it){return Object(defined(it))}},{"./$.defined":240}],298:[function(require,module,exports){var id=0,px=Math.random();module.exports=function(key){return"Symbol(".concat(key===undefined?"":key,")_",(++id+px).toString(36))}},{}],299:[function(require,module,exports){var UNSCOPABLES=require("./$.wks")("unscopables");if(!(UNSCOPABLES in[]))require("./$.hide")(Array.prototype,UNSCOPABLES,{});module.exports=function(key){[][UNSCOPABLES][key]=true}},{"./$.hide":251,"./$.wks":300}],300:[function(require,module,exports){var store=require("./$.shared")("wks"),Symbol=require("./$.global").Symbol;module.exports=function(name){return store[name]||(store[name]=Symbol&&Symbol[name]||(Symbol||require("./$.uid"))("Symbol."+name))}},{"./$.global":249,"./$.shared":281,"./$.uid":298}],301:[function(require,module,exports){var classof=require("./$.classof"),ITERATOR=require("./$.wks")("iterator"),Iterators=require("./$.iterators");module.exports=require("./$.core").getIteratorMethod=function(it){if(it!=undefined)return it[ITERATOR]||it["@@iterator"]||Iterators[classof(it)]}},{"./$.classof":231,"./$.core":237,"./$.iterators":264,"./$.wks":300}],302:[function(require,module,exports){"use strict";var $=require("./$"),SUPPORT_DESC=require("./$.support-desc"),createDesc=require("./$.property-desc"),html=require("./$.html"),cel=require("./$.dom-create"),has=require("./$.has"),cof=require("./$.cof"),$def=require("./$.def"),invoke=require("./$.invoke"),arrayMethod=require("./$.array-methods"),IE_PROTO=require("./$.uid")("__proto__"),isObject=require("./$.is-object"),anObject=require("./$.an-object"),aFunction=require("./$.a-function"),toObject=require("./$.to-object"),toIObject=require("./$.to-iobject"),toInteger=require("./$.to-integer"),toIndex=require("./$.to-index"),toLength=require("./$.to-length"),IObject=require("./$.iobject"),fails=require("./$.fails"),ObjectProto=Object.prototype,A=[],_slice=A.slice,_join=A.join,defineProperty=$.setDesc,getOwnDescriptor=$.getDesc,defineProperties=$.setDescs,$indexOf=require("./$.array-includes")(false),factories={},IE8_DOM_DEFINE;if(!SUPPORT_DESC){IE8_DOM_DEFINE=!fails(function(){return defineProperty(cel("div"),"a",{get:function(){return 7}}).a!=7});$.setDesc=function(O,P,Attributes){if(IE8_DOM_DEFINE)try{return defineProperty(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)anObject(O)[P]=Attributes.value;return O};$.getDesc=function(O,P){if(IE8_DOM_DEFINE)try{return getOwnDescriptor(O,P)}catch(e){}if(has(O,P))return createDesc(!ObjectProto.propertyIsEnumerable.call(O,P),O[P])};$.setDescs=defineProperties=function(O,Properties){anObject(O);var keys=$.getKeys(Properties),length=keys.length,i=0,P;while(length>i)$.setDesc(O,P=keys[i++],Properties[P]);return O}}$def($def.S+$def.F*!SUPPORT_DESC,"Object",{getOwnPropertyDescriptor:$.getDesc,defineProperty:$.setDesc,defineProperties:defineProperties});var keys1=("constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,"+"toLocaleString,toString,valueOf").split(","),keys2=keys1.concat("length","prototype"),keysLen1=keys1.length;var createDict=function(){var iframe=cel("iframe"),i=keysLen1,gt=">",iframeDocument;iframe.style.display="none";html.appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write(" + + + \ No newline at end of file diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css index e3df3e0a4..2f83cfd46 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css @@ -1,121 +1,121 @@ -.overlay_darkX { - background-color: #85BBEF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.darkX_nw { - background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0; - width:6px; - height:21px; -} -.darkX_n { - background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0; - height:21px; -} -.darkX_ne { - background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0; - width:6px; - height:21px; -} -.darkX_w { - background: transparent url(darkX/frame-left-focused.png) repeat-y top left; - width:3px; -} - -.darkX_e { - background: transparent url(darkX/frame-right-focused.png) repeat-y top right; - width:3px; -} - -.darkX_sw { - background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0; - width:5px; - height:3px; -} -.darkX_s { - background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0; - height:3px; -} -.darkX_se, .darkX_sizer { - background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0; - width:5px; - height:3px; -} - -.darkX_sizer { - cursor:se-resize; -} - -.darkX_close { - width: 21px; - height: 21px; - background: transparent url(darkX/button-close-focused.png) no-repeat 0 0; - position:absolute; - top:0px; - right:5px; - cursor:pointer; - z-index:1000; -} - -.darkX_minimize { - width: 21px; - height: 21px; - background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0; - position:absolute; - top:0px; - right:26px; - cursor:pointer; - z-index:1000; -} - -.darkX_maximize { - width: 21px; - height: 21px; - background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0; - position:absolute; - top:0px; - right:47px; - cursor:pointer; - z-index:1000; -} - - -.darkX_title { - float:left; - height:14px; - font-size:12px; - text-align:center; - margin-top:2px; - width:100%; - color:#FFF; -} - -.darkX_content { - overflow:auto; - color: #E6DF2A; - font-family: Tahoma, Arial, sans-serif; - font-size: 14px; - background:#5E5148; -} - - -/* FOR IE */ -* html .darkX_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop"); -} - -* html .darkX_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale"); -} - -* html .darkX_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop"); -} +.overlay_darkX { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.darkX_nw { + background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0; + width:6px; + height:21px; +} +.darkX_n { + background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0; + height:21px; +} +.darkX_ne { + background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0; + width:6px; + height:21px; +} +.darkX_w { + background: transparent url(darkX/frame-left-focused.png) repeat-y top left; + width:3px; +} + +.darkX_e { + background: transparent url(darkX/frame-right-focused.png) repeat-y top right; + width:3px; +} + +.darkX_sw { + background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0; + width:5px; + height:3px; +} +.darkX_s { + background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0; + height:3px; +} +.darkX_se, .darkX_sizer { + background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0; + width:5px; + height:3px; +} + +.darkX_sizer { + cursor:se-resize; +} + +.darkX_close { + width: 21px; + height: 21px; + background: transparent url(darkX/button-close-focused.png) no-repeat 0 0; + position:absolute; + top:0px; + right:5px; + cursor:pointer; + z-index:1000; +} + +.darkX_minimize { + width: 21px; + height: 21px; + background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0; + position:absolute; + top:0px; + right:26px; + cursor:pointer; + z-index:1000; +} + +.darkX_maximize { + width: 21px; + height: 21px; + background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0; + position:absolute; + top:0px; + right:47px; + cursor:pointer; + z-index:1000; +} + + +.darkX_title { + float:left; + height:14px; + font-size:12px; + text-align:center; + margin-top:2px; + width:100%; + color:#FFF; +} + +.darkX_content { + overflow:auto; + color: #E6DF2A; + font-family: Tahoma, Arial, sans-serif; + font-size: 14px; + background:#5E5148; +} + + +/* FOR IE */ +* html .darkX_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop"); +} + +* html .darkX_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale"); +} + +* html .darkX_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop"); +} diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css index d7981e9ca..69e3b7fc2 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css @@ -1,25 +1,25 @@ -div.inspector div.inspectable { - padding: 0.25em 0 0.25em 1em; - background-color: Gray; - color: white; - border: outset 2px white; - cursor: pointer; -} - -div.inspector div.child { - margin: 0 0 0 1em; -} - -#debug_window_content { /* DIV container for debug sizing*/ - width:250px; - height:100px; - background-color:#000; -} - -#debug { /* DIV container for debug contents*/ - padding:3px; - color:#0f0; - font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif; - font-size:10px; -} - +div.inspector div.inspectable { + padding: 0.25em 0 0.25em 1em; + background-color: Gray; + color: white; + border: outset 2px white; + cursor: pointer; +} + +div.inspector div.child { + margin: 0 0 0 1em; +} + +#debug_window_content { /* DIV container for debug sizing*/ + width:250px; + height:100px; + background-color:#000; +} + +#debug { /* DIV container for debug contents*/ + padding:3px; + color:#0f0; + font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size:10px; +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css index 591451723..6ab13789d 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css @@ -1,155 +1,155 @@ -.overlay_dialog { - background-color: #666666; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.overlay___invisible__ { - background-color: #666666; - filter:alpha(opacity=0); - -moz-opacity: 0; - opacity: 0; -} - -.dialog_nw { - width: 9px; - height: 23px; - background: transparent url(default/top_left.gif) no-repeat 0 0; -} - -.dialog_n { - background: transparent url(default/top_mid.gif) repeat-x 0 0; - height: 23px; -} - -.dialog_ne { - width: 9px; - height: 23px; - background: transparent url(default/top_right.gif) no-repeat 0 0; -} - -.dialog_e { - width: 2px; - background: transparent url(default/center_right.gif) repeat-y 0 0; -} - -.dialog_w { - width: 2px; - background: transparent url(default/center_left.gif) repeat-y 0 0; -} - -.dialog_sw { - width: 9px; - height: 19px; - background: transparent url(default/bottom_left.gif) no-repeat 0 0; -} - -.dialog_s { - background: transparent url(default/bottom_mid.gif) repeat-x 0 0; - height: 19px; -} - -.dialog_se { - width: 9px; - height: 19px; - background: transparent url(default/bottom_right.gif) no-repeat 0 0; -} - -.dialog_sizer { - width: 9px; - height: 19px; - background: transparent url(default/sizer.gif) no-repeat 0 0; - cursor:se-resize; -} - -.dialog_close { - width: 14px; - height: 14px; - background: transparent url(default/close.gif) no-repeat 0 0; - position:absolute; - top:5px; - left:8px; - cursor:pointer; - z-index:2000; -} - -.dialog_minimize { - width: 14px; - height: 15px; - background: transparent url(default/minimize.gif) no-repeat 0 0; - position:absolute; - top:5px; - left:28px; - cursor:pointer; - z-index:2000; -} - -.dialog_maximize { - width: 14px; - height: 15px; - background: transparent url(default/maximize.gif) no-repeat 0 0; - position:absolute; - top:5px; - left:49px; - cursor:pointer; - z-index:2000; -} - -.dialog_title { - float:left; - height:14px; - font-family: Tahoma, Arial, sans-serif; - font-size:12px; - text-align:center; - width:100%; - color:#000; -} - -.dialog_content { - overflow:auto; - color: #DDD; - font-family: Tahoma, Arial, sans-serif; - font-size: 10px; - background-color:#123; -} - -.top_draggable, .bottom_draggable { - cursor:move; -} - -.status_bar { - font-size:12px; -} -.status_bar input{ - font-size:12px; -} - -.wired_frame { - display: block; - position: absolute; - border: 1px #000 dashed; -} - -/* DO NOT CHANGE THESE VALUES*/ -.dialog { - display: block; - position: absolute; -} - -.dialog table.table_window { - border-collapse: collapse; - border-spacing: 0; - width: 100%; - margin: 0px; - padding:0px; -} - -.dialog table.table_window td , .dialog table.table_window th { - padding: 0; -} - -.dialog .title_window { - -moz-user-select:none; -} - +.overlay_dialog { + background-color: #666666; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.overlay___invisible__ { + background-color: #666666; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; +} + +.dialog_nw { + width: 9px; + height: 23px; + background: transparent url(default/top_left.gif) no-repeat 0 0; +} + +.dialog_n { + background: transparent url(default/top_mid.gif) repeat-x 0 0; + height: 23px; +} + +.dialog_ne { + width: 9px; + height: 23px; + background: transparent url(default/top_right.gif) no-repeat 0 0; +} + +.dialog_e { + width: 2px; + background: transparent url(default/center_right.gif) repeat-y 0 0; +} + +.dialog_w { + width: 2px; + background: transparent url(default/center_left.gif) repeat-y 0 0; +} + +.dialog_sw { + width: 9px; + height: 19px; + background: transparent url(default/bottom_left.gif) no-repeat 0 0; +} + +.dialog_s { + background: transparent url(default/bottom_mid.gif) repeat-x 0 0; + height: 19px; +} + +.dialog_se { + width: 9px; + height: 19px; + background: transparent url(default/bottom_right.gif) no-repeat 0 0; +} + +.dialog_sizer { + width: 9px; + height: 19px; + background: transparent url(default/sizer.gif) no-repeat 0 0; + cursor:se-resize; +} + +.dialog_close { + width: 14px; + height: 14px; + background: transparent url(default/close.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:8px; + cursor:pointer; + z-index:2000; +} + +.dialog_minimize { + width: 14px; + height: 15px; + background: transparent url(default/minimize.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:28px; + cursor:pointer; + z-index:2000; +} + +.dialog_maximize { + width: 14px; + height: 15px; + background: transparent url(default/maximize.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:49px; + cursor:pointer; + z-index:2000; +} + +.dialog_title { + float:left; + height:14px; + font-family: Tahoma, Arial, sans-serif; + font-size:12px; + text-align:center; + width:100%; + color:#000; +} + +.dialog_content { + overflow:auto; + color: #DDD; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background-color:#123; +} + +.top_draggable, .bottom_draggable { + cursor:move; +} + +.status_bar { + font-size:12px; +} +.status_bar input{ + font-size:12px; +} + +.wired_frame { + display: block; + position: absolute; + border: 1px #000 dashed; +} + +/* DO NOT CHANGE THESE VALUES*/ +.dialog { + display: block; + position: absolute; +} + +.dialog table.table_window { + border-collapse: collapse; + border-spacing: 0; + width: 100%; + margin: 0px; + padding:0px; +} + +.dialog table.table_window td , .dialog table.table_window th { + padding: 0; +} + +.dialog .title_window { + -moz-user-select:none; +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css index 249388be5..257a1b1e3 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css @@ -1,3 +1,3 @@ -/* PNG fix for all themes that uses PNG images on IE */ -td, div { behavior: url(../themes/iefix/iepngfix.htc) } - +/* PNG fix for all themes that uses PNG images on IE */ +td, div { behavior: url(../themes/iefix/iepngfix.htc) } + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc index 9a13f32bf..a6c683b9f 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc @@ -1,54 +1,54 @@ - - - - + + + + \ No newline at end of file diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css index 0d955c3d7..95ec287a9 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css @@ -1,960 +1,960 @@ -.overlay___invisible__ { - background-color: #666; - filter:alpha(opacity=0); - -moz-opacity: 0; - opacity: 0; -} - -.top_draggable, .bottom_draggable { - cursor:move; -} - -.status_bar { - font-size:12px; -} -.status_bar input{ - font-size:12px; -} - -.wired_frame { - display:block; - position:absolute; - border:1px #000 dashed; -} - - - -.overlay_bluelighting { - background-color:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.bluelighting_wired_frame { - background:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.bluelighting_nw { - background:transparent url(lighting/top-left-blue.png) no-repeat 0 0; - width:9px; - height:28px; -} - -.bluelighting_n { - background:transparent url(lighting/top-middle-blue.png) repeat-x 0 0; - height:28px; -} - -.bluelighting_ne { - background:transparent url(lighting/top-right-blue.png) no-repeat 0 0; - width:15px; - height:28px; -} - -.bluelighting_w { - background:transparent url(lighting/left-blue.png) repeat-y top left; - width:9px; -} - -.bluelighting_e { - background:transparent url(lighting/right-blue.png) repeat-y top right; - width:15px; -} - -.bluelighting_sw { - background:transparent url(lighting/bottom-left-blue.png) no-repeat 0 0; - width:9px; - height:15px; -} - -.bluelighting_s { - background:transparent url(lighting/bottom-middle-blue.png) repeat-x 0 0; - height:15px; -} - -.bluelighting_se, .bluelighting_sizer { - background:transparent url(lighting/bottom-right-blue.png) no-repeat 0 0; - width:15px; - height:15px; -} - -.bluelighting_sizer { - cursor:se-resize; -} - -.bluelighting_close { - width:15px; - height:9px; - background:transparent url(lighting/button-close-blue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:10px; - cursor:pointer; - z-index:1000; -} - -.bluelighting_maximize { - width:15px; - height:9px; - background:transparent url(lighting/button-maximize-blue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:25px; - cursor:pointer; - z-index:1000; -} - -.bluelighting_minimize { - width:15px; - height:9px; - background:transparent url(lighting/button-minimize-blue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:40px; - cursor:pointer; - z-index:1000; -} - -.bluelighting_title { - float:left; - height:14px; - font-size:14px; - font-weight:bold; - font-family:Verdana, Arial, sans-serif; - text-align:center; - margin-top:2px; - width:100%; - color:#17385B; -} - -.bluelighting_content { - overflow:auto; - color:#000; - font-family:Verdana, Arial, sans-serif; - font-size:12px; - background:#BFDBFF; -} - -/* For alert/confirm dialog */ -.bluelighting_window { - border:1px solid #F00; - background:#FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.bluelighting_message { - font-size:12px; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.bluelighting_buttons { - text-align:center; - width:100%; -} - -.bluelighting_buttons input { - border:1px solid #999; - border-top-color:#CCC; - border-left-color:#CCC; - padding:2px; - background-color:#FFF; - color:#333; - background-image:url(lighting/background_buttons.gif); - background-repeat:repeat-x; - font-family:Verdana, Arial, sans-serif; - font-size:10px; - font-weight:bold; - text-align:center; -} - -.bluelighting_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background:transparent url('lighting/spinner.gif') no-repeat center center -} - -/* FOR IE */ -* html .bluelighting_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-blue.png", sizingMethod="scale"); -} - -* html .bluelighting_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-blue.png", sizingMethod="scale"); -} - -* html .bluelighting_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-blue.png", sizingMethod="scale"); -} - -* html .bluelighting_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-blue.png", sizingMethod="scale"); -} - -* html .bluelighting_se, * html .bluelighting_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_content { - background:#B8D7FF; -} - - - -.overlay_greylighting { - background-color:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.greylighting_wired_frame { - background:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.greylighting_nw { - background:transparent url(lighting/top-left-grey.png) no-repeat 0 0; - width:9px; - height:28px; -} - -.greylighting_n { - background:transparent url(lighting/top-middle-grey.png) repeat-x 0 0; - height:28px; -} - -.greylighting_ne { - background:transparent url(lighting/top-right-grey.png) no-repeat 0 0; - width:15px; - height:28px; -} - -.greylighting_w { - background:transparent url(lighting/left-grey.png) repeat-y top left; - width:9px; -} - -.greylighting_e { - background:transparent url(lighting/right-grey.png) repeat-y top right; - width:15px; -} - -.greylighting_sw { - background:transparent url(lighting/bottom-left-grey.png) no-repeat 0 0; - width:9px; - height:15px; -} - -.greylighting_s { - background:transparent url(lighting/bottom-middle-grey.png) repeat-x 0 0; - height:15px; -} - -.greylighting_se, .greylighting_sizer { - background:transparent url(lighting/bottom-right-grey.png) no-repeat 0 0; - width:15px; - height:15px; -} - -.greylighting_sizer { - cursor:se-resize; -} - -.greylighting_close { - width:15px; - height:9px; - background:transparent url(lighting/button-close-grey.png) no-repeat 0 0; - position:absolute; - top:11px; - right:10px; - cursor:pointer; - z-index:1000; -} - -.greylighting_maximize { - width:15px; - height:9px; - background:transparent url(lighting/button-maximize-grey.png) no-repeat 0 0; - position:absolute; - top:11px; - right:25px; - cursor:pointer; - z-index:1000; -} - -.greylighting_minimize { - width:15px; - height:9px; - background:transparent url(lighting/button-minimize-grey.png) no-repeat 0 0; - position:absolute; - top:11px; - right:40px; - cursor:pointer; - z-index:1000; -} - -.greylighting_title { - float:left; - height:14px; - font-size:14px; - font-weight:bold; - font-family:Verdana, Arial, sans-serif; - text-align:center; - margin-top:2px; - width:100%; - color:#525252; -} - -.greylighting_content { - overflow:auto; - color:#000; - font-family:Verdana, Arial, sans-serif; - font-size:12px; - background:#CDCDCD; -} - -/* For alert/confirm dialog */ -.greylighting_window { - border:1px solid #F00; - background:#FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.greylighting_message { - font-size:12px; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.greylighting_buttons { - text-align:center; - width:100%; -} - -.greylighting_buttons input { - border:1px solid #999; - border-top-color:#CCC; - border-left-color:#CCC; - padding:2px; - background-color:#FFF; - color:#333; - background-image:url(lighting/background_buttons.gif); - background-repeat:repeat-x; - font-family:Verdana, Arial, sans-serif; - font-size:10px; - font-weight:bold; - text-align:center; -} - -.greylighting_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background:transparent url('lighting/spinner.gif') no-repeat center center -} - -/* FOR IE */ -* html .greylighting_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-grey.png", sizingMethod="crop"); -} - -* html .greylighting_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-grey.png", sizingMethod="scale"); -} - -* html .greylighting_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-grey.png", sizingMethod="crop"); -} - -* html .greylighting_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-grey.png", sizingMethod="scale"); -} - -* html .greylighting_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-grey.png", sizingMethod="scale"); -} - -* html .greylighting_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-grey.png", sizingMethod="crop"); -} - -* html .greylighting_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-grey.png", sizingMethod="scale"); -} - -* html greylighting_se, * html .greylighting_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-grey.png", sizingMethod="crop"); -} - -* html .greylighting_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-grey.png", sizingMethod="crop"); -} - -* html .greylighting_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-grey.png", sizingMethod="crop"); -} - -* html .greylighting_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-grey.png", sizingMethod="crop"); -} - -* html .greylighting_content { - background:#C7C7C7; -} - - - -.overlay_greenlighting { - background-color:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.greenlighting_wired_frame { - background:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.greenlighting_nw { - background:transparent url(lighting/top-left-green.png) no-repeat 0 0; - width:9px; - height:28px; -} - -.greenlighting_n { - background:transparent url(lighting/top-middle-green.png) repeat-x 0 0; - height:28px; -} - -.greenlighting_ne { - background:transparent url(lighting/top-right-green.png) no-repeat 0 0; - width:15px; - height:28px; -} - -.greenlighting_w { - background:transparent url(lighting/left-green.png) repeat-y top left; - width:9px; -} - -.greenlighting_e { - background:transparent url(lighting/right-green.png) repeat-y top right; - width:15px; -} - -.greenlighting_sw { - background:transparent url(lighting/bottom-left-green.png) no-repeat 0 0; - width:9px; - height:15px; -} - -.greenlighting_s { - background:transparent url(lighting/bottom-middle-green.png) repeat-x 0 0; - height:15px; -} - -.greenlighting_se, .greenlighting_sizer { - background:transparent url(lighting/bottom-right-green.png) no-repeat 0 0; - width:15px; - height:15px; -} - -.greenlighting_sizer { - cursor:se-resize; -} - -.greenlighting_close { - width:15px; - height:9px; - background:transparent url(lighting/button-close-green.png) no-repeat 0 0; - position:absolute; - top:11px; - right:10px; - cursor:pointer; - z-index:1000; -} - -.greenlighting_maximize { - width:15px; - height:9px; - background:transparent url(lighting/button-maximize-green.png) no-repeat 0 0; - position:absolute; - top:11px; - right:25px; - cursor:pointer; - z-index:1000; -} - -.greenlighting_minimize { - width:15px; - height:9px; - background:transparent url(lighting/button-minimize-green.png) no-repeat 0 0; - position:absolute; - top:11px; - right:40px; - cursor:pointer; - z-index:1000; -} - -.greenlighting_title { - float:left; - height:14px; - font-size:14px; - font-weight:bold; - font-family:Verdana, Arial, sans-serif; - text-align:center; - margin-top:2px; - width:100%; - color:#2A6002; -} - -.greenlighting_content { - overflow:auto; - color:#000; - font-family:Verdana, Arial, sans-serif; - font-size:12px; - background:#ACFCAF; -} - -/* For alert/confirm dialog */ -.greenlighting_window { - border:1px solid #F00; - background:#FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.greenlighting_message { - font-size:12px; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.greenlighting_buttons { - text-align:center; - width:100%; -} - -.greenlighting_buttons input { - border:1px solid #999; - border-top-color:#CCC; - border-left-color:#CCC; - padding:2px; - background-color:#FFF; - color:#333; - background-image:url(lighting/background_buttons.gif); - background-repeat:repeat-x; - font-family:Verdana, Arial, sans-serif; - font-size:10px; - font-weight:bold; - text-align:center; -} - -.greenlighting_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background:transparent url('lighting/spinner.gif') no-repeat center center -} - -/* FOR IE */ -* html .greenlighting_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-green.png", sizingMethod="crop"); -} - -* html .greenlighting_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-green.png", sizingMethod="scale"); -} - -* html .greenlighting_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-green.png", sizingMethod="crop"); -} - -* html .greenlighting_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-green.png", sizingMethod="scale"); -} - -* html .greenlighting_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-green.png", sizingMethod="scale"); -} - -* html .greenlighting_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-green.png", sizingMethod="crop"); -} - -* html .greenlighting_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-green.png", sizingMethod="scale"); -} - -* html greenlighting_se, * html .greenlighting_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-green.png", sizingMethod="crop"); -} - -* html .greenlighting_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-green.png", sizingMethod="crop"); -} - -* html .greenlighting_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-green.png", sizingMethod="crop"); -} - -* html .greenlighting_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-green.png", sizingMethod="crop"); -} - -* html .greenlighting_content { - background:#A4FCA7; -} - - - -.overlay_darkbluelighting { - background-color:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.darkbluelighting_wired_frame { - background:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.darkbluelighting_nw { - background:transparent url(lighting/top-left-darkblue.png) no-repeat 0 0; - width:9px; - height:28px; -} - -.darkbluelighting_n { - background:transparent url(lighting/top-middle-darkblue.png) repeat-x 0 0; - height:28px; -} - -.darkbluelighting_ne { - background:transparent url(lighting/top-right-darkblue.png) no-repeat 0 0; - width:15px; - height:28px; -} - -.darkbluelighting_w { - background:transparent url(lighting/left-darkblue.png) repeat-y top left; - width:9px; -} - -.darkbluelighting_e { - background:transparent url(lighting/right-darkblue.png) repeat-y top right; - width:15px; -} - -.darkbluelighting_sw { - background:transparent url(lighting/bottom-left-darkblue.png) no-repeat 0 0; - width:9px; - height:15px; -} - -.darkbluelighting_s { - background:transparent url(lighting/bottom-middle-darkblue.png) repeat-x 0 0; - height:15px; -} - -.darkbluelighting_se, .darkbluelighting_sizer { - background:transparent url(lighting/bottom-right-darkblue.png) no-repeat 0 0; - width:15px; - height:15px; -} - -.darkbluelighting_sizer { - cursor:se-resize; -} - -.darkbluelighting_close { - width:15px; - height:9px; - background:transparent url(lighting/button-close-darkblue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:10px; - cursor:pointer; - z-index:1000; -} - -.darkbluelighting_maximize { - width:15px; - height:9px; - background:transparent url(lighting/button-maximize-darkblue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:25px; - cursor:pointer; - z-index:1000; -} - -.darkbluelighting_minimize { - width:15px; - height:9px; - background:transparent url(lighting/button-minimize-darkblue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:40px; - cursor:pointer; - z-index:1000; -} - -.darkbluelighting_title { - float:left; - height:14px; - font-size:14px; - font-weight:bold; - font-family:Verdana, Arial, sans-serif; - text-align:center; - margin-top:2px; - width:100%; - color:#E4EFFD; -} - -.darkbluelighting_content { - overflow:auto; - color:#FFF; - font-family:Verdana, Arial, sans-serif; - font-size:12px; - background:#0413C0; -} - -/* For alert/confirm dialog */ -.darkbluelighting_window { - border:1px solid #F00; - background:#FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.darkbluelighting_message { - font-size:12px; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.darkbluelighting_buttons { - text-align:center; - width:100%; -} - -.darkbluelighting_buttons input { - border:1px solid #999; - border-top-color:#CCC; - border-left-color:#CCC; - padding:2px; - background-color:#FFF; - color:#333; - background-image:url(lighting/background_buttons.gif); - background-repeat:repeat-x; - font-family:Verdana, Arial, sans-serif; - font-size:10px; - font-weight:bold; - text-align:center; -} - -.darkbluelighting_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background:transparent url('lighting/spinner.gif') no-repeat center center -} - -/* FOR IE */ -* html .darkbluelighting_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-darkblue.png", sizingMethod="scale"); -} - -* html .darkbluelighting_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-darkblue.png", sizingMethod="scale"); -} - -* html .darkbluelighting_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-darkblue.png", sizingMethod="scale"); -} - -* html .darkbluelighting_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-darkblue.png", sizingMethod="scale"); -} - -* html darkbluelighting_se, * html .darkbluelighting_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_content { - background:#020EBA; -} - +.overlay___invisible__ { + background-color: #666; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; +} + +.top_draggable, .bottom_draggable { + cursor:move; +} + +.status_bar { + font-size:12px; +} +.status_bar input{ + font-size:12px; +} + +.wired_frame { + display:block; + position:absolute; + border:1px #000 dashed; +} + + + +.overlay_bluelighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.bluelighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.bluelighting_nw { + background:transparent url(lighting/top-left-blue.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.bluelighting_n { + background:transparent url(lighting/top-middle-blue.png) repeat-x 0 0; + height:28px; +} + +.bluelighting_ne { + background:transparent url(lighting/top-right-blue.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.bluelighting_w { + background:transparent url(lighting/left-blue.png) repeat-y top left; + width:9px; +} + +.bluelighting_e { + background:transparent url(lighting/right-blue.png) repeat-y top right; + width:15px; +} + +.bluelighting_sw { + background:transparent url(lighting/bottom-left-blue.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.bluelighting_s { + background:transparent url(lighting/bottom-middle-blue.png) repeat-x 0 0; + height:15px; +} + +.bluelighting_se, .bluelighting_sizer { + background:transparent url(lighting/bottom-right-blue.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.bluelighting_sizer { + cursor:se-resize; +} + +.bluelighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-blue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.bluelighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-blue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.bluelighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-blue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.bluelighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#17385B; +} + +.bluelighting_content { + overflow:auto; + color:#000; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#BFDBFF; +} + +/* For alert/confirm dialog */ +.bluelighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.bluelighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.bluelighting_buttons { + text-align:center; + width:100%; +} + +.bluelighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.bluelighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .bluelighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_se, * html .bluelighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_content { + background:#B8D7FF; +} + + + +.overlay_greylighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greylighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greylighting_nw { + background:transparent url(lighting/top-left-grey.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.greylighting_n { + background:transparent url(lighting/top-middle-grey.png) repeat-x 0 0; + height:28px; +} + +.greylighting_ne { + background:transparent url(lighting/top-right-grey.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.greylighting_w { + background:transparent url(lighting/left-grey.png) repeat-y top left; + width:9px; +} + +.greylighting_e { + background:transparent url(lighting/right-grey.png) repeat-y top right; + width:15px; +} + +.greylighting_sw { + background:transparent url(lighting/bottom-left-grey.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.greylighting_s { + background:transparent url(lighting/bottom-middle-grey.png) repeat-x 0 0; + height:15px; +} + +.greylighting_se, .greylighting_sizer { + background:transparent url(lighting/bottom-right-grey.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.greylighting_sizer { + cursor:se-resize; +} + +.greylighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-grey.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.greylighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-grey.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.greylighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-grey.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.greylighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#525252; +} + +.greylighting_content { + overflow:auto; + color:#000; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#CDCDCD; +} + +/* For alert/confirm dialog */ +.greylighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.greylighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.greylighting_buttons { + text-align:center; + width:100%; +} + +.greylighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.greylighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .greylighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-grey.png", sizingMethod="crop"); +} + +* html .greylighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-grey.png", sizingMethod="scale"); +} + +* html .greylighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-grey.png", sizingMethod="crop"); +} + +* html .greylighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-grey.png", sizingMethod="scale"); +} + +* html .greylighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-grey.png", sizingMethod="scale"); +} + +* html .greylighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-grey.png", sizingMethod="crop"); +} + +* html .greylighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-grey.png", sizingMethod="scale"); +} + +* html greylighting_se, * html .greylighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-grey.png", sizingMethod="crop"); +} + +* html .greylighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-grey.png", sizingMethod="crop"); +} + +* html .greylighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-grey.png", sizingMethod="crop"); +} + +* html .greylighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-grey.png", sizingMethod="crop"); +} + +* html .greylighting_content { + background:#C7C7C7; +} + + + +.overlay_greenlighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greenlighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greenlighting_nw { + background:transparent url(lighting/top-left-green.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.greenlighting_n { + background:transparent url(lighting/top-middle-green.png) repeat-x 0 0; + height:28px; +} + +.greenlighting_ne { + background:transparent url(lighting/top-right-green.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.greenlighting_w { + background:transparent url(lighting/left-green.png) repeat-y top left; + width:9px; +} + +.greenlighting_e { + background:transparent url(lighting/right-green.png) repeat-y top right; + width:15px; +} + +.greenlighting_sw { + background:transparent url(lighting/bottom-left-green.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.greenlighting_s { + background:transparent url(lighting/bottom-middle-green.png) repeat-x 0 0; + height:15px; +} + +.greenlighting_se, .greenlighting_sizer { + background:transparent url(lighting/bottom-right-green.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.greenlighting_sizer { + cursor:se-resize; +} + +.greenlighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-green.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.greenlighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-green.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.greenlighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-green.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.greenlighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#2A6002; +} + +.greenlighting_content { + overflow:auto; + color:#000; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#ACFCAF; +} + +/* For alert/confirm dialog */ +.greenlighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.greenlighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.greenlighting_buttons { + text-align:center; + width:100%; +} + +.greenlighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.greenlighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .greenlighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-green.png", sizingMethod="crop"); +} + +* html .greenlighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-green.png", sizingMethod="scale"); +} + +* html .greenlighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-green.png", sizingMethod="crop"); +} + +* html .greenlighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-green.png", sizingMethod="scale"); +} + +* html .greenlighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-green.png", sizingMethod="scale"); +} + +* html .greenlighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-green.png", sizingMethod="crop"); +} + +* html .greenlighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-green.png", sizingMethod="scale"); +} + +* html greenlighting_se, * html .greenlighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-green.png", sizingMethod="crop"); +} + +* html .greenlighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-green.png", sizingMethod="crop"); +} + +* html .greenlighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-green.png", sizingMethod="crop"); +} + +* html .greenlighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-green.png", sizingMethod="crop"); +} + +* html .greenlighting_content { + background:#A4FCA7; +} + + + +.overlay_darkbluelighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.darkbluelighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.darkbluelighting_nw { + background:transparent url(lighting/top-left-darkblue.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.darkbluelighting_n { + background:transparent url(lighting/top-middle-darkblue.png) repeat-x 0 0; + height:28px; +} + +.darkbluelighting_ne { + background:transparent url(lighting/top-right-darkblue.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.darkbluelighting_w { + background:transparent url(lighting/left-darkblue.png) repeat-y top left; + width:9px; +} + +.darkbluelighting_e { + background:transparent url(lighting/right-darkblue.png) repeat-y top right; + width:15px; +} + +.darkbluelighting_sw { + background:transparent url(lighting/bottom-left-darkblue.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.darkbluelighting_s { + background:transparent url(lighting/bottom-middle-darkblue.png) repeat-x 0 0; + height:15px; +} + +.darkbluelighting_se, .darkbluelighting_sizer { + background:transparent url(lighting/bottom-right-darkblue.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.darkbluelighting_sizer { + cursor:se-resize; +} + +.darkbluelighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-darkblue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.darkbluelighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-darkblue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.darkbluelighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-darkblue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.darkbluelighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#E4EFFD; +} + +.darkbluelighting_content { + overflow:auto; + color:#FFF; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#0413C0; +} + +/* For alert/confirm dialog */ +.darkbluelighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.darkbluelighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.darkbluelighting_buttons { + text-align:center; + width:100%; +} + +.darkbluelighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.darkbluelighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .darkbluelighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-darkblue.png", sizingMethod="scale"); +} + +* html .darkbluelighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-darkblue.png", sizingMethod="scale"); +} + +* html .darkbluelighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-darkblue.png", sizingMethod="scale"); +} + +* html .darkbluelighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-darkblue.png", sizingMethod="scale"); +} + +* html darkbluelighting_se, * html .darkbluelighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_content { + background:#020EBA; +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc index 92248c665..36ea182e7 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc @@ -1,67 +1,67 @@ - - - - + + + + +
+ + + + \ No newline at end of file diff --git a/public/javascripts/wechat/ReactRouter.js b/public/javascripts/wechat/ReactRouter.js new file mode 100644 index 000000000..810fd7ddc --- /dev/null +++ b/public/javascripts/wechat/ReactRouter.js @@ -0,0 +1,5064 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("react")); + else if(typeof define === 'function' && define.amd) + define(["react"], factory); + else if(typeof exports === 'object') + exports["ReactRouter"] = factory(require("react")); + else + root["ReactRouter"] = factory(root["React"]); +})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + /* components */ + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _Router2 = __webpack_require__(37); + + var _Router3 = _interopRequireDefault(_Router2); + + exports.Router = _Router3['default']; + + var _Link2 = __webpack_require__(18); + + var _Link3 = _interopRequireDefault(_Link2); + + exports.Link = _Link3['default']; + + var _IndexLink2 = __webpack_require__(31); + + var _IndexLink3 = _interopRequireDefault(_IndexLink2); + + exports.IndexLink = _IndexLink3['default']; + + /* components (configuration) */ + + var _IndexRedirect2 = __webpack_require__(32); + + var _IndexRedirect3 = _interopRequireDefault(_IndexRedirect2); + + exports.IndexRedirect = _IndexRedirect3['default']; + + var _IndexRoute2 = __webpack_require__(33); + + var _IndexRoute3 = _interopRequireDefault(_IndexRoute2); + + exports.IndexRoute = _IndexRoute3['default']; + + var _Redirect2 = __webpack_require__(19); + + var _Redirect3 = _interopRequireDefault(_Redirect2); + + exports.Redirect = _Redirect3['default']; + + var _Route2 = __webpack_require__(35); + + var _Route3 = _interopRequireDefault(_Route2); + + exports.Route = _Route3['default']; + + /* mixins */ + + var _History2 = __webpack_require__(30); + + var _History3 = _interopRequireDefault(_History2); + + exports.History = _History3['default']; + + var _Lifecycle2 = __webpack_require__(34); + + var _Lifecycle3 = _interopRequireDefault(_Lifecycle2); + + exports.Lifecycle = _Lifecycle3['default']; + + var _RouteContext2 = __webpack_require__(36); + + var _RouteContext3 = _interopRequireDefault(_RouteContext2); + + exports.RouteContext = _RouteContext3['default']; + + /* utils */ + + var _useRoutes2 = __webpack_require__(48); + + var _useRoutes3 = _interopRequireDefault(_useRoutes2); + + exports.useRoutes = _useRoutes3['default']; + + var _RouteUtils = __webpack_require__(5); + + exports.createRoutes = _RouteUtils.createRoutes; + + var _RouterContext2 = __webpack_require__(13); + + var _RouterContext3 = _interopRequireDefault(_RouterContext2); + + exports.RouterContext = _RouterContext3['default']; + + var _RoutingContext2 = __webpack_require__(38); + + var _RoutingContext3 = _interopRequireDefault(_RoutingContext2); + + exports.RoutingContext = _RoutingContext3['default']; + + var _PropTypes2 = __webpack_require__(6); + + var _PropTypes3 = _interopRequireDefault(_PropTypes2); + + exports.PropTypes = _PropTypes3['default']; + + var _match2 = __webpack_require__(46); + + var _match3 = _interopRequireDefault(_match2); + + exports.match = _match3['default']; + + var _useRouterHistory2 = __webpack_require__(24); + + var _useRouterHistory3 = _interopRequireDefault(_useRouterHistory2); + + exports.useRouterHistory = _useRouterHistory3['default']; + + var _PatternUtils = __webpack_require__(8); + + exports.formatPattern = _PatternUtils.formatPattern; + + /* histories */ + + var _browserHistory2 = __webpack_require__(40); + + var _browserHistory3 = _interopRequireDefault(_browserHistory2); + + exports.browserHistory = _browserHistory3['default']; + + var _hashHistory2 = __webpack_require__(44); + + var _hashHistory3 = _interopRequireDefault(_hashHistory2); + + exports.hashHistory = _hashHistory3['default']; + + var _createMemoryHistory2 = __webpack_require__(21); + + var _createMemoryHistory3 = _interopRequireDefault(_createMemoryHistory2); + + exports.createMemoryHistory = _createMemoryHistory3['default']; + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = routerWarning; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _warning = __webpack_require__(4); + + var _warning2 = _interopRequireDefault(_warning); + + function routerWarning(falseToWarn, message) { + message = '[react-router] ' + message; + + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + false ? _warning2['default'].apply(undefined, [falseToWarn, message].concat(args)) : undefined; + } + + module.exports = exports['default']; + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = __WEBPACK_EXTERNAL_MODULE_2__; + +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + 'use strict'; + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var invariant = function(condition, format, a, b, c, d, e, f) { + if (false) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + }; + + module.exports = invariant; + + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + 'use strict'; + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = function() {}; + + if (false) { + warning = function(condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.length < 10 || (/^[s\W]*$/).test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + format + ); + } + + if (!condition) { + var argIndex = 0; + var message = 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch(x) {} + } + }; + } + + module.exports = warning; + + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + exports.isReactChildren = isReactChildren; + exports.createRouteFromReactElement = createRouteFromReactElement; + exports.createRoutesFromReactChildren = createRoutesFromReactChildren; + exports.createRoutes = createRoutes; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + function isValidChild(object) { + return object == null || _react2['default'].isValidElement(object); + } + + function isReactChildren(object) { + return isValidChild(object) || Array.isArray(object) && object.every(isValidChild); + } + + function checkPropTypes(componentName, propTypes, props) { + componentName = componentName || 'UnknownComponent'; + + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) { + var error = propTypes[propName](props, propName, componentName); + + /* istanbul ignore if: error logging */ + if (error instanceof Error) false ? _routerWarning2['default'](false, error.message) : undefined; + } + } + } + + function createRoute(defaultProps, props) { + return _extends({}, defaultProps, props); + } + + function createRouteFromReactElement(element) { + var type = element.type; + var route = createRoute(type.defaultProps, element.props); + + if (type.propTypes) checkPropTypes(type.displayName || type.name, type.propTypes, route); + + if (route.children) { + var childRoutes = createRoutesFromReactChildren(route.children, route); + + if (childRoutes.length) route.childRoutes = childRoutes; + + delete route.children; + } + + return route; + } + + /** + * Creates and returns a routes object from the given ReactChildren. JSX + * provides a convenient way to visualize how routes in the hierarchy are + * nested. + * + * import { Route, createRoutesFromReactChildren } from 'react-router' + * + * const routes = createRoutesFromReactChildren( + * + * + * + * + * ) + * + * Note: This method is automatically used when you provide children + * to a component. + */ + + function createRoutesFromReactChildren(children, parentRoute) { + var routes = []; + + _react2['default'].Children.forEach(children, function (element) { + if (_react2['default'].isValidElement(element)) { + // Component classes may have a static create* method. + if (element.type.createRouteFromReactElement) { + var route = element.type.createRouteFromReactElement(element, parentRoute); + + if (route) routes.push(route); + } else { + routes.push(createRouteFromReactElement(element)); + } + } + }); + + return routes; + } + + /** + * Creates and returns an array of routes from the given object which + * may be a JSX route, a plain object route, or an array of either. + */ + + function createRoutes(routes) { + if (isReactChildren(routes)) { + routes = createRoutesFromReactChildren(routes); + } else if (routes && !Array.isArray(routes)) { + routes = [routes]; + } + + return routes; + } + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports.falsy = falsy; + + var _react = __webpack_require__(2); + + var func = _react.PropTypes.func; + var object = _react.PropTypes.object; + var arrayOf = _react.PropTypes.arrayOf; + var oneOfType = _react.PropTypes.oneOfType; + var element = _react.PropTypes.element; + var shape = _react.PropTypes.shape; + var string = _react.PropTypes.string; + + function falsy(props, propName, componentName) { + if (props[propName]) return new Error('<' + componentName + '> should not have a "' + propName + '" prop'); + } + + var history = shape({ + listen: func.isRequired, + pushState: func.isRequired, + replaceState: func.isRequired, + go: func.isRequired + }); + + exports.history = history; + var location = shape({ + pathname: string.isRequired, + search: string.isRequired, + state: object, + action: string.isRequired, + key: string + }); + + exports.location = location; + var component = oneOfType([func, string]); + exports.component = component; + var components = oneOfType([component, object]); + exports.components = components; + var route = oneOfType([object, element]); + exports.route = route; + var routes = oneOfType([route, arrayOf(route)]); + + exports.routes = routes; + exports['default'] = { + falsy: falsy, + history: history, + location: location, + component: component, + components: components, + route: route + }; + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports.extractPath = extractPath; + exports.parsePath = parsePath; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _warning = __webpack_require__(4); + + var _warning2 = _interopRequireDefault(_warning); + + function extractPath(string) { + var match = string.match(/^https?:\/\/[^\/]*/); + + if (match == null) return string; + + return string.substring(match[0].length); + } + + function parsePath(path) { + var pathname = extractPath(path); + var search = ''; + var hash = ''; + + false ? _warning2['default'](path === pathname, 'A path must be pathname + search + hash only, not a fully qualified URL like "%s"', path) : undefined; + + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substring(hashIndex); + pathname = pathname.substring(0, hashIndex); + } + + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substring(searchIndex); + pathname = pathname.substring(0, searchIndex); + } + + if (pathname === '') pathname = '/'; + + return { + pathname: pathname, + search: search, + hash: hash + }; + } + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports.compilePattern = compilePattern; + exports.matchPattern = matchPattern; + exports.getParamNames = getParamNames; + exports.getParams = getParams; + exports.formatPattern = formatPattern; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _invariant = __webpack_require__(3); + + var _invariant2 = _interopRequireDefault(_invariant); + + function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } + + function escapeSource(string) { + return escapeRegExp(string).replace(/\/+/g, '/+'); + } + + function _compilePattern(pattern) { + var regexpSource = ''; + var paramNames = []; + var tokens = []; + + var match = undefined, + lastIndex = 0, + matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g; + while (match = matcher.exec(pattern)) { + if (match.index !== lastIndex) { + tokens.push(pattern.slice(lastIndex, match.index)); + regexpSource += escapeSource(pattern.slice(lastIndex, match.index)); + } + + if (match[1]) { + regexpSource += '([^/?#]+)'; + paramNames.push(match[1]); + } else if (match[0] === '**') { + regexpSource += '([\\s\\S]*)'; + paramNames.push('splat'); + } else if (match[0] === '*') { + regexpSource += '([\\s\\S]*?)'; + paramNames.push('splat'); + } else if (match[0] === '(') { + regexpSource += '(?:'; + } else if (match[0] === ')') { + regexpSource += ')?'; + } + + tokens.push(match[0]); + + lastIndex = matcher.lastIndex; + } + + if (lastIndex !== pattern.length) { + tokens.push(pattern.slice(lastIndex, pattern.length)); + regexpSource += escapeSource(pattern.slice(lastIndex, pattern.length)); + } + + return { + pattern: pattern, + regexpSource: regexpSource, + paramNames: paramNames, + tokens: tokens + }; + } + + var CompiledPatternsCache = {}; + + function compilePattern(pattern) { + if (!(pattern in CompiledPatternsCache)) CompiledPatternsCache[pattern] = _compilePattern(pattern); + + return CompiledPatternsCache[pattern]; + } + + /** + * Attempts to match a pattern on the given pathname. Patterns may use + * the following special characters: + * + * - :paramName Matches a URL segment up to the next /, ?, or #. The + * captured string is considered a "param" + * - () Wraps a segment of the URL that is optional + * - * Consumes (non-greedy) all characters up to the next + * character in the pattern, or to the end of the URL if + * there is none + * - ** Consumes (greedy) all characters up to the next character + * in the pattern, or to the end of the URL if there is none + * + * The return value is an object with the following properties: + * + * - remainingPathname + * - paramNames + * - paramValues + */ + + function matchPattern(pattern, pathname) { + // Make leading slashes consistent between pattern and pathname. + if (pattern.charAt(0) !== '/') { + pattern = '/' + pattern; + } + if (pathname.charAt(0) !== '/') { + pathname = '/' + pathname; + } + + var _compilePattern2 = compilePattern(pattern); + + var regexpSource = _compilePattern2.regexpSource; + var paramNames = _compilePattern2.paramNames; + var tokens = _compilePattern2.tokens; + + regexpSource += '/*'; // Capture path separators + + // Special-case patterns like '*' for catch-all routes. + var captureRemaining = tokens[tokens.length - 1] !== '*'; + + if (captureRemaining) { + // This will match newlines in the remaining path. + regexpSource += '([\\s\\S]*?)'; + } + + var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i')); + + var remainingPathname = undefined, + paramValues = undefined; + if (match != null) { + if (captureRemaining) { + remainingPathname = match.pop(); + var matchedPath = match[0].substr(0, match[0].length - remainingPathname.length); + + // If we didn't match the entire pathname, then make sure that the match + // we did get ends at a path separator (potentially the one we added + // above at the beginning of the path, if the actual match was empty). + if (remainingPathname && matchedPath.charAt(matchedPath.length - 1) !== '/') { + return { + remainingPathname: null, + paramNames: paramNames, + paramValues: null + }; + } + } else { + // If this matched at all, then the match was the entire pathname. + remainingPathname = ''; + } + + paramValues = match.slice(1).map(function (v) { + return v != null ? decodeURIComponent(v) : v; + }); + } else { + remainingPathname = paramValues = null; + } + + return { + remainingPathname: remainingPathname, + paramNames: paramNames, + paramValues: paramValues + }; + } + + function getParamNames(pattern) { + return compilePattern(pattern).paramNames; + } + + function getParams(pattern, pathname) { + var _matchPattern = matchPattern(pattern, pathname); + + var paramNames = _matchPattern.paramNames; + var paramValues = _matchPattern.paramValues; + + if (paramValues != null) { + return paramNames.reduce(function (memo, paramName, index) { + memo[paramName] = paramValues[index]; + return memo; + }, {}); + } + + return null; + } + + /** + * Returns a version of the given pattern with params interpolated. Throws + * if there is a dynamic segment of the pattern for which there is no param. + */ + + function formatPattern(pattern, params) { + params = params || {}; + + var _compilePattern3 = compilePattern(pattern); + + var tokens = _compilePattern3.tokens; + + var parenCount = 0, + pathname = '', + splatIndex = 0; + + var token = undefined, + paramName = undefined, + paramValue = undefined; + for (var i = 0, len = tokens.length; i < len; ++i) { + token = tokens[i]; + + if (token === '*' || token === '**') { + paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat; + + !(paramValue != null || parenCount > 0) ? false ? _invariant2['default'](false, 'Missing splat #%s for path "%s"', splatIndex, pattern) : _invariant2['default'](false) : undefined; + + if (paramValue != null) pathname += encodeURI(paramValue); + } else if (token === '(') { + parenCount += 1; + } else if (token === ')') { + parenCount -= 1; + } else if (token.charAt(0) === ':') { + paramName = token.substring(1); + paramValue = params[paramName]; + + !(paramValue != null || parenCount > 0) ? false ? _invariant2['default'](false, 'Missing "%s" parameter for path "%s"', paramName, pattern) : _invariant2['default'](false) : undefined; + + if (paramValue != null) pathname += encodeURIComponent(paramValue); + } else { + pathname += token; + } + } + + return pathname.replace(/\/+/g, '/'); + } + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + /** + * Indicates that navigation was caused by a call to history.push. + */ + 'use strict'; + + exports.__esModule = true; + var PUSH = 'PUSH'; + + exports.PUSH = PUSH; + /** + * Indicates that navigation was caused by a call to history.replace. + */ + var REPLACE = 'REPLACE'; + + exports.REPLACE = REPLACE; + /** + * Indicates that navigation was caused by some other action such + * as using a browser's back/forward buttons and/or manually manipulating + * the URL in a browser's location bar. This is the default. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate + * for more information. + */ + var POP = 'POP'; + + exports.POP = POP; + exports['default'] = { + PUSH: PUSH, + REPLACE: REPLACE, + POP: POP + }; + +/***/ }, +/* 10 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + exports.canUseDOM = canUseDOM; + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + var _warning = __webpack_require__(4); + + var _warning2 = _interopRequireDefault(_warning); + + var _queryString = __webpack_require__(56); + + var _runTransitionHook = __webpack_require__(17); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _PathUtils = __webpack_require__(7); + + var _deprecate = __webpack_require__(16); + + var _deprecate2 = _interopRequireDefault(_deprecate); + + var SEARCH_BASE_KEY = '$searchBase'; + + function defaultStringifyQuery(query) { + return _queryString.stringify(query).replace(/%20/g, '+'); + } + + var defaultParseQueryString = _queryString.parse; + + function isNestedObject(object) { + for (var p in object) { + if (object.hasOwnProperty(p) && typeof object[p] === 'object' && !Array.isArray(object[p]) && object[p] !== null) return true; + }return false; + } + + /** + * Returns a new createHistory function that may be used to create + * history objects that know how to handle URL queries. + */ + function useQueries(createHistory) { + return function () { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var stringifyQuery = options.stringifyQuery; + var parseQueryString = options.parseQueryString; + + var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']); + + var history = createHistory(historyOptions); + + if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; + + if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString; + + function addQuery(location) { + if (location.query == null) { + var search = location.search; + + location.query = parseQueryString(search.substring(1)); + location[SEARCH_BASE_KEY] = { search: search, searchBase: '' }; + } + + // TODO: Instead of all the book-keeping here, this should just strip the + // stringified query from the search. + + return location; + } + + function appendQuery(location, query) { + var _extends2; + + var searchBaseSpec = location[SEARCH_BASE_KEY]; + var queryString = query ? stringifyQuery(query) : ''; + if (!searchBaseSpec && !queryString) { + return location; + } + + false ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined; + + if (typeof location === 'string') location = _PathUtils.parsePath(location); + + var searchBase = undefined; + if (searchBaseSpec && location.search === searchBaseSpec.search) { + searchBase = searchBaseSpec.searchBase; + } else { + searchBase = location.search || ''; + } + + var search = searchBase; + if (queryString) { + search += (search ? '&' : '?') + queryString; + } + + return _extends({}, location, (_extends2 = { + search: search + }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2)); + } + + // Override all read methods with query-aware versions. + function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + _runTransitionHook2['default'](hook, addQuery(location), callback); + }); + } + + function listen(listener) { + return history.listen(function (location) { + listener(addQuery(location)); + }); + } + + // Override all write methods with query-aware versions. + function push(location) { + history.push(appendQuery(location, location.query)); + } + + function replace(location) { + history.replace(appendQuery(location, location.query)); + } + + function createPath(location, query) { + false ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined; + + return history.createPath(appendQuery(location, query || location.query)); + } + + function createHref(location, query) { + false ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined; + + return history.createHref(appendQuery(location, query || location.query)); + } + + function createLocation(location) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args)); + if (location.query) { + fullLocation.query = location.query; + } + return addQuery(fullLocation); + } + + // deprecated + function pushState(state, path, query) { + if (typeof path === 'string') path = _PathUtils.parsePath(path); + + push(_extends({ state: state }, path, { query: query })); + } + + // deprecated + function replaceState(state, path, query) { + if (typeof path === 'string') path = _PathUtils.parsePath(path); + + replace(_extends({ state: state }, path, { query: query })); + } + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + + pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'), + replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead') + }); + }; + } + + exports['default'] = useQueries; + module.exports = exports['default']; + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + "use strict"; + + exports.__esModule = true; + var _slice = Array.prototype.slice; + exports.loopAsync = loopAsync; + exports.mapAsync = mapAsync; + + function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var sync = false, + hasNext = false, + doneArgs = undefined; + + function done() { + isDone = true; + if (sync) { + // Iterate instead of recursing if possible. + doneArgs = [].concat(_slice.call(arguments)); + return; + } + + callback.apply(this, arguments); + } + + function next() { + if (isDone) { + return; + } + + hasNext = true; + if (sync) { + // Iterate instead of recursing if possible. + return; + } + + sync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work.call(this, currentTurn++, next, done); + } + + sync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(this, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + } + + next(); + } + + function mapAsync(array, work, callback) { + var length = array.length; + var values = []; + + if (length === 0) return callback(null, values); + + var isDone = false, + doneCount = 0; + + function done(index, error, value) { + if (isDone) return; + + if (error) { + isDone = true; + callback(error); + } else { + values[index] = value; + + isDone = ++doneCount === length; + + if (isDone) callback(null, values); + } + } + + array.forEach(function (item, index) { + work(item, index, function (error, value) { + done(index, error, value); + }); + }); + } + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _invariant = __webpack_require__(3); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _deprecateObjectProperties = __webpack_require__(23); + + var _deprecateObjectProperties2 = _interopRequireDefault(_deprecateObjectProperties); + + var _getRouteParams = __webpack_require__(43); + + var _getRouteParams2 = _interopRequireDefault(_getRouteParams); + + var _RouteUtils = __webpack_require__(5); + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + var _React$PropTypes = _react2['default'].PropTypes; + var array = _React$PropTypes.array; + var func = _React$PropTypes.func; + var object = _React$PropTypes.object; + + /** + * A renders the component tree for a given router state + * and sets the history object and the current location in context. + */ + var RouterContext = _react2['default'].createClass({ + displayName: 'RouterContext', + + propTypes: { + history: object, + router: object.isRequired, + location: object.isRequired, + routes: array.isRequired, + params: object.isRequired, + components: array.isRequired, + createElement: func.isRequired + }, + + getDefaultProps: function getDefaultProps() { + return { + createElement: _react2['default'].createElement + }; + }, + + childContextTypes: { + history: object, + location: object.isRequired, + router: object.isRequired + }, + + getChildContext: function getChildContext() { + var _props = this.props; + var router = _props.router; + var history = _props.history; + var location = _props.location; + + if (!router) { + false ? _routerWarning2['default'](false, '`` expects a `router` rather than a `history`') : undefined; + + router = _extends({}, history, { + setRouteLeaveHook: history.listenBeforeLeavingRoute + }); + delete router.listenBeforeLeavingRoute; + } + + if (false) { + location = _deprecateObjectProperties2['default'](location, '`context.location` is deprecated, please use a route component\'s `props.location` instead. http://tiny.cc/router-accessinglocation'); + } + + return { history: history, location: location, router: router }; + }, + + createElement: function createElement(component, props) { + return component == null ? null : this.props.createElement(component, props); + }, + + render: function render() { + var _this = this; + + var _props2 = this.props; + var history = _props2.history; + var location = _props2.location; + var routes = _props2.routes; + var params = _props2.params; + var components = _props2.components; + + var element = null; + + if (components) { + element = components.reduceRight(function (element, components, index) { + if (components == null) return element; // Don't create new children; use the grandchildren. + + var route = routes[index]; + var routeParams = _getRouteParams2['default'](route, params); + var props = { + history: history, + location: location, + params: params, + route: route, + routeParams: routeParams, + routes: routes + }; + + if (_RouteUtils.isReactChildren(element)) { + props.children = element; + } else if (element) { + for (var prop in element) { + if (element.hasOwnProperty(prop)) props[prop] = element[prop]; + } + } + + if (typeof components === 'object') { + var elements = {}; + + for (var key in components) { + if (components.hasOwnProperty(key)) { + // Pass through the key as a prop to createElement to allow + // custom createElement functions to know which named component + // they're rendering, for e.g. matching up to fetched data. + elements[key] = _this.createElement(components[key], _extends({ + key: key }, props)); + } + } + + return elements; + } + + return _this.createElement(components, props); + }, element); + } + + !(element === null || element === false || _react2['default'].isValidElement(element)) ? false ? _invariant2['default'](false, 'The root route must render a single element') : _invariant2['default'](false) : undefined; + + return element; + } + + }); + + exports['default'] = RouterContext; + module.exports = exports['default']; + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + exports['default'] = createTransitionManager; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + var _historyLibActions = __webpack_require__(9); + + var _computeChangedRoutes2 = __webpack_require__(41); + + var _computeChangedRoutes3 = _interopRequireDefault(_computeChangedRoutes2); + + var _TransitionUtils = __webpack_require__(39); + + var _isActive2 = __webpack_require__(45); + + var _isActive3 = _interopRequireDefault(_isActive2); + + var _getComponents = __webpack_require__(42); + + var _getComponents2 = _interopRequireDefault(_getComponents); + + var _matchRoutes = __webpack_require__(47); + + var _matchRoutes2 = _interopRequireDefault(_matchRoutes); + + function hasAnyProperties(object) { + for (var p in object) { + if (object.hasOwnProperty(p)) return true; + }return false; + } + + function createTransitionManager(history, routes) { + var state = {}; + + // Signature should be (location, indexOnly), but needs to support (path, + // query, indexOnly) + function isActive(location) { + var indexOnlyOrDeprecatedQuery = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; + var deprecatedIndexOnly = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2]; + + var indexOnly = undefined; + if (indexOnlyOrDeprecatedQuery && indexOnlyOrDeprecatedQuery !== true || deprecatedIndexOnly !== null) { + false ? _routerWarning2['default'](false, '`isActive(pathname, query, indexOnly) is deprecated; use `isActive(location, indexOnly)` with a location descriptor instead. http://tiny.cc/router-isActivedeprecated') : undefined; + location = { pathname: location, query: indexOnlyOrDeprecatedQuery }; + indexOnly = deprecatedIndexOnly || false; + } else { + location = history.createLocation(location); + indexOnly = indexOnlyOrDeprecatedQuery; + } + + return _isActive3['default'](location, indexOnly, state.location, state.routes, state.params); + } + + function createLocationFromRedirectInfo(location) { + return history.createLocation(location, _historyLibActions.REPLACE); + } + + var partialNextState = undefined; + + function match(location, callback) { + if (partialNextState && partialNextState.location === location) { + // Continue from where we left off. + finishMatch(partialNextState, callback); + } else { + _matchRoutes2['default'](routes, location, function (error, nextState) { + if (error) { + callback(error); + } else if (nextState) { + finishMatch(_extends({}, nextState, { location: location }), callback); + } else { + callback(); + } + }); + } + } + + function finishMatch(nextState, callback) { + var _computeChangedRoutes = _computeChangedRoutes3['default'](state, nextState); + + var leaveRoutes = _computeChangedRoutes.leaveRoutes; + var enterRoutes = _computeChangedRoutes.enterRoutes; + + _TransitionUtils.runLeaveHooks(leaveRoutes); + + // Tear down confirmation hooks for left routes + leaveRoutes.filter(function (route) { + return enterRoutes.indexOf(route) === -1; + }).forEach(removeListenBeforeHooksForRoute); + + _TransitionUtils.runEnterHooks(enterRoutes, nextState, function (error, redirectInfo) { + if (error) { + callback(error); + } else if (redirectInfo) { + callback(null, createLocationFromRedirectInfo(redirectInfo)); + } else { + // TODO: Fetch components after state is updated. + _getComponents2['default'](nextState, function (error, components) { + if (error) { + callback(error); + } else { + // TODO: Make match a pure function and have some other API + // for "match and update state". + callback(null, null, state = _extends({}, nextState, { components: components })); + } + }); + } + }); + } + + var RouteGuid = 1; + + function getRouteID(route) { + var create = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + + return route.__id__ || create && (route.__id__ = RouteGuid++); + } + + var RouteHooks = {}; + + function getRouteHooksForRoutes(routes) { + return routes.reduce(function (hooks, route) { + hooks.push.apply(hooks, RouteHooks[getRouteID(route)]); + return hooks; + }, []); + } + + function transitionHook(location, callback) { + _matchRoutes2['default'](routes, location, function (error, nextState) { + if (nextState == null) { + // TODO: We didn't actually match anything, but hang + // onto error/nextState so we don't have to matchRoutes + // again in the listen callback. + callback(); + return; + } + + // Cache some state here so we don't have to + // matchRoutes() again in the listen callback. + partialNextState = _extends({}, nextState, { location: location }); + + var hooks = getRouteHooksForRoutes(_computeChangedRoutes3['default'](state, partialNextState).leaveRoutes); + + var result = undefined; + for (var i = 0, len = hooks.length; result == null && i < len; ++i) { + // Passing the location arg here indicates to + // the user that this is a transition hook. + result = hooks[i](location); + } + + callback(result); + }); + } + + /* istanbul ignore next: untestable with Karma */ + function beforeUnloadHook() { + // Synchronously check to see if any route hooks want + // to prevent the current window/tab from closing. + if (state.routes) { + var hooks = getRouteHooksForRoutes(state.routes); + + var message = undefined; + for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) { + // Passing no args indicates to the user that this is a + // beforeunload hook. We don't know the next location. + message = hooks[i](); + } + + return message; + } + } + + var unlistenBefore = undefined, + unlistenBeforeUnload = undefined; + + function removeListenBeforeHooksForRoute(route) { + var routeID = getRouteID(route, false); + if (!routeID) { + return; + } + + delete RouteHooks[routeID]; + + if (!hasAnyProperties(RouteHooks)) { + // teardown transition & beforeunload hooks + if (unlistenBefore) { + unlistenBefore(); + unlistenBefore = null; + } + + if (unlistenBeforeUnload) { + unlistenBeforeUnload(); + unlistenBeforeUnload = null; + } + } + } + + /** + * Registers the given hook function to run before leaving the given route. + * + * During a normal transition, the hook function receives the next location + * as its only argument and must return either a) a prompt message to show + * the user, to make sure they want to leave the page or b) false, to prevent + * the transition. + * + * During the beforeunload event (in browsers) the hook receives no arguments. + * In this case it must return a prompt message to prevent the transition. + * + * Returns a function that may be used to unbind the listener. + */ + function listenBeforeLeavingRoute(route, hook) { + // TODO: Warn if they register for a route that isn't currently + // active. They're probably doing something wrong, like re-creating + // route objects on every location change. + var routeID = getRouteID(route); + var hooks = RouteHooks[routeID]; + + if (!hooks) { + var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks); + + RouteHooks[routeID] = [hook]; + + if (thereWereNoRouteHooks) { + // setup transition & beforeunload hooks + unlistenBefore = history.listenBefore(transitionHook); + + if (history.listenBeforeUnload) unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook); + } + } else { + if (hooks.indexOf(hook) === -1) { + false ? _routerWarning2['default'](false, 'adding multiple leave hooks for the same route is deprecated; manage multiple confirmations in your own code instead') : undefined; + + hooks.push(hook); + } + } + + return function () { + var hooks = RouteHooks[routeID]; + + if (hooks) { + var newHooks = hooks.filter(function (item) { + return item !== hook; + }); + + if (newHooks.length === 0) { + removeListenBeforeHooksForRoute(route); + } else { + RouteHooks[routeID] = newHooks; + } + } + }; + } + + /** + * This is the API for stateful environments. As the location + * changes, we update state and call the listener. We can also + * gracefully handle errors and redirects. + */ + function listen(listener) { + // TODO: Only use a single history listener. Otherwise we'll + // end up with multiple concurrent calls to match. + return history.listen(function (location) { + if (state.location === location) { + listener(null, state); + } else { + match(location, function (error, redirectLocation, nextState) { + if (error) { + listener(error); + } else if (redirectLocation) { + history.transitionTo(redirectLocation); + } else if (nextState) { + listener(null, nextState); + } else { + false ? _routerWarning2['default'](false, 'Location "%s" did not match any routes', location.pathname + location.search + location.hash) : undefined; + } + }); + } + }); + } + + return { + isActive: isActive, + match: match, + listenBeforeLeavingRoute: listenBeforeLeavingRoute, + listen: listen + }; + } + + //export default useRoutes + module.exports = exports['default']; + +/***/ }, +/* 15 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports.addEventListener = addEventListener; + exports.removeEventListener = removeEventListener; + exports.getHashPath = getHashPath; + exports.replaceHashPath = replaceHashPath; + exports.getWindowPath = getWindowPath; + exports.go = go; + exports.getUserConfirmation = getUserConfirmation; + exports.supportsHistory = supportsHistory; + exports.supportsGoWithoutReloadUsingHash = supportsGoWithoutReloadUsingHash; + + function addEventListener(node, event, listener) { + if (node.addEventListener) { + node.addEventListener(event, listener, false); + } else { + node.attachEvent('on' + event, listener); + } + } + + function removeEventListener(node, event, listener) { + if (node.removeEventListener) { + node.removeEventListener(event, listener, false); + } else { + node.detachEvent('on' + event, listener); + } + } + + function getHashPath() { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + return window.location.href.split('#')[1] || ''; + } + + function replaceHashPath(path) { + window.location.replace(window.location.pathname + window.location.search + '#' + path); + } + + function getWindowPath() { + return window.location.pathname + window.location.search + window.location.hash; + } + + function go(n) { + if (n) window.history.go(n); + } + + function getUserConfirmation(message, callback) { + callback(window.confirm(message)); + } + + /** + * Returns true if the HTML5 history API is supported. Taken from Modernizr. + * + * https://github.com/Modernizr/Modernizr/blob/master/LICENSE + * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js + * changed to avoid false negatives for Windows Phones: https://github.com/rackt/react-router/issues/586 + */ + + function supportsHistory() { + var ua = navigator.userAgent; + if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) { + return false; + } + return window.history && 'pushState' in window.history; + } + + /** + * Returns false if using go(n) with hash history causes a full page reload. + */ + + function supportsGoWithoutReloadUsingHash() { + var ua = navigator.userAgent; + return ua.indexOf('Firefox') === -1; + } + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _warning = __webpack_require__(4); + + var _warning2 = _interopRequireDefault(_warning); + + function deprecate(fn, message) { + return function () { + false ? _warning2['default'](false, '[history] ' + message) : undefined; + return fn.apply(this, arguments); + }; + } + + exports['default'] = deprecate; + module.exports = exports['default']; + +/***/ }, +/* 17 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _warning = __webpack_require__(4); + + var _warning2 = _interopRequireDefault(_warning); + + function runTransitionHook(hook, location, callback) { + var result = hook(location, callback); + + if (hook.length < 2) { + // Assume the hook runs synchronously and automatically + // call the callback with the return value. + callback(result); + } else { + false ? _warning2['default'](result === undefined, 'You should not "return" in a transition hook with a callback argument; call the callback instead') : undefined; + } + } + + exports['default'] = runTransitionHook; + module.exports = exports['default']; + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + var _React$PropTypes = _react2['default'].PropTypes; + var bool = _React$PropTypes.bool; + var object = _React$PropTypes.object; + var string = _React$PropTypes.string; + var func = _React$PropTypes.func; + var oneOfType = _React$PropTypes.oneOfType; + + function isLeftClickEvent(event) { + return event.button === 0; + } + + function isModifiedEvent(event) { + return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); + } + + function isEmptyObject(object) { + for (var p in object) { + if (object.hasOwnProperty(p)) return false; + }return true; + } + + function createLocationDescriptor(to, _ref) { + var query = _ref.query; + var hash = _ref.hash; + var state = _ref.state; + + if (query || hash || state) { + return { pathname: to, query: query, hash: hash, state: state }; + } + + return to; + } + + /** + * A is used to create an element that links to a route. + * When that route is active, the link gets the value of its + * activeClassName prop. + * + * For example, assuming you have the following route: + * + * + * + * You could use the following component to link to that route: + * + * + * + * Links may pass along location state and/or query string parameters + * in the state/query props, respectively. + * + * + */ + var Link = _react2['default'].createClass({ + displayName: 'Link', + + contextTypes: { + router: object + }, + + propTypes: { + to: oneOfType([string, object]).isRequired, + query: object, + hash: string, + state: object, + activeStyle: object, + activeClassName: string, + onlyActiveOnIndex: bool.isRequired, + onClick: func + }, + + getDefaultProps: function getDefaultProps() { + return { + onlyActiveOnIndex: false, + className: '', + style: {} + }; + }, + + handleClick: function handleClick(event) { + var allowTransition = true; + + if (this.props.onClick) this.props.onClick(event); + + if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; + + if (event.defaultPrevented === true) allowTransition = false; + + // If target prop is set (e.g. to "_blank") let browser handle link. + /* istanbul ignore if: untestable with Karma */ + if (this.props.target) { + if (!allowTransition) event.preventDefault(); + + return; + } + + event.preventDefault(); + + if (allowTransition) { + var _props = this.props; + var to = _props.to; + var query = _props.query; + var hash = _props.hash; + var state = _props.state; + + var _location = createLocationDescriptor(to, { query: query, hash: hash, state: state }); + + this.context.router.push(_location); + } + }, + + render: function render() { + var _props2 = this.props; + var to = _props2.to; + var query = _props2.query; + var hash = _props2.hash; + var state = _props2.state; + var activeClassName = _props2.activeClassName; + var activeStyle = _props2.activeStyle; + var onlyActiveOnIndex = _props2.onlyActiveOnIndex; + + var props = _objectWithoutProperties(_props2, ['to', 'query', 'hash', 'state', 'activeClassName', 'activeStyle', 'onlyActiveOnIndex']); + + false ? _routerWarning2['default'](!(query || hash || state), 'the `query`, `hash`, and `state` props on `` are deprecated, use `. http://tiny.cc/router-isActivedeprecated') : undefined; + + // Ignore if rendered outside the context of router, simplifies unit testing. + var router = this.context.router; + + if (router) { + var _location2 = createLocationDescriptor(to, { query: query, hash: hash, state: state }); + props.href = router.createHref(_location2); + + if (activeClassName || activeStyle != null && !isEmptyObject(activeStyle)) { + if (router.isActive(_location2, onlyActiveOnIndex)) { + if (activeClassName) props.className += props.className === '' ? activeClassName : ' ' + activeClassName; + + if (activeStyle) props.style = _extends({}, props.style, activeStyle); + } + } + } + + return _react2['default'].createElement('a', _extends({}, props, { onClick: this.handleClick })); + } + + }); + + exports['default'] = Link; + module.exports = exports['default']; + +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _invariant = __webpack_require__(3); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _RouteUtils = __webpack_require__(5); + + var _PatternUtils = __webpack_require__(8); + + var _PropTypes = __webpack_require__(6); + + var _React$PropTypes = _react2['default'].PropTypes; + var string = _React$PropTypes.string; + var object = _React$PropTypes.object; + + /** + * A is used to declare another URL path a client should + * be sent to when they request a given URL. + * + * Redirects are placed alongside routes in the route configuration + * and are traversed in the same manner. + */ + var Redirect = _react2['default'].createClass({ + displayName: 'Redirect', + + statics: { + + createRouteFromReactElement: function createRouteFromReactElement(element) { + var route = _RouteUtils.createRouteFromReactElement(element); + + if (route.from) route.path = route.from; + + route.onEnter = function (nextState, replace) { + var location = nextState.location; + var params = nextState.params; + + var pathname = undefined; + if (route.to.charAt(0) === '/') { + pathname = _PatternUtils.formatPattern(route.to, params); + } else if (!route.to) { + pathname = location.pathname; + } else { + var routeIndex = nextState.routes.indexOf(route); + var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); + var pattern = parentPattern.replace(/\/*$/, '/') + route.to; + pathname = _PatternUtils.formatPattern(pattern, params); + } + + replace({ + pathname: pathname, + query: route.query || location.query, + state: route.state || location.state + }); + }; + + return route; + }, + + getRoutePattern: function getRoutePattern(routes, routeIndex) { + var parentPattern = ''; + + for (var i = routeIndex; i >= 0; i--) { + var route = routes[i]; + var pattern = route.path || ''; + + parentPattern = pattern.replace(/\/*$/, '/') + parentPattern; + + if (pattern.indexOf('/') === 0) break; + } + + return '/' + parentPattern; + } + + }, + + propTypes: { + path: string, + from: string, // Alias for path + to: string.isRequired, + query: object, + state: object, + onEnter: _PropTypes.falsy, + children: _PropTypes.falsy + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true ? false ? _invariant2['default'](false, ' elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined; + } + + }); + + exports['default'] = Redirect; + module.exports = exports['default']; + +/***/ }, +/* 20 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + exports.createRouterObject = createRouterObject; + exports.createRoutingHistory = createRoutingHistory; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _deprecateObjectProperties = __webpack_require__(23); + + var _deprecateObjectProperties2 = _interopRequireDefault(_deprecateObjectProperties); + + function createRouterObject(history, transitionManager) { + return _extends({}, history, { + setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute, + isActive: transitionManager.isActive + }); + } + + // deprecated + + function createRoutingHistory(history, transitionManager) { + history = _extends({}, history, transitionManager); + + if (false) { + history = _deprecateObjectProperties2['default'](history, '`props.history` and `context.history` are deprecated. Please use `context.router`. http://tiny.cc/router-contextchanges'); + } + + return history; + } + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = createMemoryHistory; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _historyLibUseQueries = __webpack_require__(11); + + var _historyLibUseQueries2 = _interopRequireDefault(_historyLibUseQueries); + + var _historyLibUseBasename = __webpack_require__(29); + + var _historyLibUseBasename2 = _interopRequireDefault(_historyLibUseBasename); + + var _historyLibCreateMemoryHistory = __webpack_require__(55); + + var _historyLibCreateMemoryHistory2 = _interopRequireDefault(_historyLibCreateMemoryHistory); + + function createMemoryHistory(options) { + // signatures and type checking differ between `useRoutes` and + // `createMemoryHistory`, have to create `memoryHistory` first because + // `useQueries` doesn't understand the signature + var memoryHistory = _historyLibCreateMemoryHistory2['default'](options); + var createHistory = function createHistory() { + return memoryHistory; + }; + var history = _historyLibUseQueries2['default'](_historyLibUseBasename2['default'](createHistory))(options); + history.__v2_compatible__ = true; + return history; + } + + module.exports = exports['default']; + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _useRouterHistory = __webpack_require__(24); + + var _useRouterHistory2 = _interopRequireDefault(_useRouterHistory); + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + + exports['default'] = function (createHistory) { + var history = undefined; + if (canUseDOM) history = _useRouterHistory2['default'](createHistory)(); + return history; + }; + + module.exports = exports['default']; + +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { + + /*eslint no-empty: 0*/ + 'use strict'; + + exports.__esModule = true; + exports['default'] = deprecateObjectProperties; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + var useMembrane = false; + + if (false) { + try { + if (Object.defineProperty({}, 'x', { get: function get() { + return true; + } }).x) { + useMembrane = true; + } + } catch (e) {} + } + + // wraps an object in a membrane to warn about deprecated property access + + function deprecateObjectProperties(object, message) { + if (!useMembrane) return object; + + var membrane = {}; + + var _loop = function (prop) { + if (typeof object[prop] === 'function') { + membrane[prop] = function () { + false ? _routerWarning2['default'](false, message) : undefined; + return object[prop].apply(object, arguments); + }; + } else { + Object.defineProperty(membrane, prop, { + configurable: false, + enumerable: false, + get: function get() { + false ? _routerWarning2['default'](false, message) : undefined; + return object[prop]; + } + }); + } + }; + + for (var prop in object) { + _loop(prop); + } + + return membrane; + } + + module.exports = exports['default']; + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = useRouterHistory; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _historyLibUseQueries = __webpack_require__(11); + + var _historyLibUseQueries2 = _interopRequireDefault(_historyLibUseQueries); + + var _historyLibUseBasename = __webpack_require__(29); + + var _historyLibUseBasename2 = _interopRequireDefault(_historyLibUseBasename); + + function useRouterHistory(createHistory) { + return function (options) { + var history = _historyLibUseQueries2['default'](_historyLibUseBasename2['default'](createHistory))(options); + history.__v2_compatible__ = true; + return history; + }; + } + + module.exports = exports['default']; + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + /*eslint-disable no-empty */ + 'use strict'; + + exports.__esModule = true; + exports.saveState = saveState; + exports.readState = readState; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _warning = __webpack_require__(4); + + var _warning2 = _interopRequireDefault(_warning); + + var KeyPrefix = '@@History/'; + var QuotaExceededErrors = ['QuotaExceededError', 'QUOTA_EXCEEDED_ERR']; + + var SecurityError = 'SecurityError'; + + function createKey(key) { + return KeyPrefix + key; + } + + function saveState(key, state) { + try { + if (state == null) { + window.sessionStorage.removeItem(createKey(key)); + } else { + window.sessionStorage.setItem(createKey(key), JSON.stringify(state)); + } + } catch (error) { + if (error.name === SecurityError) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + false ? _warning2['default'](false, '[history] Unable to save state; sessionStorage is not available due to security settings') : undefined; + + return; + } + + if (QuotaExceededErrors.indexOf(error.name) >= 0 && window.sessionStorage.length === 0) { + // Safari "private mode" throws QuotaExceededError. + false ? _warning2['default'](false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : undefined; + + return; + } + + throw error; + } + } + + function readState(key) { + var json = undefined; + try { + json = window.sessionStorage.getItem(createKey(key)); + } catch (error) { + if (error.name === SecurityError) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + false ? _warning2['default'](false, '[history] Unable to read state; sessionStorage is not available due to security settings') : undefined; + + return null; + } + } + + if (json) { + try { + return JSON.parse(json); + } catch (error) { + // Ignore invalid JSON. + } + } + + return null; + } + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _invariant = __webpack_require__(3); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(10); + + var _DOMUtils = __webpack_require__(15); + + var _createHistory = __webpack_require__(28); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function createDOMHistory(options) { + var history = _createHistory2['default'](_extends({ + getUserConfirmation: _DOMUtils.getUserConfirmation + }, options, { + go: _DOMUtils.go + })); + + function listen(listener) { + !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'DOM history needs a DOM') : _invariant2['default'](false) : undefined; + + return history.listen(listener); + } + + return _extends({}, history, { + listen: listen + }); + } + + exports['default'] = createDOMHistory; + module.exports = exports['default']; + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _warning = __webpack_require__(4); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(3); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _Actions = __webpack_require__(9); + + var _PathUtils = __webpack_require__(7); + + var _ExecutionEnvironment = __webpack_require__(10); + + var _DOMUtils = __webpack_require__(15); + + var _DOMStateStorage = __webpack_require__(25); + + var _createDOMHistory = __webpack_require__(26); + + var _createDOMHistory2 = _interopRequireDefault(_createDOMHistory); + + function isAbsolutePath(path) { + return typeof path === 'string' && path.charAt(0) === '/'; + } + + function ensureSlash() { + var path = _DOMUtils.getHashPath(); + + if (isAbsolutePath(path)) return true; + + _DOMUtils.replaceHashPath('/' + path); + + return false; + } + + function addQueryStringValueToPath(path, key, value) { + return path + (path.indexOf('?') === -1 ? '?' : '&') + (key + '=' + value); + } + + function stripQueryStringValueFromPath(path, key) { + return path.replace(new RegExp('[?&]?' + key + '=[a-zA-Z0-9]+'), ''); + } + + function getQueryStringValueFromPath(path, key) { + var match = path.match(new RegExp('\\?.*?\\b' + key + '=(.+?)\\b')); + return match && match[1]; + } + + var DefaultQueryKey = '_k'; + + function createHashHistory() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Hash history needs a DOM') : _invariant2['default'](false) : undefined; + + var queryKey = options.queryKey; + + if (queryKey === undefined || !!queryKey) queryKey = typeof queryKey === 'string' ? queryKey : DefaultQueryKey; + + function getCurrentLocation() { + var path = _DOMUtils.getHashPath(); + + var key = undefined, + state = undefined; + if (queryKey) { + key = getQueryStringValueFromPath(path, queryKey); + path = stripQueryStringValueFromPath(path, queryKey); + + if (key) { + state = _DOMStateStorage.readState(key); + } else { + state = null; + key = history.createKey(); + _DOMUtils.replaceHashPath(addQueryStringValueToPath(path, queryKey, key)); + } + } else { + key = state = null; + } + + var location = _PathUtils.parsePath(path); + + return history.createLocation(_extends({}, location, { state: state }), undefined, key); + } + + function startHashChangeListener(_ref) { + var transitionTo = _ref.transitionTo; + + function hashChangeListener() { + if (!ensureSlash()) return; // Always make sure hashes are preceeded with a /. + + transitionTo(getCurrentLocation()); + } + + ensureSlash(); + _DOMUtils.addEventListener(window, 'hashchange', hashChangeListener); + + return function () { + _DOMUtils.removeEventListener(window, 'hashchange', hashChangeListener); + }; + } + + function finishTransition(location) { + var basename = location.basename; + var pathname = location.pathname; + var search = location.search; + var state = location.state; + var action = location.action; + var key = location.key; + + if (action === _Actions.POP) return; // Nothing to do. + + var path = (basename || '') + pathname + search; + + if (queryKey) { + path = addQueryStringValueToPath(path, queryKey, key); + _DOMStateStorage.saveState(key, state); + } else { + // Drop key and state. + location.key = location.state = null; + } + + var currentHash = _DOMUtils.getHashPath(); + + if (action === _Actions.PUSH) { + if (currentHash !== path) { + window.location.hash = path; + } else { + false ? _warning2['default'](false, 'You cannot PUSH the same path using hash history') : undefined; + } + } else if (currentHash !== path) { + // REPLACE + _DOMUtils.replaceHashPath(path); + } + } + + var history = _createDOMHistory2['default'](_extends({}, options, { + getCurrentLocation: getCurrentLocation, + finishTransition: finishTransition, + saveState: _DOMStateStorage.saveState + })); + + var listenerCount = 0, + stopHashChangeListener = undefined; + + function listenBefore(listener) { + if (++listenerCount === 1) stopHashChangeListener = startHashChangeListener(history); + + var unlisten = history.listenBefore(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopHashChangeListener(); + }; + } + + function listen(listener) { + if (++listenerCount === 1) stopHashChangeListener = startHashChangeListener(history); + + var unlisten = history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopHashChangeListener(); + }; + } + + function push(location) { + false ? _warning2['default'](queryKey || location.state == null, 'You cannot use state without a queryKey it will be dropped') : undefined; + + history.push(location); + } + + function replace(location) { + false ? _warning2['default'](queryKey || location.state == null, 'You cannot use state without a queryKey it will be dropped') : undefined; + + history.replace(location); + } + + var goIsSupportedWithoutReload = _DOMUtils.supportsGoWithoutReloadUsingHash(); + + function go(n) { + false ? _warning2['default'](goIsSupportedWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : undefined; + + history.go(n); + } + + function createHref(path) { + return '#' + history.createHref(path); + } + + // deprecated + function registerTransitionHook(hook) { + if (++listenerCount === 1) stopHashChangeListener = startHashChangeListener(history); + + history.registerTransitionHook(hook); + } + + // deprecated + function unregisterTransitionHook(hook) { + history.unregisterTransitionHook(hook); + + if (--listenerCount === 0) stopHashChangeListener(); + } + + // deprecated + function pushState(state, path) { + false ? _warning2['default'](queryKey || state == null, 'You cannot use state without a queryKey it will be dropped') : undefined; + + history.pushState(state, path); + } + + // deprecated + function replaceState(state, path) { + false ? _warning2['default'](queryKey || state == null, 'You cannot use state without a queryKey it will be dropped') : undefined; + + history.replaceState(state, path); + } + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + go: go, + createHref: createHref, + + registerTransitionHook: registerTransitionHook, // deprecated - warning is in createHistory + unregisterTransitionHook: unregisterTransitionHook, // deprecated - warning is in createHistory + pushState: pushState, // deprecated - warning is in createHistory + replaceState: replaceState // deprecated - warning is in createHistory + }); + } + + exports['default'] = createHashHistory; + module.exports = exports['default']; + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _warning = __webpack_require__(4); + + var _warning2 = _interopRequireDefault(_warning); + + var _deepEqual = __webpack_require__(49); + + var _deepEqual2 = _interopRequireDefault(_deepEqual); + + var _PathUtils = __webpack_require__(7); + + var _AsyncUtils = __webpack_require__(52); + + var _Actions = __webpack_require__(9); + + var _createLocation2 = __webpack_require__(54); + + var _createLocation3 = _interopRequireDefault(_createLocation2); + + var _runTransitionHook = __webpack_require__(17); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _deprecate = __webpack_require__(16); + + var _deprecate2 = _interopRequireDefault(_deprecate); + + function createRandomKey(length) { + return Math.random().toString(36).substr(2, length); + } + + function locationsAreEqual(a, b) { + return a.pathname === b.pathname && a.search === b.search && + //a.action === b.action && // Different action !== location change. + a.key === b.key && _deepEqual2['default'](a.state, b.state); + } + + var DefaultKeyLength = 6; + + function createHistory() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var getCurrentLocation = options.getCurrentLocation; + var finishTransition = options.finishTransition; + var saveState = options.saveState; + var go = options.go; + var keyLength = options.keyLength; + var getUserConfirmation = options.getUserConfirmation; + + if (typeof keyLength !== 'number') keyLength = DefaultKeyLength; + + var transitionHooks = []; + + function listenBefore(hook) { + transitionHooks.push(hook); + + return function () { + transitionHooks = transitionHooks.filter(function (item) { + return item !== hook; + }); + }; + } + + var allKeys = []; + var changeListeners = []; + var location = undefined; + + function getCurrent() { + if (pendingLocation && pendingLocation.action === _Actions.POP) { + return allKeys.indexOf(pendingLocation.key); + } else if (location) { + return allKeys.indexOf(location.key); + } else { + return -1; + } + } + + function updateLocation(newLocation) { + var current = getCurrent(); + + location = newLocation; + + if (location.action === _Actions.PUSH) { + allKeys = [].concat(allKeys.slice(0, current + 1), [location.key]); + } else if (location.action === _Actions.REPLACE) { + allKeys[current] = location.key; + } + + changeListeners.forEach(function (listener) { + listener(location); + }); + } + + function listen(listener) { + changeListeners.push(listener); + + if (location) { + listener(location); + } else { + var _location = getCurrentLocation(); + allKeys = [_location.key]; + updateLocation(_location); + } + + return function () { + changeListeners = changeListeners.filter(function (item) { + return item !== listener; + }); + }; + } + + function confirmTransitionTo(location, callback) { + _AsyncUtils.loopAsync(transitionHooks.length, function (index, next, done) { + _runTransitionHook2['default'](transitionHooks[index], location, function (result) { + if (result != null) { + done(result); + } else { + next(); + } + }); + }, function (message) { + if (getUserConfirmation && typeof message === 'string') { + getUserConfirmation(message, function (ok) { + callback(ok !== false); + }); + } else { + callback(message !== false); + } + }); + } + + var pendingLocation = undefined; + + function transitionTo(nextLocation) { + if (location && locationsAreEqual(location, nextLocation)) return; // Nothing to do. + + pendingLocation = nextLocation; + + confirmTransitionTo(nextLocation, function (ok) { + if (pendingLocation !== nextLocation) return; // Transition was interrupted. + + if (ok) { + // treat PUSH to current path like REPLACE to be consistent with browsers + if (nextLocation.action === _Actions.PUSH) { + var prevPath = createPath(location); + var nextPath = createPath(nextLocation); + + if (nextPath === prevPath && _deepEqual2['default'](location.state, nextLocation.state)) nextLocation.action = _Actions.REPLACE; + } + + if (finishTransition(nextLocation) !== false) updateLocation(nextLocation); + } else if (location && nextLocation.action === _Actions.POP) { + var prevIndex = allKeys.indexOf(location.key); + var nextIndex = allKeys.indexOf(nextLocation.key); + + if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL. + } + }); + } + + function push(location) { + transitionTo(createLocation(location, _Actions.PUSH, createKey())); + } + + function replace(location) { + transitionTo(createLocation(location, _Actions.REPLACE, createKey())); + } + + function goBack() { + go(-1); + } + + function goForward() { + go(1); + } + + function createKey() { + return createRandomKey(keyLength); + } + + function createPath(location) { + if (location == null || typeof location === 'string') return location; + + var pathname = location.pathname; + var search = location.search; + var hash = location.hash; + + var result = pathname; + + if (search) result += search; + + if (hash) result += hash; + + return result; + } + + function createHref(location) { + return createPath(location); + } + + function createLocation(location, action) { + var key = arguments.length <= 2 || arguments[2] === undefined ? createKey() : arguments[2]; + + if (typeof action === 'object') { + false ? _warning2['default'](false, 'The state (2nd) argument to history.createLocation is deprecated; use a ' + 'location descriptor instead') : undefined; + + if (typeof location === 'string') location = _PathUtils.parsePath(location); + + location = _extends({}, location, { state: action }); + + action = key; + key = arguments[3] || createKey(); + } + + return _createLocation3['default'](location, action, key); + } + + // deprecated + function setState(state) { + if (location) { + updateLocationState(location, state); + updateLocation(location); + } else { + updateLocationState(getCurrentLocation(), state); + } + } + + function updateLocationState(location, state) { + location.state = _extends({}, location.state, state); + saveState(location.key, location.state); + } + + // deprecated + function registerTransitionHook(hook) { + if (transitionHooks.indexOf(hook) === -1) transitionHooks.push(hook); + } + + // deprecated + function unregisterTransitionHook(hook) { + transitionHooks = transitionHooks.filter(function (item) { + return item !== hook; + }); + } + + // deprecated + function pushState(state, path) { + if (typeof path === 'string') path = _PathUtils.parsePath(path); + + push(_extends({ state: state }, path)); + } + + // deprecated + function replaceState(state, path) { + if (typeof path === 'string') path = _PathUtils.parsePath(path); + + replace(_extends({ state: state }, path)); + } + + return { + listenBefore: listenBefore, + listen: listen, + transitionTo: transitionTo, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + createKey: createKey, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + + setState: _deprecate2['default'](setState, 'setState is deprecated; use location.key to save state instead'), + registerTransitionHook: _deprecate2['default'](registerTransitionHook, 'registerTransitionHook is deprecated; use listenBefore instead'), + unregisterTransitionHook: _deprecate2['default'](unregisterTransitionHook, 'unregisterTransitionHook is deprecated; use the callback returned from listenBefore instead'), + pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'), + replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead') + }; + } + + exports['default'] = createHistory; + module.exports = exports['default']; + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + var _ExecutionEnvironment = __webpack_require__(10); + + var _PathUtils = __webpack_require__(7); + + var _runTransitionHook = __webpack_require__(17); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _deprecate = __webpack_require__(16); + + var _deprecate2 = _interopRequireDefault(_deprecate); + + function useBasename(createHistory) { + return function () { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var basename = options.basename; + + var historyOptions = _objectWithoutProperties(options, ['basename']); + + var history = createHistory(historyOptions); + + // Automatically use the value of in HTML + // documents as basename if it's not explicitly given. + if (basename == null && _ExecutionEnvironment.canUseDOM) { + var base = document.getElementsByTagName('base')[0]; + + if (base) basename = _PathUtils.extractPath(base.href); + } + + function addBasename(location) { + if (basename && location.basename == null) { + if (location.pathname.indexOf(basename) === 0) { + location.pathname = location.pathname.substring(basename.length); + location.basename = basename; + + if (location.pathname === '') location.pathname = '/'; + } else { + location.basename = ''; + } + } + + return location; + } + + function prependBasename(location) { + if (!basename) return location; + + if (typeof location === 'string') location = _PathUtils.parsePath(location); + + var pname = location.pathname; + var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/'; + var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname; + var pathname = normalizedBasename + normalizedPathname; + + return _extends({}, location, { + pathname: pathname + }); + } + + // Override all read methods with basename-aware versions. + function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + _runTransitionHook2['default'](hook, addBasename(location), callback); + }); + } + + function listen(listener) { + return history.listen(function (location) { + listener(addBasename(location)); + }); + } + + // Override all write methods with basename-aware versions. + function push(location) { + history.push(prependBasename(location)); + } + + function replace(location) { + history.replace(prependBasename(location)); + } + + function createPath(location) { + return history.createPath(prependBasename(location)); + } + + function createHref(location) { + return history.createHref(prependBasename(location)); + } + + function createLocation(location) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args))); + } + + // deprecated + function pushState(state, path) { + if (typeof path === 'string') path = _PathUtils.parsePath(path); + + push(_extends({ state: state }, path)); + } + + // deprecated + function replaceState(state, path) { + if (typeof path === 'string') path = _PathUtils.parsePath(path); + + replace(_extends({ state: state }, path)); + } + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + + pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'), + replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead') + }); + }; + } + + exports['default'] = useBasename; + module.exports = exports['default']; + +/***/ }, +/* 30 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + var _PropTypes = __webpack_require__(6); + + /** + * A mixin that adds the "history" instance variable to components. + */ + var History = { + + contextTypes: { + history: _PropTypes.history + }, + + componentWillMount: function componentWillMount() { + false ? _routerWarning2['default'](false, 'the `History` mixin is deprecated, please access `context.router` with your own `contextTypes`. http://tiny.cc/router-historymixin') : undefined; + this.history = this.context.history; + } + + }; + + exports['default'] = History; + module.exports = exports['default']; + +/***/ }, +/* 31 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _Link = __webpack_require__(18); + + var _Link2 = _interopRequireDefault(_Link); + + /** + * An is used to link to an . + */ + var IndexLink = _react2['default'].createClass({ + displayName: 'IndexLink', + + render: function render() { + return _react2['default'].createElement(_Link2['default'], _extends({}, this.props, { onlyActiveOnIndex: true })); + } + + }); + + exports['default'] = IndexLink; + module.exports = exports['default']; + +/***/ }, +/* 32 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + var _invariant = __webpack_require__(3); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _Redirect = __webpack_require__(19); + + var _Redirect2 = _interopRequireDefault(_Redirect); + + var _PropTypes = __webpack_require__(6); + + var _React$PropTypes = _react2['default'].PropTypes; + var string = _React$PropTypes.string; + var object = _React$PropTypes.object; + + /** + * An is used to redirect from an indexRoute. + */ + var IndexRedirect = _react2['default'].createClass({ + displayName: 'IndexRedirect', + + statics: { + + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = _Redirect2['default'].createRouteFromReactElement(element); + } else { + false ? _routerWarning2['default'](false, 'An does not make sense at the root of your route config') : undefined; + } + } + + }, + + propTypes: { + to: string.isRequired, + query: object, + state: object, + onEnter: _PropTypes.falsy, + children: _PropTypes.falsy + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true ? false ? _invariant2['default'](false, ' elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined; + } + + }); + + exports['default'] = IndexRedirect; + module.exports = exports['default']; + +/***/ }, +/* 33 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + var _invariant = __webpack_require__(3); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _RouteUtils = __webpack_require__(5); + + var _PropTypes = __webpack_require__(6); + + var func = _react2['default'].PropTypes.func; + + /** + * An is used to specify its parent's in + * a JSX route config. + */ + var IndexRoute = _react2['default'].createClass({ + displayName: 'IndexRoute', + + statics: { + + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = _RouteUtils.createRouteFromReactElement(element); + } else { + false ? _routerWarning2['default'](false, 'An does not make sense at the root of your route config') : undefined; + } + } + + }, + + propTypes: { + path: _PropTypes.falsy, + component: _PropTypes.component, + components: _PropTypes.components, + getComponent: func, + getComponents: func + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true ? false ? _invariant2['default'](false, ' elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined; + } + + }); + + exports['default'] = IndexRoute; + module.exports = exports['default']; + +/***/ }, +/* 34 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _invariant = __webpack_require__(3); + + var _invariant2 = _interopRequireDefault(_invariant); + + var object = _react2['default'].PropTypes.object; + + /** + * The Lifecycle mixin adds the routerWillLeave lifecycle method to a + * component that may be used to cancel a transition or prompt the user + * for confirmation. + * + * On standard transitions, routerWillLeave receives a single argument: the + * location we're transitioning to. To cancel the transition, return false. + * To prompt the user for confirmation, return a prompt message (string). + * + * During the beforeunload event (assuming you're using the useBeforeUnload + * history enhancer), routerWillLeave does not receive a location object + * because it isn't possible for us to know the location we're transitioning + * to. In this case routerWillLeave must return a prompt message to prevent + * the user from closing the window/tab. + */ + var Lifecycle = { + + contextTypes: { + history: object.isRequired, + // Nested children receive the route as context, either + // set by the route component using the RouteContext mixin + // or by some other ancestor. + route: object + }, + + propTypes: { + // Route components receive the route object as a prop. + route: object + }, + + componentDidMount: function componentDidMount() { + false ? _routerWarning2['default'](false, 'the `Lifecycle` mixin is deprecated, please use `context.router.setRouteLeaveHook(route, hook)`. http://tiny.cc/router-lifecyclemixin') : undefined; + !this.routerWillLeave ? false ? _invariant2['default'](false, 'The Lifecycle mixin requires you to define a routerWillLeave method') : _invariant2['default'](false) : undefined; + + var route = this.props.route || this.context.route; + + !route ? false ? _invariant2['default'](false, 'The Lifecycle mixin must be used on either a) a or ' + 'b) a descendant of a that uses the RouteContext mixin') : _invariant2['default'](false) : undefined; + + this._unlistenBeforeLeavingRoute = this.context.history.listenBeforeLeavingRoute(route, this.routerWillLeave); + }, + + componentWillUnmount: function componentWillUnmount() { + if (this._unlistenBeforeLeavingRoute) this._unlistenBeforeLeavingRoute(); + } + + }; + + exports['default'] = Lifecycle; + module.exports = exports['default']; + +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _invariant = __webpack_require__(3); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _RouteUtils = __webpack_require__(5); + + var _PropTypes = __webpack_require__(6); + + var _React$PropTypes = _react2['default'].PropTypes; + var string = _React$PropTypes.string; + var func = _React$PropTypes.func; + + /** + * A is used to declare which components are rendered to the + * page when the URL matches a given pattern. + * + * Routes are arranged in a nested tree structure. When a new URL is + * requested, the tree is searched depth-first to find a route whose + * path matches the URL. When one is found, all routes in the tree + * that lead to it are considered "active" and their components are + * rendered into the DOM, nested in the same order as in the tree. + */ + var Route = _react2['default'].createClass({ + displayName: 'Route', + + statics: { + createRouteFromReactElement: _RouteUtils.createRouteFromReactElement + }, + + propTypes: { + path: string, + component: _PropTypes.component, + components: _PropTypes.components, + getComponent: func, + getComponents: func + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true ? false ? _invariant2['default'](false, ' elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined; + } + + }); + + exports['default'] = Route; + module.exports = exports['default']; + +/***/ }, +/* 36 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var object = _react2['default'].PropTypes.object; + + /** + * The RouteContext mixin provides a convenient way for route + * components to set the route in context. This is needed for + * routes that render elements that want to use the Lifecycle + * mixin to prevent transitions. + */ + var RouteContext = { + + propTypes: { + route: object.isRequired + }, + + childContextTypes: { + route: object.isRequired + }, + + getChildContext: function getChildContext() { + return { + route: this.props.route + }; + }, + + componentWillMount: function componentWillMount() { + false ? _routerWarning2['default'](false, 'The `RouteContext` mixin is deprecated. You can provide `this.props.route` on context with your own `contextTypes`. http://tiny.cc/router-routecontextmixin') : undefined; + } + + }; + + exports['default'] = RouteContext; + module.exports = exports['default']; + +/***/ }, +/* 37 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + var _historyLibCreateHashHistory = __webpack_require__(27); + + var _historyLibCreateHashHistory2 = _interopRequireDefault(_historyLibCreateHashHistory); + + var _historyLibUseQueries = __webpack_require__(11); + + var _historyLibUseQueries2 = _interopRequireDefault(_historyLibUseQueries); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _createTransitionManager = __webpack_require__(14); + + var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); + + var _PropTypes = __webpack_require__(6); + + var _RouterContext = __webpack_require__(13); + + var _RouterContext2 = _interopRequireDefault(_RouterContext); + + var _RouteUtils = __webpack_require__(5); + + var _RouterUtils = __webpack_require__(20); + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + function isDeprecatedHistory(history) { + return !history || !history.__v2_compatible__; + } + + var _React$PropTypes = _react2['default'].PropTypes; + var func = _React$PropTypes.func; + var object = _React$PropTypes.object; + + /** + * A is a high-level API for automatically setting up + * a router that renders a with all the props + * it needs each time the URL changes. + */ + var Router = _react2['default'].createClass({ + displayName: 'Router', + + propTypes: { + history: object, + children: _PropTypes.routes, + routes: _PropTypes.routes, // alias for children + render: func, + createElement: func, + onError: func, + onUpdate: func, + + // PRIVATE: For client-side rehydration of server match. + matchContext: object + }, + + getDefaultProps: function getDefaultProps() { + return { + render: function render(props) { + return _react2['default'].createElement(_RouterContext2['default'], props); + } + }; + }, + + getInitialState: function getInitialState() { + return { + location: null, + routes: null, + params: null, + components: null + }; + }, + + handleError: function handleError(error) { + if (this.props.onError) { + this.props.onError.call(this, error); + } else { + // Throw errors by default so we don't silently swallow them! + throw error; // This error probably occurred in getChildRoutes or getComponents. + } + }, + + componentWillMount: function componentWillMount() { + var _this = this; + + var _props = this.props; + var parseQueryString = _props.parseQueryString; + var stringifyQuery = _props.stringifyQuery; + + false ? _routerWarning2['default'](!(parseQueryString || stringifyQuery), '`parseQueryString` and `stringifyQuery` are deprecated. Please create a custom history. http://tiny.cc/router-customquerystring') : undefined; + + var _createRouterObjects = this.createRouterObjects(); + + var history = _createRouterObjects.history; + var transitionManager = _createRouterObjects.transitionManager; + var router = _createRouterObjects.router; + + this._unlisten = transitionManager.listen(function (error, state) { + if (error) { + _this.handleError(error); + } else { + _this.setState(state, _this.props.onUpdate); + } + }); + + this.history = history; + this.router = router; + }, + + createRouterObjects: function createRouterObjects() { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext; + } + + var history = this.props.history; + var _props2 = this.props; + var routes = _props2.routes; + var children = _props2.children; + + if (isDeprecatedHistory(history)) { + history = this.wrapDeprecatedHistory(history); + } + + var transitionManager = _createTransitionManager2['default'](history, _RouteUtils.createRoutes(routes || children)); + var router = _RouterUtils.createRouterObject(history, transitionManager); + var routingHistory = _RouterUtils.createRoutingHistory(history, transitionManager); + + return { history: routingHistory, transitionManager: transitionManager, router: router }; + }, + + wrapDeprecatedHistory: function wrapDeprecatedHistory(history) { + var _props3 = this.props; + var parseQueryString = _props3.parseQueryString; + var stringifyQuery = _props3.stringifyQuery; + + var createHistory = undefined; + if (history) { + false ? _routerWarning2['default'](false, 'It appears you have provided a deprecated history object to ``, please use a history provided by ' + 'React Router with `import { browserHistory } from \'react-router\'` or `import { hashHistory } from \'react-router\'`. ' + 'If you are using a custom history please create it with `useRouterHistory`, see http://tiny.cc/router-usinghistory for details.') : undefined; + createHistory = function () { + return history; + }; + } else { + false ? _routerWarning2['default'](false, '`Router` no longer defaults the history prop to hash history. Please use the `hashHistory` singleton instead. http://tiny.cc/router-defaulthistory') : undefined; + createHistory = _historyLibCreateHashHistory2['default']; + } + + return _historyLibUseQueries2['default'](createHistory)({ parseQueryString: parseQueryString, stringifyQuery: stringifyQuery }); + }, + + /* istanbul ignore next: sanity check */ + componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + false ? _routerWarning2['default'](nextProps.history === this.props.history, 'You cannot change ; it will be ignored') : undefined; + + false ? _routerWarning2['default']((nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), 'You cannot change ; it will be ignored') : undefined; + }, + + componentWillUnmount: function componentWillUnmount() { + if (this._unlisten) this._unlisten(); + }, + + render: function render() { + var _state = this.state; + var location = _state.location; + var routes = _state.routes; + var params = _state.params; + var components = _state.components; + var _props4 = this.props; + var createElement = _props4.createElement; + var render = _props4.render; + + var props = _objectWithoutProperties(_props4, ['createElement', 'render']); + + if (location == null) return null; // Async match + + // Only forward non-Router-specific props to routing context, as those are + // the only ones that might be custom routing context props. + Object.keys(Router.propTypes).forEach(function (propType) { + return delete props[propType]; + }); + + return render(_extends({}, props, { + history: this.history, + router: this.router, + location: location, + routes: routes, + params: params, + components: components, + createElement: createElement + })); + } + + }); + + exports['default'] = Router; + module.exports = exports['default']; + +/***/ }, +/* 38 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _RouterContext = __webpack_require__(13); + + var _RouterContext2 = _interopRequireDefault(_RouterContext); + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + var RoutingContext = _react2['default'].createClass({ + displayName: 'RoutingContext', + + componentWillMount: function componentWillMount() { + false ? _routerWarning2['default'](false, '`RoutingContext` has been renamed to `RouterContext`. Please use `import { RouterContext } from \'react-router\'`. http://tiny.cc/router-routercontext') : undefined; + }, + + render: function render() { + return _react2['default'].createElement(_RouterContext2['default'], this.props); + } + }); + + exports['default'] = RoutingContext; + module.exports = exports['default']; + +/***/ }, +/* 39 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports.runEnterHooks = runEnterHooks; + exports.runLeaveHooks = runLeaveHooks; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _AsyncUtils = __webpack_require__(12); + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + function createEnterHook(hook, route) { + return function (a, b, callback) { + hook.apply(route, arguments); + + if (hook.length < 3) { + // Assume hook executes synchronously and + // automatically call the callback. + callback(); + } + }; + } + + function getEnterHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onEnter) hooks.push(createEnterHook(route.onEnter, route)); + + return hooks; + }, []); + } + + /** + * Runs all onEnter hooks in the given array of routes in order + * with onEnter(nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + + function runEnterHooks(routes, nextState, callback) { + var hooks = getEnterHooks(routes); + + if (!hooks.length) { + callback(); + return; + } + + var redirectInfo = undefined; + function replace(location, deprecatedPathname, deprecatedQuery) { + if (deprecatedPathname) { + false ? _routerWarning2['default'](false, '`replaceState(state, pathname, query) is deprecated; use `replace(location)` with a location descriptor instead. http://tiny.cc/router-isActivedeprecated') : undefined; + redirectInfo = { + pathname: deprecatedPathname, + query: deprecatedQuery, + state: location + }; + + return; + } + + redirectInfo = location; + } + + _AsyncUtils.loopAsync(hooks.length, function (index, next, done) { + hooks[index](nextState, replace, function (error) { + if (error || redirectInfo) { + done(error, redirectInfo); // No need to continue. + } else { + next(); + } + }); + }, callback); + } + + /** + * Runs all onLeave hooks in the given array of routes in order. + */ + + function runLeaveHooks(routes) { + for (var i = 0, len = routes.length; i < len; ++i) { + if (routes[i].onLeave) routes[i].onLeave.call(routes[i]); + } + } + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _historyLibCreateBrowserHistory = __webpack_require__(53); + + var _historyLibCreateBrowserHistory2 = _interopRequireDefault(_historyLibCreateBrowserHistory); + + var _createRouterHistory = __webpack_require__(22); + + var _createRouterHistory2 = _interopRequireDefault(_createRouterHistory); + + exports['default'] = _createRouterHistory2['default'](_historyLibCreateBrowserHistory2['default']); + module.exports = exports['default']; + +/***/ }, +/* 41 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _PatternUtils = __webpack_require__(8); + + function routeParamsChanged(route, prevState, nextState) { + if (!route.path) return false; + + var paramNames = _PatternUtils.getParamNames(route.path); + + return paramNames.some(function (paramName) { + return prevState.params[paramName] !== nextState.params[paramName]; + }); + } + + /** + * Returns an object of { leaveRoutes, enterRoutes } determined by + * the change from prevState to nextState. We leave routes if either + * 1) they are not in the next state or 2) they are in the next state + * but their params have changed (i.e. /users/123 => /users/456). + * + * leaveRoutes are ordered starting at the leaf route of the tree + * we're leaving up to the common parent route. enterRoutes are ordered + * from the top of the tree we're entering down to the leaf route. + */ + function computeChangedRoutes(prevState, nextState) { + var prevRoutes = prevState && prevState.routes; + var nextRoutes = nextState.routes; + + var leaveRoutes = undefined, + enterRoutes = undefined; + if (prevRoutes) { + (function () { + var parentIsLeaving = false; + leaveRoutes = prevRoutes.filter(function (route) { + if (parentIsLeaving) { + return true; + } else { + var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); + if (isLeaving) parentIsLeaving = true; + return isLeaving; + } + }); + + // onLeave hooks start at the leaf route. + leaveRoutes.reverse(); + + enterRoutes = nextRoutes.filter(function (route) { + return prevRoutes.indexOf(route) === -1 || leaveRoutes.indexOf(route) !== -1; + }); + })(); + } else { + leaveRoutes = []; + enterRoutes = nextRoutes; + } + + return { + leaveRoutes: leaveRoutes, + enterRoutes: enterRoutes + }; + } + + exports['default'] = computeChangedRoutes; + module.exports = exports['default']; + +/***/ }, +/* 42 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _AsyncUtils = __webpack_require__(12); + + function getComponentsForRoute(location, route, callback) { + if (route.component || route.components) { + callback(null, route.component || route.components); + } else if (route.getComponent) { + route.getComponent(location, callback); + } else if (route.getComponents) { + route.getComponents(location, callback); + } else { + callback(); + } + } + + /** + * Asynchronously fetches all components needed for the given router + * state and calls callback(error, components) when finished. + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getComponents method. + */ + function getComponents(nextState, callback) { + _AsyncUtils.mapAsync(nextState.routes, function (route, index, callback) { + getComponentsForRoute(nextState.location, route, callback); + }, callback); + } + + exports['default'] = getComponents; + module.exports = exports['default']; + +/***/ }, +/* 43 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _PatternUtils = __webpack_require__(8); + + /** + * Extracts an object of params the given route cares about from + * the given params object. + */ + function getRouteParams(route, params) { + var routeParams = {}; + + if (!route.path) return routeParams; + + var paramNames = _PatternUtils.getParamNames(route.path); + + for (var p in params) { + if (params.hasOwnProperty(p) && paramNames.indexOf(p) !== -1) routeParams[p] = params[p]; + }return routeParams; + } + + exports['default'] = getRouteParams; + module.exports = exports['default']; + +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _historyLibCreateHashHistory = __webpack_require__(27); + + var _historyLibCreateHashHistory2 = _interopRequireDefault(_historyLibCreateHashHistory); + + var _createRouterHistory = __webpack_require__(22); + + var _createRouterHistory2 = _interopRequireDefault(_createRouterHistory); + + exports['default'] = _createRouterHistory2['default'](_historyLibCreateHashHistory2['default']); + module.exports = exports['default']; + +/***/ }, +/* 45 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = isActive; + + var _PatternUtils = __webpack_require__(8); + + function deepEqual(a, b) { + if (a == b) return true; + + if (a == null || b == null) return false; + + if (Array.isArray(a)) { + return Array.isArray(b) && a.length === b.length && a.every(function (item, index) { + return deepEqual(item, b[index]); + }); + } + + if (typeof a === 'object') { + for (var p in a) { + if (!a.hasOwnProperty(p)) { + continue; + } + + if (a[p] === undefined) { + if (b[p] !== undefined) { + return false; + } + } else if (!b.hasOwnProperty(p)) { + return false; + } else if (!deepEqual(a[p], b[p])) { + return false; + } + } + + return true; + } + + return String(a) === String(b); + } + + function paramsAreActive(paramNames, paramValues, activeParams) { + // FIXME: This doesn't work on repeated params in activeParams. + return paramNames.every(function (paramName, index) { + return String(paramValues[index]) === String(activeParams[paramName]); + }); + } + + function getMatchingRouteIndex(pathname, activeRoutes, activeParams) { + var remainingPathname = pathname, + paramNames = [], + paramValues = []; + + for (var i = 0, len = activeRoutes.length; i < len; ++i) { + var route = activeRoutes[i]; + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = pathname; + paramNames = []; + paramValues = []; + } + + if (remainingPathname !== null) { + var matched = _PatternUtils.matchPattern(pattern, remainingPathname); + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } + + if (remainingPathname === '' && route.path && paramsAreActive(paramNames, paramValues, activeParams)) return i; + } + + return null; + } + + /** + * Returns true if the given pathname matches the active routes + * and params. + */ + function routeIsActive(pathname, routes, params, indexOnly) { + var i = getMatchingRouteIndex(pathname, routes, params); + + if (i === null) { + // No match. + return false; + } else if (!indexOnly) { + // Any match is good enough. + return true; + } + + // If any remaining routes past the match index have paths, then we can't + // be on the index route. + return routes.slice(i + 1).every(function (route) { + return !route.path; + }); + } + + /** + * Returns true if all key/value pairs in the given query are + * currently active. + */ + function queryIsActive(query, activeQuery) { + if (activeQuery == null) return query == null; + + if (query == null) return true; + + return deepEqual(query, activeQuery); + } + + /** + * Returns true if a to the given pathname/query combination is + * currently active. + */ + + function isActive(_ref, indexOnly, currentLocation, routes, params) { + var pathname = _ref.pathname; + var query = _ref.query; + + if (currentLocation == null) return false; + + if (!routeIsActive(pathname, routes, params, indexOnly)) return false; + + return queryIsActive(query, currentLocation.query); + } + + module.exports = exports['default']; + +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + var _invariant = __webpack_require__(3); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _createMemoryHistory = __webpack_require__(21); + + var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory); + + var _createTransitionManager = __webpack_require__(14); + + var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); + + var _RouteUtils = __webpack_require__(5); + + var _RouterUtils = __webpack_require__(20); + + /** + * A high-level API to be used for server-side rendering. + * + * This function matches a location to a set of routes and calls + * callback(error, redirectLocation, renderProps) when finished. + * + * Note: You probably don't want to use this in a browser unless you're using + * server-side rendering with async routes. + */ + function match(_ref, callback) { + var history = _ref.history; + var routes = _ref.routes; + var location = _ref.location; + + var options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']); + + !(history || location) ? false ? _invariant2['default'](false, 'match needs a history or a location') : _invariant2['default'](false) : undefined; + + history = history ? history : _createMemoryHistory2['default'](options); + var transitionManager = _createTransitionManager2['default'](history, _RouteUtils.createRoutes(routes)); + + var unlisten = undefined; + + if (location) { + // Allow match({ location: '/the/path', ... }) + location = history.createLocation(location); + } else { + // Pick up the location from the history via synchronous history.listen + // call if needed. + unlisten = history.listen(function (historyLocation) { + location = historyLocation; + }); + } + + var router = _RouterUtils.createRouterObject(history, transitionManager); + history = _RouterUtils.createRoutingHistory(history, transitionManager); + + transitionManager.match(location, function (error, redirectLocation, nextState) { + callback(error, redirectLocation, nextState && _extends({}, nextState, { + history: history, + router: router, + matchContext: { history: history, transitionManager: transitionManager, router: router } + })); + + // Defer removing the listener to here to prevent DOM histories from having + // to unwind DOM event listeners unnecessarily, in case callback renders a + // and attaches another history listener. + if (unlisten) { + unlisten(); + } + }); + } + + exports['default'] = match; + module.exports = exports['default']; + +/***/ }, +/* 47 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + var _AsyncUtils = __webpack_require__(12); + + var _PatternUtils = __webpack_require__(8); + + var _RouteUtils = __webpack_require__(5); + + function getChildRoutes(route, location, callback) { + if (route.childRoutes) { + return [null, route.childRoutes]; + } + if (!route.getChildRoutes) { + return []; + } + + var sync = true, + result = undefined; + + route.getChildRoutes(location, function (error, childRoutes) { + childRoutes = !error && _RouteUtils.createRoutes(childRoutes); + if (sync) { + result = [error, childRoutes]; + return; + } + + callback(error, childRoutes); + }); + + sync = false; + return result; // Might be undefined. + } + + function getIndexRoute(route, location, callback) { + if (route.indexRoute) { + callback(null, route.indexRoute); + } else if (route.getIndexRoute) { + route.getIndexRoute(location, function (error, indexRoute) { + callback(error, !error && _RouteUtils.createRoutes(indexRoute)[0]); + }); + } else if (route.childRoutes) { + (function () { + var pathless = route.childRoutes.filter(function (obj) { + return !obj.hasOwnProperty('path'); + }); + + _AsyncUtils.loopAsync(pathless.length, function (index, next, done) { + getIndexRoute(pathless[index], location, function (error, indexRoute) { + if (error || indexRoute) { + var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]); + done(error, routes); + } else { + next(); + } + }); + }, function (err, routes) { + callback(null, routes); + }); + })(); + } else { + callback(); + } + } + + function assignParams(params, paramNames, paramValues) { + return paramNames.reduce(function (params, paramName, index) { + var paramValue = paramValues && paramValues[index]; + + if (Array.isArray(params[paramName])) { + params[paramName].push(paramValue); + } else if (paramName in params) { + params[paramName] = [params[paramName], paramValue]; + } else { + params[paramName] = paramValue; + } + + return params; + }, params); + } + + function createParams(paramNames, paramValues) { + return assignParams({}, paramNames, paramValues); + } + + function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) { + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = location.pathname; + paramNames = []; + paramValues = []; + } + + if (remainingPathname !== null) { + var matched = _PatternUtils.matchPattern(pattern, remainingPathname); + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + + if (remainingPathname === '' && route.path) { + var _ret2 = (function () { + var match = { + routes: [route], + params: createParams(paramNames, paramValues) + }; + + getIndexRoute(route, location, function (error, indexRoute) { + if (error) { + callback(error); + } else { + if (Array.isArray(indexRoute)) { + var _match$routes; + + false ? _routerWarning2['default'](indexRoute.every(function (route) { + return !route.path; + }), 'Index routes should not have paths') : undefined; + (_match$routes = match.routes).push.apply(_match$routes, indexRoute); + } else if (indexRoute) { + false ? _routerWarning2['default'](!indexRoute.path, 'Index routes should not have paths') : undefined; + match.routes.push(indexRoute); + } + + callback(null, match); + } + }); + return { + v: undefined + }; + })(); + + if (typeof _ret2 === 'object') return _ret2.v; + } + } + + if (remainingPathname != null || route.childRoutes) { + // Either a) this route matched at least some of the path or b) + // we don't have to load this route's children asynchronously. In + // either case continue checking for matches in the subtree. + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + } else if (childRoutes) { + // Check the child routes to see if any of them match. + matchRoutes(childRoutes, location, function (error, match) { + if (error) { + callback(error); + } else if (match) { + // A child route matched! Augment the match and pass it up the stack. + match.routes.unshift(route); + callback(null, match); + } else { + callback(); + } + }, remainingPathname, paramNames, paramValues); + } else { + callback(); + } + }; + + var result = getChildRoutes(route, location, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + /** + * Asynchronously matches the given location to a set of routes and calls + * callback(error, state) when finished. The state object will have the + * following properties: + * + * - routes An array of routes that matched, in hierarchical order + * - params An object of URL parameters + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getChildRoutes method. + */ + function matchRoutes(routes, location, callback) { + var remainingPathname = arguments.length <= 3 || arguments[3] === undefined ? location.pathname : arguments[3]; + var paramNames = arguments.length <= 4 || arguments[4] === undefined ? [] : arguments[4]; + var paramValues = arguments.length <= 5 || arguments[5] === undefined ? [] : arguments[5]; + return (function () { + _AsyncUtils.loopAsync(routes.length, function (index, next, done) { + matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) { + if (error || match) { + done(error, match); + } else { + next(); + } + }); + }, callback); + })(); + } + + exports['default'] = matchRoutes; + module.exports = exports['default']; + +/***/ }, +/* 48 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + var _historyLibUseQueries = __webpack_require__(11); + + var _historyLibUseQueries2 = _interopRequireDefault(_historyLibUseQueries); + + var _createTransitionManager = __webpack_require__(14); + + var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); + + var _routerWarning = __webpack_require__(1); + + var _routerWarning2 = _interopRequireDefault(_routerWarning); + + /** + * Returns a new createHistory function that may be used to create + * history objects that know about routing. + * + * Enhances history objects with the following methods: + * + * - listen((error, nextState) => {}) + * - listenBeforeLeavingRoute(route, (nextLocation) => {}) + * - match(location, (error, redirectLocation, nextState) => {}) + * - isActive(pathname, query, indexOnly=false) + */ + function useRoutes(createHistory) { + false ? _routerWarning2['default'](false, '`useRoutes` is deprecated. Please use `createTransitionManager` instead.') : undefined; + + return function () { + var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + var routes = _ref.routes; + + var options = _objectWithoutProperties(_ref, ['routes']); + + var history = _historyLibUseQueries2['default'](createHistory)(options); + var transitionManager = _createTransitionManager2['default'](history, routes); + return _extends({}, history, transitionManager); + }; + } + + exports['default'] = useRoutes; + module.exports = exports['default']; + +/***/ }, +/* 49 */ +/***/ function(module, exports, __webpack_require__) { + + var pSlice = Array.prototype.slice; + var objectKeys = __webpack_require__(51); + var isArguments = __webpack_require__(50); + + var deepEqual = module.exports = function (actual, expected, opts) { + if (!opts) opts = {}; + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + + } else if (actual instanceof Date && expected instanceof Date) { + return actual.getTime() === expected.getTime(); + + // 7.3. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') { + return opts.strict ? actual === expected : actual == expected; + + // 7.4. For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else { + return objEquiv(actual, expected, opts); + } + } + + function isUndefinedOrNull(value) { + return value === null || value === undefined; + } + + function isBuffer (x) { + if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false; + if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { + return false; + } + if (x.length > 0 && typeof x[0] !== 'number') return false; + return true; + } + + function objEquiv(a, b, opts) { + var i, key; + if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) + return false; + // an identical 'prototype' property. + if (a.prototype !== b.prototype) return false; + //~~~I've managed to break Object.keys through screwy arguments passing. + // Converting to array solves the problem. + if (isArguments(a)) { + if (!isArguments(b)) { + return false; + } + a = pSlice.call(a); + b = pSlice.call(b); + return deepEqual(a, b, opts); + } + if (isBuffer(a)) { + if (!isBuffer(b)) { + return false; + } + if (a.length !== b.length) return false; + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) return false; + } + return true; + } + try { + var ka = objectKeys(a), + kb = objectKeys(b); + } catch (e) {//happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length != kb.length) + return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) + return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!deepEqual(a[key], b[key], opts)) return false; + } + return typeof a === typeof b; + } + + +/***/ }, +/* 50 */ +/***/ function(module, exports) { + + var supportsArgumentsClass = (function(){ + return Object.prototype.toString.call(arguments) + })() == '[object Arguments]'; + + exports = module.exports = supportsArgumentsClass ? supported : unsupported; + + exports.supported = supported; + function supported(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; + }; + + exports.unsupported = unsupported; + function unsupported(object){ + return object && + typeof object == 'object' && + typeof object.length == 'number' && + Object.prototype.hasOwnProperty.call(object, 'callee') && + !Object.prototype.propertyIsEnumerable.call(object, 'callee') || + false; + }; + + +/***/ }, +/* 51 */ +/***/ function(module, exports) { + + exports = module.exports = typeof Object.keys === 'function' + ? Object.keys : shim; + + exports.shim = shim; + function shim (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; + } + + +/***/ }, +/* 52 */ +/***/ function(module, exports) { + + "use strict"; + + exports.__esModule = true; + exports.loopAsync = loopAsync; + + function loopAsync(turns, work, callback) { + var currentTurn = 0; + var isDone = false; + + function done() { + isDone = true; + callback.apply(this, arguments); + } + + function next() { + if (isDone) return; + + if (currentTurn < turns) { + work.call(this, currentTurn++, next, done); + } else { + done.apply(this, arguments); + } + } + + next(); + } + +/***/ }, +/* 53 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _invariant = __webpack_require__(3); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _Actions = __webpack_require__(9); + + var _PathUtils = __webpack_require__(7); + + var _ExecutionEnvironment = __webpack_require__(10); + + var _DOMUtils = __webpack_require__(15); + + var _DOMStateStorage = __webpack_require__(25); + + var _createDOMHistory = __webpack_require__(26); + + var _createDOMHistory2 = _interopRequireDefault(_createDOMHistory); + + /** + * Creates and returns a history object that uses HTML5's history API + * (pushState, replaceState, and the popstate event) to manage history. + * This is the recommended method of managing history in browsers because + * it provides the cleanest URLs. + * + * Note: In browsers that do not support the HTML5 history API full + * page reloads will be used to preserve URLs. + */ + function createBrowserHistory() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined; + + var forceRefresh = options.forceRefresh; + + var isSupported = _DOMUtils.supportsHistory(); + var useRefresh = !isSupported || forceRefresh; + + function getCurrentLocation(historyState) { + historyState = historyState || window.history.state || {}; + + var path = _DOMUtils.getWindowPath(); + var _historyState = historyState; + var key = _historyState.key; + + var state = undefined; + if (key) { + state = _DOMStateStorage.readState(key); + } else { + state = null; + key = history.createKey(); + + if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path); + } + + var location = _PathUtils.parsePath(path); + + return history.createLocation(_extends({}, location, { state: state }), undefined, key); + } + + function startPopStateListener(_ref) { + var transitionTo = _ref.transitionTo; + + function popStateListener(event) { + if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit. + + transitionTo(getCurrentLocation(event.state)); + } + + _DOMUtils.addEventListener(window, 'popstate', popStateListener); + + return function () { + _DOMUtils.removeEventListener(window, 'popstate', popStateListener); + }; + } + + function finishTransition(location) { + var basename = location.basename; + var pathname = location.pathname; + var search = location.search; + var hash = location.hash; + var state = location.state; + var action = location.action; + var key = location.key; + + if (action === _Actions.POP) return; // Nothing to do. + + _DOMStateStorage.saveState(key, state); + + var path = (basename || '') + pathname + search + hash; + var historyState = { + key: key + }; + + if (action === _Actions.PUSH) { + if (useRefresh) { + window.location.href = path; + return false; // Prevent location update. + } else { + window.history.pushState(historyState, null, path); + } + } else { + // REPLACE + if (useRefresh) { + window.location.replace(path); + return false; // Prevent location update. + } else { + window.history.replaceState(historyState, null, path); + } + } + } + + var history = _createDOMHistory2['default'](_extends({}, options, { + getCurrentLocation: getCurrentLocation, + finishTransition: finishTransition, + saveState: _DOMStateStorage.saveState + })); + + var listenerCount = 0, + stopPopStateListener = undefined; + + function listenBefore(listener) { + if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history); + + var unlisten = history.listenBefore(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopPopStateListener(); + }; + } + + function listen(listener) { + if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history); + + var unlisten = history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopPopStateListener(); + }; + } + + // deprecated + function registerTransitionHook(hook) { + if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history); + + history.registerTransitionHook(hook); + } + + // deprecated + function unregisterTransitionHook(hook) { + history.unregisterTransitionHook(hook); + + if (--listenerCount === 0) stopPopStateListener(); + } + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + registerTransitionHook: registerTransitionHook, + unregisterTransitionHook: unregisterTransitionHook + }); + } + + exports['default'] = createBrowserHistory; + module.exports = exports['default']; + +/***/ }, +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _warning = __webpack_require__(4); + + var _warning2 = _interopRequireDefault(_warning); + + var _Actions = __webpack_require__(9); + + var _PathUtils = __webpack_require__(7); + + function createLocation() { + var location = arguments.length <= 0 || arguments[0] === undefined ? '/' : arguments[0]; + var action = arguments.length <= 1 || arguments[1] === undefined ? _Actions.POP : arguments[1]; + var key = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2]; + + var _fourthArg = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3]; + + if (typeof location === 'string') location = _PathUtils.parsePath(location); + + if (typeof action === 'object') { + false ? _warning2['default'](false, 'The state (2nd) argument to createLocation is deprecated; use a ' + 'location descriptor instead') : undefined; + + location = _extends({}, location, { state: action }); + + action = key || _Actions.POP; + key = _fourthArg; + } + + var pathname = location.pathname || '/'; + var search = location.search || ''; + var hash = location.hash || ''; + var state = location.state || null; + + return { + pathname: pathname, + search: search, + hash: hash, + state: state, + action: action, + key: key + }; + } + + exports['default'] = createLocation; + module.exports = exports['default']; + +/***/ }, +/* 55 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _warning = __webpack_require__(4); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(3); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _PathUtils = __webpack_require__(7); + + var _Actions = __webpack_require__(9); + + var _createHistory = __webpack_require__(28); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function createStateStorage(entries) { + return entries.filter(function (entry) { + return entry.state; + }).reduce(function (memo, entry) { + memo[entry.key] = entry.state; + return memo; + }, {}); + } + + function createMemoryHistory() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + if (Array.isArray(options)) { + options = { entries: options }; + } else if (typeof options === 'string') { + options = { entries: [options] }; + } + + var history = _createHistory2['default'](_extends({}, options, { + getCurrentLocation: getCurrentLocation, + finishTransition: finishTransition, + saveState: saveState, + go: go + })); + + var _options = options; + var entries = _options.entries; + var current = _options.current; + + if (typeof entries === 'string') { + entries = [entries]; + } else if (!Array.isArray(entries)) { + entries = ['/']; + } + + entries = entries.map(function (entry) { + var key = history.createKey(); + + if (typeof entry === 'string') return { pathname: entry, key: key }; + + if (typeof entry === 'object' && entry) return _extends({}, entry, { key: key }); + + true ? false ? _invariant2['default'](false, 'Unable to create history entry from %s', entry) : _invariant2['default'](false) : undefined; + }); + + if (current == null) { + current = entries.length - 1; + } else { + !(current >= 0 && current < entries.length) ? false ? _invariant2['default'](false, 'Current index must be >= 0 and < %s, was %s', entries.length, current) : _invariant2['default'](false) : undefined; + } + + var storage = createStateStorage(entries); + + function saveState(key, state) { + storage[key] = state; + } + + function readState(key) { + return storage[key]; + } + + function getCurrentLocation() { + var entry = entries[current]; + var key = entry.key; + var basename = entry.basename; + var pathname = entry.pathname; + var search = entry.search; + + var path = (basename || '') + pathname + (search || ''); + + var state = undefined; + if (key) { + state = readState(key); + } else { + state = null; + key = history.createKey(); + entry.key = key; + } + + var location = _PathUtils.parsePath(path); + + return history.createLocation(_extends({}, location, { state: state }), undefined, key); + } + + function canGo(n) { + var index = current + n; + return index >= 0 && index < entries.length; + } + + function go(n) { + if (n) { + if (!canGo(n)) { + false ? _warning2['default'](false, 'Cannot go(%s) there is not enough history', n) : undefined; + return; + } + + current += n; + + var currentLocation = getCurrentLocation(); + + // change action to POP + history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP })); + } + } + + function finishTransition(location) { + switch (location.action) { + case _Actions.PUSH: + current += 1; + + // if we are not on the top of stack + // remove rest and push new + if (current < entries.length) entries.splice(current); + + entries.push(location); + saveState(location.key, location.state); + break; + case _Actions.REPLACE: + entries[current] = location; + saveState(location.key, location.state); + break; + } + } + + return history; + } + + exports['default'] = createMemoryHistory; + module.exports = exports['default']; + +/***/ }, +/* 56 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var strictUriEncode = __webpack_require__(57); + + exports.extract = function (str) { + return str.split('?')[1] || ''; + }; + + exports.parse = function (str) { + if (typeof str !== 'string') { + return {}; + } + + str = str.trim().replace(/^(\?|#|&)/, ''); + + if (!str) { + return {}; + } + + return str.split('&').reduce(function (ret, param) { + var parts = param.replace(/\+/g, ' ').split('='); + // Firefox (pre 40) decodes `%3D` to `=` + // https://github.com/sindresorhus/query-string/pull/37 + var key = parts.shift(); + var val = parts.length > 0 ? parts.join('=') : undefined; + + key = decodeURIComponent(key); + + // missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + val = val === undefined ? null : decodeURIComponent(val); + + if (!ret.hasOwnProperty(key)) { + ret[key] = val; + } else if (Array.isArray(ret[key])) { + ret[key].push(val); + } else { + ret[key] = [ret[key], val]; + } + + return ret; + }, {}); + }; + + exports.stringify = function (obj) { + return obj ? Object.keys(obj).sort().map(function (key) { + var val = obj[key]; + + if (val === undefined) { + return ''; + } + + if (val === null) { + return key; + } + + if (Array.isArray(val)) { + return val.sort().map(function (val2) { + return strictUriEncode(key) + '=' + strictUriEncode(val2); + }).join('&'); + } + + return strictUriEncode(key) + '=' + strictUriEncode(val); + }).filter(function (x) { + return x.length > 0; + }).join('&') : ''; + }; + + +/***/ }, +/* 57 */ +/***/ function(module, exports) { + + 'use strict'; + module.exports = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); + }; + + +/***/ } +/******/ ]) +}); +; \ No newline at end of file diff --git a/public/javascripts/wechat/ReactRouter.min.js b/public/javascripts/wechat/ReactRouter.min.js new file mode 100644 index 000000000..af370173e --- /dev/null +++ b/public/javascripts/wechat/ReactRouter.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactRouter=t(require("react")):e.ReactRouter=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(37),a=r(o);t.Router=a["default"];var u=n(18),i=r(u);t.Link=i["default"];var s=n(31),c=r(s);t.IndexLink=c["default"];var f=n(32),l=r(f);t.IndexRedirect=l["default"];var d=n(33),p=r(d);t.IndexRoute=p["default"];var h=n(19),v=r(h);t.Redirect=v["default"];var y=n(35),g=r(y);t.Route=g["default"];var m=n(30),_=r(m);t.History=_["default"];var P=n(34),O=r(P);t.Lifecycle=O["default"];var R=n(36),x=r(R);t.RouteContext=x["default"];var w=n(48),b=r(w);t.useRoutes=b["default"];var M=n(5);t.createRoutes=M.createRoutes;var E=n(13),j=r(E);t.RouterContext=j["default"];var S=n(38),A=r(S);t.RoutingContext=A["default"];var C=n(6),k=r(C);t.PropTypes=k["default"];var T=n(46),H=r(T);t.match=H["default"];var L=n(24),q=r(L);t.useRouterHistory=q["default"];var U=n(8);t.formatPattern=U.formatPattern;var N=n(40),B=r(N);t.browserHistory=B["default"];var I=n(44),D=r(I);t.hashHistory=D["default"];var F=n(21),W=r(F);t.createMemoryHistory=W["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){t="[react-router] "+t;for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o]}t.__esModule=!0,t["default"]=o;var a=n(4);r(a);e.exports=t["default"]},function(t,n){t.exports=e},function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,u,i){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,u,i],f=0;s=new Error(t.replace(/%s/g,function(){return c[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};e.exports=r},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return null==e||p["default"].isValidElement(e)}function a(e){return o(e)||Array.isArray(e)&&e.every(o)}function u(e,t,n){e=e||"UnknownComponent";for(var r in t)if(t.hasOwnProperty(r)){var o=t[r](n,r,e);o instanceof Error}}function i(e,t){return l({},e,t)}function s(e){var t=e.type,n=i(t.defaultProps,e.props);if(t.propTypes&&u(t.displayName||t.name,t.propTypes,n),n.children){var r=c(n.children,n);r.length&&(n.childRoutes=r),delete n.children}return n}function c(e,t){var n=[];return p["default"].Children.forEach(e,function(e){if(p["default"].isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(s(e))}),n}function f(e){return a(e)?e=c(e):e&&!Array.isArray(e)&&(e=[e]),e}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t should not have a "'+t+'" prop'):void 0}t.__esModule=!0,t.falsy=r;var o=n(2),a=o.PropTypes.func,u=o.PropTypes.object,i=o.PropTypes.arrayOf,s=o.PropTypes.oneOfType,c=o.PropTypes.element,f=o.PropTypes.shape,l=o.PropTypes.string,d=f({listen:a.isRequired,pushState:a.isRequired,replaceState:a.isRequired,go:a.isRequired});t.history=d;var p=f({pathname:l.isRequired,search:l.isRequired,state:u,action:l.isRequired,key:l});t.location=p;var h=s([a,l]);t.component=h;var v=s([h,u]);t.components=v;var y=s([u,c]);t.route=y;var g=s([y,i(y)]);t.routes=g,t["default"]={falsy:r,history:d,location:p,component:h,components:v,route:y}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.match(/^https?:\/\/[^\/]*/);return null==t?e:e.substring(t[0].length)}function a(e){var t=o(e),n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substring(a),t=t.substring(0,a));var u=t.indexOf("?");return-1!==u&&(n=t.substring(u),t=t.substring(0,u)),""===t&&(t="/"),{pathname:t,search:n,hash:r}}t.__esModule=!0,t.extractPath=o,t.parsePath=a;var u=n(4);r(u)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function a(e){return o(e).replace(/\/+/g,"/+")}function u(e){for(var t="",n=[],r=[],o=void 0,u=0,i=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g;o=i.exec(e);)o.index!==u&&(r.push(e.slice(u,o.index)),t+=a(e.slice(u,o.index))),o[1]?(t+="([^/?#]+)",n.push(o[1])):"**"===o[0]?(t+="([\\s\\S]*)",n.push("splat")):"*"===o[0]?(t+="([\\s\\S]*?)",n.push("splat")):"("===o[0]?t+="(?:":")"===o[0]&&(t+=")?"),r.push(o[0]),u=i.lastIndex;return u!==e.length&&(r.push(e.slice(u,e.length)),t+=a(e.slice(u,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}function i(e){return e in h||(h[e]=u(e)),h[e]}function s(e,t){"/"!==e.charAt(0)&&(e="/"+e),"/"!==t.charAt(0)&&(t="/"+t);var n=i(e),r=n.regexpSource,o=n.paramNames,a=n.tokens;r+="/*";var u="*"!==a[a.length-1];u&&(r+="([\\s\\S]*?)");var s=t.match(new RegExp("^"+r+"$","i")),c=void 0,f=void 0;if(null!=s){if(u){c=s.pop();var l=s[0].substr(0,s[0].length-c.length);if(c&&"/"!==l.charAt(l.length-1))return{remainingPathname:null,paramNames:o,paramValues:null}}else c="";f=s.slice(1).map(function(e){return null!=e?decodeURIComponent(e):e})}else c=f=null;return{remainingPathname:c,paramNames:o,paramValues:f}}function c(e){return i(e).paramNames}function f(e,t){var n=s(e,t),r=n.paramNames,o=n.paramValues;return null!=o?r.reduce(function(e,t,n){return e[t]=o[n],e},{}):null}function l(e,t){t=t||{};for(var n=i(e),r=n.tokens,o=0,a="",u=0,s=void 0,c=void 0,f=void 0,l=0,d=r.length;d>l;++l)s=r[l],"*"===s||"**"===s?(f=Array.isArray(t.splat)?t.splat[u++]:t.splat,null!=f||o>0?void 0:p["default"](!1),null!=f&&(a+=encodeURI(f))):"("===s?o+=1:")"===s?o-=1:":"===s.charAt(0)?(c=s.substring(1),f=t[c],null!=f||o>0?void 0:p["default"](!1),null!=f&&(a+=encodeURIComponent(f))):a+=s;return a.replace(/\/+/g,"/")}t.__esModule=!0,t.compilePattern=i,t.matchPattern=s,t.getParamNames=c,t.getParams=f,t.formatPattern=l;var d=n(3),p=r(d),h={}},function(e,t){"use strict";t.__esModule=!0;var n="PUSH";t.PUSH=n;var r="REPLACE";t.REPLACE=r;var o="POP";t.POP=o,t["default"]={PUSH:n,REPLACE:r,POP:o}},function(e,t){"use strict";t.__esModule=!0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.canUseDOM=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return c.stringify(e).replace(/%20/g,"+")}function u(e){return function(){function t(e){if(null==e.query){var t=e.search;e.query=R(t.substring(1)),e[v]={search:t,searchBase:""}}return e}function n(e,t){var n,r=e[v],o=t?O(t):"";if(!r&&!o)return e;"string"==typeof e&&(e=d.parsePath(e));var a=void 0;a=r&&e.search===r.search?r.searchBase:e.search||"";var u=a;return o&&(u+=(u?"&":"?")+o),i({},e,(n={search:u},n[v]={search:u,searchBase:a},n))}function r(e){return w.listenBefore(function(n,r){l["default"](e,t(n),r)})}function u(e){return w.listen(function(n){e(t(n))})}function s(e){w.push(n(e,e.query))}function c(e){w.replace(n(e,e.query))}function f(e,t){return w.createPath(n(e,t||e.query))}function p(e,t){return w.createHref(n(e,t||e.query))}function g(e){for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;r>a;a++)o[a-1]=arguments[a];var u=w.createLocation.apply(w,[n(e,e.query)].concat(o));return e.query&&(u.query=e.query),t(u)}function m(e,t,n){"string"==typeof t&&(t=d.parsePath(t)),s(i({state:e},t,{query:n}))}function _(e,t,n){"string"==typeof t&&(t=d.parsePath(t)),c(i({state:e},t,{query:n}))}var P=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],O=P.stringifyQuery,R=P.parseQueryString,x=o(P,["stringifyQuery","parseQueryString"]),w=e(x);return"function"!=typeof O&&(O=a),"function"!=typeof R&&(R=y),i({},w,{listenBefore:r,listen:u,push:s,replace:c,createPath:f,createHref:p,createLocation:g,pushState:h["default"](m,"pushState is deprecated; use push instead"),replaceState:h["default"](_,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;tu&&c;)c=!1,t.call(this,u++,a,r);return s=!1,i?void n.apply(this,f):void(u>=e&&c&&(i=!0,n()))}}var u=0,i=!1,s=!1,c=!1,f=void 0;a()}function r(e,t,n){function r(e,t,r){u||(t?(u=!0,n(t)):(a[e]=r,u=++i===o,u&&n(null,a)))}var o=e.length,a=[];if(0===o)return n(null,a);var u=!1,i=0;e.forEach(function(e,n){t(e,n,function(e,t){r(n,e,t)})})}t.__esModule=!0;var o=Array.prototype.slice;t.loopAsync=n,t.mapAsync=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;ti;++i)a=o[i](e);n(a)})}function y(){if(O.routes){for(var e=d(O.routes),t=void 0,n=0,r=e.length;"string"!=typeof t&&r>n;++n)t=e[n]();return t}}function m(e){var t=c(e,!1);t&&(delete w[t],o(w)||(b&&(b(),b=null),M&&(M(),M=null)))}function _(t,n){var r=c(t),a=w[r];if(a)-1===a.indexOf(n)&&a.push(n);else{var u=!o(w);w[r]=[n],u&&(b=e.listenBefore(h),e.listenBeforeUnload&&(M=e.listenBeforeUnload(y)))}return function(){var e=w[r];if(e){var o=e.filter(function(e){return e!==n});0===o.length?m(t):w[r]=o}}}function P(t){return e.listen(function(n){O.location===n?t(null,O):a(n,function(n,r,o){n?t(n):r?e.transitionTo(r):o&&t(null,o)})})}var O={},R=void 0,x=1,w={},b=void 0,M=void 0;return{isActive:n,match:a,listenBeforeLeavingRoute:_,listen:P}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return 0===e.button}function u(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function i(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function s(e,t){var n=t.query,r=t.hash,o=t.state;return n||r||o?{pathname:e,query:n,hash:r,state:o}:e}t.__esModule=!0;var c=Object.assign||function(e){for(var t=1;t=0;r--){var o=e[r],a=o.path||"";if(n=a.replace(/\/*$/,"/")+n,0===a.indexOf("/"))break}return"/"+n}},propTypes:{path:d,from:d,to:d.isRequired,query:p,state:p,onEnter:f.falsy,children:f.falsy},render:function(){i["default"](!1)}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return u({},e,{setRouteLeaveHook:t.listenBeforeLeavingRoute,isActive:t.isActive})}function a(e,t){return e=u({},e,t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t=0&&0===window.sessionStorage.length)return;throw n}}function u(e){var t=void 0;try{t=window.sessionStorage.getItem(o(e))}catch(n){if(n.name===f)return null}if(t)try{return JSON.parse(t)}catch(n){}return null}t.__esModule=!0,t.saveState=a,t.readState=u;var i=n(4),s=(r(i),"@@History/"),c=["QuotaExceededError","QUOTA_EXCEEDED_ERR"],f="SecurityError"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){function t(e){return s.canUseDOM?void 0:i["default"](!1),n.listen(e)}var n=l["default"](a({getUserConfirmation:c.getUserConfirmation},e,{go:c.go}));return a({},n,{listen:t})}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return function(){function t(e){return _&&null==e.basename&&(0===e.pathname.indexOf(_)?(e.pathname=e.pathname.substring(_.length),e.basename=_,""===e.pathname&&(e.pathname="/")):e.basename=""),e}function n(e){if(!_)return e;"string"==typeof e&&(e=s.parsePath(e));var t=e.pathname,n="/"===_.slice(-1)?_:_+"/",r="/"===t.charAt(0)?t.slice(1):t,o=n+r;return u({},e,{pathname:o})}function r(e){return O.listenBefore(function(n,r){f["default"](e,t(n),r)})}function a(e){return O.listen(function(n){e(t(n))})}function c(e){O.push(n(e))}function l(e){O.replace(n(e))}function p(e){return O.createPath(n(e))}function h(e){return O.createHref(n(e))}function v(e){for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;r>a;a++)o[a-1]=arguments[a];return t(O.createLocation.apply(O,[n(e)].concat(o)))}function y(e,t){"string"==typeof t&&(t=s.parsePath(t)),c(u({state:e},t))}function g(e,t){"string"==typeof t&&(t=s.parsePath(t)),l(u({state:e},t))}var m=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_=m.basename,P=o(m,["basename"]),O=e(P);if(null==_&&i.canUseDOM){var R=document.getElementsByTagName("base")[0];R&&(_=s.extractPath(R.href))}return u({},O,{listenBefore:r,listen:a,push:c,replace:l,createPath:p,createHref:h,createLocation:v,pushState:d["default"](y,"pushState is deprecated; use push instead"),replaceState:d["default"](g,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return!e||!e.__v2_compatible__}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;tt;++t)e[t].onLeave&&e[t].onLeave.call(e[t])}t.__esModule=!0,t.runEnterHooks=u,t.runLeaveHooks=i;var s=n(12),c=n(1);r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(53),a=r(o),u=n(22),i=r(u);t["default"]=i["default"](a["default"]),e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){if(!e.path)return!1;var r=a.getParamNames(e.path);return r.some(function(e){return t.params[e]!==n.params[e]})}function o(e,t){var n=e&&e.routes,o=t.routes,a=void 0,u=void 0;return n?!function(){var i=!1;a=n.filter(function(n){if(i)return!0;var a=-1===o.indexOf(n)||r(n,e,t);return a&&(i=!0),a}),a.reverse(),u=o.filter(function(e){return-1===n.indexOf(e)||-1!==a.indexOf(e)})}():(a=[],u=o),{leaveRoutes:a,enterRoutes:u}}t.__esModule=!0;var a=n(8);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){t.component||t.components?n(null,t.component||t.components):t.getComponent?t.getComponent(e,n):t.getComponents?t.getComponents(e,n):n()}function o(e,t){a.mapAsync(e.routes,function(t,n,o){r(e.location,t,o)},t)}t.__esModule=!0;var a=n(12);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n={};if(!e.path)return n;var r=o.getParamNames(e.path);for(var a in t)t.hasOwnProperty(a)&&-1!==r.indexOf(a)&&(n[a]=t[a]);return n}t.__esModule=!0;var o=n(8);t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(27),a=r(o),u=n(22),i=r(u);t["default"]=i["default"](a["default"]),e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){if(e==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});if("object"==typeof e){for(var n in e)if(e.hasOwnProperty(n))if(void 0===e[n]){if(void 0!==t[n])return!1}else{if(!t.hasOwnProperty(n))return!1;if(!r(e[n],t[n]))return!1}return!0}return String(e)===String(t)}function o(e,t,n){return e.every(function(e,r){return String(t[r])===String(n[e])})}function a(e,t,n){for(var r=e,a=[],u=[],i=0,s=t.length;s>i;++i){var f=t[i],l=f.path||"";if("/"===l.charAt(0)&&(r=e,a=[],u=[]),null!==r){var d=c.matchPattern(l,r);r=d.remainingPathname,a=[].concat(a,d.paramNames),u=[].concat(u,d.paramValues)}if(""===r&&f.path&&o(a,u,n))return i}return null}function u(e,t,n,r){var o=a(e,t,n);return null===o?!1:r?t.slice(o+1).every(function(e){return!e.path}):!0}function i(e,t){return null==t?null==e:null==e?!0:r(e,t)}function s(e,t,n,r,o){var a=e.pathname,s=e.query;return null==n?!1:u(a,r,o,t)?i(s,n.query):!1}t.__esModule=!0,t["default"]=s;var c=n(8);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){var n=e.history,r=e.routes,a=e.location,i=o(e,["history","routes","location"]);n||a?void 0:s["default"](!1),n=n?n:f["default"](i);var c=d["default"](n,p.createRoutes(r)),l=void 0;a?a=n.createLocation(a):l=n.listen(function(e){a=e});var v=h.createRouterObject(n,c);n=h.createRoutingHistory(n,c),c.match(a,function(e,r,o){t(e,r,o&&u({},o,{history:n,router:v,matchContext:{history:n,transitionManager:c,router:v}})),l&&l()})}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=t.routes,r=o(t,["routes"]),a=s["default"](e)(r),i=f["default"](a,n);return u({},a,i)}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t0&&"number"!=typeof e[0]?!1:!0:!1}function a(e,t,n){var a,f;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(s(e))return s(t)?(e=u.call(e),t=u.call(t),c(e,t,n)):!1;if(o(e)){if(!o(t))return!1;if(e.length!==t.length)return!1;for(a=0;a=0;a--)if(l[a]!=d[a])return!1;for(a=l.length-1;a>=0;a--)if(f=l[a],!c(e[f],t[f],n))return!1;return typeof e==typeof t}var u=Array.prototype.slice,i=n(51),s=n(50),c=e.exports=function(e,t,n){return n||(n={}),e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:a(e,t,n)}},function(e,t){function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var o="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();t=e.exports=o?n:r,t.supported=n,t.unsupported=r},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}t=e.exports="function"==typeof Object.keys?Object.keys:n,t.shim=n},function(e,t){"use strict";function n(e,t,n){function r(){u=!0,n.apply(this,arguments)}function o(){u||(e>a?t.call(this,a++,o,r):r.apply(this,arguments))}var a=0,u=!1;o()}t.__esModule=!0,t.loopAsync=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){function e(e){e=e||window.history.state||{};var t=l.getWindowPath(),n=e,r=n.key,o=void 0;r?o=d.readState(r):(o=null,r=_.createKey(),g&&window.history.replaceState(a({},e,{key:r}),null,t));var u=c.parsePath(t);return _.createLocation(a({},u,{state:o}),void 0,r)}function t(t){function n(t){void 0!==t.state&&r(e(t.state))}var r=t.transitionTo;return l.addEventListener(window,"popstate",n),function(){l.removeEventListener(window,"popstate",n)}}function n(e){var t=e.basename,n=e.pathname,r=e.search,o=e.hash,a=e.state,u=e.action,i=e.key;if(u!==s.POP){d.saveState(i,a);var c=(t||"")+n+r+o,f={key:i};if(u===s.PUSH){if(m)return window.location.href=c,!1;window.history.pushState(f,null,c)}else{if(m)return window.location.replace(c),!1;window.history.replaceState(f,null,c)}}}function r(e){1===++P&&(O=t(_));var n=_.listenBefore(e);return function(){n(),0===--P&&O()}}function o(e){1===++P&&(O=t(_));var n=_.listen(e);return function(){n(),0===--P&&O()}}function u(e){1===++P&&(O=t(_)),_.registerTransitionHook(e)}function p(e){_.unregisterTransitionHook(e),0===--P&&O()}var v=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];f.canUseDOM?void 0:i["default"](!1);var y=v.forceRefresh,g=l.supportsHistory(),m=!g||y,_=h["default"](a({},v,{getCurrentLocation:e,finishTransition:n,saveState:d.saveState})),P=0,O=void 0;return a({},_,{listenBefore:r,listen:o,registerTransitionHook:u,unregisterTransitionHook:p})}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=0&&t=0&&y Date: Mon, 21 Mar 2016 18:23:34 +0800 Subject: [PATCH 078/209] =?UTF-8?q?url=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/wechat.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/wechat/wechat.jsx b/public/javascripts/wechat/wechat.jsx index ce5d47d56..29a8da732 100644 --- a/public/javascripts/wechat/wechat.jsx +++ b/public/javascripts/wechat/wechat.jsx @@ -8,7 +8,7 @@ var Index = React.createClass({ } }); -var apiUrl = 'http://localhost:3000/api/v1/'; +var apiUrl = '/api/v1/'; var PostContainer = React.createClass({ loadDataFromServer: function(){ From aaa2a0dea7b7c60ac0434ea710ea383af7e05ffe Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 21 Mar 2016 18:26:35 +0800 Subject: [PATCH 079/209] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=A4=B4=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/app.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/app.html b/public/app.html index 708859714..5ebcdc286 100644 --- a/public/app.html +++ b/public/app.html @@ -2,6 +2,13 @@ react js + + + + + + + From 4f7d698076b9b51cd68b559ca6fc20d9e84db6d4 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 26 Mar 2016 14:45:57 +0800 Subject: [PATCH 080/209] wechat init --- config/menu.yml | 17 ++++--- public/assets/wechat/issue.html | 52 +++++++++++++++++++++ public/javascripts/wechat/wechat-dev.js | 54 ++++++++++++++++++++++ public/javascripts/wechat/wechat.jsx | 60 ++++++++++++++++--------- 4 files changed, 156 insertions(+), 27 deletions(-) create mode 100644 public/assets/wechat/issue.html create mode 100644 public/javascripts/wechat/wechat-dev.js diff --git a/config/menu.yml b/config/menu.yml index c88e94ec4..711b087d1 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -1,13 +1,20 @@ button: - - type: "click" + type: "view" name: "最新动态" - key: "MY_NEWS" + url: "http://wechat.trustie.net/assets/wechat/issue.html" - type: "click" name: "意见返馈" key: "FEEDBACK" - - type: "view" - name: "进入网站" - url: "http://www.trustie.net/" \ No newline at end of file + name: "更多" + sub_button: + - + type: "view" + name: "进入网站" + url: "http://www.trustie.net/" + - + type: "view" + name: "使用手册" + url: "https://www.trustie.net/organizations/1/downloads" \ No newline at end of file diff --git a/public/assets/wechat/issue.html b/public/assets/wechat/issue.html new file mode 100644 index 000000000..7b6eedde2 --- /dev/null +++ b/public/assets/wechat/issue.html @@ -0,0 +1,52 @@ + + + + react js + + + + + + + + + + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/public/javascripts/wechat/wechat-dev.js b/public/javascripts/wechat/wechat-dev.js new file mode 100644 index 000000000..9c5704b8c --- /dev/null +++ b/public/javascripts/wechat/wechat-dev.js @@ -0,0 +1,54 @@ +/** + * Created by root on 3/25/16. + */ +$(document).ready(function(){ + + var bt=baidu.template; + bt.LEFT_DELIMITER=''; + + + var apiUrl = '/api/v1/' + var setTemplate = function(data){ + console.log(data); + + + var html=bt('t:result-list',{issues: data}); + $('#container').prepend(html); + } + + var loadDataFromServer = function(id){ + $.ajax({ + url: apiUrl + 'issues/' + id, + dataType: 'json', + success: function(data){ + setTemplate(data.data); + }, + error: function(xhr,status,err){ + console.log(err); + } + }) + }; + + + loadDataFromServer(299); + + + var postWidth = $(".post-wrapper").width(); + var titleWidth = postWidth - 80; + $(".post-title").css("maxWidth",titleWidth); + + $(".post-all-content").each(function(){ + var postHeight = $(this).height(); + if (postHeight > 90){ + $(this).parent().next().css("display","block"); + $(this).parent().next().toggle(function(){ + $(this).text("点击隐藏"); + $(this).prev().css("height",postHeight); + },function(){ + $(this).text("点击展开"); + $(this).prev().css("height",90); + }); + } + }); +}); diff --git a/public/javascripts/wechat/wechat.jsx b/public/javascripts/wechat/wechat.jsx index 29a8da732..86d92318b 100644 --- a/public/javascripts/wechat/wechat.jsx +++ b/public/javascripts/wechat/wechat.jsx @@ -10,6 +10,8 @@ var Index = React.createClass({ var apiUrl = '/api/v1/'; +var converter = new Showdown.converter(); + var PostContainer = React.createClass({ loadDataFromServer: function(){ $.ajax({ @@ -31,36 +33,52 @@ var PostContainer = React.createClass({ }, render: function(){ return ( -
-
- -
-
- ) + + )issues } }); var PostView = React.createClass({ + testClick: function(){ + console.log("123123"); + }, + render: function(){ if(!this.props.data){ return
} - return ( -
-
-
{this.props.data.subject}
-
-
-
-

{this.props.data.description}

+ + var issueEach = this.props.data.map(function(issue){ + + var descMarkup = converter.makeHtml(issue.description.toString()); + + return ( +
+
+
+
+
{issue.subject}
+ +
+
+
+
+ 点击展开 +
+ {issue.created_on} +
+
+
- 点击展开 -
- {this.props.data.time} -
-
- ) + ) + }); + + return( +
{issueEach}
+ ); + + } }); @@ -77,5 +95,3 @@ var routes = ( React.render(routes, document.getElementById("container")); - - From 43de1a21b18d6c724c1a743a2f8512330eac96d0 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 26 Mar 2016 14:54:36 +0800 Subject: [PATCH 081/209] =?UTF-8?q?issues=20api=20=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/issues.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/mobile/apis/issues.rb b/app/api/mobile/apis/issues.rb index 212a505e7..23d8b955f 100644 --- a/app/api/mobile/apis/issues.rb +++ b/app/api/mobile/apis/issues.rb @@ -7,7 +7,7 @@ module Mobile desc "get special issuse" get ':id' do - issue = Issue.find(params[:id]) + issue = Issue.where("project_id = ?", params[:id]) present :data, issue, with: Mobile::Entities::Issue present :status, 0 end From 60931dde6ab2a87cf6c6b0a1a794635ce51b5749 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 26 Mar 2016 15:52:14 +0800 Subject: [PATCH 082/209] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96ope?= =?UTF-8?q?nid=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 12 ++++++++++ config/menu.yml | 2 +- config/routes.rb | 1 + public/assets/wechat/issue.html | 1 + public/javascripts/wechat/auth.js | 29 +++++++++++++++++++++++++ public/javascripts/wechat/wechat-dev.js | 25 +++++++++++---------- 6 files changed, 58 insertions(+), 12 deletions(-) create mode 100644 public/javascripts/wechat/auth.js diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 60a674446..c00a8a86e 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -171,6 +171,18 @@ class WechatsController < ActionController::Base end end + + def get_open_id + begin + raise "非法操作, code不存在" unless params[:code] + openid = get_openid(params[:code]) + raise "无法获取到openid" unless openid + render :text => {status:0, openid: openid}.to_json + rescue Exception=>e + render :text => {status: -1, msg: e.message}.to_json + end + end + def bind begin raise "非法操作, code不存在" unless params[:code] diff --git a/config/menu.yml b/config/menu.yml index 711b087d1..106bbfd07 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -2,7 +2,7 @@ button: - type: "view" name: "最新动态" - url: "http://wechat.trustie.net/assets/wechat/issue.html" + url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=http://wechat.trustie.net/assets/wechat/issue.html&response_type=code&scope=snsapi_base&state=123#wechat_redirect" - type: "click" name: "意见返馈" diff --git a/config/routes.rb b/config/routes.rb index 396be9c66..2313088cc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1165,6 +1165,7 @@ RedmineApp::Application.routes.draw do collection do get :login post :bind + get :get_open_id end end diff --git a/public/assets/wechat/issue.html b/public/assets/wechat/issue.html index 7b6eedde2..86c4e494a 100644 --- a/public/assets/wechat/issue.html +++ b/public/assets/wechat/issue.html @@ -47,6 +47,7 @@ + \ No newline at end of file diff --git a/public/javascripts/wechat/auth.js b/public/javascripts/wechat/auth.js new file mode 100644 index 000000000..aeaa03db1 --- /dev/null +++ b/public/javascripts/wechat/auth.js @@ -0,0 +1,29 @@ +$(function(){ + //获取url中的参数 + function getUrlParam(name) { + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 + var r = window.location.search.substr(1).match(reg); //匹配目标参数 + if (r != null) return unescape(r[2]); return null; //返回参数值 + } + + var g_openid = ""; + + window.getOpenId = function(cb){ + if (g_openid.length>0){ + cb(g_openid); + } + var code = getUrlParam("code"); + $.ajax({ + url: '/wechat/get_open_id?code='+code, + type: 'get', + dataType: 'json', + success: function(data){ + g_openid = data.openid; + cb(g_openid); + }, + error: function(xhr,err){ + alert("认证失败: "+err); + } + }); + } +}); \ No newline at end of file diff --git a/public/javascripts/wechat/wechat-dev.js b/public/javascripts/wechat/wechat-dev.js index 9c5704b8c..760140991 100644 --- a/public/javascripts/wechat/wechat-dev.js +++ b/public/javascripts/wechat/wechat-dev.js @@ -11,23 +11,26 @@ $(document).ready(function(){ var apiUrl = '/api/v1/' var setTemplate = function(data){ console.log(data); - - var html=bt('t:result-list',{issues: data}); $('#container').prepend(html); } var loadDataFromServer = function(id){ - $.ajax({ - url: apiUrl + 'issues/' + id, - dataType: 'json', - success: function(data){ - setTemplate(data.data); - }, - error: function(xhr,status,err){ - console.log(err); - } + getOpenId(function(openid){ + alert(openid); + $.ajax({ + url: apiUrl + 'issues/' + id + "?openid="+openid, + dataType: 'json', + success: function(data){ + setTemplate(data.data); + }, + error: function(xhr,status,err){ + console.log(err); + } + }); }) + + }; From d5124e128ee5a6eb68dae732ecd797a5cc3706b1 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 26 Mar 2016 15:56:36 +0800 Subject: [PATCH 083/209] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/issue.html | 3 --- public/javascripts/wechat/auth.js | 6 ++++++ public/javascripts/wechat/wechat-dev.js | 1 - 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/public/assets/wechat/issue.html b/public/assets/wechat/issue.html index 86c4e494a..f49dfdcfa 100644 --- a/public/assets/wechat/issue.html +++ b/public/assets/wechat/issue.html @@ -15,9 +15,6 @@
- - - + + + + + + \ No newline at end of file diff --git a/public/javascripts/wechat/wechat-dev.js b/public/javascripts/wechat/wechat-dev.js index 9c5704b8c..56a95ac72 100644 --- a/public/javascripts/wechat/wechat-dev.js +++ b/public/javascripts/wechat/wechat-dev.js @@ -15,11 +15,13 @@ $(document).ready(function(){ var html=bt('t:result-list',{issues: data}); $('#container').prepend(html); + descToggle(); + } - var loadDataFromServer = function(id){ + var loadDataFromServer = function(page){ $.ajax({ - url: apiUrl + 'issues/' + id, + url: apiUrl + 'activities/' + page + "?openid=", dataType: 'json', success: function(data){ setTemplate(data.data); @@ -31,24 +33,32 @@ $(document).ready(function(){ }; - loadDataFromServer(299); + loadDataFromServer(0); + + var descToggle = function(){ + var postWidth = $(".post-wrapper").width(); + var titleWidth = postWidth - 80; + $(".post-title").css("maxWidth",titleWidth); + $(".post-all-content").each(function(){ + var postHeight = $(this).height(); + if (postHeight > 90){ + $(this).parent().next().css("display","block"); + $(this).parent().next().toggle(function(){ + $(this).text("点击隐藏"); + $(this).prev().css("height",postHeight); + },function(){ + $(this).text("点击展开"); + $(this).prev().css("height",90); + }); + } + }); + } + + var timeSpilt = function(){ + + } + - var postWidth = $(".post-wrapper").width(); - var titleWidth = postWidth - 80; - $(".post-title").css("maxWidth",titleWidth); - $(".post-all-content").each(function(){ - var postHeight = $(this).height(); - if (postHeight > 90){ - $(this).parent().next().css("display","block"); - $(this).parent().next().toggle(function(){ - $(this).text("点击隐藏"); - $(this).prev().css("height",postHeight); - },function(){ - $(this).text("点击展开"); - $(this).prev().css("height",90); - }); - } - }); }); From 4de598873fb6b623751fa6d16c2af206084de352 Mon Sep 17 00:00:00 2001 From: Yiang Gan Date: Wed, 30 Mar 2016 10:32:45 +0800 Subject: [PATCH 085/209] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=92=8C=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E7=9A=84api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/api.rb | 4 + app/api/mobile/apis/activities.rb | 32 ++++++ app/api/mobile/apis/whomeworks.rb | 17 +++ app/api/mobile/entities/activity.rb | 102 ++++++++++++++++++ app/api/mobile/entities/whomework.rb | 53 +++++++++ app/helpers/api_helper.rb | 38 +++++++ config/application.rb | 4 +- db/schema.rb | 20 +++- .../{acitivities.html => activities.html} | 1 + public/assets/wechat/issue.html | 2 +- public/javascripts/wechat/wechat-dev.js | 17 ++- public/javascripts/wechat/wechat.jsx | 8 +- 12 files changed, 280 insertions(+), 18 deletions(-) create mode 100644 app/api/mobile/apis/activities.rb create mode 100644 app/api/mobile/apis/whomeworks.rb create mode 100644 app/api/mobile/entities/activity.rb create mode 100644 app/api/mobile/entities/whomework.rb rename public/assets/wechat/{acitivities.html => activities.html} (97%) diff --git a/app/api/mobile/api.rb b/app/api/mobile/api.rb index 91cae64ef..690828b84 100644 --- a/app/api/mobile/api.rb +++ b/app/api/mobile/api.rb @@ -8,6 +8,8 @@ module Mobile require_relative 'apis/homeworks' require_relative 'apis/comments' require_relative 'apis/issues' + require_relative 'apis/activities' + require_relative 'apis/whomeworks' class API < Grape::API version 'v1', using: :path @@ -42,6 +44,8 @@ module Mobile mount Apis::Homeworks mount Apis::Comments mount Apis::Issues + mount Apis::Activities + mount Apis::Whomeworks #add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'}) #add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development? diff --git a/app/api/mobile/apis/activities.rb b/app/api/mobile/apis/activities.rb new file mode 100644 index 000000000..29cc3da8c --- /dev/null +++ b/app/api/mobile/apis/activities.rb @@ -0,0 +1,32 @@ +#coding=utf-8 + +module Mobile + module Apis + class Activities< Grape::API + resources :activities do + + desc "get user activities" + get ':id' do + #uw = UserWechat.find params[:openid] + user = User.find params[:id] + shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id) + shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id) + page = params[:page] ? params[:page].to_i + 1 : 0 + user_project_ids = (user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")" + user_course_ids = (user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")" + course_types = "('Message','News','HomeworkCommon','Poll','Course')" + project_types = "('Message','Issue','ProjectCreateInfo')" + principal_types = "JournalsForMessage" + + blog_ids = "("+user.blog.id.to_s+","+((User.watched_by(user.id).count == 0 )? '0' :User.watched_by(user.id).map{|u| u.blog.id}.join(','))+")" + activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" + + "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+ + "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{user.id}) " + + "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(page * 10) + present :data, activities, with: Mobile::Entities::Activity + present :status, 0 + end + end + end + end +end \ No newline at end of file diff --git a/app/api/mobile/apis/whomeworks.rb b/app/api/mobile/apis/whomeworks.rb new file mode 100644 index 000000000..84e9e1fdf --- /dev/null +++ b/app/api/mobile/apis/whomeworks.rb @@ -0,0 +1,17 @@ +#coding=utf-8 + +module Mobile + module Apis + class Whomeworks< Grape::API + resources :whomeworks do + + desc "get one homework" + get ':id' do + homework = HomeworkCommon.find params[:id] + present :data, homework, with: Mobile::Entities::Whomework + present :status, 0 + end + end + end + end +end diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb new file mode 100644 index 000000000..4d64a40d8 --- /dev/null +++ b/app/api/mobile/entities/activity.rb @@ -0,0 +1,102 @@ +# encoding: utf-8 +module Mobile + module Entities + class Activity 20160225024759) do +ActiveRecord::Schema.define(:version => 20160317090350) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -432,9 +432,11 @@ ActiveRecord::Schema.define(:version => 20160225024759) do t.integer "resource_num" t.integer "journal_num" t.integer "journal_reply_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "total_score" + t.integer "homework_journal_num", :default => 0 + t.integer "news_num", :default => 0 end create_table "course_groups", :force => true do |t| @@ -506,6 +508,7 @@ ActiveRecord::Schema.define(:version => 20160225024759) do t.integer "is_excellent", :default => 0 t.integer "excellent_option", :default => 0 t.integer "is_copy", :default => 0 + t.integer "visits", :default => 0 end create_table "custom_fields", :force => true do |t| @@ -1282,6 +1285,7 @@ ActiveRecord::Schema.define(:version => 20160225024759) do t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.boolean "allow_guest_download", :default => true + t.integer "visits", :default => 0 end create_table "phone_app_versions", :force => true do |t| @@ -1441,6 +1445,7 @@ ActiveRecord::Schema.define(:version => 20160225024759) do t.integer "acts_count", :default => 0 t.integer "journals_count", :default => 0 t.integer "boards_reply_count", :default => 0 + t.integer "visits", :default => 0 end add_index "projects", ["lft"], :name => "index_projects_on_lft" @@ -1777,6 +1782,14 @@ ActiveRecord::Schema.define(:version => 20160225024759) do t.integer "fields_bits", :default => 0 end + create_table "user_actions", :force => true do |t| + t.integer "user_id" + t.string "action_type" + t.integer "action_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "user_activities", :force => true do |t| t.string "act_type" t.integer "act_id" @@ -1919,6 +1932,7 @@ ActiveRecord::Schema.define(:version => 20160225024759) do t.string "mail_notification", :default => "", :null => false t.string "salt", :limit => 64 t.integer "gid" + t.integer "visits", :default => 0 end add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" diff --git a/public/assets/wechat/acitivities.html b/public/assets/wechat/activities.html similarity index 97% rename from public/assets/wechat/acitivities.html rename to public/assets/wechat/activities.html index 87c697aba..eb537363d 100644 --- a/public/assets/wechat/acitivities.html +++ b/public/assets/wechat/activities.html @@ -216,5 +216,6 @@ + \ No newline at end of file diff --git a/public/assets/wechat/issue.html b/public/assets/wechat/issue.html index 4c26551b1..558496ef0 100644 --- a/public/assets/wechat/issue.html +++ b/public/assets/wechat/issue.html @@ -18,7 +18,7 @@ + + + + + + + \ No newline at end of file From 77e11fe0fec7f8f0537940863e78c4d7d483aff1 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 30 Mar 2016 17:47:44 +0800 Subject: [PATCH 090/209] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/activities.rb | 62 +- app/api/mobile/apis/blog_comments.rb | 34 +- app/api/mobile/apis/issues.rb | 34 +- app/api/mobile/apis/journal_for_messages.rb | 34 +- app/api/mobile/apis/messages.rb | 34 +- app/api/mobile/apis/newss.rb | 34 +- app/api/mobile/apis/whomeworks.rb | 34 +- app/api/mobile/entities/activity.rb | 262 +- app/api/mobile/entities/blog_comment.rb | 90 +- app/api/mobile/entities/issue.rb | 68 +- app/api/mobile/entities/whomework.rb | 130 +- config/application.rb | 192 +- db/schema.rb | 4184 +++++++++---------- public/assets/wechat/activities.html | 84 +- public/javascripts/wechat/wechat-dev.js | 130 +- public/javascripts/wechat/wechat.jsx | 194 +- 16 files changed, 2800 insertions(+), 2800 deletions(-) diff --git a/app/api/mobile/apis/activities.rb b/app/api/mobile/apis/activities.rb index 29cc3da8c..ed49c0ada 100644 --- a/app/api/mobile/apis/activities.rb +++ b/app/api/mobile/apis/activities.rb @@ -1,32 +1,32 @@ -#coding=utf-8 - -module Mobile - module Apis - class Activities< Grape::API - resources :activities do - - desc "get user activities" - get ':id' do - #uw = UserWechat.find params[:openid] - user = User.find params[:id] - shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id) - shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id) - page = params[:page] ? params[:page].to_i + 1 : 0 - user_project_ids = (user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")" - user_course_ids = (user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")" - course_types = "('Message','News','HomeworkCommon','Poll','Course')" - project_types = "('Message','Issue','ProjectCreateInfo')" - principal_types = "JournalsForMessage" - - blog_ids = "("+user.blog.id.to_s+","+((User.watched_by(user.id).count == 0 )? '0' :User.watched_by(user.id).map{|u| u.blog.id}.join(','))+")" - activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" + - "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+ - "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{user.id}) " + - "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(page * 10) - present :data, activities, with: Mobile::Entities::Activity - present :status, 0 - end - end - end - end +#coding=utf-8 + +module Mobile + module Apis + class Activities< Grape::API + resources :activities do + + desc "get user activities" + get ':id' do + #uw = UserWechat.find params[:openid] + user = User.find params[:id] + shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id) + shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id) + page = params[:page] ? params[:page].to_i + 1 : 0 + user_project_ids = (user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")" + user_course_ids = (user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")" + course_types = "('Message','News','HomeworkCommon','Poll','Course')" + project_types = "('Message','Issue','ProjectCreateInfo')" + principal_types = "JournalsForMessage" + + blog_ids = "("+user.blog.id.to_s+","+((User.watched_by(user.id).count == 0 )? '0' :User.watched_by(user.id).map{|u| u.blog.id}.join(','))+")" + activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" + + "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+ + "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{user.id}) " + + "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(page * 10) + present :data, activities, with: Mobile::Entities::Activity + present :status, 0 + end + end + end + end end \ No newline at end of file diff --git a/app/api/mobile/apis/blog_comments.rb b/app/api/mobile/apis/blog_comments.rb index 3334b2bf8..f94d0bbc7 100644 --- a/app/api/mobile/apis/blog_comments.rb +++ b/app/api/mobile/apis/blog_comments.rb @@ -1,17 +1,17 @@ -#coding=utf-8 - -module Mobile - module Apis - class BlogComments< Grape::API - resources :blog_comments do - - desc "get special topic" - get ':id' do - blog = BlogComment.find params[:id] - present :blog, message, with: Mobile::Entities::BlogComment - present :status, 0 - end - end - end - end -end +#coding=utf-8 + +module Mobile + module Apis + class BlogComments< Grape::API + resources :blog_comments do + + desc "get special topic" + get ':id' do + blog = BlogComment.find params[:id] + present :blog, message, with: Mobile::Entities::BlogComment + present :status, 0 + end + end + end + end +end diff --git a/app/api/mobile/apis/issues.rb b/app/api/mobile/apis/issues.rb index 7d5640d3b..1c7a9ef3d 100644 --- a/app/api/mobile/apis/issues.rb +++ b/app/api/mobile/apis/issues.rb @@ -1,17 +1,17 @@ -#coding=utf-8 - -module Mobile - module Apis - class Issues< Grape::API - resources :issues do - - desc "get special issuse" - get ':id' do - issue = Issue.find params[:id] - present :data, issue, with: Mobile::Entities::Issue - present :status, 0 - end - end - end - end -end +#coding=utf-8 + +module Mobile + module Apis + class Issues< Grape::API + resources :issues do + + desc "get special issuse" + get ':id' do + issue = Issue.find params[:id] + present :data, issue, with: Mobile::Entities::Issue + present :status, 0 + end + end + end + end +end diff --git a/app/api/mobile/apis/journal_for_messages.rb b/app/api/mobile/apis/journal_for_messages.rb index ac9787d51..648924912 100644 --- a/app/api/mobile/apis/journal_for_messages.rb +++ b/app/api/mobile/apis/journal_for_messages.rb @@ -1,17 +1,17 @@ -#coding=utf-8 - -module Mobile - module Apis - class JournalForMessages< Grape::API - resources :journal_for_messages do - - desc "get special journal" - get ':id' do - jour = JournalsForMessage.find params[:id] - present :data, jour, with: Mobile::Entities::Jours - present :status, 0 - end - end - end - end -end +#coding=utf-8 + +module Mobile + module Apis + class JournalForMessages< Grape::API + resources :journal_for_messages do + + desc "get special journal" + get ':id' do + jour = JournalsForMessage.find params[:id] + present :data, jour, with: Mobile::Entities::Jours + present :status, 0 + end + end + end + end +end diff --git a/app/api/mobile/apis/messages.rb b/app/api/mobile/apis/messages.rb index c1c403a50..5e2fb05b7 100644 --- a/app/api/mobile/apis/messages.rb +++ b/app/api/mobile/apis/messages.rb @@ -1,17 +1,17 @@ -#coding=utf-8 - -module Mobile - module Apis - class Messages< Grape::API - resources :messages do - - desc "get special topic" - get ':id' do - message = Message.find params[:id] - present :data, message, with: Mobile::Entities::Message - present :status, 0 - end - end - end - end -end +#coding=utf-8 + +module Mobile + module Apis + class Messages< Grape::API + resources :messages do + + desc "get special topic" + get ':id' do + message = Message.find params[:id] + present :data, message, with: Mobile::Entities::Message + present :status, 0 + end + end + end + end +end diff --git a/app/api/mobile/apis/newss.rb b/app/api/mobile/apis/newss.rb index 52b77fb88..6f15ae2ee 100644 --- a/app/api/mobile/apis/newss.rb +++ b/app/api/mobile/apis/newss.rb @@ -1,17 +1,17 @@ -#coding=utf-8 - -module Mobile - module Apis - class Newss< Grape::API - resources :newss do - - desc "get special news" - get ':id' do - news = News.find params[:id] - present :data, news, with: Mobile::Entities::News - present :status, 0 - end - end - end - end -end +#coding=utf-8 + +module Mobile + module Apis + class Newss< Grape::API + resources :newss do + + desc "get special news" + get ':id' do + news = News.find params[:id] + present :data, news, with: Mobile::Entities::News + present :status, 0 + end + end + end + end +end diff --git a/app/api/mobile/apis/whomeworks.rb b/app/api/mobile/apis/whomeworks.rb index 84e9e1fdf..39a6faa68 100644 --- a/app/api/mobile/apis/whomeworks.rb +++ b/app/api/mobile/apis/whomeworks.rb @@ -1,17 +1,17 @@ -#coding=utf-8 - -module Mobile - module Apis - class Whomeworks< Grape::API - resources :whomeworks do - - desc "get one homework" - get ':id' do - homework = HomeworkCommon.find params[:id] - present :data, homework, with: Mobile::Entities::Whomework - present :status, 0 - end - end - end - end -end +#coding=utf-8 + +module Mobile + module Apis + class Whomeworks< Grape::API + resources :whomeworks do + + desc "get one homework" + get ':id' do + homework = HomeworkCommon.find params[:id] + present :data, homework, with: Mobile::Entities::Whomework + present :status, 0 + end + end + end + end +end diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index c47f396e2..db1456e68 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -1,132 +1,132 @@ -# encoding: utf-8 -module Mobile - module Entities - class Activity %w(development test))) - # If you want your assets lazily compiled in production, use this line - # Bundler.require(:default, :assets, Rails.env) -end - -module RedmineApp - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - #verifier if email is real - - - config.generators do |g| - g.test_framework :rspec, - fixtures: true, - view_specs: false, - helper_specs: false, - routing_specs: false, - controller_specs: true, - request_specs: false - g.fixture_replacement :factory_girl, dir: "spec/factories" - end - # Custom directories with classes and modules you want to be autoloadable. - config.autoload_paths += %W(#{config.root}/lib) - config.autoload_paths += %w(#{RAILS_ROOT}/app/sweepers) - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - config.active_record.observers = :journals_for_message_observer, :issue_observer, :journal_observer, :wiki_content_observer - - config.active_record.store_full_sti_class = true - config.active_record.default_timezone = :local - config.time_zone = 'Beijing' - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - config.i18n.default_locale = :zh - - #config.i18n.enforce_available_locales = true - #I18n.config.enforce_available_locales = true - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Enable the asset pipeline - config.assets.enabled = false - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - - config.action_mailer.perform_deliveries = false - - # Do not include all helpers - config.action_controller.include_all_helpers = false - - config.action_view.sanitized_allowed_tags = 'div', 'p', 'span', 'img', 'embed' - - config.before_initialize do - end - - config.after_initialize do - if RbConfig::CONFIG['target_os'] == 'mingw32' - Elasticsearch::Client.new hosts: ['localhost:9200'], retry_on_failure: true,log:true - elsif RbConfig::CONFIG['target_os'] == 'linux' && ["fast76"].include?(`hostname`.gsub("\n","")) - Elasticsearch::Client.new hosts: ['localhost:9200'], retry_on_failure: true,log:true - elsif RbConfig::CONFIG['target_os'] == 'linux' && ["testtrustie11","agent12"].include?(`hostname`.gsub("\n","")) - Elasticsearch::Client.new hosts: ['localhost:9200','192.168.80.11:9200','192.168.80.12:9200'], retry_on_failure: true - elsif RbConfig::CONFIG['target_os'] == 'linux' && ["trustie168","trustieserver14","trustieserver16","Trustie18"].include?(`hostname`.gsub("\n","")) - Elasticsearch::Client.new hosts: ['localhost:9200','192.168.80.168:9200'], retry_on_failure: true - else - Elasticsearch::Client.new hosts: ['localhost:9200'], retry_on_failure: true - end - end - - if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) - instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb')) - end - - end -end +require File.expand_path('../boot', __FILE__) + +require 'rails/all' +require 'sprockets/railtie' +require 'elasticsearch/model' +if defined?(Bundler) + # If you precompile assets before deploying to production, use this line + Bundler.require(*Rails.groups(:assets => %w(development test))) + # If you want your assets lazily compiled in production, use this line + # Bundler.require(:default, :assets, Rails.env) +end + +module RedmineApp + class Application < Rails::Application + # Settings in config/environments/* take precedence over those specified here. + # Application configuration should go into files in config/initializers + # -- all .rb files in that directory are automatically loaded. + + #verifier if email is real + + + config.generators do |g| + g.test_framework :rspec, + fixtures: true, + view_specs: false, + helper_specs: false, + routing_specs: false, + controller_specs: true, + request_specs: false + g.fixture_replacement :factory_girl, dir: "spec/factories" + end + # Custom directories with classes and modules you want to be autoloadable. + config.autoload_paths += %W(#{config.root}/lib) + config.autoload_paths += %w(#{RAILS_ROOT}/app/sweepers) + # Only load the plugins named here, in the order given (default is alphabetical). + # :all can be used as a placeholder for all plugins not explicitly named. + # config.plugins = [ :exception_notification, :ssl_requirement, :all ] + + # Activate observers that should always be running. + config.active_record.observers = :journals_for_message_observer, :issue_observer, :journal_observer, :wiki_content_observer + + config.active_record.store_full_sti_class = true + config.active_record.default_timezone = :local + config.time_zone = 'Beijing' + # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. + # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. + # config.time_zone = 'Central Time (US & Canada)' + + # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. + # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] + config.i18n.default_locale = :zh + + #config.i18n.enforce_available_locales = true + #I18n.config.enforce_available_locales = true + # Configure the default encoding used in templates for Ruby 1.9. + config.encoding = "utf-8" + + # Configure sensitive parameters which will be filtered from the log file. + config.filter_parameters += [:password] + + # Enable the asset pipeline + config.assets.enabled = false + + # Version of your assets, change this if you want to expire all your assets + config.assets.version = '1.0' + + config.action_mailer.perform_deliveries = false + + # Do not include all helpers + config.action_controller.include_all_helpers = false + + config.action_view.sanitized_allowed_tags = 'div', 'p', 'span', 'img', 'embed' + + config.before_initialize do + end + + config.after_initialize do + if RbConfig::CONFIG['target_os'] == 'mingw32' + Elasticsearch::Client.new hosts: ['localhost:9200'], retry_on_failure: true,log:true + elsif RbConfig::CONFIG['target_os'] == 'linux' && ["fast76"].include?(`hostname`.gsub("\n","")) + Elasticsearch::Client.new hosts: ['localhost:9200'], retry_on_failure: true,log:true + elsif RbConfig::CONFIG['target_os'] == 'linux' && ["testtrustie11","agent12"].include?(`hostname`.gsub("\n","")) + Elasticsearch::Client.new hosts: ['localhost:9200','192.168.80.11:9200','192.168.80.12:9200'], retry_on_failure: true + elsif RbConfig::CONFIG['target_os'] == 'linux' && ["trustie168","trustieserver14","trustieserver16","Trustie18"].include?(`hostname`.gsub("\n","")) + Elasticsearch::Client.new hosts: ['localhost:9200','192.168.80.168:9200'], retry_on_failure: true + else + Elasticsearch::Client.new hosts: ['localhost:9200'], retry_on_failure: true + end + end + + if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) + instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb')) + end + + end +end diff --git a/db/schema.rb b/db/schema.rb index 75f316f06..38c7e5ad2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,2092 +1,2092 @@ -# encoding: UTF-8 -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended to check this file into your version control system. - -ActiveRecord::Schema.define(:version => 20160317090350) do - - create_table "activities", :force => true do |t| - t.integer "act_id", :null => false - t.string "act_type", :null => false - t.integer "user_id", :null => false - t.integer "activity_container_id" - t.string "activity_container_type", :default => "" - t.datetime "created_at" - end - - add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" - add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" - add_index "activities", ["user_id"], :name => "index_activities_on_user_id" - - create_table "activity_notifies", :force => true do |t| - t.integer "activity_container_id" - t.string "activity_container_type" - t.integer "activity_id" - t.string "activity_type" - t.integer "notify_to" - t.datetime "created_on" - t.integer "is_read" - end - - add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" - add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" - add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" - - create_table "api_keys", :force => true do |t| - t.string "access_token" - t.datetime "expires_at" - t.integer "user_id" - t.boolean "active", :default => true - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" - add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - - create_table "applied_projects", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - end - - create_table "apply_project_masters", :force => true do |t| - t.integer "user_id" - t.string "apply_type" - t.integer "apply_id" - t.integer "status" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "at_messages", :force => true do |t| - t.integer "user_id" - t.integer "at_message_id" - t.string "at_message_type" - t.boolean "viewed", :default => false - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sender_id" - end - - add_index "at_messages", ["user_id"], :name => "index_at_messages_on_user_id" - - create_table "attachment_histories", :force => true do |t| - t.integer "container_id" - t.string "container_type" - t.string "filename", :default => "" - t.string "disk_filename", :default => "" - t.integer "filesize", :default => 0 - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "" - t.integer "downloads", :default => 0 - t.integer "author_id" - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.integer "copy_from" - t.integer "quotes" - t.integer "version" - t.integer "attachment_id" - t.integer "is_publish", :default => 1 - t.date "publish_time" - end - - create_table "attachments", :force => true do |t| - t.integer "container_id" - t.string "container_type", :limit => 30 - t.string "filename", :default => "", :null => false - t.string "disk_filename", :default => "", :null => false - t.integer "filesize", :default => 0, :null => false - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "", :null => false - t.integer "downloads", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype", :default => 1 - t.integer "is_public", :default => 1 - t.integer "copy_from" - t.integer "quotes" - t.integer "is_publish", :default => 1 - t.date "publish_time" - end - - add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" - add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" - add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" - - create_table "attachmentstypes", :force => true do |t| - t.integer "typeId", :null => false - t.string "typeName", :limit => 50 - end - - create_table "auth_sources", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 60, :default => "", :null => false - t.string "host", :limit => 60 - t.integer "port" - t.string "account" - t.string "account_password", :default => "" - t.string "base_dn" - t.string "attr_login", :limit => 30 - t.string "attr_firstname", :limit => 30 - t.string "attr_lastname", :limit => 30 - t.string "attr_mail", :limit => 30 - t.boolean "onthefly_register", :default => false, :null => false - t.boolean "tls", :default => false, :null => false - t.string "filter" - t.integer "timeout" - end - - add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" - - create_table "biding_projects", :force => true do |t| - t.integer "project_id" - t.integer "bid_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "bids", :force => true do |t| - t.string "name" - t.string "budget", :null => false - t.integer "author_id" - t.date "deadline" - t.text "description" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.integer "commit" - t.integer "reward_type" - t.integer "homework_type" - t.integer "parent_id" - t.string "password" - t.integer "is_evaluation" - t.integer "proportion", :default => 60 - t.integer "comment_status", :default => 0 - t.integer "evaluation_num", :default => 3 - t.integer "open_anonymous_evaluation", :default => 1 - end - - create_table "blog_comments", :force => true do |t| - t.integer "blog_id", :null => false - t.integer "parent_id" - t.string "title", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "comments_count", :default => 0, :null => false - t.integer "last_comment_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "reply_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "blogs", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - t.integer "position", :default => 1 - t.integer "article_count", :default => 0, :null => false - t.integer "comments_count", :default => 0, :null => false - t.integer "last_comments_id" - t.integer "parent_id" - t.integer "author_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "homepage_id" - end - - create_table "boards", :force => true do |t| - t.integer "project_id", :null => false - t.string "name", :default => "", :null => false - t.string "description" - t.integer "position", :default => 1 - t.integer "topics_count", :default => 0, :null => false - t.integer "messages_count", :default => 0, :null => false - t.integer "last_message_id" - t.integer "parent_id" - t.integer "course_id" - t.integer "org_subfield_id" - end - - add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" - add_index "boards", ["project_id"], :name => "boards_project_id" - - create_table "bug_to_osps", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "changes", :force => true do |t| - t.integer "changeset_id", :null => false - t.string "action", :limit => 1, :default => "", :null => false - t.text "path", :null => false - t.text "from_path" - t.string "from_revision" - t.string "revision" - t.string "branch" - end - - add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" - - create_table "changeset_parents", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "parent_id", :null => false - end - - add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" - add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" - - create_table "changesets", :force => true do |t| - t.integer "repository_id", :null => false - t.string "revision", :null => false - t.string "committer" - t.datetime "committed_on", :null => false - t.text "comments" - t.date "commit_date" - t.string "scmid" - t.integer "user_id" - end - - add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" - add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true - add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" - add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" - add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" - - create_table "changesets_issues", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "issue_id", :null => false - end - - add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true - - create_table "code_review_assignments", :force => true do |t| - t.integer "issue_id" - t.integer "change_id" - t.integer "attachment_id" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.string "action_type" - t.integer "changeset_id" - end - - create_table "code_review_project_settings", :force => true do |t| - t.integer "project_id" - t.integer "tracker_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "updated_by" - t.boolean "hide_code_review_tab", :default => false - t.integer "auto_relation", :default => 1 - t.integer "assignment_tracker_id" - t.text "auto_assign" - t.integer "lock_version", :default => 0, :null => false - t.boolean "tracker_in_review_dialog", :default => false - end - - create_table "code_review_user_settings", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "mail_notification", :default => 0, :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "code_reviews", :force => true do |t| - t.integer "project_id" - t.integer "change_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "line" - t.integer "updated_by_id" - t.integer "lock_version", :default => 0, :null => false - t.integer "status_changed_from" - t.integer "status_changed_to" - t.integer "issue_id" - t.string "action_type" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.integer "attachment_id" - t.integer "file_count", :default => 0, :null => false - t.boolean "diff_all" - end - - create_table "comments", :force => true do |t| - t.string "commented_type", :limit => 30, :default => "", :null => false - t.integer "commented_id", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.text "comments" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "comments", ["author_id"], :name => "index_comments_on_author_id" - add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" - - create_table "contest_notifications", :force => true do |t| - t.text "title" - t.text "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "contesting_projects", :force => true do |t| - t.integer "project_id" - t.string "contest_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "contesting_softapplications", :force => true do |t| - t.integer "softapplication_id" - t.integer "contest_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "contestnotifications", :force => true do |t| - t.integer "contest_id" - t.string "title" - t.string "summary" - t.text "description" - t.integer "author_id" - t.integer "notificationcomments_count" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "contests", :force => true do |t| - t.string "name" - t.string "budget", :default => "" - t.integer "author_id" - t.date "deadline" - t.string "description" - t.integer "commit" - t.string "password" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - create_table "course_activities", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_act_id" - t.string "course_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_attachments", :force => true do |t| - t.string "filename" - t.string "disk_filename" - t.integer "filesize" - t.string "content_type" - t.string "digest" - t.integer "downloads" - t.string "author_id" - t.string "integer" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "container_id", :default => 0 - end - - create_table "course_contributor_scores", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.integer "message_num" - t.integer "message_reply_num" - t.integer "news_reply_num" - t.integer "resource_num" - t.integer "journal_num" - t.integer "journal_reply_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "total_score" - t.integer "homework_journal_num", :default => 0 - t.integer "news_num", :default => 0 - end - - create_table "course_groups", :force => true do |t| - t.string "name" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_infos", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_messages", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_message_id" - t.string "course_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "content" - t.integer "status" - end - - create_table "course_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "course_id" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "courses", :force => true do |t| - t.integer "tea_id" - t.string "name" - t.integer "state" - t.string "code" - t.integer "time" - t.string "extra" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "location" - t.string "term" - t.string "string" - t.string "password" - t.string "setup_time" - t.string "endup_time" - t.string "class_period" - t.integer "school_id" - t.text "description" - t.integer "status", :default => 1 - t.integer "attachmenttype", :default => 2 - t.integer "lft" - t.integer "rgt" - t.integer "is_public", :limit => 1, :default => 1 - t.integer "inherit_members", :limit => 1, :default => 1 - t.integer "open_student", :default => 0 - t.integer "outline", :default => 0 - t.integer "publish_resource", :default => 0 - t.integer "is_delete", :default => 0 - t.integer "end_time" - t.string "end_term" - t.integer "is_excellent", :default => 0 - t.integer "excellent_option", :default => 0 - t.integer "is_copy", :default => 0 - t.integer "visits", :default => 0 - end - - create_table "custom_fields", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.string "field_format", :limit => 30, :default => "", :null => false - t.text "possible_values" - t.string "regexp", :default => "" - t.integer "min_length", :default => 0, :null => false - t.integer "max_length", :default => 0, :null => false - t.boolean "is_required", :default => false, :null => false - t.boolean "is_for_all", :default => false, :null => false - t.boolean "is_filter", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "searchable", :default => false - t.text "default_value" - t.boolean "editable", :default => true - t.boolean "visible", :default => true, :null => false - t.boolean "multiple", :default => false - end - - add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" - - create_table "custom_fields_projects", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "project_id", :default => 0, :null => false - end - - add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true - - create_table "custom_fields_trackers", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true - - create_table "custom_values", :force => true do |t| - t.string "customized_type", :limit => 30, :default => "", :null => false - t.integer "customized_id", :default => 0, :null => false - t.integer "custom_field_id", :default => 0, :null => false - t.text "value" - end - - add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" - add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" - - create_table "delayed_jobs", :force => true do |t| - t.integer "priority", :default => 0, :null => false - t.integer "attempts", :default => 0, :null => false - t.text "handler", :null => false - t.text "last_error" - t.datetime "run_at" - t.datetime "locked_at" - t.datetime "failed_at" - t.string "locked_by" - t.string "queue" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" - - create_table "discuss_demos", :force => true do |t| - t.string "title" - t.text "body" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "documents", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "category_id", :default => 0, :null => false - t.string "title", :limit => 60, :default => "", :null => false - t.text "description" - t.datetime "created_on" - t.integer "user_id", :default => 0 - t.integer "is_public", :default => 1 - end - - add_index "documents", ["category_id"], :name => "index_documents_on_category_id" - add_index "documents", ["created_on"], :name => "index_documents_on_created_on" - add_index "documents", ["project_id"], :name => "documents_project_id" - - create_table "dts", :primary_key => "Num", :force => true do |t| - t.string "Defect", :limit => 50 - t.string "Category", :limit => 50 - t.string "File" - t.string "Method" - t.string "Module", :limit => 20 - t.string "Variable", :limit => 50 - t.integer "StartLine" - t.integer "IPLine" - t.string "IPLineCode", :limit => 200 - t.string "Judge", :limit => 15 - t.integer "Review", :limit => 1 - t.string "Description" - t.text "PreConditions", :limit => 2147483647 - t.text "TraceInfo", :limit => 2147483647 - t.text "Code", :limit => 2147483647 - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "id", :null => false - end - - create_table "editor_of_documents", :force => true do |t| - t.integer "editor_id" - t.integer "org_document_comment_id" - t.datetime "created_at" - end - - create_table "enabled_modules", :force => true do |t| - t.integer "project_id" - t.string "name", :null => false - t.integer "course_id" - end - - add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" - - create_table "enumerations", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "is_default", :default => false, :null => false - t.string "type" - t.boolean "active", :default => true, :null => false - t.integer "project_id" - t.integer "parent_id" - t.string "position_name", :limit => 30 - end - - add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" - add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" - - create_table "exercise_answers", :force => true do |t| - t.integer "user_id" - t.integer "exercise_question_id" - t.integer "exercise_choice_id" - t.text "answer_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_choices", :force => true do |t| - t.integer "exercise_question_id" - t.text "choice_text" - t.integer "choice_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_questions", :force => true do |t| - t.text "question_title" - t.integer "question_type" - t.integer "question_number" - t.integer "exercise_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_score" - end - - create_table "exercise_standard_answers", :force => true do |t| - t.integer "exercise_question_id" - t.integer "exercise_choice_id" - t.text "answer_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_users", :force => true do |t| - t.integer "user_id" - t.integer "exercise_id" - t.integer "score" - t.datetime "start_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.datetime "end_at" - t.integer "status" - end - - create_table "exercises", :force => true do |t| - t.text "exercise_name" - t.text "exercise_description" - t.integer "course_id" - t.integer "exercise_status" - t.integer "user_id" - t.integer "time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.datetime "publish_time" - t.datetime "end_time" - t.integer "show_result" - end - - create_table "first_pages", :force => true do |t| - t.string "web_title" - t.string "title" - t.text "description" - t.string "page_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sort_type" - t.integer "image_width", :default => 107 - t.integer "image_height", :default => 63 - t.integer "show_course", :default => 1 - t.integer "show_contest", :default => 1 - end - - create_table "forge_activities", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_act_id" - t.string "forge_act_type" - t.integer "org_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" - - create_table "forge_messages", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_message_id" - t.string "forge_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "secret_key" - t.integer "status" - end - - create_table "forums", :force => true do |t| - t.string "name", :null => false - t.text "description" - t.integer "topic_count", :default => 0 - t.integer "memo_count", :default => 0 - t.integer "last_memo_id", :default => 0 - t.integer "creator_id", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sticky" - t.integer "locked" - end - - create_table "forwards", :force => true do |t| - t.integer "from_id" - t.string "from_type" - t.integer "to_id" - t.string "to_type" - t.datetime "created_at" - end - - create_table "groups_users", :id => false, :force => true do |t| - t.integer "group_id", :null => false - t.integer "user_id", :null => false - end - - add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true - - create_table "homework_attaches", :force => true do |t| - t.integer "bid_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - t.string "name" - t.text "description" - t.integer "state" - t.integer "project_id", :default => 0 - t.float "score", :default => 0.0 - t.integer "is_teacher_score", :default => 0 - end - - add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" - - create_table "homework_commons", :force => true do |t| - t.string "name" - t.integer "user_id" - t.text "description" - t.date "publish_time" - t.date "end_time" - t.integer "homework_type", :default => 1 - t.string "late_penalty" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "teacher_priority", :default => 1 - t.integer "anonymous_comment", :default => 0 - t.integer "quotes", :default => 0 - t.integer "is_open", :default => 0 - end - - add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id" - - create_table "homework_detail_groups", :force => true do |t| - t.integer "homework_common_id" - t.integer "min_num" - t.integer "max_num" - t.integer "base_on_project" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "homework_detail_groups", ["homework_common_id"], :name => "index_homework_detail_groups_on_homework_common_id" - - create_table "homework_detail_manuals", :force => true do |t| - t.float "ta_proportion" - t.integer "comment_status" - t.date "evaluation_start" - t.date "evaluation_end" - t.integer "evaluation_num" - t.integer "absence_penalty", :default => 1 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_detail_programings", :force => true do |t| - t.string "language" - t.text "standard_code", :limit => 2147483647 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "ta_proportion", :default => 0.1 - t.integer "question_id" - end - - create_table "homework_evaluations", :force => true do |t| - t.string "user_id" - t.string "homework_attach_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_for_courses", :force => true do |t| - t.integer "course_id" - t.integer "bid_id" - end - - add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id" - add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id" - - create_table "homework_tests", :force => true do |t| - t.text "input" - t.text "output" - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "result" - t.text "error_msg" - end - - create_table "homework_users", :force => true do |t| - t.string "homework_attach_id" - t.string "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "invite_lists", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "mail" - end - - create_table "issue_categories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.integer "assigned_to_id" - end - - add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" - add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" - - create_table "issue_relations", :force => true do |t| - t.integer "issue_from_id", :null => false - t.integer "issue_to_id", :null => false - t.string "relation_type", :default => "", :null => false - t.integer "delay" - end - - add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true - add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" - add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" - - create_table "issue_statuses", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_closed", :default => false, :null => false - t.boolean "is_default", :default => false, :null => false - t.integer "position", :default => 1 - t.integer "default_done_ratio" - end - - add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" - add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" - add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" - - create_table "issues", :force => true do |t| - t.integer "tracker_id", :null => false - t.integer "project_id", :null => false - t.string "subject", :default => "", :null => false - t.text "description" - t.date "due_date" - t.integer "category_id" - t.integer "status_id", :null => false - t.integer "assigned_to_id" - t.integer "priority_id", :null => false - t.integer "fixed_version_id" - t.integer "author_id", :null => false - t.integer "lock_version", :default => 0, :null => false - t.datetime "created_on" - t.datetime "updated_on" - t.date "start_date" - t.integer "done_ratio", :default => 0, :null => false - t.float "estimated_hours" - t.integer "parent_id" - t.integer "root_id" - t.integer "lft" - t.integer "rgt" - t.boolean "is_private", :default => false, :null => false - t.datetime "closed_on" - t.integer "project_issues_index" - end - - add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" - add_index "issues", ["author_id"], :name => "index_issues_on_author_id" - add_index "issues", ["category_id"], :name => "index_issues_on_category_id" - add_index "issues", ["created_on"], :name => "index_issues_on_created_on" - add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" - add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" - add_index "issues", ["project_id"], :name => "issues_project_id" - add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" - add_index "issues", ["status_id"], :name => "index_issues_on_status_id" - add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" - - create_table "join_in_competitions", :force => true do |t| - t.integer "user_id" - t.integer "competition_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "join_in_contests", :force => true do |t| - t.integer "user_id" - t.integer "bid_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "journal_details", :force => true do |t| - t.integer "journal_id", :default => 0, :null => false - t.string "property", :limit => 30, :default => "", :null => false - t.string "prop_key", :limit => 30, :default => "", :null => false - t.text "old_value" - t.text "value" - end - - add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" - - create_table "journal_replies", :id => false, :force => true do |t| - t.integer "journal_id" - t.integer "user_id" - t.integer "reply_id" - end - - add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" - add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" - add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" - - create_table "journals", :force => true do |t| - t.integer "journalized_id", :default => 0, :null => false - t.string "journalized_type", :limit => 30, :default => "", :null => false - t.integer "user_id", :default => 0, :null => false - t.text "notes" - t.datetime "created_on", :null => false - t.boolean "private_notes", :default => false, :null => false - end - - add_index "journals", ["created_on"], :name => "index_journals_on_created_on" - add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" - add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" - add_index "journals", ["user_id"], :name => "index_journals_on_user_id" - - create_table "journals_for_messages", :force => true do |t| - t.integer "jour_id" - t.string "jour_type" - t.integer "user_id" - t.text "notes" - t.integer "status" - t.integer "reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.string "m_parent_id" - t.boolean "is_readed" - t.integer "m_reply_count" - t.integer "m_reply_id" - t.integer "is_comprehensive_evaluation" - t.integer "private", :default => 0 - end - - create_table "kindeditor_assets", :force => true do |t| - t.string "asset" - t.integer "file_size" - t.string "file_type" - t.integer "owner_id" - t.string "asset_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "owner_type", :default => 0 - end - - create_table "member_roles", :force => true do |t| - t.integer "member_id", :null => false - t.integer "role_id", :null => false - t.integer "inherited_from" - end - - add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" - add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" - - create_table "members", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "project_id", :default => 0 - t.datetime "created_on" - t.boolean "mail_notification", :default => false, :null => false - t.integer "course_id", :default => -1 - t.integer "course_group_id", :default => 0 - end - - add_index "members", ["project_id"], :name => "index_members_on_project_id" - add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true - add_index "members", ["user_id"], :name => "index_members_on_user_id" - - create_table "memo_messages", :force => true do |t| - t.integer "user_id" - t.integer "forum_id" - t.integer "memo_id" - t.string "memo_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "memos", :force => true do |t| - t.integer "forum_id", :null => false - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :null => false - t.integer "author_id", :null => false - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count", :default => 0 - end - - create_table "message_alls", :force => true do |t| - t.integer "user_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "messages", :force => true do |t| - t.integer "board_id", :null => false - t.integer "parent_id" - t.string "subject", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "replies_count", :default => 0, :null => false - t.integer "last_reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "reply_id" - t.integer "quotes" - t.integer "status", :default => 0 - end - - add_index "messages", ["author_id"], :name => "index_messages_on_author_id" - add_index "messages", ["board_id"], :name => "messages_board_id" - add_index "messages", ["created_on"], :name => "index_messages_on_created_on" - add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" - add_index "messages", ["parent_id"], :name => "messages_parent_id" - - create_table "news", :force => true do |t| - t.integer "project_id" - t.string "title", :limit => 60, :default => "", :null => false - t.string "summary", :default => "" - t.text "description" - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.integer "comments_count", :default => 0, :null => false - t.integer "course_id" - t.integer "sticky", :default => 0 - t.integer "org_subfield_id" - end - - add_index "news", ["author_id"], :name => "index_news_on_author_id" - add_index "news", ["created_on"], :name => "index_news_on_created_on" - add_index "news", ["project_id"], :name => "news_project_id" - - create_table "no_uses", :force => true do |t| - t.integer "user_id", :null => false - t.string "no_use_type" - t.integer "no_use_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "notificationcomments", :force => true do |t| - t.string "notificationcommented_type" - t.integer "notificationcommented_id" - t.integer "author_id" - t.text "notificationcomments" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "onclick_times", :force => true do |t| - t.integer "user_id" - t.datetime "onclick_time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "open_id_authentication_associations", :force => true do |t| - t.integer "issued" - t.integer "lifetime" - t.string "handle" - t.string "assoc_type" - t.binary "server_url" - t.binary "secret" - end - - create_table "open_id_authentication_nonces", :force => true do |t| - t.integer "timestamp", :null => false - t.string "server_url" - t.string "salt", :null => false - end - - create_table "open_source_projects", :force => true do |t| - t.string "name" - t.text "description" - t.integer "commit_count", :default => 0 - t.integer "code_line", :default => 0 - t.integer "users_count", :default => 0 - t.date "last_commit_time" - t.string "url" - t.date "date_collected" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "option_numbers", :force => true do |t| - t.integer "user_id" - t.integer "memo" - t.integer "messages_for_issues" - t.integer "issues_status" - t.integer "replay_for_message" - t.integer "replay_for_memo" - t.integer "follow" - t.integer "tread" - t.integer "praise_by_one" - t.integer "praise_by_two" - t.integer "praise_by_three" - t.integer "tread_by_one" - t.integer "tread_by_two" - t.integer "tread_by_three" - t.integer "changeset" - t.integer "document" - t.integer "attachment" - t.integer "issue_done_ratio" - t.integer "post_issue" - t.integer "score_type" - t.integer "total_score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - end - - create_table "org_activities", :force => true do |t| - t.integer "user_id" - t.integer "org_act_id" - t.string "org_act_type" - t.integer "container_id" - t.string "container_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_courses", :force => true do |t| - t.integer "organization_id" - t.integer "course_id" - t.datetime "created_at" - end - - create_table "org_document_comments", :force => true do |t| - t.text "title" - t.text "content" - t.integer "organization_id" - t.integer "creator_id" - t.integer "parent_id" - t.integer "reply_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "org_subfield_id" - end - - create_table "org_member_roles", :force => true do |t| - t.integer "org_member_id" - t.integer "role_id" - end - - create_table "org_members", :force => true do |t| - t.integer "user_id" - t.integer "organization_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_messages", :force => true do |t| - t.integer "user_id" - t.integer "sender_id" - t.integer "organization_id" - t.string "message_type" - t.integer "message_id" - t.integer "viewed" - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "status", :default => 0 - end - - create_table "org_projects", :force => true do |t| - t.integer "organization_id" - t.integer "project_id" - t.datetime "created_at" - end - - create_table "org_subfield_messages", :force => true do |t| - t.integer "org_subfield_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_subfields", :force => true do |t| - t.integer "organization_id" - t.integer "priority" - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "field_type" - t.integer "hide", :default => 0 - end - - create_table "organizations", :force => true do |t| - t.string "name" - t.text "description" - t.integer "creator_id" - t.integer "home_id" - t.boolean "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "allow_guest_download", :default => true - t.integer "visits", :default => 0 - end - - create_table "phone_app_versions", :force => true do |t| - t.string "version" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_answers", :force => true do |t| - t.integer "poll_question_id" - t.text "answer_text" - t.integer "answer_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_questions", :force => true do |t| - t.string "question_title" - t.integer "question_type" - t.integer "is_necessary" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_number" - end - - create_table "poll_users", :force => true do |t| - t.integer "user_id" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_votes", :force => true do |t| - t.integer "user_id" - t.integer "poll_question_id" - t.integer "poll_answer_id" - t.text "vote_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "polls", :force => true do |t| - t.string "polls_name" - t.string "polls_type" - t.integer "polls_group_id" - t.integer "polls_status" - t.integer "user_id" - t.datetime "published_at" - t.datetime "closed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "polls_description" - t.integer "show_result", :default => 1 - end - - create_table "praise_tread_caches", :force => true do |t| - t.integer "object_id", :null => false - t.string "object_type" - t.integer "praise_num" - t.integer "tread_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "praise_treads", :force => true do |t| - t.integer "user_id", :null => false - t.integer "praise_tread_object_id" - t.string "praise_tread_object_type" - t.integer "praise_or_tread" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "principal_activities", :force => true do |t| - t.integer "user_id" - t.integer "principal_id" - t.integer "principal_act_id" - t.string "principal_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_infos", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_scores", :force => true do |t| - t.string "project_id" - t.integer "score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "issue_num", :default => 0 - t.integer "issue_journal_num", :default => 0 - t.integer "news_num", :default => 0 - t.integer "documents_num", :default => 0 - t.integer "changeset_num", :default => 0 - t.integer "board_message_num", :default => 0 - t.integer "board_num", :default => 0 - t.integer "attach_num", :default => 0 - t.datetime "commit_time" - end - - create_table "project_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "project_id" - t.integer "project_type" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - end - - add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" - - create_table "projecting_softapplictions", :force => true do |t| - t.integer "user_id" - t.integer "softapplication_id" - t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "projects", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - t.string "homepage", :default => "" - t.boolean "is_public", :default => true, :null => false - t.integer "parent_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "identifier" - t.integer "status", :default => 1, :null => false - t.integer "lft" - t.integer "rgt" - t.boolean "inherit_members", :default => false, :null => false - t.integer "project_type" - t.boolean "hidden_repo", :default => false, :null => false - t.integer "attachmenttype", :default => 1 - t.integer "user_id" - t.integer "dts_test", :default => 0 - t.string "enterprise_name" - t.integer "organization_id" - t.integer "project_new_type" - t.integer "gpid" - t.integer "forked_from_project_id" - t.integer "forked_count" - t.integer "commits_count", :default => 0 - t.integer "publish_resource", :default => 0 - t.integer "issues_count", :default => 0 - t.integer "attachments_count", :default => 0 - t.integer "boards_count", :default => 0 - t.integer "news_count", :default => 0 - t.integer "acts_count", :default => 0 - t.integer "journals_count", :default => 0 - t.integer "boards_reply_count", :default => 0 - t.integer "visits", :default => 0 - end - - add_index "projects", ["lft"], :name => "index_projects_on_lft" - add_index "projects", ["rgt"], :name => "index_projects_on_rgt" - - create_table "projects_trackers", :id => false, :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true - add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" - - create_table "queries", :force => true do |t| - t.integer "project_id" - t.string "name", :default => "", :null => false - t.text "filters" - t.integer "user_id", :default => 0, :null => false - t.boolean "is_public", :default => false, :null => false - t.text "column_names" - t.text "sort_criteria" - t.string "group_by" - t.string "type" - end - - add_index "queries", ["project_id"], :name => "index_queries_on_project_id" - add_index "queries", ["user_id"], :name => "index_queries_on_user_id" - - create_table "relative_memo_to_open_source_projects", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "relative_memos", :force => true do |t| - t.integer "osp_id" - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :limit => 16777215, :null => false - t.integer "author_id" - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.boolean "is_quote", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count_crawl", :default => 0 - t.integer "viewed_count_local", :default => 0 - t.string "url" - t.string "username" - t.string "userhomeurl" - t.date "date_collected" - t.string "topic_resource" - end - - create_table "repositories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "url", :default => "", :null => false - t.string "login", :limit => 60, :default => "" - t.string "password", :default => "" - t.string "root_url", :default => "" - t.string "type" - t.string "path_encoding", :limit => 64 - t.string "log_encoding", :limit => 64 - t.text "extra_info" - t.string "identifier" - t.boolean "is_default", :default => false - t.boolean "hidden", :default => false - end - - add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" - - create_table "rich_rich_files", :force => true do |t| - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "rich_file_file_name" - t.string "rich_file_content_type" - t.integer "rich_file_file_size" - t.datetime "rich_file_updated_at" - t.string "owner_type" - t.integer "owner_id" - t.text "uri_cache" - t.string "simplified_type", :default => "file" - end - - create_table "roles", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "assignable", :default => true - t.integer "builtin", :default => 0, :null => false - t.text "permissions" - t.string "issues_visibility", :limit => 30, :default => "default", :null => false - end - - create_table "schools", :force => true do |t| - t.string "name" - t.string "province" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "logo_link" - t.string "pinyin" - end - - create_table "secdomains", :force => true do |t| - t.integer "sub_type" - t.string "subname" - t.integer "pid", :default => 0 - t.string "desc" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "seems_rateable_cached_ratings", :force => true do |t| - t.integer "cacheable_id", :limit => 8 - t.string "cacheable_type" - t.float "avg", :null => false - t.integer "cnt", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "seems_rateable_rates", :force => true do |t| - t.integer "rater_id", :limit => 8 - t.integer "rateable_id" - t.string "rateable_type" - t.float "stars", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "is_teacher_score", :default => 0 - end - - create_table "settings", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "value" - t.datetime "updated_on" - end - - add_index "settings", ["name"], :name => "index_settings_on_name" - - create_table "shares", :force => true do |t| - t.date "created_on" - t.string "url" - t.string "title" - t.integer "share_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - t.integer "user_id" - t.string "description" - end - - create_table "shield_activities", :force => true do |t| - t.string "container_type" - t.integer "container_id" - t.string "shield_type" - t.integer "shield_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "softapplications", :force => true do |t| - t.string "name" - t.text "description" - t.integer "app_type_id" - t.string "app_type_name" - t.string "android_min_version_available" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "contest_id" - t.integer "softapplication_id" - t.integer "is_public" - t.string "application_developers" - t.string "deposit_project_url" - t.string "deposit_project" - t.integer "project_id" - end - - create_table "student_work_projects", :force => true do |t| - t.integer "homework_common_id" - t.integer "student_work_id" - t.integer "project_id" - t.integer "user_id" - t.integer "is_leader" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "student_work_projects", ["homework_common_id"], :name => "index_student_work_projects_on_homework_common_id" - add_index "student_work_projects", ["project_id"], :name => "index_student_work_projects_on_project_id" - add_index "student_work_projects", ["student_work_id"], :name => "index_student_work_projects_on_student_work_id" - add_index "student_work_projects", ["user_id"], :name => "index_student_work_projects_on_user_id" - - create_table "student_work_tests", :force => true do |t| - t.integer "student_work_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "status", :default => 9 - t.text "results" - t.text "src" - end - - create_table "student_works", :force => true do |t| - t.string "name" - t.text "description", :limit => 2147483647 - t.integer "homework_common_id" - t.integer "user_id" - t.float "final_score" - t.float "teacher_score" - t.float "student_score" - t.float "teaching_asistant_score" - t.integer "project_id", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "late_penalty", :default => 0 - t.integer "absence_penalty", :default => 0 - t.float "system_score", :default => 0.0 - t.boolean "is_test", :default => false - end - - add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id" - - create_table "student_works_evaluation_distributions", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "student_works_scores", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.integer "score" - t.text "comment" - t.integer "reviewer_role" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "students_for_courses", :force => true do |t| - t.integer "student_id" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" - add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" - - create_table "subfield_subdomain_dirs", :force => true do |t| - t.integer "org_subfield_id" - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "system_messages", :force => true do |t| - t.integer "user_id" - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "description" - t.string "subject" - end - - create_table "taggings", :force => true do |t| - t.integer "tag_id" - t.integer "taggable_id" - t.string "taggable_type" - t.integer "tagger_id" - t.string "tagger_type" - t.string "context", :limit => 128 - t.datetime "created_at" - end - - add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" - add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" - add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" - - create_table "tags", :force => true do |t| - t.string "name" - end - - create_table "teachers", :force => true do |t| - t.string "tea_name" - t.string "location" - t.integer "couurse_time" - t.integer "course_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "extra" - end - - create_table "time_entries", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - t.integer "issue_id" - t.float "hours", :null => false - t.string "comments" - t.integer "activity_id", :null => false - t.date "spent_on", :null => false - t.integer "tyear", :null => false - t.integer "tmonth", :null => false - t.integer "tweek", :null => false - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" - add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" - add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" - add_index "time_entries", ["project_id"], :name => "time_entries_project_id" - add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" - - create_table "tokens", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.string "action", :limit => 30, :default => "", :null => false - t.string "value", :limit => 40, :default => "", :null => false - t.datetime "created_on", :null => false - end - - add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" - add_index "tokens", ["value"], :name => "tokens_value", :unique => true - - create_table "trackers", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_in_chlog", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "is_in_roadmap", :default => true, :null => false - t.integer "fields_bits", :default => 0 - end - - create_table "user_actions", :force => true do |t| - t.integer "user_id" - t.string "action_type" - t.integer "action_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_activities", :force => true do |t| - t.string "act_type" - t.integer "act_id" - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "user_id" - end - - create_table "user_extensions", :force => true do |t| - t.integer "user_id", :null => false - t.date "birthday" - t.string "brief_introduction" - t.integer "gender" - t.string "location" - t.string "occupation" - t.integer "work_experience" - t.integer "zip_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "technical_title" - t.integer "identity" - t.string "student_id" - t.string "teacher_realname" - t.string "student_realname" - t.string "location_city" - t.integer "school_id" - t.string "description", :default => "" - end - - create_table "user_feedback_messages", :force => true do |t| - t.integer "user_id" - t.integer "journals_for_message_id" - t.string "journals_for_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_grades", :force => true do |t| - t.integer "user_id", :null => false - t.integer "project_id", :null => false - t.float "grade", :default => 0.0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" - add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" - add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" - - create_table "user_levels", :force => true do |t| - t.integer "user_id" - t.integer "level" - end - - create_table "user_preferences", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.text "others" - t.boolean "hide_mail", :default => false - t.string "time_zone" - end - - add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" - - create_table "user_score_details", :force => true do |t| - t.integer "current_user_id" - t.integer "target_user_id" - t.string "score_type" - t.string "score_action" - t.integer "user_id" - t.integer "old_score" - t.integer "new_score" - t.integer "current_user_level" - t.integer "target_user_level" - t.integer "score_changeable_obj_id" - t.string "score_changeable_obj_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_scores", :force => true do |t| - t.integer "user_id", :null => false - t.integer "collaboration" - t.integer "influence" - t.integer "skill" - t.integer "active" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "grade", :default => 0.0 - end - - add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" - add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" - add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" - - create_table "user_wechats", :force => true do |t| - t.integer "subscribe" - t.string "openid" - t.string "nickname" - t.integer "sex" - t.string "language" - t.string "city" - t.string "province" - t.string "country" - t.string "headimgurl" - t.string "subscribe_time" - t.string "unionid" - t.string "remark" - t.integer "groupid" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "users", :force => true do |t| - t.string "login", :default => "", :null => false - t.string "hashed_password", :limit => 40, :default => "", :null => false - t.string "firstname", :limit => 30, :default => "", :null => false - t.string "lastname", :default => "", :null => false - t.string "mail", :limit => 60, :default => "", :null => false - t.boolean "admin", :default => false, :null => false - t.integer "status", :default => 1, :null => false - t.datetime "last_login_on" - t.string "language", :limit => 5, :default => "" - t.integer "auth_source_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "type" - t.string "identity_url" - t.string "mail_notification", :default => "", :null => false - t.string "salt", :limit => 64 - t.integer "gid" - t.integer "visits", :default => 0 - end - - add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" - add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" - add_index "users", ["type"], :name => "index_users_on_type" - - create_table "versions", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :default => "", :null => false - t.string "description", :default => "" - t.date "effective_date" - t.datetime "created_on" - t.datetime "updated_on" - t.string "wiki_page_title" - t.string "status", :default => "open" - t.string "sharing", :default => "none", :null => false - end - - add_index "versions", ["project_id"], :name => "versions_project_id" - add_index "versions", ["sharing"], :name => "index_versions_on_sharing" - - create_table "visitors", :force => true do |t| - t.integer "user_id" - t.integer "master_id" - t.datetime "updated_on" - t.datetime "created_on" - end - - add_index "visitors", ["master_id"], :name => "index_visitors_master_id" - add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" - add_index "visitors", ["user_id"], :name => "index_visitors_user_id" - - create_table "watchers", :force => true do |t| - t.string "watchable_type", :default => "", :null => false - t.integer "watchable_id", :default => 0, :null => false - t.integer "user_id" - end - - add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" - add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" - add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" - - create_table "web_footer_companies", :force => true do |t| - t.string "name" - t.string "logo_size" - t.string "url" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "web_footer_oranizers", :force => true do |t| - t.string "name" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "wechat_logs", :force => true do |t| - t.string "openid", :null => false - t.text "request_raw" - t.text "response_raw" - t.text "session_raw" - t.datetime "created_at", :null => false - end - - create_table "wiki_content_versions", :force => true do |t| - t.integer "wiki_content_id", :null => false - t.integer "page_id", :null => false - t.integer "author_id" - t.binary "data", :limit => 2147483647 - t.string "compression", :limit => 6, :default => "" - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" - add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" - - create_table "wiki_contents", :force => true do |t| - t.integer "page_id", :null => false - t.integer "author_id" - t.text "text", :limit => 2147483647 - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" - add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" - - create_table "wiki_pages", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title", :null => false - t.datetime "created_on", :null => false - t.boolean "protected", :default => false, :null => false - t.integer "parent_id" - end - - add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" - add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" - add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" - - create_table "wiki_redirects", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title" - t.string "redirects_to" - t.datetime "created_on", :null => false - end - - add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" - add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" - - create_table "wikis", :force => true do |t| - t.integer "project_id", :null => false - t.string "start_page", :null => false - t.integer "status", :default => 1, :null => false - end - - add_index "wikis", ["project_id"], :name => "wikis_project_id" - - create_table "workflows", :force => true do |t| - t.integer "tracker_id", :default => 0, :null => false - t.integer "old_status_id", :default => 0, :null => false - t.integer "new_status_id", :default => 0, :null => false - t.integer "role_id", :default => 0, :null => false - t.boolean "assignee", :default => false, :null => false - t.boolean "author", :default => false, :null => false - t.string "type", :limit => 30 - t.string "field_name", :limit => 30 - t.string "rule", :limit => 30 - end - - add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" - add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" - add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" - add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" - - create_table "works_categories", :force => true do |t| - t.string "category" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "zip_packs", :force => true do |t| - t.integer "user_id" - t.integer "homework_id" - t.string "file_digest" - t.string "file_path" - t.integer "pack_times", :default => 1 - t.integer "pack_size", :default => 0 - t.text "file_digests" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - -end +# encoding: UTF-8 +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended to check this file into your version control system. + +ActiveRecord::Schema.define(:version => 20160317090350) do + + create_table "activities", :force => true do |t| + t.integer "act_id", :null => false + t.string "act_type", :null => false + t.integer "user_id", :null => false + t.integer "activity_container_id" + t.string "activity_container_type", :default => "" + t.datetime "created_at" + end + + add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" + add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" + add_index "activities", ["user_id"], :name => "index_activities_on_user_id" + + create_table "activity_notifies", :force => true do |t| + t.integer "activity_container_id" + t.string "activity_container_type" + t.integer "activity_id" + t.string "activity_type" + t.integer "notify_to" + t.datetime "created_on" + t.integer "is_read" + end + + add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" + add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" + add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" + + create_table "api_keys", :force => true do |t| + t.string "access_token" + t.datetime "expires_at" + t.integer "user_id" + t.boolean "active", :default => true + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" + add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" + + create_table "applied_projects", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + end + + create_table "apply_project_masters", :force => true do |t| + t.integer "user_id" + t.string "apply_type" + t.integer "apply_id" + t.integer "status" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "at_messages", :force => true do |t| + t.integer "user_id" + t.integer "at_message_id" + t.string "at_message_type" + t.boolean "viewed", :default => false + t.string "container_type" + t.integer "container_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sender_id" + end + + add_index "at_messages", ["user_id"], :name => "index_at_messages_on_user_id" + + create_table "attachment_histories", :force => true do |t| + t.integer "container_id" + t.string "container_type" + t.string "filename", :default => "" + t.string "disk_filename", :default => "" + t.integer "filesize", :default => 0 + t.string "content_type", :default => "" + t.string "digest", :limit => 40, :default => "" + t.integer "downloads", :default => 0 + t.integer "author_id" + t.datetime "created_on" + t.string "description" + t.string "disk_directory" + t.integer "attachtype" + t.integer "is_public" + t.integer "copy_from" + t.integer "quotes" + t.integer "version" + t.integer "attachment_id" + t.integer "is_publish", :default => 1 + t.date "publish_time" + end + + create_table "attachments", :force => true do |t| + t.integer "container_id" + t.string "container_type", :limit => 30 + t.string "filename", :default => "", :null => false + t.string "disk_filename", :default => "", :null => false + t.integer "filesize", :default => 0, :null => false + t.string "content_type", :default => "" + t.string "digest", :limit => 40, :default => "", :null => false + t.integer "downloads", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false + t.datetime "created_on" + t.string "description" + t.string "disk_directory" + t.integer "attachtype", :default => 1 + t.integer "is_public", :default => 1 + t.integer "copy_from" + t.integer "quotes" + t.integer "is_publish", :default => 1 + t.date "publish_time" + end + + add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" + add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" + add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" + + create_table "attachmentstypes", :force => true do |t| + t.integer "typeId", :null => false + t.string "typeName", :limit => 50 + end + + create_table "auth_sources", :force => true do |t| + t.string "type", :limit => 30, :default => "", :null => false + t.string "name", :limit => 60, :default => "", :null => false + t.string "host", :limit => 60 + t.integer "port" + t.string "account" + t.string "account_password", :default => "" + t.string "base_dn" + t.string "attr_login", :limit => 30 + t.string "attr_firstname", :limit => 30 + t.string "attr_lastname", :limit => 30 + t.string "attr_mail", :limit => 30 + t.boolean "onthefly_register", :default => false, :null => false + t.boolean "tls", :default => false, :null => false + t.string "filter" + t.integer "timeout" + end + + add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" + + create_table "biding_projects", :force => true do |t| + t.integer "project_id" + t.integer "bid_id" + t.integer "user_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + end + + create_table "bids", :force => true do |t| + t.string "name" + t.string "budget", :null => false + t.integer "author_id" + t.date "deadline" + t.text "description" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.integer "commit" + t.integer "reward_type" + t.integer "homework_type" + t.integer "parent_id" + t.string "password" + t.integer "is_evaluation" + t.integer "proportion", :default => 60 + t.integer "comment_status", :default => 0 + t.integer "evaluation_num", :default => 3 + t.integer "open_anonymous_evaluation", :default => 1 + end + + create_table "blog_comments", :force => true do |t| + t.integer "blog_id", :null => false + t.integer "parent_id" + t.string "title", :default => "", :null => false + t.text "content" + t.integer "author_id" + t.integer "comments_count", :default => 0, :null => false + t.integer "last_comment_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.boolean "locked", :default => false + t.integer "sticky", :default => 0 + t.integer "reply_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "blogs", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "description" + t.integer "position", :default => 1 + t.integer "article_count", :default => 0, :null => false + t.integer "comments_count", :default => 0, :null => false + t.integer "last_comments_id" + t.integer "parent_id" + t.integer "author_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "homepage_id" + end + + create_table "boards", :force => true do |t| + t.integer "project_id", :null => false + t.string "name", :default => "", :null => false + t.string "description" + t.integer "position", :default => 1 + t.integer "topics_count", :default => 0, :null => false + t.integer "messages_count", :default => 0, :null => false + t.integer "last_message_id" + t.integer "parent_id" + t.integer "course_id" + t.integer "org_subfield_id" + end + + add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" + add_index "boards", ["project_id"], :name => "boards_project_id" + + create_table "bug_to_osps", :force => true do |t| + t.integer "osp_id" + t.integer "relative_memo_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "changes", :force => true do |t| + t.integer "changeset_id", :null => false + t.string "action", :limit => 1, :default => "", :null => false + t.text "path", :null => false + t.text "from_path" + t.string "from_revision" + t.string "revision" + t.string "branch" + end + + add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" + + create_table "changeset_parents", :id => false, :force => true do |t| + t.integer "changeset_id", :null => false + t.integer "parent_id", :null => false + end + + add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" + add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" + + create_table "changesets", :force => true do |t| + t.integer "repository_id", :null => false + t.string "revision", :null => false + t.string "committer" + t.datetime "committed_on", :null => false + t.text "comments" + t.date "commit_date" + t.string "scmid" + t.integer "user_id" + end + + add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" + add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true + add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" + add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" + add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" + + create_table "changesets_issues", :id => false, :force => true do |t| + t.integer "changeset_id", :null => false + t.integer "issue_id", :null => false + end + + add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true + + create_table "code_review_assignments", :force => true do |t| + t.integer "issue_id" + t.integer "change_id" + t.integer "attachment_id" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.string "action_type" + t.integer "changeset_id" + end + + create_table "code_review_project_settings", :force => true do |t| + t.integer "project_id" + t.integer "tracker_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "updated_by" + t.boolean "hide_code_review_tab", :default => false + t.integer "auto_relation", :default => 1 + t.integer "assignment_tracker_id" + t.text "auto_assign" + t.integer "lock_version", :default => 0, :null => false + t.boolean "tracker_in_review_dialog", :default => false + end + + create_table "code_review_user_settings", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.integer "mail_notification", :default => 0, :null => false + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "code_reviews", :force => true do |t| + t.integer "project_id" + t.integer "change_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "line" + t.integer "updated_by_id" + t.integer "lock_version", :default => 0, :null => false + t.integer "status_changed_from" + t.integer "status_changed_to" + t.integer "issue_id" + t.string "action_type" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.integer "attachment_id" + t.integer "file_count", :default => 0, :null => false + t.boolean "diff_all" + end + + create_table "comments", :force => true do |t| + t.string "commented_type", :limit => 30, :default => "", :null => false + t.integer "commented_id", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false + t.text "comments" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + add_index "comments", ["author_id"], :name => "index_comments_on_author_id" + add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" + + create_table "contest_notifications", :force => true do |t| + t.text "title" + t.text "content" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "contesting_projects", :force => true do |t| + t.integer "project_id" + t.string "contest_id" + t.integer "user_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + end + + create_table "contesting_softapplications", :force => true do |t| + t.integer "softapplication_id" + t.integer "contest_id" + t.integer "user_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + end + + create_table "contestnotifications", :force => true do |t| + t.integer "contest_id" + t.string "title" + t.string "summary" + t.text "description" + t.integer "author_id" + t.integer "notificationcomments_count" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "contests", :force => true do |t| + t.string "name" + t.string "budget", :default => "" + t.integer "author_id" + t.date "deadline" + t.string "description" + t.integer "commit" + t.string "password" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + create_table "course_activities", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "course_act_id" + t.string "course_act_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_attachments", :force => true do |t| + t.string "filename" + t.string "disk_filename" + t.integer "filesize" + t.string "content_type" + t.string "digest" + t.integer "downloads" + t.string "author_id" + t.string "integer" + t.string "description" + t.string "disk_directory" + t.integer "attachtype" + t.integer "is_public" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "container_id", :default => 0 + end + + create_table "course_contributor_scores", :force => true do |t| + t.integer "course_id" + t.integer "user_id" + t.integer "message_num" + t.integer "message_reply_num" + t.integer "news_reply_num" + t.integer "resource_num" + t.integer "journal_num" + t.integer "journal_reply_num" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "total_score" + t.integer "homework_journal_num", :default => 0 + t.integer "news_num", :default => 0 + end + + create_table "course_groups", :force => true do |t| + t.string "name" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_infos", :force => true do |t| + t.integer "course_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_messages", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "course_message_id" + t.string "course_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "content" + t.integer "status" + end + + create_table "course_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "course_id" + t.float "grade", :default => 0.0 + t.integer "course_ac_para", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "courses", :force => true do |t| + t.integer "tea_id" + t.string "name" + t.integer "state" + t.string "code" + t.integer "time" + t.string "extra" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "location" + t.string "term" + t.string "string" + t.string "password" + t.string "setup_time" + t.string "endup_time" + t.string "class_period" + t.integer "school_id" + t.text "description" + t.integer "status", :default => 1 + t.integer "attachmenttype", :default => 2 + t.integer "lft" + t.integer "rgt" + t.integer "is_public", :limit => 1, :default => 1 + t.integer "inherit_members", :limit => 1, :default => 1 + t.integer "open_student", :default => 0 + t.integer "outline", :default => 0 + t.integer "publish_resource", :default => 0 + t.integer "is_delete", :default => 0 + t.integer "end_time" + t.string "end_term" + t.integer "is_excellent", :default => 0 + t.integer "excellent_option", :default => 0 + t.integer "is_copy", :default => 0 + t.integer "visits", :default => 0 + end + + create_table "custom_fields", :force => true do |t| + t.string "type", :limit => 30, :default => "", :null => false + t.string "name", :limit => 30, :default => "", :null => false + t.string "field_format", :limit => 30, :default => "", :null => false + t.text "possible_values" + t.string "regexp", :default => "" + t.integer "min_length", :default => 0, :null => false + t.integer "max_length", :default => 0, :null => false + t.boolean "is_required", :default => false, :null => false + t.boolean "is_for_all", :default => false, :null => false + t.boolean "is_filter", :default => false, :null => false + t.integer "position", :default => 1 + t.boolean "searchable", :default => false + t.text "default_value" + t.boolean "editable", :default => true + t.boolean "visible", :default => true, :null => false + t.boolean "multiple", :default => false + end + + add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" + + create_table "custom_fields_projects", :id => false, :force => true do |t| + t.integer "custom_field_id", :default => 0, :null => false + t.integer "project_id", :default => 0, :null => false + end + + add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true + + create_table "custom_fields_trackers", :id => false, :force => true do |t| + t.integer "custom_field_id", :default => 0, :null => false + t.integer "tracker_id", :default => 0, :null => false + end + + add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true + + create_table "custom_values", :force => true do |t| + t.string "customized_type", :limit => 30, :default => "", :null => false + t.integer "customized_id", :default => 0, :null => false + t.integer "custom_field_id", :default => 0, :null => false + t.text "value" + end + + add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" + add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" + + create_table "delayed_jobs", :force => true do |t| + t.integer "priority", :default => 0, :null => false + t.integer "attempts", :default => 0, :null => false + t.text "handler", :null => false + t.text "last_error" + t.datetime "run_at" + t.datetime "locked_at" + t.datetime "failed_at" + t.string "locked_by" + t.string "queue" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" + + create_table "discuss_demos", :force => true do |t| + t.string "title" + t.text "body" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "documents", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.integer "category_id", :default => 0, :null => false + t.string "title", :limit => 60, :default => "", :null => false + t.text "description" + t.datetime "created_on" + t.integer "user_id", :default => 0 + t.integer "is_public", :default => 1 + end + + add_index "documents", ["category_id"], :name => "index_documents_on_category_id" + add_index "documents", ["created_on"], :name => "index_documents_on_created_on" + add_index "documents", ["project_id"], :name => "documents_project_id" + + create_table "dts", :primary_key => "Num", :force => true do |t| + t.string "Defect", :limit => 50 + t.string "Category", :limit => 50 + t.string "File" + t.string "Method" + t.string "Module", :limit => 20 + t.string "Variable", :limit => 50 + t.integer "StartLine" + t.integer "IPLine" + t.string "IPLineCode", :limit => 200 + t.string "Judge", :limit => 15 + t.integer "Review", :limit => 1 + t.string "Description" + t.text "PreConditions", :limit => 2147483647 + t.text "TraceInfo", :limit => 2147483647 + t.text "Code", :limit => 2147483647 + t.integer "project_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "id", :null => false + end + + create_table "editor_of_documents", :force => true do |t| + t.integer "editor_id" + t.integer "org_document_comment_id" + t.datetime "created_at" + end + + create_table "enabled_modules", :force => true do |t| + t.integer "project_id" + t.string "name", :null => false + t.integer "course_id" + end + + add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" + + create_table "enumerations", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "is_default", :default => false, :null => false + t.string "type" + t.boolean "active", :default => true, :null => false + t.integer "project_id" + t.integer "parent_id" + t.string "position_name", :limit => 30 + end + + add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" + add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" + + create_table "exercise_answers", :force => true do |t| + t.integer "user_id" + t.integer "exercise_question_id" + t.integer "exercise_choice_id" + t.text "answer_text" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "exercise_choices", :force => true do |t| + t.integer "exercise_question_id" + t.text "choice_text" + t.integer "choice_position" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "exercise_questions", :force => true do |t| + t.text "question_title" + t.integer "question_type" + t.integer "question_number" + t.integer "exercise_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "question_score" + end + + create_table "exercise_standard_answers", :force => true do |t| + t.integer "exercise_question_id" + t.integer "exercise_choice_id" + t.text "answer_text" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "exercise_users", :force => true do |t| + t.integer "user_id" + t.integer "exercise_id" + t.integer "score" + t.datetime "start_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.datetime "end_at" + t.integer "status" + end + + create_table "exercises", :force => true do |t| + t.text "exercise_name" + t.text "exercise_description" + t.integer "course_id" + t.integer "exercise_status" + t.integer "user_id" + t.integer "time" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.datetime "publish_time" + t.datetime "end_time" + t.integer "show_result" + end + + create_table "first_pages", :force => true do |t| + t.string "web_title" + t.string "title" + t.text "description" + t.string "page_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sort_type" + t.integer "image_width", :default => 107 + t.integer "image_height", :default => 63 + t.integer "show_course", :default => 1 + t.integer "show_contest", :default => 1 + end + + create_table "forge_activities", :force => true do |t| + t.integer "user_id" + t.integer "project_id" + t.integer "forge_act_id" + t.string "forge_act_type" + t.integer "org_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" + + create_table "forge_messages", :force => true do |t| + t.integer "user_id" + t.integer "project_id" + t.integer "forge_message_id" + t.string "forge_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "secret_key" + t.integer "status" + end + + create_table "forums", :force => true do |t| + t.string "name", :null => false + t.text "description" + t.integer "topic_count", :default => 0 + t.integer "memo_count", :default => 0 + t.integer "last_memo_id", :default => 0 + t.integer "creator_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sticky" + t.integer "locked" + end + + create_table "forwards", :force => true do |t| + t.integer "from_id" + t.string "from_type" + t.integer "to_id" + t.string "to_type" + t.datetime "created_at" + end + + create_table "groups_users", :id => false, :force => true do |t| + t.integer "group_id", :null => false + t.integer "user_id", :null => false + end + + add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true + + create_table "homework_attaches", :force => true do |t| + t.integer "bid_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + t.string "name" + t.text "description" + t.integer "state" + t.integer "project_id", :default => 0 + t.float "score", :default => 0.0 + t.integer "is_teacher_score", :default => 0 + end + + add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" + + create_table "homework_commons", :force => true do |t| + t.string "name" + t.integer "user_id" + t.text "description" + t.date "publish_time" + t.date "end_time" + t.integer "homework_type", :default => 1 + t.string "late_penalty" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "teacher_priority", :default => 1 + t.integer "anonymous_comment", :default => 0 + t.integer "quotes", :default => 0 + t.integer "is_open", :default => 0 + end + + add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id" + + create_table "homework_detail_groups", :force => true do |t| + t.integer "homework_common_id" + t.integer "min_num" + t.integer "max_num" + t.integer "base_on_project" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "homework_detail_groups", ["homework_common_id"], :name => "index_homework_detail_groups_on_homework_common_id" + + create_table "homework_detail_manuals", :force => true do |t| + t.float "ta_proportion" + t.integer "comment_status" + t.date "evaluation_start" + t.date "evaluation_end" + t.integer "evaluation_num" + t.integer "absence_penalty", :default => 1 + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "homework_detail_programings", :force => true do |t| + t.string "language" + t.text "standard_code", :limit => 2147483647 + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "ta_proportion", :default => 0.1 + t.integer "question_id" + end + + create_table "homework_evaluations", :force => true do |t| + t.string "user_id" + t.string "homework_attach_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "homework_for_courses", :force => true do |t| + t.integer "course_id" + t.integer "bid_id" + end + + add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id" + add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id" + + create_table "homework_tests", :force => true do |t| + t.text "input" + t.text "output" + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "result" + t.text "error_msg" + end + + create_table "homework_users", :force => true do |t| + t.string "homework_attach_id" + t.string "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "invite_lists", :force => true do |t| + t.integer "project_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "mail" + end + + create_table "issue_categories", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "name", :limit => 30, :default => "", :null => false + t.integer "assigned_to_id" + end + + add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" + add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" + + create_table "issue_relations", :force => true do |t| + t.integer "issue_from_id", :null => false + t.integer "issue_to_id", :null => false + t.string "relation_type", :default => "", :null => false + t.integer "delay" + end + + add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true + add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" + add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" + + create_table "issue_statuses", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.boolean "is_closed", :default => false, :null => false + t.boolean "is_default", :default => false, :null => false + t.integer "position", :default => 1 + t.integer "default_done_ratio" + end + + add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" + add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" + add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" + + create_table "issues", :force => true do |t| + t.integer "tracker_id", :null => false + t.integer "project_id", :null => false + t.string "subject", :default => "", :null => false + t.text "description" + t.date "due_date" + t.integer "category_id" + t.integer "status_id", :null => false + t.integer "assigned_to_id" + t.integer "priority_id", :null => false + t.integer "fixed_version_id" + t.integer "author_id", :null => false + t.integer "lock_version", :default => 0, :null => false + t.datetime "created_on" + t.datetime "updated_on" + t.date "start_date" + t.integer "done_ratio", :default => 0, :null => false + t.float "estimated_hours" + t.integer "parent_id" + t.integer "root_id" + t.integer "lft" + t.integer "rgt" + t.boolean "is_private", :default => false, :null => false + t.datetime "closed_on" + t.integer "project_issues_index" + end + + add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" + add_index "issues", ["author_id"], :name => "index_issues_on_author_id" + add_index "issues", ["category_id"], :name => "index_issues_on_category_id" + add_index "issues", ["created_on"], :name => "index_issues_on_created_on" + add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" + add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" + add_index "issues", ["project_id"], :name => "issues_project_id" + add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" + add_index "issues", ["status_id"], :name => "index_issues_on_status_id" + add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" + + create_table "join_in_competitions", :force => true do |t| + t.integer "user_id" + t.integer "competition_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "join_in_contests", :force => true do |t| + t.integer "user_id" + t.integer "bid_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "journal_details", :force => true do |t| + t.integer "journal_id", :default => 0, :null => false + t.string "property", :limit => 30, :default => "", :null => false + t.string "prop_key", :limit => 30, :default => "", :null => false + t.text "old_value" + t.text "value" + end + + add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" + + create_table "journal_replies", :id => false, :force => true do |t| + t.integer "journal_id" + t.integer "user_id" + t.integer "reply_id" + end + + add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" + add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" + add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" + + create_table "journals", :force => true do |t| + t.integer "journalized_id", :default => 0, :null => false + t.string "journalized_type", :limit => 30, :default => "", :null => false + t.integer "user_id", :default => 0, :null => false + t.text "notes" + t.datetime "created_on", :null => false + t.boolean "private_notes", :default => false, :null => false + end + + add_index "journals", ["created_on"], :name => "index_journals_on_created_on" + add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" + add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" + add_index "journals", ["user_id"], :name => "index_journals_on_user_id" + + create_table "journals_for_messages", :force => true do |t| + t.integer "jour_id" + t.string "jour_type" + t.integer "user_id" + t.text "notes" + t.integer "status" + t.integer "reply_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.string "m_parent_id" + t.boolean "is_readed" + t.integer "m_reply_count" + t.integer "m_reply_id" + t.integer "is_comprehensive_evaluation" + t.integer "private", :default => 0 + end + + create_table "kindeditor_assets", :force => true do |t| + t.string "asset" + t.integer "file_size" + t.string "file_type" + t.integer "owner_id" + t.string "asset_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "owner_type", :default => 0 + end + + create_table "member_roles", :force => true do |t| + t.integer "member_id", :null => false + t.integer "role_id", :null => false + t.integer "inherited_from" + end + + add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" + add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" + + create_table "members", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.integer "project_id", :default => 0 + t.datetime "created_on" + t.boolean "mail_notification", :default => false, :null => false + t.integer "course_id", :default => -1 + t.integer "course_group_id", :default => 0 + end + + add_index "members", ["project_id"], :name => "index_members_on_project_id" + add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true + add_index "members", ["user_id"], :name => "index_members_on_user_id" + + create_table "memo_messages", :force => true do |t| + t.integer "user_id" + t.integer "forum_id" + t.integer "memo_id" + t.string "memo_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "memos", :force => true do |t| + t.integer "forum_id", :null => false + t.integer "parent_id" + t.string "subject", :null => false + t.text "content", :null => false + t.integer "author_id", :null => false + t.integer "replies_count", :default => 0 + t.integer "last_reply_id" + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count", :default => 0 + end + + create_table "message_alls", :force => true do |t| + t.integer "user_id" + t.integer "message_id" + t.string "message_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "messages", :force => true do |t| + t.integer "board_id", :null => false + t.integer "parent_id" + t.string "subject", :default => "", :null => false + t.text "content" + t.integer "author_id" + t.integer "replies_count", :default => 0, :null => false + t.integer "last_reply_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.boolean "locked", :default => false + t.integer "sticky", :default => 0 + t.integer "reply_id" + t.integer "quotes" + t.integer "status", :default => 0 + end + + add_index "messages", ["author_id"], :name => "index_messages_on_author_id" + add_index "messages", ["board_id"], :name => "messages_board_id" + add_index "messages", ["created_on"], :name => "index_messages_on_created_on" + add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" + add_index "messages", ["parent_id"], :name => "messages_parent_id" + + create_table "news", :force => true do |t| + t.integer "project_id" + t.string "title", :limit => 60, :default => "", :null => false + t.string "summary", :default => "" + t.text "description" + t.integer "author_id", :default => 0, :null => false + t.datetime "created_on" + t.integer "comments_count", :default => 0, :null => false + t.integer "course_id" + t.integer "sticky", :default => 0 + t.integer "org_subfield_id" + end + + add_index "news", ["author_id"], :name => "index_news_on_author_id" + add_index "news", ["created_on"], :name => "index_news_on_created_on" + add_index "news", ["project_id"], :name => "news_project_id" + + create_table "no_uses", :force => true do |t| + t.integer "user_id", :null => false + t.string "no_use_type" + t.integer "no_use_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "notificationcomments", :force => true do |t| + t.string "notificationcommented_type" + t.integer "notificationcommented_id" + t.integer "author_id" + t.text "notificationcomments" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "onclick_times", :force => true do |t| + t.integer "user_id" + t.datetime "onclick_time" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "open_id_authentication_associations", :force => true do |t| + t.integer "issued" + t.integer "lifetime" + t.string "handle" + t.string "assoc_type" + t.binary "server_url" + t.binary "secret" + end + + create_table "open_id_authentication_nonces", :force => true do |t| + t.integer "timestamp", :null => false + t.string "server_url" + t.string "salt", :null => false + end + + create_table "open_source_projects", :force => true do |t| + t.string "name" + t.text "description" + t.integer "commit_count", :default => 0 + t.integer "code_line", :default => 0 + t.integer "users_count", :default => 0 + t.date "last_commit_time" + t.string "url" + t.date "date_collected" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "option_numbers", :force => true do |t| + t.integer "user_id" + t.integer "memo" + t.integer "messages_for_issues" + t.integer "issues_status" + t.integer "replay_for_message" + t.integer "replay_for_memo" + t.integer "follow" + t.integer "tread" + t.integer "praise_by_one" + t.integer "praise_by_two" + t.integer "praise_by_three" + t.integer "tread_by_one" + t.integer "tread_by_two" + t.integer "tread_by_three" + t.integer "changeset" + t.integer "document" + t.integer "attachment" + t.integer "issue_done_ratio" + t.integer "post_issue" + t.integer "score_type" + t.integer "total_score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "project_id" + end + + create_table "org_activities", :force => true do |t| + t.integer "user_id" + t.integer "org_act_id" + t.string "org_act_type" + t.integer "container_id" + t.string "container_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "org_courses", :force => true do |t| + t.integer "organization_id" + t.integer "course_id" + t.datetime "created_at" + end + + create_table "org_document_comments", :force => true do |t| + t.text "title" + t.text "content" + t.integer "organization_id" + t.integer "creator_id" + t.integer "parent_id" + t.integer "reply_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.boolean "locked", :default => false + t.integer "sticky", :default => 0 + t.integer "org_subfield_id" + end + + create_table "org_member_roles", :force => true do |t| + t.integer "org_member_id" + t.integer "role_id" + end + + create_table "org_members", :force => true do |t| + t.integer "user_id" + t.integer "organization_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "org_messages", :force => true do |t| + t.integer "user_id" + t.integer "sender_id" + t.integer "organization_id" + t.string "message_type" + t.integer "message_id" + t.integer "viewed" + t.string "content" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "status", :default => 0 + end + + create_table "org_projects", :force => true do |t| + t.integer "organization_id" + t.integer "project_id" + t.datetime "created_at" + end + + create_table "org_subfield_messages", :force => true do |t| + t.integer "org_subfield_id" + t.integer "message_id" + t.string "message_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "org_subfields", :force => true do |t| + t.integer "organization_id" + t.integer "priority" + t.string "name" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "field_type" + t.integer "hide", :default => 0 + end + + create_table "organizations", :force => true do |t| + t.string "name" + t.text "description" + t.integer "creator_id" + t.integer "home_id" + t.boolean "is_public" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.boolean "allow_guest_download", :default => true + t.integer "visits", :default => 0 + end + + create_table "phone_app_versions", :force => true do |t| + t.string "version" + t.text "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_answers", :force => true do |t| + t.integer "poll_question_id" + t.text "answer_text" + t.integer "answer_position" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_questions", :force => true do |t| + t.string "question_title" + t.integer "question_type" + t.integer "is_necessary" + t.integer "poll_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "question_number" + end + + create_table "poll_users", :force => true do |t| + t.integer "user_id" + t.integer "poll_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_votes", :force => true do |t| + t.integer "user_id" + t.integer "poll_question_id" + t.integer "poll_answer_id" + t.text "vote_text" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "polls", :force => true do |t| + t.string "polls_name" + t.string "polls_type" + t.integer "polls_group_id" + t.integer "polls_status" + t.integer "user_id" + t.datetime "published_at" + t.datetime "closed_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "polls_description" + t.integer "show_result", :default => 1 + end + + create_table "praise_tread_caches", :force => true do |t| + t.integer "object_id", :null => false + t.string "object_type" + t.integer "praise_num" + t.integer "tread_num" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "praise_treads", :force => true do |t| + t.integer "user_id", :null => false + t.integer "praise_tread_object_id" + t.string "praise_tread_object_type" + t.integer "praise_or_tread" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "principal_activities", :force => true do |t| + t.integer "user_id" + t.integer "principal_id" + t.integer "principal_act_id" + t.string "principal_act_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "project_infos", :force => true do |t| + t.integer "project_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "project_scores", :force => true do |t| + t.string "project_id" + t.integer "score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "issue_num", :default => 0 + t.integer "issue_journal_num", :default => 0 + t.integer "news_num", :default => 0 + t.integer "documents_num", :default => 0 + t.integer "changeset_num", :default => 0 + t.integer "board_message_num", :default => 0 + t.integer "board_num", :default => 0 + t.integer "attach_num", :default => 0 + t.datetime "commit_time" + end + + create_table "project_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "project_id" + t.integer "project_type" + t.float "grade", :default => 0.0 + t.integer "course_ac_para", :default => 0 + end + + add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" + + create_table "projecting_softapplictions", :force => true do |t| + t.integer "user_id" + t.integer "softapplication_id" + t.integer "project_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "projects", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "description" + t.string "homepage", :default => "" + t.boolean "is_public", :default => true, :null => false + t.integer "parent_id" + t.datetime "created_on" + t.datetime "updated_on" + t.string "identifier" + t.integer "status", :default => 1, :null => false + t.integer "lft" + t.integer "rgt" + t.boolean "inherit_members", :default => false, :null => false + t.integer "project_type" + t.boolean "hidden_repo", :default => false, :null => false + t.integer "attachmenttype", :default => 1 + t.integer "user_id" + t.integer "dts_test", :default => 0 + t.string "enterprise_name" + t.integer "organization_id" + t.integer "project_new_type" + t.integer "gpid" + t.integer "forked_from_project_id" + t.integer "forked_count" + t.integer "commits_count", :default => 0 + t.integer "publish_resource", :default => 0 + t.integer "issues_count", :default => 0 + t.integer "attachments_count", :default => 0 + t.integer "boards_count", :default => 0 + t.integer "news_count", :default => 0 + t.integer "acts_count", :default => 0 + t.integer "journals_count", :default => 0 + t.integer "boards_reply_count", :default => 0 + t.integer "visits", :default => 0 + end + + add_index "projects", ["lft"], :name => "index_projects_on_lft" + add_index "projects", ["rgt"], :name => "index_projects_on_rgt" + + create_table "projects_trackers", :id => false, :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.integer "tracker_id", :default => 0, :null => false + end + + add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true + add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" + + create_table "queries", :force => true do |t| + t.integer "project_id" + t.string "name", :default => "", :null => false + t.text "filters" + t.integer "user_id", :default => 0, :null => false + t.boolean "is_public", :default => false, :null => false + t.text "column_names" + t.text "sort_criteria" + t.string "group_by" + t.string "type" + end + + add_index "queries", ["project_id"], :name => "index_queries_on_project_id" + add_index "queries", ["user_id"], :name => "index_queries_on_user_id" + + create_table "relative_memo_to_open_source_projects", :force => true do |t| + t.integer "osp_id" + t.integer "relative_memo_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "relative_memos", :force => true do |t| + t.integer "osp_id" + t.integer "parent_id" + t.string "subject", :null => false + t.text "content", :limit => 16777215, :null => false + t.integer "author_id" + t.integer "replies_count", :default => 0 + t.integer "last_reply_id" + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.boolean "is_quote", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count_crawl", :default => 0 + t.integer "viewed_count_local", :default => 0 + t.string "url" + t.string "username" + t.string "userhomeurl" + t.date "date_collected" + t.string "topic_resource" + end + + create_table "repositories", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "url", :default => "", :null => false + t.string "login", :limit => 60, :default => "" + t.string "password", :default => "" + t.string "root_url", :default => "" + t.string "type" + t.string "path_encoding", :limit => 64 + t.string "log_encoding", :limit => 64 + t.text "extra_info" + t.string "identifier" + t.boolean "is_default", :default => false + t.boolean "hidden", :default => false + end + + add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" + + create_table "rich_rich_files", :force => true do |t| + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "rich_file_file_name" + t.string "rich_file_content_type" + t.integer "rich_file_file_size" + t.datetime "rich_file_updated_at" + t.string "owner_type" + t.integer "owner_id" + t.text "uri_cache" + t.string "simplified_type", :default => "file" + end + + create_table "roles", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "assignable", :default => true + t.integer "builtin", :default => 0, :null => false + t.text "permissions" + t.string "issues_visibility", :limit => 30, :default => "default", :null => false + end + + create_table "schools", :force => true do |t| + t.string "name" + t.string "province" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "logo_link" + t.string "pinyin" + end + + create_table "secdomains", :force => true do |t| + t.integer "sub_type" + t.string "subname" + t.integer "pid", :default => 0 + t.string "desc" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "seems_rateable_cached_ratings", :force => true do |t| + t.integer "cacheable_id", :limit => 8 + t.string "cacheable_type" + t.float "avg", :null => false + t.integer "cnt", :null => false + t.string "dimension" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "seems_rateable_rates", :force => true do |t| + t.integer "rater_id", :limit => 8 + t.integer "rateable_id" + t.string "rateable_type" + t.float "stars", :null => false + t.string "dimension" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "is_teacher_score", :default => 0 + end + + create_table "settings", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "value" + t.datetime "updated_on" + end + + add_index "settings", ["name"], :name => "index_settings_on_name" + + create_table "shares", :force => true do |t| + t.date "created_on" + t.string "url" + t.string "title" + t.integer "share_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "project_id" + t.integer "user_id" + t.string "description" + end + + create_table "shield_activities", :force => true do |t| + t.string "container_type" + t.integer "container_id" + t.string "shield_type" + t.integer "shield_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "softapplications", :force => true do |t| + t.string "name" + t.text "description" + t.integer "app_type_id" + t.string "app_type_name" + t.string "android_min_version_available" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "contest_id" + t.integer "softapplication_id" + t.integer "is_public" + t.string "application_developers" + t.string "deposit_project_url" + t.string "deposit_project" + t.integer "project_id" + end + + create_table "student_work_projects", :force => true do |t| + t.integer "homework_common_id" + t.integer "student_work_id" + t.integer "project_id" + t.integer "user_id" + t.integer "is_leader" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "student_work_projects", ["homework_common_id"], :name => "index_student_work_projects_on_homework_common_id" + add_index "student_work_projects", ["project_id"], :name => "index_student_work_projects_on_project_id" + add_index "student_work_projects", ["student_work_id"], :name => "index_student_work_projects_on_student_work_id" + add_index "student_work_projects", ["user_id"], :name => "index_student_work_projects_on_user_id" + + create_table "student_work_tests", :force => true do |t| + t.integer "student_work_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "status", :default => 9 + t.text "results" + t.text "src" + end + + create_table "student_works", :force => true do |t| + t.string "name" + t.text "description", :limit => 2147483647 + t.integer "homework_common_id" + t.integer "user_id" + t.float "final_score" + t.float "teacher_score" + t.float "student_score" + t.float "teaching_asistant_score" + t.integer "project_id", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "late_penalty", :default => 0 + t.integer "absence_penalty", :default => 0 + t.float "system_score", :default => 0.0 + t.boolean "is_test", :default => false + end + + add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id" + + create_table "student_works_evaluation_distributions", :force => true do |t| + t.integer "student_work_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "student_works_scores", :force => true do |t| + t.integer "student_work_id" + t.integer "user_id" + t.integer "score" + t.text "comment" + t.integer "reviewer_role" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "students_for_courses", :force => true do |t| + t.integer "student_id" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" + add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" + + create_table "subfield_subdomain_dirs", :force => true do |t| + t.integer "org_subfield_id" + t.string "name" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "system_messages", :force => true do |t| + t.integer "user_id" + t.string "content" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "description" + t.string "subject" + end + + create_table "taggings", :force => true do |t| + t.integer "tag_id" + t.integer "taggable_id" + t.string "taggable_type" + t.integer "tagger_id" + t.string "tagger_type" + t.string "context", :limit => 128 + t.datetime "created_at" + end + + add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" + add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" + add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" + + create_table "tags", :force => true do |t| + t.string "name" + end + + create_table "teachers", :force => true do |t| + t.string "tea_name" + t.string "location" + t.integer "couurse_time" + t.integer "course_code" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "extra" + end + + create_table "time_entries", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + t.integer "issue_id" + t.float "hours", :null => false + t.string "comments" + t.integer "activity_id", :null => false + t.date "spent_on", :null => false + t.integer "tyear", :null => false + t.integer "tmonth", :null => false + t.integer "tweek", :null => false + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" + add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" + add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" + add_index "time_entries", ["project_id"], :name => "time_entries_project_id" + add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" + + create_table "tokens", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.string "action", :limit => 30, :default => "", :null => false + t.string "value", :limit => 40, :default => "", :null => false + t.datetime "created_on", :null => false + end + + add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" + add_index "tokens", ["value"], :name => "tokens_value", :unique => true + + create_table "trackers", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.boolean "is_in_chlog", :default => false, :null => false + t.integer "position", :default => 1 + t.boolean "is_in_roadmap", :default => true, :null => false + t.integer "fields_bits", :default => 0 + end + + create_table "user_actions", :force => true do |t| + t.integer "user_id" + t.string "action_type" + t.integer "action_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_activities", :force => true do |t| + t.string "act_type" + t.integer "act_id" + t.string "container_type" + t.integer "container_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "user_id" + end + + create_table "user_extensions", :force => true do |t| + t.integer "user_id", :null => false + t.date "birthday" + t.string "brief_introduction" + t.integer "gender" + t.string "location" + t.string "occupation" + t.integer "work_experience" + t.integer "zip_code" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "technical_title" + t.integer "identity" + t.string "student_id" + t.string "teacher_realname" + t.string "student_realname" + t.string "location_city" + t.integer "school_id" + t.string "description", :default => "" + end + + create_table "user_feedback_messages", :force => true do |t| + t.integer "user_id" + t.integer "journals_for_message_id" + t.string "journals_for_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_grades", :force => true do |t| + t.integer "user_id", :null => false + t.integer "project_id", :null => false + t.float "grade", :default => 0.0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" + add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" + add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" + + create_table "user_levels", :force => true do |t| + t.integer "user_id" + t.integer "level" + end + + create_table "user_preferences", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.text "others" + t.boolean "hide_mail", :default => false + t.string "time_zone" + end + + add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" + + create_table "user_score_details", :force => true do |t| + t.integer "current_user_id" + t.integer "target_user_id" + t.string "score_type" + t.string "score_action" + t.integer "user_id" + t.integer "old_score" + t.integer "new_score" + t.integer "current_user_level" + t.integer "target_user_level" + t.integer "score_changeable_obj_id" + t.string "score_changeable_obj_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_scores", :force => true do |t| + t.integer "user_id", :null => false + t.integer "collaboration" + t.integer "influence" + t.integer "skill" + t.integer "active" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "grade", :default => 0.0 + end + + add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" + add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" + add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" + + create_table "user_wechats", :force => true do |t| + t.integer "subscribe" + t.string "openid" + t.string "nickname" + t.integer "sex" + t.string "language" + t.string "city" + t.string "province" + t.string "country" + t.string "headimgurl" + t.string "subscribe_time" + t.string "unionid" + t.string "remark" + t.integer "groupid" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "users", :force => true do |t| + t.string "login", :default => "", :null => false + t.string "hashed_password", :limit => 40, :default => "", :null => false + t.string "firstname", :limit => 30, :default => "", :null => false + t.string "lastname", :default => "", :null => false + t.string "mail", :limit => 60, :default => "", :null => false + t.boolean "admin", :default => false, :null => false + t.integer "status", :default => 1, :null => false + t.datetime "last_login_on" + t.string "language", :limit => 5, :default => "" + t.integer "auth_source_id" + t.datetime "created_on" + t.datetime "updated_on" + t.string "type" + t.string "identity_url" + t.string "mail_notification", :default => "", :null => false + t.string "salt", :limit => 64 + t.integer "gid" + t.integer "visits", :default => 0 + end + + add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" + add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" + add_index "users", ["type"], :name => "index_users_on_type" + + create_table "versions", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "name", :default => "", :null => false + t.string "description", :default => "" + t.date "effective_date" + t.datetime "created_on" + t.datetime "updated_on" + t.string "wiki_page_title" + t.string "status", :default => "open" + t.string "sharing", :default => "none", :null => false + end + + add_index "versions", ["project_id"], :name => "versions_project_id" + add_index "versions", ["sharing"], :name => "index_versions_on_sharing" + + create_table "visitors", :force => true do |t| + t.integer "user_id" + t.integer "master_id" + t.datetime "updated_on" + t.datetime "created_on" + end + + add_index "visitors", ["master_id"], :name => "index_visitors_master_id" + add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" + add_index "visitors", ["user_id"], :name => "index_visitors_user_id" + + create_table "watchers", :force => true do |t| + t.string "watchable_type", :default => "", :null => false + t.integer "watchable_id", :default => 0, :null => false + t.integer "user_id" + end + + add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" + add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" + add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" + + create_table "web_footer_companies", :force => true do |t| + t.string "name" + t.string "logo_size" + t.string "url" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "web_footer_oranizers", :force => true do |t| + t.string "name" + t.text "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "wechat_logs", :force => true do |t| + t.string "openid", :null => false + t.text "request_raw" + t.text "response_raw" + t.text "session_raw" + t.datetime "created_at", :null => false + end + + create_table "wiki_content_versions", :force => true do |t| + t.integer "wiki_content_id", :null => false + t.integer "page_id", :null => false + t.integer "author_id" + t.binary "data", :limit => 2147483647 + t.string "compression", :limit => 6, :default => "" + t.string "comments", :default => "" + t.datetime "updated_on", :null => false + t.integer "version", :null => false + end + + add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" + add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" + + create_table "wiki_contents", :force => true do |t| + t.integer "page_id", :null => false + t.integer "author_id" + t.text "text", :limit => 2147483647 + t.string "comments", :default => "" + t.datetime "updated_on", :null => false + t.integer "version", :null => false + end + + add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" + add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" + + create_table "wiki_pages", :force => true do |t| + t.integer "wiki_id", :null => false + t.string "title", :null => false + t.datetime "created_on", :null => false + t.boolean "protected", :default => false, :null => false + t.integer "parent_id" + end + + add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" + add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" + add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" + + create_table "wiki_redirects", :force => true do |t| + t.integer "wiki_id", :null => false + t.string "title" + t.string "redirects_to" + t.datetime "created_on", :null => false + end + + add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" + add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" + + create_table "wikis", :force => true do |t| + t.integer "project_id", :null => false + t.string "start_page", :null => false + t.integer "status", :default => 1, :null => false + end + + add_index "wikis", ["project_id"], :name => "wikis_project_id" + + create_table "workflows", :force => true do |t| + t.integer "tracker_id", :default => 0, :null => false + t.integer "old_status_id", :default => 0, :null => false + t.integer "new_status_id", :default => 0, :null => false + t.integer "role_id", :default => 0, :null => false + t.boolean "assignee", :default => false, :null => false + t.boolean "author", :default => false, :null => false + t.string "type", :limit => 30 + t.string "field_name", :limit => 30 + t.string "rule", :limit => 30 + end + + add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" + add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" + add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" + add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" + + create_table "works_categories", :force => true do |t| + t.string "category" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "zip_packs", :force => true do |t| + t.integer "user_id" + t.integer "homework_id" + t.string "file_digest" + t.string "file_path" + t.integer "pack_times", :default => 1 + t.integer "pack_size", :default => 0 + t.text "file_digests" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + +end diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index eb537363d..398d0fc2f 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -1,7 +1,7 @@ - react js + 最新动态 @@ -20,65 +20,65 @@ + \ No newline at end of file diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html new file mode 100644 index 000000000..4bc2d7c0e --- /dev/null +++ b/public/assets/wechat/homework_detail.html @@ -0,0 +1,75 @@ + + + + 作业详情 + + + + + + + + + + +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 1c08c6f39..c06988ba6 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -20,93 +20,12 @@ diff --git a/public/javascripts/wechat/homework-detail.js b/public/javascripts/wechat/homework-detail.js new file mode 100644 index 000000000..a5fdfa694 --- /dev/null +++ b/public/javascripts/wechat/homework-detail.js @@ -0,0 +1,57 @@ +/** + * Created by root on 3/31/16. + */ +$(document).ready(function(){ + + var bt=baidu.template; + bt.LEFT_DELIMITER=''; + + + var apiUrl = '/api/v1/'; + + var setTemplate = function(data){ + console.log(data); + var html=bt('t:homework-detail',{homework: data}); + $('#homework-container').prepend(html); + $('.post-reply-submit').click(function(){ + replyInsert(); + }); + }; + + var loadDataFromServer = function(id){ + //getOpenId(function(openid){ + $.ajax({ + url: apiUrl + 'whomeworks/' + id, + dataType: 'json', + success: function(data){ + setTemplate(data.data); + }, + error: function(xhr,status,err){ + console.log(err); + } + }); + //}) + + + }; + + loadDataFromServer(808); + + //点击回复按钮,插入回复内容 + var replyInsert = function(){ + var replyContent = $("#postInput").val(); + if (!replyContent){ + alert("请输入回复"); + }else{ + $(".post-reply-wrap:last").after('
1分钟前
回复
'); + $(".post-reply-content:last").append(replyContent); + $("#postInput").val("");} + } + + var getID = function(){ + var homeworkID = $("#homework-id").html(); + alert(homeworkID); + return homeworkID; + } +}); \ No newline at end of file diff --git a/public/javascripts/wechat/wechat-dev.js b/public/javascripts/wechat/wechat-dev.js index 20c118b96..b7ed32332 100644 --- a/public/javascripts/wechat/wechat-dev.js +++ b/public/javascripts/wechat/wechat-dev.js @@ -9,12 +9,15 @@ $(document).ready(function(){ var apiUrl = '/api/v1/'; + var setTemplate = function(data){ console.log(data); var html=bt('t:result-list',{activities: data}); $('#container').prepend(html); descToggle(); - + $('.post-reply-submit').click(function(){ + replyInsert(); + }); }; var loadDataFromServer = function(id){ @@ -36,10 +39,8 @@ $(document).ready(function(){ loadDataFromServer(8686); + //内容全部显示与部分隐藏 var descToggle = function(){ - var postWidth = $(".post-wrapper").width(); - var titleWidth = postWidth - 80; - $(".post-title").css("maxWidth",titleWidth); $(".post-all-content").each(function(){ var postHeight = $(this).height(); if (postHeight > 90){ @@ -55,11 +56,14 @@ $(document).ready(function(){ }); } - var timeSpilt = function(){ - + //点击回复按钮,插入回复内容 + var replyInsert = function(){ + var replyContent = $("#postInput").val(); + if (!replyContent){ + alert("请输入回复"); + }else{ + $(".post-reply-wrap:last").after('
1分钟前
回复
'); + $(".post-reply-content:last").append(replyContent); + $("#postInput").val("");} } - - - - }); diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index b702e1d0d..837ff1abc 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -10,14 +10,17 @@ h1,h2,h3,h4,h5,p {padding:0px; margin:0px;} .mt5 {margin-top:5px;} .mt10 {margin-top:10px;} .mb5 {margin-bottom:5px;} +.mb10 {margin-bottom:10px;} .ml10 {margin-left:10px;} .mr10 {margin-right:10px;} .ml15 {margin-left:15px;} .mr15 {margin-right:15px;} +.ml55 {margin-left:55px;} .c-blue {color:#269ac9;} .c-grey {color:#9a9a9a;} .c-grey2 {color:#707070;} .c-grey3 {color:#555555;} +a.c-grey {color:#707070;} a:link,a:visited{text-decoration:none;} a:hover,a:active{cursor:pointer;} a.link-blue {color:#269ac9;} @@ -35,7 +38,21 @@ a.link-blue {color:#269ac9;} .post-avatar {width:45px; height:45px; margin-right:10px;} .post-title {font-size:13px; text-align:left;} .fl {float:left;} +.fr {float:right;} .cl {clear:both; overflow:hidden;} .post-content {width:100%; font-size:13px; line-height:18px; height:90px; overflow:hidden;} .post-interactive {width:100%; height:35px; line-height:35px; vertical-align:middle; border-top:1px solid #e6e6e6; background-color:#f8f9fb;} -.post-interactive-column {width:50%; text-align:center; float:left; font-size:13px;} \ No newline at end of file +.post-interactive-column {width:50%; text-align:center; float:left; font-size:13px;} +.more-wrap {width:100%;} +.more-events {width:98%; font-size:13px; text-align:center; margin:0px auto; padding: 5px 0px; border:1px solid #e6e6e6; border-radius:3px; background-color:#f8f9fb; } +.border-bottom {border-bottom:1px solid #e6e6e6;} +.post-reply-wrap {width:100%; line-height:18px; background-color:#f8f9fb;} +.post-input-wrap {width:100%; line-height:18px; background-color:#f8f9fb;} +.post-reply-row {padding:10px; color:#9a9a9a;} +.post-reply-avatar {width:45px; height:30px; text-align:center; margin-right:10px;} +.post-reply-user {font-size:13px; text-align:left; margin-bottom:10px;} +.post-reply-content {font-size:13px; text-align:left;} +.post-reply-date {font-size:13px;} +.post-reply-trigger {font-size:13px;} +.post-reply-input {width:100%; height:28px; line-height:28px; border:1px solid #e6e6e6; outline:none; border-radius:3px;} +.post-reply-submit {font-size:13px; padding:3px 8px; color:#fff; background-color:#269ac9; outline:none; border:none; display:inline-block;} \ No newline at end of file From 536394663a2b8b27944b08babf0103938a985521 Mon Sep 17 00:00:00 2001 From: Yiang Gan Date: Thu, 31 Mar 2016 20:46:36 +0800 Subject: [PATCH 094/209] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/issue.rb | 12 ++- app/api/mobile/entities/journal.rb | 37 +++++++ app/helpers/api_helper.rb | 152 +++++++++++++++++++++++++++++ app/helpers/issues_helper.rb | 2 +- app/models/blog_comment.rb | 50 +++++++++- app/models/homework_common.rb | 49 +++++++++- app/models/journal.rb | 50 +++++++++- app/models/journals_for_message.rb | 51 ++++++++++ app/models/mailer.rb | 63 ++++++++++++ 9 files changed, 461 insertions(+), 5 deletions(-) create mode 100644 app/api/mobile/entities/journal.rb diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index 1a23bb464..cd0cbb0ce 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -9,7 +9,11 @@ module Mobile issue[f] elsif issue.is_a?(::Issue) if issue.respond_to?(f) - issue.send(f) + if f == :created_on + format_time(issue.send(f)) + else + issue.send(f) + end else case f when :issue_priority @@ -27,9 +31,15 @@ module Mobile expose :description expose :author, using: Mobile::Entities::User expose :done_ratio + issue_expose :created_on issue_expose :issue_priority issue_expose :issue_assigned_to issue_expose :issue_status + expose :issue_journals, using: Mobile::Entities::Journal do |f, opt| + if f.is_a?(::Issue) + f.journals + end + end end end end \ No newline at end of file diff --git a/app/api/mobile/entities/journal.rb b/app/api/mobile/entities/journal.rb new file mode 100644 index 000000000..a2c54248e --- /dev/null +++ b/app/api/mobile/entities/journal.rb @@ -0,0 +1,37 @@ +module Mobile +module Entities + class Journal [], :deleted => []} + if detail.old_value + values_by_field[field_id][:deleted] << detail.old_value + end + if detail.value + values_by_field[field_id][:added] << detail.value + end + next + end + end + strings << jshow_detail(detail, no_html, options) + + end + values_by_field.each do |field_id, changes| + detail = JournalDetail.new(:property => 'cf', :prop_key => field_id) + if changes[:added].any? + detail.value = changes[:added] + strings << jshow_detail(detail, no_html, options) + elsif changes[:deleted].any? + detail.old_value = changes[:deleted] + strings << jshow_detail(detail, no_html, options) + end + end + strings + end + + # Returns the textual representation of a single journal detail + def jshow_detail(detail, no_html=false, options={}) + multiple = false + case detail.property + when 'attr' + field = detail.prop_key.to_s.gsub(/\_id$/, "") + label = l(("field_" + field).to_sym) + case detail.prop_key + when 'due_date', 'start_date' + value = format_date(detail.value.to_date) if detail.value + old_value = format_date(detail.old_value.to_date) if detail.old_value + + when 'project_id', 'status_id', 'tracker_id', 'assigned_to_id', + 'priority_id', 'category_id', 'fixed_version_id' + value = find_name_by_reflection(field, detail.value) + old_value = find_name_by_reflection(field, detail.old_value) + + when 'estimated_hours' + value = "%0.02f" % detail.value.to_f unless detail.value.blank? + old_value = "%0.02f" % detail.old_value.to_f unless detail.old_value.blank? + + when 'parent_id' + label = l(:field_parent_issue) + value = "##{detail.value}" unless detail.value.blank? + old_value = "##{detail.old_value}" unless detail.old_value.blank? + + when 'is_private' + value = l(detail.value == "0" ? :general_text_No : :general_text_Yes) unless detail.value.blank? + old_value = l(detail.old_value == "0" ? :general_text_No : :general_text_Yes) unless detail.old_value.blank? + end + when 'cf' + custom_field = CustomField.find_by_id(detail.prop_key) + if custom_field + multiple = custom_field.multiple? + label = custom_field.name + value = format_value(detail.value, custom_field.field_format) if detail.value + old_value = format_value(detail.old_value, custom_field.field_format) if detail.old_value + end + when 'attachment' + label = l(:label_attachment) + end + call_hook(:helper_issues_show_detail_after_setting, + {:detail => detail, :label => label, :value => value, :old_value => old_value }) + + label ||= detail.prop_key + value ||= detail.value + old_value ||= detail.old_value + + unless no_html + label = content_tag('strong', label) + old_value = content_tag("i", old_value) if detail.old_value + old_value = content_tag("del", old_value) if detail.old_value and detail.value.blank? + if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key) + # Link to the attachment if it has not been removed + if options[:token].nil? + value = atta.filename + else + value = atta.filename + end + # 放大镜搜索功能 + # if options[:only_path] != false && atta.is_text? + # value += link_to( + # image_tag('magnifier.png'), + # :controller => 'attachments', :action => 'show', + # :id => atta, :filename => atta.filename + # ) + # end + else + value = content_tag("i", value) if value + end + end + # 缺陷更新结果在消息中显示样式 + if no_html == "message" + label = content_tag(:span, label, :class => "issue_update_message") + old_value = content_tag("span", old_value) if detail.old_value + old_value = content_tag("del", old_value) if detail.old_value and detail.value.blank? + if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key) + # Link to the attachment if it has not been removed + if options[:token].nil? + value = atta.filename + else + value = atta.filename + end + else + value = content_tag(:span, value, :class => "issue_update_message_value") if value + end + end + + if detail.property == 'attr' && detail.prop_key == 'description' + s = l(:text_journal_changed_no_detail, :label => label) + unless no_html + diff_link = link_to l(:label_diff), + {:controller => 'journals', :action => 'diff', :id => detail.journal_id, + :detail_id => detail.id, :only_path => options[:only_path]}, + :title => l(:label_view_diff) + s << " (#{ diff_link })" + end + s.html_safe + elsif detail.value.present? + case detail.property + when 'attr', 'cf' + if detail.old_value.present? + l(:text_journal_changed, :label => label, :old => old_value, :new => value).html_safe + elsif multiple + l(:text_journal_added, :label => label, :value => value).html_safe + else + l(:text_journal_set_to, :label => label, :value => value).html_safe + end + when 'attachment' + l(:text_journal_added, :label => label, :value => value).html_safe + end + else + l(:text_journal_deleted, :label => label, :old => old_value).html_safe + end + end end \ No newline at end of file diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 4ad3cb49d..bef6b580c 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -19,7 +19,7 @@ module IssuesHelper include ApplicationHelper - + include TagsHelper def issue_list(issues, &block) ancestors = [] issues.each do |issue| diff --git a/app/models/blog_comment.rb b/app/models/blog_comment.rb index 2b31af604..3775523b3 100644 --- a/app/models/blog_comment.rb +++ b/app/models/blog_comment.rb @@ -1,5 +1,7 @@ class BlogComment < ActiveRecord::Base # attr_accessible :title, :body + require 'net/http' + require 'json' include Redmine::SafeAttributes belongs_to :blog belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' @@ -18,7 +20,7 @@ class BlogComment < ActiveRecord::Base after_save :add_user_activity after_update :update_activity - after_create :update_parent_time + after_create :update_parent_time, :blog_wechat_message before_destroy :destroy_user_activity scope :like, lambda {|arg| @@ -72,4 +74,50 @@ class BlogComment < ActiveRecord::Base end def project end + + #博客回复微信模板消息 + def blog_wechat_message + unless self.parent_id == nil + uw = UserWechat.where(user_id: self.parent.author_id).first + #unless uw.nil? && self.parent.author_id != User.current.id + unless uw.nil? + data = { + touser:uw.openid, + template_id:"A_3f5v90-zK73V9Kijm-paDkl9S-NuM8Cf-1UJi92_c", + url:"http://weixin.qq.com/download", + topcolor:"#FF0000", + data:{ + first: { + value:"您的博客有新回复了", + color:"#173177" + }, + keyword1:{ + value:self.author.try(:realname), + color:"#173177" + }, + keyword2:{ + value:self.created_at, + color:"#173177" + }, + keyword3:{ + value:h(truncate(" - #{self.content.html_safe}", length:50, omission: '...')), + color:"#173177" + }, + remark:{ + value:"具体内容请点击详情查看网站", + color:"#173177" + } + } + } + uri = URI("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=1234567") + body = data.to_json + res = Net::HTTP.new(uri.host, uri.port).start do |client| + request = Net::HTTP::Post.new(uri.path) + request.body = body + request["Content-Type"] = "application/json" + client.request(request) + end + end + end + end end diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb index f8e222b0f..e1f4766de 100644 --- a/app/models/homework_common.rb +++ b/app/models/homework_common.rb @@ -2,6 +2,8 @@ #homework_type: 0:普通作业;1:匿评作业;2:编程作业 class HomeworkCommon < ActiveRecord::Base # attr_accessible :name, :user_id, :description, :publish_time, :end_time, :homework_type, :late_penalty, :course_id + require 'net/http' + require 'json' include Redmine::SafeAttributes include ApplicationHelper @@ -26,7 +28,7 @@ class HomeworkCommon < ActiveRecord::Base :author => :author, :url => Proc.new {|o| {:controller => 'student_work', :action => 'index', :homework => o.id}} after_create :act_as_activity, :send_mail, :act_as_course_message - after_update :update_activity + after_update :update_activity, :wechat_message after_save :act_as_course_activity after_destroy :delete_kindeditor_assets @@ -98,6 +100,51 @@ class HomeworkCommon < ActiveRecord::Base jfm end + #修改作业后发送微信模板消息 + def wechat_message + self.course.members.each do |member| + uw = UserWechat.where("user_id=?", member.user_id).first + unless uw.nil? + data = { + touser:uw.openid, + template_id:"3e5Dj2GIx8MOcMyRKpTUEQnM7Tg0ASSCNc01NS9HCGI", + url:"http://weixin.qq.com/download", + topcolor:"#FF0000", + data:{ + first: { + value:"您的作业已被修改", + color:"#173177" + }, + keyword1:{ + value:self.course.name, + color:"#173177" + }, + keyword2:{ + value:self.name, + color:"#173177" + }, + keyword3:{ + value:self.end_time.to_s + "23:59:59", + color:"#173177" + }, + remark:{ + value:"具体内容请点击详情查看网站", + color:"#173177" + } + } + } + uri = URI("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=1234567") + body = data.to_json + res = Net::HTTP.new(uri.host, uri.port).start do |client| + request = Net::HTTP::Post.new(uri.path) + request.body = body + request["Content-Type"] = "application/json" + client.request(request) + end + end + end + end + delegate :language_name, :language, :to => :homework_detail_programing end diff --git a/app/models/journal.rb b/app/models/journal.rb index fd67e8a62..2432f1db1 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -16,6 +16,8 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class Journal < ActiveRecord::Base + require 'net/http' + require 'json' include UserScoreHelper belongs_to :journalized, :polymorphic => true,:touch => true # added as a quick fix to allow eager loading of the polymorphic association @@ -52,7 +54,7 @@ class Journal < ActiveRecord::Base # fq after_save :act_as_activity,:be_user_score, :act_as_forge_message, act_as_at_message(:notes, :user_id) - after_create :update_issue_time + after_create :update_issue_timeissue, :issue_wechat_message # end #after_destroy :down_user_score #before_save :be_user_score @@ -233,4 +235,50 @@ class Journal < ActiveRecord::Base forge_activity.update_attribute(:created_at, self.created_on) unless forge_activity.nil? end end + + #缺陷回复微信模板消息 + def issue_wechat_message + unless self.parent_id == nil + uw = UserWechat.where(user_id: self.issue.author_id).first + #unless uw.nil? && self.issue.author_id != User.current.id + unless uw.nil? + data = { + touser:uw.openid, + template_id:"A_3f5v90-zK73V9Kijm-paDkl9S-NuM8Cf-1UJi92_c", + url:"http://weixin.qq.com/download", + topcolor:"#FF0000", + data:{ + first: { + value:"您的缺陷有新回复了", + color:"#173177" + }, + keyword1:{ + value:self.author.try(:realname), + color:"#173177" + }, + keyword2:{ + value:self.created_on, + color:"#173177" + }, + keyword3:{ + value:h(truncate(" - #{self.description.html_safe}", length:50, omission: '...')), + color:"#173177" + }, + remark:{ + value:"具体内容请点击详情查看网站", + color:"#173177" + } + } + } + uri = URI("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=1234567") + body = data.to_json + res = Net::HTTP.new(uri.host, uri.port).start do |client| + request = Net::HTTP::Post.new(uri.path) + request.body = body + request["Content-Type"] = "application/json" + client.request(request) + end + end + end + end end diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb index fa5beb813..33dcc78af 100644 --- a/app/models/journals_for_message.rb +++ b/app/models/journals_for_message.rb @@ -2,6 +2,8 @@ # 数据库字段中带有m前缀和is_readed是二次开发添加,之前的字段基本复用 # 注意reply_id 是提到人的id,不是留言id, Base中叫做 at_user class JournalsForMessage < ActiveRecord::Base + require 'net/http' + require 'json' include Redmine::SafeAttributes include UserScoreHelper include ApplicationHelper @@ -253,6 +255,9 @@ class JournalsForMessage < ActiveRecord::Base self.course_messages << CourseMessage.new(:user_id => r, :course_id => self.jour.id, :viewed => false) end end + if self.jour_type == 'HomeworkCommon' + journal_wechat_message '您的作业有新回复了' + end end @@ -264,6 +269,7 @@ class JournalsForMessage < ActiveRecord::Base if self.reply_id == 0 if self.user_id != self.jour_id # 过滤自己给自己的留言消息 receivers << self.jour + journal_wechat_message "您有新留言了" end else # 留言回复 reply_to = User.find(self.reply_id) @@ -273,6 +279,7 @@ class JournalsForMessage < ActiveRecord::Base if self.user_id != self.parent.jour_id && self.reply_id != self.parent.jour_id # 给东家发信息,如果回复的对象是东家则不发 receivers << self.parent.jour end + journal_wechat_message "您的留言有新回复了" end receivers.each do |r| self.user_feedback_messages << UserFeedbackMessage.new(:user_id => r.id, :journals_for_message_id => self.id, :journals_for_message_type => "Principal", :viewed => false) @@ -299,4 +306,48 @@ class JournalsForMessage < ActiveRecord::Base end end + #微信模板消息 + def journal_wechat_message type + uw = UserWechat.where(user_id: self.reply_id).first + #unless uw.nil? && self.reply_id != User.current.id + unless uw.nil? + data = { + touser:uw.openid, + template_id:"3e5Dj2GIx8MOcMyRKpTUEQnM7Tg0ASSCNc01NS9HCGI", + url:"http://weixin.qq.com/download", + topcolor:"#FF0000", + data:{ + first: { + value:type, + color:"#173177" + }, + keyword1:{ + value:self.user.try(:realname), + color:"#173177" + }, + keyword2:{ + value:self.created_on, + color:"#173177" + }, + keyword3:{ + value:h(truncate(" - #{self.notes.html_safe}", length:50, omission: '...')), + color:"#173177" + }, + remark:{ + value:"具体内容请点击详情查看网站", + color:"#173177" + } + } + } + uri = URI("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=1234567") + body = data.to_json + res = Net::HTTP.new(uri.host, uri.port).start do |client| + request = Net::HTTP::Post.new(uri.path) + request.body = body + request["Content-Type"] = "application/json" + client.request(request) + end + end + end + end diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 05b0349ec..98ed4ee1f 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -16,6 +16,8 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class Mailer < ActionMailer::Base + require 'net/http' + require 'json' layout 'mailer' helper :application helper :issues @@ -638,6 +640,9 @@ class Mailer < ActionMailer::Base mail :to => recipients, :subject => "[ #{l(:label_user_homework)} : #{homework_common.name} #{l(:label_memo_create_succ)}]", :filter => true + @homework_common.course.members.each do |member| + mail_wechat_message member.user_id, "3e5Dj2GIx8MOcMyRKpTUEQnM7Tg0ASSCNc01NS9HCGI", "您的课程有新作业了", @homework_common.course.name, @homework_common.name, @homework_common.end_time.to_s + " 23:59:59" + end end # Builds a Mail::Message object used to email recipients of a news' project when a news item is added. @@ -703,6 +708,8 @@ class Mailer < ActionMailer::Base mail :to => recipients, :subject => "[#{news.course.name}] #{l(:label_news)}: #{news.title}", :filter => true + + mail_wechat_message news.author_id, "3e5Dj2GIx8MOcMyRKpTUEQnM7Tg0ASSCNc01NS9HCGI", "您的课程通知有新回复了", @author.try(:realname), comment.created_on, comment.comments.html_safe end end @@ -727,6 +734,13 @@ class Mailer < ActionMailer::Base :cc => cc, :subject => "[#{message.board.project.name} - #{message.board.name} - msg#{message.root.id}] #{message.subject}", :filter => true + if message.parent_id == nil + message.project.members.each do |member| + mail_wechat_message member.user_id, "oKzFCdk7bsIHnGbscA__N8LPQrBkUShvpjV3-kuwWDQ", "项目讨论区有新帖子发布了", message.subject, @author.try(:realname), message.created_on + end + else + mail_wechat_message member.parent.author_id, "A_3f5v90-zK73V9Kijm-paDkl9S-NuM8Cf-1UJi92_c", "您的帖子有新回复了", @author.try(:realname), message.created_on, message.content.html_safe + end elsif message.course redmine_headers 'Course' => message.course.id, 'Topic-Id' => (message.parent_id || message.id) @@ -742,6 +756,13 @@ class Mailer < ActionMailer::Base :cc => cc, :subject => "[#{message.board.course.name} - #{message.board.name} - msg#{message.root.id}] #{message.subject}", :filter => true + if message.parent_id == nil + message.course.members.each do |member| + mail_wechat_message member.user_id, "oKzFCdk7bsIHnGbscA__N8LPQrBkUShvpjV3-kuwWDQ", "课程问答区有新帖子发布了", message.subject, @author.try(:realname), message.created_on + end + else + mail_wechat_message member.parent.author_id, "A_3f5v90-zK73V9Kijm-paDkl9S-NuM8Cf-1UJi92_c", "您的帖子有新回复了", @author.try(:realname), message.created_on, message.content.html_safe + end end end @@ -1097,4 +1118,46 @@ class Mailer < ActionMailer::Base return newpass end + #微信模板消息 + def mail_wechat_message user_id, template_id, first, key1, key2, key3, remark="具体内容请点击详情查看网站" + uw = UserWechat.where(user_id: user_id).first + unless uw.nil? + data = { + touser:uw.openid, + template_id:template_id, + url:"http://weixin.qq.com/download", + topcolor:"#FF0000", + data:{ + first: { + value:first, + color:"#173177" + }, + keyword1:{ + value:key1, + color:"#173177" + }, + keyword2:{ + value:key2, + color:"#173177" + }, + keyword3:{ + value:h(truncate(" - #{key3}", length:50, omission: '...')), + color:"#173177" + }, + remark:{ + value:remark, + color:"#173177" + } + } + } + uri = URI("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=1234567") + body = data.to_json + res = Net::HTTP.new(uri.host, uri.port).start do |client| + request = Net::HTTP::Post.new(uri.path) + request.body = body + request["Content-Type"] = "application/json" + client.request(request) + end + end + end end From 4088fb9cb4b40de6538ae897136d823992992bc8 Mon Sep 17 00:00:00 2001 From: Yiang Gan Date: Fri, 1 Apr 2016 14:58:41 +0800 Subject: [PATCH 095/209] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/activities.rb | 2 +- app/api/mobile/entities/activity.rb | 1 + public/assets/wechat/activities.html | 2 +- public/assets/wechat/homework_detail.html | 26 +++++----- public/javascripts/wechat/homework-detail.js | 52 +++++++++++++++++--- public/javascripts/wechat/wechat-dev.js | 13 +---- public/stylesheets/weui/weixin.css | 4 ++ 7 files changed, 67 insertions(+), 33 deletions(-) diff --git a/app/api/mobile/apis/activities.rb b/app/api/mobile/apis/activities.rb index 813b2232b..41069b4bf 100644 --- a/app/api/mobile/apis/activities.rb +++ b/app/api/mobile/apis/activities.rb @@ -22,7 +22,7 @@ module Mobile activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" + "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+ "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{user.id}) " + - "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(200).offset(page * 10) + "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(50).offset(page * 10) present :data, activities, with: Mobile::Entities::Activity present :status, 0 end diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index db1456e68..9389f589e 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -95,6 +95,7 @@ module Mobile end end expose :act_type #缺陷/作业/讨论区/留言等类型 + expose :act_id expose :container_type #课程/项目/博客/个人 expose :author, using: Mobile::Entities::User do |a, opt| #用户信息 if a.is_a? ::UserActivity diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 22d642bde..c1467bc52 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -43,7 +43,7 @@
-
回复 ()
+
回复 ()
赞 ()
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 4bc2d7c0e..72e3b46f0 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -19,7 +19,7 @@ - + \ No newline at end of file diff --git a/public/javascripts/wechat/homework-detail.js b/public/javascripts/wechat/homework-detail.js index e4e3a9758..1c223bfc2 100644 --- a/public/javascripts/wechat/homework-detail.js +++ b/public/javascripts/wechat/homework-detail.js @@ -64,14 +64,14 @@ $(document).ready(function(){ //获取并传送回复用户数据 var userInfo = { - "replyType" : "homework_assignment", - "replyContent" : postInput + "type" : "HomeworkCommon", + "content" : postInput }; $.ajax({ type: "POST", //提交方式 dataType: "json", //类型 - url: "前台地址/后台方法", //提交的页面,方法名 + url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名 data: userInfo, //参数,如果没有,可以为null success: function (data) { //如果执行成功,那么执行此方法 alert(data.d); //用data.d来获取后台传过来的json语句,或者是单纯的语句 @@ -82,14 +82,14 @@ $(document).ready(function(){ }); } - } + }; //点赞效果 var praiseClick = function(){ var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); praiseNum++; $(".praise-num").text("(" + praiseNum + ")"); - } + }; }); \ No newline at end of file diff --git a/public/javascripts/wechat/wechat-dev.js b/public/javascripts/wechat/wechat-dev.js index eacbf8559..c921ed64d 100644 --- a/public/javascripts/wechat/wechat-dev.js +++ b/public/javascripts/wechat/wechat-dev.js @@ -2,59 +2,5 @@ * Created by root on 3/25/16. */ $(document).ready(function(){ - - var bt=baidu.template; - bt.LEFT_DELIMITER=''; - - - var apiUrl = '/api/v1/'; - - var setTemplate = function(data){ - console.log(data); - var html=bt('t:result-list',{activities: data}); - $('#container').prepend(html); - descToggle(); - $('.post-reply-submit').click(function(){ - replyInsert(); - }); - }; - - var loadDataFromServer = function(id){ - //getOpenId(function(openid){ - $.ajax({ - url: apiUrl + 'activities/' + id, - dataType: 'json', - success: function(data){ - setTemplate(data.data); - }, - error: function(xhr,status,err){ - console.log(err); - } - }); - //}) - - - }; - - loadDataFromServer(1); - - //内容全部显示与部分隐藏 - var descToggle = function(){ - $(".post-all-content").each(function(){ - var postHeight = $(this).height(); - if (postHeight > 90){ - $(this).parent().next().css("display","block"); - $(this).parent().next().toggle(function(){ - $(this).text("点击隐藏"); - $(this).prev().css("height",postHeight); - },function(){ - $(this).text("点击展开"); - $(this).prev().css("height",90); - }); - } - }); - } - - + loadDataFromServer(8686, 0); }); From 596bf641acc7cbde92f2f57bafa528945e19fa21 Mon Sep 17 00:00:00 2001 From: txz Date: Fri, 1 Apr 2016 20:53:21 +0800 Subject: [PATCH 099/209] =?UTF-8?q?=E6=9C=80=E6=96=B0=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=90=84=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/activity.rb | 2 + public/assets/wechat/activities.html | 29 +++--- public/assets/wechat/blog_detail.html | 73 ++++++++++++++ public/assets/wechat/course_discussion.html | 73 ++++++++++++++ public/assets/wechat/course_notice.html | 73 ++++++++++++++ public/assets/wechat/homework_detail.html | 4 +- public/assets/wechat/issue_detail.html | 40 ++++---- public/assets/wechat/message_detail.html | 71 ++++++++++++++ public/assets/wechat/project_discussion.html | 73 ++++++++++++++ public/javascripts/wechat/blog_detail.js | 95 ++++++++++++++++++ .../javascripts/wechat/course_discussion.js | 95 ++++++++++++++++++ public/javascripts/wechat/course_notice.js | 95 ++++++++++++++++++ ...{homework-detail.js => homework_detail.js} | 0 public/javascripts/wechat/issue_detail.js | 98 +++++++++++++++++++ public/javascripts/wechat/message_detail.js | 95 ++++++++++++++++++ .../javascripts/wechat/project_discussion.js | 3 + .../wechat/{wechat-dev.js => wechat_dev.js} | 0 17 files changed, 881 insertions(+), 38 deletions(-) create mode 100644 public/assets/wechat/blog_detail.html create mode 100644 public/assets/wechat/course_discussion.html create mode 100644 public/assets/wechat/course_notice.html create mode 100644 public/assets/wechat/message_detail.html create mode 100644 public/assets/wechat/project_discussion.html create mode 100644 public/javascripts/wechat/blog_detail.js create mode 100644 public/javascripts/wechat/course_discussion.js create mode 100644 public/javascripts/wechat/course_notice.js rename public/javascripts/wechat/{homework-detail.js => homework_detail.js} (100%) create mode 100644 public/javascripts/wechat/issue_detail.js create mode 100644 public/javascripts/wechat/message_detail.js create mode 100644 public/javascripts/wechat/project_discussion.js rename public/javascripts/wechat/{wechat-dev.js => wechat_dev.js} (100%) diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index 9389f589e..d58057b62 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -44,6 +44,8 @@ module Mobile ac.act.description unless ac.nil? || ac.act.nil? elsif ac.act_type == "Message" || ac.act_type == "BlogComment" ac.act.content unless ac.nil? || ac.act.nil? + elsif ac.act_type == "JournalsForMessage" + ac.act.notes end when :latest_update time_from_now ac.updated_at unless ac.nil? diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index c1467bc52..0f5420984 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -66,7 +66,7 @@
-
回复 ()
+
回复 ()
赞 ()
@@ -77,17 +77,18 @@
- + +

点击展开 +
-
回复 ()
+
回复 ()
赞 ()
@@ -97,7 +98,7 @@
- +
@@ -124,7 +125,7 @@
-
回复 ()
+
回复 ()
赞 ()
@@ -147,7 +148,7 @@
-
回复 ()
+
回复 ()
赞 ()
@@ -171,8 +172,8 @@
- + +

@@ -181,7 +182,7 @@
-
回复 ()
+
回复 ()
赞 ()
@@ -204,20 +205,20 @@
-
回复 ()
+
回复 ()
赞 ()
-
更多
+
更多
- - + + \ No newline at end of file diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html new file mode 100644 index 000000000..8b3f44eb5 --- /dev/null +++ b/public/assets/wechat/blog_detail.html @@ -0,0 +1,73 @@ + + + + 博客 + + + + + + + + + + +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html new file mode 100644 index 000000000..b5d56cd7e --- /dev/null +++ b/public/assets/wechat/course_discussion.html @@ -0,0 +1,73 @@ + + + + 课程讨论区 + + + + + + + + + + +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html new file mode 100644 index 000000000..6c508ab9c --- /dev/null +++ b/public/assets/wechat/course_notice.html @@ -0,0 +1,73 @@ + + + + 课程通知 + + + + + + + + + + +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 72e3b46f0..3f05b1b8e 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -57,7 +57,7 @@
-
+
@@ -68,7 +68,7 @@ - + diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index c06988ba6..8c326d631 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -1,7 +1,7 @@ - 缺陷详情 + 问题跟踪 @@ -13,13 +13,13 @@ -
+
- - + \ No newline at end of file diff --git a/public/assets/wechat/message_detail.html b/public/assets/wechat/message_detail.html new file mode 100644 index 000000000..04563184f --- /dev/null +++ b/public/assets/wechat/message_detail.html @@ -0,0 +1,71 @@ + + + + 留言 + + + + + + + + + + +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html new file mode 100644 index 000000000..5201d8299 --- /dev/null +++ b/public/assets/wechat/project_discussion.html @@ -0,0 +1,73 @@ + + + + 课程讨论区 + + + + + + + + + + +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/javascripts/wechat/blog_detail.js b/public/javascripts/wechat/blog_detail.js new file mode 100644 index 000000000..44121f83c --- /dev/null +++ b/public/javascripts/wechat/blog_detail.js @@ -0,0 +1,95 @@ +/** + * Created by root on 4/1/16. + */ +$(document).ready(function(){ + + var bt=baidu.template; + bt.LEFT_DELIMITER=''; + + + var apiUrl = '/api/v1/'; + + var setTemplate = function(data){ + console.log(data); + var html=bt('t:blog-detail',{blog: data}); + $('#blog-container').prepend(html); + $('.post-reply-submit').click(function(){ + replyInsert(); + }); + $('post-interactive-praise').click(function(){ + praiseClick(); + }); + }; + + var loadDataFromServer = function(id){ + //getOpenId(function(openid){ + $.ajax({ + url: apiUrl + 'blog_comments/' + id, + dataType: 'json', + success: function(data){ + setTemplate(data.data); + }, + error: function(xhr,status,err){ + console.log(err); + } + }); + //}) + + + }; + + var homeworkUrl = window.location.search; + var homeworkID = homeworkUrl.split("=")[1]; + + loadDataFromServer(homeworkID); + + //点击回复按钮,插入回复内容 + var replyInsert = function(){ + var replyContent = $("#postInput").val(); + if (!replyContent){ + alert("请输入回复"); + }else{ + + //将用户输入内容插入最后一条回复 + $(".post-reply-wrap:last").after('
回复
'); + $(".post-reply-content:last").append(replyContent); + $(".post-reply-date:last").append(Date()); + var postInput = $("#postInput").val(); + $("#postInput").val(""); + //回复数目+1 + var replyNum = $(".post-interactive-reply").text().match(/\d+/g); + replyNum++; + $(".reply-num").text("(" + replyNum + ")"); + + //获取并传送回复用户数据 + var userInfo = { + "replyType" : "homework_assignment", + "replyContent" : postInput + }; + + $.ajax({ + type: "POST", //提交方式 + dataType: "json", //类型 + url: "前台地址/后台方法", //提交的页面,方法名 + data: userInfo, //参数,如果没有,可以为null + success: function (data) { //如果执行成功,那么执行此方法 + alert(data.d); //用data.d来获取后台传过来的json语句,或者是单纯的语句 + }, + error: function (err) { //如果执行不成功,那么执行此方法 + alert("err:" + err); + } + }); + } + + } + + //点赞效果 + var praiseClick = function(){ + var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); + praiseNum++; + $(".praise-num").text("(" + praiseNum + ")"); + } + + +}); \ No newline at end of file diff --git a/public/javascripts/wechat/course_discussion.js b/public/javascripts/wechat/course_discussion.js new file mode 100644 index 000000000..12533d5f6 --- /dev/null +++ b/public/javascripts/wechat/course_discussion.js @@ -0,0 +1,95 @@ +/** + * Created by root on 4/1/16. + */ +$(document).ready(function(){ + + var bt=baidu.template; + bt.LEFT_DELIMITER=''; + + + var apiUrl = '/api/v1/'; + + var setTemplate = function(data){ + console.log(data); + var html=bt('t:course-discussion',{discussion: data}); + $('#c-discussion-container').prepend(html); + $('.post-reply-submit').click(function(){ + replyInsert(); + }); + $('post-interactive-praise').click(function(){ + praiseClick(); + }); + }; + + var loadDataFromServer = function(id){ + //getOpenId(function(openid){ + $.ajax({ + url: apiUrl + 'messages/' + id, + dataType: 'json', + success: function(data){ + setTemplate(data.data); + }, + error: function(xhr,status,err){ + console.log(err); + } + }); + //}) + + + }; + + var homeworkUrl = window.location.search; + var homeworkID = homeworkUrl.split("=")[1]; + + loadDataFromServer(homeworkID); + + //点击回复按钮,插入回复内容 + var replyInsert = function(){ + var replyContent = $("#postInput").val(); + if (!replyContent){ + alert("请输入回复"); + }else{ + + //将用户输入内容插入最后一条回复 + $(".post-reply-wrap:last").after('
回复
'); + $(".post-reply-content:last").append(replyContent); + $(".post-reply-date:last").append(Date()); + var postInput = $("#postInput").val(); + $("#postInput").val(""); + //回复数目+1 + var replyNum = $(".post-interactive-reply").text().match(/\d+/g); + replyNum++; + $(".reply-num").text("(" + replyNum + ")"); + + //获取并传送回复用户数据 + var userInfo = { + "Type" : "Message", + "Content" : postInput + }; + + $.ajax({ + type: "POST", //提交方式 + dataType: "json", //类型 + url: "前台地址/后台方法", //提交的页面,方法名 + data: userInfo, //参数,如果没有,可以为null + success: function (data) { //如果执行成功,那么执行此方法 + alert(data.d); //用data.d来获取后台传过来的json语句,或者是单纯的语句 + }, + error: function (err) { //如果执行不成功,那么执行此方法 + alert("err:" + err); + } + }); + } + + } + + //点赞效果 + var praiseClick = function(){ + var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); + praiseNum++; + $(".praise-num").text("(" + praiseNum + ")"); + } + + +}); \ No newline at end of file diff --git a/public/javascripts/wechat/course_notice.js b/public/javascripts/wechat/course_notice.js new file mode 100644 index 000000000..f20526a5f --- /dev/null +++ b/public/javascripts/wechat/course_notice.js @@ -0,0 +1,95 @@ +/** + * Created by root on 4/1/16. + */ +$(document).ready(function(){ + + var bt=baidu.template; + bt.LEFT_DELIMITER=''; + + + var apiUrl = '/api/v1/'; + + var setTemplate = function(data){ + console.log(data); + var html=bt('t:course-notice',{course: data}); + $('#c-notice-container').prepend(html); + $('.post-reply-submit').click(function(){ + replyInsert(); + }); + $('post-interactive-praise').click(function(){ + praiseClick(); + }); + }; + + var loadDataFromServer = function(id){ + //getOpenId(function(openid){ + $.ajax({ + url: apiUrl + 'newss/' + id, + dataType: 'json', + success: function(data){ + setTemplate(data.data); + }, + error: function(xhr,status,err){ + console.log(err); + } + }); + //}) + + + }; + + var homeworkUrl = window.location.search; + var homeworkID = homeworkUrl.split("=")[1]; + + loadDataFromServer(homeworkID); + + //点击回复按钮,插入回复内容 + var replyInsert = function(){ + var replyContent = $("#postInput").val(); + if (!replyContent){ + alert("请输入回复"); + }else{ + + //将用户输入内容插入最后一条回复 + $(".post-reply-wrap:last").after('
回复
'); + $(".post-reply-content:last").append(replyContent); + $(".post-reply-date:last").append(Date()); + var postInput = $("#postInput").val(); + $("#postInput").val(""); + //回复数目+1 + var replyNum = $(".post-interactive-reply").text().match(/\d+/g); + replyNum++; + $(".reply-num").text("(" + replyNum + ")"); + + //获取并传送回复用户数据 + var userInfo = { + "replyType" : "homework_assignment", + "replyContent" : postInput + }; + + $.ajax({ + type: "POST", //提交方式 + dataType: "json", //类型 + url: "前台地址/后台方法", //提交的页面,方法名 + data: userInfo, //参数,如果没有,可以为null + success: function (data) { //如果执行成功,那么执行此方法 + alert(data.d); //用data.d来获取后台传过来的json语句,或者是单纯的语句 + }, + error: function (err) { //如果执行不成功,那么执行此方法 + alert("err:" + err); + } + }); + } + + } + + //点赞效果 + var praiseClick = function(){ + var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); + praiseNum++; + $(".praise-num").text("(" + praiseNum + ")"); + } + + +}); \ No newline at end of file diff --git a/public/javascripts/wechat/homework-detail.js b/public/javascripts/wechat/homework_detail.js similarity index 100% rename from public/javascripts/wechat/homework-detail.js rename to public/javascripts/wechat/homework_detail.js diff --git a/public/javascripts/wechat/issue_detail.js b/public/javascripts/wechat/issue_detail.js new file mode 100644 index 000000000..2a2153062 --- /dev/null +++ b/public/javascripts/wechat/issue_detail.js @@ -0,0 +1,98 @@ +/** + * Created by root on 4/1/16. + */ +/** + * Created by root on 3/31/16. + */ +$(document).ready(function(){ + + var bt=baidu.template; + bt.LEFT_DELIMITER=''; + + + var apiUrl = '/api/v1/'; + + var setTemplate = function(data){ + console.log(data); + var html=bt('t:issue-detail',{issues: data}); + $('#issue-container').prepend(html); + $('.post-reply-submit').click(function(){ + replyInsert(); + }); + $('post-interactive-praise').click(function(){ + praiseClick(); + }); + }; + + var loadDataFromServer = function(id){ + //getOpenId(function(openid){ + $.ajax({ + url: apiUrl + 'issues/' + id, + dataType: 'json', + success: function(data){ + setTemplate(data.data); + }, + error: function(xhr,status,err){ + console.log(err); + } + }); + //}) + + + }; + + var homeworkUrl = window.location.search; + var homeworkID = homeworkUrl.split("=")[1]; + + loadDataFromServer(homeworkID); + + //点击回复按钮,插入回复内容 + var replyInsert = function(){ + var replyContent = $("#postInput").val(); + if (!replyContent){ + alert("请输入回复"); + }else{ + + //将用户输入内容插入最后一条回复 + $(".post-reply-wrap:last").after('
回复
'); + $(".post-reply-content:last").append(replyContent); + $(".post-reply-date:last").append(Date()); + var postInput = $("#postInput").val(); + $("#postInput").val(""); + //回复数目+1 + var replyNum = $(".post-interactive-reply").text().match(/\d+/g); + replyNum++; + $(".reply-num").text("(" + replyNum + ")"); + + //获取并传送回复用户数据 + var userInfo = { + "replyType" : "homework_assignment", + "replyContent" : postInput + }; + + $.ajax({ + type: "POST", //提交方式 + dataType: "json", //类型 + url: "前台地址/后台方法", //提交的页面,方法名 + data: userInfo, //参数,如果没有,可以为null + success: function (data) { //如果执行成功,那么执行此方法 + alert(data.d); //用data.d来获取后台传过来的json语句,或者是单纯的语句 + }, + error: function (err) { //如果执行不成功,那么执行此方法 + alert("err:" + err); + } + }); + } + + } + + //点赞效果 + var praiseClick = function(){ + var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); + praiseNum++; + $(".praise-num").text("(" + praiseNum + ")"); + } + + +}); \ No newline at end of file diff --git a/public/javascripts/wechat/message_detail.js b/public/javascripts/wechat/message_detail.js new file mode 100644 index 000000000..279da05d9 --- /dev/null +++ b/public/javascripts/wechat/message_detail.js @@ -0,0 +1,95 @@ +/** + * Created by root on 4/1/16. + */ +$(document).ready(function(){ + + var bt=baidu.template; + bt.LEFT_DELIMITER=''; + + + var apiUrl = '/api/v1/'; + + var setTemplate = function(data){ + console.log(data); + var html=bt('t:message-detail',{message: data}); + $('#message-container').prepend(html); + $('.post-reply-submit').click(function(){ + replyInsert(); + }); + $('post-interactive-praise').click(function(){ + praiseClick(); + }); + }; + + var loadDataFromServer = function(id){ + //getOpenId(function(openid){ + $.ajax({ + url: apiUrl + 'journal_for_messages/' + id, + dataType: 'json', + success: function(data){ + setTemplate(data.data); + }, + error: function(xhr,status,err){ + console.log(err); + } + }); + //}) + + + }; + + var homeworkUrl = window.location.search; + var homeworkID = homeworkUrl.split("=")[1]; + + loadDataFromServer(homeworkID); + + //点击回复按钮,插入回复内容 + var replyInsert = function(){ + var replyContent = $("#postInput").val(); + if (!replyContent){ + alert("请输入回复"); + }else{ + + //将用户输入内容插入最后一条回复 + $(".post-reply-wrap:last").after('
回复
'); + $(".post-reply-content:last").append(replyContent); + $(".post-reply-date:last").append(Date()); + var postInput = $("#postInput").val(); + $("#postInput").val(""); + //回复数目+1 + var replyNum = $(".post-interactive-reply").text().match(/\d+/g); + replyNum++; + $(".reply-num").text("(" + replyNum + ")"); + + //获取并传送回复用户数据 + var userInfo = { + "replyType" : "homework_assignment", + "replyContent" : postInput + }; + + $.ajax({ + type: "POST", //提交方式 + dataType: "json", //类型 + url: "前台地址/后台方法", //提交的页面,方法名 + data: userInfo, //参数,如果没有,可以为null + success: function (data) { //如果执行成功,那么执行此方法 + alert(data.d); //用data.d来获取后台传过来的json语句,或者是单纯的语句 + }, + error: function (err) { //如果执行不成功,那么执行此方法 + alert("err:" + err); + } + }); + } + + } + + //点赞效果 + var praiseClick = function(){ + var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); + praiseNum++; + $(".praise-num").text("(" + praiseNum + ")"); + } + + +}); \ No newline at end of file diff --git a/public/javascripts/wechat/project_discussion.js b/public/javascripts/wechat/project_discussion.js new file mode 100644 index 000000000..0ba69c153 --- /dev/null +++ b/public/javascripts/wechat/project_discussion.js @@ -0,0 +1,3 @@ +/** + * Created by root on 4/1/16. + */ diff --git a/public/javascripts/wechat/wechat-dev.js b/public/javascripts/wechat/wechat_dev.js similarity index 100% rename from public/javascripts/wechat/wechat-dev.js rename to public/javascripts/wechat/wechat_dev.js From 58e5fe85c361c8934ab25b15a4b97888e3073b97 Mon Sep 17 00:00:00 2001 From: txz Date: Fri, 1 Apr 2016 21:28:25 +0800 Subject: [PATCH 100/209] =?UTF-8?q?issue=20=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/issue.rb | 3 +++ public/assets/wechat/issue_detail.html | 30 +++++++++-------------- public/javascripts/wechat/issue_detail.js | 2 +- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index bc2d92b1b..de60adddf 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -24,6 +24,8 @@ module Mobile IssueStatus.find(issue.status_id).name when :journals_count issue.journals.count + when :project_name + issue.project.name end end end @@ -38,6 +40,7 @@ module Mobile issue_expose :issue_assigned_to issue_expose :issue_status issue_expose :journals_count + issue_expose :project_name expose :issue_journals, using: Mobile::Entities::Journal do |f, opt| if f.is_a?(::Issue) f.journals.where("notes != null") diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 8c326d631..e1fc8aef8 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -20,39 +20,33 @@ diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 3f05b1b8e..10ddd9d7a 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -40,7 +40,8 @@
回复 ()
()
- +
+ = 0; --j){ !>
@@ -54,6 +55,7 @@
+
@@ -66,6 +68,20 @@
+ + diff --git a/public/javascripts/wechat/homework_detail.js b/public/javascripts/wechat/homework_detail.js index 92796cf3f..094a1d432 100644 --- a/public/javascripts/wechat/homework_detail.js +++ b/public/javascripts/wechat/homework_detail.js @@ -10,6 +10,12 @@ $(document).ready(function(){ var apiUrl = '/api/v1/'; + var setReplyTemplate = function(data){ + console.log(data); + var html=bt('t:homework-detail-reply',{reply: data}); + $('#all_homework_reply').prepend(html); + }; + var setTemplate = function(data){ console.log(data); var html=bt('t:homework-detail',{homework: data}); @@ -51,10 +57,10 @@ $(document).ready(function(){ alert("请输入回复"); }else{ - //将用户输入内容插入最后一条回复 + /*//将用户输入内容插入最后一条回复 $(".post-reply-wrap:last").after('
回复
'); $(".post-reply-content:last").append(replyContent); - $(".post-reply-date:last").append(Date()); + $(".post-reply-date:last").append(Date());*/ var postInput = $("#postInput").val(); $("#postInput").val(""); //回复数目+1 @@ -75,6 +81,7 @@ $(document).ready(function(){ data: userInfo, //参数,如果没有,可以为null success: function (data) { //如果执行成功,那么执行此方法 alert(data.result); //用data.d来获取后台传过来的json语句,或者是单纯的语句 + setReplyTemplate(data.data); }, error: function (err) { //如果执行不成功,那么执行此方法 alert("err:" + err); diff --git a/public/javascripts/wechat/wechat_dev.js b/public/javascripts/wechat/wechat_dev.js index c921ed64d..6ed55c624 100644 --- a/public/javascripts/wechat/wechat_dev.js +++ b/public/javascripts/wechat/wechat_dev.js @@ -2,5 +2,5 @@ * Created by root on 3/25/16. */ $(document).ready(function(){ - loadDataFromServer(8686, 0); + loadDataFromServer(868, 0); }); From 3b70970651bc0d453901a33e509efb3e79b62878 Mon Sep 17 00:00:00 2001 From: txz Date: Fri, 1 Apr 2016 23:21:18 +0800 Subject: [PATCH 104/209] =?UTF-8?q?=E9=97=AE=E9=A2=98=E8=B7=9F=E8=B8=AA?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/homework_detail.html | 5 ++--- public/assets/wechat/issue_detail.html | 10 ++++------ public/javascripts/wechat/issue_detail.js | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 3f05b1b8e..f1a86d2fb 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -19,7 +19,6 @@ diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index e1fc8aef8..fd9f93aa1 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -37,15 +37,16 @@
回复 ()
-
赞 ()
+
赞 ()
+
-
+
回复
@@ -53,6 +54,7 @@
+
@@ -67,6 +69,20 @@
+ + diff --git a/public/javascripts/wechat/issue_detail.js b/public/javascripts/wechat/issue_detail.js index dcd5ae723..3ddd03356 100644 --- a/public/javascripts/wechat/issue_detail.js +++ b/public/javascripts/wechat/issue_detail.js @@ -13,12 +13,19 @@ $(document).ready(function(){ var apiUrl = '/api/v1/'; + var setReplyTemplate = function(data){ + console.log(data); + var html=bt('t:issue-detail-reply',{reply: data}); + $('#all_issue_reply').prepend(html); + }; + + var setTemplate = function(data){ console.log(data); var html=bt('t:issue-detail',{issues: data}); $('#issue-container').prepend(html); $('.post-reply-submit').click(function(){ - replyInsert(); + IssueReplyInsert(); }); /*$('post-interactive-praise').click(function(){ praiseClick(); @@ -48,16 +55,16 @@ $(document).ready(function(){ loadDataFromServer(homeworkID); //点击回复按钮,插入回复内容 - var replyInsert = function(){ + var IssueReplyInsert = function(){ var replyContent = $("#postInput").val(); if (!replyContent){ alert("请输入回复"); }else{ //将用户输入内容插入最后一条回复 - $(".post-reply-wrap:last").after('
回复
'); + /*$(".post-reply-wrap:last").after('
回复
'); $(".post-reply-content:last").append(replyContent); - $(".post-reply-date:last").append(Date()); + $(".post-reply-date:last").append(Date());*/ var postInput = $("#postInput").val(); $("#postInput").val(""); //回复数目+1 @@ -78,6 +85,7 @@ $(document).ready(function(){ data: userInfo, //参数,如果没有,可以为null success: function (data) { //如果执行成功,那么执行此方法 alert(data.result); //用data.d来获取后台传过来的json语句,或者是单纯的语句 + setReplyTemplate(data.data); }, error: function (err) { //如果执行不成功,那么执行此方法 alert("err:" + err); diff --git a/public/javascripts/wechat/wechat_dev.js b/public/javascripts/wechat/wechat_dev.js index 6ed55c624..c921ed64d 100644 --- a/public/javascripts/wechat/wechat_dev.js +++ b/public/javascripts/wechat/wechat_dev.js @@ -2,5 +2,5 @@ * Created by root on 3/25/16. */ $(document).ready(function(){ - loadDataFromServer(868, 0); + loadDataFromServer(8686, 0); }); From d47f887fd13a5c5129b8eefebdc727e0c78dcb6e Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 1 Apr 2016 23:48:29 +0800 Subject: [PATCH 106/209] =?UTF-8?q?issue=E5=9B=9E=E5=A4=8D=E7=9A=84?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/issue_detail.html | 14 ++++++-------- public/javascripts/wechat/homework_detail.js | 1 - public/javascripts/wechat/issue_detail.js | 15 +++++++-------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 89fa4c689..964ea7d5b 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -36,10 +36,8 @@
-
回复 ()
-
赞 ()
-
回复 ()
-
()
+
回复 ()
+
()
= 0; --j){ !> @@ -72,11 +70,11 @@ + + diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index 6c508ab9c..6765281fa 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -36,14 +36,15 @@
回复 ()
-
1
+
()
- +
+ = 0; --j){ !>
-
+
- +
回复
@@ -52,11 +53,12 @@
+
- +
@@ -64,6 +66,22 @@
+ + + + diff --git a/public/javascripts/wechat/course_discussion.js b/public/javascripts/wechat/course_discussion.js index 12533d5f6..e01b6b451 100644 --- a/public/javascripts/wechat/course_discussion.js +++ b/public/javascripts/wechat/course_discussion.js @@ -10,6 +10,12 @@ $(document).ready(function(){ var apiUrl = '/api/v1/'; + var setReplyTemplate = function(data){ + console.log(data); + var html=bt('t:c-message-detail-reply',{reply: data}); + $('#all_course_message_reply').prepend(html); + }; + var setTemplate = function(data){ console.log(data); var html=bt('t:course-discussion',{discussion: data}); @@ -17,9 +23,9 @@ $(document).ready(function(){ $('.post-reply-submit').click(function(){ replyInsert(); }); - $('post-interactive-praise').click(function(){ + /*$('post-interactive-praise').click(function(){ praiseClick(); - }); + });*/ }; var loadDataFromServer = function(id){ @@ -52,9 +58,9 @@ $(document).ready(function(){ }else{ //将用户输入内容插入最后一条回复 - $(".post-reply-wrap:last").after('
回复
'); + /*$(".post-reply-wrap:last").after('
回复
'); $(".post-reply-content:last").append(replyContent); - $(".post-reply-date:last").append(Date()); + $(".post-reply-date:last").append(Date());*/ var postInput = $("#postInput").val(); $("#postInput").val(""); //回复数目+1 @@ -71,10 +77,11 @@ $(document).ready(function(){ $.ajax({ type: "POST", //提交方式 dataType: "json", //类型 - url: "前台地址/后台方法", //提交的页面,方法名 + url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名 data: userInfo, //参数,如果没有,可以为null success: function (data) { //如果执行成功,那么执行此方法 - alert(data.d); //用data.d来获取后台传过来的json语句,或者是单纯的语句 + setReplyTemplate(data.data); + alert("6"); }, error: function (err) { //如果执行不成功,那么执行此方法 alert("err:" + err); @@ -84,12 +91,12 @@ $(document).ready(function(){ } - //点赞效果 + /*//点赞效果 var praiseClick = function(){ var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); praiseNum++; $(".praise-num").text("(" + praiseNum + ")"); - } + }*/ }); \ No newline at end of file diff --git a/public/javascripts/wechat/course_notice.js b/public/javascripts/wechat/course_notice.js index f20526a5f..546aac385 100644 --- a/public/javascripts/wechat/course_notice.js +++ b/public/javascripts/wechat/course_notice.js @@ -10,6 +10,12 @@ $(document).ready(function(){ var apiUrl = '/api/v1/'; + var setReplyTemplate = function(data){ + console.log(data); + var html=bt('t:news-detail-reply',{reply: data}); + $('#all_news_reply').prepend(html); + }; + var setTemplate = function(data){ console.log(data); var html=bt('t:course-notice',{course: data}); @@ -17,9 +23,9 @@ $(document).ready(function(){ $('.post-reply-submit').click(function(){ replyInsert(); }); - $('post-interactive-praise').click(function(){ + /*$('post-interactive-praise').click(function(){ praiseClick(); - }); + });*/ }; var loadDataFromServer = function(id){ @@ -52,9 +58,9 @@ $(document).ready(function(){ }else{ //将用户输入内容插入最后一条回复 - $(".post-reply-wrap:last").after('
回复
'); + /*$(".post-reply-wrap:last").after('
回复
'); $(".post-reply-content:last").append(replyContent); - $(".post-reply-date:last").append(Date()); + $(".post-reply-date:last").append(Date());*/ var postInput = $("#postInput").val(); $("#postInput").val(""); //回复数目+1 @@ -64,17 +70,17 @@ $(document).ready(function(){ //获取并传送回复用户数据 var userInfo = { - "replyType" : "homework_assignment", - "replyContent" : postInput + "type" : "News", + "content" : postInput }; $.ajax({ type: "POST", //提交方式 dataType: "json", //类型 - url: "前台地址/后台方法", //提交的页面,方法名 + url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名 data: userInfo, //参数,如果没有,可以为null success: function (data) { //如果执行成功,那么执行此方法 - alert(data.d); //用data.d来获取后台传过来的json语句,或者是单纯的语句 + setReplyTemplate(data.data); }, error: function (err) { //如果执行不成功,那么执行此方法 alert("err:" + err); From 5839959f0a256cf2c73026f43652affa528bf291 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 2 Apr 2016 07:32:40 +0800 Subject: [PATCH 109/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9openid=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 53 +------------------------ public/javascripts/wechat/auth.js | 3 ++ public/javascripts/wechat/wechat_dev.js | 49 +++++++++++++++++++++++ 3 files changed, 53 insertions(+), 52 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index ea730d4f7..2fb2fa81d 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -219,58 +219,7 @@ - - + \ No newline at end of file diff --git a/public/javascripts/wechat/auth.js b/public/javascripts/wechat/auth.js index 1d9682720..79f5f96a1 100644 --- a/public/javascripts/wechat/auth.js +++ b/public/javascripts/wechat/auth.js @@ -15,16 +15,19 @@ $(function(){ } window.getOpenId = function(cb){ + alert(g_openid); if (g_openid.length>0){ cb(g_openid); } var code = getUrlParam("code"); + alert(code); $.ajax({ url: '/wechat/get_open_id?code='+code, type: 'get', dataType: 'json', success: function(data){ g_openid = data.openid; + alert(g_openid); cb(g_openid); }, error: function(xhr,err){ diff --git a/public/javascripts/wechat/wechat_dev.js b/public/javascripts/wechat/wechat_dev.js index c921ed64d..18fe67e1f 100644 --- a/public/javascripts/wechat/wechat_dev.js +++ b/public/javascripts/wechat/wechat_dev.js @@ -2,5 +2,54 @@ * Created by root on 3/25/16. */ $(document).ready(function(){ + + var bt=baidu.template; + bt.LEFT_DELIMITER=''; + + var apiUrl = '/api/v1/'; + var loadDataFromServer = function(id, page){ + getOpenId(function(openid){ + $.ajax({ + url: apiUrl + 'activities/' + openid +"?page=" + parseInt(page), + dataType: 'json', + success: function(data){ + setTemplate(data.data, data.all_count, data.count, data.page); + }, + error: function(xhr,status,err){ + console.log(err); + } + }); + }) + + }; + var setTemplate = function(data, all_count, count, page){ + console.log(data); + var html=bt('t:result-list',{activities: data, all_count: all_count, count: count, page: page}); + if (page == 0) { + $('#container').prepend(html); + } else { + $("#more_activities").remove(); + $('#container').append(html); + } + descToggle(); + }; + //内容全部显示与部分隐藏 + var descToggle = function(){ + $(".post-all-content").each(function(){ + var postHeight = $(this).height(); + if (postHeight > 90){ + $(this).parent().next().css("display","block"); + $(this).parent().next().toggle(function(){ + $(this).text("点击隐藏"); + $(this).prev().css("height",postHeight); + },function(){ + $(this).text("点击展开"); + $(this).prev().css("height",90); + }); + } + }); + } + loadDataFromServer(8686, 0); }); From 7d4de365216a1a13b26cef7b84253fb00fa23708 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 2 Apr 2016 07:39:46 +0800 Subject: [PATCH 110/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9openid=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/activities.rb | 6 +++--- public/assets/wechat/blog_detail.html | 2 +- public/assets/wechat/course_discussion.html | 2 +- public/assets/wechat/course_notice.html | 2 +- public/assets/wechat/homework_detail.html | 2 +- public/assets/wechat/issue_detail.html | 2 +- public/assets/wechat/message_detail.html | 2 +- public/assets/wechat/project_discussion.html | 2 +- public/javascripts/wechat/wechat_dev.js | 4 +++- 9 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/api/mobile/apis/activities.rb b/app/api/mobile/apis/activities.rb index 9329ea860..15f244715 100644 --- a/app/api/mobile/apis/activities.rb +++ b/app/api/mobile/apis/activities.rb @@ -9,10 +9,10 @@ module Mobile params do requires :page, type: Integer + requires :token, type: String end - get ':id' do - #uw = UserWechat.find params[:openid] - user = User.find params[:id] + post do + user = UserWechat.find_by_openid(params[:openid]) shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id) shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id) page = params[:page] ? params[:page] : 0 diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index 8b3f44eb5..dd40df5ab 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -66,8 +66,8 @@ - + \ No newline at end of file diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index acef95c64..93982d70c 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -82,8 +82,8 @@ - + \ No newline at end of file diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index 6765281fa..33ea6fe4b 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -84,8 +84,8 @@ - + \ No newline at end of file diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index c4f7b8ad2..6f7449754 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -83,8 +83,8 @@ - + \ No newline at end of file diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 964ea7d5b..8a3cb73b1 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -83,7 +83,7 @@ - + \ No newline at end of file diff --git a/public/assets/wechat/message_detail.html b/public/assets/wechat/message_detail.html index 04563184f..3709f65cf 100644 --- a/public/assets/wechat/message_detail.html +++ b/public/assets/wechat/message_detail.html @@ -64,8 +64,8 @@ - + \ No newline at end of file diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index 5201d8299..0c0428a03 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -66,8 +66,8 @@ - + \ No newline at end of file diff --git a/public/javascripts/wechat/wechat_dev.js b/public/javascripts/wechat/wechat_dev.js index 18fe67e1f..36529e0b8 100644 --- a/public/javascripts/wechat/wechat_dev.js +++ b/public/javascripts/wechat/wechat_dev.js @@ -11,7 +11,9 @@ $(document).ready(function(){ var loadDataFromServer = function(id, page){ getOpenId(function(openid){ $.ajax({ - url: apiUrl + 'activities/' + openid +"?page=" + parseInt(page), + url: apiUrl + 'activities', + data: {openid: openid, page: page}, + type: 'POST', dataType: 'json', success: function(data){ setTemplate(data.data, data.all_count, data.count, data.page); From 9c93b3f9a6c2b0b6ddb958caef6d691fbdcfa081 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 2 Apr 2016 07:43:55 +0800 Subject: [PATCH 111/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9openid=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 5 ++++- public/javascripts/wechat/auth.js | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index e9dc03f0e..65189daa1 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -214,7 +214,10 @@ class WechatsController < ActionController::Base private def get_openid(code) url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=#{Wechat.config.appid}&secret=#{Wechat.config.secret}&code=#{code}&grant_type=authorization_code" - JSON.parse(URI.parse(url).read)["openid"] + logger.debug url + body = URI.parse(url).read + logger.debug body + JSON.parse(body)["openid"] end diff --git a/public/javascripts/wechat/auth.js b/public/javascripts/wechat/auth.js index 79f5f96a1..44c90c836 100644 --- a/public/javascripts/wechat/auth.js +++ b/public/javascripts/wechat/auth.js @@ -15,12 +15,10 @@ $(function(){ } window.getOpenId = function(cb){ - alert(g_openid); if (g_openid.length>0){ cb(g_openid); } var code = getUrlParam("code"); - alert(code); $.ajax({ url: '/wechat/get_open_id?code='+code, type: 'get', From a25fe6cef8e83dc599a816a408ea5221e42aeefb Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 2 Apr 2016 07:47:34 +0800 Subject: [PATCH 112/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9openid=E8=B7=AF?= =?UTF-8?q?=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 65189daa1..ed890d1e1 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -175,7 +175,7 @@ class WechatsController < ActionController::Base def get_open_id begin raise "非法操作, code不存在" unless params[:code] - openid = get_openid(params[:code]) + openid = get_openid_from_code(params[:code]) raise "无法获取到openid" unless openid render :text => {status:0, openid: openid}.to_json rescue Exception=>e @@ -186,7 +186,7 @@ class WechatsController < ActionController::Base def bind begin raise "非法操作, code不存在" unless params[:code] - openid = get_openid(params[:code]) + openid = get_openid_from_code(params[:code]) raise "无法获取到openid" unless openid raise "此微信号已绑定用户, 不能得复绑定" if user_binded?(openid) @@ -211,8 +211,15 @@ class WechatsController < ActionController::Base render 'wechats/login', layout: 'base_wechat' end + def get_openid + code = params[:code] + openid = get_openid_from_code(code) + render :text => {openid: openid}.to_json + end + + private - def get_openid(code) + def get_openid_from_code(code) url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=#{Wechat.config.appid}&secret=#{Wechat.config.secret}&code=#{code}&grant_type=authorization_code" logger.debug url body = URI.parse(url).read @@ -220,7 +227,6 @@ class WechatsController < ActionController::Base JSON.parse(body)["openid"] end - def user_binded?(openid) uw = UserWechat.where(openid: openid).first end From 1926f0ba533682bdcb98eb1ff5aaa7a78c0ae69f Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 2 Apr 2016 07:49:36 +0800 Subject: [PATCH 113/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9openid=E8=B7=AF?= =?UTF-8?q?=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 7 ------- config/routes.rb | 2 +- public/javascripts/wechat/auth.js | 5 +++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index ed890d1e1..8863043a5 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -211,13 +211,6 @@ class WechatsController < ActionController::Base render 'wechats/login', layout: 'base_wechat' end - def get_openid - code = params[:code] - openid = get_openid_from_code(code) - render :text => {openid: openid}.to_json - end - - private def get_openid_from_code(code) url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=#{Wechat.config.appid}&secret=#{Wechat.config.secret}&code=#{code}&grant_type=authorization_code" diff --git a/config/routes.rb b/config/routes.rb index 2313088cc..327c6af8d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1165,7 +1165,7 @@ RedmineApp::Application.routes.draw do collection do get :login post :bind - get :get_open_id + post :get_open_id end end diff --git a/public/javascripts/wechat/auth.js b/public/javascripts/wechat/auth.js index 44c90c836..e2f8424d4 100644 --- a/public/javascripts/wechat/auth.js +++ b/public/javascripts/wechat/auth.js @@ -20,8 +20,9 @@ $(function(){ } var code = getUrlParam("code"); $.ajax({ - url: '/wechat/get_open_id?code='+code, - type: 'get', + url: '/wechat/get_open_id', + data: {code: code}, + type: 'post', dataType: 'json', success: function(data){ g_openid = data.openid; From ff93e9f79b6d5fea02887db2849461b9a8b0a140 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 2 Apr 2016 07:56:12 +0800 Subject: [PATCH 114/209] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E4=B8=BAjson?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 8863043a5..dac449834 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -177,9 +177,9 @@ class WechatsController < ActionController::Base raise "非法操作, code不存在" unless params[:code] openid = get_openid_from_code(params[:code]) raise "无法获取到openid" unless openid - render :text => {status:0, openid: openid}.to_json + render :json => {status:0, openid: openid} rescue Exception=>e - render :text => {status: -1, msg: e.message}.to_json + render :json => {status: -1, msg: e.message} end end @@ -200,9 +200,9 @@ class WechatsController < ActionController::Base openid: openid, user: user ) - render :text => {status:0, msg: "绑定成功"}.to_json + render :json => {status:0, msg: "绑定成功"} rescue Exception=>e - render :text => {status: -1, msg: e.message}.to_json + render :json => {status: -1, msg: e.message} end end From e1f1c6fbc08af9c6565887825e0356c2b05507e3 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 2 Apr 2016 08:05:49 +0800 Subject: [PATCH 115/209] =?UTF-8?q?openid=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/activities.rb | 2 +- public/javascripts/wechat/auth.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/api/mobile/apis/activities.rb b/app/api/mobile/apis/activities.rb index 15f244715..9d75b8560 100644 --- a/app/api/mobile/apis/activities.rb +++ b/app/api/mobile/apis/activities.rb @@ -9,7 +9,7 @@ module Mobile params do requires :page, type: Integer - requires :token, type: String + requires :openid, type: String end post do user = UserWechat.find_by_openid(params[:openid]) diff --git a/public/javascripts/wechat/auth.js b/public/javascripts/wechat/auth.js index e2f8424d4..f9c2917fc 100644 --- a/public/javascripts/wechat/auth.js +++ b/public/javascripts/wechat/auth.js @@ -26,7 +26,6 @@ $(function(){ dataType: 'json', success: function(data){ g_openid = data.openid; - alert(g_openid); cb(g_openid); }, error: function(xhr,err){ From a6a0681b78d13b2f55101ca153c6436d05029025 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 2 Apr 2016 08:08:03 +0800 Subject: [PATCH 116/209] =?UTF-8?q?openid=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/activities.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/mobile/apis/activities.rb b/app/api/mobile/apis/activities.rb index 9d75b8560..c7f8509ae 100644 --- a/app/api/mobile/apis/activities.rb +++ b/app/api/mobile/apis/activities.rb @@ -12,7 +12,7 @@ module Mobile requires :openid, type: String end post do - user = UserWechat.find_by_openid(params[:openid]) + user = UserWechat.find_by_openid(params[:openid]).user shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id) shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id) page = params[:page] ? params[:page] : 0 From 58c1b276005f5d582c0c7875cf3d74521df6bdd7 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 2 Apr 2016 08:13:52 +0800 Subject: [PATCH 117/209] =?UTF-8?q?=E5=8A=A0=E5=85=A5openid=E4=BC=A0?= =?UTF-8?q?=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/new_comment.rb | 3 +- public/javascripts/wechat/homework_detail.js | 37 +++++++++++--------- public/javascripts/wechat/issue_detail.js | 37 +++++++++++--------- 3 files changed, 42 insertions(+), 35 deletions(-) diff --git a/app/api/mobile/apis/new_comment.rb b/app/api/mobile/apis/new_comment.rb index 8c46d530c..8b27803ad 100644 --- a/app/api/mobile/apis/new_comment.rb +++ b/app/api/mobile/apis/new_comment.rb @@ -11,11 +11,12 @@ module Mobile params do requires :type, type: String requires :content, type: String + requires :openid, type: String end post ':id' do type = params[:type] result = 1 - current_user = User.find 8686 + current_user = UserWechat.find_by_openid(params[:openid]).user if params[:content]!="" && current_user case type when "HomeworkCommon" diff --git a/public/javascripts/wechat/homework_detail.js b/public/javascripts/wechat/homework_detail.js index 39d016133..166ed20bf 100644 --- a/public/javascripts/wechat/homework_detail.js +++ b/public/javascripts/wechat/homework_detail.js @@ -68,23 +68,26 @@ $(document).ready(function(){ replyNum++; $(".reply-num").text("(" + replyNum + ")"); - //获取并传送回复用户数据 - var userInfo = { - "type" : "HomeworkCommon", - "content" : postInput - }; - - $.ajax({ - type: "POST", //提交方式 - dataType: "json", //类型 - url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名 - data: userInfo, //参数,如果没有,可以为null - success: function (data) { //如果执行成功,那么执行此方法 - setReplyTemplate(data.data); - }, - error: function (err) { //如果执行不成功,那么执行此方法 - alert("err:" + err); - } + getOpenId(function(openid) { + //获取并传送回复用户数据 + var userInfo = { + "type": "HomeworkCommon", + "content": postInput, + openid: openid + }; + + $.ajax({ + type: "POST", //提交方式 + dataType: "json", //类型 + url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名 + data: userInfo, //参数,如果没有,可以为null + success: function (data) { //如果执行成功,那么执行此方法 + setReplyTemplate(data.data); + }, + error: function (err) { //如果执行不成功,那么执行此方法 + alert("err:" + err); + } + }) }); } diff --git a/public/javascripts/wechat/issue_detail.js b/public/javascripts/wechat/issue_detail.js index 03ebda233..2b2766d29 100644 --- a/public/javascripts/wechat/issue_detail.js +++ b/public/javascripts/wechat/issue_detail.js @@ -72,23 +72,26 @@ $(document).ready(function(){ replyNum++; $(".reply-num").text("(" + replyNum + ")"); - //获取并传送回复用户数据 - var userInfo = { - "type" : "Issue", - "content" : postInput - }; - - $.ajax({ - type: "POST", //提交方式 - dataType: "json", //类型 - url: apiUrl + 'new_comment/' + IssueID, //提交的页面,方法名 - data: userInfo, //参数,如果没有,可以为null - success: function (data) { //如果执行成功,那么执行此方法 - setReplyTemplate(data.data); - }, - error: function (err) { //如果执行不成功,那么执行此方法 - alert("err:" + err); - } + getOpenId(function(openid) { + //获取并传送回复用户数据 + var userInfo = { + "type": "Issue", + "content": postInput, + openid: openid, + }; + + $.ajax({ + type: "POST", //提交方式 + dataType: "json", //类型 + url: apiUrl + 'new_comment/' + IssueID, //提交的页面,方法名 + data: userInfo, //参数,如果没有,可以为null + success: function (data) { //如果执行成功,那么执行此方法 + setReplyTemplate(data.data); + }, + error: function (err) { //如果执行不成功,那么执行此方法 + alert("err:" + err); + } + }) }); } From 36f3e3a46ca4c0307aa8c3241463f686996d1552 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 4 Apr 2016 22:24:13 +0800 Subject: [PATCH 118/209] =?UTF-8?q?=E6=94=B9=E4=B8=BAangularjs=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 386 +- public/assets/wechat/app.html | 25 + public/assets/wechat/issue_detail.html | 69 +- public/javascripts/wechat/JSXTransformer.js | 15924 -------------- public/javascripts/wechat/ReactRouter.js | 5064 ----- public/javascripts/wechat/ReactRouter.min.js | 2 - public/javascripts/wechat/app.js | 131 + public/javascripts/wechat/browser.min.js | 44 - public/javascripts/wechat/marked.min.js | 6 - public/javascripts/wechat/react-dom.js | 42 - public/javascripts/wechat/react.js | 19535 ----------------- public/javascripts/wechat/react.min.js | 15 - public/javascripts/wechat/wechat.jsx | 97 - 13 files changed, 365 insertions(+), 40975 deletions(-) create mode 100644 public/assets/wechat/app.html delete mode 100644 public/javascripts/wechat/JSXTransformer.js delete mode 100644 public/javascripts/wechat/ReactRouter.js delete mode 100644 public/javascripts/wechat/ReactRouter.min.js create mode 100644 public/javascripts/wechat/app.js delete mode 100644 public/javascripts/wechat/browser.min.js delete mode 100644 public/javascripts/wechat/marked.min.js delete mode 100644 public/javascripts/wechat/react-dom.js delete mode 100644 public/javascripts/wechat/react.js delete mode 100644 public/javascripts/wechat/react.min.js delete mode 100644 public/javascripts/wechat/wechat.jsx diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 2fb2fa81d..05ce3eb16 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -1,225 +1,217 @@ - - - - 最新动态 - - - - - - - - - - - -
- - - - - - - - - - - - - \ No newline at end of file + + + +
更多
+ + + diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html new file mode 100644 index 000000000..ef8e06d64 --- /dev/null +++ b/public/assets/wechat/app.html @@ -0,0 +1,25 @@ + + + + 最新动态 + + + + + + + + + + + +
+ + + + + + + + + \ No newline at end of file diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 8a3cb73b1..b8fdc5928 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -1,89 +1,60 @@ - - - - 问题跟踪 - - - - - - - - - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/public/javascripts/wechat/JSXTransformer.js b/public/javascripts/wechat/JSXTransformer.js deleted file mode 100644 index 63608d408..000000000 --- a/public/javascripts/wechat/JSXTransformer.js +++ /dev/null @@ -1,15924 +0,0 @@ -/** - * JSXTransformer v0.13.0 - */ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSXTransformer = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o - * @license MIT - */ - -var base64 = _dereq_('base64-js') -var ieee754 = _dereq_('ieee754') -var isArray = _dereq_('is-array') - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 -Buffer.poolSize = 8192 // not used by this implementation - -var kMaxLength = 0x3fffffff -var rootParent = {} - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Note: - * - * - Implementation must support adding new properties to `Uint8Array` instances. - * Firefox 4-29 lacked support, fixed in Firefox 30+. - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - * - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will - * get the Object implementation, which is slower but will work correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = (function () { - try { - var buf = new ArrayBuffer(0) - var arr = new Uint8Array(buf) - arr.foo = function () { return 42 } - return arr.foo() === 42 && // typed array instances can be augmented - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -})() - -/** - * Class: Buffer - * ============= - * - * The Buffer constructor returns instances of `Uint8Array` that are augmented - * with function properties for all the node `Buffer` API functions. We use - * `Uint8Array` so that square bracket notation works as expected -- it returns - * a single octet. - * - * By augmenting the instances, we can avoid modifying the `Uint8Array` - * prototype. - */ -function Buffer (subject, encoding, noZero) { - if (!(this instanceof Buffer)) return new Buffer(subject, encoding, noZero) - - var type = typeof subject - var length - - if (type === 'number') { - length = +subject - } else if (type === 'string') { - length = Buffer.byteLength(subject, encoding) - } else if (type === 'object' && subject !== null) { - // assume object is array-like - if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data - length = +subject.length - } else { - throw new TypeError('must start with number, buffer, array or string') - } - - if (length > kMaxLength) { - throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + - kMaxLength.toString(16) + ' bytes') - } - - if (length < 0) length = 0 - else length >>>= 0 // coerce to uint32 - - var self = this - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Preferred: Return an augmented `Uint8Array` instance for best performance - /*eslint-disable consistent-this */ - self = Buffer._augment(new Uint8Array(length)) - /*eslint-enable consistent-this */ - } else { - // Fallback: Return THIS instance of Buffer (created by `new`) - self.length = length - self._isBuffer = true - } - - var i - if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') { - // Speed optimization -- use set if we're copying from a typed array - self._set(subject) - } else if (isArrayish(subject)) { - // Treat array-ish objects as a byte array - if (Buffer.isBuffer(subject)) { - for (i = 0; i < length; i++) { - self[i] = subject.readUInt8(i) - } - } else { - for (i = 0; i < length; i++) { - self[i] = ((subject[i] % 256) + 256) % 256 - } - } - } else if (type === 'string') { - self.write(subject, 0, encoding) - } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) { - for (i = 0; i < length; i++) { - self[i] = 0 - } - } - - if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent - - return self -} - -function SlowBuffer (subject, encoding, noZero) { - if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding, noZero) - - var buf = new Buffer(subject, encoding, noZero) - delete buf.parent - return buf -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - for (var i = 0, len = Math.min(x, y); i < len && a[i] === b[i]; i++) {} - if (i !== len) { - x = a[i] - y = b[i] - } - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'raw': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, totalLength) { - if (!isArray(list)) throw new TypeError('Usage: Buffer.concat(list[, length])') - - if (list.length === 0) { - return new Buffer(0) - } else if (list.length === 1) { - return list[0] - } - - var i - if (totalLength === undefined) { - totalLength = 0 - for (i = 0; i < list.length; i++) { - totalLength += list[i].length - } - } - - var buf = new Buffer(totalLength) - var pos = 0 - for (i = 0; i < list.length; i++) { - var item = list[i] - item.copy(buf, pos) - pos += item.length - } - return buf -} - -Buffer.byteLength = function byteLength (str, encoding) { - var ret - str = str + '' - switch (encoding || 'utf8') { - case 'ascii': - case 'binary': - case 'raw': - ret = str.length - break - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - ret = str.length * 2 - break - case 'hex': - ret = str.length >>> 1 - break - case 'utf8': - case 'utf-8': - ret = utf8ToBytes(str).length - break - case 'base64': - ret = base64ToBytes(str).length - break - default: - ret = str.length - } - return ret -} - -// pre-set for values that may exist in the future -Buffer.prototype.length = undefined -Buffer.prototype.parent = undefined - -// toString(encoding, start=0, end=buffer.length) -Buffer.prototype.toString = function toString (encoding, start, end) { - var loweredCase = false - - start = start >>> 0 - end = end === undefined || end === Infinity ? this.length : end >>> 0 - - if (!encoding) encoding = 'utf8' - if (start < 0) start = 0 - if (end > this.length) end = this.length - if (end <= start) return '' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'binary': - return binarySlice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} - -Buffer.prototype.compare = function compare (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return 0 - return Buffer.compare(this, b) -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset) { - if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff - else if (byteOffset < -0x80000000) byteOffset = -0x80000000 - byteOffset >>= 0 - - if (this.length === 0) return -1 - if (byteOffset >= this.length) return -1 - - // Negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) - - if (typeof val === 'string') { - if (val.length === 0) return -1 // special case: looking for empty string always fails - return String.prototype.indexOf.call(this, val, byteOffset) - } - if (Buffer.isBuffer(val)) { - return arrayIndexOf(this, val, byteOffset) - } - if (typeof val === 'number') { - if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { - return Uint8Array.prototype.indexOf.call(this, val, byteOffset) - } - return arrayIndexOf(this, [ val ], byteOffset) - } - - function arrayIndexOf (arr, val, byteOffset) { - var foundIndex = -1 - for (var i = 0; byteOffset + i < arr.length; i++) { - if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex - } else { - foundIndex = -1 - } - } - return -1 - } - - throw new TypeError('val must be string, number or Buffer') -} - -// `get` will be removed in Node 0.13+ -Buffer.prototype.get = function get (offset) { - console.log('.get() is deprecated. Access using array indexes instead.') - return this.readUInt8(offset) -} - -// `set` will be removed in Node 0.13+ -Buffer.prototype.set = function set (v, offset) { - console.log('.set() is deprecated. Access using array indexes instead.') - return this.writeUInt8(v, offset) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new Error('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; i++) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) throw new Error('Invalid hex string') - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - var charsWritten = blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) - return charsWritten -} - -function asciiWrite (buf, string, offset, length) { - var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length) - return charsWritten -} - -function binaryWrite (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length) - return charsWritten -} - -function utf16leWrite (buf, string, offset, length) { - var charsWritten = blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) - return charsWritten -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Support both (string, offset, length, encoding) - // and the legacy (string, encoding, offset, length) - if (isFinite(offset)) { - if (!isFinite(length)) { - encoding = length - length = undefined - } - } else { // legacy - var swap = encoding - encoding = offset - offset = length - length = swap - } - - offset = Number(offset) || 0 - - if (length < 0 || offset < 0 || offset > this.length) { - throw new RangeError('attempt to write outside buffer bounds') - } - - var remaining = this.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - encoding = String(encoding || 'utf8').toLowerCase() - - var ret - switch (encoding) { - case 'hex': - ret = hexWrite(this, string, offset, length) - break - case 'utf8': - case 'utf-8': - ret = utf8Write(this, string, offset, length) - break - case 'ascii': - ret = asciiWrite(this, string, offset, length) - break - case 'binary': - ret = binaryWrite(this, string, offset, length) - break - case 'base64': - ret = base64Write(this, string, offset, length) - break - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - ret = utf16leWrite(this, string, offset, length) - break - default: - throw new TypeError('Unknown encoding: ' + encoding) - } - return ret -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - var res = '' - var tmp = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - if (buf[i] <= 0x7F) { - res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i]) - tmp = '' - } else { - tmp += '%' + buf[i].toString(16) - } - } - - return res + decodeUtf8Char(tmp) -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function binarySlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; i++) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = Buffer._augment(this.subarray(start, end)) - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined, true) - for (var i = 0; i < sliceLen; i++) { - newBuf[i] = this[i + start] - } - } - - if (newBuf.length) newBuf.parent = this.parent || this - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) >>> 0 & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) >>> 0 & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = value - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = value - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = value - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = value - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkInt( - this, value, offset, byteLength, - Math.pow(2, 8 * byteLength - 1) - 1, - -Math.pow(2, 8 * byteLength - 1) - ) - } - - var i = 0 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkInt( - this, value, offset, byteLength, - Math.pow(2, 8 * byteLength - 1) - 1, - -Math.pow(2, 8 * byteLength - 1) - ) - } - - var i = byteLength - 1 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = value - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = value - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = value - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') - if (offset < 0) throw new RangeError('index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, target_start, start, end) { - var self = this // source - - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (target_start >= target.length) target_start = target.length - if (!target_start) target_start = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || self.length === 0) return 0 - - // Fatal error conditions - if (target_start < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= self.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - target_start < end - start) { - end = target.length - target_start + start - } - - var len = end - start - - if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < len; i++) { - target[i + target_start] = this[i + start] - } - } else { - target._set(this.subarray(start, start + len), target_start) - } - - return len -} - -// fill(value, start=0, end=buffer.length) -Buffer.prototype.fill = function fill (value, start, end) { - if (!value) value = 0 - if (!start) start = 0 - if (!end) end = this.length - - if (end < start) throw new RangeError('end < start') - - // Fill 0 bytes; we're done - if (end === start) return - if (this.length === 0) return - - if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') - if (end < 0 || end > this.length) throw new RangeError('end out of bounds') - - var i - if (typeof value === 'number') { - for (i = start; i < end; i++) { - this[i] = value - } - } else { - var bytes = utf8ToBytes(value.toString()) - var len = bytes.length - for (i = start; i < end; i++) { - this[i] = bytes[i % len] - } - } - - return this -} - -/** - * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. - * Added in Node 0.12. Only available in browsers that support ArrayBuffer. - */ -Buffer.prototype.toArrayBuffer = function toArrayBuffer () { - if (typeof Uint8Array !== 'undefined') { - if (Buffer.TYPED_ARRAY_SUPPORT) { - return (new Buffer(this)).buffer - } else { - var buf = new Uint8Array(this.length) - for (var i = 0, len = buf.length; i < len; i += 1) { - buf[i] = this[i] - } - return buf.buffer - } - } else { - throw new TypeError('Buffer.toArrayBuffer not supported in this browser') - } -} - -// HELPER FUNCTIONS -// ================ - -var BP = Buffer.prototype - -/** - * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods - */ -Buffer._augment = function _augment (arr) { - arr.constructor = Buffer - arr._isBuffer = true - - // save reference to original Uint8Array get/set methods before overwriting - arr._get = arr.get - arr._set = arr.set - - // deprecated, will be removed in node 0.13+ - arr.get = BP.get - arr.set = BP.set - - arr.write = BP.write - arr.toString = BP.toString - arr.toLocaleString = BP.toString - arr.toJSON = BP.toJSON - arr.equals = BP.equals - arr.compare = BP.compare - arr.indexOf = BP.indexOf - arr.copy = BP.copy - arr.slice = BP.slice - arr.readUIntLE = BP.readUIntLE - arr.readUIntBE = BP.readUIntBE - arr.readUInt8 = BP.readUInt8 - arr.readUInt16LE = BP.readUInt16LE - arr.readUInt16BE = BP.readUInt16BE - arr.readUInt32LE = BP.readUInt32LE - arr.readUInt32BE = BP.readUInt32BE - arr.readIntLE = BP.readIntLE - arr.readIntBE = BP.readIntBE - arr.readInt8 = BP.readInt8 - arr.readInt16LE = BP.readInt16LE - arr.readInt16BE = BP.readInt16BE - arr.readInt32LE = BP.readInt32LE - arr.readInt32BE = BP.readInt32BE - arr.readFloatLE = BP.readFloatLE - arr.readFloatBE = BP.readFloatBE - arr.readDoubleLE = BP.readDoubleLE - arr.readDoubleBE = BP.readDoubleBE - arr.writeUInt8 = BP.writeUInt8 - arr.writeUIntLE = BP.writeUIntLE - arr.writeUIntBE = BP.writeUIntBE - arr.writeUInt16LE = BP.writeUInt16LE - arr.writeUInt16BE = BP.writeUInt16BE - arr.writeUInt32LE = BP.writeUInt32LE - arr.writeUInt32BE = BP.writeUInt32BE - arr.writeIntLE = BP.writeIntLE - arr.writeIntBE = BP.writeIntBE - arr.writeInt8 = BP.writeInt8 - arr.writeInt16LE = BP.writeInt16LE - arr.writeInt16BE = BP.writeInt16BE - arr.writeInt32LE = BP.writeInt32LE - arr.writeInt32BE = BP.writeInt32BE - arr.writeFloatLE = BP.writeFloatLE - arr.writeFloatBE = BP.writeFloatBE - arr.writeDoubleLE = BP.writeDoubleLE - arr.writeDoubleBE = BP.writeDoubleBE - arr.fill = BP.fill - arr.inspect = BP.inspect - arr.toArrayBuffer = BP.toArrayBuffer - - return arr -} - -var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function isArrayish (subject) { - return isArray(subject) || Buffer.isBuffer(subject) || - subject && typeof subject === 'object' && - typeof subject.length === 'number' -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - var i = 0 - - for (; i < length; i++) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (leadSurrogate) { - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } else { - // valid surrogate pair - codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 - leadSurrogate = null - } - } else { - // no lead yet - - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else { - // valid lead - leadSurrogate = codePoint - continue - } - } - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = null - } - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x200000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; i++) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; i++) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; i++) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -function decodeUtf8Char (str) { - try { - return decodeURIComponent(str) - } catch (err) { - return String.fromCharCode(0xFFFD) // UTF 8 invalid char - } -} - -},{"base64-js":4,"ieee754":5,"is-array":6}],4:[function(_dereq_,module,exports){ -var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - -;(function (exports) { - 'use strict'; - - var Arr = (typeof Uint8Array !== 'undefined') - ? Uint8Array - : Array - - var PLUS = '+'.charCodeAt(0) - var SLASH = '/'.charCodeAt(0) - var NUMBER = '0'.charCodeAt(0) - var LOWER = 'a'.charCodeAt(0) - var UPPER = 'A'.charCodeAt(0) - var PLUS_URL_SAFE = '-'.charCodeAt(0) - var SLASH_URL_SAFE = '_'.charCodeAt(0) - - function decode (elt) { - var code = elt.charCodeAt(0) - if (code === PLUS || - code === PLUS_URL_SAFE) - return 62 // '+' - if (code === SLASH || - code === SLASH_URL_SAFE) - return 63 // '/' - if (code < NUMBER) - return -1 //no match - if (code < NUMBER + 10) - return code - NUMBER + 26 + 26 - if (code < UPPER + 26) - return code - UPPER - if (code < LOWER + 26) - return code - LOWER + 26 - } - - function b64ToByteArray (b64) { - var i, j, l, tmp, placeHolders, arr - - if (b64.length % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - var len = b64.length - placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(b64.length * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length - - var L = 0 - - function push (v) { - arr[L++] = v - } - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) - push((tmp & 0xFF0000) >> 16) - push((tmp & 0xFF00) >> 8) - push(tmp & 0xFF) - } - - if (placeHolders === 2) { - tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) - push(tmp & 0xFF) - } else if (placeHolders === 1) { - tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) - push((tmp >> 8) & 0xFF) - push(tmp & 0xFF) - } - - return arr - } - - function uint8ToBase64 (uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length - - function encode (num) { - return lookup.charAt(num) - } - - function tripletToBase64 (num) { - return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) - } - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output += tripletToBase64(temp) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1] - output += encode(temp >> 2) - output += encode((temp << 4) & 0x3F) - output += '==' - break - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) - output += encode(temp >> 10) - output += encode((temp >> 4) & 0x3F) - output += encode((temp << 2) & 0x3F) - output += '=' - break - } - - return output - } - - exports.toByteArray = b64ToByteArray - exports.fromByteArray = uint8ToBase64 -}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) - -},{}],5:[function(_dereq_,module,exports){ -exports.read = function(buffer, offset, isLE, mLen, nBytes) { - var e, m, - eLen = nBytes * 8 - mLen - 1, - eMax = (1 << eLen) - 1, - eBias = eMax >> 1, - nBits = -7, - i = isLE ? (nBytes - 1) : 0, - d = isLE ? -1 : 1, - s = buffer[offset + i]; - - i += d; - - e = s & ((1 << (-nBits)) - 1); - s >>= (-nBits); - nBits += eLen; - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8); - - m = e & ((1 << (-nBits)) - 1); - e >>= (-nBits); - nBits += mLen; - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8); - - if (e === 0) { - e = 1 - eBias; - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity); - } else { - m = m + Math.pow(2, mLen); - e = e - eBias; - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen); -}; - -exports.write = function(buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c, - eLen = nBytes * 8 - mLen - 1, - eMax = (1 << eLen) - 1, - eBias = eMax >> 1, - rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), - i = isLE ? 0 : (nBytes - 1), - d = isLE ? 1 : -1, - s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; - - value = Math.abs(value); - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0; - e = eMax; - } else { - e = Math.floor(Math.log(value) / Math.LN2); - if (value * (c = Math.pow(2, -e)) < 1) { - e--; - c *= 2; - } - if (e + eBias >= 1) { - value += rt / c; - } else { - value += rt * Math.pow(2, 1 - eBias); - } - if (value * c >= 2) { - e++; - c /= 2; - } - - if (e + eBias >= eMax) { - m = 0; - e = eMax; - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen); - e = e + eBias; - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); - e = 0; - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8); - - e = (e << mLen) | m; - eLen += mLen; - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8); - - buffer[offset + i - d] |= s * 128; -}; - -},{}],6:[function(_dereq_,module,exports){ - -/** - * isArray - */ - -var isArray = Array.isArray; - -/** - * toString - */ - -var str = Object.prototype.toString; - -/** - * Whether or not the given `val` - * is an array. - * - * example: - * - * isArray([]); - * // > true - * isArray(arguments); - * // > false - * isArray(''); - * // > false - * - * @param {mixed} val - * @return {bool} - */ - -module.exports = isArray || function (val) { - return !! val && '[object Array]' == str.call(val); -}; - -},{}],7:[function(_dereq_,module,exports){ -(function (process){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -var splitPath = function(filename) { - return splitPathRe.exec(filename).slice(1); -}; - -// path.resolve([from ...], to) -// posix version -exports.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); - - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -exports.normalize = function(path) { - var isAbsolute = exports.isAbsolute(path), - trailingSlash = substr(path, -1) === '/'; - - // Normalize the path - path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - -// posix version -exports.isAbsolute = function(path) { - return path.charAt(0) === '/'; -}; - -// posix version -exports.join = function() { - var paths = Array.prototype.slice.call(arguments, 0); - return exports.normalize(filter(paths, function(p, index) { - if (typeof p !== 'string') { - throw new TypeError('Arguments to path.join must be strings'); - } - return p; - }).join('/')); -}; - - -// path.relative(from, to) -// posix version -exports.relative = function(from, to) { - from = exports.resolve(from).substr(1); - to = exports.resolve(to).substr(1); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end - start + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -}; - -exports.sep = '/'; -exports.delimiter = ':'; - -exports.dirname = function(path) { - var result = splitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -}; - - -exports.basename = function(path, ext) { - var f = splitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -exports.extname = function(path) { - return splitPath(path)[3]; -}; - -function filter (xs, f) { - if (xs.filter) return xs.filter(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - if (f(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// String.prototype.substr - negative index don't work in IE8 -var substr = 'ab'.substr(-1) === 'b' - ? function (str, start, len) { return str.substr(start, len) } - : function (str, start, len) { - if (start < 0) start = str.length + start; - return str.substr(start, len); - } -; - -}).call(this,_dereq_('_process')) -},{"_process":8}],8:[function(_dereq_,module,exports){ -// shim for using process in browser - -var process = module.exports = {}; -var queue = []; -var draining = false; - -function drainQueue() { - if (draining) { - return; - } - draining = true; - var currentQueue; - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - var i = -1; - while (++i < len) { - currentQueue[i](); - } - len = queue.length; - } - draining = false; -} -process.nextTick = function (fun) { - queue.push(fun); - if (!draining) { - setTimeout(drainQueue, 0); - } -}; - -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -// TODO(shtylman) -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - -},{}],9:[function(_dereq_,module,exports){ -/* - Copyright (C) 2013 Ariya Hidayat - Copyright (C) 2013 Thaddee Tyl - Copyright (C) 2012 Ariya Hidayat - Copyright (C) 2012 Mathias Bynens - Copyright (C) 2012 Joost-Wim Boekesteijn - Copyright (C) 2012 Kris Kowal - Copyright (C) 2012 Yusuke Suzuki - Copyright (C) 2012 Arpad Borsos - Copyright (C) 2011 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -(function (root, factory) { - 'use strict'; - - // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, - // Rhino, and plain browser loading. - - /* istanbul ignore next */ - if (typeof define === 'function' && define.amd) { - define(['exports'], factory); - } else if (typeof exports !== 'undefined') { - factory(exports); - } else { - factory((root.esprima = {})); - } -}(this, function (exports) { - 'use strict'; - - var Token, - TokenName, - FnExprTokens, - Syntax, - PropertyKind, - Messages, - Regex, - SyntaxTreeDelegate, - XHTMLEntities, - ClassPropertyType, - source, - strict, - index, - lineNumber, - lineStart, - length, - delegate, - lookahead, - state, - extra; - - Token = { - BooleanLiteral: 1, - EOF: 2, - Identifier: 3, - Keyword: 4, - NullLiteral: 5, - NumericLiteral: 6, - Punctuator: 7, - StringLiteral: 8, - RegularExpression: 9, - Template: 10, - JSXIdentifier: 11, - JSXText: 12 - }; - - TokenName = {}; - TokenName[Token.BooleanLiteral] = 'Boolean'; - TokenName[Token.EOF] = ''; - TokenName[Token.Identifier] = 'Identifier'; - TokenName[Token.Keyword] = 'Keyword'; - TokenName[Token.NullLiteral] = 'Null'; - TokenName[Token.NumericLiteral] = 'Numeric'; - TokenName[Token.Punctuator] = 'Punctuator'; - TokenName[Token.StringLiteral] = 'String'; - TokenName[Token.JSXIdentifier] = 'JSXIdentifier'; - TokenName[Token.JSXText] = 'JSXText'; - TokenName[Token.RegularExpression] = 'RegularExpression'; - - // A function following one of those tokens is an expression. - FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new', - 'return', 'case', 'delete', 'throw', 'void', - // assignment operators - '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=', - '&=', '|=', '^=', ',', - // binary/unary operators - '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&', - '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=', - '<=', '<', '>', '!=', '!==']; - - Syntax = { - AnyTypeAnnotation: 'AnyTypeAnnotation', - ArrayExpression: 'ArrayExpression', - ArrayPattern: 'ArrayPattern', - ArrayTypeAnnotation: 'ArrayTypeAnnotation', - ArrowFunctionExpression: 'ArrowFunctionExpression', - AssignmentExpression: 'AssignmentExpression', - BinaryExpression: 'BinaryExpression', - BlockStatement: 'BlockStatement', - BooleanTypeAnnotation: 'BooleanTypeAnnotation', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ClassBody: 'ClassBody', - ClassDeclaration: 'ClassDeclaration', - ClassExpression: 'ClassExpression', - ClassImplements: 'ClassImplements', - ClassProperty: 'ClassProperty', - ComprehensionBlock: 'ComprehensionBlock', - ComprehensionExpression: 'ComprehensionExpression', - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DebuggerStatement: 'DebuggerStatement', - DeclareClass: 'DeclareClass', - DeclareFunction: 'DeclareFunction', - DeclareModule: 'DeclareModule', - DeclareVariable: 'DeclareVariable', - DoWhileStatement: 'DoWhileStatement', - EmptyStatement: 'EmptyStatement', - ExportDeclaration: 'ExportDeclaration', - ExportBatchSpecifier: 'ExportBatchSpecifier', - ExportSpecifier: 'ExportSpecifier', - ExpressionStatement: 'ExpressionStatement', - ForInStatement: 'ForInStatement', - ForOfStatement: 'ForOfStatement', - ForStatement: 'ForStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - FunctionTypeAnnotation: 'FunctionTypeAnnotation', - FunctionTypeParam: 'FunctionTypeParam', - GenericTypeAnnotation: 'GenericTypeAnnotation', - Identifier: 'Identifier', - IfStatement: 'IfStatement', - ImportDeclaration: 'ImportDeclaration', - ImportDefaultSpecifier: 'ImportDefaultSpecifier', - ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', - ImportSpecifier: 'ImportSpecifier', - InterfaceDeclaration: 'InterfaceDeclaration', - InterfaceExtends: 'InterfaceExtends', - IntersectionTypeAnnotation: 'IntersectionTypeAnnotation', - LabeledStatement: 'LabeledStatement', - Literal: 'Literal', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - MethodDefinition: 'MethodDefinition', - ModuleSpecifier: 'ModuleSpecifier', - NewExpression: 'NewExpression', - NullableTypeAnnotation: 'NullableTypeAnnotation', - NumberTypeAnnotation: 'NumberTypeAnnotation', - ObjectExpression: 'ObjectExpression', - ObjectPattern: 'ObjectPattern', - ObjectTypeAnnotation: 'ObjectTypeAnnotation', - ObjectTypeCallProperty: 'ObjectTypeCallProperty', - ObjectTypeIndexer: 'ObjectTypeIndexer', - ObjectTypeProperty: 'ObjectTypeProperty', - Program: 'Program', - Property: 'Property', - QualifiedTypeIdentifier: 'QualifiedTypeIdentifier', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SpreadElement: 'SpreadElement', - SpreadProperty: 'SpreadProperty', - StringLiteralTypeAnnotation: 'StringLiteralTypeAnnotation', - StringTypeAnnotation: 'StringTypeAnnotation', - SwitchCase: 'SwitchCase', - SwitchStatement: 'SwitchStatement', - TaggedTemplateExpression: 'TaggedTemplateExpression', - TemplateElement: 'TemplateElement', - TemplateLiteral: 'TemplateLiteral', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TupleTypeAnnotation: 'TupleTypeAnnotation', - TryStatement: 'TryStatement', - TypeAlias: 'TypeAlias', - TypeAnnotation: 'TypeAnnotation', - TypeCastExpression: 'TypeCastExpression', - TypeofTypeAnnotation: 'TypeofTypeAnnotation', - TypeParameterDeclaration: 'TypeParameterDeclaration', - TypeParameterInstantiation: 'TypeParameterInstantiation', - UnaryExpression: 'UnaryExpression', - UnionTypeAnnotation: 'UnionTypeAnnotation', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - VoidTypeAnnotation: 'VoidTypeAnnotation', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement', - JSXIdentifier: 'JSXIdentifier', - JSXNamespacedName: 'JSXNamespacedName', - JSXMemberExpression: 'JSXMemberExpression', - JSXEmptyExpression: 'JSXEmptyExpression', - JSXExpressionContainer: 'JSXExpressionContainer', - JSXElement: 'JSXElement', - JSXClosingElement: 'JSXClosingElement', - JSXOpeningElement: 'JSXOpeningElement', - JSXAttribute: 'JSXAttribute', - JSXSpreadAttribute: 'JSXSpreadAttribute', - JSXText: 'JSXText', - YieldExpression: 'YieldExpression', - AwaitExpression: 'AwaitExpression' - }; - - PropertyKind = { - Data: 1, - Get: 2, - Set: 4 - }; - - ClassPropertyType = { - 'static': 'static', - prototype: 'prototype' - }; - - // Error messages should be identical to V8. - Messages = { - UnexpectedToken: 'Unexpected token %0', - UnexpectedNumber: 'Unexpected number', - UnexpectedString: 'Unexpected string', - UnexpectedIdentifier: 'Unexpected identifier', - UnexpectedReserved: 'Unexpected reserved word', - UnexpectedTemplate: 'Unexpected quasi %0', - UnexpectedEOS: 'Unexpected end of input', - NewlineAfterThrow: 'Illegal newline after throw', - InvalidRegExp: 'Invalid regular expression', - UnterminatedRegExp: 'Invalid regular expression: missing /', - InvalidLHSInAssignment: 'Invalid left-hand side in assignment', - InvalidLHSInFormalsList: 'Invalid left-hand side in formals list', - InvalidLHSInForIn: 'Invalid left-hand side in for-in', - MultipleDefaultsInSwitch: 'More than one default clause in switch statement', - NoCatchOrFinally: 'Missing catch or finally after try', - UnknownLabel: 'Undefined label \'%0\'', - Redeclaration: '%0 \'%1\' has already been declared', - IllegalContinue: 'Illegal continue statement', - IllegalBreak: 'Illegal break statement', - IllegalDuplicateClassProperty: 'Illegal duplicate property in class definition', - IllegalClassConstructorProperty: 'Illegal constructor property in class definition', - IllegalReturn: 'Illegal return statement', - IllegalSpread: 'Illegal spread element', - StrictModeWith: 'Strict mode code may not include a with statement', - StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', - StrictVarName: 'Variable name may not be eval or arguments in strict mode', - StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', - StrictParamDupe: 'Strict mode function may not have duplicate parameter names', - ParameterAfterRestParameter: 'Rest parameter must be final parameter of an argument list', - DefaultRestParameter: 'Rest parameter can not have a default value', - ElementAfterSpreadElement: 'Spread must be the final element of an element list', - PropertyAfterSpreadProperty: 'A rest property must be the final property of an object literal', - ObjectPatternAsRestParameter: 'Invalid rest parameter', - ObjectPatternAsSpread: 'Invalid spread argument', - StrictFunctionName: 'Function name may not be eval or arguments in strict mode', - StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', - StrictDelete: 'Delete of an unqualified identifier in strict mode.', - StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode', - AccessorDataProperty: 'Object literal may not have data and accessor property with the same name', - AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name', - StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', - StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', - StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', - StrictReservedWord: 'Use of future reserved word in strict mode', - MissingFromClause: 'Missing from clause', - NoAsAfterImportNamespace: 'Missing as after import *', - InvalidModuleSpecifier: 'Invalid module specifier', - IllegalImportDeclaration: 'Illegal import declaration', - IllegalExportDeclaration: 'Illegal export declaration', - NoUninitializedConst: 'Const must be initialized', - ComprehensionRequiresBlock: 'Comprehension must have at least one block', - ComprehensionError: 'Comprehension Error', - EachNotAllowed: 'Each is not supported', - InvalidJSXAttributeValue: 'JSX value should be either an expression or a quoted JSX text', - ExpectedJSXClosingTag: 'Expected corresponding JSX closing tag for %0', - AdjacentJSXElements: 'Adjacent JSX elements must be wrapped in an enclosing tag', - ConfusedAboutFunctionType: 'Unexpected token =>. It looks like ' + - 'you are trying to write a function type, but you ended up ' + - 'writing a grouped type followed by an =>, which is a syntax ' + - 'error. Remember, function type parameters are named so function ' + - 'types look like (name1: type1, name2: type2) => returnType. You ' + - 'probably wrote (type1) => returnType' - }; - - // See also tools/generate-unicode-regex.py. - Regex = { - NonAsciiIdentifierStart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'), - NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0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57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'), - LeadingZeros: new RegExp('^0+(?!$)') - }; - - // Ensure the condition is true, otherwise throw an error. - // This is only to have a better contract semantic, i.e. another safety net - // to catch a logic error. The condition shall be fulfilled in normal case. - // Do NOT use this to enforce a certain condition on any user input. - - function assert(condition, message) { - /* istanbul ignore if */ - if (!condition) { - throw new Error('ASSERT: ' + message); - } - } - - function StringMap() { - this.$data = {}; - } - - StringMap.prototype.get = function (key) { - key = '$' + key; - return this.$data[key]; - }; - - StringMap.prototype.set = function (key, value) { - key = '$' + key; - this.$data[key] = value; - return this; - }; - - StringMap.prototype.has = function (key) { - key = '$' + key; - return Object.prototype.hasOwnProperty.call(this.$data, key); - }; - - StringMap.prototype["delete"] = function (key) { - key = '$' + key; - return delete this.$data[key]; - }; - - function isDecimalDigit(ch) { - return (ch >= 48 && ch <= 57); // 0..9 - } - - function isHexDigit(ch) { - return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; - } - - function isOctalDigit(ch) { - return '01234567'.indexOf(ch) >= 0; - } - - - // 7.2 White Space - - function isWhiteSpace(ch) { - return (ch === 32) || // space - (ch === 9) || // tab - (ch === 0xB) || - (ch === 0xC) || - (ch === 0xA0) || - (ch >= 0x1680 && '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(String.fromCharCode(ch)) > 0); - } - - // 7.3 Line Terminators - - function isLineTerminator(ch) { - return (ch === 10) || (ch === 13) || (ch === 0x2028) || (ch === 0x2029); - } - - // 7.6 Identifier Names and Identifiers - - function isIdentifierStart(ch) { - return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) - (ch >= 65 && ch <= 90) || // A..Z - (ch >= 97 && ch <= 122) || // a..z - (ch === 92) || // \ (backslash) - ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))); - } - - function isIdentifierPart(ch) { - return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) - (ch >= 65 && ch <= 90) || // A..Z - (ch >= 97 && ch <= 122) || // a..z - (ch >= 48 && ch <= 57) || // 0..9 - (ch === 92) || // \ (backslash) - ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))); - } - - // 7.6.1.2 Future Reserved Words - - function isFutureReservedWord(id) { - switch (id) { - case 'class': - case 'enum': - case 'export': - case 'extends': - case 'import': - case 'super': - return true; - default: - return false; - } - } - - function isStrictModeReservedWord(id) { - switch (id) { - case 'implements': - case 'interface': - case 'package': - case 'private': - case 'protected': - case 'public': - case 'static': - case 'yield': - case 'let': - return true; - default: - return false; - } - } - - function isRestrictedWord(id) { - return id === 'eval' || id === 'arguments'; - } - - // 7.6.1.1 Keywords - - function isKeyword(id) { - if (strict && isStrictModeReservedWord(id)) { - return true; - } - - // 'const' is specialized as Keyword in V8. - // 'yield' is only treated as a keyword in strict mode. - // 'let' is for compatiblity with SpiderMonkey and ES.next. - // Some others are from future reserved words. - - switch (id.length) { - case 2: - return (id === 'if') || (id === 'in') || (id === 'do'); - case 3: - return (id === 'var') || (id === 'for') || (id === 'new') || - (id === 'try') || (id === 'let'); - case 4: - return (id === 'this') || (id === 'else') || (id === 'case') || - (id === 'void') || (id === 'with') || (id === 'enum'); - case 5: - return (id === 'while') || (id === 'break') || (id === 'catch') || - (id === 'throw') || (id === 'const') || - (id === 'class') || (id === 'super'); - case 6: - return (id === 'return') || (id === 'typeof') || (id === 'delete') || - (id === 'switch') || (id === 'export') || (id === 'import'); - case 7: - return (id === 'default') || (id === 'finally') || (id === 'extends'); - case 8: - return (id === 'function') || (id === 'continue') || (id === 'debugger'); - case 10: - return (id === 'instanceof'); - default: - return false; - } - } - - // 7.4 Comments - - function addComment(type, value, start, end, loc) { - var comment; - assert(typeof start === 'number', 'Comment must have valid position'); - - // Because the way the actual token is scanned, often the comments - // (if any) are skipped twice during the lexical analysis. - // Thus, we need to skip adding a comment if the comment array already - // handled it. - if (state.lastCommentStart >= start) { - return; - } - state.lastCommentStart = start; - - comment = { - type: type, - value: value - }; - if (extra.range) { - comment.range = [start, end]; - } - if (extra.loc) { - comment.loc = loc; - } - extra.comments.push(comment); - if (extra.attachComment) { - extra.leadingComments.push(comment); - extra.trailingComments.push(comment); - } - } - - function skipSingleLineComment() { - var start, loc, ch, comment; - - start = index - 2; - loc = { - start: { - line: lineNumber, - column: index - lineStart - 2 - } - }; - - while (index < length) { - ch = source.charCodeAt(index); - ++index; - if (isLineTerminator(ch)) { - if (extra.comments) { - comment = source.slice(start + 2, index - 1); - loc.end = { - line: lineNumber, - column: index - lineStart - 1 - }; - addComment('Line', comment, start, index - 1, loc); - } - if (ch === 13 && source.charCodeAt(index) === 10) { - ++index; - } - ++lineNumber; - lineStart = index; - return; - } - } - - if (extra.comments) { - comment = source.slice(start + 2, index); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - addComment('Line', comment, start, index, loc); - } - } - - function skipMultiLineComment() { - var start, loc, ch, comment; - - if (extra.comments) { - start = index - 2; - loc = { - start: { - line: lineNumber, - column: index - lineStart - 2 - } - }; - } - - while (index < length) { - ch = source.charCodeAt(index); - if (isLineTerminator(ch)) { - if (ch === 13 && source.charCodeAt(index + 1) === 10) { - ++index; - } - ++lineNumber; - ++index; - lineStart = index; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else if (ch === 42) { - // Block comment ends with '*/' (char #42, char #47). - if (source.charCodeAt(index + 1) === 47) { - ++index; - ++index; - if (extra.comments) { - comment = source.slice(start + 2, index - 2); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - addComment('Block', comment, start, index, loc); - } - return; - } - ++index; - } else { - ++index; - } - } - - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - function skipComment() { - var ch; - - while (index < length) { - ch = source.charCodeAt(index); - - if (isWhiteSpace(ch)) { - ++index; - } else if (isLineTerminator(ch)) { - ++index; - if (ch === 13 && source.charCodeAt(index) === 10) { - ++index; - } - ++lineNumber; - lineStart = index; - } else if (ch === 47) { // 47 is '/' - ch = source.charCodeAt(index + 1); - if (ch === 47) { - ++index; - ++index; - skipSingleLineComment(); - } else if (ch === 42) { // 42 is '*' - ++index; - ++index; - skipMultiLineComment(); - } else { - break; - } - } else { - break; - } - } - } - - function scanHexEscape(prefix) { - var i, len, ch, code = 0; - - len = (prefix === 'u') ? 4 : 2; - for (i = 0; i < len; ++i) { - if (index < length && isHexDigit(source[index])) { - ch = source[index++]; - code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); - } else { - return ''; - } - } - return String.fromCharCode(code); - } - - function scanUnicodeCodePointEscape() { - var ch, code, cu1, cu2; - - ch = source[index]; - code = 0; - - // At least, one hex digit is required. - if (ch === '}') { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - while (index < length) { - ch = source[index++]; - if (!isHexDigit(ch)) { - break; - } - code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); - } - - if (code > 0x10FFFF || ch !== '}') { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - // UTF-16 Encoding - if (code <= 0xFFFF) { - return String.fromCharCode(code); - } - cu1 = ((code - 0x10000) >> 10) + 0xD800; - cu2 = ((code - 0x10000) & 1023) + 0xDC00; - return String.fromCharCode(cu1, cu2); - } - - function getEscapedIdentifier() { - var ch, id; - - ch = source.charCodeAt(index++); - id = String.fromCharCode(ch); - - // '\u' (char #92, char #117) denotes an escaped character. - if (ch === 92) { - if (source.charCodeAt(index) !== 117) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - ++index; - ch = scanHexEscape('u'); - if (!ch || ch === '\\' || !isIdentifierStart(ch.charCodeAt(0))) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - id = ch; - } - - while (index < length) { - ch = source.charCodeAt(index); - if (!isIdentifierPart(ch)) { - break; - } - ++index; - id += String.fromCharCode(ch); - - // '\u' (char #92, char #117) denotes an escaped character. - if (ch === 92) { - id = id.substr(0, id.length - 1); - if (source.charCodeAt(index) !== 117) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - ++index; - ch = scanHexEscape('u'); - if (!ch || ch === '\\' || !isIdentifierPart(ch.charCodeAt(0))) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - id += ch; - } - } - - return id; - } - - function getIdentifier() { - var start, ch; - - start = index++; - while (index < length) { - ch = source.charCodeAt(index); - if (ch === 92) { - // Blackslash (char #92) marks Unicode escape sequence. - index = start; - return getEscapedIdentifier(); - } - if (isIdentifierPart(ch)) { - ++index; - } else { - break; - } - } - - return source.slice(start, index); - } - - function scanIdentifier() { - var start, id, type; - - start = index; - - // Backslash (char #92) starts an escaped character. - id = (source.charCodeAt(index) === 92) ? getEscapedIdentifier() : getIdentifier(); - - // There is no keyword or literal with only one character. - // Thus, it must be an identifier. - if (id.length === 1) { - type = Token.Identifier; - } else if (isKeyword(id)) { - type = Token.Keyword; - } else if (id === 'null') { - type = Token.NullLiteral; - } else if (id === 'true' || id === 'false') { - type = Token.BooleanLiteral; - } else { - type = Token.Identifier; - } - - return { - type: type, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - - // 7.7 Punctuators - - function scanPunctuator() { - var start = index, - code = source.charCodeAt(index), - code2, - ch1 = source[index], - ch2, - ch3, - ch4; - - if (state.inJSXTag || state.inJSXChild) { - // Don't need to check for '{' and '}' as it's already handled - // correctly by default. - switch (code) { - case 60: // < - case 62: // > - ++index; - return { - type: Token.Punctuator, - value: String.fromCharCode(code), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - switch (code) { - // Check for most common single-character punctuators. - case 40: // ( open bracket - case 41: // ) close bracket - case 59: // ; semicolon - case 44: // , comma - case 123: // { open curly brace - case 125: // } close curly brace - case 91: // [ - case 93: // ] - case 58: // : - case 63: // ? - case 126: // ~ - ++index; - if (extra.tokenize) { - if (code === 40) { - extra.openParenToken = extra.tokens.length; - } else if (code === 123) { - extra.openCurlyToken = extra.tokens.length; - } - } - return { - type: Token.Punctuator, - value: String.fromCharCode(code), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - - default: - code2 = source.charCodeAt(index + 1); - - // '=' (char #61) marks an assignment or comparison operator. - if (code2 === 61) { - switch (code) { - case 37: // % - case 38: // & - case 42: // *: - case 43: // + - case 45: // - - case 47: // / - case 60: // < - case 62: // > - case 94: // ^ - case 124: // | - index += 2; - return { - type: Token.Punctuator, - value: String.fromCharCode(code) + String.fromCharCode(code2), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - - case 33: // ! - case 61: // = - index += 2; - - // !== and === - if (source.charCodeAt(index) === 61) { - ++index; - } - return { - type: Token.Punctuator, - value: source.slice(start, index), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - default: - break; - } - } - break; - } - - // Peek more characters. - - ch2 = source[index + 1]; - ch3 = source[index + 2]; - ch4 = source[index + 3]; - - // 4-character punctuator: >>>= - - if (ch1 === '>' && ch2 === '>' && ch3 === '>') { - if (ch4 === '=') { - index += 4; - return { - type: Token.Punctuator, - value: '>>>=', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - // 3-character punctuators: === !== >>> <<= >>= - - if (ch1 === '>' && ch2 === '>' && ch3 === '>' && !state.inType) { - index += 3; - return { - type: Token.Punctuator, - value: '>>>', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '<' && ch2 === '<' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '<<=', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '>' && ch2 === '>' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '>>=', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '.' && ch2 === '.' && ch3 === '.') { - index += 3; - return { - type: Token.Punctuator, - value: '...', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // Other 2-character punctuators: ++ -- << >> && || - - // Don't match these tokens if we're in a type, since they never can - // occur and can mess up types like Map> - if (ch1 === ch2 && ('+-<>&|'.indexOf(ch1) >= 0) && !state.inType) { - index += 2; - return { - type: Token.Punctuator, - value: ch1 + ch2, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '=' && ch2 === '>') { - index += 2; - return { - type: Token.Punctuator, - value: '=>', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) { - ++index; - return { - type: Token.Punctuator, - value: ch1, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '.') { - ++index; - return { - type: Token.Punctuator, - value: ch1, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - // 7.8.3 Numeric Literals - - function scanHexLiteral(start) { - var number = ''; - - while (index < length) { - if (!isHexDigit(source[index])) { - break; - } - number += source[index++]; - } - - if (number.length === 0) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - if (isIdentifierStart(source.charCodeAt(index))) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - return { - type: Token.NumericLiteral, - value: parseInt('0x' + number, 16), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - function scanBinaryLiteral(start) { - var ch, number; - - number = ''; - - while (index < length) { - ch = source[index]; - if (ch !== '0' && ch !== '1') { - break; - } - number += source[index++]; - } - - if (number.length === 0) { - // only 0b or 0B - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - if (index < length) { - ch = source.charCodeAt(index); - /* istanbul ignore else */ - if (isIdentifierStart(ch) || isDecimalDigit(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - return { - type: Token.NumericLiteral, - value: parseInt(number, 2), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - function scanOctalLiteral(prefix, start) { - var number, octal; - - if (isOctalDigit(prefix)) { - octal = true; - number = '0' + source[index++]; - } else { - octal = false; - ++index; - number = ''; - } - - while (index < length) { - if (!isOctalDigit(source[index])) { - break; - } - number += source[index++]; - } - - if (!octal && number.length === 0) { - // only 0o or 0O - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - return { - type: Token.NumericLiteral, - value: parseInt(number, 8), - octal: octal, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - function scanNumericLiteral() { - var number, start, ch; - - ch = source[index]; - assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), - 'Numeric literal must start with a decimal digit or a decimal point'); - - start = index; - number = ''; - if (ch !== '.') { - number = source[index++]; - ch = source[index]; - - // Hex number starts with '0x'. - // Octal number starts with '0'. - // Octal number in ES6 starts with '0o'. - // Binary number in ES6 starts with '0b'. - if (number === '0') { - if (ch === 'x' || ch === 'X') { - ++index; - return scanHexLiteral(start); - } - if (ch === 'b' || ch === 'B') { - ++index; - return scanBinaryLiteral(start); - } - if (ch === 'o' || ch === 'O' || isOctalDigit(ch)) { - return scanOctalLiteral(ch, start); - } - // decimal number starts with '0' such as '09' is illegal. - if (ch && isDecimalDigit(ch.charCodeAt(0))) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - while (isDecimalDigit(source.charCodeAt(index))) { - number += source[index++]; - } - ch = source[index]; - } - - if (ch === '.') { - number += source[index++]; - while (isDecimalDigit(source.charCodeAt(index))) { - number += source[index++]; - } - ch = source[index]; - } - - if (ch === 'e' || ch === 'E') { - number += source[index++]; - - ch = source[index]; - if (ch === '+' || ch === '-') { - number += source[index++]; - } - if (isDecimalDigit(source.charCodeAt(index))) { - while (isDecimalDigit(source.charCodeAt(index))) { - number += source[index++]; - } - } else { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - if (isIdentifierStart(source.charCodeAt(index))) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - return { - type: Token.NumericLiteral, - value: parseFloat(number), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.8.4 String Literals - - function scanStringLiteral() { - var str = '', quote, start, ch, code, unescaped, restore, octal = false; - - quote = source[index]; - assert((quote === '\'' || quote === '"'), - 'String literal must starts with a quote'); - - start = index; - ++index; - - while (index < length) { - ch = source[index++]; - - if (ch === quote) { - quote = ''; - break; - } else if (ch === '\\') { - ch = source[index++]; - if (!ch || !isLineTerminator(ch.charCodeAt(0))) { - switch (ch) { - case 'n': - str += '\n'; - break; - case 'r': - str += '\r'; - break; - case 't': - str += '\t'; - break; - case 'u': - case 'x': - if (source[index] === '{') { - ++index; - str += scanUnicodeCodePointEscape(); - } else { - restore = index; - unescaped = scanHexEscape(ch); - if (unescaped) { - str += unescaped; - } else { - index = restore; - str += ch; - } - } - break; - case 'b': - str += '\b'; - break; - case 'f': - str += '\f'; - break; - case 'v': - str += '\x0B'; - break; - - default: - if (isOctalDigit(ch)) { - code = '01234567'.indexOf(ch); - - // \0 is not octal escape sequence - if (code !== 0) { - octal = true; - } - - /* istanbul ignore else */ - if (index < length && isOctalDigit(source[index])) { - octal = true; - code = code * 8 + '01234567'.indexOf(source[index++]); - - // 3 digits are only allowed when string starts - // with 0, 1, 2, 3 - if ('0123'.indexOf(ch) >= 0 && - index < length && - isOctalDigit(source[index])) { - code = code * 8 + '01234567'.indexOf(source[index++]); - } - } - str += String.fromCharCode(code); - } else { - str += ch; - } - break; - } - } else { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - lineStart = index; - } - } else if (isLineTerminator(ch.charCodeAt(0))) { - break; - } else { - str += ch; - } - } - - if (quote !== '') { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - return { - type: Token.StringLiteral, - value: str, - octal: octal, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - function scanTemplate() { - var cooked = '', ch, start, terminated, tail, restore, unescaped, code, octal; - - terminated = false; - tail = false; - start = index; - - ++index; - - while (index < length) { - ch = source[index++]; - if (ch === '`') { - tail = true; - terminated = true; - break; - } else if (ch === '$') { - if (source[index] === '{') { - ++index; - terminated = true; - break; - } - cooked += ch; - } else if (ch === '\\') { - ch = source[index++]; - if (!isLineTerminator(ch.charCodeAt(0))) { - switch (ch) { - case 'n': - cooked += '\n'; - break; - case 'r': - cooked += '\r'; - break; - case 't': - cooked += '\t'; - break; - case 'u': - case 'x': - if (source[index] === '{') { - ++index; - cooked += scanUnicodeCodePointEscape(); - } else { - restore = index; - unescaped = scanHexEscape(ch); - if (unescaped) { - cooked += unescaped; - } else { - index = restore; - cooked += ch; - } - } - break; - case 'b': - cooked += '\b'; - break; - case 'f': - cooked += '\f'; - break; - case 'v': - cooked += '\v'; - break; - - default: - if (isOctalDigit(ch)) { - code = '01234567'.indexOf(ch); - - // \0 is not octal escape sequence - if (code !== 0) { - octal = true; - } - - /* istanbul ignore else */ - if (index < length && isOctalDigit(source[index])) { - octal = true; - code = code * 8 + '01234567'.indexOf(source[index++]); - - // 3 digits are only allowed when string starts - // with 0, 1, 2, 3 - if ('0123'.indexOf(ch) >= 0 && - index < length && - isOctalDigit(source[index])) { - code = code * 8 + '01234567'.indexOf(source[index++]); - } - } - cooked += String.fromCharCode(code); - } else { - cooked += ch; - } - break; - } - } else { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - lineStart = index; - } - } else if (isLineTerminator(ch.charCodeAt(0))) { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - lineStart = index; - cooked += '\n'; - } else { - cooked += ch; - } - } - - if (!terminated) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - return { - type: Token.Template, - value: { - cooked: cooked, - raw: source.slice(start + 1, index - ((tail) ? 1 : 2)) - }, - tail: tail, - octal: octal, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - function scanTemplateElement(option) { - var startsWith, template; - - lookahead = null; - skipComment(); - - startsWith = (option.head) ? '`' : '}'; - - if (source[index] !== startsWith) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - template = scanTemplate(); - - peek(); - - return template; - } - - function testRegExp(pattern, flags) { - var tmp = pattern, - value; - - if (flags.indexOf('u') >= 0) { - // Replace each astral symbol and every Unicode code point - // escape sequence with a single ASCII symbol to avoid throwing on - // regular expressions that are only valid in combination with the - // `/u` flag. - // Note: replacing with the ASCII symbol `x` might cause false - // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a - // perfectly valid pattern that is equivalent to `[a-b]`, but it - // would be replaced by `[x-b]` which throws an error. - tmp = tmp - .replace(/\\u\{([0-9a-fA-F]+)\}/g, function ($0, $1) { - if (parseInt($1, 16) <= 0x10FFFF) { - return 'x'; - } - throwError({}, Messages.InvalidRegExp); - }) - .replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, 'x'); - } - - // First, detect invalid regular expressions. - try { - value = new RegExp(tmp); - } catch (e) { - throwError({}, Messages.InvalidRegExp); - } - - // Return a regular expression object for this pattern-flag pair, or - // `null` in case the current environment doesn't support the flags it - // uses. - try { - return new RegExp(pattern, flags); - } catch (exception) { - return null; - } - } - - function scanRegExpBody() { - var ch, str, classMarker, terminated, body; - - ch = source[index]; - assert(ch === '/', 'Regular expression literal must start with a slash'); - str = source[index++]; - - classMarker = false; - terminated = false; - while (index < length) { - ch = source[index++]; - str += ch; - if (ch === '\\') { - ch = source[index++]; - // ECMA-262 7.8.5 - if (isLineTerminator(ch.charCodeAt(0))) { - throwError({}, Messages.UnterminatedRegExp); - } - str += ch; - } else if (isLineTerminator(ch.charCodeAt(0))) { - throwError({}, Messages.UnterminatedRegExp); - } else if (classMarker) { - if (ch === ']') { - classMarker = false; - } - } else { - if (ch === '/') { - terminated = true; - break; - } else if (ch === '[') { - classMarker = true; - } - } - } - - if (!terminated) { - throwError({}, Messages.UnterminatedRegExp); - } - - // Exclude leading and trailing slash. - body = str.substr(1, str.length - 2); - return { - value: body, - literal: str - }; - } - - function scanRegExpFlags() { - var ch, str, flags, restore; - - str = ''; - flags = ''; - while (index < length) { - ch = source[index]; - if (!isIdentifierPart(ch.charCodeAt(0))) { - break; - } - - ++index; - if (ch === '\\' && index < length) { - ch = source[index]; - if (ch === 'u') { - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - flags += ch; - for (str += '\\u'; restore < index; ++restore) { - str += source[restore]; - } - } else { - index = restore; - flags += 'u'; - str += '\\u'; - } - throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL'); - } else { - str += '\\'; - throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - flags += ch; - str += ch; - } - } - - return { - value: flags, - literal: str - }; - } - - function scanRegExp() { - var start, body, flags, value; - - lookahead = null; - skipComment(); - start = index; - - body = scanRegExpBody(); - flags = scanRegExpFlags(); - value = testRegExp(body.value, flags.value); - - if (extra.tokenize) { - return { - type: Token.RegularExpression, - value: value, - regex: { - pattern: body.value, - flags: flags.value - }, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - return { - literal: body.literal + flags.literal, - value: value, - regex: { - pattern: body.value, - flags: flags.value - }, - range: [start, index] - }; - } - - function isIdentifierName(token) { - return token.type === Token.Identifier || - token.type === Token.Keyword || - token.type === Token.BooleanLiteral || - token.type === Token.NullLiteral; - } - - function advanceSlash() { - var prevToken, - checkToken; - // Using the following algorithm: - // https://github.com/mozilla/sweet.js/wiki/design - prevToken = extra.tokens[extra.tokens.length - 1]; - if (!prevToken) { - // Nothing before that: it cannot be a division. - return scanRegExp(); - } - if (prevToken.type === 'Punctuator') { - if (prevToken.value === ')') { - checkToken = extra.tokens[extra.openParenToken - 1]; - if (checkToken && - checkToken.type === 'Keyword' && - (checkToken.value === 'if' || - checkToken.value === 'while' || - checkToken.value === 'for' || - checkToken.value === 'with')) { - return scanRegExp(); - } - return scanPunctuator(); - } - if (prevToken.value === '}') { - // Dividing a function by anything makes little sense, - // but we have to check for that. - if (extra.tokens[extra.openCurlyToken - 3] && - extra.tokens[extra.openCurlyToken - 3].type === 'Keyword') { - // Anonymous function. - checkToken = extra.tokens[extra.openCurlyToken - 4]; - if (!checkToken) { - return scanPunctuator(); - } - } else if (extra.tokens[extra.openCurlyToken - 4] && - extra.tokens[extra.openCurlyToken - 4].type === 'Keyword') { - // Named function. - checkToken = extra.tokens[extra.openCurlyToken - 5]; - if (!checkToken) { - return scanRegExp(); - } - } else { - return scanPunctuator(); - } - // checkToken determines whether the function is - // a declaration or an expression. - if (FnExprTokens.indexOf(checkToken.value) >= 0) { - // It is an expression. - return scanPunctuator(); - } - // It is a declaration. - return scanRegExp(); - } - return scanRegExp(); - } - if (prevToken.type === 'Keyword' && prevToken.value !== 'this') { - return scanRegExp(); - } - return scanPunctuator(); - } - - function advance() { - var ch; - - if (!state.inJSXChild) { - skipComment(); - } - - if (index >= length) { - return { - type: Token.EOF, - lineNumber: lineNumber, - lineStart: lineStart, - range: [index, index] - }; - } - - if (state.inJSXChild) { - return advanceJSXChild(); - } - - ch = source.charCodeAt(index); - - // Very common: ( and ) and ; - if (ch === 40 || ch === 41 || ch === 58) { - return scanPunctuator(); - } - - // String literal starts with single quote (#39) or double quote (#34). - if (ch === 39 || ch === 34) { - if (state.inJSXTag) { - return scanJSXStringLiteral(); - } - return scanStringLiteral(); - } - - if (state.inJSXTag && isJSXIdentifierStart(ch)) { - return scanJSXIdentifier(); - } - - if (ch === 96) { - return scanTemplate(); - } - if (isIdentifierStart(ch)) { - return scanIdentifier(); - } - - // Dot (.) char #46 can also start a floating-point number, hence the need - // to check the next character. - if (ch === 46) { - if (isDecimalDigit(source.charCodeAt(index + 1))) { - return scanNumericLiteral(); - } - return scanPunctuator(); - } - - if (isDecimalDigit(ch)) { - return scanNumericLiteral(); - } - - // Slash (/) char #47 can also start a regex. - if (extra.tokenize && ch === 47) { - return advanceSlash(); - } - - return scanPunctuator(); - } - - function lex() { - var token; - - token = lookahead; - index = token.range[1]; - lineNumber = token.lineNumber; - lineStart = token.lineStart; - - lookahead = advance(); - - index = token.range[1]; - lineNumber = token.lineNumber; - lineStart = token.lineStart; - - return token; - } - - function peek() { - var pos, line, start; - - pos = index; - line = lineNumber; - start = lineStart; - lookahead = advance(); - index = pos; - lineNumber = line; - lineStart = start; - } - - function lookahead2() { - var adv, pos, line, start, result; - - // If we are collecting the tokens, don't grab the next one yet. - /* istanbul ignore next */ - adv = (typeof extra.advance === 'function') ? extra.advance : advance; - - pos = index; - line = lineNumber; - start = lineStart; - - // Scan for the next immediate token. - /* istanbul ignore if */ - if (lookahead === null) { - lookahead = adv(); - } - index = lookahead.range[1]; - lineNumber = lookahead.lineNumber; - lineStart = lookahead.lineStart; - - // Grab the token right after. - result = adv(); - index = pos; - lineNumber = line; - lineStart = start; - - return result; - } - - function rewind(token) { - index = token.range[0]; - lineNumber = token.lineNumber; - lineStart = token.lineStart; - lookahead = token; - } - - function markerCreate() { - if (!extra.loc && !extra.range) { - return undefined; - } - skipComment(); - return {offset: index, line: lineNumber, col: index - lineStart}; - } - - function markerCreatePreserveWhitespace() { - if (!extra.loc && !extra.range) { - return undefined; - } - return {offset: index, line: lineNumber, col: index - lineStart}; - } - - function processComment(node) { - var lastChild, - trailingComments, - bottomRight = extra.bottomRightStack, - last = bottomRight[bottomRight.length - 1]; - - if (node.type === Syntax.Program) { - /* istanbul ignore else */ - if (node.body.length > 0) { - return; - } - } - - if (extra.trailingComments.length > 0) { - if (extra.trailingComments[0].range[0] >= node.range[1]) { - trailingComments = extra.trailingComments; - extra.trailingComments = []; - } else { - extra.trailingComments.length = 0; - } - } else { - if (last && last.trailingComments && last.trailingComments[0].range[0] >= node.range[1]) { - trailingComments = last.trailingComments; - delete last.trailingComments; - } - } - - // Eating the stack. - if (last) { - while (last && last.range[0] >= node.range[0]) { - lastChild = last; - last = bottomRight.pop(); - } - } - - if (lastChild) { - if (lastChild.leadingComments && lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= node.range[0]) { - node.leadingComments = lastChild.leadingComments; - delete lastChild.leadingComments; - } - } else if (extra.leadingComments.length > 0 && extra.leadingComments[extra.leadingComments.length - 1].range[1] <= node.range[0]) { - node.leadingComments = extra.leadingComments; - extra.leadingComments = []; - } - - if (trailingComments) { - node.trailingComments = trailingComments; - } - - bottomRight.push(node); - } - - function markerApply(marker, node) { - if (extra.range) { - node.range = [marker.offset, index]; - } - if (extra.loc) { - node.loc = { - start: { - line: marker.line, - column: marker.col - }, - end: { - line: lineNumber, - column: index - lineStart - } - }; - node = delegate.postProcess(node); - } - if (extra.attachComment) { - processComment(node); - } - return node; - } - - SyntaxTreeDelegate = { - - name: 'SyntaxTree', - - postProcess: function (node) { - return node; - }, - - createArrayExpression: function (elements) { - return { - type: Syntax.ArrayExpression, - elements: elements - }; - }, - - createAssignmentExpression: function (operator, left, right) { - return { - type: Syntax.AssignmentExpression, - operator: operator, - left: left, - right: right - }; - }, - - createBinaryExpression: function (operator, left, right) { - var type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression : - Syntax.BinaryExpression; - return { - type: type, - operator: operator, - left: left, - right: right - }; - }, - - createBlockStatement: function (body) { - return { - type: Syntax.BlockStatement, - body: body - }; - }, - - createBreakStatement: function (label) { - return { - type: Syntax.BreakStatement, - label: label - }; - }, - - createCallExpression: function (callee, args) { - return { - type: Syntax.CallExpression, - callee: callee, - 'arguments': args - }; - }, - - createCatchClause: function (param, body) { - return { - type: Syntax.CatchClause, - param: param, - body: body - }; - }, - - createConditionalExpression: function (test, consequent, alternate) { - return { - type: Syntax.ConditionalExpression, - test: test, - consequent: consequent, - alternate: alternate - }; - }, - - createContinueStatement: function (label) { - return { - type: Syntax.ContinueStatement, - label: label - }; - }, - - createDebuggerStatement: function () { - return { - type: Syntax.DebuggerStatement - }; - }, - - createDoWhileStatement: function (body, test) { - return { - type: Syntax.DoWhileStatement, - body: body, - test: test - }; - }, - - createEmptyStatement: function () { - return { - type: Syntax.EmptyStatement - }; - }, - - createExpressionStatement: function (expression) { - return { - type: Syntax.ExpressionStatement, - expression: expression - }; - }, - - createForStatement: function (init, test, update, body) { - return { - type: Syntax.ForStatement, - init: init, - test: test, - update: update, - body: body - }; - }, - - createForInStatement: function (left, right, body) { - return { - type: Syntax.ForInStatement, - left: left, - right: right, - body: body, - each: false - }; - }, - - createForOfStatement: function (left, right, body) { - return { - type: Syntax.ForOfStatement, - left: left, - right: right, - body: body - }; - }, - - createFunctionDeclaration: function (id, params, defaults, body, rest, generator, expression, - isAsync, returnType, typeParameters) { - var funDecl = { - type: Syntax.FunctionDeclaration, - id: id, - params: params, - defaults: defaults, - body: body, - rest: rest, - generator: generator, - expression: expression, - returnType: returnType, - typeParameters: typeParameters - }; - - if (isAsync) { - funDecl.async = true; - } - - return funDecl; - }, - - createFunctionExpression: function (id, params, defaults, body, rest, generator, expression, - isAsync, returnType, typeParameters) { - var funExpr = { - type: Syntax.FunctionExpression, - id: id, - params: params, - defaults: defaults, - body: body, - rest: rest, - generator: generator, - expression: expression, - returnType: returnType, - typeParameters: typeParameters - }; - - if (isAsync) { - funExpr.async = true; - } - - return funExpr; - }, - - createIdentifier: function (name) { - return { - type: Syntax.Identifier, - name: name, - // Only here to initialize the shape of the object to ensure - // that the 'typeAnnotation' key is ordered before others that - // are added later (like 'loc' and 'range'). This just helps - // keep the shape of Identifier nodes consistent with everything - // else. - typeAnnotation: undefined, - optional: undefined - }; - }, - - createTypeAnnotation: function (typeAnnotation) { - return { - type: Syntax.TypeAnnotation, - typeAnnotation: typeAnnotation - }; - }, - - createTypeCast: function (expression, typeAnnotation) { - return { - type: Syntax.TypeCastExpression, - expression: expression, - typeAnnotation: typeAnnotation - }; - }, - - createFunctionTypeAnnotation: function (params, returnType, rest, typeParameters) { - return { - type: Syntax.FunctionTypeAnnotation, - params: params, - returnType: returnType, - rest: rest, - typeParameters: typeParameters - }; - }, - - createFunctionTypeParam: function (name, typeAnnotation, optional) { - return { - type: Syntax.FunctionTypeParam, - name: name, - typeAnnotation: typeAnnotation, - optional: optional - }; - }, - - createNullableTypeAnnotation: function (typeAnnotation) { - return { - type: Syntax.NullableTypeAnnotation, - typeAnnotation: typeAnnotation - }; - }, - - createArrayTypeAnnotation: function (elementType) { - return { - type: Syntax.ArrayTypeAnnotation, - elementType: elementType - }; - }, - - createGenericTypeAnnotation: function (id, typeParameters) { - return { - type: Syntax.GenericTypeAnnotation, - id: id, - typeParameters: typeParameters - }; - }, - - createQualifiedTypeIdentifier: function (qualification, id) { - return { - type: Syntax.QualifiedTypeIdentifier, - qualification: qualification, - id: id - }; - }, - - createTypeParameterDeclaration: function (params) { - return { - type: Syntax.TypeParameterDeclaration, - params: params - }; - }, - - createTypeParameterInstantiation: function (params) { - return { - type: Syntax.TypeParameterInstantiation, - params: params - }; - }, - - createAnyTypeAnnotation: function () { - return { - type: Syntax.AnyTypeAnnotation - }; - }, - - createBooleanTypeAnnotation: function () { - return { - type: Syntax.BooleanTypeAnnotation - }; - }, - - createNumberTypeAnnotation: function () { - return { - type: Syntax.NumberTypeAnnotation - }; - }, - - createStringTypeAnnotation: function () { - return { - type: Syntax.StringTypeAnnotation - }; - }, - - createStringLiteralTypeAnnotation: function (token) { - return { - type: Syntax.StringLiteralTypeAnnotation, - value: token.value, - raw: source.slice(token.range[0], token.range[1]) - }; - }, - - createVoidTypeAnnotation: function () { - return { - type: Syntax.VoidTypeAnnotation - }; - }, - - createTypeofTypeAnnotation: function (argument) { - return { - type: Syntax.TypeofTypeAnnotation, - argument: argument - }; - }, - - createTupleTypeAnnotation: function (types) { - return { - type: Syntax.TupleTypeAnnotation, - types: types - }; - }, - - createObjectTypeAnnotation: function (properties, indexers, callProperties) { - return { - type: Syntax.ObjectTypeAnnotation, - properties: properties, - indexers: indexers, - callProperties: callProperties - }; - }, - - createObjectTypeIndexer: function (id, key, value, isStatic) { - return { - type: Syntax.ObjectTypeIndexer, - id: id, - key: key, - value: value, - "static": isStatic - }; - }, - - createObjectTypeCallProperty: function (value, isStatic) { - return { - type: Syntax.ObjectTypeCallProperty, - value: value, - "static": isStatic - }; - }, - - createObjectTypeProperty: function (key, value, optional, isStatic) { - return { - type: Syntax.ObjectTypeProperty, - key: key, - value: value, - optional: optional, - "static": isStatic - }; - }, - - createUnionTypeAnnotation: function (types) { - return { - type: Syntax.UnionTypeAnnotation, - types: types - }; - }, - - createIntersectionTypeAnnotation: function (types) { - return { - type: Syntax.IntersectionTypeAnnotation, - types: types - }; - }, - - createTypeAlias: function (id, typeParameters, right) { - return { - type: Syntax.TypeAlias, - id: id, - typeParameters: typeParameters, - right: right - }; - }, - - createInterface: function (id, typeParameters, body, extended) { - return { - type: Syntax.InterfaceDeclaration, - id: id, - typeParameters: typeParameters, - body: body, - "extends": extended - }; - }, - - createInterfaceExtends: function (id, typeParameters) { - return { - type: Syntax.InterfaceExtends, - id: id, - typeParameters: typeParameters - }; - }, - - createDeclareFunction: function (id) { - return { - type: Syntax.DeclareFunction, - id: id - }; - }, - - createDeclareVariable: function (id) { - return { - type: Syntax.DeclareVariable, - id: id - }; - }, - - createDeclareModule: function (id, body) { - return { - type: Syntax.DeclareModule, - id: id, - body: body - }; - }, - - createJSXAttribute: function (name, value) { - return { - type: Syntax.JSXAttribute, - name: name, - value: value || null - }; - }, - - createJSXSpreadAttribute: function (argument) { - return { - type: Syntax.JSXSpreadAttribute, - argument: argument - }; - }, - - createJSXIdentifier: function (name) { - return { - type: Syntax.JSXIdentifier, - name: name - }; - }, - - createJSXNamespacedName: function (namespace, name) { - return { - type: Syntax.JSXNamespacedName, - namespace: namespace, - name: name - }; - }, - - createJSXMemberExpression: function (object, property) { - return { - type: Syntax.JSXMemberExpression, - object: object, - property: property - }; - }, - - createJSXElement: function (openingElement, closingElement, children) { - return { - type: Syntax.JSXElement, - openingElement: openingElement, - closingElement: closingElement, - children: children - }; - }, - - createJSXEmptyExpression: function () { - return { - type: Syntax.JSXEmptyExpression - }; - }, - - createJSXExpressionContainer: function (expression) { - return { - type: Syntax.JSXExpressionContainer, - expression: expression - }; - }, - - createJSXOpeningElement: function (name, attributes, selfClosing) { - return { - type: Syntax.JSXOpeningElement, - name: name, - selfClosing: selfClosing, - attributes: attributes - }; - }, - - createJSXClosingElement: function (name) { - return { - type: Syntax.JSXClosingElement, - name: name - }; - }, - - createIfStatement: function (test, consequent, alternate) { - return { - type: Syntax.IfStatement, - test: test, - consequent: consequent, - alternate: alternate - }; - }, - - createLabeledStatement: function (label, body) { - return { - type: Syntax.LabeledStatement, - label: label, - body: body - }; - }, - - createLiteral: function (token) { - var object = { - type: Syntax.Literal, - value: token.value, - raw: source.slice(token.range[0], token.range[1]) - }; - if (token.regex) { - object.regex = token.regex; - } - return object; - }, - - createMemberExpression: function (accessor, object, property) { - return { - type: Syntax.MemberExpression, - computed: accessor === '[', - object: object, - property: property - }; - }, - - createNewExpression: function (callee, args) { - return { - type: Syntax.NewExpression, - callee: callee, - 'arguments': args - }; - }, - - createObjectExpression: function (properties) { - return { - type: Syntax.ObjectExpression, - properties: properties - }; - }, - - createPostfixExpression: function (operator, argument) { - return { - type: Syntax.UpdateExpression, - operator: operator, - argument: argument, - prefix: false - }; - }, - - createProgram: function (body) { - return { - type: Syntax.Program, - body: body - }; - }, - - createProperty: function (kind, key, value, method, shorthand, computed) { - return { - type: Syntax.Property, - key: key, - value: value, - kind: kind, - method: method, - shorthand: shorthand, - computed: computed - }; - }, - - createReturnStatement: function (argument) { - return { - type: Syntax.ReturnStatement, - argument: argument - }; - }, - - createSequenceExpression: function (expressions) { - return { - type: Syntax.SequenceExpression, - expressions: expressions - }; - }, - - createSwitchCase: function (test, consequent) { - return { - type: Syntax.SwitchCase, - test: test, - consequent: consequent - }; - }, - - createSwitchStatement: function (discriminant, cases) { - return { - type: Syntax.SwitchStatement, - discriminant: discriminant, - cases: cases - }; - }, - - createThisExpression: function () { - return { - type: Syntax.ThisExpression - }; - }, - - createThrowStatement: function (argument) { - return { - type: Syntax.ThrowStatement, - argument: argument - }; - }, - - createTryStatement: function (block, guardedHandlers, handlers, finalizer) { - return { - type: Syntax.TryStatement, - block: block, - guardedHandlers: guardedHandlers, - handlers: handlers, - finalizer: finalizer - }; - }, - - createUnaryExpression: function (operator, argument) { - if (operator === '++' || operator === '--') { - return { - type: Syntax.UpdateExpression, - operator: operator, - argument: argument, - prefix: true - }; - } - return { - type: Syntax.UnaryExpression, - operator: operator, - argument: argument, - prefix: true - }; - }, - - createVariableDeclaration: function (declarations, kind) { - return { - type: Syntax.VariableDeclaration, - declarations: declarations, - kind: kind - }; - }, - - createVariableDeclarator: function (id, init) { - return { - type: Syntax.VariableDeclarator, - id: id, - init: init - }; - }, - - createWhileStatement: function (test, body) { - return { - type: Syntax.WhileStatement, - test: test, - body: body - }; - }, - - createWithStatement: function (object, body) { - return { - type: Syntax.WithStatement, - object: object, - body: body - }; - }, - - createTemplateElement: function (value, tail) { - return { - type: Syntax.TemplateElement, - value: value, - tail: tail - }; - }, - - createTemplateLiteral: function (quasis, expressions) { - return { - type: Syntax.TemplateLiteral, - quasis: quasis, - expressions: expressions - }; - }, - - createSpreadElement: function (argument) { - return { - type: Syntax.SpreadElement, - argument: argument - }; - }, - - createSpreadProperty: function (argument) { - return { - type: Syntax.SpreadProperty, - argument: argument - }; - }, - - createTaggedTemplateExpression: function (tag, quasi) { - return { - type: Syntax.TaggedTemplateExpression, - tag: tag, - quasi: quasi - }; - }, - - createArrowFunctionExpression: function (params, defaults, body, rest, expression, isAsync) { - var arrowExpr = { - type: Syntax.ArrowFunctionExpression, - id: null, - params: params, - defaults: defaults, - body: body, - rest: rest, - generator: false, - expression: expression - }; - - if (isAsync) { - arrowExpr.async = true; - } - - return arrowExpr; - }, - - createMethodDefinition: function (propertyType, kind, key, value, computed) { - return { - type: Syntax.MethodDefinition, - key: key, - value: value, - kind: kind, - 'static': propertyType === ClassPropertyType["static"], - computed: computed - }; - }, - - createClassProperty: function (key, typeAnnotation, computed, isStatic) { - return { - type: Syntax.ClassProperty, - key: key, - typeAnnotation: typeAnnotation, - computed: computed, - "static": isStatic - }; - }, - - createClassBody: function (body) { - return { - type: Syntax.ClassBody, - body: body - }; - }, - - createClassImplements: function (id, typeParameters) { - return { - type: Syntax.ClassImplements, - id: id, - typeParameters: typeParameters - }; - }, - - createClassExpression: function (id, superClass, body, typeParameters, superTypeParameters, implemented) { - return { - type: Syntax.ClassExpression, - id: id, - superClass: superClass, - body: body, - typeParameters: typeParameters, - superTypeParameters: superTypeParameters, - "implements": implemented - }; - }, - - createClassDeclaration: function (id, superClass, body, typeParameters, superTypeParameters, implemented) { - return { - type: Syntax.ClassDeclaration, - id: id, - superClass: superClass, - body: body, - typeParameters: typeParameters, - superTypeParameters: superTypeParameters, - "implements": implemented - }; - }, - - createModuleSpecifier: function (token) { - return { - type: Syntax.ModuleSpecifier, - value: token.value, - raw: source.slice(token.range[0], token.range[1]) - }; - }, - - createExportSpecifier: function (id, name) { - return { - type: Syntax.ExportSpecifier, - id: id, - name: name - }; - }, - - createExportBatchSpecifier: function () { - return { - type: Syntax.ExportBatchSpecifier - }; - }, - - createImportDefaultSpecifier: function (id) { - return { - type: Syntax.ImportDefaultSpecifier, - id: id - }; - }, - - createImportNamespaceSpecifier: function (id) { - return { - type: Syntax.ImportNamespaceSpecifier, - id: id - }; - }, - - createExportDeclaration: function (isDefault, declaration, specifiers, src) { - return { - type: Syntax.ExportDeclaration, - 'default': !!isDefault, - declaration: declaration, - specifiers: specifiers, - source: src - }; - }, - - createImportSpecifier: function (id, name) { - return { - type: Syntax.ImportSpecifier, - id: id, - name: name - }; - }, - - createImportDeclaration: function (specifiers, src, isType) { - return { - type: Syntax.ImportDeclaration, - specifiers: specifiers, - source: src, - isType: isType - }; - }, - - createYieldExpression: function (argument, dlg) { - return { - type: Syntax.YieldExpression, - argument: argument, - delegate: dlg - }; - }, - - createAwaitExpression: function (argument) { - return { - type: Syntax.AwaitExpression, - argument: argument - }; - }, - - createComprehensionExpression: function (filter, blocks, body) { - return { - type: Syntax.ComprehensionExpression, - filter: filter, - blocks: blocks, - body: body - }; - } - - }; - - // Return true if there is a line terminator before the next token. - - function peekLineTerminator() { - var pos, line, start, found; - - pos = index; - line = lineNumber; - start = lineStart; - skipComment(); - found = lineNumber !== line; - index = pos; - lineNumber = line; - lineStart = start; - - return found; - } - - // Throw an exception - - function throwError(token, messageFormat) { - var error, - args = Array.prototype.slice.call(arguments, 2), - msg = messageFormat.replace( - /%(\d)/g, - function (whole, idx) { - assert(idx < args.length, 'Message reference must be in range'); - return args[idx]; - } - ); - - if (typeof token.lineNumber === 'number') { - error = new Error('Line ' + token.lineNumber + ': ' + msg); - error.index = token.range[0]; - error.lineNumber = token.lineNumber; - error.column = token.range[0] - lineStart + 1; - } else { - error = new Error('Line ' + lineNumber + ': ' + msg); - error.index = index; - error.lineNumber = lineNumber; - error.column = index - lineStart + 1; - } - - error.description = msg; - throw error; - } - - function throwErrorTolerant() { - try { - throwError.apply(null, arguments); - } catch (e) { - if (extra.errors) { - extra.errors.push(e); - } else { - throw e; - } - } - } - - - // Throw an exception because of the token. - - function throwUnexpected(token) { - if (token.type === Token.EOF) { - throwError(token, Messages.UnexpectedEOS); - } - - if (token.type === Token.NumericLiteral) { - throwError(token, Messages.UnexpectedNumber); - } - - if (token.type === Token.StringLiteral || token.type === Token.JSXText) { - throwError(token, Messages.UnexpectedString); - } - - if (token.type === Token.Identifier) { - throwError(token, Messages.UnexpectedIdentifier); - } - - if (token.type === Token.Keyword) { - if (isFutureReservedWord(token.value)) { - throwError(token, Messages.UnexpectedReserved); - } else if (strict && isStrictModeReservedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictReservedWord); - return; - } - throwError(token, Messages.UnexpectedToken, token.value); - } - - if (token.type === Token.Template) { - throwError(token, Messages.UnexpectedTemplate, token.value.raw); - } - - // BooleanLiteral, NullLiteral, or Punctuator. - throwError(token, Messages.UnexpectedToken, token.value); - } - - // Expect the next token to match the specified punctuator. - // If not, an exception will be thrown. - - function expect(value) { - var token = lex(); - if (token.type !== Token.Punctuator || token.value !== value) { - throwUnexpected(token); - } - } - - // Expect the next token to match the specified keyword. - // If not, an exception will be thrown. - - function expectKeyword(keyword, contextual) { - var token = lex(); - if (token.type !== (contextual ? Token.Identifier : Token.Keyword) || - token.value !== keyword) { - throwUnexpected(token); - } - } - - // Expect the next token to match the specified contextual keyword. - // If not, an exception will be thrown. - - function expectContextualKeyword(keyword) { - return expectKeyword(keyword, true); - } - - // Return true if the next token matches the specified punctuator. - - function match(value) { - return lookahead.type === Token.Punctuator && lookahead.value === value; - } - - // Return true if the next token matches the specified keyword - - function matchKeyword(keyword, contextual) { - var expectedType = contextual ? Token.Identifier : Token.Keyword; - return lookahead.type === expectedType && lookahead.value === keyword; - } - - // Return true if the next token matches the specified contextual keyword - - function matchContextualKeyword(keyword) { - return matchKeyword(keyword, true); - } - - // Return true if the next token is an assignment operator - - function matchAssign() { - var op; - - if (lookahead.type !== Token.Punctuator) { - return false; - } - op = lookahead.value; - return op === '=' || - op === '*=' || - op === '/=' || - op === '%=' || - op === '+=' || - op === '-=' || - op === '<<=' || - op === '>>=' || - op === '>>>=' || - op === '&=' || - op === '^=' || - op === '|='; - } - - // Note that 'yield' is treated as a keyword in strict mode, but a - // contextual keyword (identifier) in non-strict mode, so we need to - // use matchKeyword('yield', false) and matchKeyword('yield', true) - // (i.e. matchContextualKeyword) appropriately. - function matchYield() { - return state.yieldAllowed && matchKeyword('yield', !strict); - } - - function matchAsync() { - var backtrackToken = lookahead, matches = false; - - if (matchContextualKeyword('async')) { - lex(); // Make sure peekLineTerminator() starts after 'async'. - matches = !peekLineTerminator(); - rewind(backtrackToken); // Revert the lex(). - } - - return matches; - } - - function matchAwait() { - return state.awaitAllowed && matchContextualKeyword('await'); - } - - function consumeSemicolon() { - var line, oldIndex = index, oldLineNumber = lineNumber, - oldLineStart = lineStart, oldLookahead = lookahead; - - // Catch the very common case first: immediately a semicolon (char #59). - if (source.charCodeAt(index) === 59) { - lex(); - return; - } - - line = lineNumber; - skipComment(); - if (lineNumber !== line) { - index = oldIndex; - lineNumber = oldLineNumber; - lineStart = oldLineStart; - lookahead = oldLookahead; - return; - } - - if (match(';')) { - lex(); - return; - } - - if (lookahead.type !== Token.EOF && !match('}')) { - throwUnexpected(lookahead); - } - } - - // Return true if provided expression is LeftHandSideExpression - - function isLeftHandSide(expr) { - return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression; - } - - function isAssignableLeftHandSide(expr) { - return isLeftHandSide(expr) || expr.type === Syntax.ObjectPattern || expr.type === Syntax.ArrayPattern; - } - - // 11.1.4 Array Initialiser - - function parseArrayInitialiser() { - var elements = [], blocks = [], filter = null, tmp, possiblecomprehension = true, - marker = markerCreate(); - - expect('['); - while (!match(']')) { - if (lookahead.value === 'for' && - lookahead.type === Token.Keyword) { - if (!possiblecomprehension) { - throwError({}, Messages.ComprehensionError); - } - matchKeyword('for'); - tmp = parseForStatement({ignoreBody: true}); - tmp.of = tmp.type === Syntax.ForOfStatement; - tmp.type = Syntax.ComprehensionBlock; - if (tmp.left.kind) { // can't be let or const - throwError({}, Messages.ComprehensionError); - } - blocks.push(tmp); - } else if (lookahead.value === 'if' && - lookahead.type === Token.Keyword) { - if (!possiblecomprehension) { - throwError({}, Messages.ComprehensionError); - } - expectKeyword('if'); - expect('('); - filter = parseExpression(); - expect(')'); - } else if (lookahead.value === ',' && - lookahead.type === Token.Punctuator) { - possiblecomprehension = false; // no longer allowed. - lex(); - elements.push(null); - } else { - tmp = parseSpreadOrAssignmentExpression(); - elements.push(tmp); - if (tmp && tmp.type === Syntax.SpreadElement) { - if (!match(']')) { - throwError({}, Messages.ElementAfterSpreadElement); - } - } else if (!(match(']') || matchKeyword('for') || matchKeyword('if'))) { - expect(','); // this lexes. - possiblecomprehension = false; - } - } - } - - expect(']'); - - if (filter && !blocks.length) { - throwError({}, Messages.ComprehensionRequiresBlock); - } - - if (blocks.length) { - if (elements.length !== 1) { - throwError({}, Messages.ComprehensionError); - } - return markerApply(marker, delegate.createComprehensionExpression(filter, blocks, elements[0])); - } - return markerApply(marker, delegate.createArrayExpression(elements)); - } - - // 11.1.5 Object Initialiser - - function parsePropertyFunction(options) { - var previousStrict, previousYieldAllowed, previousAwaitAllowed, - params, defaults, body, marker = markerCreate(); - - previousStrict = strict; - previousYieldAllowed = state.yieldAllowed; - state.yieldAllowed = options.generator; - previousAwaitAllowed = state.awaitAllowed; - state.awaitAllowed = options.async; - params = options.params || []; - defaults = options.defaults || []; - - body = parseConciseBody(); - if (options.name && strict && isRestrictedWord(params[0].name)) { - throwErrorTolerant(options.name, Messages.StrictParamName); - } - strict = previousStrict; - state.yieldAllowed = previousYieldAllowed; - state.awaitAllowed = previousAwaitAllowed; - - return markerApply(marker, delegate.createFunctionExpression( - null, - params, - defaults, - body, - options.rest || null, - options.generator, - body.type !== Syntax.BlockStatement, - options.async, - options.returnType, - options.typeParameters - )); - } - - - function parsePropertyMethodFunction(options) { - var previousStrict, tmp, method; - - previousStrict = strict; - strict = true; - - tmp = parseParams(); - - if (tmp.stricted) { - throwErrorTolerant(tmp.stricted, tmp.message); - } - - method = parsePropertyFunction({ - params: tmp.params, - defaults: tmp.defaults, - rest: tmp.rest, - generator: options.generator, - async: options.async, - returnType: tmp.returnType, - typeParameters: options.typeParameters - }); - - strict = previousStrict; - - return method; - } - - - function parseObjectPropertyKey() { - var marker = markerCreate(), - token = lex(), - propertyKey, - result; - - // Note: This function is called only from parseObjectProperty(), where - // EOF and Punctuator tokens are already filtered out. - - if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) { - if (strict && token.octal) { - throwErrorTolerant(token, Messages.StrictOctalLiteral); - } - return markerApply(marker, delegate.createLiteral(token)); - } - - if (token.type === Token.Punctuator && token.value === '[') { - // For computed properties we should skip the [ and ], and - // capture in marker only the assignment expression itself. - marker = markerCreate(); - propertyKey = parseAssignmentExpression(); - result = markerApply(marker, propertyKey); - expect(']'); - return result; - } - - return markerApply(marker, delegate.createIdentifier(token.value)); - } - - function parseObjectProperty() { - var token, key, id, param, computed, - marker = markerCreate(), returnType, typeParameters; - - token = lookahead; - computed = (token.value === '[' && token.type === Token.Punctuator); - - if (token.type === Token.Identifier || computed || matchAsync()) { - id = parseObjectPropertyKey(); - - if (match(':')) { - lex(); - - return markerApply( - marker, - delegate.createProperty( - 'init', - id, - parseAssignmentExpression(), - false, - false, - computed - ) - ); - } - - if (match('(') || match('<')) { - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - return markerApply( - marker, - delegate.createProperty( - 'init', - id, - parsePropertyMethodFunction({ - generator: false, - async: false, - typeParameters: typeParameters - }), - true, - false, - computed - ) - ); - } - - // Property Assignment: Getter and Setter. - - if (token.value === 'get') { - computed = (lookahead.value === '['); - key = parseObjectPropertyKey(); - - expect('('); - expect(')'); - if (match(':')) { - returnType = parseTypeAnnotation(); - } - - return markerApply( - marker, - delegate.createProperty( - 'get', - key, - parsePropertyFunction({ - generator: false, - async: false, - returnType: returnType - }), - false, - false, - computed - ) - ); - } - - if (token.value === 'set') { - computed = (lookahead.value === '['); - key = parseObjectPropertyKey(); - - expect('('); - token = lookahead; - param = [ parseTypeAnnotatableIdentifier() ]; - expect(')'); - if (match(':')) { - returnType = parseTypeAnnotation(); - } - - return markerApply( - marker, - delegate.createProperty( - 'set', - key, - parsePropertyFunction({ - params: param, - generator: false, - async: false, - name: token, - returnType: returnType - }), - false, - false, - computed - ) - ); - } - - if (token.value === 'async') { - computed = (lookahead.value === '['); - key = parseObjectPropertyKey(); - - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - - return markerApply( - marker, - delegate.createProperty( - 'init', - key, - parsePropertyMethodFunction({ - generator: false, - async: true, - typeParameters: typeParameters - }), - true, - false, - computed - ) - ); - } - - if (computed) { - // Computed properties can only be used with full notation. - throwUnexpected(lookahead); - } - - return markerApply( - marker, - delegate.createProperty('init', id, id, false, true, false) - ); - } - - if (token.type === Token.EOF || token.type === Token.Punctuator) { - if (!match('*')) { - throwUnexpected(token); - } - lex(); - - computed = (lookahead.type === Token.Punctuator && lookahead.value === '['); - - id = parseObjectPropertyKey(); - - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - - if (!match('(')) { - throwUnexpected(lex()); - } - - return markerApply(marker, delegate.createProperty( - 'init', - id, - parsePropertyMethodFunction({ - generator: true, - typeParameters: typeParameters - }), - true, - false, - computed - )); - } - key = parseObjectPropertyKey(); - if (match(':')) { - lex(); - return markerApply(marker, delegate.createProperty('init', key, parseAssignmentExpression(), false, false, false)); - } - if (match('(') || match('<')) { - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - return markerApply(marker, delegate.createProperty( - 'init', - key, - parsePropertyMethodFunction({ - generator: false, - typeParameters: typeParameters - }), - true, - false, - false - )); - } - throwUnexpected(lex()); - } - - function parseObjectSpreadProperty() { - var marker = markerCreate(); - expect('...'); - return markerApply(marker, delegate.createSpreadProperty(parseAssignmentExpression())); - } - - function getFieldName(key) { - var toString = String; - if (key.type === Syntax.Identifier) { - return key.name; - } - return toString(key.value); - } - - function parseObjectInitialiser() { - var properties = [], property, name, kind, storedKind, map = new StringMap(), - marker = markerCreate(), toString = String; - - expect('{'); - - while (!match('}')) { - if (match('...')) { - property = parseObjectSpreadProperty(); - } else { - property = parseObjectProperty(); - - if (property.key.type === Syntax.Identifier) { - name = property.key.name; - } else { - name = toString(property.key.value); - } - kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set; - - if (map.has(name)) { - storedKind = map.get(name); - if (storedKind === PropertyKind.Data) { - if (strict && kind === PropertyKind.Data) { - throwErrorTolerant({}, Messages.StrictDuplicateProperty); - } else if (kind !== PropertyKind.Data) { - throwErrorTolerant({}, Messages.AccessorDataProperty); - } - } else { - if (kind === PropertyKind.Data) { - throwErrorTolerant({}, Messages.AccessorDataProperty); - } else if (storedKind & kind) { - throwErrorTolerant({}, Messages.AccessorGetSet); - } - } - map.set(name, storedKind | kind); - } else { - map.set(name, kind); - } - } - - properties.push(property); - - if (!match('}')) { - expect(','); - } - } - - expect('}'); - - return markerApply(marker, delegate.createObjectExpression(properties)); - } - - function parseTemplateElement(option) { - var marker = markerCreate(), - token = scanTemplateElement(option); - if (strict && token.octal) { - throwError(token, Messages.StrictOctalLiteral); - } - return markerApply(marker, delegate.createTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail)); - } - - function parseTemplateLiteral() { - var quasi, quasis, expressions, marker = markerCreate(); - - quasi = parseTemplateElement({ head: true }); - quasis = [ quasi ]; - expressions = []; - - while (!quasi.tail) { - expressions.push(parseExpression()); - quasi = parseTemplateElement({ head: false }); - quasis.push(quasi); - } - - return markerApply(marker, delegate.createTemplateLiteral(quasis, expressions)); - } - - // 11.1.6 The Grouping Operator - - function parseGroupExpression() { - var expr, marker, typeAnnotation; - - expect('('); - - ++state.parenthesizedCount; - - marker = markerCreate(); - - expr = parseExpression(); - - if (match(':')) { - typeAnnotation = parseTypeAnnotation(); - expr = markerApply(marker, delegate.createTypeCast( - expr, - typeAnnotation - )); - } - - expect(')'); - - return expr; - } - - function matchAsyncFuncExprOrDecl() { - var token; - - if (matchAsync()) { - token = lookahead2(); - if (token.type === Token.Keyword && token.value === 'function') { - return true; - } - } - - return false; - } - - // 11.1 Primary Expressions - - function parsePrimaryExpression() { - var marker, type, token, expr; - - type = lookahead.type; - - if (type === Token.Identifier) { - marker = markerCreate(); - return markerApply(marker, delegate.createIdentifier(lex().value)); - } - - if (type === Token.StringLiteral || type === Token.NumericLiteral) { - if (strict && lookahead.octal) { - throwErrorTolerant(lookahead, Messages.StrictOctalLiteral); - } - marker = markerCreate(); - return markerApply(marker, delegate.createLiteral(lex())); - } - - if (type === Token.Keyword) { - if (matchKeyword('this')) { - marker = markerCreate(); - lex(); - return markerApply(marker, delegate.createThisExpression()); - } - - if (matchKeyword('function')) { - return parseFunctionExpression(); - } - - if (matchKeyword('class')) { - return parseClassExpression(); - } - - if (matchKeyword('super')) { - marker = markerCreate(); - lex(); - return markerApply(marker, delegate.createIdentifier('super')); - } - } - - if (type === Token.BooleanLiteral) { - marker = markerCreate(); - token = lex(); - token.value = (token.value === 'true'); - return markerApply(marker, delegate.createLiteral(token)); - } - - if (type === Token.NullLiteral) { - marker = markerCreate(); - token = lex(); - token.value = null; - return markerApply(marker, delegate.createLiteral(token)); - } - - if (match('[')) { - return parseArrayInitialiser(); - } - - if (match('{')) { - return parseObjectInitialiser(); - } - - if (match('(')) { - return parseGroupExpression(); - } - - if (match('/') || match('/=')) { - marker = markerCreate(); - expr = delegate.createLiteral(scanRegExp()); - peek(); - return markerApply(marker, expr); - } - - if (type === Token.Template) { - return parseTemplateLiteral(); - } - - if (match('<')) { - return parseJSXElement(); - } - - throwUnexpected(lex()); - } - - // 11.2 Left-Hand-Side Expressions - - function parseArguments() { - var args = [], arg; - - expect('('); - - if (!match(')')) { - while (index < length) { - arg = parseSpreadOrAssignmentExpression(); - args.push(arg); - - if (match(')')) { - break; - } else if (arg.type === Syntax.SpreadElement) { - throwError({}, Messages.ElementAfterSpreadElement); - } - - expect(','); - } - } - - expect(')'); - - return args; - } - - function parseSpreadOrAssignmentExpression() { - if (match('...')) { - var marker = markerCreate(); - lex(); - return markerApply(marker, delegate.createSpreadElement(parseAssignmentExpression())); - } - return parseAssignmentExpression(); - } - - function parseNonComputedProperty() { - var marker = markerCreate(), - token = lex(); - - if (!isIdentifierName(token)) { - throwUnexpected(token); - } - - return markerApply(marker, delegate.createIdentifier(token.value)); - } - - function parseNonComputedMember() { - expect('.'); - - return parseNonComputedProperty(); - } - - function parseComputedMember() { - var expr; - - expect('['); - - expr = parseExpression(); - - expect(']'); - - return expr; - } - - function parseNewExpression() { - var callee, args, marker = markerCreate(); - - expectKeyword('new'); - callee = parseLeftHandSideExpression(); - args = match('(') ? parseArguments() : []; - - return markerApply(marker, delegate.createNewExpression(callee, args)); - } - - function parseLeftHandSideExpressionAllowCall() { - var expr, args, marker = markerCreate(); - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[') || match('(') || lookahead.type === Token.Template) { - if (match('(')) { - args = parseArguments(); - expr = markerApply(marker, delegate.createCallExpression(expr, args)); - } else if (match('[')) { - expr = markerApply(marker, delegate.createMemberExpression('[', expr, parseComputedMember())); - } else if (match('.')) { - expr = markerApply(marker, delegate.createMemberExpression('.', expr, parseNonComputedMember())); - } else { - expr = markerApply(marker, delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral())); - } - } - - return expr; - } - - function parseLeftHandSideExpression() { - var expr, marker = markerCreate(); - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[') || lookahead.type === Token.Template) { - if (match('[')) { - expr = markerApply(marker, delegate.createMemberExpression('[', expr, parseComputedMember())); - } else if (match('.')) { - expr = markerApply(marker, delegate.createMemberExpression('.', expr, parseNonComputedMember())); - } else { - expr = markerApply(marker, delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral())); - } - } - - return expr; - } - - // 11.3 Postfix Expressions - - function parsePostfixExpression() { - var marker = markerCreate(), - expr = parseLeftHandSideExpressionAllowCall(), - token; - - if (lookahead.type !== Token.Punctuator) { - return expr; - } - - if ((match('++') || match('--')) && !peekLineTerminator()) { - // 11.3.1, 11.3.2 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant({}, Messages.StrictLHSPostfix); - } - - if (!isLeftHandSide(expr)) { - throwError({}, Messages.InvalidLHSInAssignment); - } - - token = lex(); - expr = markerApply(marker, delegate.createPostfixExpression(token.value, expr)); - } - - return expr; - } - - // 11.4 Unary Operators - - function parseUnaryExpression() { - var marker, token, expr; - - if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) { - return parsePostfixExpression(); - } - - if (match('++') || match('--')) { - marker = markerCreate(); - token = lex(); - expr = parseUnaryExpression(); - // 11.4.4, 11.4.5 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant({}, Messages.StrictLHSPrefix); - } - - if (!isLeftHandSide(expr)) { - throwError({}, Messages.InvalidLHSInAssignment); - } - - return markerApply(marker, delegate.createUnaryExpression(token.value, expr)); - } - - if (match('+') || match('-') || match('~') || match('!')) { - marker = markerCreate(); - token = lex(); - expr = parseUnaryExpression(); - return markerApply(marker, delegate.createUnaryExpression(token.value, expr)); - } - - if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { - marker = markerCreate(); - token = lex(); - expr = parseUnaryExpression(); - expr = markerApply(marker, delegate.createUnaryExpression(token.value, expr)); - if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { - throwErrorTolerant({}, Messages.StrictDelete); - } - return expr; - } - - return parsePostfixExpression(); - } - - function binaryPrecedence(token, allowIn) { - var prec = 0; - - if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { - return 0; - } - - switch (token.value) { - case '||': - prec = 1; - break; - - case '&&': - prec = 2; - break; - - case '|': - prec = 3; - break; - - case '^': - prec = 4; - break; - - case '&': - prec = 5; - break; - - case '==': - case '!=': - case '===': - case '!==': - prec = 6; - break; - - case '<': - case '>': - case '<=': - case '>=': - case 'instanceof': - prec = 7; - break; - - case 'in': - prec = allowIn ? 7 : 0; - break; - - case '<<': - case '>>': - case '>>>': - prec = 8; - break; - - case '+': - case '-': - prec = 9; - break; - - case '*': - case '/': - case '%': - prec = 11; - break; - - default: - break; - } - - return prec; - } - - // 11.5 Multiplicative Operators - // 11.6 Additive Operators - // 11.7 Bitwise Shift Operators - // 11.8 Relational Operators - // 11.9 Equality Operators - // 11.10 Binary Bitwise Operators - // 11.11 Binary Logical Operators - - function parseBinaryExpression() { - var expr, token, prec, previousAllowIn, stack, right, operator, left, i, - marker, markers; - - previousAllowIn = state.allowIn; - state.allowIn = true; - - marker = markerCreate(); - left = parseUnaryExpression(); - - token = lookahead; - prec = binaryPrecedence(token, previousAllowIn); - if (prec === 0) { - return left; - } - token.prec = prec; - lex(); - - markers = [marker, markerCreate()]; - right = parseUnaryExpression(); - - stack = [left, token, right]; - - while ((prec = binaryPrecedence(lookahead, previousAllowIn)) > 0) { - - // Reduce: make a binary expression from the three topmost entries. - while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) { - right = stack.pop(); - operator = stack.pop().value; - left = stack.pop(); - expr = delegate.createBinaryExpression(operator, left, right); - markers.pop(); - marker = markers.pop(); - markerApply(marker, expr); - stack.push(expr); - markers.push(marker); - } - - // Shift. - token = lex(); - token.prec = prec; - stack.push(token); - markers.push(markerCreate()); - expr = parseUnaryExpression(); - stack.push(expr); - } - - state.allowIn = previousAllowIn; - - // Final reduce to clean-up the stack. - i = stack.length - 1; - expr = stack[i]; - markers.pop(); - while (i > 1) { - expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr); - i -= 2; - marker = markers.pop(); - markerApply(marker, expr); - } - - return expr; - } - - - // 11.12 Conditional Operator - - function parseConditionalExpression() { - var expr, previousAllowIn, consequent, alternate, marker = markerCreate(); - expr = parseBinaryExpression(); - - if (match('?')) { - lex(); - previousAllowIn = state.allowIn; - state.allowIn = true; - consequent = parseAssignmentExpression(); - state.allowIn = previousAllowIn; - expect(':'); - alternate = parseAssignmentExpression(); - - expr = markerApply(marker, delegate.createConditionalExpression(expr, consequent, alternate)); - } - - return expr; - } - - // 11.13 Assignment Operators - - // 12.14.5 AssignmentPattern - - function reinterpretAsAssignmentBindingPattern(expr) { - var i, len, property, element; - - if (expr.type === Syntax.ObjectExpression) { - expr.type = Syntax.ObjectPattern; - for (i = 0, len = expr.properties.length; i < len; i += 1) { - property = expr.properties[i]; - if (property.type === Syntax.SpreadProperty) { - if (i < len - 1) { - throwError({}, Messages.PropertyAfterSpreadProperty); - } - reinterpretAsAssignmentBindingPattern(property.argument); - } else { - if (property.kind !== 'init') { - throwError({}, Messages.InvalidLHSInAssignment); - } - reinterpretAsAssignmentBindingPattern(property.value); - } - } - } else if (expr.type === Syntax.ArrayExpression) { - expr.type = Syntax.ArrayPattern; - for (i = 0, len = expr.elements.length; i < len; i += 1) { - element = expr.elements[i]; - /* istanbul ignore else */ - if (element) { - reinterpretAsAssignmentBindingPattern(element); - } - } - } else if (expr.type === Syntax.Identifier) { - if (isRestrictedWord(expr.name)) { - throwError({}, Messages.InvalidLHSInAssignment); - } - } else if (expr.type === Syntax.SpreadElement) { - reinterpretAsAssignmentBindingPattern(expr.argument); - if (expr.argument.type === Syntax.ObjectPattern) { - throwError({}, Messages.ObjectPatternAsSpread); - } - } else { - /* istanbul ignore else */ - if (expr.type !== Syntax.MemberExpression && expr.type !== Syntax.CallExpression && expr.type !== Syntax.NewExpression) { - throwError({}, Messages.InvalidLHSInAssignment); - } - } - } - - // 13.2.3 BindingPattern - - function reinterpretAsDestructuredParameter(options, expr) { - var i, len, property, element; - - if (expr.type === Syntax.ObjectExpression) { - expr.type = Syntax.ObjectPattern; - for (i = 0, len = expr.properties.length; i < len; i += 1) { - property = expr.properties[i]; - if (property.type === Syntax.SpreadProperty) { - if (i < len - 1) { - throwError({}, Messages.PropertyAfterSpreadProperty); - } - reinterpretAsDestructuredParameter(options, property.argument); - } else { - if (property.kind !== 'init') { - throwError({}, Messages.InvalidLHSInFormalsList); - } - reinterpretAsDestructuredParameter(options, property.value); - } - } - } else if (expr.type === Syntax.ArrayExpression) { - expr.type = Syntax.ArrayPattern; - for (i = 0, len = expr.elements.length; i < len; i += 1) { - element = expr.elements[i]; - if (element) { - reinterpretAsDestructuredParameter(options, element); - } - } - } else if (expr.type === Syntax.Identifier) { - validateParam(options, expr, expr.name); - } else if (expr.type === Syntax.SpreadElement) { - // BindingRestElement only allows BindingIdentifier - if (expr.argument.type !== Syntax.Identifier) { - throwError({}, Messages.InvalidLHSInFormalsList); - } - validateParam(options, expr.argument, expr.argument.name); - } else { - throwError({}, Messages.InvalidLHSInFormalsList); - } - } - - function reinterpretAsCoverFormalsList(expressions) { - var i, len, param, params, defaults, defaultCount, options, rest; - - params = []; - defaults = []; - defaultCount = 0; - rest = null; - options = { - paramSet: new StringMap() - }; - - for (i = 0, len = expressions.length; i < len; i += 1) { - param = expressions[i]; - if (param.type === Syntax.Identifier) { - params.push(param); - defaults.push(null); - validateParam(options, param, param.name); - } else if (param.type === Syntax.ObjectExpression || param.type === Syntax.ArrayExpression) { - reinterpretAsDestructuredParameter(options, param); - params.push(param); - defaults.push(null); - } else if (param.type === Syntax.SpreadElement) { - assert(i === len - 1, 'It is guaranteed that SpreadElement is last element by parseExpression'); - if (param.argument.type !== Syntax.Identifier) { - throwError({}, Messages.InvalidLHSInFormalsList); - } - reinterpretAsDestructuredParameter(options, param.argument); - rest = param.argument; - } else if (param.type === Syntax.AssignmentExpression) { - params.push(param.left); - defaults.push(param.right); - ++defaultCount; - validateParam(options, param.left, param.left.name); - } else { - return null; - } - } - - if (options.message === Messages.StrictParamDupe) { - throwError( - strict ? options.stricted : options.firstRestricted, - options.message - ); - } - - if (defaultCount === 0) { - defaults = []; - } - - return { - params: params, - defaults: defaults, - rest: rest, - stricted: options.stricted, - firstRestricted: options.firstRestricted, - message: options.message - }; - } - - function parseArrowFunctionExpression(options, marker) { - var previousStrict, previousYieldAllowed, previousAwaitAllowed, body; - - expect('=>'); - - previousStrict = strict; - previousYieldAllowed = state.yieldAllowed; - state.yieldAllowed = false; - previousAwaitAllowed = state.awaitAllowed; - state.awaitAllowed = !!options.async; - body = parseConciseBody(); - - if (strict && options.firstRestricted) { - throwError(options.firstRestricted, options.message); - } - if (strict && options.stricted) { - throwErrorTolerant(options.stricted, options.message); - } - - strict = previousStrict; - state.yieldAllowed = previousYieldAllowed; - state.awaitAllowed = previousAwaitAllowed; - - return markerApply(marker, delegate.createArrowFunctionExpression( - options.params, - options.defaults, - body, - options.rest, - body.type !== Syntax.BlockStatement, - !!options.async - )); - } - - function parseAssignmentExpression() { - var marker, expr, token, params, oldParenthesizedCount, - startsWithParen = false, backtrackToken = lookahead, - possiblyAsync = false; - - if (matchYield()) { - return parseYieldExpression(); - } - - if (matchAwait()) { - return parseAwaitExpression(); - } - - oldParenthesizedCount = state.parenthesizedCount; - - marker = markerCreate(); - - if (matchAsyncFuncExprOrDecl()) { - return parseFunctionExpression(); - } - - if (matchAsync()) { - // We can't be completely sure that this 'async' token is - // actually a contextual keyword modifying a function - // expression, so we might have to un-lex() it later by - // calling rewind(backtrackToken). - possiblyAsync = true; - lex(); - } - - if (match('(')) { - token = lookahead2(); - if ((token.type === Token.Punctuator && token.value === ')') || token.value === '...') { - params = parseParams(); - if (!match('=>')) { - throwUnexpected(lex()); - } - params.async = possiblyAsync; - return parseArrowFunctionExpression(params, marker); - } - startsWithParen = true; - } - - token = lookahead; - - // If the 'async' keyword is not followed by a '(' character or an - // identifier, then it can't be an arrow function modifier, and we - // should interpret it as a normal identifer. - if (possiblyAsync && !match('(') && token.type !== Token.Identifier) { - possiblyAsync = false; - rewind(backtrackToken); - } - - expr = parseConditionalExpression(); - - if (match('=>') && - (state.parenthesizedCount === oldParenthesizedCount || - state.parenthesizedCount === (oldParenthesizedCount + 1))) { - if (expr.type === Syntax.Identifier) { - params = reinterpretAsCoverFormalsList([ expr ]); - } else if (expr.type === Syntax.AssignmentExpression || - expr.type === Syntax.ArrayExpression || - expr.type === Syntax.ObjectExpression) { - if (!startsWithParen) { - throwUnexpected(lex()); - } - params = reinterpretAsCoverFormalsList([ expr ]); - } else if (expr.type === Syntax.SequenceExpression) { - params = reinterpretAsCoverFormalsList(expr.expressions); - } - if (params) { - params.async = possiblyAsync; - return parseArrowFunctionExpression(params, marker); - } - } - - // If we haven't returned by now, then the 'async' keyword was not - // a function modifier, and we should rewind and interpret it as a - // normal identifier. - if (possiblyAsync) { - possiblyAsync = false; - rewind(backtrackToken); - expr = parseConditionalExpression(); - } - - if (matchAssign()) { - // 11.13.1 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant(token, Messages.StrictLHSAssignment); - } - - // ES.next draf 11.13 Runtime Semantics step 1 - if (match('=') && (expr.type === Syntax.ObjectExpression || expr.type === Syntax.ArrayExpression)) { - reinterpretAsAssignmentBindingPattern(expr); - } else if (!isLeftHandSide(expr)) { - throwError({}, Messages.InvalidLHSInAssignment); - } - - expr = markerApply(marker, delegate.createAssignmentExpression(lex().value, expr, parseAssignmentExpression())); - } - - return expr; - } - - // 11.14 Comma Operator - - function parseExpression() { - var marker, expr, expressions, sequence, spreadFound; - - marker = markerCreate(); - expr = parseAssignmentExpression(); - expressions = [ expr ]; - - if (match(',')) { - while (index < length) { - if (!match(',')) { - break; - } - - lex(); - expr = parseSpreadOrAssignmentExpression(); - expressions.push(expr); - - if (expr.type === Syntax.SpreadElement) { - spreadFound = true; - if (!match(')')) { - throwError({}, Messages.ElementAfterSpreadElement); - } - break; - } - } - - sequence = markerApply(marker, delegate.createSequenceExpression(expressions)); - } - - if (spreadFound && lookahead2().value !== '=>') { - throwError({}, Messages.IllegalSpread); - } - - return sequence || expr; - } - - // 12.1 Block - - function parseStatementList() { - var list = [], - statement; - - while (index < length) { - if (match('}')) { - break; - } - statement = parseSourceElement(); - if (typeof statement === 'undefined') { - break; - } - list.push(statement); - } - - return list; - } - - function parseBlock() { - var block, marker = markerCreate(); - - expect('{'); - - block = parseStatementList(); - - expect('}'); - - return markerApply(marker, delegate.createBlockStatement(block)); - } - - // 12.2 Variable Statement - - function parseTypeParameterDeclaration() { - var marker = markerCreate(), paramTypes = []; - - expect('<'); - while (!match('>')) { - paramTypes.push(parseTypeAnnotatableIdentifier()); - if (!match('>')) { - expect(','); - } - } - expect('>'); - - return markerApply(marker, delegate.createTypeParameterDeclaration( - paramTypes - )); - } - - function parseTypeParameterInstantiation() { - var marker = markerCreate(), oldInType = state.inType, paramTypes = []; - - state.inType = true; - - expect('<'); - while (!match('>')) { - paramTypes.push(parseType()); - if (!match('>')) { - expect(','); - } - } - expect('>'); - - state.inType = oldInType; - - return markerApply(marker, delegate.createTypeParameterInstantiation( - paramTypes - )); - } - - function parseObjectTypeIndexer(marker, isStatic) { - var id, key, value; - - expect('['); - id = parseObjectPropertyKey(); - expect(':'); - key = parseType(); - expect(']'); - expect(':'); - value = parseType(); - - return markerApply(marker, delegate.createObjectTypeIndexer( - id, - key, - value, - isStatic - )); - } - - function parseObjectTypeMethodish(marker) { - var params = [], rest = null, returnType, typeParameters = null; - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - - expect('('); - while (lookahead.type === Token.Identifier) { - params.push(parseFunctionTypeParam()); - if (!match(')')) { - expect(','); - } - } - - if (match('...')) { - lex(); - rest = parseFunctionTypeParam(); - } - expect(')'); - expect(':'); - returnType = parseType(); - - return markerApply(marker, delegate.createFunctionTypeAnnotation( - params, - returnType, - rest, - typeParameters - )); - } - - function parseObjectTypeMethod(marker, isStatic, key) { - var optional = false, value; - value = parseObjectTypeMethodish(marker); - - return markerApply(marker, delegate.createObjectTypeProperty( - key, - value, - optional, - isStatic - )); - } - - function parseObjectTypeCallProperty(marker, isStatic) { - var valueMarker = markerCreate(); - return markerApply(marker, delegate.createObjectTypeCallProperty( - parseObjectTypeMethodish(valueMarker), - isStatic - )); - } - - function parseObjectType(allowStatic) { - var callProperties = [], indexers = [], marker, optional = false, - properties = [], propertyKey, propertyTypeAnnotation, - token, isStatic, matchStatic; - - expect('{'); - - while (!match('}')) { - marker = markerCreate(); - matchStatic = - strict - ? matchKeyword('static') - : matchContextualKeyword('static'); - - if (allowStatic && matchStatic) { - token = lex(); - isStatic = true; - } - - if (match('[')) { - indexers.push(parseObjectTypeIndexer(marker, isStatic)); - } else if (match('(') || match('<')) { - callProperties.push(parseObjectTypeCallProperty(marker, allowStatic)); - } else { - if (isStatic && match(':')) { - propertyKey = markerApply(marker, delegate.createIdentifier(token)); - throwErrorTolerant(token, Messages.StrictReservedWord); - } else { - propertyKey = parseObjectPropertyKey(); - } - if (match('<') || match('(')) { - // This is a method property - properties.push(parseObjectTypeMethod(marker, isStatic, propertyKey)); - } else { - if (match('?')) { - lex(); - optional = true; - } - expect(':'); - propertyTypeAnnotation = parseType(); - properties.push(markerApply(marker, delegate.createObjectTypeProperty( - propertyKey, - propertyTypeAnnotation, - optional, - isStatic - ))); - } - } - - if (match(';')) { - lex(); - } else if (!match('}')) { - throwUnexpected(lookahead); - } - } - - expect('}'); - - return delegate.createObjectTypeAnnotation( - properties, - indexers, - callProperties - ); - } - - function parseGenericType() { - var marker = markerCreate(), - typeParameters = null, typeIdentifier; - - typeIdentifier = parseVariableIdentifier(); - - while (match('.')) { - expect('.'); - typeIdentifier = markerApply(marker, delegate.createQualifiedTypeIdentifier( - typeIdentifier, - parseVariableIdentifier() - )); - } - - if (match('<')) { - typeParameters = parseTypeParameterInstantiation(); - } - - return markerApply(marker, delegate.createGenericTypeAnnotation( - typeIdentifier, - typeParameters - )); - } - - function parseVoidType() { - var marker = markerCreate(); - expectKeyword('void'); - return markerApply(marker, delegate.createVoidTypeAnnotation()); - } - - function parseTypeofType() { - var argument, marker = markerCreate(); - expectKeyword('typeof'); - argument = parsePrimaryType(); - return markerApply(marker, delegate.createTypeofTypeAnnotation( - argument - )); - } - - function parseTupleType() { - var marker = markerCreate(), types = []; - expect('['); - // We allow trailing commas - while (index < length && !match(']')) { - types.push(parseType()); - if (match(']')) { - break; - } - expect(','); - } - expect(']'); - return markerApply(marker, delegate.createTupleTypeAnnotation( - types - )); - } - - function parseFunctionTypeParam() { - var marker = markerCreate(), name, optional = false, typeAnnotation; - name = parseVariableIdentifier(); - if (match('?')) { - lex(); - optional = true; - } - expect(':'); - typeAnnotation = parseType(); - return markerApply(marker, delegate.createFunctionTypeParam( - name, - typeAnnotation, - optional - )); - } - - function parseFunctionTypeParams() { - var ret = { params: [], rest: null }; - while (lookahead.type === Token.Identifier) { - ret.params.push(parseFunctionTypeParam()); - if (!match(')')) { - expect(','); - } - } - - if (match('...')) { - lex(); - ret.rest = parseFunctionTypeParam(); - } - return ret; - } - - // The parsing of types roughly parallels the parsing of expressions, and - // primary types are kind of like primary expressions...they're the - // primitives with which other types are constructed. - function parsePrimaryType() { - var params = null, returnType = null, - marker = markerCreate(), rest = null, tmp, - typeParameters, token, type, isGroupedType = false; - - switch (lookahead.type) { - case Token.Identifier: - switch (lookahead.value) { - case 'any': - lex(); - return markerApply(marker, delegate.createAnyTypeAnnotation()); - case 'bool': // fallthrough - case 'boolean': - lex(); - return markerApply(marker, delegate.createBooleanTypeAnnotation()); - case 'number': - lex(); - return markerApply(marker, delegate.createNumberTypeAnnotation()); - case 'string': - lex(); - return markerApply(marker, delegate.createStringTypeAnnotation()); - } - return markerApply(marker, parseGenericType()); - case Token.Punctuator: - switch (lookahead.value) { - case '{': - return markerApply(marker, parseObjectType()); - case '[': - return parseTupleType(); - case '<': - typeParameters = parseTypeParameterDeclaration(); - expect('('); - tmp = parseFunctionTypeParams(); - params = tmp.params; - rest = tmp.rest; - expect(')'); - - expect('=>'); - - returnType = parseType(); - - return markerApply(marker, delegate.createFunctionTypeAnnotation( - params, - returnType, - rest, - typeParameters - )); - case '(': - lex(); - // Check to see if this is actually a grouped type - if (!match(')') && !match('...')) { - if (lookahead.type === Token.Identifier) { - token = lookahead2(); - isGroupedType = token.value !== '?' && token.value !== ':'; - } else { - isGroupedType = true; - } - } - - if (isGroupedType) { - type = parseType(); - expect(')'); - - // If we see a => next then someone was probably confused about - // function types, so we can provide a better error message - if (match('=>')) { - throwError({}, Messages.ConfusedAboutFunctionType); - } - - return type; - } - - tmp = parseFunctionTypeParams(); - params = tmp.params; - rest = tmp.rest; - - expect(')'); - - expect('=>'); - - returnType = parseType(); - - return markerApply(marker, delegate.createFunctionTypeAnnotation( - params, - returnType, - rest, - null /* typeParameters */ - )); - } - break; - case Token.Keyword: - switch (lookahead.value) { - case 'void': - return markerApply(marker, parseVoidType()); - case 'typeof': - return markerApply(marker, parseTypeofType()); - } - break; - case Token.StringLiteral: - token = lex(); - if (token.octal) { - throwError(token, Messages.StrictOctalLiteral); - } - return markerApply(marker, delegate.createStringLiteralTypeAnnotation( - token - )); - } - - throwUnexpected(lookahead); - } - - function parsePostfixType() { - var marker = markerCreate(), t = parsePrimaryType(); - if (match('[')) { - expect('['); - expect(']'); - return markerApply(marker, delegate.createArrayTypeAnnotation(t)); - } - return t; - } - - function parsePrefixType() { - var marker = markerCreate(); - if (match('?')) { - lex(); - return markerApply(marker, delegate.createNullableTypeAnnotation( - parsePrefixType() - )); - } - return parsePostfixType(); - } - - - function parseIntersectionType() { - var marker = markerCreate(), type, types; - type = parsePrefixType(); - types = [type]; - while (match('&')) { - lex(); - types.push(parsePrefixType()); - } - - return types.length === 1 ? - type : - markerApply(marker, delegate.createIntersectionTypeAnnotation( - types - )); - } - - function parseUnionType() { - var marker = markerCreate(), type, types; - type = parseIntersectionType(); - types = [type]; - while (match('|')) { - lex(); - types.push(parseIntersectionType()); - } - return types.length === 1 ? - type : - markerApply(marker, delegate.createUnionTypeAnnotation( - types - )); - } - - function parseType() { - var oldInType = state.inType, type; - state.inType = true; - - type = parseUnionType(); - - state.inType = oldInType; - return type; - } - - function parseTypeAnnotation() { - var marker = markerCreate(), type; - - expect(':'); - type = parseType(); - - return markerApply(marker, delegate.createTypeAnnotation(type)); - } - - function parseVariableIdentifier() { - var marker = markerCreate(), - token = lex(); - - if (token.type !== Token.Identifier) { - throwUnexpected(token); - } - - return markerApply(marker, delegate.createIdentifier(token.value)); - } - - function parseTypeAnnotatableIdentifier(requireTypeAnnotation, canBeOptionalParam) { - var marker = markerCreate(), - ident = parseVariableIdentifier(), - isOptionalParam = false; - - if (canBeOptionalParam && match('?')) { - expect('?'); - isOptionalParam = true; - } - - if (requireTypeAnnotation || match(':')) { - ident.typeAnnotation = parseTypeAnnotation(); - ident = markerApply(marker, ident); - } - - if (isOptionalParam) { - ident.optional = true; - ident = markerApply(marker, ident); - } - - return ident; - } - - function parseVariableDeclaration(kind) { - var id, - marker = markerCreate(), - init = null, - typeAnnotationMarker = markerCreate(); - if (match('{')) { - id = parseObjectInitialiser(); - reinterpretAsAssignmentBindingPattern(id); - if (match(':')) { - id.typeAnnotation = parseTypeAnnotation(); - markerApply(typeAnnotationMarker, id); - } - } else if (match('[')) { - id = parseArrayInitialiser(); - reinterpretAsAssignmentBindingPattern(id); - if (match(':')) { - id.typeAnnotation = parseTypeAnnotation(); - markerApply(typeAnnotationMarker, id); - } - } else { - /* istanbul ignore next */ - id = state.allowKeyword ? parseNonComputedProperty() : parseTypeAnnotatableIdentifier(); - // 12.2.1 - if (strict && isRestrictedWord(id.name)) { - throwErrorTolerant({}, Messages.StrictVarName); - } - } - - if (kind === 'const') { - if (!match('=')) { - throwError({}, Messages.NoUninitializedConst); - } - expect('='); - init = parseAssignmentExpression(); - } else if (match('=')) { - lex(); - init = parseAssignmentExpression(); - } - - return markerApply(marker, delegate.createVariableDeclarator(id, init)); - } - - function parseVariableDeclarationList(kind) { - var list = []; - - do { - list.push(parseVariableDeclaration(kind)); - if (!match(',')) { - break; - } - lex(); - } while (index < length); - - return list; - } - - function parseVariableStatement() { - var declarations, marker = markerCreate(); - - expectKeyword('var'); - - declarations = parseVariableDeclarationList(); - - consumeSemicolon(); - - return markerApply(marker, delegate.createVariableDeclaration(declarations, 'var')); - } - - // kind may be `const` or `let` - // Both are experimental and not in the specification yet. - // see http://wiki.ecmascript.org/doku.php?id=harmony:const - // and http://wiki.ecmascript.org/doku.php?id=harmony:let - function parseConstLetDeclaration(kind) { - var declarations, marker = markerCreate(); - - expectKeyword(kind); - - declarations = parseVariableDeclarationList(kind); - - consumeSemicolon(); - - return markerApply(marker, delegate.createVariableDeclaration(declarations, kind)); - } - - // people.mozilla.org/~jorendorff/es6-draft.html - - function parseModuleSpecifier() { - var marker = markerCreate(), - specifier; - - if (lookahead.type !== Token.StringLiteral) { - throwError({}, Messages.InvalidModuleSpecifier); - } - specifier = delegate.createModuleSpecifier(lookahead); - lex(); - return markerApply(marker, specifier); - } - - function parseExportBatchSpecifier() { - var marker = markerCreate(); - expect('*'); - return markerApply(marker, delegate.createExportBatchSpecifier()); - } - - function parseExportSpecifier() { - var id, name = null, marker = markerCreate(), from; - if (matchKeyword('default')) { - lex(); - id = markerApply(marker, delegate.createIdentifier('default')); - // export {default} from "something"; - } else { - id = parseVariableIdentifier(); - } - if (matchContextualKeyword('as')) { - lex(); - name = parseNonComputedProperty(); - } - - return markerApply(marker, delegate.createExportSpecifier(id, name)); - } - - function parseExportDeclaration() { - var declaration = null, - possibleIdentifierToken, sourceElement, - isExportFromIdentifier, - src = null, specifiers = [], - marker = markerCreate(); - - expectKeyword('export'); - - if (matchKeyword('default')) { - // covers: - // export default ... - lex(); - if (matchKeyword('function') || matchKeyword('class')) { - possibleIdentifierToken = lookahead2(); - if (isIdentifierName(possibleIdentifierToken)) { - // covers: - // export default function foo () {} - // export default class foo {} - sourceElement = parseSourceElement(); - return markerApply(marker, delegate.createExportDeclaration(true, sourceElement, [sourceElement.id], null)); - } - // covers: - // export default function () {} - // export default class {} - switch (lookahead.value) { - case 'class': - return markerApply(marker, delegate.createExportDeclaration(true, parseClassExpression(), [], null)); - case 'function': - return markerApply(marker, delegate.createExportDeclaration(true, parseFunctionExpression(), [], null)); - } - } - - if (matchContextualKeyword('from')) { - throwError({}, Messages.UnexpectedToken, lookahead.value); - } - - // covers: - // export default {}; - // export default []; - if (match('{')) { - declaration = parseObjectInitialiser(); - } else if (match('[')) { - declaration = parseArrayInitialiser(); - } else { - declaration = parseAssignmentExpression(); - } - consumeSemicolon(); - return markerApply(marker, delegate.createExportDeclaration(true, declaration, [], null)); - } - - // non-default export - if (lookahead.type === Token.Keyword || matchContextualKeyword('type')) { - // covers: - // export var f = 1; - switch (lookahead.value) { - case 'type': - case 'let': - case 'const': - case 'var': - case 'class': - case 'function': - return markerApply(marker, delegate.createExportDeclaration(false, parseSourceElement(), specifiers, null)); - } - } - - if (match('*')) { - // covers: - // export * from "foo"; - specifiers.push(parseExportBatchSpecifier()); - - if (!matchContextualKeyword('from')) { - throwError({}, lookahead.value ? - Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); - } - lex(); - src = parseModuleSpecifier(); - consumeSemicolon(); - - return markerApply(marker, delegate.createExportDeclaration(false, null, specifiers, src)); - } - - expect('{'); - if (!match('}')) { - do { - isExportFromIdentifier = isExportFromIdentifier || matchKeyword('default'); - specifiers.push(parseExportSpecifier()); - } while (match(',') && lex()); - } - expect('}'); - - if (matchContextualKeyword('from')) { - // covering: - // export {default} from "foo"; - // export {foo} from "foo"; - lex(); - src = parseModuleSpecifier(); - consumeSemicolon(); - } else if (isExportFromIdentifier) { - // covering: - // export {default}; // missing fromClause - throwError({}, lookahead.value ? - Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); - } else { - // cover - // export {foo}; - consumeSemicolon(); - } - return markerApply(marker, delegate.createExportDeclaration(false, declaration, specifiers, src)); - } - - - function parseImportSpecifier() { - // import {} ...; - var id, name = null, marker = markerCreate(); - - id = parseNonComputedProperty(); - if (matchContextualKeyword('as')) { - lex(); - name = parseVariableIdentifier(); - } - - return markerApply(marker, delegate.createImportSpecifier(id, name)); - } - - function parseNamedImports() { - var specifiers = []; - // {foo, bar as bas} - expect('{'); - if (!match('}')) { - do { - specifiers.push(parseImportSpecifier()); - } while (match(',') && lex()); - } - expect('}'); - return specifiers; - } - - function parseImportDefaultSpecifier() { - // import ...; - var id, marker = markerCreate(); - - id = parseNonComputedProperty(); - - return markerApply(marker, delegate.createImportDefaultSpecifier(id)); - } - - function parseImportNamespaceSpecifier() { - // import <* as foo> ...; - var id, marker = markerCreate(); - - expect('*'); - if (!matchContextualKeyword('as')) { - throwError({}, Messages.NoAsAfterImportNamespace); - } - lex(); - id = parseNonComputedProperty(); - - return markerApply(marker, delegate.createImportNamespaceSpecifier(id)); - } - - function parseImportDeclaration() { - var specifiers, src, marker = markerCreate(), isType = false, token2; - - expectKeyword('import'); - - if (matchContextualKeyword('type')) { - token2 = lookahead2(); - if ((token2.type === Token.Identifier && token2.value !== 'from') || - (token2.type === Token.Punctuator && - (token2.value === '{' || token2.value === '*'))) { - isType = true; - lex(); - } - } - - specifiers = []; - - if (lookahead.type === Token.StringLiteral) { - // covers: - // import "foo"; - src = parseModuleSpecifier(); - consumeSemicolon(); - return markerApply(marker, delegate.createImportDeclaration(specifiers, src, isType)); - } - - if (!matchKeyword('default') && isIdentifierName(lookahead)) { - // covers: - // import foo - // import foo, ... - specifiers.push(parseImportDefaultSpecifier()); - if (match(',')) { - lex(); - } - } - if (match('*')) { - // covers: - // import foo, * as foo - // import * as foo - specifiers.push(parseImportNamespaceSpecifier()); - } else if (match('{')) { - // covers: - // import foo, {bar} - // import {bar} - specifiers = specifiers.concat(parseNamedImports()); - } - - if (!matchContextualKeyword('from')) { - throwError({}, lookahead.value ? - Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); - } - lex(); - src = parseModuleSpecifier(); - consumeSemicolon(); - - return markerApply(marker, delegate.createImportDeclaration(specifiers, src, isType)); - } - - // 12.3 Empty Statement - - function parseEmptyStatement() { - var marker = markerCreate(); - expect(';'); - return markerApply(marker, delegate.createEmptyStatement()); - } - - // 12.4 Expression Statement - - function parseExpressionStatement() { - var marker = markerCreate(), expr = parseExpression(); - consumeSemicolon(); - return markerApply(marker, delegate.createExpressionStatement(expr)); - } - - // 12.5 If statement - - function parseIfStatement() { - var test, consequent, alternate, marker = markerCreate(); - - expectKeyword('if'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - consequent = parseStatement(); - - if (matchKeyword('else')) { - lex(); - alternate = parseStatement(); - } else { - alternate = null; - } - - return markerApply(marker, delegate.createIfStatement(test, consequent, alternate)); - } - - // 12.6 Iteration Statements - - function parseDoWhileStatement() { - var body, test, oldInIteration, marker = markerCreate(); - - expectKeyword('do'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - expectKeyword('while'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - if (match(';')) { - lex(); - } - - return markerApply(marker, delegate.createDoWhileStatement(body, test)); - } - - function parseWhileStatement() { - var test, body, oldInIteration, marker = markerCreate(); - - expectKeyword('while'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - return markerApply(marker, delegate.createWhileStatement(test, body)); - } - - function parseForVariableDeclaration() { - var marker = markerCreate(), - token = lex(), - declarations = parseVariableDeclarationList(); - - return markerApply(marker, delegate.createVariableDeclaration(declarations, token.value)); - } - - function parseForStatement(opts) { - var init, test, update, left, right, body, operator, oldInIteration, - marker = markerCreate(); - init = test = update = null; - expectKeyword('for'); - - // http://wiki.ecmascript.org/doku.php?id=proposals:iterators_and_generators&s=each - if (matchContextualKeyword('each')) { - throwError({}, Messages.EachNotAllowed); - } - - expect('('); - - if (match(';')) { - lex(); - } else { - if (matchKeyword('var') || matchKeyword('let') || matchKeyword('const')) { - state.allowIn = false; - init = parseForVariableDeclaration(); - state.allowIn = true; - - if (init.declarations.length === 1) { - if (matchKeyword('in') || matchContextualKeyword('of')) { - operator = lookahead; - if (!((operator.value === 'in' || init.kind !== 'var') && init.declarations[0].init)) { - lex(); - left = init; - right = parseExpression(); - init = null; - } - } - } - } else { - state.allowIn = false; - init = parseExpression(); - state.allowIn = true; - - if (matchContextualKeyword('of')) { - operator = lex(); - left = init; - right = parseExpression(); - init = null; - } else if (matchKeyword('in')) { - // LeftHandSideExpression - if (!isAssignableLeftHandSide(init)) { - throwError({}, Messages.InvalidLHSInForIn); - } - operator = lex(); - left = init; - right = parseExpression(); - init = null; - } - } - - if (typeof left === 'undefined') { - expect(';'); - } - } - - if (typeof left === 'undefined') { - - if (!match(';')) { - test = parseExpression(); - } - expect(';'); - - if (!match(')')) { - update = parseExpression(); - } - } - - expect(')'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - if (!(opts !== undefined && opts.ignoreBody)) { - body = parseStatement(); - } - - state.inIteration = oldInIteration; - - if (typeof left === 'undefined') { - return markerApply(marker, delegate.createForStatement(init, test, update, body)); - } - - if (operator.value === 'in') { - return markerApply(marker, delegate.createForInStatement(left, right, body)); - } - return markerApply(marker, delegate.createForOfStatement(left, right, body)); - } - - // 12.7 The continue statement - - function parseContinueStatement() { - var label = null, marker = markerCreate(); - - expectKeyword('continue'); - - // Optimize the most common form: 'continue;'. - if (source.charCodeAt(index) === 59) { - lex(); - - if (!state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return markerApply(marker, delegate.createContinueStatement(null)); - } - - if (peekLineTerminator()) { - if (!state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return markerApply(marker, delegate.createContinueStatement(null)); - } - - if (lookahead.type === Token.Identifier) { - label = parseVariableIdentifier(); - - if (!state.labelSet.has(label.name)) { - throwError({}, Messages.UnknownLabel, label.name); - } - } - - consumeSemicolon(); - - if (label === null && !state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return markerApply(marker, delegate.createContinueStatement(label)); - } - - // 12.8 The break statement - - function parseBreakStatement() { - var label = null, marker = markerCreate(); - - expectKeyword('break'); - - // Catch the very common case first: immediately a semicolon (char #59). - if (source.charCodeAt(index) === 59) { - lex(); - - if (!(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return markerApply(marker, delegate.createBreakStatement(null)); - } - - if (peekLineTerminator()) { - if (!(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return markerApply(marker, delegate.createBreakStatement(null)); - } - - if (lookahead.type === Token.Identifier) { - label = parseVariableIdentifier(); - - if (!state.labelSet.has(label.name)) { - throwError({}, Messages.UnknownLabel, label.name); - } - } - - consumeSemicolon(); - - if (label === null && !(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return markerApply(marker, delegate.createBreakStatement(label)); - } - - // 12.9 The return statement - - function parseReturnStatement() { - var argument = null, marker = markerCreate(); - - expectKeyword('return'); - - if (!state.inFunctionBody) { - throwErrorTolerant({}, Messages.IllegalReturn); - } - - // 'return' followed by a space and an identifier is very common. - if (source.charCodeAt(index) === 32) { - if (isIdentifierStart(source.charCodeAt(index + 1))) { - argument = parseExpression(); - consumeSemicolon(); - return markerApply(marker, delegate.createReturnStatement(argument)); - } - } - - if (peekLineTerminator()) { - return markerApply(marker, delegate.createReturnStatement(null)); - } - - if (!match(';')) { - if (!match('}') && lookahead.type !== Token.EOF) { - argument = parseExpression(); - } - } - - consumeSemicolon(); - - return markerApply(marker, delegate.createReturnStatement(argument)); - } - - // 12.10 The with statement - - function parseWithStatement() { - var object, body, marker = markerCreate(); - - if (strict) { - throwErrorTolerant({}, Messages.StrictModeWith); - } - - expectKeyword('with'); - - expect('('); - - object = parseExpression(); - - expect(')'); - - body = parseStatement(); - - return markerApply(marker, delegate.createWithStatement(object, body)); - } - - // 12.10 The swith statement - - function parseSwitchCase() { - var test, - consequent = [], - sourceElement, - marker = markerCreate(); - - if (matchKeyword('default')) { - lex(); - test = null; - } else { - expectKeyword('case'); - test = parseExpression(); - } - expect(':'); - - while (index < length) { - if (match('}') || matchKeyword('default') || matchKeyword('case')) { - break; - } - sourceElement = parseSourceElement(); - if (typeof sourceElement === 'undefined') { - break; - } - consequent.push(sourceElement); - } - - return markerApply(marker, delegate.createSwitchCase(test, consequent)); - } - - function parseSwitchStatement() { - var discriminant, cases, clause, oldInSwitch, defaultFound, marker = markerCreate(); - - expectKeyword('switch'); - - expect('('); - - discriminant = parseExpression(); - - expect(')'); - - expect('{'); - - cases = []; - - if (match('}')) { - lex(); - return markerApply(marker, delegate.createSwitchStatement(discriminant, cases)); - } - - oldInSwitch = state.inSwitch; - state.inSwitch = true; - defaultFound = false; - - while (index < length) { - if (match('}')) { - break; - } - clause = parseSwitchCase(); - if (clause.test === null) { - if (defaultFound) { - throwError({}, Messages.MultipleDefaultsInSwitch); - } - defaultFound = true; - } - cases.push(clause); - } - - state.inSwitch = oldInSwitch; - - expect('}'); - - return markerApply(marker, delegate.createSwitchStatement(discriminant, cases)); - } - - // 12.13 The throw statement - - function parseThrowStatement() { - var argument, marker = markerCreate(); - - expectKeyword('throw'); - - if (peekLineTerminator()) { - throwError({}, Messages.NewlineAfterThrow); - } - - argument = parseExpression(); - - consumeSemicolon(); - - return markerApply(marker, delegate.createThrowStatement(argument)); - } - - // 12.14 The try statement - - function parseCatchClause() { - var param, body, marker = markerCreate(); - - expectKeyword('catch'); - - expect('('); - if (match(')')) { - throwUnexpected(lookahead); - } - - param = parseExpression(); - // 12.14.1 - if (strict && param.type === Syntax.Identifier && isRestrictedWord(param.name)) { - throwErrorTolerant({}, Messages.StrictCatchVariable); - } - - expect(')'); - body = parseBlock(); - return markerApply(marker, delegate.createCatchClause(param, body)); - } - - function parseTryStatement() { - var block, handlers = [], finalizer = null, marker = markerCreate(); - - expectKeyword('try'); - - block = parseBlock(); - - if (matchKeyword('catch')) { - handlers.push(parseCatchClause()); - } - - if (matchKeyword('finally')) { - lex(); - finalizer = parseBlock(); - } - - if (handlers.length === 0 && !finalizer) { - throwError({}, Messages.NoCatchOrFinally); - } - - return markerApply(marker, delegate.createTryStatement(block, [], handlers, finalizer)); - } - - // 12.15 The debugger statement - - function parseDebuggerStatement() { - var marker = markerCreate(); - expectKeyword('debugger'); - - consumeSemicolon(); - - return markerApply(marker, delegate.createDebuggerStatement()); - } - - // 12 Statements - - function parseStatement() { - var type = lookahead.type, - marker, - expr, - labeledBody; - - if (type === Token.EOF) { - throwUnexpected(lookahead); - } - - if (type === Token.Punctuator) { - switch (lookahead.value) { - case ';': - return parseEmptyStatement(); - case '{': - return parseBlock(); - case '(': - return parseExpressionStatement(); - default: - break; - } - } - - if (type === Token.Keyword) { - switch (lookahead.value) { - case 'break': - return parseBreakStatement(); - case 'continue': - return parseContinueStatement(); - case 'debugger': - return parseDebuggerStatement(); - case 'do': - return parseDoWhileStatement(); - case 'for': - return parseForStatement(); - case 'function': - return parseFunctionDeclaration(); - case 'class': - return parseClassDeclaration(); - case 'if': - return parseIfStatement(); - case 'return': - return parseReturnStatement(); - case 'switch': - return parseSwitchStatement(); - case 'throw': - return parseThrowStatement(); - case 'try': - return parseTryStatement(); - case 'var': - return parseVariableStatement(); - case 'while': - return parseWhileStatement(); - case 'with': - return parseWithStatement(); - default: - break; - } - } - - if (matchAsyncFuncExprOrDecl()) { - return parseFunctionDeclaration(); - } - - marker = markerCreate(); - expr = parseExpression(); - - // 12.12 Labelled Statements - if ((expr.type === Syntax.Identifier) && match(':')) { - lex(); - - if (state.labelSet.has(expr.name)) { - throwError({}, Messages.Redeclaration, 'Label', expr.name); - } - - state.labelSet.set(expr.name, true); - labeledBody = parseStatement(); - state.labelSet["delete"](expr.name); - return markerApply(marker, delegate.createLabeledStatement(expr, labeledBody)); - } - - consumeSemicolon(); - - return markerApply(marker, delegate.createExpressionStatement(expr)); - } - - // 13 Function Definition - - function parseConciseBody() { - if (match('{')) { - return parseFunctionSourceElements(); - } - return parseAssignmentExpression(); - } - - function parseFunctionSourceElements() { - var sourceElement, sourceElements = [], token, directive, firstRestricted, - oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, oldParenthesizedCount, - marker = markerCreate(); - - expect('{'); - - while (index < length) { - if (lookahead.type !== Token.StringLiteral) { - break; - } - token = lookahead; - - sourceElement = parseSourceElement(); - sourceElements.push(sourceElement); - if (sourceElement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = source.slice(token.range[0] + 1, token.range[1] - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - - oldLabelSet = state.labelSet; - oldInIteration = state.inIteration; - oldInSwitch = state.inSwitch; - oldInFunctionBody = state.inFunctionBody; - oldParenthesizedCount = state.parenthesizedCount; - - state.labelSet = new StringMap(); - state.inIteration = false; - state.inSwitch = false; - state.inFunctionBody = true; - state.parenthesizedCount = 0; - - while (index < length) { - if (match('}')) { - break; - } - sourceElement = parseSourceElement(); - if (typeof sourceElement === 'undefined') { - break; - } - sourceElements.push(sourceElement); - } - - expect('}'); - - state.labelSet = oldLabelSet; - state.inIteration = oldInIteration; - state.inSwitch = oldInSwitch; - state.inFunctionBody = oldInFunctionBody; - state.parenthesizedCount = oldParenthesizedCount; - - return markerApply(marker, delegate.createBlockStatement(sourceElements)); - } - - function validateParam(options, param, name) { - if (strict) { - if (isRestrictedWord(name)) { - options.stricted = param; - options.message = Messages.StrictParamName; - } - if (options.paramSet.has(name)) { - options.stricted = param; - options.message = Messages.StrictParamDupe; - } - } else if (!options.firstRestricted) { - if (isRestrictedWord(name)) { - options.firstRestricted = param; - options.message = Messages.StrictParamName; - } else if (isStrictModeReservedWord(name)) { - options.firstRestricted = param; - options.message = Messages.StrictReservedWord; - } else if (options.paramSet.has(name)) { - options.firstRestricted = param; - options.message = Messages.StrictParamDupe; - } - } - options.paramSet.set(name, true); - } - - function parseParam(options) { - var marker, token, rest, param, def; - - token = lookahead; - if (token.value === '...') { - token = lex(); - rest = true; - } - - if (match('[')) { - marker = markerCreate(); - param = parseArrayInitialiser(); - reinterpretAsDestructuredParameter(options, param); - if (match(':')) { - param.typeAnnotation = parseTypeAnnotation(); - markerApply(marker, param); - } - } else if (match('{')) { - marker = markerCreate(); - if (rest) { - throwError({}, Messages.ObjectPatternAsRestParameter); - } - param = parseObjectInitialiser(); - reinterpretAsDestructuredParameter(options, param); - if (match(':')) { - param.typeAnnotation = parseTypeAnnotation(); - markerApply(marker, param); - } - } else { - param = - rest - ? parseTypeAnnotatableIdentifier( - false, /* requireTypeAnnotation */ - false /* canBeOptionalParam */ - ) - : parseTypeAnnotatableIdentifier( - false, /* requireTypeAnnotation */ - true /* canBeOptionalParam */ - ); - - validateParam(options, token, token.value); - } - - if (match('=')) { - if (rest) { - throwErrorTolerant(lookahead, Messages.DefaultRestParameter); - } - lex(); - def = parseAssignmentExpression(); - ++options.defaultCount; - } - - if (rest) { - if (!match(')')) { - throwError({}, Messages.ParameterAfterRestParameter); - } - options.rest = param; - return false; - } - - options.params.push(param); - options.defaults.push(def); - return !match(')'); - } - - function parseParams(firstRestricted) { - var options, marker = markerCreate(); - - options = { - params: [], - defaultCount: 0, - defaults: [], - rest: null, - firstRestricted: firstRestricted - }; - - expect('('); - - if (!match(')')) { - options.paramSet = new StringMap(); - while (index < length) { - if (!parseParam(options)) { - break; - } - expect(','); - } - } - - expect(')'); - - if (options.defaultCount === 0) { - options.defaults = []; - } - - if (match(':')) { - options.returnType = parseTypeAnnotation(); - } - - return markerApply(marker, options); - } - - function parseFunctionDeclaration() { - var id, body, token, tmp, firstRestricted, message, generator, isAsync, - previousStrict, previousYieldAllowed, previousAwaitAllowed, - marker = markerCreate(), typeParameters; - - isAsync = false; - if (matchAsync()) { - lex(); - isAsync = true; - } - - expectKeyword('function'); - - generator = false; - if (match('*')) { - lex(); - generator = true; - } - - token = lookahead; - - id = parseVariableIdentifier(); - - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - - if (strict) { - if (isRestrictedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - - tmp = parseParams(firstRestricted); - firstRestricted = tmp.firstRestricted; - if (tmp.message) { - message = tmp.message; - } - - previousStrict = strict; - previousYieldAllowed = state.yieldAllowed; - state.yieldAllowed = generator; - previousAwaitAllowed = state.awaitAllowed; - state.awaitAllowed = isAsync; - - body = parseFunctionSourceElements(); - - if (strict && firstRestricted) { - throwError(firstRestricted, message); - } - if (strict && tmp.stricted) { - throwErrorTolerant(tmp.stricted, message); - } - strict = previousStrict; - state.yieldAllowed = previousYieldAllowed; - state.awaitAllowed = previousAwaitAllowed; - - return markerApply( - marker, - delegate.createFunctionDeclaration( - id, - tmp.params, - tmp.defaults, - body, - tmp.rest, - generator, - false, - isAsync, - tmp.returnType, - typeParameters - ) - ); - } - - function parseFunctionExpression() { - var token, id = null, firstRestricted, message, tmp, body, generator, isAsync, - previousStrict, previousYieldAllowed, previousAwaitAllowed, - marker = markerCreate(), typeParameters; - - isAsync = false; - if (matchAsync()) { - lex(); - isAsync = true; - } - - expectKeyword('function'); - - generator = false; - - if (match('*')) { - lex(); - generator = true; - } - - if (!match('(')) { - if (!match('<')) { - token = lookahead; - id = parseVariableIdentifier(); - - if (strict) { - if (isRestrictedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - } - - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - } - - tmp = parseParams(firstRestricted); - firstRestricted = tmp.firstRestricted; - if (tmp.message) { - message = tmp.message; - } - - previousStrict = strict; - previousYieldAllowed = state.yieldAllowed; - state.yieldAllowed = generator; - previousAwaitAllowed = state.awaitAllowed; - state.awaitAllowed = isAsync; - - body = parseFunctionSourceElements(); - - if (strict && firstRestricted) { - throwError(firstRestricted, message); - } - if (strict && tmp.stricted) { - throwErrorTolerant(tmp.stricted, message); - } - strict = previousStrict; - state.yieldAllowed = previousYieldAllowed; - state.awaitAllowed = previousAwaitAllowed; - - return markerApply( - marker, - delegate.createFunctionExpression( - id, - tmp.params, - tmp.defaults, - body, - tmp.rest, - generator, - false, - isAsync, - tmp.returnType, - typeParameters - ) - ); - } - - function parseYieldExpression() { - var delegateFlag, expr, marker = markerCreate(); - - expectKeyword('yield', !strict); - - delegateFlag = false; - if (match('*')) { - lex(); - delegateFlag = true; - } - - expr = parseAssignmentExpression(); - - return markerApply(marker, delegate.createYieldExpression(expr, delegateFlag)); - } - - function parseAwaitExpression() { - var expr, marker = markerCreate(); - expectContextualKeyword('await'); - expr = parseAssignmentExpression(); - return markerApply(marker, delegate.createAwaitExpression(expr)); - } - - // 14 Functions and classes - - // 14.1 Functions is defined above (13 in ES5) - // 14.2 Arrow Functions Definitions is defined in (7.3 assignments) - - // 14.3 Method Definitions - // 14.3.7 - function specialMethod(methodDefinition) { - return methodDefinition.kind === 'get' || - methodDefinition.kind === 'set' || - methodDefinition.value.generator; - } - - function parseMethodDefinition(key, isStatic, generator, computed) { - var token, param, propType, - isAsync, typeParameters, tokenValue, returnType; - - propType = isStatic ? ClassPropertyType["static"] : ClassPropertyType.prototype; - - if (generator) { - return delegate.createMethodDefinition( - propType, - '', - key, - parsePropertyMethodFunction({ generator: true }), - computed - ); - } - - tokenValue = key.type === 'Identifier' && key.name; - - if (tokenValue === 'get' && !match('(')) { - key = parseObjectPropertyKey(); - - expect('('); - expect(')'); - if (match(':')) { - returnType = parseTypeAnnotation(); - } - return delegate.createMethodDefinition( - propType, - 'get', - key, - parsePropertyFunction({ generator: false, returnType: returnType }), - computed - ); - } - if (tokenValue === 'set' && !match('(')) { - key = parseObjectPropertyKey(); - - expect('('); - token = lookahead; - param = [ parseTypeAnnotatableIdentifier() ]; - expect(')'); - if (match(':')) { - returnType = parseTypeAnnotation(); - } - return delegate.createMethodDefinition( - propType, - 'set', - key, - parsePropertyFunction({ - params: param, - generator: false, - name: token, - returnType: returnType - }), - computed - ); - } - - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - - isAsync = tokenValue === 'async' && !match('('); - if (isAsync) { - key = parseObjectPropertyKey(); - } - - return delegate.createMethodDefinition( - propType, - '', - key, - parsePropertyMethodFunction({ - generator: false, - async: isAsync, - typeParameters: typeParameters - }), - computed - ); - } - - function parseClassProperty(key, computed, isStatic) { - var typeAnnotation; - - typeAnnotation = parseTypeAnnotation(); - expect(';'); - - return delegate.createClassProperty( - key, - typeAnnotation, - computed, - isStatic - ); - } - - function parseClassElement() { - var computed = false, generator = false, key, marker = markerCreate(), - isStatic = false, possiblyOpenBracketToken; - if (match(';')) { - lex(); - return undefined; - } - - if (lookahead.value === 'static') { - lex(); - isStatic = true; - } - - if (match('*')) { - lex(); - generator = true; - } - - possiblyOpenBracketToken = lookahead; - if (matchContextualKeyword('get') || matchContextualKeyword('set')) { - possiblyOpenBracketToken = lookahead2(); - } - - if (possiblyOpenBracketToken.type === Token.Punctuator - && possiblyOpenBracketToken.value === '[') { - computed = true; - } - - key = parseObjectPropertyKey(); - - if (!generator && lookahead.value === ':') { - return markerApply(marker, parseClassProperty(key, computed, isStatic)); - } - - return markerApply(marker, parseMethodDefinition( - key, - isStatic, - generator, - computed - )); - } - - function parseClassBody() { - var classElement, classElements = [], existingProps = {}, - marker = markerCreate(), propName, propType; - - existingProps[ClassPropertyType["static"]] = new StringMap(); - existingProps[ClassPropertyType.prototype] = new StringMap(); - - expect('{'); - - while (index < length) { - if (match('}')) { - break; - } - classElement = parseClassElement(existingProps); - - if (typeof classElement !== 'undefined') { - classElements.push(classElement); - - propName = !classElement.computed && getFieldName(classElement.key); - if (propName !== false) { - propType = classElement["static"] ? - ClassPropertyType["static"] : - ClassPropertyType.prototype; - - if (classElement.type === Syntax.MethodDefinition) { - if (propName === 'constructor' && !classElement["static"]) { - if (specialMethod(classElement)) { - throwError(classElement, Messages.IllegalClassConstructorProperty); - } - if (existingProps[ClassPropertyType.prototype].has('constructor')) { - throwError(classElement.key, Messages.IllegalDuplicateClassProperty); - } - } - existingProps[propType].set(propName, true); - } - } - } - } - - expect('}'); - - return markerApply(marker, delegate.createClassBody(classElements)); - } - - function parseClassImplements() { - var id, implemented = [], marker, typeParameters; - if (strict) { - expectKeyword('implements'); - } else { - expectContextualKeyword('implements'); - } - while (index < length) { - marker = markerCreate(); - id = parseVariableIdentifier(); - if (match('<')) { - typeParameters = parseTypeParameterInstantiation(); - } else { - typeParameters = null; - } - implemented.push(markerApply(marker, delegate.createClassImplements( - id, - typeParameters - ))); - if (!match(',')) { - break; - } - expect(','); - } - return implemented; - } - - function parseClassExpression() { - var id, implemented, previousYieldAllowed, superClass = null, - superTypeParameters, marker = markerCreate(), typeParameters, - matchImplements; - - expectKeyword('class'); - - matchImplements = - strict - ? matchKeyword('implements') - : matchContextualKeyword('implements'); - - if (!matchKeyword('extends') && !matchImplements && !match('{')) { - id = parseVariableIdentifier(); - } - - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - - if (matchKeyword('extends')) { - expectKeyword('extends'); - previousYieldAllowed = state.yieldAllowed; - state.yieldAllowed = false; - superClass = parseLeftHandSideExpressionAllowCall(); - if (match('<')) { - superTypeParameters = parseTypeParameterInstantiation(); - } - state.yieldAllowed = previousYieldAllowed; - } - - if (strict ? matchKeyword('implements') : matchContextualKeyword('implements')) { - implemented = parseClassImplements(); - } - - return markerApply(marker, delegate.createClassExpression( - id, - superClass, - parseClassBody(), - typeParameters, - superTypeParameters, - implemented - )); - } - - function parseClassDeclaration() { - var id, implemented, previousYieldAllowed, superClass = null, - superTypeParameters, marker = markerCreate(), typeParameters; - - expectKeyword('class'); - - id = parseVariableIdentifier(); - - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - - if (matchKeyword('extends')) { - expectKeyword('extends'); - previousYieldAllowed = state.yieldAllowed; - state.yieldAllowed = false; - superClass = parseLeftHandSideExpressionAllowCall(); - if (match('<')) { - superTypeParameters = parseTypeParameterInstantiation(); - } - state.yieldAllowed = previousYieldAllowed; - } - - if (strict ? matchKeyword('implements') : matchContextualKeyword('implements')) { - implemented = parseClassImplements(); - } - - return markerApply(marker, delegate.createClassDeclaration( - id, - superClass, - parseClassBody(), - typeParameters, - superTypeParameters, - implemented - )); - } - - // 15 Program - - function parseSourceElement() { - var token; - if (lookahead.type === Token.Keyword) { - switch (lookahead.value) { - case 'const': - case 'let': - return parseConstLetDeclaration(lookahead.value); - case 'function': - return parseFunctionDeclaration(); - case 'export': - throwErrorTolerant({}, Messages.IllegalExportDeclaration); - return parseExportDeclaration(); - case 'import': - throwErrorTolerant({}, Messages.IllegalImportDeclaration); - return parseImportDeclaration(); - case 'interface': - if (lookahead2().type === Token.Identifier) { - return parseInterface(); - } - return parseStatement(); - default: - return parseStatement(); - } - } - - if (matchContextualKeyword('type') - && lookahead2().type === Token.Identifier) { - return parseTypeAlias(); - } - - if (matchContextualKeyword('interface') - && lookahead2().type === Token.Identifier) { - return parseInterface(); - } - - if (matchContextualKeyword('declare')) { - token = lookahead2(); - if (token.type === Token.Keyword) { - switch (token.value) { - case 'class': - return parseDeclareClass(); - case 'function': - return parseDeclareFunction(); - case 'var': - return parseDeclareVariable(); - } - } else if (token.type === Token.Identifier - && token.value === 'module') { - return parseDeclareModule(); - } - } - - if (lookahead.type !== Token.EOF) { - return parseStatement(); - } - } - - function parseProgramElement() { - var isModule = extra.sourceType === 'module' || extra.sourceType === 'nonStrictModule'; - - if (isModule && lookahead.type === Token.Keyword) { - switch (lookahead.value) { - case 'export': - return parseExportDeclaration(); - case 'import': - return parseImportDeclaration(); - } - } - - return parseSourceElement(); - } - - function parseProgramElements() { - var sourceElement, sourceElements = [], token, directive, firstRestricted; - - while (index < length) { - token = lookahead; - if (token.type !== Token.StringLiteral) { - break; - } - - sourceElement = parseProgramElement(); - sourceElements.push(sourceElement); - if (sourceElement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = source.slice(token.range[0] + 1, token.range[1] - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - - while (index < length) { - sourceElement = parseProgramElement(); - if (typeof sourceElement === 'undefined') { - break; - } - sourceElements.push(sourceElement); - } - return sourceElements; - } - - function parseProgram() { - var body, marker = markerCreate(); - strict = extra.sourceType === 'module'; - peek(); - body = parseProgramElements(); - return markerApply(marker, delegate.createProgram(body)); - } - - // 16 JSX - - XHTMLEntities = { - quot: '\u0022', - amp: '&', - apos: '\u0027', - lt: '<', - gt: '>', - nbsp: '\u00A0', - iexcl: '\u00A1', - cent: '\u00A2', - pound: '\u00A3', - curren: '\u00A4', - yen: '\u00A5', - brvbar: '\u00A6', - sect: '\u00A7', - uml: '\u00A8', - copy: '\u00A9', - ordf: '\u00AA', - laquo: '\u00AB', - not: '\u00AC', - shy: '\u00AD', - reg: '\u00AE', - macr: '\u00AF', - deg: '\u00B0', - plusmn: '\u00B1', - sup2: '\u00B2', - sup3: '\u00B3', - acute: '\u00B4', - micro: '\u00B5', - para: '\u00B6', - middot: '\u00B7', - cedil: '\u00B8', - sup1: '\u00B9', - ordm: '\u00BA', - raquo: '\u00BB', - frac14: '\u00BC', - frac12: '\u00BD', - frac34: '\u00BE', - iquest: '\u00BF', - Agrave: '\u00C0', - Aacute: '\u00C1', - Acirc: '\u00C2', - Atilde: '\u00C3', - Auml: '\u00C4', - Aring: '\u00C5', - AElig: '\u00C6', - Ccedil: '\u00C7', - Egrave: '\u00C8', - Eacute: '\u00C9', - Ecirc: '\u00CA', - Euml: '\u00CB', - Igrave: '\u00CC', - Iacute: '\u00CD', - Icirc: '\u00CE', - Iuml: '\u00CF', - ETH: '\u00D0', - Ntilde: '\u00D1', - Ograve: '\u00D2', - Oacute: '\u00D3', - Ocirc: '\u00D4', - Otilde: '\u00D5', - Ouml: '\u00D6', - times: '\u00D7', - Oslash: '\u00D8', - Ugrave: '\u00D9', - Uacute: '\u00DA', - Ucirc: '\u00DB', - Uuml: '\u00DC', - Yacute: '\u00DD', - THORN: '\u00DE', - szlig: '\u00DF', - agrave: '\u00E0', - aacute: '\u00E1', - acirc: '\u00E2', - atilde: '\u00E3', - auml: '\u00E4', - aring: '\u00E5', - aelig: '\u00E6', - ccedil: '\u00E7', - egrave: '\u00E8', - eacute: '\u00E9', - ecirc: '\u00EA', - euml: '\u00EB', - igrave: '\u00EC', - iacute: '\u00ED', - icirc: '\u00EE', - iuml: '\u00EF', - eth: '\u00F0', - ntilde: '\u00F1', - ograve: '\u00F2', - oacute: '\u00F3', - ocirc: '\u00F4', - otilde: '\u00F5', - ouml: '\u00F6', - divide: '\u00F7', - oslash: '\u00F8', - ugrave: '\u00F9', - uacute: '\u00FA', - ucirc: '\u00FB', - uuml: '\u00FC', - yacute: '\u00FD', - thorn: '\u00FE', - yuml: '\u00FF', - OElig: '\u0152', - oelig: '\u0153', - Scaron: '\u0160', - scaron: '\u0161', - Yuml: '\u0178', - fnof: '\u0192', - circ: '\u02C6', - tilde: '\u02DC', - Alpha: '\u0391', - Beta: '\u0392', - Gamma: '\u0393', - Delta: '\u0394', - Epsilon: '\u0395', - Zeta: '\u0396', - Eta: '\u0397', - Theta: '\u0398', - Iota: '\u0399', - Kappa: '\u039A', - Lambda: '\u039B', - Mu: '\u039C', - Nu: '\u039D', - Xi: '\u039E', - Omicron: '\u039F', - Pi: '\u03A0', - Rho: '\u03A1', - Sigma: '\u03A3', - Tau: '\u03A4', - Upsilon: '\u03A5', - Phi: '\u03A6', - Chi: '\u03A7', - Psi: '\u03A8', - Omega: '\u03A9', - alpha: '\u03B1', - beta: '\u03B2', - gamma: '\u03B3', - delta: '\u03B4', - epsilon: '\u03B5', - zeta: '\u03B6', - eta: '\u03B7', - theta: '\u03B8', - iota: '\u03B9', - kappa: '\u03BA', - lambda: '\u03BB', - mu: '\u03BC', - nu: '\u03BD', - xi: '\u03BE', - omicron: '\u03BF', - pi: '\u03C0', - rho: '\u03C1', - sigmaf: '\u03C2', - sigma: '\u03C3', - tau: '\u03C4', - upsilon: '\u03C5', - phi: '\u03C6', - chi: '\u03C7', - psi: '\u03C8', - omega: '\u03C9', - thetasym: '\u03D1', - upsih: '\u03D2', - piv: '\u03D6', - ensp: '\u2002', - emsp: '\u2003', - thinsp: '\u2009', - zwnj: '\u200C', - zwj: '\u200D', - lrm: '\u200E', - rlm: '\u200F', - ndash: '\u2013', - mdash: '\u2014', - lsquo: '\u2018', - rsquo: '\u2019', - sbquo: '\u201A', - ldquo: '\u201C', - rdquo: '\u201D', - bdquo: '\u201E', - dagger: '\u2020', - Dagger: '\u2021', - bull: '\u2022', - hellip: '\u2026', - permil: '\u2030', - prime: '\u2032', - Prime: '\u2033', - lsaquo: '\u2039', - rsaquo: '\u203A', - oline: '\u203E', - frasl: '\u2044', - euro: '\u20AC', - image: '\u2111', - weierp: '\u2118', - real: '\u211C', - trade: '\u2122', - alefsym: '\u2135', - larr: '\u2190', - uarr: '\u2191', - rarr: '\u2192', - darr: '\u2193', - harr: '\u2194', - crarr: '\u21B5', - lArr: '\u21D0', - uArr: '\u21D1', - rArr: '\u21D2', - dArr: '\u21D3', - hArr: '\u21D4', - forall: '\u2200', - part: '\u2202', - exist: '\u2203', - empty: '\u2205', - nabla: '\u2207', - isin: '\u2208', - notin: '\u2209', - ni: '\u220B', - prod: '\u220F', - sum: '\u2211', - minus: '\u2212', - lowast: '\u2217', - radic: '\u221A', - prop: '\u221D', - infin: '\u221E', - ang: '\u2220', - and: '\u2227', - or: '\u2228', - cap: '\u2229', - cup: '\u222A', - 'int': '\u222B', - there4: '\u2234', - sim: '\u223C', - cong: '\u2245', - asymp: '\u2248', - ne: '\u2260', - equiv: '\u2261', - le: '\u2264', - ge: '\u2265', - sub: '\u2282', - sup: '\u2283', - nsub: '\u2284', - sube: '\u2286', - supe: '\u2287', - oplus: '\u2295', - otimes: '\u2297', - perp: '\u22A5', - sdot: '\u22C5', - lceil: '\u2308', - rceil: '\u2309', - lfloor: '\u230A', - rfloor: '\u230B', - lang: '\u2329', - rang: '\u232A', - loz: '\u25CA', - spades: '\u2660', - clubs: '\u2663', - hearts: '\u2665', - diams: '\u2666' - }; - - function getQualifiedJSXName(object) { - if (object.type === Syntax.JSXIdentifier) { - return object.name; - } - if (object.type === Syntax.JSXNamespacedName) { - return object.namespace.name + ':' + object.name.name; - } - /* istanbul ignore else */ - if (object.type === Syntax.JSXMemberExpression) { - return ( - getQualifiedJSXName(object.object) + '.' + - getQualifiedJSXName(object.property) - ); - } - /* istanbul ignore next */ - throwUnexpected(object); - } - - function isJSXIdentifierStart(ch) { - // exclude backslash (\) - return (ch !== 92) && isIdentifierStart(ch); - } - - function isJSXIdentifierPart(ch) { - // exclude backslash (\) and add hyphen (-) - return (ch !== 92) && (ch === 45 || isIdentifierPart(ch)); - } - - function scanJSXIdentifier() { - var ch, start, value = ''; - - start = index; - while (index < length) { - ch = source.charCodeAt(index); - if (!isJSXIdentifierPart(ch)) { - break; - } - value += source[index++]; - } - - return { - type: Token.JSXIdentifier, - value: value, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - function scanJSXEntity() { - var ch, str = '', start = index, count = 0, code; - ch = source[index]; - assert(ch === '&', 'Entity must start with an ampersand'); - index++; - while (index < length && count++ < 10) { - ch = source[index++]; - if (ch === ';') { - break; - } - str += ch; - } - - // Well-formed entity (ending was found). - if (ch === ';') { - // Numeric entity. - if (str[0] === '#') { - if (str[1] === 'x') { - code = +('0' + str.substr(1)); - } else { - // Removing leading zeros in order to avoid treating as octal in old browsers. - code = +str.substr(1).replace(Regex.LeadingZeros, ''); - } - - if (!isNaN(code)) { - return String.fromCharCode(code); - } - /* istanbul ignore else */ - } else if (XHTMLEntities[str]) { - return XHTMLEntities[str]; - } - } - - // Treat non-entity sequences as regular text. - index = start + 1; - return '&'; - } - - function scanJSXText(stopChars) { - var ch, str = '', start; - start = index; - while (index < length) { - ch = source[index]; - if (stopChars.indexOf(ch) !== -1) { - break; - } - if (ch === '&') { - str += scanJSXEntity(); - } else { - index++; - if (ch === '\r' && source[index] === '\n') { - str += ch; - ch = source[index]; - index++; - } - if (isLineTerminator(ch.charCodeAt(0))) { - ++lineNumber; - lineStart = index; - } - str += ch; - } - } - return { - type: Token.JSXText, - value: str, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - function scanJSXStringLiteral() { - var innerToken, quote, start; - - quote = source[index]; - assert((quote === '\'' || quote === '"'), - 'String literal must starts with a quote'); - - start = index; - ++index; - - innerToken = scanJSXText([quote]); - - if (quote !== source[index]) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - ++index; - - innerToken.range = [start, index]; - - return innerToken; - } - - /** - * Between JSX opening and closing tags (e.g. HERE), anything that - * is not another JSX tag and is not an expression wrapped by {} is text. - */ - function advanceJSXChild() { - var ch = source.charCodeAt(index); - - // '<' 60, '>' 62, '{' 123, '}' 125 - if (ch !== 60 && ch !== 62 && ch !== 123 && ch !== 125) { - return scanJSXText(['<', '>', '{', '}']); - } - - return scanPunctuator(); - } - - function parseJSXIdentifier() { - var token, marker = markerCreate(); - - if (lookahead.type !== Token.JSXIdentifier) { - throwUnexpected(lookahead); - } - - token = lex(); - return markerApply(marker, delegate.createJSXIdentifier(token.value)); - } - - function parseJSXNamespacedName() { - var namespace, name, marker = markerCreate(); - - namespace = parseJSXIdentifier(); - expect(':'); - name = parseJSXIdentifier(); - - return markerApply(marker, delegate.createJSXNamespacedName(namespace, name)); - } - - function parseJSXMemberExpression() { - var marker = markerCreate(), - expr = parseJSXIdentifier(); - - while (match('.')) { - lex(); - expr = markerApply(marker, delegate.createJSXMemberExpression(expr, parseJSXIdentifier())); - } - - return expr; - } - - function parseJSXElementName() { - if (lookahead2().value === ':') { - return parseJSXNamespacedName(); - } - if (lookahead2().value === '.') { - return parseJSXMemberExpression(); - } - - return parseJSXIdentifier(); - } - - function parseJSXAttributeName() { - if (lookahead2().value === ':') { - return parseJSXNamespacedName(); - } - - return parseJSXIdentifier(); - } - - function parseJSXAttributeValue() { - var value, marker; - if (match('{')) { - value = parseJSXExpressionContainer(); - if (value.expression.type === Syntax.JSXEmptyExpression) { - throwError( - value, - 'JSX attributes must only be assigned a non-empty ' + - 'expression' - ); - } - } else if (match('<')) { - value = parseJSXElement(); - } else if (lookahead.type === Token.JSXText) { - marker = markerCreate(); - value = markerApply(marker, delegate.createLiteral(lex())); - } else { - throwError({}, Messages.InvalidJSXAttributeValue); - } - return value; - } - - function parseJSXEmptyExpression() { - var marker = markerCreatePreserveWhitespace(); - while (source.charAt(index) !== '}') { - index++; - } - return markerApply(marker, delegate.createJSXEmptyExpression()); - } - - function parseJSXExpressionContainer() { - var expression, origInJSXChild, origInJSXTag, marker = markerCreate(); - - origInJSXChild = state.inJSXChild; - origInJSXTag = state.inJSXTag; - state.inJSXChild = false; - state.inJSXTag = false; - - expect('{'); - - if (match('}')) { - expression = parseJSXEmptyExpression(); - } else { - expression = parseExpression(); - } - - state.inJSXChild = origInJSXChild; - state.inJSXTag = origInJSXTag; - - expect('}'); - - return markerApply(marker, delegate.createJSXExpressionContainer(expression)); - } - - function parseJSXSpreadAttribute() { - var expression, origInJSXChild, origInJSXTag, marker = markerCreate(); - - origInJSXChild = state.inJSXChild; - origInJSXTag = state.inJSXTag; - state.inJSXChild = false; - state.inJSXTag = false; - - expect('{'); - expect('...'); - - expression = parseAssignmentExpression(); - - state.inJSXChild = origInJSXChild; - state.inJSXTag = origInJSXTag; - - expect('}'); - - return markerApply(marker, delegate.createJSXSpreadAttribute(expression)); - } - - function parseJSXAttribute() { - var name, marker; - - if (match('{')) { - return parseJSXSpreadAttribute(); - } - - marker = markerCreate(); - - name = parseJSXAttributeName(); - - // HTML empty attribute - if (match('=')) { - lex(); - return markerApply(marker, delegate.createJSXAttribute(name, parseJSXAttributeValue())); - } - - return markerApply(marker, delegate.createJSXAttribute(name)); - } - - function parseJSXChild() { - var token, marker; - if (match('{')) { - token = parseJSXExpressionContainer(); - } else if (lookahead.type === Token.JSXText) { - marker = markerCreatePreserveWhitespace(); - token = markerApply(marker, delegate.createLiteral(lex())); - } else if (match('<')) { - token = parseJSXElement(); - } else { - throwUnexpected(lookahead); - } - return token; - } - - function parseJSXClosingElement() { - var name, origInJSXChild, origInJSXTag, marker = markerCreate(); - origInJSXChild = state.inJSXChild; - origInJSXTag = state.inJSXTag; - state.inJSXChild = false; - state.inJSXTag = true; - expect('<'); - expect('/'); - name = parseJSXElementName(); - // Because advance() (called by lex() called by expect()) expects there - // to be a valid token after >, it needs to know whether to look for a - // standard JS token or an JSX text node - state.inJSXChild = origInJSXChild; - state.inJSXTag = origInJSXTag; - expect('>'); - return markerApply(marker, delegate.createJSXClosingElement(name)); - } - - function parseJSXOpeningElement() { - var name, attributes = [], selfClosing = false, origInJSXChild, origInJSXTag, marker = markerCreate(); - - origInJSXChild = state.inJSXChild; - origInJSXTag = state.inJSXTag; - state.inJSXChild = false; - state.inJSXTag = true; - - expect('<'); - - name = parseJSXElementName(); - - while (index < length && - lookahead.value !== '/' && - lookahead.value !== '>') { - attributes.push(parseJSXAttribute()); - } - - state.inJSXTag = origInJSXTag; - - if (lookahead.value === '/') { - expect('/'); - // Because advance() (called by lex() called by expect()) expects - // there to be a valid token after >, it needs to know whether to - // look for a standard JS token or an JSX text node - state.inJSXChild = origInJSXChild; - expect('>'); - selfClosing = true; - } else { - state.inJSXChild = true; - expect('>'); - } - return markerApply(marker, delegate.createJSXOpeningElement(name, attributes, selfClosing)); - } - - function parseJSXElement() { - var openingElement, closingElement = null, children = [], origInJSXChild, origInJSXTag, marker = markerCreate(); - - origInJSXChild = state.inJSXChild; - origInJSXTag = state.inJSXTag; - openingElement = parseJSXOpeningElement(); - - if (!openingElement.selfClosing) { - while (index < length) { - state.inJSXChild = false; // Call lookahead2() with inJSXChild = false because one
two
; - // - // the default error message is a bit incomprehensible. Since it's - // rarely (never?) useful to write a less-than sign after an JSX - // element, we disallow it here in the parser in order to provide a - // better error message. (In the rare case that the less-than operator - // was intended, the left tag can be wrapped in parentheses.) - if (!origInJSXChild && match('<')) { - throwError(lookahead, Messages.AdjacentJSXElements); - } - - return markerApply(marker, delegate.createJSXElement(openingElement, closingElement, children)); - } - - function parseTypeAlias() { - var id, marker = markerCreate(), typeParameters = null, right; - expectContextualKeyword('type'); - id = parseVariableIdentifier(); - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - expect('='); - right = parseType(); - consumeSemicolon(); - return markerApply(marker, delegate.createTypeAlias(id, typeParameters, right)); - } - - function parseInterfaceExtends() { - var marker = markerCreate(), id, typeParameters = null; - - id = parseVariableIdentifier(); - if (match('<')) { - typeParameters = parseTypeParameterInstantiation(); - } - - return markerApply(marker, delegate.createInterfaceExtends( - id, - typeParameters - )); - } - - function parseInterfaceish(marker, allowStatic) { - var body, bodyMarker, extended = [], id, - typeParameters = null; - - id = parseVariableIdentifier(); - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - - if (matchKeyword('extends')) { - expectKeyword('extends'); - - while (index < length) { - extended.push(parseInterfaceExtends()); - if (!match(',')) { - break; - } - expect(','); - } - } - - bodyMarker = markerCreate(); - body = markerApply(bodyMarker, parseObjectType(allowStatic)); - - return markerApply(marker, delegate.createInterface( - id, - typeParameters, - body, - extended - )); - } - - function parseInterface() { - var marker = markerCreate(); - - if (strict) { - expectKeyword('interface'); - } else { - expectContextualKeyword('interface'); - } - - return parseInterfaceish(marker, /* allowStatic */false); - } - - function parseDeclareClass() { - var marker = markerCreate(), ret; - expectContextualKeyword('declare'); - expectKeyword('class'); - - ret = parseInterfaceish(marker, /* allowStatic */true); - ret.type = Syntax.DeclareClass; - return ret; - } - - function parseDeclareFunction() { - var id, idMarker, - marker = markerCreate(), params, returnType, rest, tmp, - typeParameters = null, value, valueMarker; - - expectContextualKeyword('declare'); - expectKeyword('function'); - idMarker = markerCreate(); - id = parseVariableIdentifier(); - - valueMarker = markerCreate(); - if (match('<')) { - typeParameters = parseTypeParameterDeclaration(); - } - expect('('); - tmp = parseFunctionTypeParams(); - params = tmp.params; - rest = tmp.rest; - expect(')'); - - expect(':'); - returnType = parseType(); - - value = markerApply(valueMarker, delegate.createFunctionTypeAnnotation( - params, - returnType, - rest, - typeParameters - )); - - id.typeAnnotation = markerApply(valueMarker, delegate.createTypeAnnotation( - value - )); - markerApply(idMarker, id); - - consumeSemicolon(); - - return markerApply(marker, delegate.createDeclareFunction( - id - )); - } - - function parseDeclareVariable() { - var id, marker = markerCreate(); - expectContextualKeyword('declare'); - expectKeyword('var'); - id = parseTypeAnnotatableIdentifier(); - - consumeSemicolon(); - - return markerApply(marker, delegate.createDeclareVariable( - id - )); - } - - function parseDeclareModule() { - var body = [], bodyMarker, id, idMarker, marker = markerCreate(), token; - expectContextualKeyword('declare'); - expectContextualKeyword('module'); - - if (lookahead.type === Token.StringLiteral) { - if (strict && lookahead.octal) { - throwErrorTolerant(lookahead, Messages.StrictOctalLiteral); - } - idMarker = markerCreate(); - id = markerApply(idMarker, delegate.createLiteral(lex())); - } else { - id = parseVariableIdentifier(); - } - - bodyMarker = markerCreate(); - expect('{'); - while (index < length && !match('}')) { - token = lookahead2(); - switch (token.value) { - case 'class': - body.push(parseDeclareClass()); - break; - case 'function': - body.push(parseDeclareFunction()); - break; - case 'var': - body.push(parseDeclareVariable()); - break; - default: - throwUnexpected(lookahead); - } - } - expect('}'); - - return markerApply(marker, delegate.createDeclareModule( - id, - markerApply(bodyMarker, delegate.createBlockStatement(body)) - )); - } - - function collectToken() { - var loc, token, range, value, entry; - - /* istanbul ignore else */ - if (!state.inJSXChild) { - skipComment(); - } - - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - - token = extra.advance(); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - - if (token.type !== Token.EOF) { - range = [token.range[0], token.range[1]]; - value = source.slice(token.range[0], token.range[1]); - entry = { - type: TokenName[token.type], - value: value, - range: range, - loc: loc - }; - if (token.regex) { - entry.regex = { - pattern: token.regex.pattern, - flags: token.regex.flags - }; - } - extra.tokens.push(entry); - } - - return token; - } - - function collectRegex() { - var pos, loc, regex, token; - - skipComment(); - - pos = index; - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - - regex = extra.scanRegExp(); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - - if (!extra.tokenize) { - /* istanbul ignore next */ - // Pop the previous token, which is likely '/' or '/=' - if (extra.tokens.length > 0) { - token = extra.tokens[extra.tokens.length - 1]; - if (token.range[0] === pos && token.type === 'Punctuator') { - if (token.value === '/' || token.value === '/=') { - extra.tokens.pop(); - } - } - } - - extra.tokens.push({ - type: 'RegularExpression', - value: regex.literal, - regex: regex.regex, - range: [pos, index], - loc: loc - }); - } - - return regex; - } - - function filterTokenLocation() { - var i, entry, token, tokens = []; - - for (i = 0; i < extra.tokens.length; ++i) { - entry = extra.tokens[i]; - token = { - type: entry.type, - value: entry.value - }; - if (entry.regex) { - token.regex = { - pattern: entry.regex.pattern, - flags: entry.regex.flags - }; - } - if (extra.range) { - token.range = entry.range; - } - if (extra.loc) { - token.loc = entry.loc; - } - tokens.push(token); - } - - extra.tokens = tokens; - } - - function patch() { - if (typeof extra.tokens !== 'undefined') { - extra.advance = advance; - extra.scanRegExp = scanRegExp; - - advance = collectToken; - scanRegExp = collectRegex; - } - } - - function unpatch() { - if (typeof extra.scanRegExp === 'function') { - advance = extra.advance; - scanRegExp = extra.scanRegExp; - } - } - - // This is used to modify the delegate. - - function extend(object, properties) { - var entry, result = {}; - - for (entry in object) { - /* istanbul ignore else */ - if (object.hasOwnProperty(entry)) { - result[entry] = object[entry]; - } - } - - for (entry in properties) { - /* istanbul ignore else */ - if (properties.hasOwnProperty(entry)) { - result[entry] = properties[entry]; - } - } - - return result; - } - - function tokenize(code, options) { - var toString, - token, - tokens; - - toString = String; - if (typeof code !== 'string' && !(code instanceof String)) { - code = toString(code); - } - - delegate = SyntaxTreeDelegate; - source = code; - index = 0; - lineNumber = (source.length > 0) ? 1 : 0; - lineStart = 0; - length = source.length; - lookahead = null; - state = { - allowKeyword: true, - allowIn: true, - labelSet: new StringMap(), - inFunctionBody: false, - inIteration: false, - inSwitch: false, - lastCommentStart: -1 - }; - - extra = {}; - - // Options matching. - options = options || {}; - - // Of course we collect tokens here. - options.tokens = true; - extra.tokens = []; - extra.tokenize = true; - // The following two fields are necessary to compute the Regex tokens. - extra.openParenToken = -1; - extra.openCurlyToken = -1; - - extra.range = (typeof options.range === 'boolean') && options.range; - extra.loc = (typeof options.loc === 'boolean') && options.loc; - - if (typeof options.comment === 'boolean' && options.comment) { - extra.comments = []; - } - if (typeof options.tolerant === 'boolean' && options.tolerant) { - extra.errors = []; - } - - patch(); - - try { - peek(); - if (lookahead.type === Token.EOF) { - return extra.tokens; - } - - token = lex(); - while (lookahead.type !== Token.EOF) { - try { - token = lex(); - } catch (lexError) { - token = lookahead; - if (extra.errors) { - extra.errors.push(lexError); - // We have to break on the first error - // to avoid infinite loops. - break; - } else { - throw lexError; - } - } - } - - filterTokenLocation(); - tokens = extra.tokens; - if (typeof extra.comments !== 'undefined') { - tokens.comments = extra.comments; - } - if (typeof extra.errors !== 'undefined') { - tokens.errors = extra.errors; - } - } catch (e) { - throw e; - } finally { - unpatch(); - extra = {}; - } - return tokens; - } - - function parse(code, options) { - var program, toString; - - toString = String; - if (typeof code !== 'string' && !(code instanceof String)) { - code = toString(code); - } - - delegate = SyntaxTreeDelegate; - source = code; - index = 0; - lineNumber = (source.length > 0) ? 1 : 0; - lineStart = 0; - length = source.length; - lookahead = null; - state = { - allowKeyword: false, - allowIn: true, - labelSet: new StringMap(), - parenthesizedCount: 0, - inFunctionBody: false, - inIteration: false, - inSwitch: false, - inJSXChild: false, - inJSXTag: false, - inType: false, - lastCommentStart: -1, - yieldAllowed: false, - awaitAllowed: false - }; - - extra = {}; - if (typeof options !== 'undefined') { - extra.range = (typeof options.range === 'boolean') && options.range; - extra.loc = (typeof options.loc === 'boolean') && options.loc; - extra.attachComment = (typeof options.attachComment === 'boolean') && options.attachComment; - - if (extra.loc && options.source !== null && options.source !== undefined) { - delegate = extend(delegate, { - 'postProcess': function (node) { - node.loc.source = toString(options.source); - return node; - } - }); - } - - extra.sourceType = options.sourceType; - if (typeof options.tokens === 'boolean' && options.tokens) { - extra.tokens = []; - } - if (typeof options.comment === 'boolean' && options.comment) { - extra.comments = []; - } - if (typeof options.tolerant === 'boolean' && options.tolerant) { - extra.errors = []; - } - if (extra.attachComment) { - extra.range = true; - extra.comments = []; - extra.bottomRightStack = []; - extra.trailingComments = []; - extra.leadingComments = []; - } - } - - patch(); - try { - program = parseProgram(); - if (typeof extra.comments !== 'undefined') { - program.comments = extra.comments; - } - if (typeof extra.tokens !== 'undefined') { - filterTokenLocation(); - program.tokens = extra.tokens; - } - if (typeof extra.errors !== 'undefined') { - program.errors = extra.errors; - } - } catch (e) { - throw e; - } finally { - unpatch(); - extra = {}; - } - - return program; - } - - // Sync with *.json manifests. - exports.version = '13001.1001.0-dev-harmony-fb'; - - exports.tokenize = tokenize; - - exports.parse = parse; - - // Deep copy. - /* istanbul ignore next */ - exports.Syntax = (function () { - var name, types = {}; - - if (typeof Object.create === 'function') { - types = Object.create(null); - } - - for (name in Syntax) { - if (Syntax.hasOwnProperty(name)) { - types[name] = Syntax[name]; - } - } - - if (typeof Object.freeze === 'function') { - Object.freeze(types); - } - - return types; - }()); - -})); -/* vim: set sw=4 ts=4 et tw=80 : */ - -},{}],10:[function(_dereq_,module,exports){ -var Base62 = (function (my) { - my.chars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] - - my.encode = function(i){ - if (i === 0) {return '0'} - var s = '' - while (i > 0) { - s = this.chars[i % 62] + s - i = Math.floor(i/62) - } - return s - }; - my.decode = function(a,b,c,d){ - for ( - b = c = ( - a === (/\W|_|^$/.test(a += "") || a) - ) - 1; - d = a.charCodeAt(c++); - ) - b = b * 62 + d - [, 48, 29, 87][d >> 5]; - return b - }; - - return my; -}({})); - -module.exports = Base62 -},{}],11:[function(_dereq_,module,exports){ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = _dereq_('./source-map/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = _dereq_('./source-map/source-map-consumer').SourceMapConsumer; -exports.SourceNode = _dereq_('./source-map/source-node').SourceNode; - -},{"./source-map/source-map-consumer":16,"./source-map/source-map-generator":17,"./source-map/source-node":18}],12:[function(_dereq_,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = _dereq_('amdefine')(module, _dereq_); -} -define(function (_dereq_, exports, module) { - - var util = _dereq_('./util'); - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = {}; - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var isDuplicate = this.has(aStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - this._set[util.toSetString(aStr)] = idx; - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - return Object.prototype.hasOwnProperty.call(this._set, - util.toSetString(aStr)); - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (this.has(aStr)) { - return this._set[util.toSetString(aStr)]; - } - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - -}); - -},{"./util":19,"amdefine":20}],13:[function(_dereq_,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -if (typeof define !== 'function') { - var define = _dereq_('amdefine')(module, _dereq_); -} -define(function (_dereq_, exports, module) { - - var base64 = _dereq_('./base64'); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * is placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * is placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string. - */ - exports.decode = function base64VLQ_decode(aStr) { - var i = 0; - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (i >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - digit = base64.decode(aStr.charAt(i++)); - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - return { - value: fromVLQSigned(result), - rest: aStr.slice(i) - }; - }; - -}); - -},{"./base64":14,"amdefine":20}],14:[function(_dereq_,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = _dereq_('amdefine')(module, _dereq_); -} -define(function (_dereq_, exports, module) { - - var charToIntMap = {}; - var intToCharMap = {}; - - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' - .split('') - .forEach(function (ch, index) { - charToIntMap[ch] = index; - intToCharMap[index] = ch; - }); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function base64_encode(aNumber) { - if (aNumber in intToCharMap) { - return intToCharMap[aNumber]; - } - throw new TypeError("Must be between 0 and 63: " + aNumber); - }; - - /** - * Decode a single base 64 digit to an integer. - */ - exports.decode = function base64_decode(aChar) { - if (aChar in charToIntMap) { - return charToIntMap[aChar]; - } - throw new TypeError("Not a valid base 64 digit: " + aChar); - }; - -}); - -},{"amdefine":20}],15:[function(_dereq_,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = _dereq_('amdefine')(module, _dereq_); -} -define(function (_dereq_, exports, module) { - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the next - // closest element that is less than that element. - // - // 3. We did not find the exact element, and there is no next-closest - // element which is less than the one we are searching for, so we - // return null. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return aHaystack[mid]; - } - else if (cmp > 0) { - // aHaystack[mid] is greater than our needle. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare); - } - // We did not find an exact match, return the next closest one - // (termination case 2). - return aHaystack[mid]; - } - else { - // aHaystack[mid] is less than our needle. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare); - } - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (2) or (3) and return the appropriate thing. - return aLow < 0 - ? null - : aHaystack[aLow]; - } - } - - /** - * This is an implementation of binary search which will always try and return - * the next lowest value checked if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - */ - exports.search = function search(aNeedle, aHaystack, aCompare) { - return aHaystack.length > 0 - ? recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare) - : null; - }; - -}); - -},{"amdefine":20}],16:[function(_dereq_,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = _dereq_('amdefine')(module, _dereq_); -} -define(function (_dereq_, exports, module) { - - var util = _dereq_('./util'); - var binarySearch = _dereq_('./binary-search'); - var ArraySet = _dereq_('./array-set').ArraySet; - var base64VLQ = _dereq_('./base64-vlq'); - - /** - * A SourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names, true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - /** - * Create a SourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns SourceMapConsumer - */ - SourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(SourceMapConsumer.prototype); - - smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - smc.__generatedMappings = aSourceMap._mappings.slice() - .sort(util.compareByGeneratedPositions); - smc.__originalMappings = aSourceMap._mappings.slice() - .sort(util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(SourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this.__generatedMappings = []; - this.__originalMappings = []; - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this.__generatedMappings = []; - this.__originalMappings = []; - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var mappingSeparator = /^[,;]/; - var str = aStr; - var mapping; - var temp; - - while (str.length > 0) { - if (str.charAt(0) === ';') { - generatedLine++; - str = str.slice(1); - previousGeneratedColumn = 0; - } - else if (str.charAt(0) === ',') { - str = str.slice(1); - } - else { - mapping = {}; - mapping.generatedLine = generatedLine; - - // Generated column. - temp = base64VLQ.decode(str); - mapping.generatedColumn = previousGeneratedColumn + temp.value; - previousGeneratedColumn = mapping.generatedColumn; - str = temp.rest; - - if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { - // Original source. - temp = base64VLQ.decode(str); - mapping.source = this._sources.at(previousSource + temp.value); - previousSource += temp.value; - str = temp.rest; - if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { - throw new Error('Found a source, but no line and column'); - } - - // Original line. - temp = base64VLQ.decode(str); - mapping.originalLine = previousOriginalLine + temp.value; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - str = temp.rest; - if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { - throw new Error('Found a source and line, but no column'); - } - - // Original column. - temp = base64VLQ.decode(str); - mapping.originalColumn = previousOriginalColumn + temp.value; - previousOriginalColumn = mapping.originalColumn; - str = temp.rest; - - if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { - // Original name. - temp = base64VLQ.decode(str); - mapping.name = this._names.at(previousName + temp.value); - previousName += temp.value; - str = temp.rest; - } - } - - this.__generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - this.__originalMappings.push(mapping); - } - } - } - - this.__originalMappings.sort(util.compareByOriginalPositions); - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - SourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator); - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - SourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var mapping = this._findMapping(needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositions); - - if (mapping) { - var source = util.getArg(mapping, 'source', null); - if (source && this.sourceRoot) { - source = util.join(this.sourceRoot, source); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: util.getArg(mapping, 'name', null) - }; - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * availible. - */ - SourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - throw new Error('"' + aSource + '" is not in the SourceMap.'); - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - if (this.sourceRoot) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - - var mapping = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions); - - if (mapping) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null) - }; - } - - return { - line: null, - column: null - }; - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source; - if (source && sourceRoot) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name - }; - }).forEach(aCallback, context); - }; - - exports.SourceMapConsumer = SourceMapConsumer; - -}); - -},{"./array-set":12,"./base64-vlq":13,"./binary-search":15,"./util":19,"amdefine":20}],17:[function(_dereq_,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = _dereq_('amdefine')(module, _dereq_); -} -define(function (_dereq_, exports, module) { - - var base64VLQ = _dereq_('./base64-vlq'); - var util = _dereq_('./util'); - var ArraySet = _dereq_('./array-set').ArraySet; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. To create a new one, you must pass an object - * with the following properties: - * - * - file: The filename of the generated source. - * - sourceRoot: An optional root for all URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - this._file = util.getArg(aArgs, 'file'); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = []; - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source) { - newMapping.source = mapping.source; - if (sourceRoot) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - this._validateMapping(generated, original, source, name); - - if (source && !this._sources.has(source)) { - this._sources.add(source); - } - - if (name && !this._names.has(name)) { - this._names.add(name); - } - - this._mappings.push({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent !== null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = {}; - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile) { - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (!aSourceFile) { - aSourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "aSourceFile" relative if an absolute Url is passed. - if (sourceRoot) { - aSourceFile = util.relative(sourceRoot, aSourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "aSourceFile" - this._mappings.forEach(function (mapping) { - if (mapping.source === aSourceFile && mapping.originalLine) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source !== null) { - // Copy mapping - if (sourceRoot) { - mapping.source = util.relative(sourceRoot, original.source); - } else { - mapping.source = original.source; - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name !== null && mapping.name !== null) { - // Only use the identifier name if it's an identifier - // in both SourceMaps - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - if (sourceRoot) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - orginal: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var mapping; - - // The mappings must be guaranteed to be in sorted order before we start - // serializing them or else the generated line numbers (which are defined - // via the ';' separators) will be all messed up. Note: it might be more - // performant to maintain the sorting as we insert them, rather than as we - // serialize them, but the big O is the same either way. - this._mappings.sort(util.compareByGeneratedPositions); - - for (var i = 0, len = this._mappings.length; i < len; i++) { - mapping = this._mappings[i]; - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - result += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositions(mapping, this._mappings[i - 1])) { - continue; - } - result += ','; - } - } - - result += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source) { - result += base64VLQ.encode(this._sources.indexOf(mapping.source) - - previousSource); - previousSource = this._sources.indexOf(mapping.source); - - // lines are stored 0-based in SourceMap spec version 3 - result += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - result += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name) { - result += base64VLQ.encode(this._names.indexOf(mapping.name) - - previousName); - previousName = this._names.indexOf(mapping.name); - } - } - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, - key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - file: this._file, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._sourceRoot) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - -}); - -},{"./array-set":12,"./base64-vlq":13,"./util":19,"amdefine":20}],18:[function(_dereq_,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = _dereq_('amdefine')(module, _dereq_); -} -define(function (_dereq_, exports, module) { - - var SourceMapGenerator = _dereq_('./source-map-generator').SourceMapGenerator; - var util = _dereq_('./util'); - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine === undefined ? null : aLine; - this.column = aColumn === undefined ? null : aColumn; - this.source = aSource === undefined ? null : aSource; - this.name = aName === undefined ? null : aName; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // The generated code - // Processed fragments are removed from this array. - var remainingLines = aGeneratedCode.split('\n'); - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping === null) { - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(remainingLines.shift() + "\n"); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[0]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[0] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - } else { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - var code = ""; - // Associate full lines with "lastMapping" - do { - code += remainingLines.shift() + "\n"; - lastGeneratedLine++; - lastGeneratedColumn = 0; - } while (lastGeneratedLine < mapping.generatedLine); - // When we reached the correct line, we add code until we - // reach the correct column too. - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[0]; - code += nextLine.substr(0, mapping.generatedColumn); - remainingLines[0] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - // Create the SourceNode. - addMappingWithCode(lastMapping, code); - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[0]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[0] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - } - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - // Associate the remaining code in the current line with "lastMapping" - // and add the remaining lines without any mapping - addMappingWithCode(lastMapping, remainingLines.join("\n")); - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - mapping.source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk instanceof SourceNode || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk instanceof SourceNode || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk instanceof SourceNode) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild instanceof SourceNode) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i] instanceof SourceNode) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - chunk.split('').forEach(function (ch) { - if (ch === '\n') { - generated.line++; - generated.column = 0; - } else { - generated.column++; - } - }); - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - -}); - -},{"./source-map-generator":17,"./util":19,"amdefine":20}],19:[function(_dereq_,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = _dereq_('amdefine')(module, _dereq_); -} -define(function (_dereq_, exports, module) { - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/; - var dataUrlRegexp = /^data:.+\,.+/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[3], - host: match[4], - port: match[6], - path: match[7] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = aParsedUrl.scheme + "://"; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + "@" - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - function join(aRoot, aPath) { - var url; - - if (aPath.match(urlRegexp) || aPath.match(dataUrlRegexp)) { - return aPath; - } - - if (aPath.charAt(0) === '/' && (url = urlParse(aRoot))) { - url.path = aPath; - return urlGenerate(url); - } - - return aRoot.replace(/\/$/, '') + '/' + aPath; - } - exports.join = join; - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - return '$' + aStr; - } - exports.toSetString = toSetString; - - function fromSetString(aStr) { - return aStr.substr(1); - } - exports.fromSetString = fromSetString; - - function relative(aRoot, aPath) { - aRoot = aRoot.replace(/\/$/, ''); - - var url = urlParse(aRoot); - if (aPath.charAt(0) == "/" && url && url.path == "/") { - return aPath.slice(1); - } - - return aPath.indexOf(aRoot + '/') === 0 - ? aPath.substr(aRoot.length + 1) - : aPath; - } - exports.relative = relative; - - function strcmp(aStr1, aStr2) { - var s1 = aStr1 || ""; - var s2 = aStr2 || ""; - return (s1 > s2) - (s1 < s2); - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp; - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp || onlyCompareOriginal) { - return cmp; - } - - cmp = strcmp(mappingA.name, mappingB.name); - if (cmp) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { - return cmp; - } - - return mappingA.generatedColumn - mappingB.generatedColumn; - }; - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings where the generated positions are - * compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { - var cmp; - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - }; - exports.compareByGeneratedPositions = compareByGeneratedPositions; - -}); - -},{"amdefine":20}],20:[function(_dereq_,module,exports){ -(function (process,__filename){ -/** vim: et:ts=4:sw=4:sts=4 - * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/amdefine for details - */ - -/*jslint node: true */ -/*global module, process */ -'use strict'; - -/** - * Creates a define for node. - * @param {Object} module the "module" object that is defined by Node for the - * current module. - * @param {Function} [requireFn]. Node's require function for the current module. - * It only needs to be passed in Node versions before 0.5, when module.require - * did not exist. - * @returns {Function} a define function that is usable for the current node - * module. - */ -function amdefine(module, requireFn) { - 'use strict'; - var defineCache = {}, - loaderCache = {}, - alreadyCalled = false, - path = _dereq_('path'), - makeRequire, stringRequire; - - /** - * Trims the . and .. from an array of path segments. - * It will keep a leading path segment if a .. will become - * the first path segment, to help with module name lookups, - * which act like paths, but can be remapped. But the end result, - * all paths that use this function should look normalized. - * NOTE: this method MODIFIES the input array. - * @param {Array} ary the array of path segments. - */ - function trimDots(ary) { - var i, part; - for (i = 0; ary[i]; i+= 1) { - part = ary[i]; - if (part === '.') { - ary.splice(i, 1); - i -= 1; - } else if (part === '..') { - if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { - //End of the line. Keep at least one non-dot - //path segment at the front so it can be mapped - //correctly to disk. Otherwise, there is likely - //no path mapping for a path starting with '..'. - //This can still fail, but catches the most reasonable - //uses of .. - break; - } else if (i > 0) { - ary.splice(i - 1, 2); - i -= 2; - } - } - } - } - - function normalize(name, baseName) { - var baseParts; - - //Adjust any relative paths. - if (name && name.charAt(0) === '.') { - //If have a base name, try to normalize against it, - //otherwise, assume it is a top-level require that will - //be relative to baseUrl in the end. - if (baseName) { - baseParts = baseName.split('/'); - baseParts = baseParts.slice(0, baseParts.length - 1); - baseParts = baseParts.concat(name.split('/')); - trimDots(baseParts); - name = baseParts.join('/'); - } - } - - return name; - } - - /** - * Create the normalize() function passed to a loader plugin's - * normalize method. - */ - function makeNormalize(relName) { - return function (name) { - return normalize(name, relName); - }; - } - - function makeLoad(id) { - function load(value) { - loaderCache[id] = value; - } - - load.fromText = function (id, text) { - //This one is difficult because the text can/probably uses - //define, and any relative paths and requires should be relative - //to that id was it would be found on disk. But this would require - //bootstrapping a module/require fairly deeply from node core. - //Not sure how best to go about that yet. - throw new Error('amdefine does not implement load.fromText'); - }; - - return load; - } - - makeRequire = function (systemRequire, exports, module, relId) { - function amdRequire(deps, callback) { - if (typeof deps === 'string') { - //Synchronous, single module require('') - return stringRequire(systemRequire, exports, module, deps, relId); - } else { - //Array of dependencies with a callback. - - //Convert the dependencies to modules. - deps = deps.map(function (depName) { - return stringRequire(systemRequire, exports, module, depName, relId); - }); - - //Wait for next tick to call back the require call. - process.nextTick(function () { - callback.apply(null, deps); - }); - } - } - - amdRequire.toUrl = function (filePath) { - if (filePath.indexOf('.') === 0) { - return normalize(filePath, path.dirname(module.filename)); - } else { - return filePath; - } - }; - - return amdRequire; - }; - - //Favor explicit value, passed in if the module wants to support Node 0.4. - requireFn = requireFn || function req() { - return module.require.apply(module, arguments); - }; - - function runFactory(id, deps, factory) { - var r, e, m, result; - - if (id) { - e = loaderCache[id] = {}; - m = { - id: id, - uri: __filename, - exports: e - }; - r = makeRequire(requireFn, e, m, id); - } else { - //Only support one define call per file - if (alreadyCalled) { - throw new Error('amdefine with no module ID cannot be called more than once per file.'); - } - alreadyCalled = true; - - //Use the real variables from node - //Use module.exports for exports, since - //the exports in here is amdefine exports. - e = module.exports; - m = module; - r = makeRequire(requireFn, e, m, module.id); - } - - //If there are dependencies, they are strings, so need - //to convert them to dependency values. - if (deps) { - deps = deps.map(function (depName) { - return r(depName); - }); - } - - //Call the factory with the right dependencies. - if (typeof factory === 'function') { - result = factory.apply(m.exports, deps); - } else { - result = factory; - } - - if (result !== undefined) { - m.exports = result; - if (id) { - loaderCache[id] = m.exports; - } - } - } - - stringRequire = function (systemRequire, exports, module, id, relId) { - //Split the ID by a ! so that - var index = id.indexOf('!'), - originalId = id, - prefix, plugin; - - if (index === -1) { - id = normalize(id, relId); - - //Straight module lookup. If it is one of the special dependencies, - //deal with it, otherwise, delegate to node. - if (id === 'require') { - return makeRequire(systemRequire, exports, module, relId); - } else if (id === 'exports') { - return exports; - } else if (id === 'module') { - return module; - } else if (loaderCache.hasOwnProperty(id)) { - return loaderCache[id]; - } else if (defineCache[id]) { - runFactory.apply(null, defineCache[id]); - return loaderCache[id]; - } else { - if(systemRequire) { - return systemRequire(originalId); - } else { - throw new Error('No module with ID: ' + id); - } - } - } else { - //There is a plugin in play. - prefix = id.substring(0, index); - id = id.substring(index + 1, id.length); - - plugin = stringRequire(systemRequire, exports, module, prefix, relId); - - if (plugin.normalize) { - id = plugin.normalize(id, makeNormalize(relId)); - } else { - //Normalize the ID normally. - id = normalize(id, relId); - } - - if (loaderCache[id]) { - return loaderCache[id]; - } else { - plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); - - return loaderCache[id]; - } - } - }; - - //Create a define function specific to the module asking for amdefine. - function define(id, deps, factory) { - if (Array.isArray(id)) { - factory = deps; - deps = id; - id = undefined; - } else if (typeof id !== 'string') { - factory = id; - id = deps = undefined; - } - - if (deps && !Array.isArray(deps)) { - factory = deps; - deps = undefined; - } - - if (!deps) { - deps = ['require', 'exports', 'module']; - } - - //Set up properties for this module. If an ID, then use - //internal cache. If no ID, then use the external variables - //for this node module. - if (id) { - //Put the module in deep freeze until there is a - //require call for it. - defineCache[id] = [id, deps, factory]; - } else { - runFactory(id, deps, factory); - } - } - - //define.require, which has access to all the values in the - //cache. Useful for AMD modules that all have IDs in the file, - //but need to finally export a value to node based on one of those - //IDs. - define.require = function (id) { - if (loaderCache[id]) { - return loaderCache[id]; - } - - if (defineCache[id]) { - runFactory.apply(null, defineCache[id]); - return loaderCache[id]; - } - }; - - define.amd = {}; - - return define; -} - -module.exports = amdefine; - -}).call(this,_dereq_('_process'),"/node_modules/jstransform/node_modules/source-map/node_modules/amdefine/amdefine.js") -},{"_process":8,"path":7}],21:[function(_dereq_,module,exports){ -/** - * Copyright 2013 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var docblockRe = /^\s*(\/\*\*(.|\r?\n)*?\*\/)/; -var ltrimRe = /^\s*/; -/** - * @param {String} contents - * @return {String} - */ -function extract(contents) { - var match = contents.match(docblockRe); - if (match) { - return match[0].replace(ltrimRe, '') || ''; - } - return ''; -} - - -var commentStartRe = /^\/\*\*?/; -var commentEndRe = /\*+\/$/; -var wsRe = /[\t ]+/g; -var stringStartRe = /(\r?\n|^) *\*/g; -var multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *([^@\r\n\s][^@\r\n]+?) *\r?\n/g; -var propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g; - -/** - * @param {String} contents - * @return {Array} - */ -function parse(docblock) { - docblock = docblock - .replace(commentStartRe, '') - .replace(commentEndRe, '') - .replace(wsRe, ' ') - .replace(stringStartRe, '$1'); - - // Normalize multi-line directives - var prev = ''; - while (prev != docblock) { - prev = docblock; - docblock = docblock.replace(multilineRe, "\n$1 $2\n"); - } - docblock = docblock.trim(); - - var result = []; - var match; - while (match = propertyRe.exec(docblock)) { - result.push([match[1], match[2]]); - } - - return result; -} - -/** - * Same as parse but returns an object of prop: value instead of array of paris - * If a property appers more than once the last one will be returned - * - * @param {String} contents - * @return {Object} - */ -function parseAsObject(docblock) { - var pairs = parse(docblock); - var result = {}; - for (var i = 0; i < pairs.length; i++) { - result[pairs[i][0]] = pairs[i][1]; - } - return result; -} - - -exports.extract = extract; -exports.parse = parse; -exports.parseAsObject = parseAsObject; - -},{}],22:[function(_dereq_,module,exports){ -/** - * Copyright 2013 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -/*jslint node: true*/ -"use strict"; - -var esprima = _dereq_('esprima-fb'); -var utils = _dereq_('./utils'); - -var getBoundaryNode = utils.getBoundaryNode; -var declareIdentInScope = utils.declareIdentInLocalScope; -var initScopeMetadata = utils.initScopeMetadata; -var Syntax = esprima.Syntax; - -/** - * @param {object} node - * @param {object} parentNode - * @return {boolean} - */ -function _nodeIsClosureScopeBoundary(node, parentNode) { - if (node.type === Syntax.Program) { - return true; - } - - var parentIsFunction = - parentNode.type === Syntax.FunctionDeclaration - || parentNode.type === Syntax.FunctionExpression - || parentNode.type === Syntax.ArrowFunctionExpression; - - var parentIsCurlylessArrowFunc = - parentNode.type === Syntax.ArrowFunctionExpression - && node === parentNode.body; - - return parentIsFunction - && (node.type === Syntax.BlockStatement || parentIsCurlylessArrowFunc); -} - -function _nodeIsBlockScopeBoundary(node, parentNode) { - if (node.type === Syntax.Program) { - return false; - } - - return node.type === Syntax.BlockStatement - && parentNode.type === Syntax.CatchClause; -} - -/** - * @param {object} node - * @param {array} path - * @param {object} state - */ -function traverse(node, path, state) { - /*jshint -W004*/ - // Create a scope stack entry if this is the first node we've encountered in - // its local scope - var startIndex = null; - var parentNode = path[0]; - if (!Array.isArray(node) && state.localScope.parentNode !== parentNode) { - if (_nodeIsClosureScopeBoundary(node, parentNode)) { - var scopeIsStrict = state.scopeIsStrict; - if (!scopeIsStrict - && (node.type === Syntax.BlockStatement - || node.type === Syntax.Program)) { - scopeIsStrict = - node.body.length > 0 - && node.body[0].type === Syntax.ExpressionStatement - && node.body[0].expression.type === Syntax.Literal - && node.body[0].expression.value === 'use strict'; - } - - if (node.type === Syntax.Program) { - startIndex = state.g.buffer.length; - state = utils.updateState(state, { - scopeIsStrict: scopeIsStrict - }); - } else { - startIndex = state.g.buffer.length + 1; - state = utils.updateState(state, { - localScope: { - parentNode: parentNode, - parentScope: state.localScope, - identifiers: {}, - tempVarIndex: 0, - tempVars: [] - }, - scopeIsStrict: scopeIsStrict - }); - - // All functions have an implicit 'arguments' object in scope - declareIdentInScope('arguments', initScopeMetadata(node), state); - - // Include function arg identifiers in the scope boundaries of the - // function - if (parentNode.params.length > 0) { - var param; - var metadata = initScopeMetadata(parentNode, path.slice(1), path[0]); - for (var i = 0; i < parentNode.params.length; i++) { - param = parentNode.params[i]; - if (param.type === Syntax.Identifier) { - declareIdentInScope(param.name, metadata, state); - } - } - } - - // Include rest arg identifiers in the scope boundaries of their - // functions - if (parentNode.rest) { - var metadata = initScopeMetadata( - parentNode, - path.slice(1), - path[0] - ); - declareIdentInScope(parentNode.rest.name, metadata, state); - } - - // Named FunctionExpressions scope their name within the body block of - // themselves only - if (parentNode.type === Syntax.FunctionExpression && parentNode.id) { - var metaData = - initScopeMetadata(parentNode, path.parentNodeslice, parentNode); - declareIdentInScope(parentNode.id.name, metaData, state); - } - } - - // Traverse and find all local identifiers in this closure first to - // account for function/variable declaration hoisting - collectClosureIdentsAndTraverse(node, path, state); - } - - if (_nodeIsBlockScopeBoundary(node, parentNode)) { - startIndex = state.g.buffer.length; - state = utils.updateState(state, { - localScope: { - parentNode: parentNode, - parentScope: state.localScope, - identifiers: {}, - tempVarIndex: 0, - tempVars: [] - } - }); - - if (parentNode.type === Syntax.CatchClause) { - var metadata = initScopeMetadata( - parentNode, - path.slice(1), - parentNode - ); - declareIdentInScope(parentNode.param.name, metadata, state); - } - collectBlockIdentsAndTraverse(node, path, state); - } - } - - // Only catchup() before and after traversing a child node - function traverser(node, path, state) { - node.range && utils.catchup(node.range[0], state); - traverse(node, path, state); - node.range && utils.catchup(node.range[1], state); - } - - utils.analyzeAndTraverse(walker, traverser, node, path, state); - - // Inject temp variables into the scope. - if (startIndex !== null) { - utils.injectTempVarDeclarations(state, startIndex); - } -} - -function collectClosureIdentsAndTraverse(node, path, state) { - utils.analyzeAndTraverse( - visitLocalClosureIdentifiers, - collectClosureIdentsAndTraverse, - node, - path, - state - ); -} - -function collectBlockIdentsAndTraverse(node, path, state) { - utils.analyzeAndTraverse( - visitLocalBlockIdentifiers, - collectBlockIdentsAndTraverse, - node, - path, - state - ); -} - -function visitLocalClosureIdentifiers(node, path, state) { - var metaData; - switch (node.type) { - case Syntax.ArrowFunctionExpression: - case Syntax.FunctionExpression: - // Function expressions don't get their names (if there is one) added to - // the closure scope they're defined in - return false; - case Syntax.ClassDeclaration: - case Syntax.ClassExpression: - case Syntax.FunctionDeclaration: - if (node.id) { - metaData = initScopeMetadata(getBoundaryNode(path), path.slice(), node); - declareIdentInScope(node.id.name, metaData, state); - } - return false; - case Syntax.VariableDeclarator: - // Variables have function-local scope - if (path[0].kind === 'var') { - metaData = initScopeMetadata(getBoundaryNode(path), path.slice(), node); - declareIdentInScope(node.id.name, metaData, state); - } - break; - } -} - -function visitLocalBlockIdentifiers(node, path, state) { - // TODO: Support 'let' here...maybe...one day...or something... - if (node.type === Syntax.CatchClause) { - return false; - } -} - -function walker(node, path, state) { - var visitors = state.g.visitors; - for (var i = 0; i < visitors.length; i++) { - if (visitors[i].test(node, path, state)) { - return visitors[i](traverse, node, path, state); - } - } -} - -var _astCache = {}; - -function getAstForSource(source, options) { - if (_astCache[source] && !options.disableAstCache) { - return _astCache[source]; - } - var ast = esprima.parse(source, { - comment: true, - loc: true, - range: true, - sourceType: options.sourceType - }); - if (!options.disableAstCache) { - _astCache[source] = ast; - } - return ast; -} - -/** - * Applies all available transformations to the source - * @param {array} visitors - * @param {string} source - * @param {?object} options - * @return {object} - */ -function transform(visitors, source, options) { - options = options || {}; - var ast; - try { - ast = getAstForSource(source, options); - } catch (e) { - e.message = 'Parse Error: ' + e.message; - throw e; - } - var state = utils.createState(source, ast, options); - state.g.visitors = visitors; - - if (options.sourceMap) { - var SourceMapGenerator = _dereq_('source-map').SourceMapGenerator; - state.g.sourceMap = new SourceMapGenerator({file: options.filename || 'transformed.js'}); - } - - traverse(ast, [], state); - utils.catchup(source.length, state); - - var ret = {code: state.g.buffer, extra: state.g.extra}; - if (options.sourceMap) { - ret.sourceMap = state.g.sourceMap; - ret.sourceMapFilename = options.filename || 'source.js'; - } - return ret; -} - -exports.transform = transform; -exports.Syntax = Syntax; - -},{"./utils":23,"esprima-fb":9,"source-map":11}],23:[function(_dereq_,module,exports){ -/** - * Copyright 2013 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -/*jslint node: true*/ -var Syntax = _dereq_('esprima-fb').Syntax; -var leadingIndentRegexp = /(^|\n)( {2}|\t)/g; -var nonWhiteRegexp = /(\S)/g; - -/** - * A `state` object represents the state of the parser. It has "local" and - * "global" parts. Global contains parser position, source, etc. Local contains - * scope based properties like current class name. State should contain all the - * info required for transformation. It's the only mandatory object that is - * being passed to every function in transform chain. - * - * @param {string} source - * @param {object} transformOptions - * @return {object} - */ -function createState(source, rootNode, transformOptions) { - return { - /** - * A tree representing the current local scope (and its lexical scope chain) - * Useful for tracking identifiers from parent scopes, etc. - * @type {Object} - */ - localScope: { - parentNode: rootNode, - parentScope: null, - identifiers: {}, - tempVarIndex: 0, - tempVars: [] - }, - /** - * The name (and, if applicable, expression) of the super class - * @type {Object} - */ - superClass: null, - /** - * The namespace to use when munging identifiers - * @type {String} - */ - mungeNamespace: '', - /** - * Ref to the node for the current MethodDefinition - * @type {Object} - */ - methodNode: null, - /** - * Ref to the node for the FunctionExpression of the enclosing - * MethodDefinition - * @type {Object} - */ - methodFuncNode: null, - /** - * Name of the enclosing class - * @type {String} - */ - className: null, - /** - * Whether we're currently within a `strict` scope - * @type {Bool} - */ - scopeIsStrict: null, - /** - * Indentation offset - * @type {Number} - */ - indentBy: 0, - /** - * Global state (not affected by updateState) - * @type {Object} - */ - g: { - /** - * A set of general options that transformations can consider while doing - * a transformation: - * - * - minify - * Specifies that transformation steps should do their best to minify - * the output source when possible. This is useful for places where - * minification optimizations are possible with higher-level context - * info than what jsxmin can provide. - * - * For example, the ES6 class transform will minify munged private - * variables if this flag is set. - */ - opts: transformOptions, - /** - * Current position in the source code - * @type {Number} - */ - position: 0, - /** - * Auxiliary data to be returned by transforms - * @type {Object} - */ - extra: {}, - /** - * Buffer containing the result - * @type {String} - */ - buffer: '', - /** - * Source that is being transformed - * @type {String} - */ - source: source, - - /** - * Cached parsed docblock (see getDocblock) - * @type {object} - */ - docblock: null, - - /** - * Whether the thing was used - * @type {Boolean} - */ - tagNamespaceUsed: false, - - /** - * If using bolt xjs transformation - * @type {Boolean} - */ - isBolt: undefined, - - /** - * Whether to record source map (expensive) or not - * @type {SourceMapGenerator|null} - */ - sourceMap: null, - - /** - * Filename of the file being processed. Will be returned as a source - * attribute in the source map - */ - sourceMapFilename: 'source.js', - - /** - * Only when source map is used: last line in the source for which - * source map was generated - * @type {Number} - */ - sourceLine: 1, - - /** - * Only when source map is used: last line in the buffer for which - * source map was generated - * @type {Number} - */ - bufferLine: 1, - - /** - * The top-level Program AST for the original file. - */ - originalProgramAST: null, - - sourceColumn: 0, - bufferColumn: 0 - } - }; -} - -/** - * Updates a copy of a given state with "update" and returns an updated state. - * - * @param {object} state - * @param {object} update - * @return {object} - */ -function updateState(state, update) { - var ret = Object.create(state); - Object.keys(update).forEach(function(updatedKey) { - ret[updatedKey] = update[updatedKey]; - }); - return ret; -} - -/** - * Given a state fill the resulting buffer from the original source up to - * the end - * - * @param {number} end - * @param {object} state - * @param {?function} contentTransformer Optional callback to transform newly - * added content. - */ -function catchup(end, state, contentTransformer) { - if (end < state.g.position) { - // cannot move backwards - return; - } - var source = state.g.source.substring(state.g.position, end); - var transformed = updateIndent(source, state); - if (state.g.sourceMap && transformed) { - // record where we are - state.g.sourceMap.addMapping({ - generated: { line: state.g.bufferLine, column: state.g.bufferColumn }, - original: { line: state.g.sourceLine, column: state.g.sourceColumn }, - source: state.g.sourceMapFilename - }); - - // record line breaks in transformed source - var sourceLines = source.split('\n'); - var transformedLines = transformed.split('\n'); - // Add line break mappings between last known mapping and the end of the - // added piece. So for the code piece - // (foo, bar); - // > var x = 2; - // > var b = 3; - // var c = - // only add lines marked with ">": 2, 3. - for (var i = 1; i < sourceLines.length - 1; i++) { - state.g.sourceMap.addMapping({ - generated: { line: state.g.bufferLine, column: 0 }, - original: { line: state.g.sourceLine, column: 0 }, - source: state.g.sourceMapFilename - }); - state.g.sourceLine++; - state.g.bufferLine++; - } - // offset for the last piece - if (sourceLines.length > 1) { - state.g.sourceLine++; - state.g.bufferLine++; - state.g.sourceColumn = 0; - state.g.bufferColumn = 0; - } - state.g.sourceColumn += sourceLines[sourceLines.length - 1].length; - state.g.bufferColumn += - transformedLines[transformedLines.length - 1].length; - } - state.g.buffer += - contentTransformer ? contentTransformer(transformed) : transformed; - state.g.position = end; -} - -/** - * Returns original source for an AST node. - * @param {object} node - * @param {object} state - * @return {string} - */ -function getNodeSourceText(node, state) { - return state.g.source.substring(node.range[0], node.range[1]); -} - -function _replaceNonWhite(value) { - return value.replace(nonWhiteRegexp, ' '); -} - -/** - * Removes all non-whitespace characters - */ -function _stripNonWhite(value) { - return value.replace(nonWhiteRegexp, ''); -} - -/** - * Finds the position of the next instance of the specified syntactic char in - * the pending source. - * - * NOTE: This will skip instances of the specified char if they sit inside a - * comment body. - * - * NOTE: This function also assumes that the buffer's current position is not - * already within a comment or a string. This is rarely the case since all - * of the buffer-advancement utility methods tend to be used on syntactic - * nodes' range values -- but it's a small gotcha that's worth mentioning. - */ -function getNextSyntacticCharOffset(char, state) { - var pendingSource = state.g.source.substring(state.g.position); - var pendingSourceLines = pendingSource.split('\n'); - - var charOffset = 0; - var line; - var withinBlockComment = false; - var withinString = false; - lineLoop: while ((line = pendingSourceLines.shift()) !== undefined) { - var lineEndPos = charOffset + line.length; - charLoop: for (; charOffset < lineEndPos; charOffset++) { - var currChar = pendingSource[charOffset]; - if (currChar === '"' || currChar === '\'') { - withinString = !withinString; - continue charLoop; - } else if (withinString) { - continue charLoop; - } else if (charOffset + 1 < lineEndPos) { - var nextTwoChars = currChar + line[charOffset + 1]; - if (nextTwoChars === '//') { - charOffset = lineEndPos + 1; - continue lineLoop; - } else if (nextTwoChars === '/*') { - withinBlockComment = true; - charOffset += 1; - continue charLoop; - } else if (nextTwoChars === '*/') { - withinBlockComment = false; - charOffset += 1; - continue charLoop; - } - } - - if (!withinBlockComment && currChar === char) { - return charOffset + state.g.position; - } - } - - // Account for '\n' - charOffset++; - withinString = false; - } - - throw new Error('`' + char + '` not found!'); -} - -/** - * Catches up as `catchup` but replaces non-whitespace chars with spaces. - */ -function catchupWhiteOut(end, state) { - catchup(end, state, _replaceNonWhite); -} - -/** - * Catches up as `catchup` but removes all non-whitespace characters. - */ -function catchupWhiteSpace(end, state) { - catchup(end, state, _stripNonWhite); -} - -/** - * Removes all non-newline characters - */ -var reNonNewline = /[^\n]/g; -function stripNonNewline(value) { - return value.replace(reNonNewline, function() { - return ''; - }); -} - -/** - * Catches up as `catchup` but removes all non-newline characters. - * - * Equivalent to appending as many newlines as there are in the original source - * between the current position and `end`. - */ -function catchupNewlines(end, state) { - catchup(end, state, stripNonNewline); -} - - -/** - * Same as catchup but does not touch the buffer - * - * @param {number} end - * @param {object} state - */ -function move(end, state) { - // move the internal cursors - if (state.g.sourceMap) { - if (end < state.g.position) { - state.g.position = 0; - state.g.sourceLine = 1; - state.g.sourceColumn = 0; - } - - var source = state.g.source.substring(state.g.position, end); - var sourceLines = source.split('\n'); - if (sourceLines.length > 1) { - state.g.sourceLine += sourceLines.length - 1; - state.g.sourceColumn = 0; - } - state.g.sourceColumn += sourceLines[sourceLines.length - 1].length; - } - state.g.position = end; -} - -/** - * Appends a string of text to the buffer - * - * @param {string} str - * @param {object} state - */ -function append(str, state) { - if (state.g.sourceMap && str) { - state.g.sourceMap.addMapping({ - generated: { line: state.g.bufferLine, column: state.g.bufferColumn }, - original: { line: state.g.sourceLine, column: state.g.sourceColumn }, - source: state.g.sourceMapFilename - }); - var transformedLines = str.split('\n'); - if (transformedLines.length > 1) { - state.g.bufferLine += transformedLines.length - 1; - state.g.bufferColumn = 0; - } - state.g.bufferColumn += - transformedLines[transformedLines.length - 1].length; - } - state.g.buffer += str; -} - -/** - * Update indent using state.indentBy property. Indent is measured in - * double spaces. Updates a single line only. - * - * @param {string} str - * @param {object} state - * @return {string} - */ -function updateIndent(str, state) { - /*jshint -W004*/ - var indentBy = state.indentBy; - if (indentBy < 0) { - for (var i = 0; i < -indentBy; i++) { - str = str.replace(leadingIndentRegexp, '$1'); - } - } else { - for (var i = 0; i < indentBy; i++) { - str = str.replace(leadingIndentRegexp, '$1$2$2'); - } - } - return str; -} - -/** - * Calculates indent from the beginning of the line until "start" or the first - * character before start. - * @example - * " foo.bar()" - * ^ - * start - * indent will be " " - * - * @param {number} start - * @param {object} state - * @return {string} - */ -function indentBefore(start, state) { - var end = start; - start = start - 1; - - while (start > 0 && state.g.source[start] != '\n') { - if (!state.g.source[start].match(/[ \t]/)) { - end = start; - } - start--; - } - return state.g.source.substring(start + 1, end); -} - -function getDocblock(state) { - if (!state.g.docblock) { - var docblock = _dereq_('./docblock'); - state.g.docblock = - docblock.parseAsObject(docblock.extract(state.g.source)); - } - return state.g.docblock; -} - -function identWithinLexicalScope(identName, state, stopBeforeNode) { - var currScope = state.localScope; - while (currScope) { - if (currScope.identifiers[identName] !== undefined) { - return true; - } - - if (stopBeforeNode && currScope.parentNode === stopBeforeNode) { - break; - } - - currScope = currScope.parentScope; - } - return false; -} - -function identInLocalScope(identName, state) { - return state.localScope.identifiers[identName] !== undefined; -} - -/** - * @param {object} boundaryNode - * @param {?array} path - * @return {?object} node - */ -function initScopeMetadata(boundaryNode, path, node) { - return { - boundaryNode: boundaryNode, - bindingPath: path, - bindingNode: node - }; -} - -function declareIdentInLocalScope(identName, metaData, state) { - state.localScope.identifiers[identName] = { - boundaryNode: metaData.boundaryNode, - path: metaData.bindingPath, - node: metaData.bindingNode, - state: Object.create(state) - }; -} - -function getLexicalBindingMetadata(identName, state) { - var currScope = state.localScope; - while (currScope) { - if (currScope.identifiers[identName] !== undefined) { - return currScope.identifiers[identName]; - } - - currScope = currScope.parentScope; - } -} - -function getLocalBindingMetadata(identName, state) { - return state.localScope.identifiers[identName]; -} - -/** - * Apply the given analyzer function to the current node. If the analyzer - * doesn't return false, traverse each child of the current node using the given - * traverser function. - * - * @param {function} analyzer - * @param {function} traverser - * @param {object} node - * @param {array} path - * @param {object} state - */ -function analyzeAndTraverse(analyzer, traverser, node, path, state) { - if (node.type) { - if (analyzer(node, path, state) === false) { - return; - } - path.unshift(node); - } - - getOrderedChildren(node).forEach(function(child) { - traverser(child, path, state); - }); - - node.type && path.shift(); -} - -/** - * It is crucial that we traverse in order, or else catchup() on a later - * node that is processed out of order can move the buffer past a node - * that we haven't handled yet, preventing us from modifying that node. - * - * This can happen when a node has multiple properties containing children. - * For example, XJSElement nodes have `openingElement`, `closingElement` and - * `children`. If we traverse `openingElement`, then `closingElement`, then - * when we get to `children`, the buffer has already caught up to the end of - * the closing element, after the children. - * - * This is basically a Schwartzian transform. Collects an array of children, - * each one represented as [child, startIndex]; sorts the array by start - * index; then traverses the children in that order. - */ -function getOrderedChildren(node) { - var queue = []; - for (var key in node) { - if (node.hasOwnProperty(key)) { - enqueueNodeWithStartIndex(queue, node[key]); - } - } - queue.sort(function(a, b) { return a[1] - b[1]; }); - return queue.map(function(pair) { return pair[0]; }); -} - -/** - * Helper function for analyzeAndTraverse which queues up all of the children - * of the given node. - * - * Children can also be found in arrays, so we basically want to merge all of - * those arrays together so we can sort them and then traverse the children - * in order. - * - * One example is the Program node. It contains `body` and `comments`, both - * arrays. Lexographically, comments are interspersed throughout the body - * nodes, but esprima's AST groups them together. - */ -function enqueueNodeWithStartIndex(queue, node) { - if (typeof node !== 'object' || node === null) { - return; - } - if (node.range) { - queue.push([node, node.range[0]]); - } else if (Array.isArray(node)) { - for (var ii = 0; ii < node.length; ii++) { - enqueueNodeWithStartIndex(queue, node[ii]); - } - } -} - -/** - * Checks whether a node or any of its sub-nodes contains - * a syntactic construct of the passed type. - * @param {object} node - AST node to test. - * @param {string} type - node type to lookup. - */ -function containsChildOfType(node, type) { - return containsChildMatching(node, function(node) { - return node.type === type; - }); -} - -function containsChildMatching(node, matcher) { - var foundMatchingChild = false; - function nodeTypeAnalyzer(node) { - if (matcher(node) === true) { - foundMatchingChild = true; - return false; - } - } - function nodeTypeTraverser(child, path, state) { - if (!foundMatchingChild) { - foundMatchingChild = containsChildMatching(child, matcher); - } - } - analyzeAndTraverse( - nodeTypeAnalyzer, - nodeTypeTraverser, - node, - [] - ); - return foundMatchingChild; -} - -var scopeTypes = {}; -scopeTypes[Syntax.ArrowFunctionExpression] = true; -scopeTypes[Syntax.FunctionExpression] = true; -scopeTypes[Syntax.FunctionDeclaration] = true; -scopeTypes[Syntax.Program] = true; - -function getBoundaryNode(path) { - for (var ii = 0; ii < path.length; ++ii) { - if (scopeTypes[path[ii].type]) { - return path[ii]; - } - } - throw new Error( - 'Expected to find a node with one of the following types in path:\n' + - JSON.stringify(Object.keys(scopeTypes)) - ); -} - -function getTempVar(tempVarIndex) { - return '$__' + tempVarIndex; -} - -function injectTempVar(state) { - var tempVar = '$__' + (state.localScope.tempVarIndex++); - state.localScope.tempVars.push(tempVar); - return tempVar; -} - -function injectTempVarDeclarations(state, index) { - if (state.localScope.tempVars.length) { - state.g.buffer = - state.g.buffer.slice(0, index) + - 'var ' + state.localScope.tempVars.join(', ') + ';' + - state.g.buffer.slice(index); - state.localScope.tempVars = []; - } -} - -exports.analyzeAndTraverse = analyzeAndTraverse; -exports.append = append; -exports.catchup = catchup; -exports.catchupNewlines = catchupNewlines; -exports.catchupWhiteOut = catchupWhiteOut; -exports.catchupWhiteSpace = catchupWhiteSpace; -exports.containsChildMatching = containsChildMatching; -exports.containsChildOfType = containsChildOfType; -exports.createState = createState; -exports.declareIdentInLocalScope = declareIdentInLocalScope; -exports.getBoundaryNode = getBoundaryNode; -exports.getDocblock = getDocblock; -exports.getLexicalBindingMetadata = getLexicalBindingMetadata; -exports.getLocalBindingMetadata = getLocalBindingMetadata; -exports.getNextSyntacticCharOffset = getNextSyntacticCharOffset; -exports.getNodeSourceText = getNodeSourceText; -exports.getOrderedChildren = getOrderedChildren; -exports.getTempVar = getTempVar; -exports.identInLocalScope = identInLocalScope; -exports.identWithinLexicalScope = identWithinLexicalScope; -exports.indentBefore = indentBefore; -exports.initScopeMetadata = initScopeMetadata; -exports.injectTempVar = injectTempVar; -exports.injectTempVarDeclarations = injectTempVarDeclarations; -exports.move = move; -exports.scopeTypes = scopeTypes; -exports.updateIndent = updateIndent; -exports.updateState = updateState; - -},{"./docblock":21,"esprima-fb":9}],24:[function(_dereq_,module,exports){ -/** - * Copyright 2013 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/*global exports:true*/ - -/** - * Desugars ES6 Arrow functions to ES3 function expressions. - * If the function contains `this` expression -- automatically - * binds the function to current value of `this`. - * - * Single parameter, simple expression: - * - * [1, 2, 3].map(x => x * x); - * - * [1, 2, 3].map(function(x) { return x * x; }); - * - * Several parameters, complex block: - * - * this.users.forEach((user, idx) => { - * return this.isActive(idx) && this.send(user); - * }); - * - * this.users.forEach(function(user, idx) { - * return this.isActive(idx) && this.send(user); - * }.bind(this)); - * - */ -var restParamVisitors = _dereq_('./es6-rest-param-visitors'); -var destructuringVisitors = _dereq_('./es6-destructuring-visitors'); - -var Syntax = _dereq_('esprima-fb').Syntax; -var utils = _dereq_('../src/utils'); - -/** - * @public - */ -function visitArrowFunction(traverse, node, path, state) { - var notInExpression = (path[0].type === Syntax.ExpressionStatement); - - // Wrap a function into a grouping operator, if it's not - // in the expression position. - if (notInExpression) { - utils.append('(', state); - } - - utils.append('function', state); - renderParams(traverse, node, path, state); - - // Skip arrow. - utils.catchupWhiteSpace(node.body.range[0], state); - - var renderBody = node.body.type == Syntax.BlockStatement - ? renderStatementBody - : renderExpressionBody; - - path.unshift(node); - renderBody(traverse, node, path, state); - path.shift(); - - // Bind the function only if `this` value is used - // inside it or inside any sub-expression. - var containsBindingSyntax = - utils.containsChildMatching(node.body, function(node) { - return node.type === Syntax.ThisExpression - || (node.type === Syntax.Identifier - && node.name === "super"); - }); - - if (containsBindingSyntax) { - utils.append('.bind(this)', state); - } - - utils.catchupWhiteSpace(node.range[1], state); - - // Close wrapper if not in the expression. - if (notInExpression) { - utils.append(')', state); - } - - return false; -} - -function renderParams(traverse, node, path, state) { - // To preserve inline typechecking directives, we - // distinguish between parens-free and paranthesized single param. - if (isParensFreeSingleParam(node, state) || !node.params.length) { - utils.append('(', state); - } - if (node.params.length !== 0) { - path.unshift(node); - traverse(node.params, path, state); - path.unshift(); - } - utils.append(')', state); -} - -function isParensFreeSingleParam(node, state) { - return node.params.length === 1 && - state.g.source[state.g.position] !== '('; -} - -function renderExpressionBody(traverse, node, path, state) { - // Wrap simple expression bodies into a block - // with explicit return statement. - utils.append('{', state); - - // Special handling of rest param. - if (node.rest) { - utils.append( - restParamVisitors.renderRestParamSetup(node, state), - state - ); - } - - // Special handling of destructured params. - destructuringVisitors.renderDestructuredComponents( - node, - utils.updateState(state, { - localScope: { - parentNode: state.parentNode, - parentScope: state.parentScope, - identifiers: state.identifiers, - tempVarIndex: 0 - } - }) - ); - - utils.append('return ', state); - renderStatementBody(traverse, node, path, state); - utils.append(';}', state); -} - -function renderStatementBody(traverse, node, path, state) { - traverse(node.body, path, state); - utils.catchup(node.body.range[1], state); -} - -visitArrowFunction.test = function(node, path, state) { - return node.type === Syntax.ArrowFunctionExpression; -}; - -exports.visitorList = [ - visitArrowFunction -]; - - -},{"../src/utils":23,"./es6-destructuring-visitors":27,"./es6-rest-param-visitors":30,"esprima-fb":9}],25:[function(_dereq_,module,exports){ -/** - * Copyright 2004-present Facebook. All Rights Reserved. - */ -/*global exports:true*/ - -/** - * Implements ES6 call spread. - * - * instance.method(a, b, c, ...d) - * - * instance.method.apply(instance, [a, b, c].concat(d)) - * - */ - -var Syntax = _dereq_('esprima-fb').Syntax; -var utils = _dereq_('../src/utils'); - -function process(traverse, node, path, state) { - utils.move(node.range[0], state); - traverse(node, path, state); - utils.catchup(node.range[1], state); -} - -function visitCallSpread(traverse, node, path, state) { - utils.catchup(node.range[0], state); - - if (node.type === Syntax.NewExpression) { - // Input = new Set(1, 2, ...list) - // Output = new (Function.prototype.bind.apply(Set, [null, 1, 2].concat(list))) - utils.append('new (Function.prototype.bind.apply(', state); - process(traverse, node.callee, path, state); - } else if (node.callee.type === Syntax.MemberExpression) { - // Input = get().fn(1, 2, ...more) - // Output = (_ = get()).fn.apply(_, [1, 2].apply(more)) - var tempVar = utils.injectTempVar(state); - utils.append('(' + tempVar + ' = ', state); - process(traverse, node.callee.object, path, state); - utils.append(')', state); - if (node.callee.property.type === Syntax.Identifier) { - utils.append('.', state); - process(traverse, node.callee.property, path, state); - } else { - utils.append('[', state); - process(traverse, node.callee.property, path, state); - utils.append(']', state); - } - utils.append('.apply(' + tempVar, state); - } else { - // Input = max(1, 2, ...list) - // Output = max.apply(null, [1, 2].concat(list)) - var needsToBeWrappedInParenthesis = - node.callee.type === Syntax.FunctionDeclaration || - node.callee.type === Syntax.FunctionExpression; - if (needsToBeWrappedInParenthesis) { - utils.append('(', state); - } - process(traverse, node.callee, path, state); - if (needsToBeWrappedInParenthesis) { - utils.append(')', state); - } - utils.append('.apply(null', state); - } - utils.append(', ', state); - - var args = node.arguments.slice(); - var spread = args.pop(); - if (args.length || node.type === Syntax.NewExpression) { - utils.append('[', state); - if (node.type === Syntax.NewExpression) { - utils.append('null' + (args.length ? ', ' : ''), state); - } - while (args.length) { - var arg = args.shift(); - utils.move(arg.range[0], state); - traverse(arg, path, state); - if (args.length) { - utils.catchup(args[0].range[0], state); - } else { - utils.catchup(arg.range[1], state); - } - } - utils.append('].concat(', state); - process(traverse, spread.argument, path, state); - utils.append(')', state); - } else { - process(traverse, spread.argument, path, state); - } - utils.append(node.type === Syntax.NewExpression ? '))' : ')', state); - - utils.move(node.range[1], state); - return false; -} - -visitCallSpread.test = function(node, path, state) { - return ( - ( - node.type === Syntax.CallExpression || - node.type === Syntax.NewExpression - ) && - node.arguments.length > 0 && - node.arguments[node.arguments.length - 1].type === Syntax.SpreadElement - ); -}; - -exports.visitorList = [ - visitCallSpread -]; - -},{"../src/utils":23,"esprima-fb":9}],26:[function(_dereq_,module,exports){ -/** - * Copyright 2013 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/*jslint node:true*/ - -/** - * @typechecks - */ -'use strict'; - -var base62 = _dereq_('base62'); -var Syntax = _dereq_('esprima-fb').Syntax; -var utils = _dereq_('../src/utils'); -var reservedWordsHelper = _dereq_('./reserved-words-helper'); - -var declareIdentInLocalScope = utils.declareIdentInLocalScope; -var initScopeMetadata = utils.initScopeMetadata; - -var SUPER_PROTO_IDENT_PREFIX = '____SuperProtoOf'; - -var _anonClassUUIDCounter = 0; -var _mungedSymbolMaps = {}; - -function resetSymbols() { - _anonClassUUIDCounter = 0; - _mungedSymbolMaps = {}; -} - -/** - * Used to generate a unique class for use with code-gens for anonymous class - * expressions. - * - * @param {object} state - * @return {string} - */ -function _generateAnonymousClassName(state) { - var mungeNamespace = state.mungeNamespace || ''; - return '____Class' + mungeNamespace + base62.encode(_anonClassUUIDCounter++); -} - -/** - * Given an identifier name, munge it using the current state's mungeNamespace. - * - * @param {string} identName - * @param {object} state - * @return {string} - */ -function _getMungedName(identName, state) { - var mungeNamespace = state.mungeNamespace; - var shouldMinify = state.g.opts.minify; - - if (shouldMinify) { - if (!_mungedSymbolMaps[mungeNamespace]) { - _mungedSymbolMaps[mungeNamespace] = { - symbolMap: {}, - identUUIDCounter: 0 - }; - } - - var symbolMap = _mungedSymbolMaps[mungeNamespace].symbolMap; - if (!symbolMap[identName]) { - symbolMap[identName] = - base62.encode(_mungedSymbolMaps[mungeNamespace].identUUIDCounter++); - } - identName = symbolMap[identName]; - } - return '$' + mungeNamespace + identName; -} - -/** - * Extracts super class information from a class node. - * - * Information includes name of the super class and/or the expression string - * (if extending from an expression) - * - * @param {object} node - * @param {object} state - * @return {object} - */ -function _getSuperClassInfo(node, state) { - var ret = { - name: null, - expression: null - }; - if (node.superClass) { - if (node.superClass.type === Syntax.Identifier) { - ret.name = node.superClass.name; - } else { - // Extension from an expression - ret.name = _generateAnonymousClassName(state); - ret.expression = state.g.source.substring( - node.superClass.range[0], - node.superClass.range[1] - ); - } - } - return ret; -} - -/** - * Used with .filter() to find the constructor method in a list of - * MethodDefinition nodes. - * - * @param {object} classElement - * @return {boolean} - */ -function _isConstructorMethod(classElement) { - return classElement.type === Syntax.MethodDefinition && - classElement.key.type === Syntax.Identifier && - classElement.key.name === 'constructor'; -} - -/** - * @param {object} node - * @param {object} state - * @return {boolean} - */ -function _shouldMungeIdentifier(node, state) { - return ( - !!state.methodFuncNode && - !utils.getDocblock(state).hasOwnProperty('preventMunge') && - /^_(?!_)/.test(node.name) - ); -} - -/** - * @param {function} traverse - * @param {object} node - * @param {array} path - * @param {object} state - */ -function visitClassMethod(traverse, node, path, state) { - if (!state.g.opts.es5 && (node.kind === 'get' || node.kind === 'set')) { - throw new Error( - 'This transform does not support ' + node.kind + 'ter methods for ES6 ' + - 'classes. (line: ' + node.loc.start.line + ', col: ' + - node.loc.start.column + ')' - ); - } - state = utils.updateState(state, { - methodNode: node - }); - utils.catchup(node.range[0], state); - path.unshift(node); - traverse(node.value, path, state); - path.shift(); - return false; -} -visitClassMethod.test = function(node, path, state) { - return node.type === Syntax.MethodDefinition; -}; - -/** - * @param {function} traverse - * @param {object} node - * @param {array} path - * @param {object} state - */ -function visitClassFunctionExpression(traverse, node, path, state) { - var methodNode = path[0]; - var isGetter = methodNode.kind === 'get'; - var isSetter = methodNode.kind === 'set'; - - state = utils.updateState(state, { - methodFuncNode: node - }); - - if (methodNode.key.name === 'constructor') { - utils.append('function ' + state.className, state); - } else { - var methodAccessorComputed = false; - var methodAccessor; - var prototypeOrStatic = methodNode["static"] ? '' : '.prototype'; - var objectAccessor = state.className + prototypeOrStatic; - - if (methodNode.key.type === Syntax.Identifier) { - // foo() {} - methodAccessor = methodNode.key.name; - if (_shouldMungeIdentifier(methodNode.key, state)) { - methodAccessor = _getMungedName(methodAccessor, state); - } - if (isGetter || isSetter) { - methodAccessor = JSON.stringify(methodAccessor); - } else if (reservedWordsHelper.isReservedWord(methodAccessor)) { - methodAccessorComputed = true; - methodAccessor = JSON.stringify(methodAccessor); - } - } else if (methodNode.key.type === Syntax.Literal) { - // 'foo bar'() {} | get 'foo bar'() {} | set 'foo bar'() {} - methodAccessor = JSON.stringify(methodNode.key.value); - methodAccessorComputed = true; - } - - if (isSetter || isGetter) { - utils.append( - 'Object.defineProperty(' + - objectAccessor + ',' + - methodAccessor + ',' + - '{configurable:true,' + - methodNode.kind + ':function', - state - ); - } else { - if (state.g.opts.es3) { - if (methodAccessorComputed) { - methodAccessor = '[' + methodAccessor + ']'; - } else { - methodAccessor = '.' + methodAccessor; - } - utils.append( - objectAccessor + - methodAccessor + '=function' + (node.generator ? '*' : ''), - state - ); - } else { - if (!methodAccessorComputed) { - methodAccessor = JSON.stringify(methodAccessor); - } - utils.append( - 'Object.defineProperty(' + - objectAccessor + ',' + - methodAccessor + ',' + - '{writable:true,configurable:true,' + - 'value:function' + (node.generator ? '*' : ''), - state - ); - } - } - } - utils.move(methodNode.key.range[1], state); - utils.append('(', state); - - var params = node.params; - if (params.length > 0) { - utils.catchupNewlines(params[0].range[0], state); - for (var i = 0; i < params.length; i++) { - utils.catchup(node.params[i].range[0], state); - path.unshift(node); - traverse(params[i], path, state); - path.shift(); - } - } - - var closingParenPosition = utils.getNextSyntacticCharOffset(')', state); - utils.catchupWhiteSpace(closingParenPosition, state); - - var openingBracketPosition = utils.getNextSyntacticCharOffset('{', state); - utils.catchup(openingBracketPosition + 1, state); - - if (!state.scopeIsStrict) { - utils.append('"use strict";', state); - state = utils.updateState(state, { - scopeIsStrict: true - }); - } - utils.move(node.body.range[0] + '{'.length, state); - - path.unshift(node); - traverse(node.body, path, state); - path.shift(); - utils.catchup(node.body.range[1], state); - - if (methodNode.key.name !== 'constructor') { - if (isGetter || isSetter || !state.g.opts.es3) { - utils.append('})', state); - } - utils.append(';', state); - } - return false; -} -visitClassFunctionExpression.test = function(node, path, state) { - return node.type === Syntax.FunctionExpression - && path[0].type === Syntax.MethodDefinition; -}; - -function visitClassMethodParam(traverse, node, path, state) { - var paramName = node.name; - if (_shouldMungeIdentifier(node, state)) { - paramName = _getMungedName(node.name, state); - } - utils.append(paramName, state); - utils.move(node.range[1], state); -} -visitClassMethodParam.test = function(node, path, state) { - if (!path[0] || !path[1]) { - return; - } - - var parentFuncExpr = path[0]; - var parentClassMethod = path[1]; - - return parentFuncExpr.type === Syntax.FunctionExpression - && parentClassMethod.type === Syntax.MethodDefinition - && node.type === Syntax.Identifier; -}; - -/** - * @param {function} traverse - * @param {object} node - * @param {array} path - * @param {object} state - */ -function _renderClassBody(traverse, node, path, state) { - var className = state.className; - var superClass = state.superClass; - - // Set up prototype of constructor on same line as `extends` for line-number - // preservation. This relies on function-hoisting if a constructor function is - // defined in the class body. - if (superClass.name) { - // If the super class is an expression, we need to memoize the output of the - // expression into the generated class name variable and use that to refer - // to the super class going forward. Example: - // - // class Foo extends mixin(Bar, Baz) {} - // --transforms to-- - // function Foo() {} var ____Class0Blah = mixin(Bar, Baz); - if (superClass.expression !== null) { - utils.append( - 'var ' + superClass.name + '=' + superClass.expression + ';', - state - ); - } - - var keyName = superClass.name + '____Key'; - var keyNameDeclarator = ''; - if (!utils.identWithinLexicalScope(keyName, state)) { - keyNameDeclarator = 'var '; - declareIdentInLocalScope(keyName, initScopeMetadata(node), state); - } - utils.append( - 'for(' + keyNameDeclarator + keyName + ' in ' + superClass.name + '){' + - 'if(' + superClass.name + '.hasOwnProperty(' + keyName + ')){' + - className + '[' + keyName + ']=' + - superClass.name + '[' + keyName + '];' + - '}' + - '}', - state - ); - - var superProtoIdentStr = SUPER_PROTO_IDENT_PREFIX + superClass.name; - if (!utils.identWithinLexicalScope(superProtoIdentStr, state)) { - utils.append( - 'var ' + superProtoIdentStr + '=' + superClass.name + '===null?' + - 'null:' + superClass.name + '.prototype;', - state - ); - declareIdentInLocalScope(superProtoIdentStr, initScopeMetadata(node), state); - } - - utils.append( - className + '.prototype=Object.create(' + superProtoIdentStr + ');', - state - ); - utils.append( - className + '.prototype.constructor=' + className + ';', - state - ); - utils.append( - className + '.__superConstructor__=' + superClass.name + ';', - state - ); - } - - // If there's no constructor method specified in the class body, create an - // empty constructor function at the top (same line as the class keyword) - if (!node.body.body.filter(_isConstructorMethod).pop()) { - utils.append('function ' + className + '(){', state); - if (!state.scopeIsStrict) { - utils.append('"use strict";', state); - } - if (superClass.name) { - utils.append( - 'if(' + superClass.name + '!==null){' + - superClass.name + '.apply(this,arguments);}', - state - ); - } - utils.append('}', state); - } - - utils.move(node.body.range[0] + '{'.length, state); - traverse(node.body, path, state); - utils.catchupWhiteSpace(node.range[1], state); -} - -/** - * @param {function} traverse - * @param {object} node - * @param {array} path - * @param {object} state - */ -function visitClassDeclaration(traverse, node, path, state) { - var className = node.id.name; - var superClass = _getSuperClassInfo(node, state); - - state = utils.updateState(state, { - mungeNamespace: className, - className: className, - superClass: superClass - }); - - _renderClassBody(traverse, node, path, state); - - return false; -} -visitClassDeclaration.test = function(node, path, state) { - return node.type === Syntax.ClassDeclaration; -}; - -/** - * @param {function} traverse - * @param {object} node - * @param {array} path - * @param {object} state - */ -function visitClassExpression(traverse, node, path, state) { - var className = node.id && node.id.name || _generateAnonymousClassName(state); - var superClass = _getSuperClassInfo(node, state); - - utils.append('(function(){', state); - - state = utils.updateState(state, { - mungeNamespace: className, - className: className, - superClass: superClass - }); - - _renderClassBody(traverse, node, path, state); - - utils.append('return ' + className + ';})()', state); - return false; -} -visitClassExpression.test = function(node, path, state) { - return node.type === Syntax.ClassExpression; -}; - -/** - * @param {function} traverse - * @param {object} node - * @param {array} path - * @param {object} state - */ -function visitPrivateIdentifier(traverse, node, path, state) { - utils.append(_getMungedName(node.name, state), state); - utils.move(node.range[1], state); -} -visitPrivateIdentifier.test = function(node, path, state) { - if (node.type === Syntax.Identifier && _shouldMungeIdentifier(node, state)) { - // Always munge non-computed properties of MemberExpressions - // (a la preventing access of properties of unowned objects) - if (path[0].type === Syntax.MemberExpression && path[0].object !== node - && path[0].computed === false) { - return true; - } - - // Always munge identifiers that were declared within the method function - // scope - if (utils.identWithinLexicalScope(node.name, state, state.methodFuncNode)) { - return true; - } - - // Always munge private keys on object literals defined within a method's - // scope. - if (path[0].type === Syntax.Property - && path[1].type === Syntax.ObjectExpression) { - return true; - } - - // Always munge function parameters - if (path[0].type === Syntax.FunctionExpression - || path[0].type === Syntax.FunctionDeclaration - || path[0].type === Syntax.ArrowFunctionExpression) { - for (var i = 0; i < path[0].params.length; i++) { - if (path[0].params[i] === node) { - return true; - } - } - } - } - return false; -}; - -/** - * @param {function} traverse - * @param {object} node - * @param {array} path - * @param {object} state - */ -function visitSuperCallExpression(traverse, node, path, state) { - var superClassName = state.superClass.name; - - if (node.callee.type === Syntax.Identifier) { - if (_isConstructorMethod(state.methodNode)) { - utils.append(superClassName + '.call(', state); - } else { - var protoProp = SUPER_PROTO_IDENT_PREFIX + superClassName; - if (state.methodNode.key.type === Syntax.Identifier) { - protoProp += '.' + state.methodNode.key.name; - } else if (state.methodNode.key.type === Syntax.Literal) { - protoProp += '[' + JSON.stringify(state.methodNode.key.value) + ']'; - } - utils.append(protoProp + ".call(", state); - } - utils.move(node.callee.range[1], state); - } else if (node.callee.type === Syntax.MemberExpression) { - utils.append(SUPER_PROTO_IDENT_PREFIX + superClassName, state); - utils.move(node.callee.object.range[1], state); - - if (node.callee.computed) { - // ["a" + "b"] - utils.catchup(node.callee.property.range[1] + ']'.length, state); - } else { - // .ab - utils.append('.' + node.callee.property.name, state); - } - - utils.append('.call(', state); - utils.move(node.callee.range[1], state); - } - - utils.append('this', state); - if (node.arguments.length > 0) { - utils.append(',', state); - utils.catchupWhiteSpace(node.arguments[0].range[0], state); - traverse(node.arguments, path, state); - } - - utils.catchupWhiteSpace(node.range[1], state); - utils.append(')', state); - return false; -} -visitSuperCallExpression.test = function(node, path, state) { - if (state.superClass && node.type === Syntax.CallExpression) { - var callee = node.callee; - if (callee.type === Syntax.Identifier && callee.name === 'super' - || callee.type == Syntax.MemberExpression - && callee.object.name === 'super') { - return true; - } - } - return false; -}; - -/** - * @param {function} traverse - * @param {object} node - * @param {array} path - * @param {object} state - */ -function visitSuperMemberExpression(traverse, node, path, state) { - var superClassName = state.superClass.name; - - utils.append(SUPER_PROTO_IDENT_PREFIX + superClassName, state); - utils.move(node.object.range[1], state); -} -visitSuperMemberExpression.test = function(node, path, state) { - return state.superClass - && node.type === Syntax.MemberExpression - && node.object.type === Syntax.Identifier - && node.object.name === 'super'; -}; - -exports.resetSymbols = resetSymbols; - -exports.visitorList = [ - visitClassDeclaration, - visitClassExpression, - visitClassFunctionExpression, - visitClassMethod, - visitClassMethodParam, - visitPrivateIdentifier, - visitSuperCallExpression, - visitSuperMemberExpression -]; - -},{"../src/utils":23,"./reserved-words-helper":34,"base62":10,"esprima-fb":9}],27:[function(_dereq_,module,exports){ -/** - * Copyright 2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/*global exports:true*/ - -/** - * Implements ES6 destructuring assignment and pattern matchng. - * - * function init({port, ip, coords: [x, y]}) { - * return (x && y) ? {id, port} : {ip}; - * }; - * - * function init($__0) { - * var - * port = $__0.port, - * ip = $__0.ip, - * $__1 = $__0.coords, - * x = $__1[0], - * y = $__1[1]; - * return (x && y) ? {id, port} : {ip}; - * } - * - * var x, {ip, port} = init({ip, port}); - * - * var x, $__0 = init({ip, port}), ip = $__0.ip, port = $__0.port; - * - */ -var Syntax = _dereq_('esprima-fb').Syntax; -var utils = _dereq_('../src/utils'); - -var reservedWordsHelper = _dereq_('./reserved-words-helper'); -var restParamVisitors = _dereq_('./es6-rest-param-visitors'); -var restPropertyHelpers = _dereq_('./es7-rest-property-helpers'); - -// ------------------------------------------------------- -// 1. Structured variable declarations. -// -// var [a, b] = [b, a]; -// var {x, y} = {y, x}; -// ------------------------------------------------------- - -function visitStructuredVariable(traverse, node, path, state) { - // Allocate new temp for the pattern. - utils.append(utils.getTempVar(state.localScope.tempVarIndex) + '=', state); - // Skip the pattern and assign the init to the temp. - utils.catchupWhiteSpace(node.init.range[0], state); - traverse(node.init, path, state); - utils.catchup(node.init.range[1], state); - // Render the destructured data. - utils.append(',' + getDestructuredComponents(node.id, state), state); - state.localScope.tempVarIndex++; - return false; -} - -visitStructuredVariable.test = function(node, path, state) { - return node.type === Syntax.VariableDeclarator && - isStructuredPattern(node.id); -}; - -function isStructuredPattern(node) { - return node.type === Syntax.ObjectPattern || - node.type === Syntax.ArrayPattern; -} - -// Main function which does actual recursive destructuring -// of nested complex structures. -function getDestructuredComponents(node, state) { - var tmpIndex = state.localScope.tempVarIndex; - var components = []; - var patternItems = getPatternItems(node); - - for (var idx = 0; idx < patternItems.length; idx++) { - var item = patternItems[idx]; - if (!item) { - continue; - } - - if (item.type === Syntax.SpreadElement) { - // Spread/rest of an array. - // TODO(dmitrys): support spread in the middle of a pattern - // and also for function param patterns: [x, ...xs, y] - components.push(item.argument.name + - '=Array.prototype.slice.call(' + - utils.getTempVar(tmpIndex) + ',' + idx + ')' - ); - continue; - } - - if (item.type === Syntax.SpreadProperty) { - var restExpression = restPropertyHelpers.renderRestExpression( - utils.getTempVar(tmpIndex), - patternItems - ); - components.push(item.argument.name + '=' + restExpression); - continue; - } - - // Depending on pattern type (Array or Object), we get - // corresponding pattern item parts. - var accessor = getPatternItemAccessor(node, item, tmpIndex, idx); - var value = getPatternItemValue(node, item); - - // TODO(dmitrys): implement default values: {x, y=5} - if (value.type === Syntax.Identifier) { - // Simple pattern item. - components.push(value.name + '=' + accessor); - } else { - // Complex sub-structure. - components.push( - utils.getTempVar(++state.localScope.tempVarIndex) + '=' + accessor + - ',' + getDestructuredComponents(value, state) - ); - } - } - - return components.join(','); -} - -function getPatternItems(node) { - return node.properties || node.elements; -} - -function getPatternItemAccessor(node, patternItem, tmpIndex, idx) { - var tmpName = utils.getTempVar(tmpIndex); - if (node.type === Syntax.ObjectPattern) { - if (reservedWordsHelper.isReservedWord(patternItem.key.name)) { - return tmpName + '["' + patternItem.key.name + '"]'; - } else if (patternItem.key.type === Syntax.Literal) { - return tmpName + '[' + JSON.stringify(patternItem.key.value) + ']'; - } else if (patternItem.key.type === Syntax.Identifier) { - return tmpName + '.' + patternItem.key.name; - } - } else if (node.type === Syntax.ArrayPattern) { - return tmpName + '[' + idx + ']'; - } -} - -function getPatternItemValue(node, patternItem) { - return node.type === Syntax.ObjectPattern - ? patternItem.value - : patternItem; -} - -// ------------------------------------------------------- -// 2. Assignment expression. -// -// [a, b] = [b, a]; -// ({x, y} = {y, x}); -// ------------------------------------------------------- - -function visitStructuredAssignment(traverse, node, path, state) { - var exprNode = node.expression; - utils.append('var ' + utils.getTempVar(state.localScope.tempVarIndex) + '=', state); - - utils.catchupWhiteSpace(exprNode.right.range[0], state); - traverse(exprNode.right, path, state); - utils.catchup(exprNode.right.range[1], state); - - utils.append( - ';' + getDestructuredComponents(exprNode.left, state) + ';', - state - ); - - utils.catchupWhiteSpace(node.range[1], state); - state.localScope.tempVarIndex++; - return false; -} - -visitStructuredAssignment.test = function(node, path, state) { - // We consider the expression statement rather than just assignment - // expression to cover case with object patters which should be - // wrapped in grouping operator: ({x, y} = {y, x}); - return node.type === Syntax.ExpressionStatement && - node.expression.type === Syntax.AssignmentExpression && - isStructuredPattern(node.expression.left); -}; - -// ------------------------------------------------------- -// 3. Structured parameter. -// -// function foo({x, y}) { ... } -// ------------------------------------------------------- - -function visitStructuredParameter(traverse, node, path, state) { - utils.append(utils.getTempVar(getParamIndex(node, path)), state); - utils.catchupWhiteSpace(node.range[1], state); - return true; -} - -function getParamIndex(paramNode, path) { - var funcNode = path[0]; - var tmpIndex = 0; - for (var k = 0; k < funcNode.params.length; k++) { - var param = funcNode.params[k]; - if (param === paramNode) { - break; - } - if (isStructuredPattern(param)) { - tmpIndex++; - } - } - return tmpIndex; -} - -visitStructuredParameter.test = function(node, path, state) { - return isStructuredPattern(node) && isFunctionNode(path[0]); -}; - -function isFunctionNode(node) { - return (node.type == Syntax.FunctionDeclaration || - node.type == Syntax.FunctionExpression || - node.type == Syntax.MethodDefinition || - node.type == Syntax.ArrowFunctionExpression); -} - -// ------------------------------------------------------- -// 4. Function body for structured parameters. -// -// function foo({x, y}) { x; y; } -// ------------------------------------------------------- - -function visitFunctionBodyForStructuredParameter(traverse, node, path, state) { - var funcNode = path[0]; - - utils.catchup(funcNode.body.range[0] + 1, state); - renderDestructuredComponents(funcNode, state); - - if (funcNode.rest) { - utils.append( - restParamVisitors.renderRestParamSetup(funcNode, state), - state - ); - } - - return true; -} - -function renderDestructuredComponents(funcNode, state) { - var destructuredComponents = []; - - for (var k = 0; k < funcNode.params.length; k++) { - var param = funcNode.params[k]; - if (isStructuredPattern(param)) { - destructuredComponents.push( - getDestructuredComponents(param, state) - ); - state.localScope.tempVarIndex++; - } - } - - if (destructuredComponents.length) { - utils.append('var ' + destructuredComponents.join(',') + ';', state); - } -} - -visitFunctionBodyForStructuredParameter.test = function(node, path, state) { - return node.type === Syntax.BlockStatement && isFunctionNode(path[0]); -}; - -exports.visitorList = [ - visitStructuredVariable, - visitStructuredAssignment, - visitStructuredParameter, - visitFunctionBodyForStructuredParameter -]; - -exports.renderDestructuredComponents = renderDestructuredComponents; - - -},{"../src/utils":23,"./es6-rest-param-visitors":30,"./es7-rest-property-helpers":32,"./reserved-words-helper":34,"esprima-fb":9}],28:[function(_dereq_,module,exports){ -/** - * Copyright 2013 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/*jslint node:true*/ - -/** - * Desugars concise methods of objects to function expressions. - * - * var foo = { - * method(x, y) { ... } - * }; - * - * var foo = { - * method: function(x, y) { ... } - * }; - * - */ - -var Syntax = _dereq_('esprima-fb').Syntax; -var utils = _dereq_('../src/utils'); -var reservedWordsHelper = _dereq_('./reserved-words-helper'); - -function visitObjectConciseMethod(traverse, node, path, state) { - var isGenerator = node.value.generator; - if (isGenerator) { - utils.catchupWhiteSpace(node.range[0] + 1, state); - } - if (node.computed) { // []() { ...} - utils.catchup(node.key.range[1] + 1, state); - } else if (reservedWordsHelper.isReservedWord(node.key.name)) { - utils.catchup(node.key.range[0], state); - utils.append('"', state); - utils.catchup(node.key.range[1], state); - utils.append('"', state); - } - - utils.catchup(node.key.range[1], state); - utils.append( - ':function' + (isGenerator ? '*' : ''), - state - ); - path.unshift(node); - traverse(node.value, path, state); - path.shift(); - return false; -} - -visitObjectConciseMethod.test = function(node, path, state) { - return node.type === Syntax.Property && - node.value.type === Syntax.FunctionExpression && - node.method === true; -}; - -exports.visitorList = [ - visitObjectConciseMethod -]; - -},{"../src/utils":23,"./reserved-words-helper":34,"esprima-fb":9}],29:[function(_dereq_,module,exports){ -/** - * Copyright 2013 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/*jslint node: true*/ - -/** - * Desugars ES6 Object Literal short notations into ES3 full notation. - * - * // Easier return values. - * function foo(x, y) { - * return {x, y}; // {x: x, y: y} - * }; - * - * // Destructuring. - * function init({port, ip, coords: {x, y}}) { ... } - * - */ -var Syntax = _dereq_('esprima-fb').Syntax; -var utils = _dereq_('../src/utils'); - -/** - * @public - */ -function visitObjectLiteralShortNotation(traverse, node, path, state) { - utils.catchup(node.key.range[1], state); - utils.append(':' + node.key.name, state); - return false; -} - -visitObjectLiteralShortNotation.test = function(node, path, state) { - return node.type === Syntax.Property && - node.kind === 'init' && - node.shorthand === true && - path[0].type !== Syntax.ObjectPattern; -}; - -exports.visitorList = [ - visitObjectLiteralShortNotation -]; - - -},{"../src/utils":23,"esprima-fb":9}],30:[function(_dereq_,module,exports){ -/** - * Copyright 2013 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/*jslint node:true*/ - -/** - * Desugars ES6 rest parameters into an ES3 arguments array. - * - * function printf(template, ...args) { - * args.forEach(...); - * } - * - * We could use `Array.prototype.slice.call`, but that usage of arguments causes - * functions to be deoptimized in V8, so instead we use a for-loop. - * - * function printf(template) { - * for (var args = [], $__0 = 1, $__1 = arguments.length; $__0 < $__1; $__0++) - * args.push(arguments[$__0]); - * args.forEach(...); - * } - * - */ -var Syntax = _dereq_('esprima-fb').Syntax; -var utils = _dereq_('../src/utils'); - - - -function _nodeIsFunctionWithRestParam(node) { - return (node.type === Syntax.FunctionDeclaration - || node.type === Syntax.FunctionExpression - || node.type === Syntax.ArrowFunctionExpression) - && node.rest; -} - -function visitFunctionParamsWithRestParam(traverse, node, path, state) { - if (node.parametricType) { - utils.catchup(node.parametricType.range[0], state); - path.unshift(node); - traverse(node.parametricType, path, state); - path.shift(); - } - - // Render params. - if (node.params.length) { - path.unshift(node); - traverse(node.params, path, state); - path.shift(); - } else { - // -3 is for ... of the rest. - utils.catchup(node.rest.range[0] - 3, state); - } - utils.catchupWhiteSpace(node.rest.range[1], state); - - path.unshift(node); - traverse(node.body, path, state); - path.shift(); - - return false; -} - -visitFunctionParamsWithRestParam.test = function(node, path, state) { - return _nodeIsFunctionWithRestParam(node); -}; - -function renderRestParamSetup(functionNode, state) { - var idx = state.localScope.tempVarIndex++; - var len = state.localScope.tempVarIndex++; - - return 'for (var ' + functionNode.rest.name + '=[],' + - utils.getTempVar(idx) + '=' + functionNode.params.length + ',' + - utils.getTempVar(len) + '=arguments.length;' + - utils.getTempVar(idx) + '<' + utils.getTempVar(len) + ';' + - utils.getTempVar(idx) + '++) ' + - functionNode.rest.name + '.push(arguments[' + utils.getTempVar(idx) + ']);'; -} - -function visitFunctionBodyWithRestParam(traverse, node, path, state) { - utils.catchup(node.range[0] + 1, state); - var parentNode = path[0]; - utils.append(renderRestParamSetup(parentNode, state), state); - return true; -} - -visitFunctionBodyWithRestParam.test = function(node, path, state) { - return node.type === Syntax.BlockStatement - && _nodeIsFunctionWithRestParam(path[0]); -}; - -exports.renderRestParamSetup = renderRestParamSetup; -exports.visitorList = [ - visitFunctionParamsWithRestParam, - visitFunctionBodyWithRestParam -]; - -},{"../src/utils":23,"esprima-fb":9}],31:[function(_dereq_,module,exports){ -/** - * Copyright 2013 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/*jslint node:true*/ - -/** - * @typechecks - */ -'use strict'; - -var Syntax = _dereq_('esprima-fb').Syntax; -var utils = _dereq_('../src/utils'); - -/** - * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-12.1.9 - */ -function visitTemplateLiteral(traverse, node, path, state) { - var templateElements = node.quasis; - - utils.append('(', state); - for (var ii = 0; ii < templateElements.length; ii++) { - var templateElement = templateElements[ii]; - if (templateElement.value.raw !== '') { - utils.append(getCookedValue(templateElement), state); - if (!templateElement.tail) { - // + between element and substitution - utils.append(' + ', state); - } - // maintain line numbers - utils.move(templateElement.range[0], state); - utils.catchupNewlines(templateElement.range[1], state); - } else { // templateElement.value.raw === '' - // Concatenat adjacent substitutions, e.g. `${x}${y}`. Empty templates - // appear before the first and after the last element - nothing to add in - // those cases. - if (ii > 0 && !templateElement.tail) { - // + between substitution and substitution - utils.append(' + ', state); - } - } - - utils.move(templateElement.range[1], state); - if (!templateElement.tail) { - var substitution = node.expressions[ii]; - if (substitution.type === Syntax.Identifier || - substitution.type === Syntax.MemberExpression || - substitution.type === Syntax.CallExpression) { - utils.catchup(substitution.range[1], state); - } else { - utils.append('(', state); - traverse(substitution, path, state); - utils.catchup(substitution.range[1], state); - utils.append(')', state); - } - // if next templateElement isn't empty... - if (templateElements[ii + 1].value.cooked !== '') { - utils.append(' + ', state); - } - } - } - utils.move(node.range[1], state); - utils.append(')', state); - return false; -} - -visitTemplateLiteral.test = function(node, path, state) { - return node.type === Syntax.TemplateLiteral; -}; - -/** - * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-12.2.6 - */ -function visitTaggedTemplateExpression(traverse, node, path, state) { - var template = node.quasi; - var numQuasis = template.quasis.length; - - // print the tag - utils.move(node.tag.range[0], state); - traverse(node.tag, path, state); - utils.catchup(node.tag.range[1], state); - - // print array of template elements - utils.append('(function() { var siteObj = [', state); - for (var ii = 0; ii < numQuasis; ii++) { - utils.append(getCookedValue(template.quasis[ii]), state); - if (ii !== numQuasis - 1) { - utils.append(', ', state); - } - } - utils.append(']; siteObj.raw = [', state); - for (ii = 0; ii < numQuasis; ii++) { - utils.append(getRawValue(template.quasis[ii]), state); - if (ii !== numQuasis - 1) { - utils.append(', ', state); - } - } - utils.append( - ']; Object.freeze(siteObj.raw); Object.freeze(siteObj); return siteObj; }()', - state - ); - - // print substitutions - if (numQuasis > 1) { - for (ii = 0; ii < template.expressions.length; ii++) { - var expression = template.expressions[ii]; - utils.append(', ', state); - - // maintain line numbers by calling catchupWhiteSpace over the whole - // previous TemplateElement - utils.move(template.quasis[ii].range[0], state); - utils.catchupNewlines(template.quasis[ii].range[1], state); - - utils.move(expression.range[0], state); - traverse(expression, path, state); - utils.catchup(expression.range[1], state); - } - } - - // print blank lines to push the closing ) down to account for the final - // TemplateElement. - utils.catchupNewlines(node.range[1], state); - - utils.append(')', state); - - return false; -} - -visitTaggedTemplateExpression.test = function(node, path, state) { - return node.type === Syntax.TaggedTemplateExpression; -}; - -function getCookedValue(templateElement) { - return JSON.stringify(templateElement.value.cooked); -} - -function getRawValue(templateElement) { - return JSON.stringify(templateElement.value.raw); -} - -exports.visitorList = [ - visitTemplateLiteral, - visitTaggedTemplateExpression -]; - -},{"../src/utils":23,"esprima-fb":9}],32:[function(_dereq_,module,exports){ -/** - * Copyright 2013 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/*jslint node:true*/ - -/** - * Desugars ES7 rest properties into ES5 object iteration. - */ - -var Syntax = _dereq_('esprima-fb').Syntax; - -// TODO: This is a pretty massive helper, it should only be defined once, in the -// transform's runtime environment. We don't currently have a runtime though. -var restFunction = - '(function(source, exclusion) {' + - 'var rest = {};' + - 'var hasOwn = Object.prototype.hasOwnProperty;' + - 'if (source == null) {' + - 'throw new TypeError();' + - '}' + - 'for (var key in source) {' + - 'if (hasOwn.call(source, key) && !hasOwn.call(exclusion, key)) {' + - 'rest[key] = source[key];' + - '}' + - '}' + - 'return rest;' + - '})'; - -function getPropertyNames(properties) { - var names = []; - for (var i = 0; i < properties.length; i++) { - var property = properties[i]; - if (property.type === Syntax.SpreadProperty) { - continue; - } - if (property.type === Syntax.Identifier) { - names.push(property.name); - } else { - names.push(property.key.name); - } - } - return names; -} - -function getRestFunctionCall(source, exclusion) { - return restFunction + '(' + source + ',' + exclusion + ')'; -} - -function getSimpleShallowCopy(accessorExpression) { - // This could be faster with 'Object.assign({}, ' + accessorExpression + ')' - // but to unify code paths and avoid a ES6 dependency we use the same - // helper as for the exclusion case. - return getRestFunctionCall(accessorExpression, '{}'); -} - -function renderRestExpression(accessorExpression, excludedProperties) { - var excludedNames = getPropertyNames(excludedProperties); - if (!excludedNames.length) { - return getSimpleShallowCopy(accessorExpression); - } - return getRestFunctionCall( - accessorExpression, - '{' + excludedNames.join(':1,') + ':1}' - ); -} - -exports.renderRestExpression = renderRestExpression; - -},{"esprima-fb":9}],33:[function(_dereq_,module,exports){ -/** - * Copyright 2004-present Facebook. All Rights Reserved. - */ -/*global exports:true*/ - -/** - * Implements ES7 object spread property. - * https://gist.github.com/sebmarkbage/aa849c7973cb4452c547 - * - * { ...a, x: 1 } - * - * Object.assign({}, a, {x: 1 }) - * - */ - -var Syntax = _dereq_('esprima-fb').Syntax; -var utils = _dereq_('../src/utils'); - -function visitObjectLiteralSpread(traverse, node, path, state) { - utils.catchup(node.range[0], state); - - utils.append('Object.assign({', state); - - // Skip the original { - utils.move(node.range[0] + 1, state); - - var previousWasSpread = false; - - for (var i = 0; i < node.properties.length; i++) { - var property = node.properties[i]; - if (property.type === Syntax.SpreadProperty) { - - // Close the previous object or initial object - if (!previousWasSpread) { - utils.append('}', state); - } - - if (i === 0) { - // Normally there will be a comma when we catch up, but not before - // the first property. - utils.append(',', state); - } - - utils.catchup(property.range[0], state); - - // skip ... - utils.move(property.range[0] + 3, state); - - traverse(property.argument, path, state); - - utils.catchup(property.range[1], state); - - previousWasSpread = true; - - } else { - - utils.catchup(property.range[0], state); - - if (previousWasSpread) { - utils.append('{', state); - } - - traverse(property, path, state); - - utils.catchup(property.range[1], state); - - previousWasSpread = false; - - } - } - - // Strip any non-whitespace between the last item and the end. - // We only catch up on whitespace so that we ignore any trailing commas which - // are stripped out for IE8 support. Unfortunately, this also strips out any - // trailing comments. - utils.catchupWhiteSpace(node.range[1] - 1, state); - - // Skip the trailing } - utils.move(node.range[1], state); - - if (!previousWasSpread) { - utils.append('}', state); - } - - utils.append(')', state); - return false; -} - -visitObjectLiteralSpread.test = function(node, path, state) { - if (node.type !== Syntax.ObjectExpression) { - return false; - } - // Tight loop optimization - var hasAtLeastOneSpreadProperty = false; - for (var i = 0; i < node.properties.length; i++) { - var property = node.properties[i]; - if (property.type === Syntax.SpreadProperty) { - hasAtLeastOneSpreadProperty = true; - } else if (property.kind !== 'init') { - return false; - } - } - return hasAtLeastOneSpreadProperty; -}; - -exports.visitorList = [ - visitObjectLiteralSpread -]; - -},{"../src/utils":23,"esprima-fb":9}],34:[function(_dereq_,module,exports){ -/** - * Copyright 2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var KEYWORDS = [ - 'break', 'do', 'in', 'typeof', 'case', 'else', 'instanceof', 'var', 'catch', - 'export', 'new', 'void', 'class', 'extends', 'return', 'while', 'const', - 'finally', 'super', 'with', 'continue', 'for', 'switch', 'yield', 'debugger', - 'function', 'this', 'default', 'if', 'throw', 'delete', 'import', 'try' -]; - -var FUTURE_RESERVED_WORDS = [ - 'enum', 'await', 'implements', 'package', 'protected', 'static', 'interface', - 'private', 'public' -]; - -var LITERALS = [ - 'null', - 'true', - 'false' -]; - -// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-reserved-words -var RESERVED_WORDS = [].concat( - KEYWORDS, - FUTURE_RESERVED_WORDS, - LITERALS -); - -var reservedWordsMap = Object.create(null); -RESERVED_WORDS.forEach(function(k) { - reservedWordsMap[k] = true; -}); - -/** - * This list should not grow as new reserved words are introdued. This list is - * of words that need to be quoted because ES3-ish browsers do not allow their - * use as identifier names. - */ -var ES3_FUTURE_RESERVED_WORDS = [ - 'enum', 'implements', 'package', 'protected', 'static', 'interface', - 'private', 'public' -]; - -var ES3_RESERVED_WORDS = [].concat( - KEYWORDS, - ES3_FUTURE_RESERVED_WORDS, - LITERALS -); - -var es3ReservedWordsMap = Object.create(null); -ES3_RESERVED_WORDS.forEach(function(k) { - es3ReservedWordsMap[k] = true; -}); - -exports.isReservedWord = function(word) { - return !!reservedWordsMap[word]; -}; - -exports.isES3ReservedWord = function(word) { - return !!es3ReservedWordsMap[word]; -}; - -},{}],35:[function(_dereq_,module,exports){ -/** - * Copyright 2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -/*global exports:true*/ - -var Syntax = _dereq_('esprima-fb').Syntax; -var utils = _dereq_('../src/utils'); -var reserverdWordsHelper = _dereq_('./reserved-words-helper'); - -/** - * Code adapted from https://github.com/spicyj/es3ify - * The MIT License (MIT) - * Copyright (c) 2014 Ben Alpert - */ - -function visitProperty(traverse, node, path, state) { - utils.catchup(node.key.range[0], state); - utils.append('"', state); - utils.catchup(node.key.range[1], state); - utils.append('"', state); - utils.catchup(node.value.range[0], state); - traverse(node.value, path, state); - return false; -} - -visitProperty.test = function(node) { - return node.type === Syntax.Property && - node.key.type === Syntax.Identifier && - !node.method && - !node.shorthand && - !node.computed && - reserverdWordsHelper.isES3ReservedWord(node.key.name); -}; - -function visitMemberExpression(traverse, node, path, state) { - traverse(node.object, path, state); - utils.catchup(node.property.range[0] - 1, state); - utils.append('[', state); - utils.catchupWhiteSpace(node.property.range[0], state); - utils.append('"', state); - utils.catchup(node.property.range[1], state); - utils.append('"]', state); - return false; -} - -visitMemberExpression.test = function(node) { - return node.type === Syntax.MemberExpression && - node.property.type === Syntax.Identifier && - reserverdWordsHelper.isES3ReservedWord(node.property.name); -}; - -exports.visitorList = [ - visitProperty, - visitMemberExpression -]; - -},{"../src/utils":23,"./reserved-words-helper":34,"esprima-fb":9}],36:[function(_dereq_,module,exports){ -var esprima = _dereq_('esprima-fb'); -var utils = _dereq_('../src/utils'); - -var Syntax = esprima.Syntax; - -function _isFunctionNode(node) { - return node.type === Syntax.FunctionDeclaration - || node.type === Syntax.FunctionExpression - || node.type === Syntax.ArrowFunctionExpression; -} - -function visitClassProperty(traverse, node, path, state) { - utils.catchup(node.range[0], state); - utils.catchupWhiteOut(node.range[1], state); - return false; -} -visitClassProperty.test = function(node, path, state) { - return node.type === Syntax.ClassProperty; -}; - -function visitTypeAlias(traverse, node, path, state) { - utils.catchupWhiteOut(node.range[1], state); - return false; -} -visitTypeAlias.test = function(node, path, state) { - return node.type === Syntax.TypeAlias; -}; - -function visitTypeCast(traverse, node, path, state) { - path.unshift(node); - traverse(node.expression, path, state); - path.shift(); - - utils.catchup(node.typeAnnotation.range[0], state); - utils.catchupWhiteOut(node.typeAnnotation.range[1], state); - return false; -} -visitTypeCast.test = function(node, path, state) { - return node.type === Syntax.TypeCastExpression; -}; - -function visitInterfaceDeclaration(traverse, node, path, state) { - utils.catchupWhiteOut(node.range[1], state); - return false; -} -visitInterfaceDeclaration.test = function(node, path, state) { - return node.type === Syntax.InterfaceDeclaration; -}; - -function visitDeclare(traverse, node, path, state) { - utils.catchupWhiteOut(node.range[1], state); - return false; -} -visitDeclare.test = function(node, path, state) { - switch (node.type) { - case Syntax.DeclareVariable: - case Syntax.DeclareFunction: - case Syntax.DeclareClass: - case Syntax.DeclareModule: - return true; - } - return false; -}; - -function visitFunctionParametricAnnotation(traverse, node, path, state) { - utils.catchup(node.range[0], state); - utils.catchupWhiteOut(node.range[1], state); - return false; -} -visitFunctionParametricAnnotation.test = function(node, path, state) { - return node.type === Syntax.TypeParameterDeclaration - && path[0] - && _isFunctionNode(path[0]) - && node === path[0].typeParameters; -}; - -function visitFunctionReturnAnnotation(traverse, node, path, state) { - utils.catchup(node.range[0], state); - utils.catchupWhiteOut(node.range[1], state); - return false; -} -visitFunctionReturnAnnotation.test = function(node, path, state) { - return path[0] && _isFunctionNode(path[0]) && node === path[0].returnType; -}; - -function visitOptionalFunctionParameterAnnotation(traverse, node, path, state) { - utils.catchup(node.range[0] + node.name.length, state); - utils.catchupWhiteOut(node.range[1], state); - return false; -} -visitOptionalFunctionParameterAnnotation.test = function(node, path, state) { - return node.type === Syntax.Identifier - && node.optional - && path[0] - && _isFunctionNode(path[0]); -}; - -function visitTypeAnnotatedIdentifier(traverse, node, path, state) { - utils.catchup(node.typeAnnotation.range[0], state); - utils.catchupWhiteOut(node.typeAnnotation.range[1], state); - return false; -} -visitTypeAnnotatedIdentifier.test = function(node, path, state) { - return node.type === Syntax.Identifier && node.typeAnnotation; -}; - -function visitTypeAnnotatedObjectOrArrayPattern(traverse, node, path, state) { - utils.catchup(node.typeAnnotation.range[0], state); - utils.catchupWhiteOut(node.typeAnnotation.range[1], state); - return false; -} -visitTypeAnnotatedObjectOrArrayPattern.test = function(node, path, state) { - var rightType = node.type === Syntax.ObjectPattern - || node.type === Syntax.ArrayPattern; - return rightType && node.typeAnnotation; -}; - -/** - * Methods cause trouble, since esprima parses them as a key/value pair, where - * the location of the value starts at the method body. For example - * { bar(x:number,...y:Array):number {} } - * is parsed as - * { bar: function(x: number, ...y:Array): number {} } - * except that the location of the FunctionExpression value is 40-something, - * which is the location of the function body. This means that by the time we - * visit the params, rest param, and return type organically, we've already - * catchup()'d passed them. - */ -function visitMethod(traverse, node, path, state) { - path.unshift(node); - traverse(node.key, path, state); - - path.unshift(node.value); - traverse(node.value.params, path, state); - node.value.rest && traverse(node.value.rest, path, state); - node.value.returnType && traverse(node.value.returnType, path, state); - traverse(node.value.body, path, state); - - path.shift(); - - path.shift(); - return false; -} - -visitMethod.test = function(node, path, state) { - return (node.type === "Property" && (node.method || node.kind === "set" || node.kind === "get")) - || (node.type === "MethodDefinition"); -}; - -function visitImportType(traverse, node, path, state) { - utils.catchupWhiteOut(node.range[1], state); - return false; -} -visitImportType.test = function(node, path, state) { - return node.type === 'ImportDeclaration' - && node.isType; -}; - -exports.visitorList = [ - visitClassProperty, - visitDeclare, - visitImportType, - visitInterfaceDeclaration, - visitFunctionParametricAnnotation, - visitFunctionReturnAnnotation, - visitMethod, - visitOptionalFunctionParameterAnnotation, - visitTypeAlias, - visitTypeCast, - visitTypeAnnotatedIdentifier, - visitTypeAnnotatedObjectOrArrayPattern -]; - -},{"../src/utils":23,"esprima-fb":9}],37:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ -/*global exports:true*/ -'use strict'; -var Syntax = _dereq_('jstransform').Syntax; -var utils = _dereq_('jstransform/src/utils'); - -function renderJSXLiteral(object, isLast, state, start, end) { - var lines = object.value.split(/\r\n|\n|\r/); - - if (start) { - utils.append(start, state); - } - - var lastNonEmptyLine = 0; - - lines.forEach(function(line, index) { - if (line.match(/[^ \t]/)) { - lastNonEmptyLine = index; - } - }); - - lines.forEach(function(line, index) { - var isFirstLine = index === 0; - var isLastLine = index === lines.length - 1; - var isLastNonEmptyLine = index === lastNonEmptyLine; - - // replace rendered whitespace tabs with spaces - var trimmedLine = line.replace(/\t/g, ' '); - - // trim whitespace touching a newline - if (!isFirstLine) { - trimmedLine = trimmedLine.replace(/^[ ]+/, ''); - } - if (!isLastLine) { - trimmedLine = trimmedLine.replace(/[ ]+$/, ''); - } - - if (!isFirstLine) { - utils.append(line.match(/^[ \t]*/)[0], state); - } - - if (trimmedLine || isLastNonEmptyLine) { - utils.append( - JSON.stringify(trimmedLine) + - (!isLastNonEmptyLine ? ' + \' \' +' : ''), - state); - - if (isLastNonEmptyLine) { - if (end) { - utils.append(end, state); - } - if (!isLast) { - utils.append(', ', state); - } - } - - // only restore tail whitespace if line had literals - if (trimmedLine && !isLastLine) { - utils.append(line.match(/[ \t]*$/)[0], state); - } - } - - if (!isLastLine) { - utils.append('\n', state); - } - }); - - utils.move(object.range[1], state); -} - -function renderJSXExpressionContainer(traverse, object, isLast, path, state) { - // Plus 1 to skip `{`. - utils.move(object.range[0] + 1, state); - utils.catchup(object.expression.range[0], state); - traverse(object.expression, path, state); - - if (!isLast && object.expression.type !== Syntax.JSXEmptyExpression) { - // If we need to append a comma, make sure to do so after the expression. - utils.catchup(object.expression.range[1], state, trimLeft); - utils.append(', ', state); - } - - // Minus 1 to skip `}`. - utils.catchup(object.range[1] - 1, state, trimLeft); - utils.move(object.range[1], state); - return false; -} - -function quoteAttrName(attr) { - // Quote invalid JS identifiers. - if (!/^[a-z_$][a-z\d_$]*$/i.test(attr)) { - return '"' + attr + '"'; - } - return attr; -} - -function trimLeft(value) { - return value.replace(/^[ ]+/, ''); -} - -exports.renderJSXExpressionContainer = renderJSXExpressionContainer; -exports.renderJSXLiteral = renderJSXLiteral; -exports.quoteAttrName = quoteAttrName; -exports.trimLeft = trimLeft; - -},{"jstransform":22,"jstransform/src/utils":23}],38:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ -/*global exports:true*/ -'use strict'; - -var Syntax = _dereq_('jstransform').Syntax; -var utils = _dereq_('jstransform/src/utils'); - -var renderJSXExpressionContainer = - _dereq_('./jsx').renderJSXExpressionContainer; -var renderJSXLiteral = _dereq_('./jsx').renderJSXLiteral; -var quoteAttrName = _dereq_('./jsx').quoteAttrName; - -var trimLeft = _dereq_('./jsx').trimLeft; - -/** - * Customized desugar processor for React JSX. Currently: - * - * => React.createElement(X, null) - * => React.createElement(X, {prop: '1'}, null) - * => React.createElement(X, {prop:'2'}, - * React.createElement(Y, null) - * ) - *
=> React.createElement("div", null) - */ - -/** - * Removes all non-whitespace/parenthesis characters - */ -var reNonWhiteParen = /([^\s\(\)])/g; -function stripNonWhiteParen(value) { - return value.replace(reNonWhiteParen, ''); -} - -var tagConvention = /^[a-z]|\-/; -function isTagName(name) { - return tagConvention.test(name); -} - -function visitReactTag(traverse, object, path, state) { - var openingElement = object.openingElement; - var nameObject = openingElement.name; - var attributesObject = openingElement.attributes; - - utils.catchup(openingElement.range[0], state, trimLeft); - - if (nameObject.type === Syntax.JSXNamespacedName && nameObject.namespace) { - throw new Error('Namespace tags are not supported. ReactJSX is not XML.'); - } - - // We assume that the React runtime is already in scope - utils.append('React.createElement(', state); - - if (nameObject.type === Syntax.JSXIdentifier && isTagName(nameObject.name)) { - utils.append('"' + nameObject.name + '"', state); - utils.move(nameObject.range[1], state); - } else { - // Use utils.catchup in this case so we can easily handle - // JSXMemberExpressions which look like Foo.Bar.Baz. This also handles - // JSXIdentifiers that aren't fallback tags. - utils.move(nameObject.range[0], state); - utils.catchup(nameObject.range[1], state); - } - - utils.append(', ', state); - - var hasAttributes = attributesObject.length; - - var hasAtLeastOneSpreadProperty = attributesObject.some(function(attr) { - return attr.type === Syntax.JSXSpreadAttribute; - }); - - // if we don't have any attributes, pass in null - if (hasAtLeastOneSpreadProperty) { - utils.append('React.__spread({', state); - } else if (hasAttributes) { - utils.append('{', state); - } else { - utils.append('null', state); - } - - // keep track of if the previous attribute was a spread attribute - var previousWasSpread = false; - - // write attributes - attributesObject.forEach(function(attr, index) { - var isLast = index === attributesObject.length - 1; - - if (attr.type === Syntax.JSXSpreadAttribute) { - // Close the previous object or initial object - if (!previousWasSpread) { - utils.append('}, ', state); - } - - // Move to the expression start, ignoring everything except parenthesis - // and whitespace. - utils.catchup(attr.range[0], state, stripNonWhiteParen); - // Plus 1 to skip `{`. - utils.move(attr.range[0] + 1, state); - utils.catchup(attr.argument.range[0], state, stripNonWhiteParen); - - traverse(attr.argument, path, state); - - utils.catchup(attr.argument.range[1], state); - - // Move to the end, ignoring parenthesis and the closing `}` - utils.catchup(attr.range[1] - 1, state, stripNonWhiteParen); - - if (!isLast) { - utils.append(', ', state); - } - - utils.move(attr.range[1], state); - - previousWasSpread = true; - - return; - } - - // If the next attribute is a spread, we're effective last in this object - if (!isLast) { - isLast = attributesObject[index + 1].type === Syntax.JSXSpreadAttribute; - } - - if (attr.name.namespace) { - throw new Error( - 'Namespace attributes are not supported. ReactJSX is not XML.'); - } - var name = attr.name.name; - - utils.catchup(attr.range[0], state, trimLeft); - - if (previousWasSpread) { - utils.append('{', state); - } - - utils.append(quoteAttrName(name), state); - utils.append(': ', state); - - if (!attr.value) { - state.g.buffer += 'true'; - state.g.position = attr.name.range[1]; - if (!isLast) { - utils.append(', ', state); - } - } else { - utils.move(attr.name.range[1], state); - // Use catchupNewlines to skip over the '=' in the attribute - utils.catchupNewlines(attr.value.range[0], state); - if (attr.value.type === Syntax.Literal) { - renderJSXLiteral(attr.value, isLast, state); - } else { - renderJSXExpressionContainer(traverse, attr.value, isLast, path, state); - } - } - - utils.catchup(attr.range[1], state, trimLeft); - - previousWasSpread = false; - - }); - - if (!openingElement.selfClosing) { - utils.catchup(openingElement.range[1] - 1, state, trimLeft); - utils.move(openingElement.range[1], state); - } - - if (hasAttributes && !previousWasSpread) { - utils.append('}', state); - } - - if (hasAtLeastOneSpreadProperty) { - utils.append(')', state); - } - - // filter out whitespace - var childrenToRender = object.children.filter(function(child) { - return !(child.type === Syntax.Literal - && typeof child.value === 'string' - && child.value.match(/^[ \t]*[\r\n][ \t\r\n]*$/)); - }); - if (childrenToRender.length > 0) { - var lastRenderableIndex; - - childrenToRender.forEach(function(child, index) { - if (child.type !== Syntax.JSXExpressionContainer || - child.expression.type !== Syntax.JSXEmptyExpression) { - lastRenderableIndex = index; - } - }); - - if (lastRenderableIndex !== undefined) { - utils.append(', ', state); - } - - childrenToRender.forEach(function(child, index) { - utils.catchup(child.range[0], state, trimLeft); - - var isLast = index >= lastRenderableIndex; - - if (child.type === Syntax.Literal) { - renderJSXLiteral(child, isLast, state); - } else if (child.type === Syntax.JSXExpressionContainer) { - renderJSXExpressionContainer(traverse, child, isLast, path, state); - } else { - traverse(child, path, state); - if (!isLast) { - utils.append(', ', state); - } - } - - utils.catchup(child.range[1], state, trimLeft); - }); - } - - if (openingElement.selfClosing) { - // everything up to /> - utils.catchup(openingElement.range[1] - 2, state, trimLeft); - utils.move(openingElement.range[1], state); - } else { - // everything up to - utils.catchup(object.closingElement.range[0], state, trimLeft); - utils.move(object.closingElement.range[1], state); - } - - utils.append(')', state); - return false; -} - -visitReactTag.test = function(object, path, state) { - return object.type === Syntax.JSXElement; -}; - -exports.visitorList = [ - visitReactTag -]; - -},{"./jsx":37,"jstransform":22,"jstransform/src/utils":23}],39:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ -/*global exports:true*/ -'use strict'; - -var Syntax = _dereq_('jstransform').Syntax; -var utils = _dereq_('jstransform/src/utils'); - -function addDisplayName(displayName, object, state) { - if (object && - object.type === Syntax.CallExpression && - object.callee.type === Syntax.MemberExpression && - object.callee.object.type === Syntax.Identifier && - object.callee.object.name === 'React' && - object.callee.property.type === Syntax.Identifier && - object.callee.property.name === 'createClass' && - object.arguments.length === 1 && - object.arguments[0].type === Syntax.ObjectExpression) { - // Verify that the displayName property isn't already set - var properties = object.arguments[0].properties; - var safe = properties.every(function(property) { - var value = property.key.type === Syntax.Identifier ? - property.key.name : - property.key.value; - return value !== 'displayName'; - }); - - if (safe) { - utils.catchup(object.arguments[0].range[0] + 1, state); - utils.append('displayName: "' + displayName + '",', state); - } - } -} - -/** - * Transforms the following: - * - * var MyComponent = React.createClass({ - * render: ... - * }); - * - * into: - * - * var MyComponent = React.createClass({ - * displayName: 'MyComponent', - * render: ... - * }); - * - * Also catches: - * - * MyComponent = React.createClass(...); - * exports.MyComponent = React.createClass(...); - * module.exports = {MyComponent: React.createClass(...)}; - */ -function visitReactDisplayName(traverse, object, path, state) { - var left, right; - - if (object.type === Syntax.AssignmentExpression) { - left = object.left; - right = object.right; - } else if (object.type === Syntax.Property) { - left = object.key; - right = object.value; - } else if (object.type === Syntax.VariableDeclarator) { - left = object.id; - right = object.init; - } - - if (left && left.type === Syntax.MemberExpression) { - left = left.property; - } - if (left && left.type === Syntax.Identifier) { - addDisplayName(left.name, right, state); - } -} - -visitReactDisplayName.test = function(object, path, state) { - return ( - object.type === Syntax.AssignmentExpression || - object.type === Syntax.Property || - object.type === Syntax.VariableDeclarator - ); -}; - -exports.visitorList = [ - visitReactDisplayName -]; - -},{"jstransform":22,"jstransform/src/utils":23}],40:[function(_dereq_,module,exports){ -/*global exports:true*/ - -'use strict'; - -var es6ArrowFunctions = - _dereq_('jstransform/visitors/es6-arrow-function-visitors'); -var es6Classes = _dereq_('jstransform/visitors/es6-class-visitors'); -var es6Destructuring = - _dereq_('jstransform/visitors/es6-destructuring-visitors'); -var es6ObjectConciseMethod = - _dereq_('jstransform/visitors/es6-object-concise-method-visitors'); -var es6ObjectShortNotation = - _dereq_('jstransform/visitors/es6-object-short-notation-visitors'); -var es6RestParameters = _dereq_('jstransform/visitors/es6-rest-param-visitors'); -var es6Templates = _dereq_('jstransform/visitors/es6-template-visitors'); -var es6CallSpread = - _dereq_('jstransform/visitors/es6-call-spread-visitors'); -var es7SpreadProperty = - _dereq_('jstransform/visitors/es7-spread-property-visitors'); -var react = _dereq_('./transforms/react'); -var reactDisplayName = _dereq_('./transforms/reactDisplayName'); -var reservedWords = _dereq_('jstransform/visitors/reserved-words-visitors'); - -/** - * Map from transformName => orderedListOfVisitors. - */ -var transformVisitors = { - 'es6-arrow-functions': es6ArrowFunctions.visitorList, - 'es6-classes': es6Classes.visitorList, - 'es6-destructuring': es6Destructuring.visitorList, - 'es6-object-concise-method': es6ObjectConciseMethod.visitorList, - 'es6-object-short-notation': es6ObjectShortNotation.visitorList, - 'es6-rest-params': es6RestParameters.visitorList, - 'es6-templates': es6Templates.visitorList, - 'es6-call-spread': es6CallSpread.visitorList, - 'es7-spread-property': es7SpreadProperty.visitorList, - 'react': react.visitorList.concat(reactDisplayName.visitorList), - 'reserved-words': reservedWords.visitorList -}; - -var transformSets = { - 'harmony': [ - 'es6-arrow-functions', - 'es6-object-concise-method', - 'es6-object-short-notation', - 'es6-classes', - 'es6-rest-params', - 'es6-templates', - 'es6-destructuring', - 'es6-call-spread', - 'es7-spread-property' - ], - 'es3': [ - 'reserved-words' - ], - 'react': [ - 'react' - ] -}; - -/** - * Specifies the order in which each transform should run. - */ -var transformRunOrder = [ - 'reserved-words', - 'es6-arrow-functions', - 'es6-object-concise-method', - 'es6-object-short-notation', - 'es6-classes', - 'es6-rest-params', - 'es6-templates', - 'es6-destructuring', - 'es6-call-spread', - 'es7-spread-property', - 'react' -]; - -/** - * Given a list of transform names, return the ordered list of visitors to be - * passed to the transform() function. - * - * @param {array?} excludes - * @return {array} - */ -function getAllVisitors(excludes) { - var ret = []; - for (var i = 0, il = transformRunOrder.length; i < il; i++) { - if (!excludes || excludes.indexOf(transformRunOrder[i]) === -1) { - ret = ret.concat(transformVisitors[transformRunOrder[i]]); - } - } - return ret; -} - -/** - * Given a list of visitor set names, return the ordered list of visitors to be - * passed to jstransform. - * - * @param {array} - * @return {array} - */ -function getVisitorsBySet(sets) { - var visitorsToInclude = sets.reduce(function(visitors, set) { - if (!transformSets.hasOwnProperty(set)) { - throw new Error('Unknown visitor set: ' + set); - } - transformSets[set].forEach(function(visitor) { - visitors[visitor] = true; - }); - return visitors; - }, {}); - - var visitorList = []; - for (var i = 0; i < transformRunOrder.length; i++) { - if (visitorsToInclude.hasOwnProperty(transformRunOrder[i])) { - visitorList = visitorList.concat(transformVisitors[transformRunOrder[i]]); - } - } - - return visitorList; -} - -exports.getVisitorsBySet = getVisitorsBySet; -exports.getAllVisitors = getAllVisitors; -exports.transformVisitors = transformVisitors; - -},{"./transforms/react":38,"./transforms/reactDisplayName":39,"jstransform/visitors/es6-arrow-function-visitors":24,"jstransform/visitors/es6-call-spread-visitors":25,"jstransform/visitors/es6-class-visitors":26,"jstransform/visitors/es6-destructuring-visitors":27,"jstransform/visitors/es6-object-concise-method-visitors":28,"jstransform/visitors/es6-object-short-notation-visitors":29,"jstransform/visitors/es6-rest-param-visitors":30,"jstransform/visitors/es6-template-visitors":31,"jstransform/visitors/es7-spread-property-visitors":33,"jstransform/visitors/reserved-words-visitors":35}],41:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -'use strict'; -/*eslint-disable no-undef*/ -var Buffer = _dereq_('buffer').Buffer; - -function inlineSourceMap(sourceMap, sourceCode, sourceFilename) { - // This can be used with a sourcemap that has already has toJSON called on it. - // Check first. - var json = sourceMap; - if (typeof sourceMap.toJSON === 'function') { - json = sourceMap.toJSON(); - } - json.sources = [sourceFilename]; - json.sourcesContent = [sourceCode]; - var base64 = Buffer(JSON.stringify(json)).toString('base64'); - return '//# sourceMappingURL=data:application/json;base64,' + base64; -} - -module.exports = inlineSourceMap; - -},{"buffer":3}]},{},[1])(1) -}); \ No newline at end of file diff --git a/public/javascripts/wechat/ReactRouter.js b/public/javascripts/wechat/ReactRouter.js deleted file mode 100644 index 810fd7ddc..000000000 --- a/public/javascripts/wechat/ReactRouter.js +++ /dev/null @@ -1,5064 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(require("react")); - else if(typeof define === 'function' && define.amd) - define(["react"], factory); - else if(typeof exports === 'object') - exports["ReactRouter"] = factory(require("react")); - else - root["ReactRouter"] = factory(root["React"]); -})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports, __webpack_require__) { - - /* components */ - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Router2 = __webpack_require__(37); - - var _Router3 = _interopRequireDefault(_Router2); - - exports.Router = _Router3['default']; - - var _Link2 = __webpack_require__(18); - - var _Link3 = _interopRequireDefault(_Link2); - - exports.Link = _Link3['default']; - - var _IndexLink2 = __webpack_require__(31); - - var _IndexLink3 = _interopRequireDefault(_IndexLink2); - - exports.IndexLink = _IndexLink3['default']; - - /* components (configuration) */ - - var _IndexRedirect2 = __webpack_require__(32); - - var _IndexRedirect3 = _interopRequireDefault(_IndexRedirect2); - - exports.IndexRedirect = _IndexRedirect3['default']; - - var _IndexRoute2 = __webpack_require__(33); - - var _IndexRoute3 = _interopRequireDefault(_IndexRoute2); - - exports.IndexRoute = _IndexRoute3['default']; - - var _Redirect2 = __webpack_require__(19); - - var _Redirect3 = _interopRequireDefault(_Redirect2); - - exports.Redirect = _Redirect3['default']; - - var _Route2 = __webpack_require__(35); - - var _Route3 = _interopRequireDefault(_Route2); - - exports.Route = _Route3['default']; - - /* mixins */ - - var _History2 = __webpack_require__(30); - - var _History3 = _interopRequireDefault(_History2); - - exports.History = _History3['default']; - - var _Lifecycle2 = __webpack_require__(34); - - var _Lifecycle3 = _interopRequireDefault(_Lifecycle2); - - exports.Lifecycle = _Lifecycle3['default']; - - var _RouteContext2 = __webpack_require__(36); - - var _RouteContext3 = _interopRequireDefault(_RouteContext2); - - exports.RouteContext = _RouteContext3['default']; - - /* utils */ - - var _useRoutes2 = __webpack_require__(48); - - var _useRoutes3 = _interopRequireDefault(_useRoutes2); - - exports.useRoutes = _useRoutes3['default']; - - var _RouteUtils = __webpack_require__(5); - - exports.createRoutes = _RouteUtils.createRoutes; - - var _RouterContext2 = __webpack_require__(13); - - var _RouterContext3 = _interopRequireDefault(_RouterContext2); - - exports.RouterContext = _RouterContext3['default']; - - var _RoutingContext2 = __webpack_require__(38); - - var _RoutingContext3 = _interopRequireDefault(_RoutingContext2); - - exports.RoutingContext = _RoutingContext3['default']; - - var _PropTypes2 = __webpack_require__(6); - - var _PropTypes3 = _interopRequireDefault(_PropTypes2); - - exports.PropTypes = _PropTypes3['default']; - - var _match2 = __webpack_require__(46); - - var _match3 = _interopRequireDefault(_match2); - - exports.match = _match3['default']; - - var _useRouterHistory2 = __webpack_require__(24); - - var _useRouterHistory3 = _interopRequireDefault(_useRouterHistory2); - - exports.useRouterHistory = _useRouterHistory3['default']; - - var _PatternUtils = __webpack_require__(8); - - exports.formatPattern = _PatternUtils.formatPattern; - - /* histories */ - - var _browserHistory2 = __webpack_require__(40); - - var _browserHistory3 = _interopRequireDefault(_browserHistory2); - - exports.browserHistory = _browserHistory3['default']; - - var _hashHistory2 = __webpack_require__(44); - - var _hashHistory3 = _interopRequireDefault(_hashHistory2); - - exports.hashHistory = _hashHistory3['default']; - - var _createMemoryHistory2 = __webpack_require__(21); - - var _createMemoryHistory3 = _interopRequireDefault(_createMemoryHistory2); - - exports.createMemoryHistory = _createMemoryHistory3['default']; - -/***/ }, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports['default'] = routerWarning; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _warning = __webpack_require__(4); - - var _warning2 = _interopRequireDefault(_warning); - - function routerWarning(falseToWarn, message) { - message = '[react-router] ' + message; - - for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - args[_key - 2] = arguments[_key]; - } - - false ? _warning2['default'].apply(undefined, [falseToWarn, message].concat(args)) : undefined; - } - - module.exports = exports['default']; - -/***/ }, -/* 2 */ -/***/ function(module, exports) { - - module.exports = __WEBPACK_EXTERNAL_MODULE_2__; - -/***/ }, -/* 3 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - 'use strict'; - - /** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ - - var invariant = function(condition, format, a, b, c, d, e, f) { - if (false) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } - - if (!condition) { - var error; - if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' - ); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error( - format.replace(/%s/g, function() { return args[argIndex++]; }) - ); - error.name = 'Invariant Violation'; - } - - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } - }; - - module.exports = invariant; - - -/***/ }, -/* 4 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2014-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - 'use strict'; - - /** - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - - var warning = function() {}; - - if (false) { - warning = function(condition, format, args) { - var len = arguments.length; - args = new Array(len > 2 ? len - 2 : 0); - for (var key = 2; key < len; key++) { - args[key - 2] = arguments[key]; - } - if (format === undefined) { - throw new Error( - '`warning(condition, format, ...args)` requires a warning ' + - 'message argument' - ); - } - - if (format.length < 10 || (/^[s\W]*$/).test(format)) { - throw new Error( - 'The warning format should be able to uniquely identify this ' + - 'warning. Please, use a more descriptive format than: ' + format - ); - } - - if (!condition) { - var argIndex = 0; - var message = 'Warning: ' + - format.replace(/%s/g, function() { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch(x) {} - } - }; - } - - module.exports = warning; - - -/***/ }, -/* 5 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - exports.isReactChildren = isReactChildren; - exports.createRouteFromReactElement = createRouteFromReactElement; - exports.createRoutesFromReactChildren = createRoutesFromReactChildren; - exports.createRoutes = createRoutes; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _react = __webpack_require__(2); - - var _react2 = _interopRequireDefault(_react); - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - function isValidChild(object) { - return object == null || _react2['default'].isValidElement(object); - } - - function isReactChildren(object) { - return isValidChild(object) || Array.isArray(object) && object.every(isValidChild); - } - - function checkPropTypes(componentName, propTypes, props) { - componentName = componentName || 'UnknownComponent'; - - for (var propName in propTypes) { - if (propTypes.hasOwnProperty(propName)) { - var error = propTypes[propName](props, propName, componentName); - - /* istanbul ignore if: error logging */ - if (error instanceof Error) false ? _routerWarning2['default'](false, error.message) : undefined; - } - } - } - - function createRoute(defaultProps, props) { - return _extends({}, defaultProps, props); - } - - function createRouteFromReactElement(element) { - var type = element.type; - var route = createRoute(type.defaultProps, element.props); - - if (type.propTypes) checkPropTypes(type.displayName || type.name, type.propTypes, route); - - if (route.children) { - var childRoutes = createRoutesFromReactChildren(route.children, route); - - if (childRoutes.length) route.childRoutes = childRoutes; - - delete route.children; - } - - return route; - } - - /** - * Creates and returns a routes object from the given ReactChildren. JSX - * provides a convenient way to visualize how routes in the hierarchy are - * nested. - * - * import { Route, createRoutesFromReactChildren } from 'react-router' - * - * const routes = createRoutesFromReactChildren( - * - * - * - * - * ) - * - * Note: This method is automatically used when you provide children - * to a component. - */ - - function createRoutesFromReactChildren(children, parentRoute) { - var routes = []; - - _react2['default'].Children.forEach(children, function (element) { - if (_react2['default'].isValidElement(element)) { - // Component classes may have a static create* method. - if (element.type.createRouteFromReactElement) { - var route = element.type.createRouteFromReactElement(element, parentRoute); - - if (route) routes.push(route); - } else { - routes.push(createRouteFromReactElement(element)); - } - } - }); - - return routes; - } - - /** - * Creates and returns an array of routes from the given object which - * may be a JSX route, a plain object route, or an array of either. - */ - - function createRoutes(routes) { - if (isReactChildren(routes)) { - routes = createRoutesFromReactChildren(routes); - } else if (routes && !Array.isArray(routes)) { - routes = [routes]; - } - - return routes; - } - -/***/ }, -/* 6 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports.falsy = falsy; - - var _react = __webpack_require__(2); - - var func = _react.PropTypes.func; - var object = _react.PropTypes.object; - var arrayOf = _react.PropTypes.arrayOf; - var oneOfType = _react.PropTypes.oneOfType; - var element = _react.PropTypes.element; - var shape = _react.PropTypes.shape; - var string = _react.PropTypes.string; - - function falsy(props, propName, componentName) { - if (props[propName]) return new Error('<' + componentName + '> should not have a "' + propName + '" prop'); - } - - var history = shape({ - listen: func.isRequired, - pushState: func.isRequired, - replaceState: func.isRequired, - go: func.isRequired - }); - - exports.history = history; - var location = shape({ - pathname: string.isRequired, - search: string.isRequired, - state: object, - action: string.isRequired, - key: string - }); - - exports.location = location; - var component = oneOfType([func, string]); - exports.component = component; - var components = oneOfType([component, object]); - exports.components = components; - var route = oneOfType([object, element]); - exports.route = route; - var routes = oneOfType([route, arrayOf(route)]); - - exports.routes = routes; - exports['default'] = { - falsy: falsy, - history: history, - location: location, - component: component, - components: components, - route: route - }; - -/***/ }, -/* 7 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports.extractPath = extractPath; - exports.parsePath = parsePath; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _warning = __webpack_require__(4); - - var _warning2 = _interopRequireDefault(_warning); - - function extractPath(string) { - var match = string.match(/^https?:\/\/[^\/]*/); - - if (match == null) return string; - - return string.substring(match[0].length); - } - - function parsePath(path) { - var pathname = extractPath(path); - var search = ''; - var hash = ''; - - false ? _warning2['default'](path === pathname, 'A path must be pathname + search + hash only, not a fully qualified URL like "%s"', path) : undefined; - - var hashIndex = pathname.indexOf('#'); - if (hashIndex !== -1) { - hash = pathname.substring(hashIndex); - pathname = pathname.substring(0, hashIndex); - } - - var searchIndex = pathname.indexOf('?'); - if (searchIndex !== -1) { - search = pathname.substring(searchIndex); - pathname = pathname.substring(0, searchIndex); - } - - if (pathname === '') pathname = '/'; - - return { - pathname: pathname, - search: search, - hash: hash - }; - } - -/***/ }, -/* 8 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports.compilePattern = compilePattern; - exports.matchPattern = matchPattern; - exports.getParamNames = getParamNames; - exports.getParams = getParams; - exports.formatPattern = formatPattern; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _invariant = __webpack_require__(3); - - var _invariant2 = _interopRequireDefault(_invariant); - - function escapeRegExp(string) { - return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); - } - - function escapeSource(string) { - return escapeRegExp(string).replace(/\/+/g, '/+'); - } - - function _compilePattern(pattern) { - var regexpSource = ''; - var paramNames = []; - var tokens = []; - - var match = undefined, - lastIndex = 0, - matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g; - while (match = matcher.exec(pattern)) { - if (match.index !== lastIndex) { - tokens.push(pattern.slice(lastIndex, match.index)); - regexpSource += escapeSource(pattern.slice(lastIndex, match.index)); - } - - if (match[1]) { - regexpSource += '([^/?#]+)'; - paramNames.push(match[1]); - } else if (match[0] === '**') { - regexpSource += '([\\s\\S]*)'; - paramNames.push('splat'); - } else if (match[0] === '*') { - regexpSource += '([\\s\\S]*?)'; - paramNames.push('splat'); - } else if (match[0] === '(') { - regexpSource += '(?:'; - } else if (match[0] === ')') { - regexpSource += ')?'; - } - - tokens.push(match[0]); - - lastIndex = matcher.lastIndex; - } - - if (lastIndex !== pattern.length) { - tokens.push(pattern.slice(lastIndex, pattern.length)); - regexpSource += escapeSource(pattern.slice(lastIndex, pattern.length)); - } - - return { - pattern: pattern, - regexpSource: regexpSource, - paramNames: paramNames, - tokens: tokens - }; - } - - var CompiledPatternsCache = {}; - - function compilePattern(pattern) { - if (!(pattern in CompiledPatternsCache)) CompiledPatternsCache[pattern] = _compilePattern(pattern); - - return CompiledPatternsCache[pattern]; - } - - /** - * Attempts to match a pattern on the given pathname. Patterns may use - * the following special characters: - * - * - :paramName Matches a URL segment up to the next /, ?, or #. The - * captured string is considered a "param" - * - () Wraps a segment of the URL that is optional - * - * Consumes (non-greedy) all characters up to the next - * character in the pattern, or to the end of the URL if - * there is none - * - ** Consumes (greedy) all characters up to the next character - * in the pattern, or to the end of the URL if there is none - * - * The return value is an object with the following properties: - * - * - remainingPathname - * - paramNames - * - paramValues - */ - - function matchPattern(pattern, pathname) { - // Make leading slashes consistent between pattern and pathname. - if (pattern.charAt(0) !== '/') { - pattern = '/' + pattern; - } - if (pathname.charAt(0) !== '/') { - pathname = '/' + pathname; - } - - var _compilePattern2 = compilePattern(pattern); - - var regexpSource = _compilePattern2.regexpSource; - var paramNames = _compilePattern2.paramNames; - var tokens = _compilePattern2.tokens; - - regexpSource += '/*'; // Capture path separators - - // Special-case patterns like '*' for catch-all routes. - var captureRemaining = tokens[tokens.length - 1] !== '*'; - - if (captureRemaining) { - // This will match newlines in the remaining path. - regexpSource += '([\\s\\S]*?)'; - } - - var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i')); - - var remainingPathname = undefined, - paramValues = undefined; - if (match != null) { - if (captureRemaining) { - remainingPathname = match.pop(); - var matchedPath = match[0].substr(0, match[0].length - remainingPathname.length); - - // If we didn't match the entire pathname, then make sure that the match - // we did get ends at a path separator (potentially the one we added - // above at the beginning of the path, if the actual match was empty). - if (remainingPathname && matchedPath.charAt(matchedPath.length - 1) !== '/') { - return { - remainingPathname: null, - paramNames: paramNames, - paramValues: null - }; - } - } else { - // If this matched at all, then the match was the entire pathname. - remainingPathname = ''; - } - - paramValues = match.slice(1).map(function (v) { - return v != null ? decodeURIComponent(v) : v; - }); - } else { - remainingPathname = paramValues = null; - } - - return { - remainingPathname: remainingPathname, - paramNames: paramNames, - paramValues: paramValues - }; - } - - function getParamNames(pattern) { - return compilePattern(pattern).paramNames; - } - - function getParams(pattern, pathname) { - var _matchPattern = matchPattern(pattern, pathname); - - var paramNames = _matchPattern.paramNames; - var paramValues = _matchPattern.paramValues; - - if (paramValues != null) { - return paramNames.reduce(function (memo, paramName, index) { - memo[paramName] = paramValues[index]; - return memo; - }, {}); - } - - return null; - } - - /** - * Returns a version of the given pattern with params interpolated. Throws - * if there is a dynamic segment of the pattern for which there is no param. - */ - - function formatPattern(pattern, params) { - params = params || {}; - - var _compilePattern3 = compilePattern(pattern); - - var tokens = _compilePattern3.tokens; - - var parenCount = 0, - pathname = '', - splatIndex = 0; - - var token = undefined, - paramName = undefined, - paramValue = undefined; - for (var i = 0, len = tokens.length; i < len; ++i) { - token = tokens[i]; - - if (token === '*' || token === '**') { - paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat; - - !(paramValue != null || parenCount > 0) ? false ? _invariant2['default'](false, 'Missing splat #%s for path "%s"', splatIndex, pattern) : _invariant2['default'](false) : undefined; - - if (paramValue != null) pathname += encodeURI(paramValue); - } else if (token === '(') { - parenCount += 1; - } else if (token === ')') { - parenCount -= 1; - } else if (token.charAt(0) === ':') { - paramName = token.substring(1); - paramValue = params[paramName]; - - !(paramValue != null || parenCount > 0) ? false ? _invariant2['default'](false, 'Missing "%s" parameter for path "%s"', paramName, pattern) : _invariant2['default'](false) : undefined; - - if (paramValue != null) pathname += encodeURIComponent(paramValue); - } else { - pathname += token; - } - } - - return pathname.replace(/\/+/g, '/'); - } - -/***/ }, -/* 9 */ -/***/ function(module, exports) { - - /** - * Indicates that navigation was caused by a call to history.push. - */ - 'use strict'; - - exports.__esModule = true; - var PUSH = 'PUSH'; - - exports.PUSH = PUSH; - /** - * Indicates that navigation was caused by a call to history.replace. - */ - var REPLACE = 'REPLACE'; - - exports.REPLACE = REPLACE; - /** - * Indicates that navigation was caused by some other action such - * as using a browser's back/forward buttons and/or manually manipulating - * the URL in a browser's location bar. This is the default. - * - * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate - * for more information. - */ - var POP = 'POP'; - - exports.POP = POP; - exports['default'] = { - PUSH: PUSH, - REPLACE: REPLACE, - POP: POP - }; - -/***/ }, -/* 10 */ -/***/ function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); - exports.canUseDOM = canUseDOM; - -/***/ }, -/* 11 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - - var _warning = __webpack_require__(4); - - var _warning2 = _interopRequireDefault(_warning); - - var _queryString = __webpack_require__(56); - - var _runTransitionHook = __webpack_require__(17); - - var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); - - var _PathUtils = __webpack_require__(7); - - var _deprecate = __webpack_require__(16); - - var _deprecate2 = _interopRequireDefault(_deprecate); - - var SEARCH_BASE_KEY = '$searchBase'; - - function defaultStringifyQuery(query) { - return _queryString.stringify(query).replace(/%20/g, '+'); - } - - var defaultParseQueryString = _queryString.parse; - - function isNestedObject(object) { - for (var p in object) { - if (object.hasOwnProperty(p) && typeof object[p] === 'object' && !Array.isArray(object[p]) && object[p] !== null) return true; - }return false; - } - - /** - * Returns a new createHistory function that may be used to create - * history objects that know how to handle URL queries. - */ - function useQueries(createHistory) { - return function () { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - var stringifyQuery = options.stringifyQuery; - var parseQueryString = options.parseQueryString; - - var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']); - - var history = createHistory(historyOptions); - - if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; - - if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString; - - function addQuery(location) { - if (location.query == null) { - var search = location.search; - - location.query = parseQueryString(search.substring(1)); - location[SEARCH_BASE_KEY] = { search: search, searchBase: '' }; - } - - // TODO: Instead of all the book-keeping here, this should just strip the - // stringified query from the search. - - return location; - } - - function appendQuery(location, query) { - var _extends2; - - var searchBaseSpec = location[SEARCH_BASE_KEY]; - var queryString = query ? stringifyQuery(query) : ''; - if (!searchBaseSpec && !queryString) { - return location; - } - - false ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined; - - if (typeof location === 'string') location = _PathUtils.parsePath(location); - - var searchBase = undefined; - if (searchBaseSpec && location.search === searchBaseSpec.search) { - searchBase = searchBaseSpec.searchBase; - } else { - searchBase = location.search || ''; - } - - var search = searchBase; - if (queryString) { - search += (search ? '&' : '?') + queryString; - } - - return _extends({}, location, (_extends2 = { - search: search - }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2)); - } - - // Override all read methods with query-aware versions. - function listenBefore(hook) { - return history.listenBefore(function (location, callback) { - _runTransitionHook2['default'](hook, addQuery(location), callback); - }); - } - - function listen(listener) { - return history.listen(function (location) { - listener(addQuery(location)); - }); - } - - // Override all write methods with query-aware versions. - function push(location) { - history.push(appendQuery(location, location.query)); - } - - function replace(location) { - history.replace(appendQuery(location, location.query)); - } - - function createPath(location, query) { - false ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined; - - return history.createPath(appendQuery(location, query || location.query)); - } - - function createHref(location, query) { - false ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined; - - return history.createHref(appendQuery(location, query || location.query)); - } - - function createLocation(location) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args)); - if (location.query) { - fullLocation.query = location.query; - } - return addQuery(fullLocation); - } - - // deprecated - function pushState(state, path, query) { - if (typeof path === 'string') path = _PathUtils.parsePath(path); - - push(_extends({ state: state }, path, { query: query })); - } - - // deprecated - function replaceState(state, path, query) { - if (typeof path === 'string') path = _PathUtils.parsePath(path); - - replace(_extends({ state: state }, path, { query: query })); - } - - return _extends({}, history, { - listenBefore: listenBefore, - listen: listen, - push: push, - replace: replace, - createPath: createPath, - createHref: createHref, - createLocation: createLocation, - - pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'), - replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead') - }); - }; - } - - exports['default'] = useQueries; - module.exports = exports['default']; - -/***/ }, -/* 12 */ -/***/ function(module, exports) { - - "use strict"; - - exports.__esModule = true; - var _slice = Array.prototype.slice; - exports.loopAsync = loopAsync; - exports.mapAsync = mapAsync; - - function loopAsync(turns, work, callback) { - var currentTurn = 0, - isDone = false; - var sync = false, - hasNext = false, - doneArgs = undefined; - - function done() { - isDone = true; - if (sync) { - // Iterate instead of recursing if possible. - doneArgs = [].concat(_slice.call(arguments)); - return; - } - - callback.apply(this, arguments); - } - - function next() { - if (isDone) { - return; - } - - hasNext = true; - if (sync) { - // Iterate instead of recursing if possible. - return; - } - - sync = true; - - while (!isDone && currentTurn < turns && hasNext) { - hasNext = false; - work.call(this, currentTurn++, next, done); - } - - sync = false; - - if (isDone) { - // This means the loop finished synchronously. - callback.apply(this, doneArgs); - return; - } - - if (currentTurn >= turns && hasNext) { - isDone = true; - callback(); - } - } - - next(); - } - - function mapAsync(array, work, callback) { - var length = array.length; - var values = []; - - if (length === 0) return callback(null, values); - - var isDone = false, - doneCount = 0; - - function done(index, error, value) { - if (isDone) return; - - if (error) { - isDone = true; - callback(error); - } else { - values[index] = value; - - isDone = ++doneCount === length; - - if (isDone) callback(null, values); - } - } - - array.forEach(function (item, index) { - work(item, index, function (error, value) { - done(index, error, value); - }); - }); - } - -/***/ }, -/* 13 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _invariant = __webpack_require__(3); - - var _invariant2 = _interopRequireDefault(_invariant); - - var _react = __webpack_require__(2); - - var _react2 = _interopRequireDefault(_react); - - var _deprecateObjectProperties = __webpack_require__(23); - - var _deprecateObjectProperties2 = _interopRequireDefault(_deprecateObjectProperties); - - var _getRouteParams = __webpack_require__(43); - - var _getRouteParams2 = _interopRequireDefault(_getRouteParams); - - var _RouteUtils = __webpack_require__(5); - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - var _React$PropTypes = _react2['default'].PropTypes; - var array = _React$PropTypes.array; - var func = _React$PropTypes.func; - var object = _React$PropTypes.object; - - /** - * A renders the component tree for a given router state - * and sets the history object and the current location in context. - */ - var RouterContext = _react2['default'].createClass({ - displayName: 'RouterContext', - - propTypes: { - history: object, - router: object.isRequired, - location: object.isRequired, - routes: array.isRequired, - params: object.isRequired, - components: array.isRequired, - createElement: func.isRequired - }, - - getDefaultProps: function getDefaultProps() { - return { - createElement: _react2['default'].createElement - }; - }, - - childContextTypes: { - history: object, - location: object.isRequired, - router: object.isRequired - }, - - getChildContext: function getChildContext() { - var _props = this.props; - var router = _props.router; - var history = _props.history; - var location = _props.location; - - if (!router) { - false ? _routerWarning2['default'](false, '`` expects a `router` rather than a `history`') : undefined; - - router = _extends({}, history, { - setRouteLeaveHook: history.listenBeforeLeavingRoute - }); - delete router.listenBeforeLeavingRoute; - } - - if (false) { - location = _deprecateObjectProperties2['default'](location, '`context.location` is deprecated, please use a route component\'s `props.location` instead. http://tiny.cc/router-accessinglocation'); - } - - return { history: history, location: location, router: router }; - }, - - createElement: function createElement(component, props) { - return component == null ? null : this.props.createElement(component, props); - }, - - render: function render() { - var _this = this; - - var _props2 = this.props; - var history = _props2.history; - var location = _props2.location; - var routes = _props2.routes; - var params = _props2.params; - var components = _props2.components; - - var element = null; - - if (components) { - element = components.reduceRight(function (element, components, index) { - if (components == null) return element; // Don't create new children; use the grandchildren. - - var route = routes[index]; - var routeParams = _getRouteParams2['default'](route, params); - var props = { - history: history, - location: location, - params: params, - route: route, - routeParams: routeParams, - routes: routes - }; - - if (_RouteUtils.isReactChildren(element)) { - props.children = element; - } else if (element) { - for (var prop in element) { - if (element.hasOwnProperty(prop)) props[prop] = element[prop]; - } - } - - if (typeof components === 'object') { - var elements = {}; - - for (var key in components) { - if (components.hasOwnProperty(key)) { - // Pass through the key as a prop to createElement to allow - // custom createElement functions to know which named component - // they're rendering, for e.g. matching up to fetched data. - elements[key] = _this.createElement(components[key], _extends({ - key: key }, props)); - } - } - - return elements; - } - - return _this.createElement(components, props); - }, element); - } - - !(element === null || element === false || _react2['default'].isValidElement(element)) ? false ? _invariant2['default'](false, 'The root route must render a single element') : _invariant2['default'](false) : undefined; - - return element; - } - - }); - - exports['default'] = RouterContext; - module.exports = exports['default']; - -/***/ }, -/* 14 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - exports['default'] = createTransitionManager; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - var _historyLibActions = __webpack_require__(9); - - var _computeChangedRoutes2 = __webpack_require__(41); - - var _computeChangedRoutes3 = _interopRequireDefault(_computeChangedRoutes2); - - var _TransitionUtils = __webpack_require__(39); - - var _isActive2 = __webpack_require__(45); - - var _isActive3 = _interopRequireDefault(_isActive2); - - var _getComponents = __webpack_require__(42); - - var _getComponents2 = _interopRequireDefault(_getComponents); - - var _matchRoutes = __webpack_require__(47); - - var _matchRoutes2 = _interopRequireDefault(_matchRoutes); - - function hasAnyProperties(object) { - for (var p in object) { - if (object.hasOwnProperty(p)) return true; - }return false; - } - - function createTransitionManager(history, routes) { - var state = {}; - - // Signature should be (location, indexOnly), but needs to support (path, - // query, indexOnly) - function isActive(location) { - var indexOnlyOrDeprecatedQuery = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; - var deprecatedIndexOnly = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2]; - - var indexOnly = undefined; - if (indexOnlyOrDeprecatedQuery && indexOnlyOrDeprecatedQuery !== true || deprecatedIndexOnly !== null) { - false ? _routerWarning2['default'](false, '`isActive(pathname, query, indexOnly) is deprecated; use `isActive(location, indexOnly)` with a location descriptor instead. http://tiny.cc/router-isActivedeprecated') : undefined; - location = { pathname: location, query: indexOnlyOrDeprecatedQuery }; - indexOnly = deprecatedIndexOnly || false; - } else { - location = history.createLocation(location); - indexOnly = indexOnlyOrDeprecatedQuery; - } - - return _isActive3['default'](location, indexOnly, state.location, state.routes, state.params); - } - - function createLocationFromRedirectInfo(location) { - return history.createLocation(location, _historyLibActions.REPLACE); - } - - var partialNextState = undefined; - - function match(location, callback) { - if (partialNextState && partialNextState.location === location) { - // Continue from where we left off. - finishMatch(partialNextState, callback); - } else { - _matchRoutes2['default'](routes, location, function (error, nextState) { - if (error) { - callback(error); - } else if (nextState) { - finishMatch(_extends({}, nextState, { location: location }), callback); - } else { - callback(); - } - }); - } - } - - function finishMatch(nextState, callback) { - var _computeChangedRoutes = _computeChangedRoutes3['default'](state, nextState); - - var leaveRoutes = _computeChangedRoutes.leaveRoutes; - var enterRoutes = _computeChangedRoutes.enterRoutes; - - _TransitionUtils.runLeaveHooks(leaveRoutes); - - // Tear down confirmation hooks for left routes - leaveRoutes.filter(function (route) { - return enterRoutes.indexOf(route) === -1; - }).forEach(removeListenBeforeHooksForRoute); - - _TransitionUtils.runEnterHooks(enterRoutes, nextState, function (error, redirectInfo) { - if (error) { - callback(error); - } else if (redirectInfo) { - callback(null, createLocationFromRedirectInfo(redirectInfo)); - } else { - // TODO: Fetch components after state is updated. - _getComponents2['default'](nextState, function (error, components) { - if (error) { - callback(error); - } else { - // TODO: Make match a pure function and have some other API - // for "match and update state". - callback(null, null, state = _extends({}, nextState, { components: components })); - } - }); - } - }); - } - - var RouteGuid = 1; - - function getRouteID(route) { - var create = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; - - return route.__id__ || create && (route.__id__ = RouteGuid++); - } - - var RouteHooks = {}; - - function getRouteHooksForRoutes(routes) { - return routes.reduce(function (hooks, route) { - hooks.push.apply(hooks, RouteHooks[getRouteID(route)]); - return hooks; - }, []); - } - - function transitionHook(location, callback) { - _matchRoutes2['default'](routes, location, function (error, nextState) { - if (nextState == null) { - // TODO: We didn't actually match anything, but hang - // onto error/nextState so we don't have to matchRoutes - // again in the listen callback. - callback(); - return; - } - - // Cache some state here so we don't have to - // matchRoutes() again in the listen callback. - partialNextState = _extends({}, nextState, { location: location }); - - var hooks = getRouteHooksForRoutes(_computeChangedRoutes3['default'](state, partialNextState).leaveRoutes); - - var result = undefined; - for (var i = 0, len = hooks.length; result == null && i < len; ++i) { - // Passing the location arg here indicates to - // the user that this is a transition hook. - result = hooks[i](location); - } - - callback(result); - }); - } - - /* istanbul ignore next: untestable with Karma */ - function beforeUnloadHook() { - // Synchronously check to see if any route hooks want - // to prevent the current window/tab from closing. - if (state.routes) { - var hooks = getRouteHooksForRoutes(state.routes); - - var message = undefined; - for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) { - // Passing no args indicates to the user that this is a - // beforeunload hook. We don't know the next location. - message = hooks[i](); - } - - return message; - } - } - - var unlistenBefore = undefined, - unlistenBeforeUnload = undefined; - - function removeListenBeforeHooksForRoute(route) { - var routeID = getRouteID(route, false); - if (!routeID) { - return; - } - - delete RouteHooks[routeID]; - - if (!hasAnyProperties(RouteHooks)) { - // teardown transition & beforeunload hooks - if (unlistenBefore) { - unlistenBefore(); - unlistenBefore = null; - } - - if (unlistenBeforeUnload) { - unlistenBeforeUnload(); - unlistenBeforeUnload = null; - } - } - } - - /** - * Registers the given hook function to run before leaving the given route. - * - * During a normal transition, the hook function receives the next location - * as its only argument and must return either a) a prompt message to show - * the user, to make sure they want to leave the page or b) false, to prevent - * the transition. - * - * During the beforeunload event (in browsers) the hook receives no arguments. - * In this case it must return a prompt message to prevent the transition. - * - * Returns a function that may be used to unbind the listener. - */ - function listenBeforeLeavingRoute(route, hook) { - // TODO: Warn if they register for a route that isn't currently - // active. They're probably doing something wrong, like re-creating - // route objects on every location change. - var routeID = getRouteID(route); - var hooks = RouteHooks[routeID]; - - if (!hooks) { - var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks); - - RouteHooks[routeID] = [hook]; - - if (thereWereNoRouteHooks) { - // setup transition & beforeunload hooks - unlistenBefore = history.listenBefore(transitionHook); - - if (history.listenBeforeUnload) unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook); - } - } else { - if (hooks.indexOf(hook) === -1) { - false ? _routerWarning2['default'](false, 'adding multiple leave hooks for the same route is deprecated; manage multiple confirmations in your own code instead') : undefined; - - hooks.push(hook); - } - } - - return function () { - var hooks = RouteHooks[routeID]; - - if (hooks) { - var newHooks = hooks.filter(function (item) { - return item !== hook; - }); - - if (newHooks.length === 0) { - removeListenBeforeHooksForRoute(route); - } else { - RouteHooks[routeID] = newHooks; - } - } - }; - } - - /** - * This is the API for stateful environments. As the location - * changes, we update state and call the listener. We can also - * gracefully handle errors and redirects. - */ - function listen(listener) { - // TODO: Only use a single history listener. Otherwise we'll - // end up with multiple concurrent calls to match. - return history.listen(function (location) { - if (state.location === location) { - listener(null, state); - } else { - match(location, function (error, redirectLocation, nextState) { - if (error) { - listener(error); - } else if (redirectLocation) { - history.transitionTo(redirectLocation); - } else if (nextState) { - listener(null, nextState); - } else { - false ? _routerWarning2['default'](false, 'Location "%s" did not match any routes', location.pathname + location.search + location.hash) : undefined; - } - }); - } - }); - } - - return { - isActive: isActive, - match: match, - listenBeforeLeavingRoute: listenBeforeLeavingRoute, - listen: listen - }; - } - - //export default useRoutes - module.exports = exports['default']; - -/***/ }, -/* 15 */ -/***/ function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - exports.addEventListener = addEventListener; - exports.removeEventListener = removeEventListener; - exports.getHashPath = getHashPath; - exports.replaceHashPath = replaceHashPath; - exports.getWindowPath = getWindowPath; - exports.go = go; - exports.getUserConfirmation = getUserConfirmation; - exports.supportsHistory = supportsHistory; - exports.supportsGoWithoutReloadUsingHash = supportsGoWithoutReloadUsingHash; - - function addEventListener(node, event, listener) { - if (node.addEventListener) { - node.addEventListener(event, listener, false); - } else { - node.attachEvent('on' + event, listener); - } - } - - function removeEventListener(node, event, listener) { - if (node.removeEventListener) { - node.removeEventListener(event, listener, false); - } else { - node.detachEvent('on' + event, listener); - } - } - - function getHashPath() { - // We can't use window.location.hash here because it's not - // consistent across browsers - Firefox will pre-decode it! - return window.location.href.split('#')[1] || ''; - } - - function replaceHashPath(path) { - window.location.replace(window.location.pathname + window.location.search + '#' + path); - } - - function getWindowPath() { - return window.location.pathname + window.location.search + window.location.hash; - } - - function go(n) { - if (n) window.history.go(n); - } - - function getUserConfirmation(message, callback) { - callback(window.confirm(message)); - } - - /** - * Returns true if the HTML5 history API is supported. Taken from Modernizr. - * - * https://github.com/Modernizr/Modernizr/blob/master/LICENSE - * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js - * changed to avoid false negatives for Windows Phones: https://github.com/rackt/react-router/issues/586 - */ - - function supportsHistory() { - var ua = navigator.userAgent; - if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) { - return false; - } - return window.history && 'pushState' in window.history; - } - - /** - * Returns false if using go(n) with hash history causes a full page reload. - */ - - function supportsGoWithoutReloadUsingHash() { - var ua = navigator.userAgent; - return ua.indexOf('Firefox') === -1; - } - -/***/ }, -/* 16 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _warning = __webpack_require__(4); - - var _warning2 = _interopRequireDefault(_warning); - - function deprecate(fn, message) { - return function () { - false ? _warning2['default'](false, '[history] ' + message) : undefined; - return fn.apply(this, arguments); - }; - } - - exports['default'] = deprecate; - module.exports = exports['default']; - -/***/ }, -/* 17 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _warning = __webpack_require__(4); - - var _warning2 = _interopRequireDefault(_warning); - - function runTransitionHook(hook, location, callback) { - var result = hook(location, callback); - - if (hook.length < 2) { - // Assume the hook runs synchronously and automatically - // call the callback with the return value. - callback(result); - } else { - false ? _warning2['default'](result === undefined, 'You should not "return" in a transition hook with a callback argument; call the callback instead') : undefined; - } - } - - exports['default'] = runTransitionHook; - module.exports = exports['default']; - -/***/ }, -/* 18 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - - var _react = __webpack_require__(2); - - var _react2 = _interopRequireDefault(_react); - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - var _React$PropTypes = _react2['default'].PropTypes; - var bool = _React$PropTypes.bool; - var object = _React$PropTypes.object; - var string = _React$PropTypes.string; - var func = _React$PropTypes.func; - var oneOfType = _React$PropTypes.oneOfType; - - function isLeftClickEvent(event) { - return event.button === 0; - } - - function isModifiedEvent(event) { - return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); - } - - function isEmptyObject(object) { - for (var p in object) { - if (object.hasOwnProperty(p)) return false; - }return true; - } - - function createLocationDescriptor(to, _ref) { - var query = _ref.query; - var hash = _ref.hash; - var state = _ref.state; - - if (query || hash || state) { - return { pathname: to, query: query, hash: hash, state: state }; - } - - return to; - } - - /** - * A is used to create an element that links to a route. - * When that route is active, the link gets the value of its - * activeClassName prop. - * - * For example, assuming you have the following route: - * - * - * - * You could use the following component to link to that route: - * - * - * - * Links may pass along location state and/or query string parameters - * in the state/query props, respectively. - * - * - */ - var Link = _react2['default'].createClass({ - displayName: 'Link', - - contextTypes: { - router: object - }, - - propTypes: { - to: oneOfType([string, object]).isRequired, - query: object, - hash: string, - state: object, - activeStyle: object, - activeClassName: string, - onlyActiveOnIndex: bool.isRequired, - onClick: func - }, - - getDefaultProps: function getDefaultProps() { - return { - onlyActiveOnIndex: false, - className: '', - style: {} - }; - }, - - handleClick: function handleClick(event) { - var allowTransition = true; - - if (this.props.onClick) this.props.onClick(event); - - if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; - - if (event.defaultPrevented === true) allowTransition = false; - - // If target prop is set (e.g. to "_blank") let browser handle link. - /* istanbul ignore if: untestable with Karma */ - if (this.props.target) { - if (!allowTransition) event.preventDefault(); - - return; - } - - event.preventDefault(); - - if (allowTransition) { - var _props = this.props; - var to = _props.to; - var query = _props.query; - var hash = _props.hash; - var state = _props.state; - - var _location = createLocationDescriptor(to, { query: query, hash: hash, state: state }); - - this.context.router.push(_location); - } - }, - - render: function render() { - var _props2 = this.props; - var to = _props2.to; - var query = _props2.query; - var hash = _props2.hash; - var state = _props2.state; - var activeClassName = _props2.activeClassName; - var activeStyle = _props2.activeStyle; - var onlyActiveOnIndex = _props2.onlyActiveOnIndex; - - var props = _objectWithoutProperties(_props2, ['to', 'query', 'hash', 'state', 'activeClassName', 'activeStyle', 'onlyActiveOnIndex']); - - false ? _routerWarning2['default'](!(query || hash || state), 'the `query`, `hash`, and `state` props on `` are deprecated, use `. http://tiny.cc/router-isActivedeprecated') : undefined; - - // Ignore if rendered outside the context of router, simplifies unit testing. - var router = this.context.router; - - if (router) { - var _location2 = createLocationDescriptor(to, { query: query, hash: hash, state: state }); - props.href = router.createHref(_location2); - - if (activeClassName || activeStyle != null && !isEmptyObject(activeStyle)) { - if (router.isActive(_location2, onlyActiveOnIndex)) { - if (activeClassName) props.className += props.className === '' ? activeClassName : ' ' + activeClassName; - - if (activeStyle) props.style = _extends({}, props.style, activeStyle); - } - } - } - - return _react2['default'].createElement('a', _extends({}, props, { onClick: this.handleClick })); - } - - }); - - exports['default'] = Link; - module.exports = exports['default']; - -/***/ }, -/* 19 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _react = __webpack_require__(2); - - var _react2 = _interopRequireDefault(_react); - - var _invariant = __webpack_require__(3); - - var _invariant2 = _interopRequireDefault(_invariant); - - var _RouteUtils = __webpack_require__(5); - - var _PatternUtils = __webpack_require__(8); - - var _PropTypes = __webpack_require__(6); - - var _React$PropTypes = _react2['default'].PropTypes; - var string = _React$PropTypes.string; - var object = _React$PropTypes.object; - - /** - * A is used to declare another URL path a client should - * be sent to when they request a given URL. - * - * Redirects are placed alongside routes in the route configuration - * and are traversed in the same manner. - */ - var Redirect = _react2['default'].createClass({ - displayName: 'Redirect', - - statics: { - - createRouteFromReactElement: function createRouteFromReactElement(element) { - var route = _RouteUtils.createRouteFromReactElement(element); - - if (route.from) route.path = route.from; - - route.onEnter = function (nextState, replace) { - var location = nextState.location; - var params = nextState.params; - - var pathname = undefined; - if (route.to.charAt(0) === '/') { - pathname = _PatternUtils.formatPattern(route.to, params); - } else if (!route.to) { - pathname = location.pathname; - } else { - var routeIndex = nextState.routes.indexOf(route); - var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); - var pattern = parentPattern.replace(/\/*$/, '/') + route.to; - pathname = _PatternUtils.formatPattern(pattern, params); - } - - replace({ - pathname: pathname, - query: route.query || location.query, - state: route.state || location.state - }); - }; - - return route; - }, - - getRoutePattern: function getRoutePattern(routes, routeIndex) { - var parentPattern = ''; - - for (var i = routeIndex; i >= 0; i--) { - var route = routes[i]; - var pattern = route.path || ''; - - parentPattern = pattern.replace(/\/*$/, '/') + parentPattern; - - if (pattern.indexOf('/') === 0) break; - } - - return '/' + parentPattern; - } - - }, - - propTypes: { - path: string, - from: string, // Alias for path - to: string.isRequired, - query: object, - state: object, - onEnter: _PropTypes.falsy, - children: _PropTypes.falsy - }, - - /* istanbul ignore next: sanity check */ - render: function render() { - true ? false ? _invariant2['default'](false, ' elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined; - } - - }); - - exports['default'] = Redirect; - module.exports = exports['default']; - -/***/ }, -/* 20 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - exports.createRouterObject = createRouterObject; - exports.createRoutingHistory = createRoutingHistory; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _deprecateObjectProperties = __webpack_require__(23); - - var _deprecateObjectProperties2 = _interopRequireDefault(_deprecateObjectProperties); - - function createRouterObject(history, transitionManager) { - return _extends({}, history, { - setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute, - isActive: transitionManager.isActive - }); - } - - // deprecated - - function createRoutingHistory(history, transitionManager) { - history = _extends({}, history, transitionManager); - - if (false) { - history = _deprecateObjectProperties2['default'](history, '`props.history` and `context.history` are deprecated. Please use `context.router`. http://tiny.cc/router-contextchanges'); - } - - return history; - } - -/***/ }, -/* 21 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports['default'] = createMemoryHistory; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _historyLibUseQueries = __webpack_require__(11); - - var _historyLibUseQueries2 = _interopRequireDefault(_historyLibUseQueries); - - var _historyLibUseBasename = __webpack_require__(29); - - var _historyLibUseBasename2 = _interopRequireDefault(_historyLibUseBasename); - - var _historyLibCreateMemoryHistory = __webpack_require__(55); - - var _historyLibCreateMemoryHistory2 = _interopRequireDefault(_historyLibCreateMemoryHistory); - - function createMemoryHistory(options) { - // signatures and type checking differ between `useRoutes` and - // `createMemoryHistory`, have to create `memoryHistory` first because - // `useQueries` doesn't understand the signature - var memoryHistory = _historyLibCreateMemoryHistory2['default'](options); - var createHistory = function createHistory() { - return memoryHistory; - }; - var history = _historyLibUseQueries2['default'](_historyLibUseBasename2['default'](createHistory))(options); - history.__v2_compatible__ = true; - return history; - } - - module.exports = exports['default']; - -/***/ }, -/* 22 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _useRouterHistory = __webpack_require__(24); - - var _useRouterHistory2 = _interopRequireDefault(_useRouterHistory); - - var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); - - exports['default'] = function (createHistory) { - var history = undefined; - if (canUseDOM) history = _useRouterHistory2['default'](createHistory)(); - return history; - }; - - module.exports = exports['default']; - -/***/ }, -/* 23 */ -/***/ function(module, exports, __webpack_require__) { - - /*eslint no-empty: 0*/ - 'use strict'; - - exports.__esModule = true; - exports['default'] = deprecateObjectProperties; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - var useMembrane = false; - - if (false) { - try { - if (Object.defineProperty({}, 'x', { get: function get() { - return true; - } }).x) { - useMembrane = true; - } - } catch (e) {} - } - - // wraps an object in a membrane to warn about deprecated property access - - function deprecateObjectProperties(object, message) { - if (!useMembrane) return object; - - var membrane = {}; - - var _loop = function (prop) { - if (typeof object[prop] === 'function') { - membrane[prop] = function () { - false ? _routerWarning2['default'](false, message) : undefined; - return object[prop].apply(object, arguments); - }; - } else { - Object.defineProperty(membrane, prop, { - configurable: false, - enumerable: false, - get: function get() { - false ? _routerWarning2['default'](false, message) : undefined; - return object[prop]; - } - }); - } - }; - - for (var prop in object) { - _loop(prop); - } - - return membrane; - } - - module.exports = exports['default']; - -/***/ }, -/* 24 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports['default'] = useRouterHistory; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _historyLibUseQueries = __webpack_require__(11); - - var _historyLibUseQueries2 = _interopRequireDefault(_historyLibUseQueries); - - var _historyLibUseBasename = __webpack_require__(29); - - var _historyLibUseBasename2 = _interopRequireDefault(_historyLibUseBasename); - - function useRouterHistory(createHistory) { - return function (options) { - var history = _historyLibUseQueries2['default'](_historyLibUseBasename2['default'](createHistory))(options); - history.__v2_compatible__ = true; - return history; - }; - } - - module.exports = exports['default']; - -/***/ }, -/* 25 */ -/***/ function(module, exports, __webpack_require__) { - - /*eslint-disable no-empty */ - 'use strict'; - - exports.__esModule = true; - exports.saveState = saveState; - exports.readState = readState; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _warning = __webpack_require__(4); - - var _warning2 = _interopRequireDefault(_warning); - - var KeyPrefix = '@@History/'; - var QuotaExceededErrors = ['QuotaExceededError', 'QUOTA_EXCEEDED_ERR']; - - var SecurityError = 'SecurityError'; - - function createKey(key) { - return KeyPrefix + key; - } - - function saveState(key, state) { - try { - if (state == null) { - window.sessionStorage.removeItem(createKey(key)); - } else { - window.sessionStorage.setItem(createKey(key), JSON.stringify(state)); - } - } catch (error) { - if (error.name === SecurityError) { - // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any - // attempt to access window.sessionStorage. - false ? _warning2['default'](false, '[history] Unable to save state; sessionStorage is not available due to security settings') : undefined; - - return; - } - - if (QuotaExceededErrors.indexOf(error.name) >= 0 && window.sessionStorage.length === 0) { - // Safari "private mode" throws QuotaExceededError. - false ? _warning2['default'](false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : undefined; - - return; - } - - throw error; - } - } - - function readState(key) { - var json = undefined; - try { - json = window.sessionStorage.getItem(createKey(key)); - } catch (error) { - if (error.name === SecurityError) { - // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any - // attempt to access window.sessionStorage. - false ? _warning2['default'](false, '[history] Unable to read state; sessionStorage is not available due to security settings') : undefined; - - return null; - } - } - - if (json) { - try { - return JSON.parse(json); - } catch (error) { - // Ignore invalid JSON. - } - } - - return null; - } - -/***/ }, -/* 26 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _invariant = __webpack_require__(3); - - var _invariant2 = _interopRequireDefault(_invariant); - - var _ExecutionEnvironment = __webpack_require__(10); - - var _DOMUtils = __webpack_require__(15); - - var _createHistory = __webpack_require__(28); - - var _createHistory2 = _interopRequireDefault(_createHistory); - - function createDOMHistory(options) { - var history = _createHistory2['default'](_extends({ - getUserConfirmation: _DOMUtils.getUserConfirmation - }, options, { - go: _DOMUtils.go - })); - - function listen(listener) { - !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'DOM history needs a DOM') : _invariant2['default'](false) : undefined; - - return history.listen(listener); - } - - return _extends({}, history, { - listen: listen - }); - } - - exports['default'] = createDOMHistory; - module.exports = exports['default']; - -/***/ }, -/* 27 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _warning = __webpack_require__(4); - - var _warning2 = _interopRequireDefault(_warning); - - var _invariant = __webpack_require__(3); - - var _invariant2 = _interopRequireDefault(_invariant); - - var _Actions = __webpack_require__(9); - - var _PathUtils = __webpack_require__(7); - - var _ExecutionEnvironment = __webpack_require__(10); - - var _DOMUtils = __webpack_require__(15); - - var _DOMStateStorage = __webpack_require__(25); - - var _createDOMHistory = __webpack_require__(26); - - var _createDOMHistory2 = _interopRequireDefault(_createDOMHistory); - - function isAbsolutePath(path) { - return typeof path === 'string' && path.charAt(0) === '/'; - } - - function ensureSlash() { - var path = _DOMUtils.getHashPath(); - - if (isAbsolutePath(path)) return true; - - _DOMUtils.replaceHashPath('/' + path); - - return false; - } - - function addQueryStringValueToPath(path, key, value) { - return path + (path.indexOf('?') === -1 ? '?' : '&') + (key + '=' + value); - } - - function stripQueryStringValueFromPath(path, key) { - return path.replace(new RegExp('[?&]?' + key + '=[a-zA-Z0-9]+'), ''); - } - - function getQueryStringValueFromPath(path, key) { - var match = path.match(new RegExp('\\?.*?\\b' + key + '=(.+?)\\b')); - return match && match[1]; - } - - var DefaultQueryKey = '_k'; - - function createHashHistory() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Hash history needs a DOM') : _invariant2['default'](false) : undefined; - - var queryKey = options.queryKey; - - if (queryKey === undefined || !!queryKey) queryKey = typeof queryKey === 'string' ? queryKey : DefaultQueryKey; - - function getCurrentLocation() { - var path = _DOMUtils.getHashPath(); - - var key = undefined, - state = undefined; - if (queryKey) { - key = getQueryStringValueFromPath(path, queryKey); - path = stripQueryStringValueFromPath(path, queryKey); - - if (key) { - state = _DOMStateStorage.readState(key); - } else { - state = null; - key = history.createKey(); - _DOMUtils.replaceHashPath(addQueryStringValueToPath(path, queryKey, key)); - } - } else { - key = state = null; - } - - var location = _PathUtils.parsePath(path); - - return history.createLocation(_extends({}, location, { state: state }), undefined, key); - } - - function startHashChangeListener(_ref) { - var transitionTo = _ref.transitionTo; - - function hashChangeListener() { - if (!ensureSlash()) return; // Always make sure hashes are preceeded with a /. - - transitionTo(getCurrentLocation()); - } - - ensureSlash(); - _DOMUtils.addEventListener(window, 'hashchange', hashChangeListener); - - return function () { - _DOMUtils.removeEventListener(window, 'hashchange', hashChangeListener); - }; - } - - function finishTransition(location) { - var basename = location.basename; - var pathname = location.pathname; - var search = location.search; - var state = location.state; - var action = location.action; - var key = location.key; - - if (action === _Actions.POP) return; // Nothing to do. - - var path = (basename || '') + pathname + search; - - if (queryKey) { - path = addQueryStringValueToPath(path, queryKey, key); - _DOMStateStorage.saveState(key, state); - } else { - // Drop key and state. - location.key = location.state = null; - } - - var currentHash = _DOMUtils.getHashPath(); - - if (action === _Actions.PUSH) { - if (currentHash !== path) { - window.location.hash = path; - } else { - false ? _warning2['default'](false, 'You cannot PUSH the same path using hash history') : undefined; - } - } else if (currentHash !== path) { - // REPLACE - _DOMUtils.replaceHashPath(path); - } - } - - var history = _createDOMHistory2['default'](_extends({}, options, { - getCurrentLocation: getCurrentLocation, - finishTransition: finishTransition, - saveState: _DOMStateStorage.saveState - })); - - var listenerCount = 0, - stopHashChangeListener = undefined; - - function listenBefore(listener) { - if (++listenerCount === 1) stopHashChangeListener = startHashChangeListener(history); - - var unlisten = history.listenBefore(listener); - - return function () { - unlisten(); - - if (--listenerCount === 0) stopHashChangeListener(); - }; - } - - function listen(listener) { - if (++listenerCount === 1) stopHashChangeListener = startHashChangeListener(history); - - var unlisten = history.listen(listener); - - return function () { - unlisten(); - - if (--listenerCount === 0) stopHashChangeListener(); - }; - } - - function push(location) { - false ? _warning2['default'](queryKey || location.state == null, 'You cannot use state without a queryKey it will be dropped') : undefined; - - history.push(location); - } - - function replace(location) { - false ? _warning2['default'](queryKey || location.state == null, 'You cannot use state without a queryKey it will be dropped') : undefined; - - history.replace(location); - } - - var goIsSupportedWithoutReload = _DOMUtils.supportsGoWithoutReloadUsingHash(); - - function go(n) { - false ? _warning2['default'](goIsSupportedWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : undefined; - - history.go(n); - } - - function createHref(path) { - return '#' + history.createHref(path); - } - - // deprecated - function registerTransitionHook(hook) { - if (++listenerCount === 1) stopHashChangeListener = startHashChangeListener(history); - - history.registerTransitionHook(hook); - } - - // deprecated - function unregisterTransitionHook(hook) { - history.unregisterTransitionHook(hook); - - if (--listenerCount === 0) stopHashChangeListener(); - } - - // deprecated - function pushState(state, path) { - false ? _warning2['default'](queryKey || state == null, 'You cannot use state without a queryKey it will be dropped') : undefined; - - history.pushState(state, path); - } - - // deprecated - function replaceState(state, path) { - false ? _warning2['default'](queryKey || state == null, 'You cannot use state without a queryKey it will be dropped') : undefined; - - history.replaceState(state, path); - } - - return _extends({}, history, { - listenBefore: listenBefore, - listen: listen, - push: push, - replace: replace, - go: go, - createHref: createHref, - - registerTransitionHook: registerTransitionHook, // deprecated - warning is in createHistory - unregisterTransitionHook: unregisterTransitionHook, // deprecated - warning is in createHistory - pushState: pushState, // deprecated - warning is in createHistory - replaceState: replaceState // deprecated - warning is in createHistory - }); - } - - exports['default'] = createHashHistory; - module.exports = exports['default']; - -/***/ }, -/* 28 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _warning = __webpack_require__(4); - - var _warning2 = _interopRequireDefault(_warning); - - var _deepEqual = __webpack_require__(49); - - var _deepEqual2 = _interopRequireDefault(_deepEqual); - - var _PathUtils = __webpack_require__(7); - - var _AsyncUtils = __webpack_require__(52); - - var _Actions = __webpack_require__(9); - - var _createLocation2 = __webpack_require__(54); - - var _createLocation3 = _interopRequireDefault(_createLocation2); - - var _runTransitionHook = __webpack_require__(17); - - var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); - - var _deprecate = __webpack_require__(16); - - var _deprecate2 = _interopRequireDefault(_deprecate); - - function createRandomKey(length) { - return Math.random().toString(36).substr(2, length); - } - - function locationsAreEqual(a, b) { - return a.pathname === b.pathname && a.search === b.search && - //a.action === b.action && // Different action !== location change. - a.key === b.key && _deepEqual2['default'](a.state, b.state); - } - - var DefaultKeyLength = 6; - - function createHistory() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - var getCurrentLocation = options.getCurrentLocation; - var finishTransition = options.finishTransition; - var saveState = options.saveState; - var go = options.go; - var keyLength = options.keyLength; - var getUserConfirmation = options.getUserConfirmation; - - if (typeof keyLength !== 'number') keyLength = DefaultKeyLength; - - var transitionHooks = []; - - function listenBefore(hook) { - transitionHooks.push(hook); - - return function () { - transitionHooks = transitionHooks.filter(function (item) { - return item !== hook; - }); - }; - } - - var allKeys = []; - var changeListeners = []; - var location = undefined; - - function getCurrent() { - if (pendingLocation && pendingLocation.action === _Actions.POP) { - return allKeys.indexOf(pendingLocation.key); - } else if (location) { - return allKeys.indexOf(location.key); - } else { - return -1; - } - } - - function updateLocation(newLocation) { - var current = getCurrent(); - - location = newLocation; - - if (location.action === _Actions.PUSH) { - allKeys = [].concat(allKeys.slice(0, current + 1), [location.key]); - } else if (location.action === _Actions.REPLACE) { - allKeys[current] = location.key; - } - - changeListeners.forEach(function (listener) { - listener(location); - }); - } - - function listen(listener) { - changeListeners.push(listener); - - if (location) { - listener(location); - } else { - var _location = getCurrentLocation(); - allKeys = [_location.key]; - updateLocation(_location); - } - - return function () { - changeListeners = changeListeners.filter(function (item) { - return item !== listener; - }); - }; - } - - function confirmTransitionTo(location, callback) { - _AsyncUtils.loopAsync(transitionHooks.length, function (index, next, done) { - _runTransitionHook2['default'](transitionHooks[index], location, function (result) { - if (result != null) { - done(result); - } else { - next(); - } - }); - }, function (message) { - if (getUserConfirmation && typeof message === 'string') { - getUserConfirmation(message, function (ok) { - callback(ok !== false); - }); - } else { - callback(message !== false); - } - }); - } - - var pendingLocation = undefined; - - function transitionTo(nextLocation) { - if (location && locationsAreEqual(location, nextLocation)) return; // Nothing to do. - - pendingLocation = nextLocation; - - confirmTransitionTo(nextLocation, function (ok) { - if (pendingLocation !== nextLocation) return; // Transition was interrupted. - - if (ok) { - // treat PUSH to current path like REPLACE to be consistent with browsers - if (nextLocation.action === _Actions.PUSH) { - var prevPath = createPath(location); - var nextPath = createPath(nextLocation); - - if (nextPath === prevPath && _deepEqual2['default'](location.state, nextLocation.state)) nextLocation.action = _Actions.REPLACE; - } - - if (finishTransition(nextLocation) !== false) updateLocation(nextLocation); - } else if (location && nextLocation.action === _Actions.POP) { - var prevIndex = allKeys.indexOf(location.key); - var nextIndex = allKeys.indexOf(nextLocation.key); - - if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL. - } - }); - } - - function push(location) { - transitionTo(createLocation(location, _Actions.PUSH, createKey())); - } - - function replace(location) { - transitionTo(createLocation(location, _Actions.REPLACE, createKey())); - } - - function goBack() { - go(-1); - } - - function goForward() { - go(1); - } - - function createKey() { - return createRandomKey(keyLength); - } - - function createPath(location) { - if (location == null || typeof location === 'string') return location; - - var pathname = location.pathname; - var search = location.search; - var hash = location.hash; - - var result = pathname; - - if (search) result += search; - - if (hash) result += hash; - - return result; - } - - function createHref(location) { - return createPath(location); - } - - function createLocation(location, action) { - var key = arguments.length <= 2 || arguments[2] === undefined ? createKey() : arguments[2]; - - if (typeof action === 'object') { - false ? _warning2['default'](false, 'The state (2nd) argument to history.createLocation is deprecated; use a ' + 'location descriptor instead') : undefined; - - if (typeof location === 'string') location = _PathUtils.parsePath(location); - - location = _extends({}, location, { state: action }); - - action = key; - key = arguments[3] || createKey(); - } - - return _createLocation3['default'](location, action, key); - } - - // deprecated - function setState(state) { - if (location) { - updateLocationState(location, state); - updateLocation(location); - } else { - updateLocationState(getCurrentLocation(), state); - } - } - - function updateLocationState(location, state) { - location.state = _extends({}, location.state, state); - saveState(location.key, location.state); - } - - // deprecated - function registerTransitionHook(hook) { - if (transitionHooks.indexOf(hook) === -1) transitionHooks.push(hook); - } - - // deprecated - function unregisterTransitionHook(hook) { - transitionHooks = transitionHooks.filter(function (item) { - return item !== hook; - }); - } - - // deprecated - function pushState(state, path) { - if (typeof path === 'string') path = _PathUtils.parsePath(path); - - push(_extends({ state: state }, path)); - } - - // deprecated - function replaceState(state, path) { - if (typeof path === 'string') path = _PathUtils.parsePath(path); - - replace(_extends({ state: state }, path)); - } - - return { - listenBefore: listenBefore, - listen: listen, - transitionTo: transitionTo, - push: push, - replace: replace, - go: go, - goBack: goBack, - goForward: goForward, - createKey: createKey, - createPath: createPath, - createHref: createHref, - createLocation: createLocation, - - setState: _deprecate2['default'](setState, 'setState is deprecated; use location.key to save state instead'), - registerTransitionHook: _deprecate2['default'](registerTransitionHook, 'registerTransitionHook is deprecated; use listenBefore instead'), - unregisterTransitionHook: _deprecate2['default'](unregisterTransitionHook, 'unregisterTransitionHook is deprecated; use the callback returned from listenBefore instead'), - pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'), - replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead') - }; - } - - exports['default'] = createHistory; - module.exports = exports['default']; - -/***/ }, -/* 29 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - - var _ExecutionEnvironment = __webpack_require__(10); - - var _PathUtils = __webpack_require__(7); - - var _runTransitionHook = __webpack_require__(17); - - var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); - - var _deprecate = __webpack_require__(16); - - var _deprecate2 = _interopRequireDefault(_deprecate); - - function useBasename(createHistory) { - return function () { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - var basename = options.basename; - - var historyOptions = _objectWithoutProperties(options, ['basename']); - - var history = createHistory(historyOptions); - - // Automatically use the value of in HTML - // documents as basename if it's not explicitly given. - if (basename == null && _ExecutionEnvironment.canUseDOM) { - var base = document.getElementsByTagName('base')[0]; - - if (base) basename = _PathUtils.extractPath(base.href); - } - - function addBasename(location) { - if (basename && location.basename == null) { - if (location.pathname.indexOf(basename) === 0) { - location.pathname = location.pathname.substring(basename.length); - location.basename = basename; - - if (location.pathname === '') location.pathname = '/'; - } else { - location.basename = ''; - } - } - - return location; - } - - function prependBasename(location) { - if (!basename) return location; - - if (typeof location === 'string') location = _PathUtils.parsePath(location); - - var pname = location.pathname; - var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/'; - var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname; - var pathname = normalizedBasename + normalizedPathname; - - return _extends({}, location, { - pathname: pathname - }); - } - - // Override all read methods with basename-aware versions. - function listenBefore(hook) { - return history.listenBefore(function (location, callback) { - _runTransitionHook2['default'](hook, addBasename(location), callback); - }); - } - - function listen(listener) { - return history.listen(function (location) { - listener(addBasename(location)); - }); - } - - // Override all write methods with basename-aware versions. - function push(location) { - history.push(prependBasename(location)); - } - - function replace(location) { - history.replace(prependBasename(location)); - } - - function createPath(location) { - return history.createPath(prependBasename(location)); - } - - function createHref(location) { - return history.createHref(prependBasename(location)); - } - - function createLocation(location) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args))); - } - - // deprecated - function pushState(state, path) { - if (typeof path === 'string') path = _PathUtils.parsePath(path); - - push(_extends({ state: state }, path)); - } - - // deprecated - function replaceState(state, path) { - if (typeof path === 'string') path = _PathUtils.parsePath(path); - - replace(_extends({ state: state }, path)); - } - - return _extends({}, history, { - listenBefore: listenBefore, - listen: listen, - push: push, - replace: replace, - createPath: createPath, - createHref: createHref, - createLocation: createLocation, - - pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'), - replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead') - }); - }; - } - - exports['default'] = useBasename; - module.exports = exports['default']; - -/***/ }, -/* 30 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - var _PropTypes = __webpack_require__(6); - - /** - * A mixin that adds the "history" instance variable to components. - */ - var History = { - - contextTypes: { - history: _PropTypes.history - }, - - componentWillMount: function componentWillMount() { - false ? _routerWarning2['default'](false, 'the `History` mixin is deprecated, please access `context.router` with your own `contextTypes`. http://tiny.cc/router-historymixin') : undefined; - this.history = this.context.history; - } - - }; - - exports['default'] = History; - module.exports = exports['default']; - -/***/ }, -/* 31 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _react = __webpack_require__(2); - - var _react2 = _interopRequireDefault(_react); - - var _Link = __webpack_require__(18); - - var _Link2 = _interopRequireDefault(_Link); - - /** - * An is used to link to an . - */ - var IndexLink = _react2['default'].createClass({ - displayName: 'IndexLink', - - render: function render() { - return _react2['default'].createElement(_Link2['default'], _extends({}, this.props, { onlyActiveOnIndex: true })); - } - - }); - - exports['default'] = IndexLink; - module.exports = exports['default']; - -/***/ }, -/* 32 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _react = __webpack_require__(2); - - var _react2 = _interopRequireDefault(_react); - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - var _invariant = __webpack_require__(3); - - var _invariant2 = _interopRequireDefault(_invariant); - - var _Redirect = __webpack_require__(19); - - var _Redirect2 = _interopRequireDefault(_Redirect); - - var _PropTypes = __webpack_require__(6); - - var _React$PropTypes = _react2['default'].PropTypes; - var string = _React$PropTypes.string; - var object = _React$PropTypes.object; - - /** - * An is used to redirect from an indexRoute. - */ - var IndexRedirect = _react2['default'].createClass({ - displayName: 'IndexRedirect', - - statics: { - - createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { - /* istanbul ignore else: sanity check */ - if (parentRoute) { - parentRoute.indexRoute = _Redirect2['default'].createRouteFromReactElement(element); - } else { - false ? _routerWarning2['default'](false, 'An does not make sense at the root of your route config') : undefined; - } - } - - }, - - propTypes: { - to: string.isRequired, - query: object, - state: object, - onEnter: _PropTypes.falsy, - children: _PropTypes.falsy - }, - - /* istanbul ignore next: sanity check */ - render: function render() { - true ? false ? _invariant2['default'](false, ' elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined; - } - - }); - - exports['default'] = IndexRedirect; - module.exports = exports['default']; - -/***/ }, -/* 33 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _react = __webpack_require__(2); - - var _react2 = _interopRequireDefault(_react); - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - var _invariant = __webpack_require__(3); - - var _invariant2 = _interopRequireDefault(_invariant); - - var _RouteUtils = __webpack_require__(5); - - var _PropTypes = __webpack_require__(6); - - var func = _react2['default'].PropTypes.func; - - /** - * An is used to specify its parent's in - * a JSX route config. - */ - var IndexRoute = _react2['default'].createClass({ - displayName: 'IndexRoute', - - statics: { - - createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { - /* istanbul ignore else: sanity check */ - if (parentRoute) { - parentRoute.indexRoute = _RouteUtils.createRouteFromReactElement(element); - } else { - false ? _routerWarning2['default'](false, 'An does not make sense at the root of your route config') : undefined; - } - } - - }, - - propTypes: { - path: _PropTypes.falsy, - component: _PropTypes.component, - components: _PropTypes.components, - getComponent: func, - getComponents: func - }, - - /* istanbul ignore next: sanity check */ - render: function render() { - true ? false ? _invariant2['default'](false, ' elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined; - } - - }); - - exports['default'] = IndexRoute; - module.exports = exports['default']; - -/***/ }, -/* 34 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - var _react = __webpack_require__(2); - - var _react2 = _interopRequireDefault(_react); - - var _invariant = __webpack_require__(3); - - var _invariant2 = _interopRequireDefault(_invariant); - - var object = _react2['default'].PropTypes.object; - - /** - * The Lifecycle mixin adds the routerWillLeave lifecycle method to a - * component that may be used to cancel a transition or prompt the user - * for confirmation. - * - * On standard transitions, routerWillLeave receives a single argument: the - * location we're transitioning to. To cancel the transition, return false. - * To prompt the user for confirmation, return a prompt message (string). - * - * During the beforeunload event (assuming you're using the useBeforeUnload - * history enhancer), routerWillLeave does not receive a location object - * because it isn't possible for us to know the location we're transitioning - * to. In this case routerWillLeave must return a prompt message to prevent - * the user from closing the window/tab. - */ - var Lifecycle = { - - contextTypes: { - history: object.isRequired, - // Nested children receive the route as context, either - // set by the route component using the RouteContext mixin - // or by some other ancestor. - route: object - }, - - propTypes: { - // Route components receive the route object as a prop. - route: object - }, - - componentDidMount: function componentDidMount() { - false ? _routerWarning2['default'](false, 'the `Lifecycle` mixin is deprecated, please use `context.router.setRouteLeaveHook(route, hook)`. http://tiny.cc/router-lifecyclemixin') : undefined; - !this.routerWillLeave ? false ? _invariant2['default'](false, 'The Lifecycle mixin requires you to define a routerWillLeave method') : _invariant2['default'](false) : undefined; - - var route = this.props.route || this.context.route; - - !route ? false ? _invariant2['default'](false, 'The Lifecycle mixin must be used on either a) a or ' + 'b) a descendant of a that uses the RouteContext mixin') : _invariant2['default'](false) : undefined; - - this._unlistenBeforeLeavingRoute = this.context.history.listenBeforeLeavingRoute(route, this.routerWillLeave); - }, - - componentWillUnmount: function componentWillUnmount() { - if (this._unlistenBeforeLeavingRoute) this._unlistenBeforeLeavingRoute(); - } - - }; - - exports['default'] = Lifecycle; - module.exports = exports['default']; - -/***/ }, -/* 35 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _react = __webpack_require__(2); - - var _react2 = _interopRequireDefault(_react); - - var _invariant = __webpack_require__(3); - - var _invariant2 = _interopRequireDefault(_invariant); - - var _RouteUtils = __webpack_require__(5); - - var _PropTypes = __webpack_require__(6); - - var _React$PropTypes = _react2['default'].PropTypes; - var string = _React$PropTypes.string; - var func = _React$PropTypes.func; - - /** - * A is used to declare which components are rendered to the - * page when the URL matches a given pattern. - * - * Routes are arranged in a nested tree structure. When a new URL is - * requested, the tree is searched depth-first to find a route whose - * path matches the URL. When one is found, all routes in the tree - * that lead to it are considered "active" and their components are - * rendered into the DOM, nested in the same order as in the tree. - */ - var Route = _react2['default'].createClass({ - displayName: 'Route', - - statics: { - createRouteFromReactElement: _RouteUtils.createRouteFromReactElement - }, - - propTypes: { - path: string, - component: _PropTypes.component, - components: _PropTypes.components, - getComponent: func, - getComponents: func - }, - - /* istanbul ignore next: sanity check */ - render: function render() { - true ? false ? _invariant2['default'](false, ' elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined; - } - - }); - - exports['default'] = Route; - module.exports = exports['default']; - -/***/ }, -/* 36 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - var _react = __webpack_require__(2); - - var _react2 = _interopRequireDefault(_react); - - var object = _react2['default'].PropTypes.object; - - /** - * The RouteContext mixin provides a convenient way for route - * components to set the route in context. This is needed for - * routes that render elements that want to use the Lifecycle - * mixin to prevent transitions. - */ - var RouteContext = { - - propTypes: { - route: object.isRequired - }, - - childContextTypes: { - route: object.isRequired - }, - - getChildContext: function getChildContext() { - return { - route: this.props.route - }; - }, - - componentWillMount: function componentWillMount() { - false ? _routerWarning2['default'](false, 'The `RouteContext` mixin is deprecated. You can provide `this.props.route` on context with your own `contextTypes`. http://tiny.cc/router-routecontextmixin') : undefined; - } - - }; - - exports['default'] = RouteContext; - module.exports = exports['default']; - -/***/ }, -/* 37 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - - var _historyLibCreateHashHistory = __webpack_require__(27); - - var _historyLibCreateHashHistory2 = _interopRequireDefault(_historyLibCreateHashHistory); - - var _historyLibUseQueries = __webpack_require__(11); - - var _historyLibUseQueries2 = _interopRequireDefault(_historyLibUseQueries); - - var _react = __webpack_require__(2); - - var _react2 = _interopRequireDefault(_react); - - var _createTransitionManager = __webpack_require__(14); - - var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); - - var _PropTypes = __webpack_require__(6); - - var _RouterContext = __webpack_require__(13); - - var _RouterContext2 = _interopRequireDefault(_RouterContext); - - var _RouteUtils = __webpack_require__(5); - - var _RouterUtils = __webpack_require__(20); - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - function isDeprecatedHistory(history) { - return !history || !history.__v2_compatible__; - } - - var _React$PropTypes = _react2['default'].PropTypes; - var func = _React$PropTypes.func; - var object = _React$PropTypes.object; - - /** - * A is a high-level API for automatically setting up - * a router that renders a with all the props - * it needs each time the URL changes. - */ - var Router = _react2['default'].createClass({ - displayName: 'Router', - - propTypes: { - history: object, - children: _PropTypes.routes, - routes: _PropTypes.routes, // alias for children - render: func, - createElement: func, - onError: func, - onUpdate: func, - - // PRIVATE: For client-side rehydration of server match. - matchContext: object - }, - - getDefaultProps: function getDefaultProps() { - return { - render: function render(props) { - return _react2['default'].createElement(_RouterContext2['default'], props); - } - }; - }, - - getInitialState: function getInitialState() { - return { - location: null, - routes: null, - params: null, - components: null - }; - }, - - handleError: function handleError(error) { - if (this.props.onError) { - this.props.onError.call(this, error); - } else { - // Throw errors by default so we don't silently swallow them! - throw error; // This error probably occurred in getChildRoutes or getComponents. - } - }, - - componentWillMount: function componentWillMount() { - var _this = this; - - var _props = this.props; - var parseQueryString = _props.parseQueryString; - var stringifyQuery = _props.stringifyQuery; - - false ? _routerWarning2['default'](!(parseQueryString || stringifyQuery), '`parseQueryString` and `stringifyQuery` are deprecated. Please create a custom history. http://tiny.cc/router-customquerystring') : undefined; - - var _createRouterObjects = this.createRouterObjects(); - - var history = _createRouterObjects.history; - var transitionManager = _createRouterObjects.transitionManager; - var router = _createRouterObjects.router; - - this._unlisten = transitionManager.listen(function (error, state) { - if (error) { - _this.handleError(error); - } else { - _this.setState(state, _this.props.onUpdate); - } - }); - - this.history = history; - this.router = router; - }, - - createRouterObjects: function createRouterObjects() { - var matchContext = this.props.matchContext; - - if (matchContext) { - return matchContext; - } - - var history = this.props.history; - var _props2 = this.props; - var routes = _props2.routes; - var children = _props2.children; - - if (isDeprecatedHistory(history)) { - history = this.wrapDeprecatedHistory(history); - } - - var transitionManager = _createTransitionManager2['default'](history, _RouteUtils.createRoutes(routes || children)); - var router = _RouterUtils.createRouterObject(history, transitionManager); - var routingHistory = _RouterUtils.createRoutingHistory(history, transitionManager); - - return { history: routingHistory, transitionManager: transitionManager, router: router }; - }, - - wrapDeprecatedHistory: function wrapDeprecatedHistory(history) { - var _props3 = this.props; - var parseQueryString = _props3.parseQueryString; - var stringifyQuery = _props3.stringifyQuery; - - var createHistory = undefined; - if (history) { - false ? _routerWarning2['default'](false, 'It appears you have provided a deprecated history object to ``, please use a history provided by ' + 'React Router with `import { browserHistory } from \'react-router\'` or `import { hashHistory } from \'react-router\'`. ' + 'If you are using a custom history please create it with `useRouterHistory`, see http://tiny.cc/router-usinghistory for details.') : undefined; - createHistory = function () { - return history; - }; - } else { - false ? _routerWarning2['default'](false, '`Router` no longer defaults the history prop to hash history. Please use the `hashHistory` singleton instead. http://tiny.cc/router-defaulthistory') : undefined; - createHistory = _historyLibCreateHashHistory2['default']; - } - - return _historyLibUseQueries2['default'](createHistory)({ parseQueryString: parseQueryString, stringifyQuery: stringifyQuery }); - }, - - /* istanbul ignore next: sanity check */ - componentWillReceiveProps: function componentWillReceiveProps(nextProps) { - false ? _routerWarning2['default'](nextProps.history === this.props.history, 'You cannot change ; it will be ignored') : undefined; - - false ? _routerWarning2['default']((nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), 'You cannot change ; it will be ignored') : undefined; - }, - - componentWillUnmount: function componentWillUnmount() { - if (this._unlisten) this._unlisten(); - }, - - render: function render() { - var _state = this.state; - var location = _state.location; - var routes = _state.routes; - var params = _state.params; - var components = _state.components; - var _props4 = this.props; - var createElement = _props4.createElement; - var render = _props4.render; - - var props = _objectWithoutProperties(_props4, ['createElement', 'render']); - - if (location == null) return null; // Async match - - // Only forward non-Router-specific props to routing context, as those are - // the only ones that might be custom routing context props. - Object.keys(Router.propTypes).forEach(function (propType) { - return delete props[propType]; - }); - - return render(_extends({}, props, { - history: this.history, - router: this.router, - location: location, - routes: routes, - params: params, - components: components, - createElement: createElement - })); - } - - }); - - exports['default'] = Router; - module.exports = exports['default']; - -/***/ }, -/* 38 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _react = __webpack_require__(2); - - var _react2 = _interopRequireDefault(_react); - - var _RouterContext = __webpack_require__(13); - - var _RouterContext2 = _interopRequireDefault(_RouterContext); - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - var RoutingContext = _react2['default'].createClass({ - displayName: 'RoutingContext', - - componentWillMount: function componentWillMount() { - false ? _routerWarning2['default'](false, '`RoutingContext` has been renamed to `RouterContext`. Please use `import { RouterContext } from \'react-router\'`. http://tiny.cc/router-routercontext') : undefined; - }, - - render: function render() { - return _react2['default'].createElement(_RouterContext2['default'], this.props); - } - }); - - exports['default'] = RoutingContext; - module.exports = exports['default']; - -/***/ }, -/* 39 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports.runEnterHooks = runEnterHooks; - exports.runLeaveHooks = runLeaveHooks; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _AsyncUtils = __webpack_require__(12); - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - function createEnterHook(hook, route) { - return function (a, b, callback) { - hook.apply(route, arguments); - - if (hook.length < 3) { - // Assume hook executes synchronously and - // automatically call the callback. - callback(); - } - }; - } - - function getEnterHooks(routes) { - return routes.reduce(function (hooks, route) { - if (route.onEnter) hooks.push(createEnterHook(route.onEnter, route)); - - return hooks; - }, []); - } - - /** - * Runs all onEnter hooks in the given array of routes in order - * with onEnter(nextState, replace, callback) and calls - * callback(error, redirectInfo) when finished. The first hook - * to use replace short-circuits the loop. - * - * If a hook needs to run asynchronously, it may use the callback - * function. However, doing so will cause the transition to pause, - * which could lead to a non-responsive UI if the hook is slow. - */ - - function runEnterHooks(routes, nextState, callback) { - var hooks = getEnterHooks(routes); - - if (!hooks.length) { - callback(); - return; - } - - var redirectInfo = undefined; - function replace(location, deprecatedPathname, deprecatedQuery) { - if (deprecatedPathname) { - false ? _routerWarning2['default'](false, '`replaceState(state, pathname, query) is deprecated; use `replace(location)` with a location descriptor instead. http://tiny.cc/router-isActivedeprecated') : undefined; - redirectInfo = { - pathname: deprecatedPathname, - query: deprecatedQuery, - state: location - }; - - return; - } - - redirectInfo = location; - } - - _AsyncUtils.loopAsync(hooks.length, function (index, next, done) { - hooks[index](nextState, replace, function (error) { - if (error || redirectInfo) { - done(error, redirectInfo); // No need to continue. - } else { - next(); - } - }); - }, callback); - } - - /** - * Runs all onLeave hooks in the given array of routes in order. - */ - - function runLeaveHooks(routes) { - for (var i = 0, len = routes.length; i < len; ++i) { - if (routes[i].onLeave) routes[i].onLeave.call(routes[i]); - } - } - -/***/ }, -/* 40 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _historyLibCreateBrowserHistory = __webpack_require__(53); - - var _historyLibCreateBrowserHistory2 = _interopRequireDefault(_historyLibCreateBrowserHistory); - - var _createRouterHistory = __webpack_require__(22); - - var _createRouterHistory2 = _interopRequireDefault(_createRouterHistory); - - exports['default'] = _createRouterHistory2['default'](_historyLibCreateBrowserHistory2['default']); - module.exports = exports['default']; - -/***/ }, -/* 41 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _PatternUtils = __webpack_require__(8); - - function routeParamsChanged(route, prevState, nextState) { - if (!route.path) return false; - - var paramNames = _PatternUtils.getParamNames(route.path); - - return paramNames.some(function (paramName) { - return prevState.params[paramName] !== nextState.params[paramName]; - }); - } - - /** - * Returns an object of { leaveRoutes, enterRoutes } determined by - * the change from prevState to nextState. We leave routes if either - * 1) they are not in the next state or 2) they are in the next state - * but their params have changed (i.e. /users/123 => /users/456). - * - * leaveRoutes are ordered starting at the leaf route of the tree - * we're leaving up to the common parent route. enterRoutes are ordered - * from the top of the tree we're entering down to the leaf route. - */ - function computeChangedRoutes(prevState, nextState) { - var prevRoutes = prevState && prevState.routes; - var nextRoutes = nextState.routes; - - var leaveRoutes = undefined, - enterRoutes = undefined; - if (prevRoutes) { - (function () { - var parentIsLeaving = false; - leaveRoutes = prevRoutes.filter(function (route) { - if (parentIsLeaving) { - return true; - } else { - var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); - if (isLeaving) parentIsLeaving = true; - return isLeaving; - } - }); - - // onLeave hooks start at the leaf route. - leaveRoutes.reverse(); - - enterRoutes = nextRoutes.filter(function (route) { - return prevRoutes.indexOf(route) === -1 || leaveRoutes.indexOf(route) !== -1; - }); - })(); - } else { - leaveRoutes = []; - enterRoutes = nextRoutes; - } - - return { - leaveRoutes: leaveRoutes, - enterRoutes: enterRoutes - }; - } - - exports['default'] = computeChangedRoutes; - module.exports = exports['default']; - -/***/ }, -/* 42 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _AsyncUtils = __webpack_require__(12); - - function getComponentsForRoute(location, route, callback) { - if (route.component || route.components) { - callback(null, route.component || route.components); - } else if (route.getComponent) { - route.getComponent(location, callback); - } else if (route.getComponents) { - route.getComponents(location, callback); - } else { - callback(); - } - } - - /** - * Asynchronously fetches all components needed for the given router - * state and calls callback(error, components) when finished. - * - * Note: This operation may finish synchronously if no routes have an - * asynchronous getComponents method. - */ - function getComponents(nextState, callback) { - _AsyncUtils.mapAsync(nextState.routes, function (route, index, callback) { - getComponentsForRoute(nextState.location, route, callback); - }, callback); - } - - exports['default'] = getComponents; - module.exports = exports['default']; - -/***/ }, -/* 43 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _PatternUtils = __webpack_require__(8); - - /** - * Extracts an object of params the given route cares about from - * the given params object. - */ - function getRouteParams(route, params) { - var routeParams = {}; - - if (!route.path) return routeParams; - - var paramNames = _PatternUtils.getParamNames(route.path); - - for (var p in params) { - if (params.hasOwnProperty(p) && paramNames.indexOf(p) !== -1) routeParams[p] = params[p]; - }return routeParams; - } - - exports['default'] = getRouteParams; - module.exports = exports['default']; - -/***/ }, -/* 44 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _historyLibCreateHashHistory = __webpack_require__(27); - - var _historyLibCreateHashHistory2 = _interopRequireDefault(_historyLibCreateHashHistory); - - var _createRouterHistory = __webpack_require__(22); - - var _createRouterHistory2 = _interopRequireDefault(_createRouterHistory); - - exports['default'] = _createRouterHistory2['default'](_historyLibCreateHashHistory2['default']); - module.exports = exports['default']; - -/***/ }, -/* 45 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports['default'] = isActive; - - var _PatternUtils = __webpack_require__(8); - - function deepEqual(a, b) { - if (a == b) return true; - - if (a == null || b == null) return false; - - if (Array.isArray(a)) { - return Array.isArray(b) && a.length === b.length && a.every(function (item, index) { - return deepEqual(item, b[index]); - }); - } - - if (typeof a === 'object') { - for (var p in a) { - if (!a.hasOwnProperty(p)) { - continue; - } - - if (a[p] === undefined) { - if (b[p] !== undefined) { - return false; - } - } else if (!b.hasOwnProperty(p)) { - return false; - } else if (!deepEqual(a[p], b[p])) { - return false; - } - } - - return true; - } - - return String(a) === String(b); - } - - function paramsAreActive(paramNames, paramValues, activeParams) { - // FIXME: This doesn't work on repeated params in activeParams. - return paramNames.every(function (paramName, index) { - return String(paramValues[index]) === String(activeParams[paramName]); - }); - } - - function getMatchingRouteIndex(pathname, activeRoutes, activeParams) { - var remainingPathname = pathname, - paramNames = [], - paramValues = []; - - for (var i = 0, len = activeRoutes.length; i < len; ++i) { - var route = activeRoutes[i]; - var pattern = route.path || ''; - - if (pattern.charAt(0) === '/') { - remainingPathname = pathname; - paramNames = []; - paramValues = []; - } - - if (remainingPathname !== null) { - var matched = _PatternUtils.matchPattern(pattern, remainingPathname); - remainingPathname = matched.remainingPathname; - paramNames = [].concat(paramNames, matched.paramNames); - paramValues = [].concat(paramValues, matched.paramValues); - } - - if (remainingPathname === '' && route.path && paramsAreActive(paramNames, paramValues, activeParams)) return i; - } - - return null; - } - - /** - * Returns true if the given pathname matches the active routes - * and params. - */ - function routeIsActive(pathname, routes, params, indexOnly) { - var i = getMatchingRouteIndex(pathname, routes, params); - - if (i === null) { - // No match. - return false; - } else if (!indexOnly) { - // Any match is good enough. - return true; - } - - // If any remaining routes past the match index have paths, then we can't - // be on the index route. - return routes.slice(i + 1).every(function (route) { - return !route.path; - }); - } - - /** - * Returns true if all key/value pairs in the given query are - * currently active. - */ - function queryIsActive(query, activeQuery) { - if (activeQuery == null) return query == null; - - if (query == null) return true; - - return deepEqual(query, activeQuery); - } - - /** - * Returns true if a to the given pathname/query combination is - * currently active. - */ - - function isActive(_ref, indexOnly, currentLocation, routes, params) { - var pathname = _ref.pathname; - var query = _ref.query; - - if (currentLocation == null) return false; - - if (!routeIsActive(pathname, routes, params, indexOnly)) return false; - - return queryIsActive(query, currentLocation.query); - } - - module.exports = exports['default']; - -/***/ }, -/* 46 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - - var _invariant = __webpack_require__(3); - - var _invariant2 = _interopRequireDefault(_invariant); - - var _createMemoryHistory = __webpack_require__(21); - - var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory); - - var _createTransitionManager = __webpack_require__(14); - - var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); - - var _RouteUtils = __webpack_require__(5); - - var _RouterUtils = __webpack_require__(20); - - /** - * A high-level API to be used for server-side rendering. - * - * This function matches a location to a set of routes and calls - * callback(error, redirectLocation, renderProps) when finished. - * - * Note: You probably don't want to use this in a browser unless you're using - * server-side rendering with async routes. - */ - function match(_ref, callback) { - var history = _ref.history; - var routes = _ref.routes; - var location = _ref.location; - - var options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']); - - !(history || location) ? false ? _invariant2['default'](false, 'match needs a history or a location') : _invariant2['default'](false) : undefined; - - history = history ? history : _createMemoryHistory2['default'](options); - var transitionManager = _createTransitionManager2['default'](history, _RouteUtils.createRoutes(routes)); - - var unlisten = undefined; - - if (location) { - // Allow match({ location: '/the/path', ... }) - location = history.createLocation(location); - } else { - // Pick up the location from the history via synchronous history.listen - // call if needed. - unlisten = history.listen(function (historyLocation) { - location = historyLocation; - }); - } - - var router = _RouterUtils.createRouterObject(history, transitionManager); - history = _RouterUtils.createRoutingHistory(history, transitionManager); - - transitionManager.match(location, function (error, redirectLocation, nextState) { - callback(error, redirectLocation, nextState && _extends({}, nextState, { - history: history, - router: router, - matchContext: { history: history, transitionManager: transitionManager, router: router } - })); - - // Defer removing the listener to here to prevent DOM histories from having - // to unwind DOM event listeners unnecessarily, in case callback renders a - // and attaches another history listener. - if (unlisten) { - unlisten(); - } - }); - } - - exports['default'] = match; - module.exports = exports['default']; - -/***/ }, -/* 47 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - var _AsyncUtils = __webpack_require__(12); - - var _PatternUtils = __webpack_require__(8); - - var _RouteUtils = __webpack_require__(5); - - function getChildRoutes(route, location, callback) { - if (route.childRoutes) { - return [null, route.childRoutes]; - } - if (!route.getChildRoutes) { - return []; - } - - var sync = true, - result = undefined; - - route.getChildRoutes(location, function (error, childRoutes) { - childRoutes = !error && _RouteUtils.createRoutes(childRoutes); - if (sync) { - result = [error, childRoutes]; - return; - } - - callback(error, childRoutes); - }); - - sync = false; - return result; // Might be undefined. - } - - function getIndexRoute(route, location, callback) { - if (route.indexRoute) { - callback(null, route.indexRoute); - } else if (route.getIndexRoute) { - route.getIndexRoute(location, function (error, indexRoute) { - callback(error, !error && _RouteUtils.createRoutes(indexRoute)[0]); - }); - } else if (route.childRoutes) { - (function () { - var pathless = route.childRoutes.filter(function (obj) { - return !obj.hasOwnProperty('path'); - }); - - _AsyncUtils.loopAsync(pathless.length, function (index, next, done) { - getIndexRoute(pathless[index], location, function (error, indexRoute) { - if (error || indexRoute) { - var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]); - done(error, routes); - } else { - next(); - } - }); - }, function (err, routes) { - callback(null, routes); - }); - })(); - } else { - callback(); - } - } - - function assignParams(params, paramNames, paramValues) { - return paramNames.reduce(function (params, paramName, index) { - var paramValue = paramValues && paramValues[index]; - - if (Array.isArray(params[paramName])) { - params[paramName].push(paramValue); - } else if (paramName in params) { - params[paramName] = [params[paramName], paramValue]; - } else { - params[paramName] = paramValue; - } - - return params; - }, params); - } - - function createParams(paramNames, paramValues) { - return assignParams({}, paramNames, paramValues); - } - - function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) { - var pattern = route.path || ''; - - if (pattern.charAt(0) === '/') { - remainingPathname = location.pathname; - paramNames = []; - paramValues = []; - } - - if (remainingPathname !== null) { - var matched = _PatternUtils.matchPattern(pattern, remainingPathname); - remainingPathname = matched.remainingPathname; - paramNames = [].concat(paramNames, matched.paramNames); - paramValues = [].concat(paramValues, matched.paramValues); - - if (remainingPathname === '' && route.path) { - var _ret2 = (function () { - var match = { - routes: [route], - params: createParams(paramNames, paramValues) - }; - - getIndexRoute(route, location, function (error, indexRoute) { - if (error) { - callback(error); - } else { - if (Array.isArray(indexRoute)) { - var _match$routes; - - false ? _routerWarning2['default'](indexRoute.every(function (route) { - return !route.path; - }), 'Index routes should not have paths') : undefined; - (_match$routes = match.routes).push.apply(_match$routes, indexRoute); - } else if (indexRoute) { - false ? _routerWarning2['default'](!indexRoute.path, 'Index routes should not have paths') : undefined; - match.routes.push(indexRoute); - } - - callback(null, match); - } - }); - return { - v: undefined - }; - })(); - - if (typeof _ret2 === 'object') return _ret2.v; - } - } - - if (remainingPathname != null || route.childRoutes) { - // Either a) this route matched at least some of the path or b) - // we don't have to load this route's children asynchronously. In - // either case continue checking for matches in the subtree. - var onChildRoutes = function onChildRoutes(error, childRoutes) { - if (error) { - callback(error); - } else if (childRoutes) { - // Check the child routes to see if any of them match. - matchRoutes(childRoutes, location, function (error, match) { - if (error) { - callback(error); - } else if (match) { - // A child route matched! Augment the match and pass it up the stack. - match.routes.unshift(route); - callback(null, match); - } else { - callback(); - } - }, remainingPathname, paramNames, paramValues); - } else { - callback(); - } - }; - - var result = getChildRoutes(route, location, onChildRoutes); - if (result) { - onChildRoutes.apply(undefined, result); - } - } else { - callback(); - } - } - - /** - * Asynchronously matches the given location to a set of routes and calls - * callback(error, state) when finished. The state object will have the - * following properties: - * - * - routes An array of routes that matched, in hierarchical order - * - params An object of URL parameters - * - * Note: This operation may finish synchronously if no routes have an - * asynchronous getChildRoutes method. - */ - function matchRoutes(routes, location, callback) { - var remainingPathname = arguments.length <= 3 || arguments[3] === undefined ? location.pathname : arguments[3]; - var paramNames = arguments.length <= 4 || arguments[4] === undefined ? [] : arguments[4]; - var paramValues = arguments.length <= 5 || arguments[5] === undefined ? [] : arguments[5]; - return (function () { - _AsyncUtils.loopAsync(routes.length, function (index, next, done) { - matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) { - if (error || match) { - done(error, match); - } else { - next(); - } - }); - }, callback); - })(); - } - - exports['default'] = matchRoutes; - module.exports = exports['default']; - -/***/ }, -/* 48 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - - var _historyLibUseQueries = __webpack_require__(11); - - var _historyLibUseQueries2 = _interopRequireDefault(_historyLibUseQueries); - - var _createTransitionManager = __webpack_require__(14); - - var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); - - var _routerWarning = __webpack_require__(1); - - var _routerWarning2 = _interopRequireDefault(_routerWarning); - - /** - * Returns a new createHistory function that may be used to create - * history objects that know about routing. - * - * Enhances history objects with the following methods: - * - * - listen((error, nextState) => {}) - * - listenBeforeLeavingRoute(route, (nextLocation) => {}) - * - match(location, (error, redirectLocation, nextState) => {}) - * - isActive(pathname, query, indexOnly=false) - */ - function useRoutes(createHistory) { - false ? _routerWarning2['default'](false, '`useRoutes` is deprecated. Please use `createTransitionManager` instead.') : undefined; - - return function () { - var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - var routes = _ref.routes; - - var options = _objectWithoutProperties(_ref, ['routes']); - - var history = _historyLibUseQueries2['default'](createHistory)(options); - var transitionManager = _createTransitionManager2['default'](history, routes); - return _extends({}, history, transitionManager); - }; - } - - exports['default'] = useRoutes; - module.exports = exports['default']; - -/***/ }, -/* 49 */ -/***/ function(module, exports, __webpack_require__) { - - var pSlice = Array.prototype.slice; - var objectKeys = __webpack_require__(51); - var isArguments = __webpack_require__(50); - - var deepEqual = module.exports = function (actual, expected, opts) { - if (!opts) opts = {}; - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (actual instanceof Date && expected instanceof Date) { - return actual.getTime() === expected.getTime(); - - // 7.3. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') { - return opts.strict ? actual === expected : actual == expected; - - // 7.4. For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected, opts); - } - } - - function isUndefinedOrNull(value) { - return value === null || value === undefined; - } - - function isBuffer (x) { - if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false; - if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { - return false; - } - if (x.length > 0 && typeof x[0] !== 'number') return false; - return true; - } - - function objEquiv(a, b, opts) { - var i, key; - if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (isArguments(a)) { - if (!isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return deepEqual(a, b, opts); - } - if (isBuffer(a)) { - if (!isBuffer(b)) { - return false; - } - if (a.length !== b.length) return false; - for (i = 0; i < a.length; i++) { - if (a[i] !== b[i]) return false; - } - return true; - } - try { - var ka = objectKeys(a), - kb = objectKeys(b); - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!deepEqual(a[key], b[key], opts)) return false; - } - return typeof a === typeof b; - } - - -/***/ }, -/* 50 */ -/***/ function(module, exports) { - - var supportsArgumentsClass = (function(){ - return Object.prototype.toString.call(arguments) - })() == '[object Arguments]'; - - exports = module.exports = supportsArgumentsClass ? supported : unsupported; - - exports.supported = supported; - function supported(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; - }; - - exports.unsupported = unsupported; - function unsupported(object){ - return object && - typeof object == 'object' && - typeof object.length == 'number' && - Object.prototype.hasOwnProperty.call(object, 'callee') && - !Object.prototype.propertyIsEnumerable.call(object, 'callee') || - false; - }; - - -/***/ }, -/* 51 */ -/***/ function(module, exports) { - - exports = module.exports = typeof Object.keys === 'function' - ? Object.keys : shim; - - exports.shim = shim; - function shim (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; - } - - -/***/ }, -/* 52 */ -/***/ function(module, exports) { - - "use strict"; - - exports.__esModule = true; - exports.loopAsync = loopAsync; - - function loopAsync(turns, work, callback) { - var currentTurn = 0; - var isDone = false; - - function done() { - isDone = true; - callback.apply(this, arguments); - } - - function next() { - if (isDone) return; - - if (currentTurn < turns) { - work.call(this, currentTurn++, next, done); - } else { - done.apply(this, arguments); - } - } - - next(); - } - -/***/ }, -/* 53 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _invariant = __webpack_require__(3); - - var _invariant2 = _interopRequireDefault(_invariant); - - var _Actions = __webpack_require__(9); - - var _PathUtils = __webpack_require__(7); - - var _ExecutionEnvironment = __webpack_require__(10); - - var _DOMUtils = __webpack_require__(15); - - var _DOMStateStorage = __webpack_require__(25); - - var _createDOMHistory = __webpack_require__(26); - - var _createDOMHistory2 = _interopRequireDefault(_createDOMHistory); - - /** - * Creates and returns a history object that uses HTML5's history API - * (pushState, replaceState, and the popstate event) to manage history. - * This is the recommended method of managing history in browsers because - * it provides the cleanest URLs. - * - * Note: In browsers that do not support the HTML5 history API full - * page reloads will be used to preserve URLs. - */ - function createBrowserHistory() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined; - - var forceRefresh = options.forceRefresh; - - var isSupported = _DOMUtils.supportsHistory(); - var useRefresh = !isSupported || forceRefresh; - - function getCurrentLocation(historyState) { - historyState = historyState || window.history.state || {}; - - var path = _DOMUtils.getWindowPath(); - var _historyState = historyState; - var key = _historyState.key; - - var state = undefined; - if (key) { - state = _DOMStateStorage.readState(key); - } else { - state = null; - key = history.createKey(); - - if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path); - } - - var location = _PathUtils.parsePath(path); - - return history.createLocation(_extends({}, location, { state: state }), undefined, key); - } - - function startPopStateListener(_ref) { - var transitionTo = _ref.transitionTo; - - function popStateListener(event) { - if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit. - - transitionTo(getCurrentLocation(event.state)); - } - - _DOMUtils.addEventListener(window, 'popstate', popStateListener); - - return function () { - _DOMUtils.removeEventListener(window, 'popstate', popStateListener); - }; - } - - function finishTransition(location) { - var basename = location.basename; - var pathname = location.pathname; - var search = location.search; - var hash = location.hash; - var state = location.state; - var action = location.action; - var key = location.key; - - if (action === _Actions.POP) return; // Nothing to do. - - _DOMStateStorage.saveState(key, state); - - var path = (basename || '') + pathname + search + hash; - var historyState = { - key: key - }; - - if (action === _Actions.PUSH) { - if (useRefresh) { - window.location.href = path; - return false; // Prevent location update. - } else { - window.history.pushState(historyState, null, path); - } - } else { - // REPLACE - if (useRefresh) { - window.location.replace(path); - return false; // Prevent location update. - } else { - window.history.replaceState(historyState, null, path); - } - } - } - - var history = _createDOMHistory2['default'](_extends({}, options, { - getCurrentLocation: getCurrentLocation, - finishTransition: finishTransition, - saveState: _DOMStateStorage.saveState - })); - - var listenerCount = 0, - stopPopStateListener = undefined; - - function listenBefore(listener) { - if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history); - - var unlisten = history.listenBefore(listener); - - return function () { - unlisten(); - - if (--listenerCount === 0) stopPopStateListener(); - }; - } - - function listen(listener) { - if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history); - - var unlisten = history.listen(listener); - - return function () { - unlisten(); - - if (--listenerCount === 0) stopPopStateListener(); - }; - } - - // deprecated - function registerTransitionHook(hook) { - if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history); - - history.registerTransitionHook(hook); - } - - // deprecated - function unregisterTransitionHook(hook) { - history.unregisterTransitionHook(hook); - - if (--listenerCount === 0) stopPopStateListener(); - } - - return _extends({}, history, { - listenBefore: listenBefore, - listen: listen, - registerTransitionHook: registerTransitionHook, - unregisterTransitionHook: unregisterTransitionHook - }); - } - - exports['default'] = createBrowserHistory; - module.exports = exports['default']; - -/***/ }, -/* 54 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _warning = __webpack_require__(4); - - var _warning2 = _interopRequireDefault(_warning); - - var _Actions = __webpack_require__(9); - - var _PathUtils = __webpack_require__(7); - - function createLocation() { - var location = arguments.length <= 0 || arguments[0] === undefined ? '/' : arguments[0]; - var action = arguments.length <= 1 || arguments[1] === undefined ? _Actions.POP : arguments[1]; - var key = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2]; - - var _fourthArg = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3]; - - if (typeof location === 'string') location = _PathUtils.parsePath(location); - - if (typeof action === 'object') { - false ? _warning2['default'](false, 'The state (2nd) argument to createLocation is deprecated; use a ' + 'location descriptor instead') : undefined; - - location = _extends({}, location, { state: action }); - - action = key || _Actions.POP; - key = _fourthArg; - } - - var pathname = location.pathname || '/'; - var search = location.search || ''; - var hash = location.hash || ''; - var state = location.state || null; - - return { - pathname: pathname, - search: search, - hash: hash, - state: state, - action: action, - key: key - }; - } - - exports['default'] = createLocation; - module.exports = exports['default']; - -/***/ }, -/* 55 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _warning = __webpack_require__(4); - - var _warning2 = _interopRequireDefault(_warning); - - var _invariant = __webpack_require__(3); - - var _invariant2 = _interopRequireDefault(_invariant); - - var _PathUtils = __webpack_require__(7); - - var _Actions = __webpack_require__(9); - - var _createHistory = __webpack_require__(28); - - var _createHistory2 = _interopRequireDefault(_createHistory); - - function createStateStorage(entries) { - return entries.filter(function (entry) { - return entry.state; - }).reduce(function (memo, entry) { - memo[entry.key] = entry.state; - return memo; - }, {}); - } - - function createMemoryHistory() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - if (Array.isArray(options)) { - options = { entries: options }; - } else if (typeof options === 'string') { - options = { entries: [options] }; - } - - var history = _createHistory2['default'](_extends({}, options, { - getCurrentLocation: getCurrentLocation, - finishTransition: finishTransition, - saveState: saveState, - go: go - })); - - var _options = options; - var entries = _options.entries; - var current = _options.current; - - if (typeof entries === 'string') { - entries = [entries]; - } else if (!Array.isArray(entries)) { - entries = ['/']; - } - - entries = entries.map(function (entry) { - var key = history.createKey(); - - if (typeof entry === 'string') return { pathname: entry, key: key }; - - if (typeof entry === 'object' && entry) return _extends({}, entry, { key: key }); - - true ? false ? _invariant2['default'](false, 'Unable to create history entry from %s', entry) : _invariant2['default'](false) : undefined; - }); - - if (current == null) { - current = entries.length - 1; - } else { - !(current >= 0 && current < entries.length) ? false ? _invariant2['default'](false, 'Current index must be >= 0 and < %s, was %s', entries.length, current) : _invariant2['default'](false) : undefined; - } - - var storage = createStateStorage(entries); - - function saveState(key, state) { - storage[key] = state; - } - - function readState(key) { - return storage[key]; - } - - function getCurrentLocation() { - var entry = entries[current]; - var key = entry.key; - var basename = entry.basename; - var pathname = entry.pathname; - var search = entry.search; - - var path = (basename || '') + pathname + (search || ''); - - var state = undefined; - if (key) { - state = readState(key); - } else { - state = null; - key = history.createKey(); - entry.key = key; - } - - var location = _PathUtils.parsePath(path); - - return history.createLocation(_extends({}, location, { state: state }), undefined, key); - } - - function canGo(n) { - var index = current + n; - return index >= 0 && index < entries.length; - } - - function go(n) { - if (n) { - if (!canGo(n)) { - false ? _warning2['default'](false, 'Cannot go(%s) there is not enough history', n) : undefined; - return; - } - - current += n; - - var currentLocation = getCurrentLocation(); - - // change action to POP - history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP })); - } - } - - function finishTransition(location) { - switch (location.action) { - case _Actions.PUSH: - current += 1; - - // if we are not on the top of stack - // remove rest and push new - if (current < entries.length) entries.splice(current); - - entries.push(location); - saveState(location.key, location.state); - break; - case _Actions.REPLACE: - entries[current] = location; - saveState(location.key, location.state); - break; - } - } - - return history; - } - - exports['default'] = createMemoryHistory; - module.exports = exports['default']; - -/***/ }, -/* 56 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - var strictUriEncode = __webpack_require__(57); - - exports.extract = function (str) { - return str.split('?')[1] || ''; - }; - - exports.parse = function (str) { - if (typeof str !== 'string') { - return {}; - } - - str = str.trim().replace(/^(\?|#|&)/, ''); - - if (!str) { - return {}; - } - - return str.split('&').reduce(function (ret, param) { - var parts = param.replace(/\+/g, ' ').split('='); - // Firefox (pre 40) decodes `%3D` to `=` - // https://github.com/sindresorhus/query-string/pull/37 - var key = parts.shift(); - var val = parts.length > 0 ? parts.join('=') : undefined; - - key = decodeURIComponent(key); - - // missing `=` should be `null`: - // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters - val = val === undefined ? null : decodeURIComponent(val); - - if (!ret.hasOwnProperty(key)) { - ret[key] = val; - } else if (Array.isArray(ret[key])) { - ret[key].push(val); - } else { - ret[key] = [ret[key], val]; - } - - return ret; - }, {}); - }; - - exports.stringify = function (obj) { - return obj ? Object.keys(obj).sort().map(function (key) { - var val = obj[key]; - - if (val === undefined) { - return ''; - } - - if (val === null) { - return key; - } - - if (Array.isArray(val)) { - return val.sort().map(function (val2) { - return strictUriEncode(key) + '=' + strictUriEncode(val2); - }).join('&'); - } - - return strictUriEncode(key) + '=' + strictUriEncode(val); - }).filter(function (x) { - return x.length > 0; - }).join('&') : ''; - }; - - -/***/ }, -/* 57 */ -/***/ function(module, exports) { - - 'use strict'; - module.exports = function (str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { - return '%' + c.charCodeAt(0).toString(16).toUpperCase(); - }); - }; - - -/***/ } -/******/ ]) -}); -; \ No newline at end of file diff --git a/public/javascripts/wechat/ReactRouter.min.js b/public/javascripts/wechat/ReactRouter.min.js deleted file mode 100644 index af370173e..000000000 --- a/public/javascripts/wechat/ReactRouter.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactRouter=t(require("react")):e.ReactRouter=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(37),a=r(o);t.Router=a["default"];var u=n(18),i=r(u);t.Link=i["default"];var s=n(31),c=r(s);t.IndexLink=c["default"];var f=n(32),l=r(f);t.IndexRedirect=l["default"];var d=n(33),p=r(d);t.IndexRoute=p["default"];var h=n(19),v=r(h);t.Redirect=v["default"];var y=n(35),g=r(y);t.Route=g["default"];var m=n(30),_=r(m);t.History=_["default"];var P=n(34),O=r(P);t.Lifecycle=O["default"];var R=n(36),x=r(R);t.RouteContext=x["default"];var w=n(48),b=r(w);t.useRoutes=b["default"];var M=n(5);t.createRoutes=M.createRoutes;var E=n(13),j=r(E);t.RouterContext=j["default"];var S=n(38),A=r(S);t.RoutingContext=A["default"];var C=n(6),k=r(C);t.PropTypes=k["default"];var T=n(46),H=r(T);t.match=H["default"];var L=n(24),q=r(L);t.useRouterHistory=q["default"];var U=n(8);t.formatPattern=U.formatPattern;var N=n(40),B=r(N);t.browserHistory=B["default"];var I=n(44),D=r(I);t.hashHistory=D["default"];var F=n(21),W=r(F);t.createMemoryHistory=W["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){t="[react-router] "+t;for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o]}t.__esModule=!0,t["default"]=o;var a=n(4);r(a);e.exports=t["default"]},function(t,n){t.exports=e},function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,u,i){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,u,i],f=0;s=new Error(t.replace(/%s/g,function(){return c[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};e.exports=r},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return null==e||p["default"].isValidElement(e)}function a(e){return o(e)||Array.isArray(e)&&e.every(o)}function u(e,t,n){e=e||"UnknownComponent";for(var r in t)if(t.hasOwnProperty(r)){var o=t[r](n,r,e);o instanceof Error}}function i(e,t){return l({},e,t)}function s(e){var t=e.type,n=i(t.defaultProps,e.props);if(t.propTypes&&u(t.displayName||t.name,t.propTypes,n),n.children){var r=c(n.children,n);r.length&&(n.childRoutes=r),delete n.children}return n}function c(e,t){var n=[];return p["default"].Children.forEach(e,function(e){if(p["default"].isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(s(e))}),n}function f(e){return a(e)?e=c(e):e&&!Array.isArray(e)&&(e=[e]),e}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t should not have a "'+t+'" prop'):void 0}t.__esModule=!0,t.falsy=r;var o=n(2),a=o.PropTypes.func,u=o.PropTypes.object,i=o.PropTypes.arrayOf,s=o.PropTypes.oneOfType,c=o.PropTypes.element,f=o.PropTypes.shape,l=o.PropTypes.string,d=f({listen:a.isRequired,pushState:a.isRequired,replaceState:a.isRequired,go:a.isRequired});t.history=d;var p=f({pathname:l.isRequired,search:l.isRequired,state:u,action:l.isRequired,key:l});t.location=p;var h=s([a,l]);t.component=h;var v=s([h,u]);t.components=v;var y=s([u,c]);t.route=y;var g=s([y,i(y)]);t.routes=g,t["default"]={falsy:r,history:d,location:p,component:h,components:v,route:y}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.match(/^https?:\/\/[^\/]*/);return null==t?e:e.substring(t[0].length)}function a(e){var t=o(e),n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substring(a),t=t.substring(0,a));var u=t.indexOf("?");return-1!==u&&(n=t.substring(u),t=t.substring(0,u)),""===t&&(t="/"),{pathname:t,search:n,hash:r}}t.__esModule=!0,t.extractPath=o,t.parsePath=a;var u=n(4);r(u)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function a(e){return o(e).replace(/\/+/g,"/+")}function u(e){for(var t="",n=[],r=[],o=void 0,u=0,i=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g;o=i.exec(e);)o.index!==u&&(r.push(e.slice(u,o.index)),t+=a(e.slice(u,o.index))),o[1]?(t+="([^/?#]+)",n.push(o[1])):"**"===o[0]?(t+="([\\s\\S]*)",n.push("splat")):"*"===o[0]?(t+="([\\s\\S]*?)",n.push("splat")):"("===o[0]?t+="(?:":")"===o[0]&&(t+=")?"),r.push(o[0]),u=i.lastIndex;return u!==e.length&&(r.push(e.slice(u,e.length)),t+=a(e.slice(u,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}function i(e){return e in h||(h[e]=u(e)),h[e]}function s(e,t){"/"!==e.charAt(0)&&(e="/"+e),"/"!==t.charAt(0)&&(t="/"+t);var n=i(e),r=n.regexpSource,o=n.paramNames,a=n.tokens;r+="/*";var u="*"!==a[a.length-1];u&&(r+="([\\s\\S]*?)");var s=t.match(new RegExp("^"+r+"$","i")),c=void 0,f=void 0;if(null!=s){if(u){c=s.pop();var l=s[0].substr(0,s[0].length-c.length);if(c&&"/"!==l.charAt(l.length-1))return{remainingPathname:null,paramNames:o,paramValues:null}}else c="";f=s.slice(1).map(function(e){return null!=e?decodeURIComponent(e):e})}else c=f=null;return{remainingPathname:c,paramNames:o,paramValues:f}}function c(e){return i(e).paramNames}function f(e,t){var n=s(e,t),r=n.paramNames,o=n.paramValues;return null!=o?r.reduce(function(e,t,n){return e[t]=o[n],e},{}):null}function l(e,t){t=t||{};for(var n=i(e),r=n.tokens,o=0,a="",u=0,s=void 0,c=void 0,f=void 0,l=0,d=r.length;d>l;++l)s=r[l],"*"===s||"**"===s?(f=Array.isArray(t.splat)?t.splat[u++]:t.splat,null!=f||o>0?void 0:p["default"](!1),null!=f&&(a+=encodeURI(f))):"("===s?o+=1:")"===s?o-=1:":"===s.charAt(0)?(c=s.substring(1),f=t[c],null!=f||o>0?void 0:p["default"](!1),null!=f&&(a+=encodeURIComponent(f))):a+=s;return a.replace(/\/+/g,"/")}t.__esModule=!0,t.compilePattern=i,t.matchPattern=s,t.getParamNames=c,t.getParams=f,t.formatPattern=l;var d=n(3),p=r(d),h={}},function(e,t){"use strict";t.__esModule=!0;var n="PUSH";t.PUSH=n;var r="REPLACE";t.REPLACE=r;var o="POP";t.POP=o,t["default"]={PUSH:n,REPLACE:r,POP:o}},function(e,t){"use strict";t.__esModule=!0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.canUseDOM=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return c.stringify(e).replace(/%20/g,"+")}function u(e){return function(){function t(e){if(null==e.query){var t=e.search;e.query=R(t.substring(1)),e[v]={search:t,searchBase:""}}return e}function n(e,t){var n,r=e[v],o=t?O(t):"";if(!r&&!o)return e;"string"==typeof e&&(e=d.parsePath(e));var a=void 0;a=r&&e.search===r.search?r.searchBase:e.search||"";var u=a;return o&&(u+=(u?"&":"?")+o),i({},e,(n={search:u},n[v]={search:u,searchBase:a},n))}function r(e){return w.listenBefore(function(n,r){l["default"](e,t(n),r)})}function u(e){return w.listen(function(n){e(t(n))})}function s(e){w.push(n(e,e.query))}function c(e){w.replace(n(e,e.query))}function f(e,t){return w.createPath(n(e,t||e.query))}function p(e,t){return w.createHref(n(e,t||e.query))}function g(e){for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;r>a;a++)o[a-1]=arguments[a];var u=w.createLocation.apply(w,[n(e,e.query)].concat(o));return e.query&&(u.query=e.query),t(u)}function m(e,t,n){"string"==typeof t&&(t=d.parsePath(t)),s(i({state:e},t,{query:n}))}function _(e,t,n){"string"==typeof t&&(t=d.parsePath(t)),c(i({state:e},t,{query:n}))}var P=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],O=P.stringifyQuery,R=P.parseQueryString,x=o(P,["stringifyQuery","parseQueryString"]),w=e(x);return"function"!=typeof O&&(O=a),"function"!=typeof R&&(R=y),i({},w,{listenBefore:r,listen:u,push:s,replace:c,createPath:f,createHref:p,createLocation:g,pushState:h["default"](m,"pushState is deprecated; use push instead"),replaceState:h["default"](_,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;tu&&c;)c=!1,t.call(this,u++,a,r);return s=!1,i?void n.apply(this,f):void(u>=e&&c&&(i=!0,n()))}}var u=0,i=!1,s=!1,c=!1,f=void 0;a()}function r(e,t,n){function r(e,t,r){u||(t?(u=!0,n(t)):(a[e]=r,u=++i===o,u&&n(null,a)))}var o=e.length,a=[];if(0===o)return n(null,a);var u=!1,i=0;e.forEach(function(e,n){t(e,n,function(e,t){r(n,e,t)})})}t.__esModule=!0;var o=Array.prototype.slice;t.loopAsync=n,t.mapAsync=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;ti;++i)a=o[i](e);n(a)})}function y(){if(O.routes){for(var e=d(O.routes),t=void 0,n=0,r=e.length;"string"!=typeof t&&r>n;++n)t=e[n]();return t}}function m(e){var t=c(e,!1);t&&(delete w[t],o(w)||(b&&(b(),b=null),M&&(M(),M=null)))}function _(t,n){var r=c(t),a=w[r];if(a)-1===a.indexOf(n)&&a.push(n);else{var u=!o(w);w[r]=[n],u&&(b=e.listenBefore(h),e.listenBeforeUnload&&(M=e.listenBeforeUnload(y)))}return function(){var e=w[r];if(e){var o=e.filter(function(e){return e!==n});0===o.length?m(t):w[r]=o}}}function P(t){return e.listen(function(n){O.location===n?t(null,O):a(n,function(n,r,o){n?t(n):r?e.transitionTo(r):o&&t(null,o)})})}var O={},R=void 0,x=1,w={},b=void 0,M=void 0;return{isActive:n,match:a,listenBeforeLeavingRoute:_,listen:P}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return 0===e.button}function u(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function i(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function s(e,t){var n=t.query,r=t.hash,o=t.state;return n||r||o?{pathname:e,query:n,hash:r,state:o}:e}t.__esModule=!0;var c=Object.assign||function(e){for(var t=1;t=0;r--){var o=e[r],a=o.path||"";if(n=a.replace(/\/*$/,"/")+n,0===a.indexOf("/"))break}return"/"+n}},propTypes:{path:d,from:d,to:d.isRequired,query:p,state:p,onEnter:f.falsy,children:f.falsy},render:function(){i["default"](!1)}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return u({},e,{setRouteLeaveHook:t.listenBeforeLeavingRoute,isActive:t.isActive})}function a(e,t){return e=u({},e,t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t=0&&0===window.sessionStorage.length)return;throw n}}function u(e){var t=void 0;try{t=window.sessionStorage.getItem(o(e))}catch(n){if(n.name===f)return null}if(t)try{return JSON.parse(t)}catch(n){}return null}t.__esModule=!0,t.saveState=a,t.readState=u;var i=n(4),s=(r(i),"@@History/"),c=["QuotaExceededError","QUOTA_EXCEEDED_ERR"],f="SecurityError"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){function t(e){return s.canUseDOM?void 0:i["default"](!1),n.listen(e)}var n=l["default"](a({getUserConfirmation:c.getUserConfirmation},e,{go:c.go}));return a({},n,{listen:t})}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return function(){function t(e){return _&&null==e.basename&&(0===e.pathname.indexOf(_)?(e.pathname=e.pathname.substring(_.length),e.basename=_,""===e.pathname&&(e.pathname="/")):e.basename=""),e}function n(e){if(!_)return e;"string"==typeof e&&(e=s.parsePath(e));var t=e.pathname,n="/"===_.slice(-1)?_:_+"/",r="/"===t.charAt(0)?t.slice(1):t,o=n+r;return u({},e,{pathname:o})}function r(e){return O.listenBefore(function(n,r){f["default"](e,t(n),r)})}function a(e){return O.listen(function(n){e(t(n))})}function c(e){O.push(n(e))}function l(e){O.replace(n(e))}function p(e){return O.createPath(n(e))}function h(e){return O.createHref(n(e))}function v(e){for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;r>a;a++)o[a-1]=arguments[a];return t(O.createLocation.apply(O,[n(e)].concat(o)))}function y(e,t){"string"==typeof t&&(t=s.parsePath(t)),c(u({state:e},t))}function g(e,t){"string"==typeof t&&(t=s.parsePath(t)),l(u({state:e},t))}var m=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_=m.basename,P=o(m,["basename"]),O=e(P);if(null==_&&i.canUseDOM){var R=document.getElementsByTagName("base")[0];R&&(_=s.extractPath(R.href))}return u({},O,{listenBefore:r,listen:a,push:c,replace:l,createPath:p,createHref:h,createLocation:v,pushState:d["default"](y,"pushState is deprecated; use push instead"),replaceState:d["default"](g,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return!e||!e.__v2_compatible__}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;tt;++t)e[t].onLeave&&e[t].onLeave.call(e[t])}t.__esModule=!0,t.runEnterHooks=u,t.runLeaveHooks=i;var s=n(12),c=n(1);r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(53),a=r(o),u=n(22),i=r(u);t["default"]=i["default"](a["default"]),e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){if(!e.path)return!1;var r=a.getParamNames(e.path);return r.some(function(e){return t.params[e]!==n.params[e]})}function o(e,t){var n=e&&e.routes,o=t.routes,a=void 0,u=void 0;return n?!function(){var i=!1;a=n.filter(function(n){if(i)return!0;var a=-1===o.indexOf(n)||r(n,e,t);return a&&(i=!0),a}),a.reverse(),u=o.filter(function(e){return-1===n.indexOf(e)||-1!==a.indexOf(e)})}():(a=[],u=o),{leaveRoutes:a,enterRoutes:u}}t.__esModule=!0;var a=n(8);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){t.component||t.components?n(null,t.component||t.components):t.getComponent?t.getComponent(e,n):t.getComponents?t.getComponents(e,n):n()}function o(e,t){a.mapAsync(e.routes,function(t,n,o){r(e.location,t,o)},t)}t.__esModule=!0;var a=n(12);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n={};if(!e.path)return n;var r=o.getParamNames(e.path);for(var a in t)t.hasOwnProperty(a)&&-1!==r.indexOf(a)&&(n[a]=t[a]);return n}t.__esModule=!0;var o=n(8);t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(27),a=r(o),u=n(22),i=r(u);t["default"]=i["default"](a["default"]),e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){if(e==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});if("object"==typeof e){for(var n in e)if(e.hasOwnProperty(n))if(void 0===e[n]){if(void 0!==t[n])return!1}else{if(!t.hasOwnProperty(n))return!1;if(!r(e[n],t[n]))return!1}return!0}return String(e)===String(t)}function o(e,t,n){return e.every(function(e,r){return String(t[r])===String(n[e])})}function a(e,t,n){for(var r=e,a=[],u=[],i=0,s=t.length;s>i;++i){var f=t[i],l=f.path||"";if("/"===l.charAt(0)&&(r=e,a=[],u=[]),null!==r){var d=c.matchPattern(l,r);r=d.remainingPathname,a=[].concat(a,d.paramNames),u=[].concat(u,d.paramValues)}if(""===r&&f.path&&o(a,u,n))return i}return null}function u(e,t,n,r){var o=a(e,t,n);return null===o?!1:r?t.slice(o+1).every(function(e){return!e.path}):!0}function i(e,t){return null==t?null==e:null==e?!0:r(e,t)}function s(e,t,n,r,o){var a=e.pathname,s=e.query;return null==n?!1:u(a,r,o,t)?i(s,n.query):!1}t.__esModule=!0,t["default"]=s;var c=n(8);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){var n=e.history,r=e.routes,a=e.location,i=o(e,["history","routes","location"]);n||a?void 0:s["default"](!1),n=n?n:f["default"](i);var c=d["default"](n,p.createRoutes(r)),l=void 0;a?a=n.createLocation(a):l=n.listen(function(e){a=e});var v=h.createRouterObject(n,c);n=h.createRoutingHistory(n,c),c.match(a,function(e,r,o){t(e,r,o&&u({},o,{history:n,router:v,matchContext:{history:n,transitionManager:c,router:v}})),l&&l()})}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=t.routes,r=o(t,["routes"]),a=s["default"](e)(r),i=f["default"](a,n);return u({},a,i)}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t0&&"number"!=typeof e[0]?!1:!0:!1}function a(e,t,n){var a,f;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(s(e))return s(t)?(e=u.call(e),t=u.call(t),c(e,t,n)):!1;if(o(e)){if(!o(t))return!1;if(e.length!==t.length)return!1;for(a=0;a=0;a--)if(l[a]!=d[a])return!1;for(a=l.length-1;a>=0;a--)if(f=l[a],!c(e[f],t[f],n))return!1;return typeof e==typeof t}var u=Array.prototype.slice,i=n(51),s=n(50),c=e.exports=function(e,t,n){return n||(n={}),e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:a(e,t,n)}},function(e,t){function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var o="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();t=e.exports=o?n:r,t.supported=n,t.unsupported=r},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}t=e.exports="function"==typeof Object.keys?Object.keys:n,t.shim=n},function(e,t){"use strict";function n(e,t,n){function r(){u=!0,n.apply(this,arguments)}function o(){u||(e>a?t.call(this,a++,o,r):r.apply(this,arguments))}var a=0,u=!1;o()}t.__esModule=!0,t.loopAsync=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){function e(e){e=e||window.history.state||{};var t=l.getWindowPath(),n=e,r=n.key,o=void 0;r?o=d.readState(r):(o=null,r=_.createKey(),g&&window.history.replaceState(a({},e,{key:r}),null,t));var u=c.parsePath(t);return _.createLocation(a({},u,{state:o}),void 0,r)}function t(t){function n(t){void 0!==t.state&&r(e(t.state))}var r=t.transitionTo;return l.addEventListener(window,"popstate",n),function(){l.removeEventListener(window,"popstate",n)}}function n(e){var t=e.basename,n=e.pathname,r=e.search,o=e.hash,a=e.state,u=e.action,i=e.key;if(u!==s.POP){d.saveState(i,a);var c=(t||"")+n+r+o,f={key:i};if(u===s.PUSH){if(m)return window.location.href=c,!1;window.history.pushState(f,null,c)}else{if(m)return window.location.replace(c),!1;window.history.replaceState(f,null,c)}}}function r(e){1===++P&&(O=t(_));var n=_.listenBefore(e);return function(){n(),0===--P&&O()}}function o(e){1===++P&&(O=t(_));var n=_.listen(e);return function(){n(),0===--P&&O()}}function u(e){1===++P&&(O=t(_)),_.registerTransitionHook(e)}function p(e){_.unregisterTransitionHook(e),0===--P&&O()}var v=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];f.canUseDOM?void 0:i["default"](!1);var y=v.forceRefresh,g=l.supportsHistory(),m=!g||y,_=h["default"](a({},v,{getCurrentLocation:e,finishTransition:n,saveState:d.saveState})),P=0,O=void 0;return a({},_,{listenBefore:r,listen:o,registerTransitionHook:u,unregisterTransitionHook:p})}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=0&&t=0&&y 0) { + cb(_openid); + } + var code = $routeParams.code; + $http({ + url: '/wechat/get_open_id', + data: {code: code}, + method: 'POST' + }).then(function successCallback(response) { + _openid = data.openid; + cb(_openid); + }, function errorCallback(response) { + cb(null); + }); + + }; + + + var setOpenId = function(id){ + _openid = id; + } + return {getOpenId: getOpenId, setOpenId: setOpenId}; +}); + +app.controller('ActivityController',function($scope, $http, auth){ + $scope.repaceUrl = function(url){ + return "http://www.trustie.net/" + url; + } + + $scope.activities = []; + $scope.page = 1; + + auth.getOpenId(function(openid){ + if(!openid){ + alert("获取openid出错"); + } else { + openid = openid; + $scope.loadActData($scope.page); + } + }); + + $scope.loadActData = function(page){ + $scope.page = page; + $http({ + method: 'POST', + url: apiUrl+ "activities", + data: {openid: openid, page: page}, + }).then(function successCallback(response) { + $scope.activities = $scope.activities.concat(response.data.data); + }, function errorCallback(response) { + }); + } + +}); + +app.controller('IssueController', function($scope, $http, $routeParams, auth){ + $scope.formData = {comment: ''}; + + var loadData = function(id){ + $http({ + method: 'GET', + url: apiUrl+ "issues/"+id, + }).then(function successCallback(response) { + console.log(response.data); + $scope.issue = response.data.data; + + }, function errorCallback(response) { + }); + } + + loadData($routeParams.id); + + + $scope.addIssueReply = function(data){ + console.log(data.comment); + + if(!data.comment || data.comment.length<=0){ + return; + } + + var userInfo = { + type: "Issue", + content: data.comment, + openid: openid, + }; + + $http({ + method: 'POST', + url: apiUrl+ "new_comment/"+$routeParams.id, + data: userInfo, + }).then(function successCallback(response) { + alert("提交成功"); + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }, function errorCallback(response) { + }); + } + + console.log(auth.getOpenId()); + +}); + +app.filter('safeHtml', function ($sce) { + return function (input) { + return $sce.trustAsHtml(input); + } +}); + +app.config(['$routeProvider',function ($routeProvider) { + $routeProvider + .when('/activities', { + templateUrl: 'activities.html', + controller: 'ActivityController' + }) + .when('/issues/:id', { + templateUrl: 'issue_detail.html', + controller: 'IssueController' + }) + .otherwise({ + redirectTo: '/activities' + }); +}]); \ No newline at end of file diff --git a/public/javascripts/wechat/browser.min.js b/public/javascripts/wechat/browser.min.js deleted file mode 100644 index 7566e1a59..000000000 --- a/public/javascripts/wechat/browser.min.js +++ /dev/null @@ -1,44 +0,0 @@ - -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.babel=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};util.inherits(assert.AssertionError,Error);function replacer(key,value){if(util.isUndefined(value)){return""+value}if(util.isNumber(value)&&!isFinite(value)){return value.toString()}if(util.isFunction(value)||util.isRegExp(value)){return value.toString()}return value}function truncate(s,n){if(util.isString(s)){return s.length=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};assert.notStrictEqual=function notStrictEqual(actual,expected,message){if(actual===expected){fail(actual,expected,message,"!==",assert.notStrictEqual)}};function expectedException(actual,expected){if(!actual||!expected){return false}if(Object.prototype.toString.call(expected)=="[object RegExp]"){return expected.test(actual)}else if(actual instanceof expected){return true}else if(expected.call({},actual)===true){return true}return false}function _throws(shouldThrow,block,expected,message){var actual;if(util.isString(expected)){message=expected;expected=null}try{block()}catch(e){actual=e}message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:".");if(shouldThrow&&!actual){fail(actual,expected,"Missing expected exception"+message)}if(!shouldThrow&&expectedException(actual,expected)){fail(actual,expected,"Got unwanted exception"+message)}if(shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual){throw actual}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,message){_throws.apply(this,[false].concat(pSlice.call(arguments)))};assert.ifError=function(err){if(err){throw err}};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){if(hasOwn.call(obj,key))keys.push(key)}return keys}},{"util/":30}],3:[function(require,module,exports){arguments[4][1][0].apply(exports,arguments)},{dup:1}],4:[function(require,module,exports){var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("is-array");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){function Bar(){}try{var arr=new Uint8Array(1);arr.foo=function(){return 42};arr.constructor=Bar;return arr.foo()===42&&arr.constructor===Bar&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}();function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Buffer(arg){if(!(this instanceof Buffer)){if(arguments.length>1)return new Buffer(arg,arguments[1]);return new Buffer(arg)}this.length=0;this.parent=undefined;if(typeof arg==="number"){return fromNumber(this,arg)}if(typeof arg==="string"){return fromString(this,arg,arguments.length>1?arguments[1]:"utf8")}return fromObject(this,arg)}function fromNumber(that,length){that=allocate(that,length<0?0:checked(length)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i>>1;if(fromPool)that.parent=rootParent;return that}function checked(length){if(length>=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;var i=0;var len=Math.min(x,y);while(i>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined;function slowToString(encoding,start,end){var loweredCase=false;start=start|0;end=end===undefined||end===Infinity?this.length:end|0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype.toString=function toString(){var length=this.length|0;if(length===0)return"";if(arguments.length===0)return utf8Slice(this,0,length);return slowToString.apply(this,arguments)};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.indexOf=function indexOf(val,byteOffset){if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset>>=0;if(this.length===0)return-1;if(byteOffset>=this.length)return-1;if(byteOffset<0)byteOffset=Math.max(this.length+byteOffset,0);if(typeof val==="string"){if(val.length===0)return-1;return String.prototype.indexOf.call(this,val,byteOffset)}if(Buffer.isBuffer(val)){return arrayIndexOf(this,val,byteOffset)}if(typeof val==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,val,byteOffset)}return arrayIndexOf(this,[val],byteOffset)}function arrayIndexOf(arr,val,byteOffset){var foundIndex=-1;for(var i=0;byteOffset+iremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"binary":return binaryWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){var res="";var tmp="";end=Math.min(buf.length,end);for(var i=start;ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||valuebuf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||valuebuf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=0;i--){target[i+targetStart]=this[i+start]}}else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i55295&&codePoint<57344){if(leadSurrogate){if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}else{codePoint=leadSurrogate-55296<<10|codePoint-56320|65536;leadSurrogate=null}}else{if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}else{leadSurrogate=codePoint;continue}}}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null}if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<2097152){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}},{"base64-js":5,ieee754:6,"is-array":7}],5:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],6:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],7:[function(require,module,exports){var isArray=Array.isArray;var str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],8:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}throw TypeError('Uncaught, unspecified "error" event.')}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:len=arguments.length;args=new Array(len-1);for(i=1;i0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-->0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1)}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else{while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.listenerCount=function(emitter,type){var ret;if(!emitter._events||!emitter._events[type])ret=0;else if(isFunction(emitter._events[type]))ret=1;else ret=emitter._events[type].length;return ret};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],9:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],10:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],11:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i1){for(var i=1;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(!addToFront)state.reading=false;if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(n===null||isNaN(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else{return state.length}}return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(typeof n!=="number"||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(ret!==null)this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==null&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;processNextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}}function forEach(xs,f){for(var i=0,l=xs.length;i-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string"){chunk=new Buffer(chunk,encoding)}return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding);if(Buffer.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:4}],28:[function(require,module,exports){exports.isatty=function(){return false};function ReadStream(){throw new Error("tty.ReadStream is not implemented")}exports.ReadStream=ReadStream;function WriteStream(){throw new Error("tty.ReadStream is not implemented")}exports.WriteStream=WriteStream},{}],29:[function(require,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],30:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i-1){if(array){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=require("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":29,_process:12,inherits:9}],31:[function(require,module,exports){(function(global){"use strict";require("./node");var transform=module.exports=require("../transformation");transform.options=require("../transformation/file/options");transform.version=require("../../package").version;transform.transform=transform;transform.run=function(code){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];opts.sourceMaps="inline";return new Function(transform(code,opts).code)()};transform.load=function(url,callback,opts,hold){if(opts===undefined)opts={};opts.filename=opts.filename||url;var xhr=global.ActiveXObject?new global.ActiveXObject("Microsoft.XMLHTTP"):new global.XMLHttpRequest;xhr.open("GET",url,true);if("overrideMimeType"in xhr)xhr.overrideMimeType("text/plain");xhr.onreadystatechange=function(){if(xhr.readyState!==4)return;var status=xhr.status;if(status===0||status===200){var param=[xhr.responseText,opts];if(!hold)transform.run.apply(transform,param);if(callback)callback(param)}else{throw new Error("Could not load "+url)}};xhr.send(null)};var runScripts=function runScripts(){var scripts=[];var types=["text/ecmascript-6","text/6to5","text/babel","module"];var index=0;var exec=function exec(){var param=scripts[index];if(param instanceof Array){transform.run.apply(transform,param);index++;exec()}};var run=function run(script,i){var opts={};if(script.src){transform.load(script.src,function(param){scripts[i]=param;exec()},opts,true)}else{opts.filename="embedded";scripts[i]=[script.innerHTML,opts]}};var _scripts=global.document.getElementsByTagName("script");for(var i=0;i<_scripts.length;++i){var _script=_scripts[i];if(types.indexOf(_script.type)>=0)scripts.push(_script)}for(i in scripts){run(scripts[i],i)}exec()};if(global.addEventListener){global.addEventListener("DOMContentLoaded",runScripts,false)}else if(global.attachEvent){global.attachEvent("onload",runScripts)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../../package":631,"../transformation":83,"../transformation/file/options":66,"./node":32}],32:[function(require,module,exports){"use strict";exports.__esModule=true;exports.register=register;exports.polyfill=polyfill;exports.transformFile=transformFile;exports.transformFileSync=transformFileSync;exports.parse=parse;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashLangIsFunction=require("lodash/lang/isFunction");var _lodashLangIsFunction2=_interopRequireDefault(_lodashLangIsFunction);var _transformation=require("../transformation");var _transformation2=_interopRequireDefault(_transformation);var _babylon=require("babylon");var babylon=_interopRequireWildcard(_babylon);var _util=require("../util");var util=_interopRequireWildcard(_util);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _types=require("../types");var t=_interopRequireWildcard(_types);exports.util=util;exports.acorn=babylon;exports.transform=_transformation2["default"];exports.pipeline=_transformation.pipeline;exports.canCompile=_util.canCompile;var _transformationFile=require("../transformation/file");exports.File=_interopRequire(_transformationFile);var _transformationFileOptionsConfig=require("../transformation/file/options/config");exports.options=_interopRequire(_transformationFileOptionsConfig);var _transformationPlugin=require("../transformation/plugin");exports.Plugin=_interopRequire(_transformationPlugin);var _transformationTransformer=require("../transformation/transformer");exports.Transformer=_interopRequire(_transformationTransformer);var _transformationPipeline=require("../transformation/pipeline");exports.Pipeline=_interopRequire(_transformationPipeline);var _traversal=require("../traversal");exports.traverse=_interopRequire(_traversal);var _toolsBuildExternalHelpers=require("../tools/build-external-helpers");exports.buildExternalHelpers=_interopRequire(_toolsBuildExternalHelpers);var _package=require("../../package");exports.version=_package.version; -exports.types=t;function register(opts){var callback=require("./register/node-polyfill");if(opts!=null)callback(opts);return callback}function polyfill(){require("../polyfill")}function transformFile(filename,opts,callback){if(_lodashLangIsFunction2["default"](opts)){callback=opts;opts={}}opts.filename=filename;_fs2["default"].readFile(filename,function(err,code){if(err)return callback(err);var result;try{result=_transformation2["default"](code,opts)}catch(err){return callback(err)}callback(null,result)})}function transformFileSync(filename){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];opts.filename=filename;return _transformation2["default"](_fs2["default"].readFileSync(filename,"utf8"),opts)}function parse(code){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];opts.allowHashBang=true;opts.sourceType="module";opts.ecmaVersion=Infinity;opts.plugins={jsx:true,flow:true};opts.features={};for(var key in _transformation2["default"].pipeline.transformers){opts.features[key]=true}var ast=babylon.parse(code,opts);if(opts.onToken){var _opts$onToken;(_opts$onToken=opts.onToken).push.apply(_opts$onToken,ast.tokens)}if(opts.onComment){var _opts$onComment;(_opts$onComment=opts.onComment).push.apply(_opts$onComment,ast.comments)}return ast.program}},{"../../package":631,"../polyfill":61,"../tools/build-external-helpers":62,"../transformation":83,"../transformation/file":63,"../transformation/file/options/config":65,"../transformation/pipeline":97,"../transformation/plugin":99,"../transformation/transformer":100,"../traversal":165,"../types":196,"../util":199,"./register/node-polyfill":34,babylon:633,fs:1,"lodash/lang/isFunction":526}],33:[function(require,module,exports){"use strict";exports.__esModule=true;require("../../polyfill");exports["default"]=function(){};module.exports=exports["default"]},{"../../polyfill":61}],34:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}require("../../polyfill");var _node=require("./node");exports["default"]=_interopRequire(_node);module.exports=exports["default"]},{"../../polyfill":61,"./node":33}],35:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _trimRight=require("trim-right");var _trimRight2=_interopRequireDefault(_trimRight);var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var Buffer=function(){function Buffer(position,format){_classCallCheck(this,Buffer);this.parenPushNewlineState=null;this.position=position;this._indent=format.indent.base;this.format=format;this.buf=""}Buffer.prototype.get=function get(){return _trimRight2["default"](this.buf)};Buffer.prototype.getIndent=function getIndent(){if(this.format.compact||this.format.concise){return""}else{return _repeating2["default"](this.format.indent.style,this._indent)}};Buffer.prototype.indentSize=function indentSize(){return this.getIndent().length};Buffer.prototype.indent=function indent(){this._indent++};Buffer.prototype.dedent=function dedent(){this._indent--};Buffer.prototype.semicolon=function semicolon(){this.push(";")};Buffer.prototype.ensureSemicolon=function ensureSemicolon(){if(!this.isLast(";"))this.semicolon()};Buffer.prototype.rightBrace=function rightBrace(){this.newline(true);this.push("}")};Buffer.prototype.keyword=function keyword(name){this.push(name);this.space()};Buffer.prototype.space=function space(force){if(!force&&this.format.compact)return;if(force||this.buf&&!this.isLast(" ")&&!this.isLast("\n")){this.push(" ")}};Buffer.prototype.removeLast=function removeLast(cha){if(this.format.compact)return;if(!this.isLast(cha))return;this.buf=this.buf.substr(0,this.buf.length-1);this.position.unshift(cha)};Buffer.prototype.startTerminatorless=function startTerminatorless(){return this.parenPushNewlineState={printed:false}};Buffer.prototype.endTerminatorless=function endTerminatorless(state){if(state.printed){this.dedent();this.newline();this.push(")")}};Buffer.prototype.newline=function newline(i,removeLast){if(this.format.compact||this.format.retainLines)return;if(this.format.concise){this.space();return}removeLast=removeLast||false;if(_lodashLangIsNumber2["default"](i)){i=Math.min(2,i);if(this.endsWith("{\n")||this.endsWith(":\n"))i--;if(i<=0)return;while(i>0){this._newline(removeLast);i--}return}if(_lodashLangIsBoolean2["default"](i)){removeLast=i}this._newline(removeLast)};Buffer.prototype._newline=function _newline(removeLast){if(this.endsWith("\n\n"))return;if(removeLast&&this.isLast("\n"))this.removeLast("\n");this.removeLast(" ");this._removeSpacesAfterLastNewline();this._push("\n")};Buffer.prototype._removeSpacesAfterLastNewline=function _removeSpacesAfterLastNewline(){var lastNewlineIndex=this.buf.lastIndexOf("\n");if(lastNewlineIndex===-1){return}var index=this.buf.length-1;while(index>lastNewlineIndex){if(this.buf[index]!==" "){break}index--}if(index===lastNewlineIndex){this.buf=this.buf.substring(0,index+1)}};Buffer.prototype.push=function push(str,noIndent){if(!this.format.compact&&this._indent&&!noIndent&&str!=="\n"){var indent=this.getIndent();str=str.replace(/\n/g,"\n"+indent);if(this.isLast("\n"))this._push(indent)}this._push(str)};Buffer.prototype._push=function _push(str){var parenPushNewlineState=this.parenPushNewlineState;if(parenPushNewlineState){for(var i=0;i")}this.space();print.plain(node.returnType)}function FunctionTypeParam(node,print){print.plain(node.name);if(node.optional)this.push("?");this.push(":");this.space();print.plain(node.typeAnnotation)}function InterfaceExtends(node,print){print.plain(node.id);print.plain(node.typeParameters)}exports.ClassImplements=InterfaceExtends;exports.GenericTypeAnnotation=InterfaceExtends;function _interfaceish(node,print){print.plain(node.id);print.plain(node.typeParameters);if(node["extends"].length){this.push(" extends ");print.join(node["extends"],{separator:", "})}this.space();print.plain(node.body)}function InterfaceDeclaration(node,print){this.push("interface ");this._interfaceish(node,print)}function IntersectionTypeAnnotation(node,print){print.join(node.types,{separator:" & "})}function MixedTypeAnnotation(){this.push("mixed")}function NullableTypeAnnotation(node,print){this.push("?");print.plain(node.typeAnnotation)}var _types2=require("./types");exports.NumberLiteralTypeAnnotation=_types2.Literal;function NumberTypeAnnotation(){this.push("number")}function StringLiteralTypeAnnotation(node){this.push(this._stringLiteral(node.value))}function StringTypeAnnotation(){this.push("string")}function TupleTypeAnnotation(node,print){this.push("[");print.join(node.types,{separator:", "});this.push("]")}function TypeofTypeAnnotation(node,print){this.push("typeof ");print.plain(node.argument)}function TypeAlias(node,print){this.push("type ");print.plain(node.id);print.plain(node.typeParameters);this.space();this.push("=");this.space();print.plain(node.right);this.semicolon()}function TypeAnnotation(node,print){this.push(":");this.space();if(node.optional)this.push("?");print.plain(node.typeAnnotation)}function TypeParameterInstantiation(node,print){this.push("<");print.join(node.params,{separator:", ",iterator:function iterator(node){print.plain(node.typeAnnotation)}});this.push(">")}exports.TypeParameterDeclaration=TypeParameterInstantiation;function ObjectTypeAnnotation(node,print){var _this=this;this.push("{");var props=node.properties.concat(node.callProperties,node.indexers);if(props.length){this.space();print.list(props,{separator:false,indent:true,iterator:function iterator(){if(props.length!==1){_this.semicolon();_this.space()}}});this.space()}this.push("}")}function ObjectTypeCallProperty(node,print){if(node["static"])this.push("static ");print.plain(node.value)}function ObjectTypeIndexer(node,print){if(node["static"])this.push("static ");this.push("[");print.plain(node.id);this.push(":");this.space();print.plain(node.key);this.push("]");this.push(":");this.space();print.plain(node.value)}function ObjectTypeProperty(node,print){if(node["static"])this.push("static ");print.plain(node.key);if(node.optional)this.push("?");if(!t.isFunctionTypeAnnotation(node.value)){this.push(":");this.space()}print.plain(node.value)}function QualifiedTypeIdentifier(node,print){print.plain(node.qualification);this.push(".");print.plain(node.id)}function UnionTypeAnnotation(node,print){print.join(node.types,{separator:" | "})}function TypeCastExpression(node,print){this.push("(");print.plain(node.expression);print.plain(node.typeAnnotation);this.push(")")}function VoidTypeAnnotation(){this.push("void")}},{"../../types":196,"./types":46}],41:[function(require,module,exports){"use strict";exports.__esModule=true;exports.JSXAttribute=JSXAttribute;exports.JSXIdentifier=JSXIdentifier;exports.JSXNamespacedName=JSXNamespacedName;exports.JSXMemberExpression=JSXMemberExpression;exports.JSXSpreadAttribute=JSXSpreadAttribute;exports.JSXExpressionContainer=JSXExpressionContainer;exports.JSXElement=JSXElement;exports.JSXOpeningElement=JSXOpeningElement;exports.JSXClosingElement=JSXClosingElement;exports.JSXEmptyExpression=JSXEmptyExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function JSXAttribute(node,print){print.plain(node.name);if(node.value){this.push("=");print.plain(node.value)}}function JSXIdentifier(node){this.push(node.name)}function JSXNamespacedName(node,print){print.plain(node.namespace);this.push(":");print.plain(node.name)}function JSXMemberExpression(node,print){print.plain(node.object);this.push(".");print.plain(node.property)}function JSXSpreadAttribute(node,print){this.push("{...");print.plain(node.argument);this.push("}")}function JSXExpressionContainer(node,print){this.push("{");print.plain(node.expression);this.push("}")}function JSXElement(node,print){var open=node.openingElement;print.plain(open);if(open.selfClosing)return;this.indent();var _arr=node.children;for(var _i=0;_i<_arr.length;_i++){var child=_arr[_i];if(t.isLiteral(child)){this.push(child.value,true)}else{print.plain(child)}}this.dedent();print.plain(node.closingElement)}function JSXOpeningElement(node,print){this.push("<");print.plain(node.name);if(node.attributes.length>0){this.push(" ");print.join(node.attributes,{separator:" "})}this.push(node.selfClosing?" />":">")}function JSXClosingElement(node,print){this.push("")}function JSXEmptyExpression(){}},{"../../types":196}],42:[function(require,module,exports){"use strict";exports.__esModule=true;exports._params=_params;exports._method=_method;exports.FunctionExpression=FunctionExpression;exports.ArrowFunctionExpression=ArrowFunctionExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function _params(node,print){var _this=this;print.plain(node.typeParameters);this.push("(");print.list(node.params,{iterator:function iterator(node){if(node.optional)_this.push("?");print.plain(node.typeAnnotation)}});this.push(")");if(node.returnType){print.plain(node.returnType)}}function _method(node,print){var value=node.value;var kind=node.kind;var key=node.key;if(kind==="method"||kind==="init"){if(value.generator){this.push("*")}}if(kind==="get"||kind==="set"){this.push(kind+" ")}if(value.async)this.push("async ");if(node.computed){this.push("[");print.plain(key);this.push("]")}else{print.plain(key)}this._params(value,print);this.space();print.plain(value.body)}function FunctionExpression(node,print){if(node.async)this.push("async ");this.push("function");if(node.generator)this.push("*");if(node.id){this.push(" ");print.plain(node.id)}else{this.space()}this._params(node,print);this.space();print.plain(node.body)}exports.FunctionDeclaration=FunctionExpression;function ArrowFunctionExpression(node,print){if(node.async)this.push("async ");if(node.params.length===1&&t.isIdentifier(node.params[0])){print.plain(node.params[0])}else{this._params(node,print)}this.push(" => ");var bodyNeedsParens=t.isObjectExpression(node.body);if(bodyNeedsParens){this.push("(")}print.plain(node.body);if(bodyNeedsParens){this.push(")")}}},{"../../types":196}],43:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ImportSpecifier=ImportSpecifier;exports.ImportDefaultSpecifier=ImportDefaultSpecifier;exports.ExportDefaultSpecifier=ExportDefaultSpecifier;exports.ExportSpecifier=ExportSpecifier;exports.ExportNamespaceSpecifier=ExportNamespaceSpecifier;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ImportDeclaration=ImportDeclaration;exports.ImportNamespaceSpecifier=ImportNamespaceSpecifier;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function ImportSpecifier(node,print){print.plain(node.imported);if(node.local&&node.local.name!==node.imported.name){this.push(" as ");print.plain(node.local)}}function ImportDefaultSpecifier(node,print){print.plain(node.local)}function ExportDefaultSpecifier(node,print){print.plain(node.exported)}function ExportSpecifier(node,print){print.plain(node.local);if(node.exported&&node.local.name!==node.exported.name){this.push(" as ");print.plain(node.exported)}}function ExportNamespaceSpecifier(node,print){this.push("* as ");print.plain(node.exported)}function ExportAllDeclaration(node,print){this.push("export *");if(node.exported){this.push(" as ");print.plain(node.exported)}this.push(" from ");print.plain(node.source);this.semicolon()}function ExportNamedDeclaration(node,print){this.push("export ");ExportDeclaration.call(this,node,print)}function ExportDefaultDeclaration(node,print){this.push("export default ");ExportDeclaration.call(this,node,print)}function ExportDeclaration(node,print){var specifiers=node.specifiers;if(node.declaration){var declar=node.declaration;print.plain(declar);if(t.isStatement(declar)||t.isFunction(declar)||t.isClass(declar))return}else{if(node.exportKind==="type"){this.push("type ")}var first=specifiers[0];var hasSpecial=false;if(t.isExportDefaultSpecifier(first)||t.isExportNamespaceSpecifier(first)){hasSpecial=true;print.plain(specifiers.shift());if(specifiers.length){this.push(", ")}}if(specifiers.length||!specifiers.length&&!hasSpecial){this.push("{");if(specifiers.length){this.space();print.join(specifiers,{separator:", "});this.space()}this.push("}")}if(node.source){this.push(" from ");print.plain(node.source)}}this.ensureSemicolon()}function ImportDeclaration(node,print){this.push("import ");if(node.importKind==="type"||node.importKind==="typeof"){this.push(node.importKind+" ")}var specfiers=node.specifiers;if(specfiers&&specfiers.length){var first=node.specifiers[0];if(t.isImportDefaultSpecifier(first)||t.isImportNamespaceSpecifier(first)){print.plain(node.specifiers.shift());if(node.specifiers.length){this.push(", ")}}if(node.specifiers.length){this.push("{");this.space();print.join(node.specifiers,{separator:", "});this.space();this.push("}")}this.push(" from ")}print.plain(node.source);this.semicolon()}function ImportNamespaceSpecifier(node,print){this.push("* as ");print.plain(node.local)}},{"../../types":196}],44:[function(require,module,exports){"use strict";exports.__esModule=true;exports.WithStatement=WithStatement;exports.IfStatement=IfStatement;exports.ForStatement=ForStatement;exports.WhileStatement=WhileStatement;exports.DoWhileStatement=DoWhileStatement;exports.LabeledStatement=LabeledStatement;exports.TryStatement=TryStatement;exports.CatchClause=CatchClause;exports.SwitchStatement=SwitchStatement;exports.SwitchCase=SwitchCase;exports.DebuggerStatement=DebuggerStatement;exports.VariableDeclaration=VariableDeclaration;exports.VariableDeclarator=VariableDeclarator;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _types=require("../../types");var t=_interopRequireWildcard(_types);function WithStatement(node,print){this.keyword("with");this.push("(");print.plain(node.object);this.push(")");print.block(node.body)}function IfStatement(node,print){this.keyword("if");this.push("(");print.plain(node.test);this.push(")");this.space();print.indentOnComments(node.consequent);if(node.alternate){if(this.isLast("}"))this.space();this.push("else ");print.indentOnComments(node.alternate)}}function ForStatement(node,print){this.keyword("for");this.push("(");print.plain(node.init);this.push(";");if(node.test){this.space();print.plain(node.test)}this.push(";");if(node.update){this.space();print.plain(node.update)}this.push(")");print.block(node.body)}function WhileStatement(node,print){this.keyword("while");this.push("(");print.plain(node.test);this.push(")");print.block(node.body)}var buildForXStatement=function buildForXStatement(op){return function(node,print){this.keyword("for");this.push("(");print.plain(node.left);this.push(" "+op+" ");print.plain(node.right);this.push(")");print.block(node.body)}};var ForInStatement=buildForXStatement("in");exports.ForInStatement=ForInStatement;var ForOfStatement=buildForXStatement("of");exports.ForOfStatement=ForOfStatement;function DoWhileStatement(node,print){this.push("do ");print.plain(node.body);this.space();this.keyword("while");this.push("(");print.plain(node.test);this.push(");")}var buildLabelStatement=function buildLabelStatement(prefix){var key=arguments.length<=1||arguments[1]===undefined?"label":arguments[1];return function(node,print){this.push(prefix);var label=node[key];if(label){this.push(" ");var terminatorState=this.startTerminatorless();print.plain(label);this.endTerminatorless(terminatorState)}this.semicolon()}};var ContinueStatement=buildLabelStatement("continue");exports.ContinueStatement=ContinueStatement;var ReturnStatement=buildLabelStatement("return","argument");exports.ReturnStatement=ReturnStatement;var BreakStatement=buildLabelStatement("break");exports.BreakStatement=BreakStatement;var ThrowStatement=buildLabelStatement("throw","argument");exports.ThrowStatement=ThrowStatement;function LabeledStatement(node,print){print.plain(node.label);this.push(": ");print.plain(node.body)}function TryStatement(node,print){this.keyword("try");print.plain(node.block);this.space();if(node.handlers){print.plain(node.handlers[0])}else{print.plain(node.handler)}if(node.finalizer){this.space();this.push("finally ");print.plain(node.finalizer)}}function CatchClause(node,print){this.keyword("catch");this.push("(");print.plain(node.param);this.push(") ");print.plain(node.body)}function SwitchStatement(node,print){this.keyword("switch");this.push("(");print.plain(node.discriminant);this.push(")");this.space();this.push("{");print.sequence(node.cases,{indent:true,addNewlines:function addNewlines(leading,cas){if(!leading&&node.cases[node.cases.length-1]===cas)return-1}});this.push("}"); -}function SwitchCase(node,print){if(node.test){this.push("case ");print.plain(node.test);this.push(":")}else{this.push("default:")}if(node.consequent.length){this.newline();print.sequence(node.consequent,{indent:true})}}function DebuggerStatement(){this.push("debugger;")}function VariableDeclaration(node,print,parent){this.push(node.kind+" ");var hasInits=false;if(!t.isFor(parent)){var _arr=node.declarations;for(var _i=0;_i<_arr.length;_i++){var declar=_arr[_i];if(declar.init){hasInits=true}}}var sep;if(!this.format.compact&&!this.format.concise&&hasInits&&!this.format.retainLines){sep=",\n"+_repeating2["default"](" ",node.kind.length+1)}print.list(node.declarations,{separator:sep});if(t.isFor(parent)){if(parent.left===node||parent.init===node)return}this.semicolon()}function VariableDeclarator(node,print){print.plain(node.id);print.plain(node.id.typeAnnotation);if(node.init){this.space();this.push("=");this.space();print.plain(node.init)}}},{"../../types":196,repeating:611}],45:[function(require,module,exports){"use strict";exports.__esModule=true;exports.TaggedTemplateExpression=TaggedTemplateExpression;exports.TemplateElement=TemplateElement;exports.TemplateLiteral=TemplateLiteral;function TaggedTemplateExpression(node,print){print.plain(node.tag);print.plain(node.quasi)}function TemplateElement(node){this._push(node.value.raw)}function TemplateLiteral(node,print){this.push("`");var quasis=node.quasis;var len=quasis.length;for(var i=0;i0)this.space();print.plain(elem);if(i1e5;if(format.compact){console.error("[BABEL] "+messages.get("codeGeneratorDeopt",opts.filename,"100KB"))}}if(format.compact){format.indent.adjustMultilineComment=false}return format};CodeGenerator.findCommonStringDelimiter=function findCommonStringDelimiter(code,tokens){var occurences={single:0,"double":0};var checked=0;for(var i=0;i=3)break}if(occurences.single>occurences.double){return"single"}else{return"double"}};CodeGenerator.prototype.generate=function generate(){var ast=this.ast;this.print(ast);if(ast.comments){var comments=[];var _arr=ast.comments;for(var _i=0;_i<_arr.length;_i++){var comment=_arr[_i];if(!comment._displayed)comments.push(comment)}this._printComments(comments)}return{map:this.map.get(),code:this.buffer.get()}};CodeGenerator.prototype.buildPrint=function buildPrint(parent){return new _nodePrinter2["default"](this,parent)};CodeGenerator.prototype.catchUp=function catchUp(node){if(node.loc&&this.format.retainLines&&this.buffer.buf){while(this.position.line=0||comment.value.indexOf("@preserve")>=0){return true}else{return this.format.comments}}};CodeGenerator.prototype._printComments=function _printComments(comments){if(!comments||!comments.length)return;var _arr3=comments;for(var _i3=0;_i3<_arr3.length;_i3++){var comment=_arr3[_i3];if(!this.shouldPrintComment(comment))continue;if(comment._displayed)continue;comment._displayed=true;this.catchUp(comment);this.newline(this.whitespace.getNewlinesBefore(comment));var column=this.position.column;var val=this.generateComment(comment);if(column&&!this.isLast(["\n"," ","[","{"])){this._push(" ");column++}if(comment.type==="CommentBlock"&&this.format.indent.adjustMultilineComment){var offset=comment.loc&&comment.loc.start.column;if(offset){var newlineRegex=new RegExp("\\n\\s{1,"+offset+"}","g");val=val.replace(newlineRegex,"\n")}var indent=Math.max(this.indentSize(),column);val=val.replace(/\n/g,"\n"+_repeating2["default"](" ",indent))}if(column===0){val=this.getIndent()+val}if((this.format.compact||this.format.retainLines)&&comment.type==="CommentLine"){val+="\n"}this._push(val);this.newline(this.whitespace.getNewlinesAfter(comment))}};_createClass(CodeGenerator,null,[{key:"generators",value:{templateLiterals:require("./generators/template-literals"),comprehensions:require("./generators/comprehensions"),expressions:require("./generators/expressions"),statements:require("./generators/statements"),classes:require("./generators/classes"),methods:require("./generators/methods"),modules:require("./generators/modules"),types:require("./generators/types"),flow:require("./generators/flow"),base:require("./generators/base"),jsx:require("./generators/jsx")},enumerable:true}]);return CodeGenerator}();_lodashCollectionEach2["default"](_buffer2["default"].prototype,function(fn,key){CodeGenerator.prototype[key]=function(){return fn.apply(this.buffer,arguments)}});_lodashCollectionEach2["default"](CodeGenerator.generators,function(generator){_lodashObjectExtend2["default"](CodeGenerator.prototype,generator)});module.exports=function(ast,opts,code){var gen=new CodeGenerator(ast,opts,code);return gen.generate()};module.exports.CodeGenerator=CodeGenerator},{"../messages":60,"../types":196,"./buffer":35,"./generators/base":36,"./generators/classes":37,"./generators/comprehensions":38,"./generators/expressions":39,"./generators/flow":40,"./generators/jsx":41,"./generators/methods":42,"./generators/modules":43,"./generators/statements":44,"./generators/template-literals":45,"./generators/types":46,"./node":48,"./node/printer":50,"./position":52,"./source-map":53,"./whitespace":54,"detect-indent":409,"lodash/collection/each":437,"lodash/object/extend":537,repeating:611}],48:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _whitespace=require("./whitespace");var _whitespace2=_interopRequireDefault(_whitespace);var _parentheses=require("./parentheses");var parens=_interopRequireWildcard(_parentheses);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashCollectionSome=require("lodash/collection/some");var _lodashCollectionSome2=_interopRequireDefault(_lodashCollectionSome);var _types=require("../../types");var t=_interopRequireWildcard(_types);var find=function find(obj,node,parent){if(!obj)return;var result;var types=Object.keys(obj);for(var i=0;i","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(tier,i){_lodashCollectionEach2["default"](tier,function(op){PRECEDENCE[op]=i})});function NullableTypeAnnotation(node,parent){return t.isArrayTypeAnnotation(parent)}exports.FunctionTypeAnnotation=NullableTypeAnnotation;function UpdateExpression(node,parent){if(t.isMemberExpression(parent)&&parent.object===node){return true}}function ObjectExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function Binary(node,parent){if((t.isCallExpression(parent)||t.isNewExpression(parent))&&parent.callee===node){return true}if(t.isUnaryLike(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isBinary(parent)){var parentOp=parent.operator;var parentPos=PRECEDENCE[parentOp];var nodeOp=node.operator;var nodePos=PRECEDENCE[nodeOp];if(parentPos>nodePos){return true}if(parentPos===nodePos&&parent.right===node){return true}}}function BinaryExpression(node,parent){if(node.operator==="in"){if(t.isVariableDeclarator(parent)){return true}if(t.isFor(parent)){return true}}}function SequenceExpression(node,parent){if(t.isForStatement(parent)){return false}if(t.isExpressionStatement(parent)&&parent.expression===node){return false}return true}function YieldExpression(node,parent){return t.isBinary(parent)||t.isUnaryLike(parent)||t.isCallExpression(parent)||t.isMemberExpression(parent)||t.isNewExpression(parent)||t.isConditionalExpression(parent)||t.isYieldExpression(parent)}function ClassExpression(node,parent){return t.isExpressionStatement(parent)}function UnaryLike(node,parent){return t.isMemberExpression(parent)&&parent.object===node}function FunctionExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isCallExpression(parent)&&parent.callee===node){return true}}function ConditionalExpression(node,parent){if(t.isUnaryLike(parent)){return true}if(t.isBinary(parent)){return true}if(t.isCallExpression(parent)||t.isNewExpression(parent)){if(parent.callee===node){return true}}if(t.isConditionalExpression(parent)&&parent.test===node){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function AssignmentExpression(node){if(t.isObjectPattern(node.left)){return true}else{return ConditionalExpression.apply(undefined,arguments)}}},{"../../types":196,"lodash/collection/each":437}],50:[function(require,module,exports){"use strict";exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var NodePrinter=function(){function NodePrinter(generator,parent){_classCallCheck(this,NodePrinter);this.generator=generator;this.parent=parent}NodePrinter.prototype.printInnerComments=function printInnerComments(){if(!this.parent.innerComments)return;var gen=this.generator;gen.indent();gen._printComments(this.parent.innerComments);gen.dedent()};NodePrinter.prototype.plain=function plain(node,opts){return this.generator.print(node,this.parent,opts)};NodePrinter.prototype.sequence=function sequence(nodes){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];opts.statement=true;return this.generator.printJoin(this,nodes,opts)};NodePrinter.prototype.join=function join(nodes,opts){return this.generator.printJoin(this,nodes,opts)};NodePrinter.prototype.list=function list(items){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];if(opts.separator==null){opts.separator=",";if(!this.generator.format.compact)opts.separator+=" "}return this.join(items,opts)};NodePrinter.prototype.block=function block(node){return this.generator.printBlock(this,node)};NodePrinter.prototype.indentOnComments=function indentOnComments(node){return this.generator.printAndIndentOnComments(this,node)};return NodePrinter}();exports["default"]=NodePrinter;module.exports=exports["default"]},{}],51:[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashCollectionMap=require("lodash/collection/map");var _lodashCollectionMap2=_interopRequireDefault(_lodashCollectionMap);var _types=require("../../types");var t=_interopRequireWildcard(_types);function crawl(node){var state=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];if(t.isMemberExpression(node)){crawl(node.object,state);if(node.computed)crawl(node.property,state)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){crawl(node.left,state);crawl(node.right,state)}else if(t.isCallExpression(node)){state.hasCall=true;crawl(node.callee,state)}else if(t.isFunction(node)){state.hasFunction=true}else if(t.isIdentifier(node)){state.hasHelper=state.hasHelper||isHelper(node.callee)}return state}function isHelper(node){if(t.isMemberExpression(node)){return isHelper(node.object)||isHelper(node.property)}else if(t.isIdentifier(node)){return node.name==="require"||node.name[0]==="_"}else if(t.isCallExpression(node)){return isHelper(node.callee)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){return t.isIdentifier(node.left)&&isHelper(node.left)||isHelper(node.right)}else{return false}}function isType(node){return t.isLiteral(node)||t.isObjectExpression(node)||t.isArrayExpression(node)||t.isIdentifier(node)||t.isMemberExpression(node)}exports.nodes={AssignmentExpression:function AssignmentExpression(node){var state=crawl(node.right);if(state.hasCall&&state.hasHelper||state.hasFunction){return{before:state.hasFunction,after:true}}},SwitchCase:function SwitchCase(node,parent){return{before:node.consequent.length||parent.cases[0]===node}},LogicalExpression:function LogicalExpression(node){if(t.isFunction(node.left)||t.isFunction(node.right)){return{after:true}}},Literal:function Literal(node){if(node.value==="use strict"){return{after:true}}},CallExpression:function CallExpression(node){if(t.isFunction(node.callee)||isHelper(node)){return{before:true,after:true}}},VariableDeclaration:function VariableDeclaration(node){for(var i=0;i=max){i-=max}return i}var Whitespace=function(){function Whitespace(tokens){_classCallCheck(this,Whitespace);this.tokens=tokens;this.used={};this._lastFoundIndex=0}Whitespace.prototype.getNewlinesBefore=function getNewlinesBefore(node){var startToken;var endToken;var tokens=this.tokens;for(var j=0;j")}}).join("\n");if(highlighted){return _chalk2["default"].reset(frame)}else{return frame}};module.exports=exports["default"]},{chalk:217,esutils:413,"js-tokens":427,"line-numbers":429,repeating:611}],56:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashObjectMerge=require("lodash/object/merge");var _lodashObjectMerge2=_interopRequireDefault(_lodashObjectMerge);exports["default"]=function(dest,src){if(!dest||!src)return;return _lodashObjectMerge2["default"](dest,src,function(a,b){if(b&&Array.isArray(a)){var c=a.slice(0);for(var _iterator=b,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[Symbol.iterator]();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var v=_ref;if(a.indexOf(v)<0){c.push(v)}}return c}})};module.exports=exports["default"]},{"lodash/object/merge":541}],57:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../types");var t=_interopRequireWildcard(_types);exports["default"]=function(ast,comments,tokens){if(ast&&ast.type==="Program"){return t.file(ast,comments||[],tokens||[])}else{throw new Error("Not a valid ast?")}};module.exports=exports["default"]},{"../types":196}],58:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]=function(){return Object.create(null)};module.exports=exports["default"]},{}],59:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _babylon=require("babylon");var babylon=_interopRequireWildcard(_babylon);exports["default"]=function(code){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var parseOpts={allowImportExportEverywhere:opts.looseModules,allowReturnOutsideFunction:opts.looseModules,allowHashBang:true,ecmaVersion:6,strictMode:opts.strictMode,sourceType:opts.sourceType,locations:true,features:opts.features||{},plugins:opts.plugins||{}};if(opts.nonStandard){parseOpts.plugins.jsx=true;parseOpts.plugins.flow=true}return babylon.parse(code,parseOpts)};module.exports=exports["default"]},{babylon:633}],60:[function(require,module,exports){"use strict";exports.__esModule=true;exports.get=get;exports.parseArgs=parseArgs;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _util=require("util");var util=_interopRequireWildcard(_util);var MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File got a $1 node",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginIllegalKind:"Illegal kind $1 for plugin $2",pluginIllegalPosition:"Illegal position $1 for plugin $2",pluginKeyCollision:"The plugin $1 collides with another of the same name",pluginNotTransformer:"The plugin $1 didn't export a Plugin instance",pluginUnknown:"Unknown plugin $1",pluginNotFile:"Plugin $1 is resolving to a different Babel version than what is performing the transformation.",pluginInvalidProperty:"Plugin $1 provided an invalid property of $2.",pluginInvalidPropertyVisitor:'Define your visitor methods inside a `visitor` property like so:\n\n new Plugin("foobar", {\n visitor: {\n // define your visitor methods here!\n }\n });\n'};exports.MESSAGES=MESSAGES;function get(key){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var msg=MESSAGES[key];if(!msg)throw new ReferenceError("Unknown message "+JSON.stringify(key));args=parseArgs(args);return msg.replace(/\$(\d+)/g,function(str,i){return args[--i]})}function parseArgs(args){return args.map(function(val){if(val!=null&&val.inspect){return val.inspect()}else{try{return JSON.stringify(val)||val+""}catch(e){return util.inspect(val)}}})}},{util:30}],61:[function(require,module,exports){(function(global){"use strict";require("core-js/shim");require("regenerator/runtime");if(global._babelPolyfill){throw new Error("only one instance of babel/polyfill is allowed")}global._babelPolyfill=true}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"core-js/shim":405,"regenerator/runtime":604}],62:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _generation=require("../generation");var _generation2=_interopRequireDefault(_generation);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _util=require("../util");var util=_interopRequireWildcard(_util);var _transformationFile=require("../transformation/file");var _transformationFile2=_interopRequireDefault(_transformationFile);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _types=require("../types");var t=_interopRequireWildcard(_types);function buildGlobal(namespace,builder){var body=[];var container=t.functionExpression(null,[t.identifier("global")],t.blockStatement(body));var tree=t.program([t.expressionStatement(t.callExpression(container,[util.template("helper-self-global")]))]);body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.assignmentExpression("=",t.memberExpression(t.identifier("global"),namespace),t.objectExpression([])))]));builder(body);return tree}function buildUmd(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.identifier("global"))]));builder(body);var container=util.template("umd-commonjs-strict",{FACTORY_PARAMETERS:t.identifier("global"),BROWSER_ARGUMENTS:t.assignmentExpression("=",t.memberExpression(t.identifier("root"),namespace),t.objectExpression({})),COMMON_ARGUMENTS:t.identifier("exports"),AMD_ARGUMENTS:t.arrayExpression([t.literal("exports")]),FACTORY_BODY:body,UMD_ROOT:t.identifier("this")});return t.program([container])}function buildVar(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.objectExpression({}))]));builder(body);return t.program(body)}function buildHelpers(body,namespace,whitelist){_lodashCollectionEach2["default"](_transformationFile2["default"].helpers,function(name){if(whitelist&&whitelist.indexOf(name)===-1)return;var key=t.identifier(t.toIdentifier(name));body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(namespace,key),util.template("helper-"+name))))})}exports["default"]=function(whitelist){var outputType=arguments.length<=1||arguments[1]===undefined?"global":arguments[1];var namespace=t.identifier("babelHelpers");var builder=function builder(body){return buildHelpers(body,namespace,whitelist)};var tree;var build={global:buildGlobal,umd:buildUmd,"var":buildVar}[outputType];if(build){tree=build(namespace,builder)}else{throw new Error(messages.get("unsupportedOutputType",outputType))}return _generation2["default"](tree).code};module.exports=exports["default"]},{"../generation":47,"../messages":60,"../transformation/file":63,"../types":196,"../util":199,"lodash/collection/each":437}],63:[function(require,module,exports){(function(process){"use strict";exports.__esModule=true;var _createClass=function(){function defineProperties(target,props){for(var i=0;i=0)continue;var group=pass.plugin.metadata.group;if(!pass.canTransform()||!group){stack.push(pass);continue}var mergeStack=[];var _arr4=_stack;for(var _i4=0;_i4<_arr4.length;_i4++){var _pass=_arr4[_i4];if(_pass.plugin.metadata.group===group){mergeStack.push(_pass);ignore.push(_pass)}}var visitors=[];var _arr5=mergeStack;for(var _i5=0;_i5<_arr5.length;_i5++){var _pass2=_arr5[_i5];visitors.push(_pass2.plugin.visitor)}var visitor=_traversal2["default"].visitors.merge(visitors);var mergePlugin=new _plugin2["default"](group,{visitor:visitor});stack.push(mergePlugin.buildPass(this))}return stack};File.prototype.set=function set(key,val){return this.data[key]=val};File.prototype.setDynamic=function setDynamic(key,fn){this.dynamicData[key]=fn};File.prototype.get=function get(key){var data=this.data[key];if(data){return data}else{var dynamic=this.dynamicData[key];if(dynamic){return this.set(key,dynamic())}}};File.prototype.resolveModuleSource=function resolveModuleSource(source){var resolveModuleSource=this.opts.resolveModuleSource;if(resolveModuleSource)source=resolveModuleSource(source,this.opts.filename);return source};File.prototype.addImport=function addImport(source,name,type){name=name||source;var id=this.dynamicImportIds[name];if(!id){source=this.resolveModuleSource(source);id=this.dynamicImportIds[name]=this.scope.generateUidIdentifier(name);var specifiers=[t.importDefaultSpecifier(id)];var declar=t.importDeclaration(specifiers,t.literal(source));declar._blockHoist=3;if(type){var modules=this.dynamicImportTypes[type]=this.dynamicImportTypes[type]||[];modules.push(declar)}if(this.transformers["es6.modules"].canTransform()){this.moduleFormatter.importSpecifier(specifiers[0],declar,this.dynamicImports,this.scope);this.moduleFormatter.hasLocalImports=true}else{this.dynamicImports.push(declar)}}return id};File.prototype.attachAuxiliaryComment=function attachAuxiliaryComment(node){var beforeComment=this.opts.auxiliaryCommentBefore;if(beforeComment){node.leadingComments=node.leadingComments||[];node.leadingComments.push({type:"CommentLine",value:" "+beforeComment})}var afterComment=this.opts.auxiliaryCommentAfter;if(afterComment){node.trailingComments=node.trailingComments||[];node.trailingComments.push({type:"CommentLine",value:" "+afterComment})}return node};File.prototype.addHelper=function addHelper(name){var isSolo=_lodashCollectionIncludes2["default"](File.soloHelpers,name);if(!isSolo&&!_lodashCollectionIncludes2["default"](File.helpers,name)){throw new ReferenceError("Unknown helper "+name)}var declar=this.declarations[name];if(declar)return declar;this.usedHelpers[name]=true;if(!isSolo){var generator=this.get("helperGenerator");var runtime=this.get("helpersNamespace");if(generator){return generator(name)}else if(runtime){var id=t.identifier(t.toIdentifier(name));return t.memberExpression(runtime,id)}}var ref=util.template("helper-"+name);var uid=this.declarations[name]=this.scope.generateUidIdentifier(name);if(t.isFunctionExpression(ref)&&!ref.id){ref.body._compact=true;ref._generated=true;ref.id=uid;ref.type="FunctionDeclaration";this.attachAuxiliaryComment(ref);this.path.unshiftContainer("body",ref)}else{ref._compact=true;this.scope.push({id:uid,init:ref,unique:true})}return uid};File.prototype.addTemplateObject=function addTemplateObject(helperName,strings,raw){var stringIds=raw.elements.map(function(string){return string.value});var name=helperName+"_"+raw.elements.length+"_"+stringIds.join(",");var declar=this.declarations[name];if(declar)return declar;var uid=this.declarations[name]=this.scope.generateUidIdentifier("templateObject");var helperId=this.addHelper(helperName);var init=t.callExpression(helperId,[strings,raw]);init._compact=true;this.scope.push({id:uid,init:init,_blockHoist:1.9});return uid};File.prototype.errorWithNode=function errorWithNode(node,msg){var Error=arguments.length<=2||arguments[2]===undefined?SyntaxError:arguments[2];var err;var loc=node&&(node.loc||node._loc);if(loc){err=new Error("Line "+loc.start.line+": "+msg);err.loc=loc.start}else{err=new Error("There's been an error on a dynamic node. This is almost certainly an internal error. Please report it.")}return err};File.prototype.mergeSourceMap=function mergeSourceMap(map){var opts=this.opts;var inputMap=opts.inputSourceMap;if(inputMap){map.sources[0]=inputMap.file;var inputMapConsumer=new _sourceMap2["default"].SourceMapConsumer(inputMap);var outputMapConsumer=new _sourceMap2["default"].SourceMapConsumer(map);var outputMapGenerator=_sourceMap2["default"].SourceMapGenerator.fromSourceMap(outputMapConsumer);outputMapGenerator.applySourceMap(inputMapConsumer);var mergedMap=outputMapGenerator.toJSON();mergedMap.sources=inputMap.sources;mergedMap.file=inputMap.file;return mergedMap}return map};File.prototype.getModuleFormatter=function getModuleFormatter(type){if(_lodashLangIsFunction2["default"](type)||!_modules2["default"][type]){this.log.deprecate("Custom module formatters are deprecated and will be removed in the next major. Please use Babel plugins instead.")}var ModuleFormatter=_lodashLangIsFunction2["default"](type)?type:_modules2["default"][type];if(!ModuleFormatter){var loc=_tryResolve2["default"].relative(type);if(loc)ModuleFormatter=require(loc)}if(!ModuleFormatter){throw new ReferenceError("Unknown module formatter type "+JSON.stringify(type))}return new ModuleFormatter(this)};File.prototype.parse=function parse(code){var opts=this.opts;var parseOpts={highlightCode:opts.highlightCode,nonStandard:opts.nonStandard,sourceType:opts.sourceType,filename:opts.filename,plugins:{}};var features=parseOpts.features={};for(var key in this.transformers){var transformer=this.transformers[key];features[key]=transformer.canTransform()}parseOpts.looseModules=this.isLoose("es6.modules");parseOpts.strictMode=features.strict;this.log.debug("Parse start");var ast=_helpersParse2["default"](code,parseOpts);this.log.debug("Parse stop");return ast};File.prototype._addAst=function _addAst(ast){this.path=_traversalPath2["default"].get({hub:this.hub,parentPath:null,parent:ast,container:ast,key:"program"}).setContext();this.scope=this.path.scope;this.ast=ast};File.prototype.addAst=function addAst(ast){this.log.debug("Start set AST");this._addAst(ast);this.log.debug("End set AST");this.log.debug("Start module formatter init");var modFormatter=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);if(modFormatter.init&&this.transformers["es6.modules"].canTransform()){modFormatter.init()}this.log.debug("End module formatter init")};File.prototype.transform=function transform(){this.call("pre");var _arr6=this.transformerStack;for(var _i6=0;_i6<_arr6.length;_i6++){var pass=_arr6[_i6];pass.transform()}this.call("post");return this.generate()};File.prototype.wrap=function wrap(code,callback){code=code+"";try{if(this.shouldIgnore()){return this.makeResult({code:code,ignored:true})}else{return callback()}}catch(err){if(err._babel){throw err}else{err._babel=true}var message=err.message=this.opts.filename+": "+err.message;var loc=err.loc;if(loc){err.codeFrame=_helpersCodeFrame2["default"](code,loc.line,loc.column+1,this.opts);message+="\n"+err.codeFrame}if(process.browser){err.message=message}if(err.stack){var newStack=err.stack.replace(err.message,message);try{err.stack=newStack}catch(e){}}throw err}};File.prototype.addCode=function addCode(code){code=(code||"")+"";code=this.parseInputSourceMap(code);this.code=code};File.prototype.parseCode=function parseCode(){this.parseShebang();var ast=this.parse(this.code);this.addAst(ast)};File.prototype.shouldIgnore=function shouldIgnore(){var opts=this.opts;return util.shouldIgnore(opts.filename,opts.ignore,opts.only)};File.prototype.call=function call(key){var _arr7=this.uncollapsedTransformerStack;for(var _i7=0;_i7<_arr7.length;_i7++){var pass=_arr7[_i7];var fn=pass.plugin[key];if(fn)fn(this)}};File.prototype.parseInputSourceMap=function parseInputSourceMap(code){var opts=this.opts;if(opts.inputSourceMap!==false){var inputMap=_convertSourceMap2["default"].fromSource(code);if(inputMap){opts.inputSourceMap=inputMap.toObject();code=_convertSourceMap2["default"].removeComments(code)}}return code};File.prototype.parseShebang=function parseShebang(){var shebangMatch=_shebangRegex2["default"].exec(this.code);if(shebangMatch){this.shebang=shebangMatch[0];this.code=this.code.replace(_shebangRegex2["default"],"")}};File.prototype.makeResult=function makeResult(_ref){var code=_ref.code;var _ref$map=_ref.map;var map=_ref$map===undefined?null:_ref$map;var ast=_ref.ast;var ignored=_ref.ignored;var result={metadata:null,ignored:!!ignored,code:null,ast:null,map:map};if(this.opts.code){result.code=code}if(this.opts.ast){result.ast=ast}if(this.opts.metadata){result.metadata=this.metadata;result.metadata.usedHelpers=Object.keys(this.usedHelpers)}return result};File.prototype.generate=function generate(){var opts=this.opts;var ast=this.ast;var result={ast:ast};if(!opts.code)return this.makeResult(result);this.log.debug("Generation start");var _result=_generation2["default"](ast,opts,this.code);result.code=_result.code;result.map=_result.map;this.log.debug("Generation end");if(this.shebang){result.code=this.shebang+"\n"+result.code}if(result.map){result.map=this.mergeSourceMap(result.map)}if(opts.sourceMaps==="inline"||opts.sourceMaps==="both"){result.code+="\n"+_convertSourceMap2["default"].fromObject(result.map).toComment()}if(opts.sourceMaps==="inline"){result.map=null}return this.makeResult(result)};_createClass(File,null,[{key:"helpers",value:["inherits","defaults","create-class","create-decorated-class","create-decorated-object","define-decorated-property-descriptor","tagged-template-literal","tagged-template-literal-loose","to-array","to-consumable-array","sliced-to-array","sliced-to-array-loose","object-without-properties","has-own","slice","bind","define-property","async-to-generator","interop-export-wildcard","interop-require-wildcard","interop-require-default","typeof","extends","get","set","new-arrow-check","class-call-check","object-destructuring-empty","temporal-undefined","temporal-assert-defined","self-global","default-props","instanceof","interop-require"],enumerable:true},{key:"soloHelpers",value:[],enumerable:true}]);return File}();exports["default"]=File;module.exports=exports["default"]}).call(this,require("_process"))},{"../../generation":47,"../../helpers/code-frame":55,"../../helpers/parse":59,"../../traversal":165,"../../traversal/hub":164,"../../traversal/path":172,"../../types":196,"../../util":199,"../modules":91,"../plugin":99,"./logger":64,"./options/option-manager":67,"./plugin-manager":69,_process:12,"convert-source-map":225,"lodash/collection/includes":439,"lodash/lang/isFunction":526,"lodash/object/defaults":536,path:11,"shebang-regex":614,"source-map":616,"try-resolve":630}],64:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _debugNode=require("debug/node");var _debugNode2=_interopRequireDefault(_debugNode);var verboseDebug=_debugNode2["default"]("babel:verbose");var generalDebug=_debugNode2["default"]("babel");var seenDeprecatedMessages=[];var Logger=function(){function Logger(file,filename){_classCallCheck(this,Logger);this.filename=filename;this.file=file}Logger.prototype._buildMessage=function _buildMessage(msg){var parts="[BABEL] "+this.filename;if(msg)parts+=": "+msg;return parts};Logger.prototype.warn=function warn(msg){console.warn(this._buildMessage(msg))};Logger.prototype.error=function error(msg){var Constructor=arguments.length<=1||arguments[1]===undefined?Error:arguments[1];throw new Constructor(this._buildMessage(msg))};Logger.prototype.deprecate=function deprecate(msg){if(this.file.opts&&this.file.opts.suppressDeprecationMessages)return;msg=this._buildMessage(msg);if(seenDeprecatedMessages.indexOf(msg)>=0)return;seenDeprecatedMessages.push(msg);console.error(msg)};Logger.prototype.verbose=function verbose(msg){if(verboseDebug.enabled)verboseDebug(this._buildMessage(msg))};Logger.prototype.debug=function debug(msg){if(generalDebug.enabled)generalDebug(this._buildMessage(msg))};Logger.prototype.deopt=function deopt(node,msg){this.debug(msg)};return Logger}();exports["default"]=Logger;module.exports=exports["default"]},{"debug/node":407}],65:[function(require,module,exports){module.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc","default":"unknown",shorthand:"f"},filenameRelative:{hidden:true,type:"string"},inputSourceMap:{hidden:true},extra:{hidden:true,"default":{}},env:{hidden:true,"default":{}},moduleId:{description:"specify a custom name for module ids",type:"string"},getModuleId:{hidden:true},retainLines:{type:"boolean","default":false,description:"retain line numbers - will result in really ugly code"},nonStandard:{type:"boolean","default":true,description:"enable/disable support for JSX and Flow (on by default)"},experimental:{type:"boolean",description:"allow use of experimental transformers","default":false},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean","default":true},suppressDeprecationMessages:{type:"boolean","default":false,hidden:true},resolveModuleSource:{hidden:true},stage:{description:"ECMAScript proposal stage version to allow [0-4]",shorthand:"e",type:"number","default":2},blacklist:{type:"transformerList",description:"blacklist of transformers to NOT use",shorthand:"b","default":[]},whitelist:{type:"transformerList",optional:true,description:"whitelist of transformers to ONLY use",shorthand:"l"},optional:{type:"transformerList",description:"list of optional transformers to enable","default":[]},modules:{type:"string",description:"module formatter type to use [common]","default":"common",shorthand:"m"},moduleIds:{type:"boolean","default":false,shorthand:"M",description:"insert an explicit id for modules"},loose:{type:"transformerList",description:"list of transformers to enable loose mode ON",shorthand:"L"},jsxPragma:{type:"string",description:"custom pragma to use with JSX (same functionality as @jsx comments)", -"default":"React.createElement",shorthand:"P"},plugins:{type:"list",description:"","default":[]},ignore:{type:"list",description:"list of glob paths to **not** compile","default":[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:true,"default":true,type:"boolean"},metadata:{hidden:true,"default":true,type:"boolean"},ast:{hidden:true,"default":true,type:"boolean"},comments:{type:"boolean","default":true,description:"strip/output comments in generated output (on by default)"},shouldPrintComment:{hidden:true,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},compact:{type:"booleanString","default":"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},keepModuleIdExtensions:{type:"boolean",description:"keep extensions when generating module ids","default":false,shorthand:"k"},auxiliaryComment:{deprecated:"renamed to auxiliaryCommentBefore",shorthand:"a",alias:"auxiliaryCommentBefore"},auxiliaryCommentBefore:{type:"string","default":"",description:"attach a comment before all helper declarations and auxiliary code"},auxiliaryCommentAfter:{type:"string","default":"",description:"attach a comment after all helper declarations and auxiliary code"},externalHelpers:{type:"boolean","default":false,shorthand:"r",description:"uses a reference to `babelHelpers` instead of placing helpers at the top of your code."},metadataUsedHelpers:{deprecated:"Not required anymore as this is enabled by default",type:"boolean","default":false,hidden:true},sourceMap:{alias:"sourceMaps",hidden:true},sourceMaps:{type:"booleanString",description:"[true|false|inline]","default":false,shorthand:"s"},sourceMapName:{alias:"sourceMapTarget",description:"DEPRECATED - Please use sourceMapTarget"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},breakConfig:{type:"boolean","default":false,hidden:true,description:"stop trying to load .babelrc files"},babelrc:{description:"Specify a custom list of babelrc files to use",type:"list"},sourceType:{description:"","default":"module"}}},{}],66:[function(require,module,exports){"use strict";exports.__esModule=true;exports.validateOption=validateOption;exports.normaliseOptions=normaliseOptions;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _parsers=require("./parsers");var parsers=_interopRequireWildcard(_parsers);var _config=require("./config");var _config2=_interopRequireDefault(_config);exports.config=_config2["default"];function validateOption(key,val,pipeline){var opt=_config2["default"][key];var parser=opt&&parsers[opt.type];if(parser&&parser.validate){return parser.validate(key,val,pipeline)}else{return val}}function normaliseOptions(){var options=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];for(var key in options){var val=options[key];if(val==null)continue;var opt=_config2["default"][key];if(!opt)continue;var parser=parsers[opt.type];if(parser)val=parser(val);options[key]=val}return options}},{"./config":65,"./parsers":68}],67:[function(require,module,exports){(function(process){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _index=require("./index");var _json5=require("json5");var _json52=_interopRequireDefault(_json5);var _pathIsAbsolute=require("path-is-absolute");var _pathIsAbsolute2=_interopRequireDefault(_pathIsAbsolute);var _pathExists=require("path-exists");var _pathExists2=_interopRequireDefault(_pathExists);var _lodashLangClone=require("lodash/lang/clone");var _lodashLangClone2=_interopRequireDefault(_lodashLangClone);var _helpersMerge=require("../../../helpers/merge");var _helpersMerge2=_interopRequireDefault(_helpersMerge);var _config=require("./config");var _config2=_interopRequireDefault(_config);var _path=require("path");var _path2=_interopRequireDefault(_path);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var existsCache={};var jsonCache={};var BABELIGNORE_FILENAME=".babelignore";var BABELRC_FILENAME=".babelrc";var PACKAGE_FILENAME="package.json";function exists(filename){var cached=existsCache[filename];if(cached!=null){return cached}else{return existsCache[filename]=_pathExists2["default"].sync(filename)}}var OptionManager=function(){function OptionManager(log,pipeline){_classCallCheck(this,OptionManager);this.resolvedConfigs=[];this.options=OptionManager.createBareOptions();this.pipeline=pipeline;this.log=log}OptionManager.createBareOptions=function createBareOptions(){var opts={};for(var key in _config2["default"]){var opt=_config2["default"][key];opts[key]=_lodashLangClone2["default"](opt["default"])}return opts};OptionManager.prototype.addConfig=function addConfig(loc,key){var json=arguments.length<=2||arguments[2]===undefined?_json52["default"]:arguments[2];if(this.resolvedConfigs.indexOf(loc)>=0)return;var content=_fs2["default"].readFileSync(loc,"utf8");var opts;try{opts=jsonCache[content]=jsonCache[content]||json.parse(content);if(key)opts=opts[key]}catch(err){err.message=loc+": Error while parsing JSON - "+err.message;throw err}this.mergeOptions(opts,loc);this.resolvedConfigs.push(loc)};OptionManager.prototype.mergeOptions=function mergeOptions(opts){var alias=arguments.length<=1||arguments[1]===undefined?"foreign":arguments[1];if(!opts)return;for(var key in opts){if(key[0]==="_")continue;var option=_config2["default"][key];if(!option)this.log.error("Unknown option: "+alias+"."+key,ReferenceError)}_index.normaliseOptions(opts);_helpersMerge2["default"](this.options,opts)};OptionManager.prototype.addIgnoreConfig=function addIgnoreConfig(loc){var file=_fs2["default"].readFileSync(loc,"utf8");var lines=file.split("\n");lines=lines.map(function(line){return line.replace(/#(.*?)$/,"").trim()}).filter(function(line){return!!line});this.mergeOptions({ignore:lines},loc)};OptionManager.prototype.findConfigs=function findConfigs(loc){if(!loc)return;if(!_pathIsAbsolute2["default"](loc)){loc=_path2["default"].join(process.cwd(),loc)}while(loc!==(loc=_path2["default"].dirname(loc))){if(this.options.breakConfig)return;var configLoc=_path2["default"].join(loc,BABELRC_FILENAME);if(exists(configLoc))this.addConfig(configLoc);var pkgLoc=_path2["default"].join(loc,PACKAGE_FILENAME);if(exists(pkgLoc))this.addConfig(pkgLoc,"babel",JSON);var ignoreLoc=_path2["default"].join(loc,BABELIGNORE_FILENAME);if(exists(ignoreLoc))this.addIgnoreConfig(ignoreLoc)}};OptionManager.prototype.normaliseOptions=function normaliseOptions(){var opts=this.options;for(var key in _config2["default"]){var option=_config2["default"][key];var val=opts[key];if(!val&&option.optional)continue;if(this.log&&val&&option.deprecated){this.log.deprecate("Deprecated option "+key+": "+option.deprecated)}if(this.pipeline&&val){val=_index.validateOption(key,val,this.pipeline)}if(option.alias){opts[option.alias]=opts[option.alias]||val}else{opts[key]=val}}};OptionManager.prototype.init=function init(opts){this.mergeOptions(opts,"direct");if(opts.babelrc){var _arr=opts.babelrc;for(var _i=0;_i<_arr.length;_i++){var loc=_arr[_i];this.addConfig(loc)}}if(opts.babelrc!==false){this.findConfigs(opts.filename)}var envKey=process.env.BABEL_ENV||process.env.NODE_ENV||"development";if(this.options.env){this.mergeOptions(this.options.env[envKey],"direct.env."+envKey)}this.normaliseOptions(opts);return this.options};return OptionManager}();exports["default"]=OptionManager;module.exports=exports["default"]}).call(this,require("_process"))},{"../../../helpers/merge":56,"./config":65,"./index":66,_process:12,fs:1,json5:428,"lodash/lang/clone":520,path:11,"path-exists":552,"path-is-absolute":553}],68:[function(require,module,exports){"use strict";exports.__esModule=true;exports.transformerList=transformerList;exports.number=number;exports.boolean=boolean;exports.booleanString=booleanString;exports.list=list;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _slash=require("slash");var _slash2=_interopRequireDefault(_slash);var _util=require("../../../util");var util=_interopRequireWildcard(_util);function transformerList(val){return util.arrayify(val)}transformerList.validate=function(key,val,pipeline){if(val.indexOf("all")>=0||val.indexOf(true)>=0){val=Object.keys(pipeline.transformers)}return pipeline._ensureTransformerNames(key,val)};function number(val){return+val}var filename=_slash2["default"];exports.filename=filename;function boolean(val){return!!val}function booleanString(val){return util.booleanify(val)}function list(val){return util.list(val)}},{"../../../util":199,slash:615}],69:[function(require,module,exports){"use strict";exports.__esModule=true;var _createClass=function(){function defineProperties(target,props){for(var i=0;i=3){callExpr._prettyCall=true}return t.inherits(callExpr,node)}};return visitor};module.exports=exports["default"]},{"../../messages":60,"../../types":196,"./react":79,esutils:413,"lodash/lang/isString":532}],73:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);var visitor={enter:function enter(node,parent,scope,state){if(this.isThisExpression()||this.isReferencedIdentifier({name:"arguments"})){state.found=true;this.stop()}},Function:function Function(){this.skip()}};exports["default"]=function(node,scope){var container=t.functionExpression(null,[],node.body,node.generator,node.async);var callee=container;var args=[];var state={found:false};scope.traverse(node,visitor,state);if(state.found){callee=t.memberExpression(container,t.identifier("apply"));args=[t.thisExpression(),t.identifier("arguments")]}var call=t.callExpression(callee,args);if(node.generator)call=t.yieldExpression(call,true);return t.returnStatement(call)};module.exports=exports["default"]},{"../../types":196}],74:[function(require,module,exports){"use strict";exports.__esModule=true;exports.push=push;exports.hasComputed=hasComputed;exports.toComputedObjectFromClass=toComputedObjectFromClass;exports.toClassObject=toClassObject;exports.toDefineObject=toDefineObject;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashObjectHas=require("lodash/object/has");var _lodashObjectHas2=_interopRequireDefault(_lodashObjectHas);var _types=require("../../types");var t=_interopRequireWildcard(_types);function push(mutatorMap,node,kind,file){var alias=t.toKeyAlias(node);var map={};if(_lodashObjectHas2["default"](mutatorMap,alias))map=mutatorMap[alias];mutatorMap[alias]=map;map._inherits=map._inherits||[];map._inherits.push(node);map._key=node.key;if(node.computed){map._computed=true}if(node.decorators){var decorators=map.decorators=map.decorators||t.arrayExpression([]);decorators.elements=decorators.elements.concat(node.decorators.map(function(dec){return dec.expression}).reverse())}if(map.value||map.initializer){throw file.errorWithNode(node,"Key conflict with sibling node")}if(node.value){if(node.kind==="init")kind="value";if(node.kind==="get")kind="get";if(node.kind==="set")kind="set";t.inheritsComments(node.value,node);map[kind]=node.value}return map}function hasComputed(mutatorMap){for(var key in mutatorMap){if(mutatorMap[key]._computed){return true}}return false}function toComputedObjectFromClass(obj){var objExpr=t.arrayExpression([]);for(var i=0;i=0}function pullFlag(node,flag){var flags=node.regex.flags.split("");if(node.regex.flags.indexOf(flag)<0)return;_lodashArrayPull2["default"](flags,flag);node.regex.flags=flags.join("")}},{"../../types":196,"lodash/array/pull":434}],81:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);var awaitVisitor={Function:function Function(){this.skip()},AwaitExpression:function AwaitExpression(node){node.type="YieldExpression";if(node.all){node.all=false;node.argument=t.callExpression(t.memberExpression(t.identifier("Promise"),t.identifier("all")),[node.argument])}}};var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){var name=state.id.name;if(node.name===name&&scope.bindingIdentifierEquals(name,state.id)){return state.ref=state.ref||scope.generateUidIdentifier(name)}}};exports["default"]=function(path,callId){var node=path.node;node.async=false;node.generator=true;path.traverse(awaitVisitor,state);var call=t.callExpression(callId,[node]);var id=node.id;node.id=null;if(t.isFunctionDeclaration(node)){var declar=t.variableDeclaration("let",[t.variableDeclarator(id,call)]);declar._blockHoist=true;return declar}else{if(id){var state={id:id};path.traverse(referenceVisitor,state);if(state.ref){path.scope.parent.push({id:state.ref});return t.assignmentExpression("=",state.ref,call)}}return call}};module.exports=exports["default"]},{"../../types":196}],82:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _messages=require("../../messages");var messages=_interopRequireWildcard(_messages);var _types=require("../../types");var t=_interopRequireWildcard(_types);function isIllegalBareSuper(node,parent){if(!t.isSuper(node))return false;if(t.isMemberExpression(parent,{computed:false}))return false;if(t.isCallExpression(parent,{callee:node}))return false;return true}function isMemberExpressionSuper(node){return t.isMemberExpression(node)&&t.isSuper(node.object)}var visitor={enter:function enter(node,parent,scope,state){var topLevel=state.topLevel;var self=state.self;if(t.isFunction(node)&&!t.isArrowFunctionExpression(node)){self.traverseLevel(this,false);return this.skip()}if(t.isProperty(node,{method:true})||t.isMethodDefinition(node)){return this.skip()}var getThisReference=topLevel?t.thisExpression:self.getThisReference.bind(self);var callback=self.specHandle;if(self.isLoose)callback=self.looseHandle;var result=callback.call(self,this,getThisReference);if(result)this.hasSuper=true;if(result===true)return;return result}};var ReplaceSupers=function(){function ReplaceSupers(opts){var inClass=arguments.length<=1||arguments[1]===undefined?false:arguments[1];_classCallCheck(this,ReplaceSupers);this.topLevelThisReference=opts.topLevelThisReference;this.methodPath=opts.methodPath;this.methodNode=opts.methodNode;this.superRef=opts.superRef;this.isStatic=opts.isStatic;this.hasSuper=false;this.inClass=inClass;this.isLoose=opts.isLoose;this.scope=opts.scope;this.file=opts.file;this.opts=opts}ReplaceSupers.prototype.getObjectRef=function getObjectRef(){return this.opts.objectRef||this.opts.getObjectRef()};ReplaceSupers.prototype.setSuperProperty=function setSuperProperty(property,value,isComputed,thisExpression){return t.callExpression(this.file.addHelper("set"),[t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():t.memberExpression(this.getObjectRef(),t.identifier("prototype"))]),isComputed?property:t.literal(property.name),value,thisExpression])};ReplaceSupers.prototype.getSuperProperty=function getSuperProperty(property,isComputed,thisExpression){return t.callExpression(this.file.addHelper("get"),[t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():t.memberExpression(this.getObjectRef(),t.identifier("prototype"))]),isComputed?property:t.literal(property.name),thisExpression])};ReplaceSupers.prototype.replace=function replace(){this.traverseLevel(this.methodPath.get("value"),true)};ReplaceSupers.prototype.traverseLevel=function traverseLevel(path,topLevel){var state={self:this,topLevel:topLevel};path.traverse(visitor,state)};ReplaceSupers.prototype.getThisReference=function getThisReference(){if(this.topLevelThisReference){return this.topLevelThisReference}else{var ref=this.topLevelThisReference=this.scope.generateUidIdentifier("this");this.methodNode.value.body.body.unshift(t.variableDeclaration("var",[t.variableDeclarator(this.topLevelThisReference,t.thisExpression())]));return ref}};ReplaceSupers.prototype.getLooseSuperProperty=function getLooseSuperProperty(id,parent){var methodNode=this.methodNode;var methodName=methodNode.key;var superRef=this.superRef||t.identifier("Function");if(parent.property===id){return}else if(t.isCallExpression(parent,{callee:id})){parent.arguments.unshift(t.thisExpression());if(methodName.name==="constructor"){if(parent.arguments.length===2&&t.isSpreadElement(parent.arguments[1])&&t.isIdentifier(parent.arguments[1].argument,{name:"arguments"})){parent.arguments[1]=parent.arguments[1].argument;return t.memberExpression(superRef,t.identifier("apply"))}else{return t.memberExpression(superRef,t.identifier("call"))}}else{id=superRef;if(!methodNode["static"]){id=t.memberExpression(id,t.identifier("prototype"))}id=t.memberExpression(id,methodName,methodNode.computed);return t.memberExpression(id,t.identifier("call"))}}else if(t.isMemberExpression(parent)&&!methodNode["static"]){return t.memberExpression(superRef,t.identifier("prototype"))}else{return superRef}};ReplaceSupers.prototype.looseHandle=function looseHandle(path,getThisReference){var node=path.node;if(path.isSuper()){return this.getLooseSuperProperty(node,path.parent)}else if(path.isCallExpression()){var callee=node.callee;if(!t.isMemberExpression(callee))return;if(!t.isSuper(callee.object))return;t.appendToMemberExpression(callee,t.identifier("call"));node.arguments.unshift(getThisReference());return true}};ReplaceSupers.prototype.specHandleAssignmentExpression=function specHandleAssignmentExpression(ref,path,node,getThisReference){if(node.operator==="="){return this.setSuperProperty(node.left.property,node.right,node.left.computed,getThisReference())}else{ref=ref||path.scope.generateUidIdentifier("ref");return[t.variableDeclaration("var",[t.variableDeclarator(ref,node.left)]),t.expressionStatement(t.assignmentExpression("=",node.left,t.binaryExpression(node.operator[0],ref,node.right)))]}};ReplaceSupers.prototype.specHandle=function specHandle(path,getThisReference){var methodNode=this.methodNode;var property;var computed;var args;var thisReference;var parent=path.parent;var node=path.node;if(isIllegalBareSuper(node,parent)){throw path.errorWithNode(messages.get("classesIllegalBareSuper"))}if(t.isCallExpression(node)){var callee=node.callee;if(t.isSuper(callee)){property=methodNode.key;computed=methodNode.computed;args=node.arguments;if(methodNode.key.name!=="constructor"||!this.inClass){var methodName=methodNode.key.name||"METHOD_NAME";throw this.file.errorWithNode(node,messages.get("classesIllegalSuperCall",methodName))}}else if(isMemberExpressionSuper(callee)){property=callee.property;computed=callee.computed;args=node.arguments}}else if(t.isMemberExpression(node)&&t.isSuper(node.object)){property=node.property;computed=node.computed}else if(t.isUpdateExpression(node)&&isMemberExpressionSuper(node.argument)){var binary=t.binaryExpression(node.operator[0],node.argument,t.literal(1));if(node.prefix){return this.specHandleAssignmentExpression(null,path,binary,getThisReference)}else{var ref=path.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(ref,path,binary,getThisReference).concat(t.expressionStatement(ref))}}else if(t.isAssignmentExpression(node)&&isMemberExpressionSuper(node.left)){return this.specHandleAssignmentExpression(null,path,node,getThisReference)}if(!property)return;thisReference=getThisReference();var superProperty=this.getSuperProperty(property,computed,thisReference);if(args){if(args.length===1&&t.isSpreadElement(args[0])){return t.callExpression(t.memberExpression(superProperty,t.identifier("apply")),[thisReference,args[0].argument])}else{return t.callExpression(t.memberExpression(superProperty,t.identifier("call")),[thisReference].concat(args))}}else{return superProperty}};return ReplaceSupers}();exports["default"]=ReplaceSupers;module.exports=exports["default"]},{"../../messages":60,"../../types":196}],83:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _pipeline=require("./pipeline");var _pipeline2=_interopRequireDefault(_pipeline);var _transformers=require("./transformers");var _transformers2=_interopRequireDefault(_transformers);var _transformersDeprecated=require("./transformers/deprecated");var _transformersDeprecated2=_interopRequireDefault(_transformersDeprecated);var _transformersAliases=require("./transformers/aliases");var _transformersAliases2=_interopRequireDefault(_transformersAliases);var _transformersFilters=require("./transformers/filters");var filters=_interopRequireWildcard(_transformersFilters);var pipeline=new _pipeline2["default"];for(var key in _transformers2["default"]){var transformer=_transformers2["default"][key];if(typeof transformer==="object"){var metadata=transformer.metadata=transformer.metadata||{};metadata.group=metadata.group||"builtin-basic"}}pipeline.addTransformers(_transformers2["default"]);pipeline.addDeprecated(_transformersDeprecated2["default"]);pipeline.addAliases(_transformersAliases2["default"]);pipeline.addFilter(filters.internal);pipeline.addFilter(filters.blacklist);pipeline.addFilter(filters.whitelist);pipeline.addFilter(filters.stage);pipeline.addFilter(filters.optional);var transform=pipeline.transform.bind(pipeline);transform.fromAst=pipeline.transformFromAst.bind(pipeline);transform.pipeline=pipeline;exports["default"]=transform;module.exports=exports["default"]},{"./pipeline":97,"./transformers":143,"./transformers/aliases":101,"./transformers/deprecated":102,"./transformers/filters":142}],84:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _libMetadata=require("./lib/metadata");var metadataVisitor=_interopRequireWildcard(_libMetadata);var _messages=require("../../messages");var messages=_interopRequireWildcard(_messages);var _libRemaps=require("./lib/remaps");var _libRemaps2=_interopRequireDefault(_libRemaps);var _helpersObject=require("../../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _util=require("../../util");var util=_interopRequireWildcard(_util);var _types=require("../../types");var t=_interopRequireWildcard(_types);var DefaultFormatter=function(){function DefaultFormatter(file){_classCallCheck(this,DefaultFormatter);this.sourceScopes=_helpersObject2["default"]();this.defaultIds=_helpersObject2["default"]();this.ids=_helpersObject2["default"]();this.remaps=new _libRemaps2["default"](file,this);this.scope=file.scope;this.file=file;this.hasNonDefaultExports=false;this.hasLocalExports=false;this.hasLocalImports=false;this.localExports=_helpersObject2["default"]();this.localImports=_helpersObject2["default"]();this.metadata=file.metadata.modules;this.getMetadata()}DefaultFormatter.prototype.addScope=function addScope(path){var source=path.node.source&&path.node.source.value;if(!source)return;var existingScope=this.sourceScopes[source];if(existingScope&&existingScope!==path.scope){throw path.errorWithNode(messages.get("modulesDuplicateDeclarations"))}this.sourceScopes[source]=path.scope};DefaultFormatter.prototype.isModuleType=function isModuleType(node,type){var modules=this.file.dynamicImportTypes[type];return modules&&modules.indexOf(node)>=0};DefaultFormatter.prototype.transform=function transform(){this.remapAssignments()};DefaultFormatter.prototype.doDefaultExportInterop=function doDefaultExportInterop(node){return(t.isExportDefaultDeclaration(node)||t.isSpecifierDefault(node))&&!this.noInteropRequireExport&&!this.hasNonDefaultExports};DefaultFormatter.prototype.getMetadata=function getMetadata(){var has=false;var _arr=this.file.ast.program.body;for(var _i=0;_i<_arr.length;_i++){var node=_arr[_i];if(t.isModuleDeclaration(node)){has=true;break}}if(has||this.isLoose()){this.file.path.traverse(metadataVisitor,this)}};DefaultFormatter.prototype.remapAssignments=function remapAssignments(){if(this.hasLocalExports||this.hasLocalImports){this.remaps.run()}};DefaultFormatter.prototype.remapExportAssignment=function remapExportAssignment(node,exported){var assign=node;for(var i=0;i=0)continue;var msgType="pluginInvalidProperty";if(t.TYPES.indexOf(key)>=0)msgType="pluginInvalidPropertyVisitor";throw new Error(messages.get(msgType,name,key))}for(var key in plugin.metadata){if(VALID_METADATA_PROPERTES.indexOf(key)>=0)continue;throw new Error(messages.get("pluginInvalidProperty",name,"metadata."+key))}};Plugin.prototype.normalize=function normalize(visitor){_traversal2["default"].explode(visitor);return visitor};Plugin.prototype.buildPass=function buildPass(file){if(!(file instanceof _file2["default"])){throw new TypeError(messages.get("pluginNotFile",this.key))}return new _pluginPass2["default"](file,this)};return Plugin}();exports["default"]=Plugin;module.exports=exports["default"]},{"../messages":60,"../traversal":165,"../types":196,"./file":63,"./plugin-pass":98,"lodash/lang/clone":520,"lodash/object/assign":535}],100:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _plugin=require("./plugin");var _plugin2=_interopRequireDefault(_plugin);var Transformer=function Transformer(key,obj){_classCallCheck(this,Transformer);var plugin={};plugin.metadata=obj.metadata;delete obj.metadata;plugin.visitor=obj;return new _plugin2["default"](key,plugin)};exports["default"]=Transformer;module.exports=exports["default"]},{"./plugin":99}],101:[function(require,module,exports){module.exports={useStrict:"strict","es5.runtime":"runtime","es6.runtime":"runtime","minification.inlineExpressions":"minification.constantFolding"}},{}],102:[function(require,module,exports){module.exports={selfContained:"runtime","unicode-regex":"regex.unicode","spec.typeofSymbol":"es6.spec.symbols","es6.symbols":"es6.spec.symbols","es6.blockScopingTDZ":"es6.spec.blockScoping","utility.inlineExpressions":"minification.constantFolding","utility.deadCodeElimination":"minification.deadCodeElimination","utility.removeConsoleCalls":"minification.removeConsole","utility.removeDebugger":"minification.removeDebugger","es6.parameters.rest":"es6.parameters","es6.parameters.default":"es6.parameters"}},{}],103:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-trailing"};exports.metadata=metadata;var visitor={MemberExpression:{exit:function exit(node){var prop=node.property;if(!node.computed&&t.isIdentifier(prop)&&!t.isValidIdentifier(prop.name)){node.property=t.literal(prop.name);node.computed=true}}}};exports.visitor=visitor},{"../../../types":196}],104:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-trailing"};exports.metadata=metadata;var visitor={Property:{exit:function exit(node){var key=node.key;if(!node.computed&&t.isIdentifier(key)&&!t.isValidIdentifier(key.name)){node.key=t.literal(key.name)}}}};exports.visitor=visitor},{"../../../types":196}],105:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _helpersDefineMap=require("../../helpers/define-map");var defineMap=_interopRequireWildcard(_helpersDefineMap);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var visitor={ObjectExpression:function ObjectExpression(node,parent,scope,file){var hasAny=false;var _arr=node.properties;for(var _i=0;_i<_arr.length;_i++){var prop=_arr[_i];if(prop.kind==="get"||prop.kind==="set"){hasAny=true;break}}if(!hasAny)return;var mutatorMap={};node.properties=node.properties.filter(function(prop){if(prop.kind==="get"||prop.kind==="set"){defineMap.push(mutatorMap,prop,prop.kind,file);return false}else{return true}});return t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("defineProperties")),[node,defineMap.toDefineObject(mutatorMap)])}};exports.visitor=visitor},{"../../../types":196,"../../helpers/define-map":74}],106:[function(require,module,exports){"use strict";exports.__esModule=true;var visitor={ArrowFunctionExpression:function ArrowFunctionExpression(node){this.ensureBlock();node.expression=false;node.type="FunctionExpression";node.shadow=node.shadow||true}};exports.visitor=visitor; -},{}],107:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _traversal=require("../../../traversal");var _traversal2=_interopRequireDefault(_traversal);var _helpersObject=require("../../../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var _lodashObjectValues=require("lodash/object/values");var _lodashObjectValues2=_interopRequireDefault(_lodashObjectValues);var _lodashObjectExtend=require("lodash/object/extend");var _lodashObjectExtend2=_interopRequireDefault(_lodashObjectExtend);function isLet(node,parent){if(!t.isVariableDeclaration(node))return false;if(node._let)return true;if(node.kind!=="let")return false;if(isLetInitable(node,parent)){for(var i=0;i=0){return}loopText=loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(state.inSwitchCase)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.literal(loopText)}if(this.isReturnStatement()){state.hasReturn=true;replace=t.objectExpression([t.property("init",t.identifier("v"),node.argument||t.identifier("undefined"))])}if(replace){replace=t.returnStatement(replace);this.skip();return t.inherits(replace,node)}}};var BlockScoping=function(){function BlockScoping(loopPath,blockPath,parent,scope,file){_classCallCheck(this,BlockScoping);this.parent=parent;this.scope=scope;this.file=file;this.blockPath=blockPath;this.block=blockPath.node;this.outsideLetReferences=_helpersObject2["default"]();this.hasLetReferences=false;this.letReferences=this.block._letReferences=_helpersObject2["default"]();this.body=[];if(loopPath){this.loopParent=loopPath.parent;this.loopLabel=t.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=loopPath;this.loop=loopPath.node}}BlockScoping.prototype.run=function run(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block))return;if(!this.hasLetReferences)return;if(needsClosure){this.wrapClosure()}else{this.remap()}if(this.loopLabel&&!t.isLabeledStatement(this.loopParent)){return t.labeledStatement(this.loopLabel,this.loop)}};BlockScoping.prototype.remap=function remap(){var hasRemaps=false;var letRefs=this.letReferences;var scope=this.scope;var remaps=_helpersObject2["default"]();for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasBinding(key)||scope.hasGlobal(key)){var uid=scope.generateUidIdentifier(ref.name).name;ref.name=uid;hasRemaps=true;remaps[key]=remaps[uid]={binding:ref,uid:uid}}}if(!hasRemaps)return;var loop=this.loop;if(loop){traverseReplace(loop.right,loop,scope,remaps);traverseReplace(loop.test,loop,scope,remaps);traverseReplace(loop.update,loop,scope,remaps)}this.blockPath.traverse(replaceVisitor,remaps)};BlockScoping.prototype.wrapClosure=function wrapClosure(){var block=this.block;var outsideRefs=this.outsideLetReferences;if(this.loop){for(var name in outsideRefs){var id=outsideRefs[name];if(this.scope.hasGlobal(id.name)||this.scope.parentHasBinding(id.name)){delete outsideRefs[id.name];delete this.letReferences[id.name];this.scope.rename(id.name);this.letReferences[id.name]=id;outsideRefs[id.name]=id}}}this.has=this.checkLoop();this.hoistVarDeclarations();var params=_lodashObjectValues2["default"](outsideRefs);var args=_lodashObjectValues2["default"](outsideRefs);var fn=t.functionExpression(null,params,t.blockStatement(block.body));fn.shadow=true;this.addContinuations(fn);block.body=this.body;var ref=fn;if(this.loop){ref=this.scope.generateUidIdentifier("loop");this.loopPath.insertBefore(t.variableDeclaration("var",[t.variableDeclarator(ref,fn)]))}var call=t.callExpression(ref,args);var ret=this.scope.generateUidIdentifier("ret");var hasYield=_traversal2["default"].hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=_traversal2["default"].hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call)}this.buildClosure(ret,call)};BlockScoping.prototype.buildClosure=function buildClosure(ret,call){var has=this.has;if(has.hasReturn||has.hasBreakContinue){this.buildHas(ret,call)}else{this.body.push(t.expressionStatement(call))}};BlockScoping.prototype.addContinuations=function addContinuations(fn){var state={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(fn,continuationVisitor,state);for(var i=0;i=spreadPropIndex)break;if(t.isSpreadProperty(prop))continue;var key=prop.key;if(t.isIdentifier(key)&&!prop.computed)key=t.literal(prop.key.name);keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("object-without-properties"),[objRef,keys]);this.nodes.push(this.buildVariableAssignment(spreadProp.argument,value))};DestructuringTransformer.prototype.pushObjectProperty=function pushObjectProperty(prop,propRef){if(t.isLiteral(prop.key))prop.computed=true;var pattern=prop.value;var objRef=t.memberExpression(propRef,prop.key,prop.computed);if(t.isPattern(pattern)){this.push(pattern,objRef)}else{this.nodes.push(this.buildVariableAssignment(pattern,objRef))}};DestructuringTransformer.prototype.pushObjectPattern=function pushObjectPattern(pattern,objRef){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("object-destructuring-empty"),[objRef])))}if(pattern.properties.length>1&&!this.scope.isStatic(objRef)){var temp=this.scope.generateUidIdentifierBasedOnNode(objRef);this.nodes.push(this.buildVariableDeclaration(temp,objRef));objRef=temp}for(var i=0;iarr.elements.length)return;if(pattern.elements.length0){elemRef=t.callExpression(t.memberExpression(elemRef,t.identifier("slice")),[t.literal(i)])}elem=elem.argument}else{elemRef=t.memberExpression(arrayRef,t.literal(i),true)}this.push(elem,elemRef)}};DestructuringTransformer.prototype.init=function init(pattern,ref){if(!t.isArrayExpression(ref)&&!t.isMemberExpression(ref)){var memo=this.scope.maybeGenerateMemoised(ref,true);if(memo){this.nodes.push(this.buildVariableDeclaration(memo,ref));ref=memo}}this.push(pattern,ref);return this.nodes};return DestructuringTransformer}()},{"../../../messages":60,"../../../types":196}],113:[function(require,module,exports){"use strict";exports.__esModule=true;exports._ForOfStatementArray=_ForOfStatementArray;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _messages=require("../../../messages");var messages=_interopRequireWildcard(_messages);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var visitor={ForOfStatement:function ForOfStatement(node,parent,scope,file){if(this.get("right").isArrayExpression()){return _ForOfStatementArray.call(this,node,scope,file)}var callback=spec;if(file.isLoose("es6.forOf"))callback=loose;var build=callback(node,parent,scope,file);var declar=build.declar;var loop=build.loop;var block=loop.body;this.ensureBlock();if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);t.inherits(loop.body,node.body);if(build.replaceParent){this.parentPath.replaceWithMultiple(build.node);this.dangerouslyRemove()}else{return build.node}}};exports.visitor=visitor;function _ForOfStatementArray(node,scope){var nodes=[];var right=node.right;if(!t.isIdentifier(right)||!scope.hasBinding(right.name)){var uid=scope.generateUidIdentifier("arr");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,right)]));right=uid}var iterationKey=scope.generateUidIdentifier("i");var loop=util.template("for-of-array",{BODY:node.body,KEY:iterationKey,ARR:right});t.inherits(loop,node);t.ensureBlock(loop);var iterationValue=t.memberExpression(right,iterationKey,true);var left=node.left;if(t.isVariableDeclaration(left)){left.declarations[0].init=iterationValue;loop.body.body.unshift(left)}else{loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=",left,iterationValue)))}if(this.parentPath.isLabeledStatement()){loop=t.labeledStatement(this.parentPath.node.label,loop)}nodes.push(loop);return nodes}var loose=function loose(node,parent,scope,file){var left=node.left;var declar,id;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var isArrayKey=scope.generateUidIdentifier("isArray");var loop=util.template("for-of-loose",{LOOP_OBJECT:iteratorKey,IS_ARRAY:isArrayKey,OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}return{declar:declar,node:loop,loop:loop}};var spec=function spec(node,parent,scope,file){var left=node.left;var declar;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var template=util.template("for-of",{ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:iteratorKey,STEP_KEY:stepKey,OBJECT:node.right,BODY:null});var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}return{replaceParent:isLabeledParent,declar:declar,loop:loop,node:template}}},{"../../../messages":60,"../../../types":196,"../../../util":199}],114:[function(require,module,exports){"use strict";exports.__esModule=true;var metadata={group:"builtin-pre"};exports.metadata=metadata;var visitor={Literal:function Literal(node){if(typeof node.value==="number"&&/^0[ob]/i.test(node.raw)){node.raw=undefined}if(typeof node.value==="string"&&/\\[u]/gi.test(node.raw)){node.raw=undefined}}};exports.visitor=visitor},{}],115:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function keepBlockHoist(node,nodes){if(node._blockHoist){for(var i=0;ilastNonDefaultParam}var lastNonDefaultParam=_helpersGetFunctionArity2["default"](node);var params=this.get("params");for(var i=0;i",len,start),t.binaryExpression("-",len,start),t.literal(0))}var loop=util.template("rest",{ARRAY_TYPE:restParam.typeAnnotation,ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});if(state.deopted){loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)}else{loop._blockHoist=1;var target=this.getEarliestCommonAncestorFrom(state.references).getStatementParent();var highestLoop;target.findParent(function(path){if(path.isLoop()){highestLoop=path}else if(path.isFunction()){return true}});if(highestLoop)target=highestLoop;target.insertBefore(loop)}}};exports.visitor=visitor},{"../../../../types":196,"../../../../util":199}],120:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function loose(node,body,objId){var _arr=node.properties;for(var _i=0;_i<_arr.length;_i++){var prop=_arr[_i];body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(objId,prop.key,prop.computed||t.isLiteral(prop.key)),prop.value)))}}function spec(node,body,objId,initProps,file){var _arr2=node.properties;for(var _i2=0;_i2<_arr2.length;_i2++){var prop=_arr2[_i2];if(t.isLiteral(t.toComputedKey(prop),{value:"__proto__"})){initProps.push(prop);continue}var key=prop.key;if(t.isIdentifier(key)&&!prop.computed){key=t.literal(key.name)}var bodyNode=t.callExpression(file.addHelper("define-property"),[objId,key,prop.value]);body.push(t.expressionStatement(bodyNode))}if(body.length===1){var first=body[0].expression;if(t.isCallExpression(first)){first.arguments[0]=t.objectExpression(initProps);return first}}}var visitor={ObjectExpression:{exit:function exit(node,parent,scope,file){var hasComputed=false;var _arr3=node.properties;for(var _i3=0;_i3<_arr3.length;_i3++){var prop=_arr3[_i3];hasComputed=t.isProperty(prop,{computed:true,kind:"init"});if(hasComputed)break}if(!hasComputed)return;var initProps=[];var stopInits=false;node.properties=node.properties.filter(function(prop){if(prop.computed){stopInits=true}if(prop.kind!=="init"||!stopInits){initProps.push(prop);return false}else{return true}});var objId=scope.generateUidIdentifierBasedOnNode(parent);var body=[];var callback=spec;if(file.isLoose("es6.properties.computed"))callback=loose;var result=callback(node,body,objId,initProps,file);if(result)return result;body.unshift(t.variableDeclaration("var",[t.variableDeclarator(objId,t.objectExpression(initProps))]));body.push(t.expressionStatement(objId));return body}}};exports.visitor=visitor},{"../../../types":196}],121:[function(require,module,exports){"use strict";exports.__esModule=true;var visitor={Property:function Property(node){if(node.method){node.method=false}if(node.shorthand){node.shorthand=false}}};exports.visitor=visitor},{}],122:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _helpersRegex=require("../../helpers/regex");var regex=_interopRequireWildcard(_helpersRegex);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var visitor={Literal:function Literal(node){if(!regex.is(node,"y"))return;return t.newExpression(t.identifier("RegExp"),[t.literal(node.regex.pattern),t.literal(node.regex.flags)])}};exports.visitor=visitor},{"../../../types":196,"../../helpers/regex":80}],123:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _regexpuRewritePattern=require("regexpu/rewrite-pattern");var _regexpuRewritePattern2=_interopRequireDefault(_regexpuRewritePattern);var _helpersRegex=require("../../helpers/regex");var regex=_interopRequireWildcard(_helpersRegex);var visitor={Literal:function Literal(node){if(!regex.is(node,"u"))return;node.regex.pattern=_regexpuRewritePattern2["default"](node.regex.pattern,node.regex.flags);regex.pullFlag(node,"u")}};exports.visitor=visitor},{"../../helpers/regex":80,"regexpu/rewrite-pattern":610}],124:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-pre",optional:true};exports.metadata=metadata;var visitor={ArrowFunctionExpression:function ArrowFunctionExpression(node,parent,scope,file){if(node.shadow)return;node.shadow={"this":false};var boundThis=t.thisExpression();boundThis._forceShadow=this;t.ensureBlock(node);this.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(file.addHelper("new-arrow-check"),[t.thisExpression(),boundThis])));return t.callExpression(t.memberExpression(node,t.identifier("bind")),[t.thisExpression()])}};exports.visitor=visitor},{"../../../types":196}],125:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function buildAssert(node,file){return t.callExpression(file.addHelper("temporal-assert-defined"),[node,t.literal(node.name),file.addHelper("temporal-undefined")])}function references(node,scope,state){var declared=state.letRefs[node.name];if(!declared)return false;return scope.getBindingIdentifier(node.name)===declared}var refVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){if(t.isFor(parent)&&parent.left===node)return;if(!references(node,scope,state))return;var assert=buildAssert(node,state.file);this.skip();if(t.isUpdateExpression(parent)){if(parent._ignoreBlockScopingTDZ)return;this.parentPath.replaceWith(t.sequenceExpression([assert,parent]))}else{return t.logicalExpression("&&",assert,node)}},AssignmentExpression:{exit:function exit(node,parent,scope,state){if(node._ignoreBlockScopingTDZ)return;var nodes=[];var ids=this.getBindingIdentifiers();for(var name in ids){var id=ids[name];if(references(id,scope,state)){nodes.push(buildAssert(id,state.file))}}if(nodes.length){node._ignoreBlockScopingTDZ=true;nodes.push(node);return nodes.map(t.expressionStatement)}}}};var metadata={optional:true,group:"builtin-advanced"};exports.metadata=metadata;var visitor={"Program|Loop|BlockStatement":{exit:function exit(node,parent,scope,file){var letRefs=node._letReferences;if(!letRefs)return;this.traverse(refVisitor,{letRefs:letRefs,file:file})}}};exports.visitor=visitor},{"../../../types":196}],126:[function(require,module,exports){"use strict";exports.__esModule=true; -function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-pre",optional:true};exports.metadata=metadata;var visitor={Program:function Program(){var id=this.scope.generateUidIdentifier("null");this.unshiftContainer("body",[t.variableDeclaration("var",[t.variableDeclarator(id,t.literal(null))]),t.exportNamedDeclaration(null,[t.exportSpecifier(id,t.identifier("__proto__"))])])}};exports.visitor=visitor},{"../../../types":196}],127:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={optional:true};exports.metadata=metadata;var visitor={UnaryExpression:function UnaryExpression(node,parent,scope,file){if(node._ignoreSpecSymbols)return;if(this.parentPath.isBinaryExpression()&&t.EQUALITY_BINARY_OPERATORS.indexOf(parent.operator)>=0){var opposite=this.getOpposite();if(opposite.isLiteral()&&opposite.node.value!=="symbol"&&opposite.node.value!=="object")return}if(node.operator==="typeof"){var call=t.callExpression(file.addHelper("typeof"),[node.argument]);if(this.get("argument").isIdentifier()){var undefLiteral=t.literal("undefined");var unary=t.unaryExpression("typeof",node.argument);unary._ignoreSpecSymbols=true;return t.conditionalExpression(t.binaryExpression("===",unary,undefLiteral),undefLiteral,call)}else{return call}}},BinaryExpression:function BinaryExpression(node,parent,scope,file){if(node.operator==="instanceof"){return t.callExpression(file.addHelper("instanceof"),[node.left,node.right])}},"VariableDeclaration|FunctionDeclaration":function VariableDeclarationFunctionDeclaration(node){if(node._generated)this.skip()}};exports.visitor=visitor},{"../../../types":196}],128:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={optional:true,group:"builtin-pre"};exports.metadata=metadata;var visitor={TemplateLiteral:function TemplateLiteral(node,parent){if(t.isTaggedTemplateExpression(parent))return;for(var i=0;i0){var declarations=_lodashArrayFlatten2["default"](_lodashCollectionMap2["default"](this.vars,function(decl){return decl.declarations}));var assignment=_lodashCollectionReduceRight2["default"](declarations,function(expr,decl){return t.assignmentExpression("=",decl.id,expr)},t.identifier("undefined"));var statement=t.expressionStatement(assignment);statement._blockHoist=Infinity;body.unshift(statement)}var paramDecls=this.paramDecls;if(paramDecls.length>0){var paramDecl=t.variableDeclaration("var",paramDecls);paramDecl._blockHoist=Infinity;body.unshift(paramDecl)}body.unshift(t.expressionStatement(t.assignmentExpression("=",this.getAgainId(),t.literal(false))));node.body=util.template("tail-call-body",{FUNCTION_ID:this.getFunctionId(),AGAIN_ID:this.getAgainId(),BLOCK:node.body});var topVars=[];if(this.needsThis){var _arr=this.thisPaths;for(var _i=0;_i<_arr.length;_i++){var path=_arr[_i];path.replaceWith(this.getThisId())}topVars.push(t.variableDeclarator(this.getThisId(),t.thisExpression()))}if(this.needsArguments||this.setsArguments){var _arr2=this.argumentsPaths;for(var _i2=0;_i2<_arr2.length;_i2++){var _path=_arr2[_i2];_path.replaceWith(this.argumentsId)}var decl=t.variableDeclarator(this.argumentsId);if(this.argumentsId){decl.init=t.identifier("arguments");decl.init._shadowedFunctionLiteral=this.path}topVars.push(decl)}var leftId=this.leftId;if(leftId){topVars.push(t.variableDeclarator(leftId))}if(topVars.length>0){node.body.body.unshift(t.variableDeclaration("var",topVars))}};TailCallTransformer.prototype.subTransform=function subTransform(node){if(!node)return;var handler=this["subTransform"+node.type];if(handler)return handler.call(this,node)};TailCallTransformer.prototype.subTransformConditionalExpression=function subTransformConditionalExpression(node){var callConsequent=this.subTransform(node.consequent);var callAlternate=this.subTransform(node.alternate);if(!callConsequent&&!callAlternate){return}node.type="IfStatement";node.consequent=callConsequent?t.toBlock(callConsequent):returnBlock(node.consequent);if(callAlternate){node.alternate=t.isIfStatement(callAlternate)?callAlternate:t.toBlock(callAlternate)}else{node.alternate=returnBlock(node.alternate)}return[node]};TailCallTransformer.prototype.subTransformLogicalExpression=function subTransformLogicalExpression(node){var callRight=this.subTransform(node.right);if(!callRight)return;var leftId=this.getLeftId();var testExpr=t.assignmentExpression("=",leftId,node.left);if(node.operator==="&&"){testExpr=t.unaryExpression("!",testExpr)}return[t.ifStatement(testExpr,returnBlock(leftId))].concat(callRight)};TailCallTransformer.prototype.subTransformSequenceExpression=function subTransformSequenceExpression(node){var seq=node.expressions;var lastCall=this.subTransform(seq[seq.length-1]);if(!lastCall){return}if(--seq.length===1){node=seq[0]}return[t.expressionStatement(node)].concat(lastCall)};TailCallTransformer.prototype.subTransformCallExpression=function subTransformCallExpression(node){var callee=node.callee;var thisBinding,args;if(t.isMemberExpression(callee,{computed:false})&&t.isIdentifier(callee.property)){switch(callee.property.name){case"call":args=t.arrayExpression(node.arguments.slice(1));break;case"apply":args=node.arguments[1]||t.identifier("undefined");this.needsArguments=true;break;default:return}thisBinding=node.arguments[0];callee=callee.object}if(!t.isIdentifier(callee)||!this.scope.bindingIdentifierEquals(callee.name,this.ownerId)){return}this.hasTailRecursion=true;if(this.hasDeopt())return;var body=[];if(this.needsThis&&!t.isThisExpression(thisBinding)){body.push(t.expressionStatement(t.assignmentExpression("=",this.getThisId(),thisBinding||t.identifier("undefined"))))}if(!args){args=t.arrayExpression(node.arguments)}var argumentsId=this.getArgumentsId();var params=this.getParams();if(this.needsArguments){body.push(t.expressionStatement(t.assignmentExpression("=",argumentsId,args)))}if(t.isArrayExpression(args)){var elems=args.elements;while(elems.length1){var root=buildBinaryExpression(nodes.shift(),nodes.shift());var _arr3=nodes;for(var _i3=0;_i3<_arr3.length;_i3++){var _node=_arr3[_i3];root=buildBinaryExpression(root,_node)}this.replaceWith(root)}else{return nodes[0]}}};exports.visitor=visitor},{"../../../types":196}],132:[function(require,module,exports){"use strict";exports.__esModule=true;var metadata={stage:2};exports.metadata=metadata},{}],133:[function(require,module,exports){"use strict";exports.__esModule=true;var metadata={stage:0,dependencies:["es6.classes"]};exports.metadata=metadata},{}],134:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _helpersBuildComprehension=require("../../helpers/build-comprehension");var _helpersBuildComprehension2=_interopRequireDefault(_helpersBuildComprehension);var _traversal=require("../../../traversal");var _traversal2=_interopRequireDefault(_traversal);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={stage:0};exports.metadata=metadata;var visitor={ComprehensionExpression:function ComprehensionExpression(node,parent,scope){var callback=array;if(node.generator)callback=generator;return callback(node,parent,scope)}};exports.visitor=visitor;function generator(node){var body=[];var container=t.functionExpression(null,[],t.blockStatement(body),true);container.shadow=true;body.push(_helpersBuildComprehension2["default"](node,function(){return t.expressionStatement(t.yieldExpression(node.body))}));return t.callExpression(container,[])}function array(node,parent,scope){var uid=scope.generateUidIdentifierBasedOnNode(parent);var container=util.template("array-comprehension-container",{KEY:uid});container.callee.shadow=true;var block=container.callee.body;var body=block.body;if(_traversal2["default"].hasType(node,scope,"YieldExpression",t.FUNCTION_TYPES)){container.callee.generator=true;container=t.yieldExpression(container,true)}var returnStatement=body.pop();body.push(_helpersBuildComprehension2["default"](node,function(){return util.template("array-push",{STATEMENT:node.body,KEY:uid},true)}));body.push(returnStatement);return container}},{"../../../traversal":165,"../../../types":196,"../../../util":199,"../../helpers/build-comprehension":71}],135:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _helpersMemoiseDecorators=require("../../helpers/memoise-decorators");var _helpersMemoiseDecorators2=_interopRequireDefault(_helpersMemoiseDecorators);var _helpersDefineMap=require("../../helpers/define-map");var defineMap=_interopRequireWildcard(_helpersDefineMap);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={dependencies:["es6.classes"],optional:true,stage:1};exports.metadata=metadata;var visitor={ObjectExpression:function ObjectExpression(node,parent,scope,file){var hasDecorators=false;for(var i=0;i=1){nodes.push(node)}return nodes}};exports.visitor=visitor},{"../../../types":196}],139:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={optional:true,stage:0};exports.metadata=metadata;function getTempId(scope){var id=scope.path.getData("functionBind");if(id)return id;id=scope.generateDeclaredUidIdentifier("context");return scope.path.setData("functionBind",id)}function getStaticContext(bind,scope){var object=bind.object||bind.callee.object;return scope.isStatic(object)&&object}function inferBindContext(bind,scope){var staticContext=getStaticContext(bind,scope);if(staticContext)return staticContext;var tempId=getTempId(scope);if(bind.object){bind.callee=t.sequenceExpression([t.assignmentExpression("=",tempId,bind.object),bind.callee])}else{bind.callee.object=t.assignmentExpression("=",tempId,bind.callee.object)}return tempId}var visitor={CallExpression:function CallExpression(node,parent,scope){var bind=node.callee;if(!t.isBindExpression(bind))return;var context=inferBindContext(bind,scope);node.callee=t.memberExpression(bind.callee,t.identifier("call"));node.arguments.unshift(context)},BindExpression:function BindExpression(node,parent,scope){var context=inferBindContext(node,scope);return t.callExpression(t.memberExpression(node.callee,t.identifier("bind")),[context])}};exports.visitor=visitor},{"../../../types":196}],140:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={stage:2,dependencies:["es6.destructuring"]};exports.metadata=metadata;var hasSpread=function hasSpread(node){for(var i=0;i=opts.stage)return true}function optional(transformer,opts){if(transformer.metadata.optional&&!_lodashCollectionIncludes2["default"](opts.optional,transformer.key))return false}},{"lodash/collection/includes":439}],143:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]={"minification.constantFolding":require("babel-plugin-constant-folding"),strict:require("./other/strict"),eval:require("babel-plugin-eval"),_validation:require("./internal/validation"),_hoistDirectives:require("./internal/hoist-directives"),"minification.removeDebugger":require("babel-plugin-remove-debugger"),"minification.removeConsole":require("babel-plugin-remove-console"),"utility.inlineEnvironmentVariables":require("babel-plugin-inline-environment-variables"),"minification.deadCodeElimination":require("babel-plugin-dead-code-elimination"),_modules:require("./internal/modules"),"react.displayName":require("babel-plugin-react-display-name"),"es6.spec.modules":require("./es6/spec.modules"),"es6.spec.arrowFunctions":require("./es6/spec.arrow-functions"),"es6.spec.templateLiterals":require("./es6/spec.template-literals"),"es6.templateLiterals":require("./es6/template-literals"),"es6.literals":require("./es6/literals"),"validation.undeclaredVariableCheck":require("babel-plugin-undeclared-variables-check"),"spec.functionName":require("./spec/function-name"),"es7.classProperties":require("./es7/class-properties"),"es7.trailingFunctionCommas":require("./es7/trailing-function-commas"),"es7.asyncFunctions":require("./es7/async-functions"),"es7.decorators":require("./es7/decorators"),"validation.react":require("./validation/react"),"es6.arrowFunctions":require("./es6/arrow-functions"),"spec.blockScopedFunctions":require("./spec/block-scoped-functions"),"optimisation.react.constantElements":require("babel-plugin-react-constant-elements"),"optimisation.react.inlineElements":require("./optimisation/react.inline-elements"),"es7.comprehensions":require("./es7/comprehensions"),"es6.classes":require("./es6/classes"),asyncToGenerator:require("./other/async-to-generator"),bluebirdCoroutines:require("./other/bluebird-coroutines"),"es6.objectSuper":require("./es6/object-super"),"es7.objectRestSpread":require("./es7/object-rest-spread"),"es7.exponentiationOperator":require("./es7/exponentiation-operator"),"es5.properties.mutators":require("./es5/properties.mutators"),"es6.properties.shorthand":require("./es6/properties.shorthand"),"es6.properties.computed":require("./es6/properties.computed"),"optimisation.flow.forOf":require("./optimisation/flow.for-of"),"es6.forOf":require("./es6/for-of"),"es6.regex.sticky":require("./es6/regex.sticky"),"es6.regex.unicode":require("./es6/regex.unicode"),"es6.constants":require("./es6/constants"),"es7.exportExtensions":require("./es7/export-extensions"),"spec.protoToAssign":require("babel-plugin-proto-to-assign"),"es7.doExpressions":require("./es7/do-expressions"),"es6.spec.symbols":require("./es6/spec.symbols"),"es7.functionBind":require("./es7/function-bind"),"spec.undefinedToVoid":require("babel-plugin-undefined-to-void"),"es6.spread":require("./es6/spread"),"es6.parameters":require("./es6/parameters"),"es6.destructuring":require("./es6/destructuring"),"es6.blockScoping":require("./es6/block-scoping"),"es6.spec.blockScoping":require("./es6/spec.block-scoping"),reactCompat:require("./other/react-compat"),react:require("./other/react"),regenerator:require("./other/regenerator"),runtime:require("babel-plugin-runtime"),"es6.modules":require("./es6/modules"),_moduleFormatter:require("./internal/module-formatter"), -"es6.tailCall":require("./es6/tail-call"),_shadowFunctions:require("./internal/shadow-functions"),"es3.propertyLiterals":require("./es3/property-literals"),"es3.memberExpressionLiterals":require("./es3/member-expression-literals"),"minification.memberExpressionLiterals":require("babel-plugin-member-expression-literals"),"minification.propertyLiterals":require("babel-plugin-property-literals"),_blockHoist:require("./internal/block-hoist"),jscript:require("babel-plugin-jscript"),flow:require("./other/flow"),"optimisation.modules.system":require("./optimisation/modules.system")};module.exports=exports["default"]},{"./es3/member-expression-literals":103,"./es3/property-literals":104,"./es5/properties.mutators":105,"./es6/arrow-functions":106,"./es6/block-scoping":107,"./es6/classes":108,"./es6/constants":111,"./es6/destructuring":112,"./es6/for-of":113,"./es6/literals":114,"./es6/modules":115,"./es6/object-super":116,"./es6/parameters":118,"./es6/properties.computed":120,"./es6/properties.shorthand":121,"./es6/regex.sticky":122,"./es6/regex.unicode":123,"./es6/spec.arrow-functions":124,"./es6/spec.block-scoping":125,"./es6/spec.modules":126,"./es6/spec.symbols":127,"./es6/spec.template-literals":128,"./es6/spread":129,"./es6/tail-call":130,"./es6/template-literals":131,"./es7/async-functions":132,"./es7/class-properties":133,"./es7/comprehensions":134,"./es7/decorators":135,"./es7/do-expressions":136,"./es7/exponentiation-operator":137,"./es7/export-extensions":138,"./es7/function-bind":139,"./es7/object-rest-spread":140,"./es7/trailing-function-commas":141,"./internal/block-hoist":144,"./internal/hoist-directives":145,"./internal/module-formatter":146,"./internal/modules":147,"./internal/shadow-functions":148,"./internal/validation":149,"./optimisation/flow.for-of":150,"./optimisation/modules.system":151,"./optimisation/react.inline-elements":152,"./other/async-to-generator":153,"./other/bluebird-coroutines":154,"./other/flow":155,"./other/react":157,"./other/react-compat":156,"./other/regenerator":158,"./other/strict":159,"./spec/block-scoped-functions":160,"./spec/function-name":161,"./validation/react":162,"babel-plugin-constant-folding":200,"babel-plugin-dead-code-elimination":201,"babel-plugin-eval":202,"babel-plugin-inline-environment-variables":203,"babel-plugin-jscript":204,"babel-plugin-member-expression-literals":205,"babel-plugin-property-literals":206,"babel-plugin-proto-to-assign":207,"babel-plugin-react-constant-elements":208,"babel-plugin-react-display-name":209,"babel-plugin-remove-console":210,"babel-plugin-remove-debugger":211,"babel-plugin-runtime":213,"babel-plugin-undeclared-variables-check":214,"babel-plugin-undefined-to-void":216}],144:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashCollectionSortBy=require("lodash/collection/sortBy");var _lodashCollectionSortBy2=_interopRequireDefault(_lodashCollectionSortBy);var metadata={group:"builtin-trailing"};exports.metadata=metadata;var visitor={Block:{exit:function exit(node){var hasChange=false;for(var i=0;i=0){comment.value=comment.value.replace(FLOW_DIRECTIVE,"");if(!comment.value.replace(/\*/g,"").trim())comment._displayed=true}}},Flow:function Flow(){this.dangerouslyRemove()},ClassProperty:function ClassProperty(node){node.typeAnnotation=null;if(!node.value)this.dangerouslyRemove()},Class:function Class(node){node["implements"]=null},Function:function Function(node){for(var i=0;i0){nodePath=nodePath.get(keysAlongPath.pop())}return nodePath}},{"../../../types":196,regenerator:561}],159:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-pre"};exports.metadata=metadata;var THIS_BREAK_KEYS=["FunctionExpression","FunctionDeclaration","ClassProperty"];function isUseStrict(node){if(!t.isLiteral(node))return false;if(node.raw&&node.rawValue===node.value){return node.rawValue==="use strict"}else{return node.value==="use strict"}}var visitor={Program:{enter:function enter(program){var first=program.body[0];var directive;if(t.isExpressionStatement(first)&&isUseStrict(first.expression)){directive=first}else{directive=t.expressionStatement(t.literal("use strict"));this.unshiftContainer("body",directive);if(first){directive.leadingComments=first.leadingComments;first.leadingComments=[]}}directive._blockHoist=Infinity}},ThisExpression:function ThisExpression(){if(!this.findParent(function(path){return!path.is("shadow")&&THIS_BREAK_KEYS.indexOf(path.type)>=0})){return t.identifier("undefined")}}};exports.visitor=visitor},{"../../../types":196}],160:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function statementList(key,path){var paths=path.get(key);for(var i=0;i=0)continue;visited.push(path.node);if(path.visit()){stop=true;break}}var _arr3=queue;for(var _i3=0;_i3<_arr3.length;_i3++){var path=_arr3[_i3];path.shiftContext()}this.queue=null;return stop};TraversalContext.prototype.visitSingle=function visitSingle(node,key){if(this.shouldVisit(node[key])){var path=this.create(node,node,key);path.visit();path.shiftContext()}};TraversalContext.prototype.visit=function visit(node,key){var nodes=node[key];if(!nodes)return;if(Array.isArray(nodes)){return this.visitMultiple(nodes,node,key)}else{return this.visitSingle(node,key)}};return TraversalContext}();exports["default"]=TraversalContext;module.exports=exports["default"]},{"../types":196,"./path":172}],164:[function(require,module,exports){"use strict";exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var Hub=function Hub(file){_classCallCheck(this,Hub);this.file=file};exports["default"]=Hub;module.exports=exports["default"]},{}],165:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]=traverse;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _context=require("./context");var _context2=_interopRequireDefault(_context);var _visitors=require("./visitors");var visitors=_interopRequireWildcard(_visitors);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _types=require("../types");var t=_interopRequireWildcard(_types);function traverse(parent,opts,scope,state,parentPath){if(!parent)return;if(!opts)opts={};if(!opts.noScope&&!scope){if(parent.type!=="Program"&&parent.type!=="File"){throw new Error(messages.get("traverseNeedsParent",parent.type))}}visitors.explode(opts);if(Array.isArray(parent)){for(var i=0;icurrentKeyIndex){earliest=path}}return earliest})}function getDeepestCommonAncestorFrom(paths,filter){var _this=this;if(!paths.length){return this}if(paths.length===1){return paths[0]}var minDepth=Infinity;var lastCommonIndex,lastCommon;var ancestries=paths.map(function(path){var ancestry=[];do{ancestry.unshift(path)}while((path=path.parentPath)&&path!==_this);if(ancestry.length-1}function visit(){if(this.isBlacklisted())return false;if(this.opts.shouldSkip&&this.opts.shouldSkip(this))return false;this.call("enter");if(this.shouldSkip){return this.shouldStop}var node=this.node;var opts=this.opts;if(node){if(Array.isArray(node)){for(var i=0;i":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right}}if(path.isCallExpression()){var callee=path.get("callee");var context;var func;if(callee.isIdentifier()&&!path.scope.getBinding(callee.node.name,true)&&VALID_CALLEES.indexOf(callee.node.name)>=0){func=global[node.callee.name]}if(callee.isMemberExpression()){var object=callee.get("object");var property=callee.get("property");if(object.isIdentifier()&&property.isIdentifier()&&VALID_CALLEES.indexOf(object.node.name)>=0){context=global[object.node.name];func=context[property.node.name]}if(object.isLiteral()&&property.isIdentifier()){var type=typeof object.node.value;if(type==="string"||type==="number"){context=object.node.value;func=context[property.node.name]}}}if(func){var args=path.get("arguments").map(evaluate);if(!confident)return;return func.apply(context,args)}}confident=false}}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],171:[function(require,module,exports){"use strict";exports.__esModule=true;exports.getStatementParent=getStatementParent;exports.getOpposite=getOpposite;exports.getCompletionRecords=getCompletionRecords;exports.getSibling=getSibling;exports.get=get;exports._getKey=_getKey;exports._getPattern=_getPattern;exports.getBindingIdentifiers=getBindingIdentifiers;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _index=require("./index");var _index2=_interopRequireDefault(_index);var _types=require("../../types");var t=_interopRequireWildcard(_types);function getStatementParent(){var path=this;do{if(!path.parentPath||Array.isArray(path.container)&&path.isStatement()){break}else{path=path.parentPath}}while(path);if(path&&(path.isProgram()||path.isFile())){throw new Error("File/Program node, we can't possibly find a statement parent to this")}return path}function getOpposite(){if(this.key==="left"){return this.getSibling("right")}else if(this.key==="right"){return this.getSibling("left")}}function getCompletionRecords(){var paths=[];var add=function add(path){if(path)paths=paths.concat(path.getCompletionRecords())};if(this.isIfStatement()){add(this.get("consequent"));add(this.get("alternate"))}else if(this.isDoExpression()||this.isFor()||this.isWhile()){add(this.get("body"))}else if(this.isProgram()||this.isBlockStatement()){add(this.get("body").pop())}else if(this.isFunction()){return this.get("body").getCompletionRecords()}else if(this.isTryStatement()){add(this.get("block"));add(this.get("handler"));add(this.get("finalizer"))}else{paths.push(this)}return paths}function getSibling(key){return _index2["default"].get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:key})}function get(key,context){if(context===true)context=this.context;var parts=key.split(".");if(parts.length===1){return this._getKey(key,context)}else{return this._getPattern(parts,context)}}function _getKey(key,context){var _this=this;var node=this.node;var container=node[key];if(Array.isArray(container)){return container.map(function(_,i){return _index2["default"].get({listKey:key,parentPath:_this,parent:node,container:container,key:i}).setContext(context)})}else{return _index2["default"].get({parentPath:this,parent:node,container:node,key:key}).setContext(context)}}function _getPattern(parts,context){var path=this;var _arr=parts;for(var _i=0;_i<_arr.length;_i++){var part=_arr[_i];if(part==="."){path=path.parentPath}else{if(Array.isArray(path)){path=path[part]}else{path=path.get(part,context)}}}return path}function getBindingIdentifiers(duplicates){return t.getBindingIdentifiers(this.node,duplicates)}},{"../../types":196,"./index":172}],172:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _libVirtualTypes=require("./lib/virtual-types");var virtualTypes=_interopRequireWildcard(_libVirtualTypes);var _index=require("../index");var _index2=_interopRequireDefault(_index);var _lodashObjectAssign=require("lodash/object/assign");var _lodashObjectAssign2=_interopRequireDefault(_lodashObjectAssign);var _scope=require("../scope");var _scope2=_interopRequireDefault(_scope);var _types=require("../../types");var t=_interopRequireWildcard(_types);var NodePath=function(){function NodePath(hub,parent){_classCallCheck(this,NodePath);this.contexts=[];this.parent=parent;this.data={};this.hub=hub;this.shouldSkip=false;this.shouldStop=false;this.removed=false;this.state=null;this.opts=null;this.skipKeys=null;this.parentPath=null;this.context=null;this.container=null;this.listKey=null;this.inList=false;this.parentKey=null;this.key=null;this.node=null;this.scope=null;this.type=null;this.typeAnnotation=null}NodePath.get=function get(_ref){var hub=_ref.hub;var parentPath=_ref.parentPath;var parent=_ref.parent;var container=_ref.container;var listKey=_ref.listKey;var key=_ref.key;if(!hub&&parentPath){hub=parentPath.hub}var targetNode=container[key];var paths=parent._paths=parent._paths||[];var path;for(var i=0;i=0)continue;visitedScopes.push(violationScope);constantViolations.push(violation);if(violationScope===path.scope){constantViolations=[violation];break}}constantViolations=constantViolations.concat(functionConstantViolations);var _arr2=constantViolations;for(var _i2=0;_i2<_arr2.length;_i2++){var violation=_arr2[_i2];types.push(violation.getTypeAnnotation())}}if(types.length){return t.createUnionTypeAnnotation(types)}}function getConstantViolationsBefore(binding,path,functions){var violations=binding.constantViolations.slice();violations.unshift(binding.path);return violations.filter(function(violation){violation=violation.resolve();var status=violation._guessExecutionStatusRelativeTo(path);if(functions&&status==="function")functions.push(violation);return status==="before"})}function inferAnnotationFromBinaryExpression(name,path){var operator=path.node.operator;var right=path.get("right").resolve();var left=path.get("left").resolve();var target;if(left.isIdentifier({name:name})){target=right}else if(right.isIdentifier({name:name})){target=left}if(target){if(operator==="==="){return target.getTypeAnnotation()}else if(t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else{return}}else{if(operator!=="===")return}var typeofPath;var typePath;if(left.isUnaryExpression({operator:"typeof"})){typeofPath=left;typePath=right}else if(right.isUnaryExpression({operator:"typeof"})){typeofPath=right;typePath=left}if(!typePath&&!typeofPath)return;typePath=typePath.resolve();if(!typePath.isLiteral())return;var typeValue=typePath.node.value;if(typeof typeValue!=="string")return;if(!typeofPath.get("argument").isIdentifier({name:name}))return;return t.createTypeAnnotationBasedOnTypeof(typePath.node.value)}function getParentConditionalPath(path){var parentPath;while(parentPath=path.parentPath){if(parentPath.isIfStatement()||parentPath.isConditionalExpression()){if(path.key==="test"){return}else{return parentPath}}else{path=parentPath}}}function getConditionalAnnotation(path,name){var ifStatement=getParentConditionalPath(path);if(!ifStatement)return;var test=ifStatement.get("test");var paths=[test];var types=[];do{var _path=paths.shift().resolve();if(_path.isLogicalExpression()){paths.push(_path.get("left"));paths.push(_path.get("right"))}if(_path.isBinaryExpression()){var type=inferAnnotationFromBinaryExpression(name,_path);if(type)types.push(type)}}while(paths.length);if(types.length){return{typeAnnotation:t.createUnionTypeAnnotation(types),ifStatement:ifStatement}}else{return getConditionalAnnotation(ifStatement,name)}}module.exports=exports["default"]},{"../../../types":196}],175:[function(require,module,exports){"use strict";exports.__esModule=true;exports.VariableDeclarator=VariableDeclarator;exports.TypeCastExpression=TypeCastExpression;exports.NewExpression=NewExpression;exports.TemplateLiteral=TemplateLiteral;exports.UnaryExpression=UnaryExpression;exports.BinaryExpression=BinaryExpression;exports.LogicalExpression=LogicalExpression;exports.ConditionalExpression=ConditionalExpression;exports.SequenceExpression=SequenceExpression;exports.AssignmentExpression=AssignmentExpression;exports.UpdateExpression=UpdateExpression;exports.Literal=Literal;exports.ObjectExpression=ObjectExpression;exports.ArrayExpression=ArrayExpression;exports.RestElement=RestElement;exports.CallExpression=CallExpression;exports.TaggedTemplateExpression=TaggedTemplateExpression;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var _infererReference=require("./inferer-reference");exports.Identifier=_interopRequire(_infererReference);function VariableDeclarator(){var id=this.get("id");if(id.isIdentifier()){return this.get("init").getTypeAnnotation()}else{return}}function TypeCastExpression(node){return node.typeAnnotation}TypeCastExpression.validParent=true;function NewExpression(node){if(this.get("callee").isIdentifier()){return t.genericTypeAnnotation(node.callee)}}function TemplateLiteral(){return t.stringTypeAnnotation()}function UnaryExpression(node){var operator=node.operator;if(operator==="void"){return t.voidTypeAnnotation()}else if(t.NUMBER_UNARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.STRING_UNARY_OPERATORS.indexOf(operator)>=0){return t.stringTypeAnnotation()}else if(t.BOOLEAN_UNARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}}function BinaryExpression(node){var operator=node.operator;if(t.NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.BOOLEAN_BINARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}else if(operator==="+"){var right=this.get("right");var left=this.get("left");if(left.isBaseType("number")&&right.isBaseType("number")){return t.numberTypeAnnotation()}else if(left.isBaseType("string")||right.isBaseType("string")){return t.stringTypeAnnotation()}return t.unionTypeAnnotation([t.stringTypeAnnotation(),t.numberTypeAnnotation()])}}function LogicalExpression(){return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function ConditionalExpression(){return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function SequenceExpression(){return this.get("expressions").pop().getTypeAnnotation()}function AssignmentExpression(){return this.get("right").getTypeAnnotation()}function UpdateExpression(node){var operator=node.operator;if(operator==="++"||operator==="--"){return t.numberTypeAnnotation()}}function Literal(node){var value=node.value;if(typeof value==="string")return t.stringTypeAnnotation();if(typeof value==="number")return t.numberTypeAnnotation();if(typeof value==="boolean")return t.booleanTypeAnnotation();if(value===null)return t.voidTypeAnnotation();if(node.regex)return t.genericTypeAnnotation(t.identifier("RegExp"))}function ObjectExpression(){return t.genericTypeAnnotation(t.identifier("Object"))}function ArrayExpression(){return t.genericTypeAnnotation(t.identifier("Array"))}function RestElement(){return ArrayExpression()}RestElement.validParent=true;function Func(){return t.genericTypeAnnotation(t.identifier("Function"))}exports.Function=Func;exports.Class=Func;function CallExpression(){return resolveCall(this.get("callee"))}function TaggedTemplateExpression(){return resolveCall(this.get("tag"))}function resolveCall(callee){callee=callee.resolve();if(callee.isFunction()){if(callee.is("async")){if(callee.is("generator")){return t.genericTypeAnnotation(t.identifier("AsyncIterator"))}else{return t.genericTypeAnnotation(t.identifier("Promise"))}}else{if(callee.node.returnType){return callee.node.returnType}else{}}}}},{"../../../types":196,"./inferer-reference":174}],176:[function(require,module,exports){"use strict";exports.__esModule=true;exports.matchesPattern=matchesPattern;exports.has=has;exports.isnt=isnt;exports.equals=equals;exports.isNodeType=isNodeType;exports.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;exports.isCompletionRecord=isCompletionRecord;exports.isStatementOrBlock=isStatementOrBlock;exports.referencesImport=referencesImport;exports.getSource=getSource;exports.willIMaybeExecuteBefore=willIMaybeExecuteBefore;exports._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;exports.resolve=resolve;exports._resolve=_resolve;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _types=require("../../types");var t=_interopRequireWildcard(_types); -function matchesPattern(pattern,allowPartial){if(!this.isMemberExpression())return false;var parts=pattern.split(".");var search=[this.node];var i=0;function matches(name){var part=parts[i];return part==="*"||name===part}while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(!matches(node.name))return false}else if(t.isLiteral(node)){if(!matches(node.value))return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.unshift(node.property);search.unshift(node.object);continue}}else if(t.isThisExpression(node)){if(!matches("this"))return false}else{return false}if(++i>parts.length){return false}}return i===parts.length}function has(key){var val=this.node[key];if(val&&Array.isArray(val)){return!!val.length}else{return!!val}}var is=has;exports.is=is;function isnt(key){return!this.has(key)}function equals(key,value){return this.node[key]===value}function isNodeType(type){return t.isType(this.type,type)}function canHaveVariableDeclarationOrExpression(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function isCompletionRecord(allowInsideFunction){var path=this;var first=true;do{var container=path.container;if(path.isFunction()&&!first){return!!allowInsideFunction}first=false;if(Array.isArray(container)&&path.key!==container.length-1){return false}}while((path=path.parentPath)&&!path.isProgram());return true}function isStatementOrBlock(){if(this.parentPath.isLabeledStatement()||t.isBlockStatement(this.container)){return false}else{return _lodashCollectionIncludes2["default"](t.STATEMENT_OR_BLOCK_KEYS,this.key)}}function referencesImport(moduleSource,importName){if(!this.isReferencedIdentifier())return false;var binding=this.scope.getBinding(this.node.name);if(!binding||binding.kind!=="module")return false;var path=binding.path;var parent=path.parentPath;if(!parent.isImportDeclaration())return false;if(parent.node.source.value===moduleSource){if(!importName)return true}else{return false}if(path.isImportDefaultSpecifier()&&importName==="default"){return true}if(path.isImportNamespaceSpecifier()&&importName==="*"){return true}if(path.isImportSpecifier()&&path.node.imported.name===importName){return true}return false}function getSource(){var node=this.node;if(node.end){return this.hub.file.code.slice(node.start,node.end)}else{return""}}function willIMaybeExecuteBefore(target){return this._guessExecutionStatusRelativeTo(target)!=="after"}function _guessExecutionStatusRelativeTo(target){var targetFuncParent=target.scope.getFunctionParent();var selfFuncParent=this.scope.getFunctionParent();if(targetFuncParent!==selfFuncParent){return"function"}var targetPaths=target.getAncestry();var selfPaths=this.getAncestry();var commonPath;var targetIndex;var selfIndex;for(selfIndex=0;selfIndex=0){commonPath=selfPath;break}}if(!commonPath){return"before"}var targetRelationship=targetPaths[targetIndex-1];var selfRelationship=selfPaths[selfIndex-1];if(!targetRelationship||!selfRelationship){return"before"}if(targetRelationship.listKey&&targetRelationship.container===selfRelationship.container){return targetRelationship.key>selfRelationship.key?"before":"after"}var targetKeyPosition=t.VISITOR_KEYS[targetRelationship.type].indexOf(targetRelationship.key);var selfKeyPosition=t.VISITOR_KEYS[selfRelationship.type].indexOf(selfRelationship.key);return targetKeyPosition>selfKeyPosition?"before":"after"}function resolve(dangerous,resolved){return this._resolve(dangerous,resolved)||this}function _resolve(dangerous,resolved){if(resolved&&resolved.indexOf(this)>=0)return;resolved=resolved||[];resolved.push(this);if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve(dangerous,resolved)}else{}}else if(this.isReferencedIdentifier()){var binding=this.scope.getBinding(this.node.name);if(!binding)return;if(!binding.constant)return;if(binding.kind==="module")return;if(binding.path!==this){return binding.path.resolve(dangerous,resolved)}}else if(this.isTypeCastExpression()){return this.get("expression").resolve(dangerous,resolved)}else if(dangerous&&this.isMemberExpression()){var targetKey=this.toComputedKey();if(!t.isLiteral(targetKey))return;var targetName=targetKey.value;var target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){var props=target.get("properties");var _arr=props;for(var _i=0;_i<_arr.length;_i++){var prop=_arr[_i];if(!prop.isProperty())continue;var key=prop.get("key");var match=prop.isnt("computed")&&key.isIdentifier({name:targetName});match=match||key.isLiteral({value:targetName});if(match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){var elems=target.get("elements");var elem=elems[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}},{"../../types":196,"lodash/collection/includes":439}],177:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _transformationHelpersReact=require("../../../transformation/helpers/react");var react=_interopRequireWildcard(_transformationHelpersReact);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){if(this.isJSXIdentifier()&&react.isCompatTag(node.name)){return}var binding=scope.getBinding(node.name);if(!binding)return;if(binding!==state.scope.getBinding(node.name))return;if(binding.constant){state.bindings[node.name]=binding}else{var _arr=binding.constantViolations;for(var _i=0;_i<_arr.length;_i++){var violationPath=_arr[_i];state.breakOnScopePaths=state.breakOnScopePaths.concat(violationPath.getAncestry())}}}};var PathHoister=function(){function PathHoister(path,scope){_classCallCheck(this,PathHoister);this.breakOnScopePaths=[];this.bindings={};this.scopes=[];this.scope=scope;this.path=path}PathHoister.prototype.isCompatibleScope=function isCompatibleScope(scope){for(var key in this.bindings){var binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier)){return false}}return true};PathHoister.prototype.getCompatibleScopes=function getCompatibleScopes(){var scope=this.path.scope;do{if(this.isCompatibleScope(scope)){this.scopes.push(scope)}else{break}if(this.breakOnScopePaths.indexOf(scope.path)>=0){break}}while(scope=scope.parent)};PathHoister.prototype.getAttachmentPath=function getAttachmentPath(){var scopes=this.scopes;var scope=scopes.pop();if(!scope)return;if(scope.path.isFunction()){if(this.hasOwnParamBindings(scope)){if(this.scope===scope)return;return scope.path.get("body").get("body")[0]}else{return this.getNextScopeStatementParent()}}else if(scope.path.isProgram()){return this.getNextScopeStatementParent()}};PathHoister.prototype.getNextScopeStatementParent=function getNextScopeStatementParent(){var scope=this.scopes.pop();if(scope)return scope.path.getStatementParent()};PathHoister.prototype.hasOwnParamBindings=function hasOwnParamBindings(scope){for(var name in this.bindings){if(!scope.hasOwnBinding(name))continue;var binding=this.bindings[name];if(binding.kind==="param")return true}return false};PathHoister.prototype.run=function run(){var node=this.path.node;if(node._hoisted)return;node._hoisted=true;this.path.traverse(referenceVisitor,this);this.getCompatibleScopes();var attachTo=this.getAttachmentPath();if(!attachTo)return;if(attachTo.getFunctionParent()===this.path.getFunctionParent())return;var uid=attachTo.scope.generateUidIdentifier("ref");attachTo.insertBefore([t.variableDeclaration("var",[t.variableDeclarator(uid,this.path.node)])]);var parent=this.path.parentPath;if(parent.isJSXElement()&&this.path.container===parent.node.children){uid=t.JSXExpressionContainer(uid)}this.path.replaceWith(uid)};return PathHoister}();exports["default"]=PathHoister;module.exports=exports["default"]},{"../../../transformation/helpers/react":79,"../../../types":196}],178:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var pre=[function(self){if(self.key==="body"&&(self.isBlockStatement()||self.isClassBody())){self.node.body=[];return true}},function(self,parent){var replace=false;replace=replace||self.key==="body"&&parent.isArrowFunctionExpression();replace=replace||self.key==="argument"&&parent.isThrowStatement();if(replace){self.replaceWith(t.identifier("undefined"));return true}}];exports.pre=pre;var post=[function(self,parent){var removeParent=false;removeParent=removeParent||self.key==="test"&&(parent.isWhile()||parent.isSwitchCase());removeParent=removeParent||self.key==="declaration"&&parent.isExportDeclaration();removeParent=removeParent||self.key==="body"&&parent.isLabeledStatement();removeParent=removeParent||self.listKey==="declarations"&&parent.isVariableDeclaration()&&parent.node.declarations.length===0;removeParent=removeParent||self.key==="expression"&&parent.isExpressionStatement();removeParent=removeParent||self.key==="test"&&parent.isIfStatement();if(removeParent){parent.dangerouslyRemove();return true}},function(self,parent){if(parent.isSequenceExpression()&&parent.node.expressions.length===1){parent.replaceWith(parent.node.expressions[0]);return true}},function(self,parent){if(parent.isBinary()){if(self.key==="left"){parent.replaceWith(parent.node.right)}else{parent.replaceWith(parent.node.left)}return true}}];exports.post=post},{"../../../types":196}],179:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _transformationHelpersReact=require("../../../transformation/helpers/react");var react=_interopRequireWildcard(_transformationHelpersReact);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function checkPath(_ref,opts){var node=_ref.node;var parent=_ref.parent;if(!t.isIdentifier(node,opts)){if(t.isJSXIdentifier(node,opts)){if(react.isCompatTag(node.name))return false}else{return false}}return t.isReferenced(node,parent)}};exports.ReferencedIdentifier=ReferencedIdentifier;var BindingIdentifier={types:["Identifier"],checkPath:function checkPath(_ref2){var node=_ref2.node;var parent=_ref2.parent;return t.isBinding(node,parent)}};exports.BindingIdentifier=BindingIdentifier;var Statement={types:["Statement"],checkPath:function checkPath(_ref3){var node=_ref3.node;var parent=_ref3.parent;if(t.isStatement(node)){if(t.isVariableDeclaration(node)){if(t.isForXStatement(parent,{left:node}))return false;if(t.isForStatement(parent,{init:node}))return false}return true}else{return false}}};exports.Statement=Statement;var Expression={types:["Expression"],checkPath:function checkPath(path){if(path.isIdentifier()){return path.isReferencedIdentifier()}else{return t.isExpression(path.node)}}};exports.Expression=Expression;var Scope={types:["Scopable"],checkPath:function checkPath(path){return t.isScope(path.node,path.parent)}};exports.Scope=Scope;var Referenced={checkPath:function checkPath(path){return t.isReferenced(path.node,path.parent)}};exports.Referenced=Referenced;var BlockScoped={checkPath:function checkPath(path){return t.isBlockScoped(path.node)}};exports.BlockScoped=BlockScoped;var Var={types:["VariableDeclaration"],checkPath:function checkPath(path){return t.isVar(path.node)}};exports.Var=Var;var DirectiveLiteral={types:["Literal"],checkPath:function checkPath(path){return path.isLiteral()&&path.parentPath.isExpressionStatement()}};exports.DirectiveLiteral=DirectiveLiteral;var Directive={types:["ExpressionStatement"],checkPath:function checkPath(path){return path.get("expression").isLiteral()}};exports.Directive=Directive;var User={checkPath:function checkPath(path){return path.node&&!!path.node.loc}};exports.User=User;var Generated={checkPath:function checkPath(path){return!path.isUser()}};exports.Generated=Generated;var Flow={types:["Flow","ImportDeclaration","ExportDeclaration"],checkPath:function checkPath(_ref4){var node=_ref4.node;if(t.isFlow(node)){return true}else if(t.isImportDeclaration(node)){return node.importKind==="type"||node.importKind==="typeof"}else if(t.isExportDeclaration(node)){return node.exportKind==="type"}else{return false}}};exports.Flow=Flow},{"../../../transformation/helpers/react":79,"../../../types":196}],180:[function(require,module,exports){"use strict";exports.__esModule=true;exports.insertBefore=insertBefore;exports._containerInsert=_containerInsert;exports._containerInsertBefore=_containerInsertBefore;exports._containerInsertAfter=_containerInsertAfter;exports._maybePopFromStatements=_maybePopFromStatements;exports.insertAfter=insertAfter;exports.updateSiblingKeys=updateSiblingKeys;exports._verifyNodeList=_verifyNodeList;exports.unshiftContainer=unshiftContainer;exports.pushContainer=pushContainer;exports.hoist=hoist;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _libHoister=require("./lib/hoister");var _libHoister2=_interopRequireDefault(_libHoister);var _index=require("./index");var _index2=_interopRequireDefault(_index);var _types=require("../../types");var t=_interopRequireWildcard(_types);function insertBefore(nodes){this._assertUnremoved();nodes=this._verifyNodeList(nodes);if(this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement()){return this.parentPath.insertBefore(nodes)}else if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&this.key==="init"){if(this.node)nodes.push(this.node);this.replaceExpressionWithStatements(nodes)}else{this._maybePopFromStatements(nodes);if(Array.isArray(this.container)){return this._containerInsertBefore(nodes)}else if(this.isStatementOrBlock()){if(this.node)nodes.push(this.node);this.node=this.container[this.key]=t.blockStatement(nodes)}else{throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}return[this]}function _containerInsert(from,nodes){this.updateSiblingKeys(from,nodes.length);var paths=[];for(var i=0;i=fromIndex){path.key+=incrementBy}}}function _verifyNodeList(nodes){if(nodes.constructor!==Array){nodes=[nodes]}for(var i=0;i1)id+=i;return"_"+id};Scope.prototype.generateUidIdentifierBasedOnNode=function generateUidIdentifierBasedOnNode(parent,defaultName){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isProperty(node)){node=node.key}var parts=[];var add=function add(node){if(t.isModuleDeclaration(node)){if(node.source){add(node.source)}else if(node.specifiers&&node.specifiers.length){var _arr4=node.specifiers;for(var _i4=0;_i4<_arr4.length;_i4++){var specifier=_arr4[_i4];add(specifier)}}else if(node.declaration){add(node.declaration)}}else if(t.isModuleSpecifier(node)){add(node.local)}else if(t.isMemberExpression(node)){add(node.object);add(node.property)}else if(t.isIdentifier(node)){parts.push(node.name)}else if(t.isLiteral(node)){parts.push(node.value)}else if(t.isCallExpression(node)){add(node.callee)}else if(t.isObjectExpression(node)||t.isObjectPattern(node)){var _arr5=node.properties;for(var _i5=0;_i5<_arr5.length;_i5++){var prop=_arr5[_i5];add(prop.key||prop.argument)}}};add(node);var id=parts.join("$");id=id.replace(/^_/,"")||defaultName||"ref";return this.generateUidIdentifier(id)};Scope.prototype.isStatic=function isStatic(node){if(t.isThisExpression(node)||t.isSuper(node)){return true}if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(binding){return binding.constant}else{return this.hasBinding(node.name)}}return false};Scope.prototype.maybeGenerateMemoised=function maybeGenerateMemoised(node,dontPush){if(this.isStatic(node)){return null}else{var id=this.generateUidIdentifierBasedOnNode(node);if(!dontPush)this.push({id:id});return id}};Scope.prototype.checkBlockScopedCollisions=function checkBlockScopedCollisions(local,kind,name,id){if(kind==="param")return;if(kind==="hoisted"&&local.kind==="let")return;var duplicate=false;if(!duplicate)duplicate=kind==="let"||local.kind==="let"||local.kind==="const"||local.kind==="module";if(!duplicate)duplicate=local.kind==="param"&&(kind==="let"||kind==="const");if(duplicate){throw this.hub.file.errorWithNode(id,messages.get("scopeDuplicateDeclaration",name),TypeError)}};Scope.prototype.rename=function rename(oldName,newName,block){newName=newName||this.generateUidIdentifier(oldName).name;var info=this.getBinding(oldName);if(!info)return;var state={newName:newName,oldName:oldName,binding:info.identifier,info:info};var scope=info.scope;scope.traverse(block||scope.block,renameVisitor,state);if(!block){scope.removeOwnBinding(oldName);scope.bindings[newName]=info;state.binding.name=newName}var file=this.hub.file;if(file){this._renameFromMap(file.moduleFormatter.localImports,oldName,newName,state.binding)}};Scope.prototype._renameFromMap=function _renameFromMap(map,oldName,newName,value){if(map[oldName]){map[newName]=value;map[oldName]=null}};Scope.prototype.dump=function dump(){var sep=_repeating2["default"]("-",60);console.log(sep);var scope=this;do{console.log("#",scope.block.type);for(var name in scope.bindings){var binding=scope.bindings[name];console.log(" -",name,{constant:binding.constant,references:binding.references,kind:binding.kind})}}while(scope=scope.parent);console.log(sep)};Scope.prototype.toArray=function toArray(node,i){var file=this.hub.file;if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(binding&&binding.constant&&binding.path.isGenericType("Array"))return node}if(t.isArrayExpression(node)){return node}if(t.isIdentifier(node,{name:"arguments"})){return t.callExpression(t.memberExpression(file.addHelper("slice"),t.identifier("call")),[node])}var helperName="to-array";var args=[node];if(i===true){helperName="to-consumable-array"}else if(i){args.push(t.literal(i));helperName="sliced-to-array";if(this.hub.file.isLoose("es6.forOf"))helperName+="-loose"}return t.callExpression(file.addHelper(helperName),args)};Scope.prototype.registerDeclaration=function registerDeclaration(path){if(path.isLabeledStatement()){this.registerBinding("label",path)}else if(path.isFunctionDeclaration()){this.registerBinding("hoisted",path)}else if(path.isVariableDeclaration()){var declarations=path.get("declarations");var _arr6=declarations;for(var _i6=0;_i6<_arr6.length;_i6++){var declar=_arr6[_i6];this.registerBinding(path.node.kind,declar)}}else if(path.isClassDeclaration()){this.registerBinding("let",path)}else if(path.isImportDeclaration()){var specifiers=path.get("specifiers");var _arr7=specifiers;for(var _i7=0;_i7<_arr7.length;_i7++){var specifier=_arr7[_i7];this.registerBinding("module",specifier)}}else if(path.isExportDeclaration()){var declar=path.get("declaration");if(declar.isClassDeclaration()||declar.isFunctionDeclaration()||declar.isVariableDeclaration()){this.registerDeclaration(declar)}}else{this.registerBinding("unknown",path)}};Scope.prototype.registerConstantViolation=function registerConstantViolation(root,left,right){var ids=left.getBindingIdentifiers();for(var name in ids){var binding=this.getBinding(name);if(binding)binding.reassign(root,left,right)}};Scope.prototype.registerBinding=function registerBinding(kind,path){if(!kind)throw new ReferenceError("no `kind`");if(path.isVariableDeclaration()){var declarators=path.get("declarations");var _arr8=declarators;for(var _i8=0;_i8<_arr8.length;_i8++){var declar=_arr8[_i8];this.registerBinding(kind,declar)}return}var parent=this.getProgramParent();var ids=path.getBindingIdentifiers(true);for(var name in ids){var _arr9=ids[name];for(var _i9=0;_i9<_arr9.length;_i9++){var id=_arr9[_i9];var local=this.getOwnBinding(name);if(local){if(local.identifier===id)continue;this.checkBlockScopedCollisions(local,kind,name,id)}parent.references[name]=true;this.bindings[name]=new _binding2["default"]({identifier:id,existing:local,scope:this,path:path,kind:kind})}}};Scope.prototype.addGlobal=function addGlobal(node){this.globals[node.name]=node};Scope.prototype.hasUid=function hasUid(name){var scope=this;do{if(scope.uids[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasGlobal=function hasGlobal(name){var scope=this;do{if(scope.globals[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasReference=function hasReference(name){var scope=this;do{if(scope.references[name])return true}while(scope=scope.parent);return false};Scope.prototype.isPure=function isPure(node,constantsOnly){if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(!binding)return false;if(constantsOnly)return binding.constant;return true}else if(t.isClass(node)){return!node.superClass||this.isPure(node.superClass,constantsOnly)}else if(t.isBinary(node)){return this.isPure(node.left,constantsOnly)&&this.isPure(node.right,constantsOnly)}else if(t.isArrayExpression(node)){var _arr10=node.elements;for(var _i10=0;_i10<_arr10.length;_i10++){var elem=_arr10[_i10];if(!this.isPure(elem,constantsOnly))return false}return true}else if(t.isObjectExpression(node)){var _arr11=node.properties;for(var _i11=0;_i11<_arr11.length;_i11++){var prop=_arr11[_i11];if(!this.isPure(prop,constantsOnly))return false}return true}else if(t.isProperty(node)){if(node.computed&&!this.isPure(node.key,constantsOnly))return false;return this.isPure(node.value,constantsOnly)}else{return t.isPure(node)}};Scope.prototype.setData=function setData(key,val){return this.data[key]=val};Scope.prototype.getData=function getData(key){var scope=this;do{var data=scope.data[key];if(data!=null)return data}while(scope=scope.parent)};Scope.prototype.removeData=function removeData(key){var scope=this;do{var data=scope.data[key];if(data!=null)scope.data[key]=null}while(scope=scope.parent)};Scope.prototype.init=function init(){if(!this.references)this.crawl()};Scope.prototype.crawl=function crawl(){var path=this.path;var info=this.block._scopeInfo;if(info)return _lodashObjectExtend2["default"](this,info);info=this.block._scopeInfo={references:_helpersObject2["default"](),bindings:_helpersObject2["default"](),globals:_helpersObject2["default"](),uids:_helpersObject2["default"](),data:_helpersObject2["default"]()};_lodashObjectExtend2["default"](this,info);if(path.isLoop()){var _arr12=t.FOR_INIT_KEYS;for(var _i12=0;_i12<_arr12.length;_i12++){var key=_arr12[_i12];var node=path.get(key);if(node.isBlockScoped())this.registerBinding(node.node.kind,node)}}if(path.isFunctionExpression()&&path.has("id")){if(!t.isProperty(path.parent,{method:true})){this.registerBinding("var",path)}}if(path.isClassExpression()&&path.has("id")){this.registerBinding("var",path)}if(path.isFunction()){var params=path.get("params");var _arr13=params;for(var _i13=0;_i13<_arr13.length;_i13++){var param=_arr13[_i13];this.registerBinding("param",param)}}if(path.isCatchClause()){this.registerBinding("let",path)}if(path.isComprehensionExpression()){this.registerBinding("let",path)}var parent=this.getProgramParent();if(parent.crawling)return;this.crawling=true;path.traverse(collectorVisitor);this.crawling=false};Scope.prototype.push=function push(opts){var path=this.path;if(path.isSwitchStatement()){path=this.getFunctionParent().path}if(path.isLoop()||path.isCatchClause()||path.isFunction()){t.ensureBlock(path.node);path=path.get("body")}if(!path.isBlockStatement()&&!path.isProgram()){path=this.getBlockParent().path}var unique=opts.unique;var kind=opts.kind||"var";var blockHoist=opts._blockHoist==null?2:opts._blockHoist;var dataKey="declaration:"+kind+":"+blockHoist;var declarPath=!unique&&path.getData(dataKey);if(!declarPath){var declar=t.variableDeclaration(kind,[]);declar._generated=true;declar._blockHoist=blockHoist;this.hub.file.attachAuxiliaryComment(declar);var _path$unshiftContainer=path.unshiftContainer("body",[declar]);declarPath=_path$unshiftContainer[0];if(!unique)path.setData(dataKey,declarPath)}var declarator=t.variableDeclarator(opts.id,opts.init);declarPath.node.declarations.push(declarator);this.registerBinding(kind,declarPath.get("declarations").pop())};Scope.prototype.getProgramParent=function getProgramParent(){var scope=this;do{if(scope.path.isProgram()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getFunctionParent=function getFunctionParent(){var scope=this;do{if(scope.path.isFunctionParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getBlockParent=function getBlockParent(){var scope=this;do{if(scope.path.isBlockParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")};Scope.prototype.getAllBindings=function getAllBindings(){var ids=_helpersObject2["default"]();var scope=this;do{_lodashObjectDefaults2["default"](ids,scope.bindings);scope=scope.parent}while(scope);return ids};Scope.prototype.getAllBindingsOfKind=function getAllBindingsOfKind(){var ids=_helpersObject2["default"]();var _arr14=arguments;for(var _i14=0;_i14<_arr14.length;_i14++){var kind=_arr14[_i14];var scope=this;do{for(var name in scope.bindings){var binding=scope.bindings[name];if(binding.kind===kind)ids[name]=binding}scope=scope.parent}while(scope)}return ids};Scope.prototype.bindingIdentifierEquals=function bindingIdentifierEquals(name,node){return this.getBindingIdentifier(name)===node};Scope.prototype.getBinding=function getBinding(name){var scope=this;do{var binding=scope.getOwnBinding(name);if(binding)return binding}while(scope=scope.parent)};Scope.prototype.getOwnBinding=function getOwnBinding(name){return this.bindings[name]};Scope.prototype.getBindingIdentifier=function getBindingIdentifier(name){var info=this.getBinding(name);return info&&info.identifier};Scope.prototype.getOwnBindingIdentifier=function getOwnBindingIdentifier(name){var binding=this.bindings[name];return binding&&binding.identifier};Scope.prototype.hasOwnBinding=function hasOwnBinding(name){return!!this.getOwnBinding(name)};Scope.prototype.hasBinding=function hasBinding(name,noGlobals){if(!name)return false;if(this.hasOwnBinding(name))return true;if(this.parentHasBinding(name,noGlobals))return true;if(this.hasUid(name))return true;if(!noGlobals&&_lodashCollectionIncludes2["default"](Scope.globals,name))return true;if(!noGlobals&&_lodashCollectionIncludes2["default"](Scope.contextVariables,name))return true;return false};Scope.prototype.parentHasBinding=function parentHasBinding(name,noGlobals){return this.parent&&this.parent.hasBinding(name,noGlobals)};Scope.prototype.moveBindingTo=function moveBindingTo(name,scope){var info=this.getBinding(name);if(info){info.scope.removeOwnBinding(name);info.scope=scope;scope.bindings[name]=info}};Scope.prototype.removeOwnBinding=function removeOwnBinding(name){delete this.bindings[name]};Scope.prototype.removeBinding=function removeBinding(name){var info=this.getBinding(name);if(info){info.scope.removeOwnBinding(name)}var scope=this;do{if(scope.uids[name]){scope.uids[name]=false}}while(scope=scope.parent)};_createClass(Scope,null,[{key:"globals",value:_lodashArrayFlatten2["default"]([_globals2["default"].builtin,_globals2["default"].browser,_globals2["default"].node].map(Object.keys)),enumerable:true},{key:"contextVariables",value:["arguments","undefined","Infinity","NaN"],enumerable:true}]);return Scope}();exports["default"]=Scope;module.exports=exports["default"]},{"../../helpers/object":58,"../../messages":60,"../../types":196,"../index":165,"./binding":183,globals:415,"lodash/array/flatten":432,"lodash/collection/includes":439,"lodash/object/defaults":536,"lodash/object/extend":537,repeating:611}],185:[function(require,module,exports){"use strict";exports.__esModule=true;exports.explode=explode;exports.verify=verify;exports.merge=merge;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _pathLibVirtualTypes=require("./path/lib/virtual-types");var virtualTypes=_interopRequireWildcard(_pathLibVirtualTypes);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _types=require("../types");var t=_interopRequireWildcard(_types);var _lodashLangClone=require("lodash/lang/clone");var _lodashLangClone2=_interopRequireDefault(_lodashLangClone);function explode(visitor){if(visitor._exploded)return visitor;visitor._exploded=true;for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var parts=nodeType.split("|");if(parts.length===1)continue;var fns=visitor[nodeType];delete visitor[nodeType];var _arr=parts;for(var _i=0;_i<_arr.length;_i++){var part=_arr[_i];visitor[part]=fns}}verify(visitor);delete visitor.__esModule;ensureEntranceObjects(visitor);ensureCallbackArrays(visitor);var _arr2=Object.keys(visitor);for(var _i2=0;_i2<_arr2.length;_i2++){var nodeType=_arr2[_i2];if(shouldIgnoreKey(nodeType))continue;var wrapper=virtualTypes[nodeType];if(!wrapper)continue;var fns=visitor[nodeType];for(var type in fns){fns[type]=wrapCheck(wrapper,fns[type])}delete visitor[nodeType];if(wrapper.types){var _arr4=wrapper.types;for(var _i4=0;_i4<_arr4.length;_i4++){var type=_arr4[_i4];if(visitor[type]){mergePair(visitor[type],fns)}else{visitor[type]=fns}}}else{mergePair(visitor,fns)}}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var fns=visitor[nodeType];var aliases=t.FLIPPED_ALIAS_KEYS[nodeType];if(!aliases)continue;delete visitor[nodeType];var _arr3=aliases;for(var _i3=0;_i3<_arr3.length;_i3++){var alias=_arr3[_i3];var existing=visitor[alias];if(existing){mergePair(existing,fns)}else{visitor[alias]=_lodashLangClone2["default"](fns)}}}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;ensureCallbackArrays(visitor[nodeType])}return visitor}function verify(visitor){if(visitor._verified)return;if(typeof visitor==="function"){throw new Error(messages.get("traverseVerifyRootFunction"))}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;if(t.TYPES.indexOf(nodeType)<0){throw new Error(messages.get("traverseVerifyNodeType",nodeType))}var visitors=visitor[nodeType];if(typeof visitors==="object"){for(var visitorKey in visitors){if(visitorKey==="enter"||visitorKey==="exit")continue;throw new Error(messages.get("traverseVerifyVisitorProperty",nodeType,visitorKey))}}}visitor._verified=true}function merge(visitors){var rootVisitor={};var _arr5=visitors;for(var _i5=0;_i5<_arr5.length;_i5++){var visitor=_arr5[_i5];explode(visitor);for(var type in visitor){var nodeVisitor=rootVisitor[type]=rootVisitor[type]||{};mergePair(nodeVisitor,visitor[type])}}return rootVisitor}function ensureEntranceObjects(obj){for(var key in obj){if(shouldIgnoreKey(key))continue;var fns=obj[key];if(typeof fns==="function"){obj[key]={enter:fns}}}}function ensureCallbackArrays(obj){if(obj.enter&&!Array.isArray(obj.enter))obj.enter=[obj.enter];if(obj.exit&&!Array.isArray(obj.exit))obj.exit=[obj.exit]}function wrapCheck(wrapper,fn){return function(){if(wrapper.checkPath(this)){return fn.apply(this,arguments)}}}function shouldIgnoreKey(key){if(key[0]==="_")return true;if(key==="enter"||key==="exit"||key==="shouldSkip")return true;if(key==="blacklist"||key==="noScope"||key==="skipKeys")return true;return false}function mergePair(dest,src){for(var key in src){dest[key]=[].concat(dest[key]||[],src[key])}}},{"../messages":60,"../types":196,"./path/lib/virtual-types":179,"lodash/lang/clone":520}],186:[function(require,module,exports){"use strict";exports.__esModule=true;exports.toComputedKey=toComputedKey;exports.toSequenceExpression=toSequenceExpression;exports.toKeyAlias=toKeyAlias;exports.toIdentifier=toIdentifier;exports.toBindingIdentifierName=toBindingIdentifierName;exports.toStatement=toStatement;exports.toExpression=toExpression;exports.toBlock=toBlock;exports.valueToNode=valueToNode;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashLangIsPlainObject=require("lodash/lang/isPlainObject");var _lodashLangIsPlainObject2=_interopRequireDefault(_lodashLangIsPlainObject);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _traversal=require("../traversal");var _traversal2=_interopRequireDefault(_traversal);var _index=require("./index");var t=_interopRequireWildcard(_index);function toComputedKey(node){var key=arguments.length<=1||arguments[1]===undefined?node.key||node.property:arguments[1];return function(){if(!node.computed){if(t.isIdentifier(key))key=t.literal(key.name)}return key}()}function toSequenceExpression(nodes,scope){var declars=[];var bailed=false;var result=convert(nodes);if(bailed)return;for(var i=0;i=0){continue}if(t.isAnyTypeAnnotation(node)){return[node]}if(t.isFlowBaseAnnotation(node)){bases[node.type]=node;continue}if(t.isUnionTypeAnnotation(node)){if(typeGroups.indexOf(node.types)<0){nodes=nodes.concat(node.types);typeGroups.push(node.types)}continue}if(t.isGenericTypeAnnotation(node)){var _name=node.id.name;if(generics[_name]){var existing=generics[_name];if(existing.typeParameters){if(node.typeParameters){existing.typeParameters.params=removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params))}}else{existing=node.typeParameters}}else{generics[_name]=node}continue}types.push(node)}for(var type in bases){types.push(bases[type])}for(var _name2 in generics){types.push(generics[_name2])}return types}function createTypeAnnotationBasedOnTypeof(type){if(type==="string"){return t.stringTypeAnnotation()}else if(type==="number"){return t.numberTypeAnnotation()}else if(type==="undefined"){return t.voidTypeAnnotation()}else if(type==="boolean"){return t.booleanTypeAnnotation()}else if(type==="function"){return t.genericTypeAnnotation(t.identifier("Function"))}else if(type==="object"){return t.genericTypeAnnotation(t.identifier("Object"))}else if(type==="symbol"){return t.genericTypeAnnotation(t.identifier("Symbol"))}else{throw new Error("Invalid typeof value")}}},{"./index":196}],196:[function(require,module,exports){"use strict";exports.__esModule=true;exports.is=is;exports.isType=isType;exports.shallowEqual=shallowEqual;exports.appendToMemberExpression=appendToMemberExpression;exports.prependToMemberExpression=prependToMemberExpression;exports.ensureBlock=ensureBlock;exports.clone=clone;exports.cloneDeep=cloneDeep;exports.buildMatchMemberExpression=buildMatchMemberExpression;exports.removeComments=removeComments;exports.inheritsComments=inheritsComments;exports.inheritTrailingComments=inheritTrailingComments;exports.inheritLeadingComments=inheritLeadingComments;exports.inheritInnerComments=inheritInnerComments;exports.inherits=inherits;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _toFastProperties=require("to-fast-properties");var _toFastProperties2=_interopRequireDefault(_toFastProperties);var _lodashArrayCompact=require("lodash/array/compact");var _lodashArrayCompact2=_interopRequireDefault(_lodashArrayCompact);var _lodashObjectAssign=require("lodash/object/assign");var _lodashObjectAssign2=_interopRequireDefault(_lodashObjectAssign);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashArrayUniq=require("lodash/array/uniq");var _lodashArrayUniq2=_interopRequireDefault(_lodashArrayUniq);require("./definitions/init");var _definitions=require("./definitions");var t=exports;function registerType(type,skipAliasCheck){var is=t["is"+type]=function(node,opts){return t.is(type,node,opts,skipAliasCheck)};t["assert"+type]=function(node,opts){opts=opts||{};if(!is(node,opts)){throw new Error("Expected type "+JSON.stringify(type)+" with option "+JSON.stringify(opts))}}}var STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"];exports.STATEMENT_OR_BLOCK_KEYS=STATEMENT_OR_BLOCK_KEYS;var FLATTENABLE_KEYS=["body","expressions"];exports.FLATTENABLE_KEYS=FLATTENABLE_KEYS;var FOR_INIT_KEYS=["left","init"];exports.FOR_INIT_KEYS=FOR_INIT_KEYS;var COMMENT_KEYS=["leadingComments","trailingComments","innerComments"];exports.COMMENT_KEYS=COMMENT_KEYS;var INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["_scopeInfo","_paths","start","loc","end"]};exports.INHERIT_KEYS=INHERIT_KEYS;var BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="];exports.BOOLEAN_NUMBER_BINARY_OPERATORS=BOOLEAN_NUMBER_BINARY_OPERATORS;var EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="];exports.EQUALITY_BINARY_OPERATORS=EQUALITY_BINARY_OPERATORS;var COMPARISON_BINARY_OPERATORS=EQUALITY_BINARY_OPERATORS.concat(["in","instanceof"]);exports.COMPARISON_BINARY_OPERATORS=COMPARISON_BINARY_OPERATORS;var BOOLEAN_BINARY_OPERATORS=[].concat(COMPARISON_BINARY_OPERATORS,BOOLEAN_NUMBER_BINARY_OPERATORS);exports.BOOLEAN_BINARY_OPERATORS=BOOLEAN_BINARY_OPERATORS;var NUMBER_BINARY_OPERATORS=["-","/","*","**","&","|",">>",">>>","<<","^"];exports.NUMBER_BINARY_OPERATORS=NUMBER_BINARY_OPERATORS;var BOOLEAN_UNARY_OPERATORS=["delete","!"];exports.BOOLEAN_UNARY_OPERATORS=BOOLEAN_UNARY_OPERATORS;var NUMBER_UNARY_OPERATORS=["+","-","++","--","~"];exports.NUMBER_UNARY_OPERATORS=NUMBER_UNARY_OPERATORS;var STRING_UNARY_OPERATORS=["typeof"];exports.STRING_UNARY_OPERATORS=STRING_UNARY_OPERATORS;exports.VISITOR_KEYS=_definitions.VISITOR_KEYS;exports.BUILDER_KEYS=_definitions.BUILDER_KEYS;exports.ALIAS_KEYS=_definitions.ALIAS_KEYS;_lodashCollectionEach2["default"](t.VISITOR_KEYS,function(keys,type){registerType(type,true)});t.FLIPPED_ALIAS_KEYS={};_lodashCollectionEach2["default"](t.ALIAS_KEYS,function(aliases,type){_lodashCollectionEach2["default"](aliases,function(alias){var types=t.FLIPPED_ALIAS_KEYS[alias]=t.FLIPPED_ALIAS_KEYS[alias]||[];types.push(type)})});_lodashCollectionEach2["default"](t.FLIPPED_ALIAS_KEYS,function(types,type){t[type.toUpperCase()+"_TYPES"]=types;registerType(type,false)});var TYPES=Object.keys(t.VISITOR_KEYS).concat(Object.keys(t.FLIPPED_ALIAS_KEYS));exports.TYPES=TYPES;function is(type,node,opts,skipAliasCheck){if(!node)return false;var matches=isType(node.type,type);if(!matches)return false;if(typeof opts==="undefined"){return true}else{return t.shallowEqual(node,opts)}}function isType(nodeType,targetType){if(nodeType===targetType)return true;var aliases=t.FLIPPED_ALIAS_KEYS[targetType];if(aliases){if(aliases[0]===nodeType)return true;var _arr=aliases;for(var _i=0;_i<_arr.length;_i++){var alias=_arr[_i];if(nodeType===alias)return true}}return false}_lodashCollectionEach2["default"](t.VISITOR_KEYS,function(keys,type){if(t.BUILDER_KEYS[type])return;var defs={};_lodashCollectionEach2["default"](keys,function(key){defs[key]=null});t.BUILDER_KEYS[type]=defs});_lodashCollectionEach2["default"](t.BUILDER_KEYS,function(keys,type){var builder=function builder(){var node={};node.type=type;var i=0;for(var key in keys){var arg=arguments[i++];if(arg===undefined)arg=keys[key];node[key]=arg}return node};t[type]=builder;t[type[0].toLowerCase()+type.slice(1)]=builder});function shallowEqual(actual,expected){var keys=Object.keys(expected);var _arr2=keys;for(var _i2=0;_i2<_arr2.length;_i2++){var key=_arr2[_i2];if(actual[key]!==expected[key]){return false}}return true}function appendToMemberExpression(member,append,computed){member.object=t.memberExpression(member.object,member.property,member.computed);member.property=append;member.computed=!!computed;return member}function prependToMemberExpression(member,prepend){member.object=t.memberExpression(prepend,member.object);return member}function ensureBlock(node){var key=arguments.length<=1||arguments[1]===undefined?"body":arguments[1];return node[key]=t.toBlock(node[key],node)}function clone(node){var newNode={};for(var key in node){if(key[0]==="_")continue;newNode[key]=node[key]}return newNode}function cloneDeep(node){var newNode={};for(var key in node){if(key[0]==="_")continue;var val=node[key];if(val){if(val.type){val=t.cloneDeep(val)}else if(Array.isArray(val)){val=val.map(t.cloneDeep)}}newNode[key]=val}return newNode}function buildMatchMemberExpression(match,allowPartial){var parts=match.split(".");return function(member){if(!t.isMemberExpression(member))return false;var search=[member];var i=0;while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(parts[i]!==node.name)return false}else if(t.isLiteral(node)){if(parts[i]!==node.value)return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.push(node.object);search.push(node.property);continue}}else{return false}if(++i>parts.length){return false}}return true}}function removeComments(node){var _arr3=COMMENT_KEYS;for(var _i3=0;_i3<_arr3.length;_i3++){var key=_arr3[_i3];delete node[key]}return node}function inheritsComments(child,parent){inheritTrailingComments(child,parent);inheritLeadingComments(child,parent);inheritInnerComments(child,parent);return child}function inheritTrailingComments(child,parent){_inheritComments("trailingComments",child,parent)}function inheritLeadingComments(child,parent){_inheritComments("leadingComments",child,parent)}function inheritInnerComments(child,parent){_inheritComments("innerComments",child,parent)}function _inheritComments(key,child,parent){if(child&&parent){child[key]=_lodashArrayUniq2["default"](_lodashArrayCompact2["default"]([].concat(child[key],parent[key])))}}function inherits(child,parent){if(!child||!parent)return child;var _arr4=t.INHERIT_KEYS.optional;for(var _i4=0;_i4<_arr4.length;_i4++){var key=_arr4[_i4];if(child[key]==null){child[key]=parent[key]}}var _arr5=t.INHERIT_KEYS.force;for(var _i5=0;_i5<_arr5.length;_i5++){var key=_arr5[_i5];child[key]=parent[key]}t.inheritsComments(child,parent);return child}_toFastProperties2["default"](t);_toFastProperties2["default"](t.VISITOR_KEYS);_lodashObjectAssign2["default"](t,require("./retrievers"));_lodashObjectAssign2["default"](t,require("./validators"));_lodashObjectAssign2["default"](t,require("./converters"));_lodashObjectAssign2["default"](t,require("./flow"))},{"./converters":186,"./definitions":191,"./definitions/init":192,"./flow":195,"./retrievers":197,"./validators":198,"lodash/array/compact":431,"lodash/array/uniq":435,"lodash/collection/each":437,"lodash/object/assign":535,"to-fast-properties":628}],197:[function(require,module,exports){"use strict";exports.__esModule=true;exports.getBindingIdentifiers=getBindingIdentifiers;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _helpersObject=require("../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _index=require("./index");var t=_interopRequireWildcard(_index);function getBindingIdentifiers(node,duplicates){var search=[].concat(node);var ids=_helpersObject2["default"]();while(search.length){var id=search.shift();if(!id)continue;var key=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){if(duplicates){var _ids=ids[id.name]=ids[id.name]||[];_ids.push(id)}else{ids[id.name]=id}}else if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}}else if(key&&id[key]){search=search.concat(id[key])}}return ids}getBindingIdentifiers.keys={DeclareClass:"id",DeclareFunction:"id",DeclareModule:"id",DeclareVariable:"id",InterfaceDeclaration:"id",TypeAlias:"id",ComprehensionExpression:"blocks",ComprehensionBlock:"left",CatchClause:"param",LabeledStatement:"label",UnaryExpression:"argument",AssignmentExpression:"left",ImportSpecifier:"local",ImportNamespaceSpecifier:"local",ImportDefaultSpecifier:"local",ImportDeclaration:"specifiers",FunctionDeclaration:"id",FunctionExpression:"id",ClassDeclaration:"id",ClassExpression:"id",RestElement:"argument",UpdateExpression:"argument",SpreadProperty:"argument",Property:"value",AssignmentPattern:"left",ArrayPattern:"elements",ObjectPattern:"properties",VariableDeclaration:"declarations",VariableDeclarator:"id"}},{"../helpers/object":58,"./index":196}],198:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isBinding=isBinding;exports.isReferenced=isReferenced;exports.isValidIdentifier=isValidIdentifier;exports.isLet=isLet;exports.isBlockScoped=isBlockScoped;exports.isVar=isVar;exports.isSpecifierDefault=isSpecifierDefault;exports.isScope=isScope;exports.isImmutable=isImmutable;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _retrievers=require("./retrievers");var _esutils=require("esutils");var _esutils2=_interopRequireDefault(_esutils);var _index=require("./index");var t=_interopRequireWildcard(_index);function isBinding(node,parent){var bindingKey=_retrievers.getBindingIdentifiers.keys[parent.type];if(bindingKey){return parent[bindingKey]===node}else{return false}}function isReferenced(node,parent){switch(parent.type){case"MemberExpression":case"JSXMemberExpression":if(parent.property===node&&parent.computed){return true}else if(parent.object===node){return true}else{return false}case"MetaProperty":return false;case"Property":if(parent.key===node){return parent.computed}case"VariableDeclarator":return parent.id!==node;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":var _arr=parent.params;for(var _i=0;_i<_arr.length;_i++){var param=_arr[_i];if(param===node)return false}return parent.id!==node;case"ExportSpecifier":if(parent.source){return false}else{return parent.local===node}case"JSXAttribute":return parent.name!==node;case"ClassProperty":return parent.value===node;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return false;case"ClassDeclaration":case"ClassExpression":return parent.id!==node;case"MethodDefinition":return parent.key===node&&parent.computed;case"LabeledStatement":return false;case"CatchClause":return parent.param!==node;case"RestElement":return false;case"AssignmentExpression":return parent.right===node;case"AssignmentPattern":return false;case"ObjectPattern":case"ArrayPattern":return false}return true}function isValidIdentifier(name){if(typeof name!=="string"||_esutils2["default"].keyword.isReservedWordES6(name,true)){return false}else{return _esutils2["default"].keyword.isIdentifierNameES6(name)}}function isLet(node){return t.isVariableDeclaration(node)&&(node.kind!=="var"||node._let)}function isBlockScoped(node){return t.isFunctionDeclaration(node)||t.isClassDeclaration(node)||t.isLet(node)}function isVar(node){return t.isVariableDeclaration(node,{kind:"var"})&&!node._let}function isSpecifierDefault(specifier){return t.isImportDefaultSpecifier(specifier)||t.isIdentifier(specifier.imported||specifier.exported,{name:"default"})}function isScope(node,parent){if(t.isBlockStatement(node)&&t.isFunction(parent,{body:node})){return false}return t.isScopable(node)}function isImmutable(node){if(t.isType(node.type,"Immutable"))return true;if(t.isLiteral(node)){if(node.regex){return false}else{return true}}else if(t.isIdentifier(node)){if(node.name==="undefined"){return true}else{return false}}return false}},{"./index":196,"./retrievers":197,esutils:413}],199:[function(require,module,exports){(function(__dirname){"use strict";exports.__esModule=true;exports.canCompile=canCompile;exports.list=list;exports.regexify=regexify;exports.arrayify=arrayify;exports.booleanify=booleanify;exports.shouldIgnore=shouldIgnore;exports.template=template;exports.parseTemplate=parseTemplate;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashStringEscapeRegExp=require("lodash/string/escapeRegExp");var _lodashStringEscapeRegExp2=_interopRequireDefault(_lodashStringEscapeRegExp);var _lodashStringStartsWith=require("lodash/string/startsWith");var _lodashStringStartsWith2=_interopRequireDefault(_lodashStringStartsWith);var _lodashLangCloneDeep=require("lodash/lang/cloneDeep");var _lodashLangCloneDeep2=_interopRequireDefault(_lodashLangCloneDeep);var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _messages=require("./messages");var messages=_interopRequireWildcard(_messages);var _minimatch=require("minimatch");var _minimatch2=_interopRequireDefault(_minimatch);var _lodashCollectionContains=require("lodash/collection/contains");var _lodashCollectionContains2=_interopRequireDefault(_lodashCollectionContains);var _traversal=require("./traversal");var _traversal2=_interopRequireDefault(_traversal);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _lodashLangIsEmpty=require("lodash/lang/isEmpty");var _lodashLangIsEmpty2=_interopRequireDefault(_lodashLangIsEmpty);var _helpersParse=require("./helpers/parse");var _helpersParse2=_interopRequireDefault(_helpersParse);var _path=require("path");var _path2=_interopRequireDefault(_path);var _lodashObjectHas=require("lodash/object/has");var _lodashObjectHas2=_interopRequireDefault(_lodashObjectHas);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _types=require("./types");var t=_interopRequireWildcard(_types);var _slash=require("slash");var _slash2=_interopRequireDefault(_slash);var _pathExists=require("path-exists");var _pathExists2=_interopRequireDefault(_pathExists);var _util=require("util");exports.inherits=_util.inherits;exports.inspect=_util.inspect;function canCompile(filename,altExts){var exts=altExts||canCompile.EXTENSIONS;var ext=_path2["default"].extname(filename);return _lodashCollectionContains2["default"](exts,ext)}canCompile.EXTENSIONS=[".js",".jsx",".es6",".es"];function list(val){if(!val){return[]}else if(Array.isArray(val)){return val}else if(typeof val==="string"){return val.split(",")}else{return[val]}}function regexify(val){if(!val)return new RegExp(/.^/);if(Array.isArray(val))val=new RegExp(val.map(_lodashStringEscapeRegExp2["default"]).join("|"),"i");if(_lodashLangIsString2["default"](val)){val=_slash2["default"](val);if(_lodashStringStartsWith2["default"](val,"./")||_lodashStringStartsWith2["default"](val,"*/"))val=val.slice(2);if(_lodashStringStartsWith2["default"](val,"**/"))val=val.slice(3);var regex=_minimatch2["default"].makeRe(val,{nocase:true});return new RegExp(regex.source.slice(1,-1),"i")}if(_lodashLangIsRegExp2["default"](val))return val;throw new TypeError("illegal type for regexify")}function arrayify(val,mapFn){if(!val)return[];if(_lodashLangIsBoolean2["default"](val))return arrayify([val],mapFn);if(_lodashLangIsString2["default"](val))return arrayify(list(val),mapFn);if(Array.isArray(val)){if(mapFn)val=val.map(mapFn);return val}return[val]}function booleanify(val){if(val==="true")return true;if(val==="false")return false;return val}function shouldIgnore(filename,ignore,only){filename=_slash2["default"](filename);if(only){var _arr=only;for(var _i=0;_i<_arr.length;_i++){var pattern=_arr[_i];if(_shouldIgnore(pattern,filename))return false}return true}else if(ignore.length){var _arr2=ignore;for(var _i2=0;_i2<_arr2.length;_i2++){var pattern=_arr2[_i2];if(_shouldIgnore(pattern,filename))return true}}return false}function _shouldIgnore(pattern,filename){if(typeof pattern==="function"){return pattern(filename)}else{return pattern.test(filename)}}var templateVisitor={noScope:true,enter:function enter(node,parent,scope,nodes){if(t.isExpressionStatement(node)){node=node.expression}if(t.isIdentifier(node)&&_lodashObjectHas2["default"](nodes,node.name)){this.skip();this.replaceInline(nodes[node.name])}},exit:function exit(node){_traversal2["default"].clearNode(node)}};function template(name,nodes,keepExpression){var ast=exports.templates[name];if(!ast)throw new ReferenceError("unknown template "+name);if(nodes===true){keepExpression=true;nodes=null}ast=_lodashLangCloneDeep2["default"](ast);if(!_lodashLangIsEmpty2["default"](nodes)){_traversal2["default"](ast,templateVisitor,null,nodes)}if(ast.body.length>1)return ast.body;var node=ast.body[0];if(!keepExpression&&t.isExpressionStatement(node)){return node.expression}else{return node}}function parseTemplate(loc,code){var ast=_helpersParse2["default"](code,{filename:loc,looseModules:true}).program;ast=_traversal2["default"].removeProperties(ast);return ast}function loadTemplates(){var templates={};var templatesLoc=_path2["default"].join(__dirname,"transformation/templates");if(!_pathExists2["default"].sync(templatesLoc)){throw new ReferenceError(messages.get("missingTemplatesDirectory"))}var _arr3=_fs2["default"].readdirSync(templatesLoc);for(var _i3=0;_i3<_arr3.length;_i3++){var name=_arr3[_i3];if(name[0]===".")return;var key=_path2["default"].basename(name,_path2["default"].extname(name));var loc=_path2["default"].join(templatesLoc,name);var code=_fs2["default"].readFileSync(loc,"utf8");templates[key]=parseTemplate(loc,code)}return templates}try{exports.templates=require("../templates.json")}catch(err){if(err.code!=="MODULE_NOT_FOUND")throw err;exports.templates=loadTemplates()}}).call(this,"/lib")},{"../templates.json":632,"./helpers/parse":59,"./messages":60,"./traversal":165,"./types":196,fs:1,"lodash/collection/contains":436,"lodash/lang/cloneDeep":521,"lodash/lang/isBoolean":524,"lodash/lang/isEmpty":525,"lodash/lang/isRegExp":531,"lodash/lang/isString":532,"lodash/object/has":538,"lodash/string/escapeRegExp":544,"lodash/string/startsWith":545,minimatch:548,path:11,"path-exists":552,slash:615,util:30}],200:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=function(_ref){var Plugin=_ref.Plugin;var t=_ref.types;return new Plugin("constant-folding",{metadata:{group:"builtin-prepass",experimental:true},visitor:{AssignmentExpression:function AssignmentExpression(){var left=this.get("left");if(!left.isIdentifier())return;var binding=this.scope.getBinding(left.node.name);if(!binding||binding.hasDeoptValue)return;var evaluated=this.get("right").evaluate();if(evaluated.confident){binding.setValue(evaluated.value)}else{binding.deoptValue()}},IfStatement:function IfStatement(){var evaluated=this.get("test").evaluate();if(!evaluated.confident){return this.skip()}if(evaluated.value){this.skipKey("alternate")}else{this.skipKey("consequent")}},Scopable:{enter:function enter(){var funcScope=this.scope.getFunctionParent();for(var name in this.scope.bindings){var binding=this.scope.bindings[name];var deopt=false;var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=binding.constantViolations[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var path=_step.value;var funcViolationScope=path.scope.getFunctionParent();if(funcViolationScope!==funcScope){deopt=true;break}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator["return"]){_iterator["return"]()}}finally{if(_didIteratorError){throw _iteratorError}}}if(deopt)binding.deoptValue()}},exit:function exit(){for(var name in this.scope.bindings){var binding=this.scope.bindings[name];binding.clearValue()}}},Expression:{exit:function exit(){var res=this.evaluate();if(res.confident)return t.valueToNode(res.value)}}}})};module.exports=exports["default"]},{}],201:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=function(_ref){var Plugin=_ref.Plugin;var t=_ref.types;function toStatements(node){ -if(t.isBlockStatement(node)){var hasBlockScoped=false;for(var i=0;i1||!binding.constant)return;if(binding.kind==="param"||binding.kind==="module")return;var replacement=binding.path.node;if(t.isVariableDeclarator(replacement)){replacement=replacement.init}if(!replacement)return;if(!scope.isPure(replacement,true))return;if(t.isClass(replacement)||t.isFunction(replacement)){if(binding.path.scope.parent!==scope)return}if(this.findParent(function(path){return path.node===replacement})){return}t.toExpression(replacement);scope.removeBinding(node.name);binding.path.dangerouslyRemove();return replacement},"ClassDeclaration|FunctionDeclaration":function ClassDeclarationFunctionDeclaration(node,parent,scope){var binding=scope.getBinding(node.id.name);if(binding&&!binding.referenced){this.dangerouslyRemove()}},VariableDeclarator:function VariableDeclarator(node,parent,scope){if(!t.isIdentifier(node.id)||!scope.isPure(node.init,true))return;visitor["ClassDeclaration|FunctionDeclaration"].apply(this,arguments)},ConditionalExpression:function ConditionalExpression(node){var evaluateTest=this.get("test").evaluateTruthy();if(evaluateTest===true){return node.consequent}else if(evaluateTest===false){return node.alternate}},BlockStatement:function BlockStatement(){var paths=this.get("body");var purge=false;for(var i=0;i3)continue;if(distance<=shortest)continue;closest=name;shortest=distance}var msg;if(closest){msg=messages.get("undeclaredVariableSuggestion",node.name,closest)}else{msg=messages.get("undeclaredVariable",node.name)}throw this.errorWithNode(msg,ReferenceError)}}})};module.exports=exports["default"]},{leven:215}],215:[function(require,module,exports){"use strict";var arr=[];var charCodeCache=[];module.exports=function(a,b){if(a===b){return 0}var aLen=a.length;var bLen=b.length;if(aLen===0){return bLen}if(bLen===0){return aLen}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(iret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2}}return ret}},{}],216:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=function(_ref){var Plugin=_ref.Plugin;var t=_ref.types;return new Plugin("undefined-to-void",{metadata:{group:"builtin-basic"},visitor:{ReferencedIdentifier:function ReferencedIdentifier(node,parent){if(node.name==="undefined"){return t.unaryExpression("void",t.literal(0),true)}}}})};module.exports=exports["default"]},{}],217:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;var isSimpleWindowsTerm=process.platform==="win32"&&!/^xterm/i.test(process.env.TERM);function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(isSimpleWindowsTerm){ansiStyles.blue.open=""}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function build(_styles){var builder=function(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a<]/g}},{}],222:[function(require,module,exports){"use strict";var ansiRegex=require("ansi-regex")();module.exports=function(str){return typeof str==="string"?str.replace(ansiRegex,""):str}},{"ansi-regex":223}],223:[function(require,module,exports){arguments[4][221][0].apply(exports,arguments)},{dup:221}],224:[function(require,module,exports){(function(process){"use strict";var argv=process.argv;var terminator=argv.indexOf("--");var hasFlag=function(flag){flag="--"+flag;var pos=argv.indexOf(flag);return pos!==-1&&(terminator!==-1?pos0;i--){line=lines[i];if(~line.indexOf("sourceMappingURL=data:"))return exports.fromComment(line)}}Converter.prototype.toJSON=function(space){return JSON.stringify(this.sourcemap,null,space)};Converter.prototype.toBase64=function(){var json=this.toJSON();return new Buffer(json).toString("base64")};Converter.prototype.toComment=function(options){var base64=this.toBase64();var data="sourceMappingURL=data:application/json;base64,"+base64;return options&&options.multiline?"/*# "+data+" */":"//# "+data};Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())};Converter.prototype.addProperty=function(key,value){if(this.sourcemap.hasOwnProperty(key))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(key,value)};Converter.prototype.setProperty=function(key,value){this.sourcemap[key]=value;return this};Converter.prototype.getProperty=function(key){return this.sourcemap[key]};exports.fromObject=function(obj){return new Converter(obj)};exports.fromJSON=function(json){return new Converter(json,{isJSON:true})};exports.fromBase64=function(base64){return new Converter(base64,{isEncoded:true})};exports.fromComment=function(comment){comment=comment.replace(/^\/\*/g,"//").replace(/\*\/$/g,"");return new Converter(comment,{isEncoded:true,hasComment:true})};exports.fromMapFileComment=function(comment,dir){return new Converter(comment,{commentFileDir:dir,isFileComment:true,isJSON:true})};exports.fromSource=function(content,largeSource){if(largeSource)return convertFromLargeSource(content);var m=content.match(commentRx);commentRx.lastIndex=0;return m?exports.fromComment(m.pop()):null};exports.fromMapFileSource=function(content,dir){var m=content.match(mapFileCommentRx);mapFileCommentRx.lastIndex=0;return m?exports.fromMapFileComment(m.pop(),dir):null};exports.removeComments=function(src){commentRx.lastIndex=0;return src.replace(commentRx,"")};exports.removeMapFileComments=function(src){mapFileCommentRx.lastIndex=0;return src.replace(mapFileCommentRx,"")};Object.defineProperty(exports,"commentRegex",{get:function getCommentRegex(){commentRx.lastIndex=0;return commentRx}});Object.defineProperty(exports,"mapFileCommentRegex",{get:function getMapFileCommentRegex(){mapFileCommentRx.lastIndex=0;return mapFileCommentRx}})}).call(this,require("buffer").Buffer)},{buffer:4,fs:1,path:11}],226:[function(require,module,exports){module.exports=function(it){if(typeof it!="function")throw TypeError(it+" is not a function!");return it}},{}],227:[function(require,module,exports){var isObject=require("./$.is-object");module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},{"./$.is-object":257}],228:[function(require,module,exports){var toIObject=require("./$.to-iobject"),toLength=require("./$.to-length"),toIndex=require("./$.to-index");module.exports=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIObject($this),length=toLength(O.length),index=toIndex(fromIndex,length),value;if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];if(value!=value)return true}else for(;length>index;index++)if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index}return!IS_INCLUDES&&-1}}},{"./$.to-index":293,"./$.to-iobject":295,"./$.to-length":296}],229:[function(require,module,exports){var ctx=require("./$.ctx"),IObject=require("./$.iobject"),toObject=require("./$.to-object"),toLength=require("./$.to-length");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function($this,callbackfn,that){var O=toObject($this),self=IObject(O),f=ctx(callbackfn,that,3),length=toLength(self.length),index=0,result=IS_MAP?Array(length):IS_FILTER?[]:undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$.ctx":238,"./$.iobject":254,"./$.to-length":296,"./$.to-object":297}],230:[function(require,module,exports){var toObject=require("./$.to-object"),IObject=require("./$.iobject"),enumKeys=require("./$.enum-keys");module.exports=Object.assign||function assign(target,source){var T=toObject(target),l=arguments.length,i=1;while(l>i){var S=IObject(arguments[i++]),keys=enumKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T}},{"./$.enum-keys":242,"./$.iobject":254,"./$.to-object":297}],231:[function(require,module,exports){var cof=require("./$.cof"),TAG=require("./$.wks")("toStringTag"),ARG=cof(function(){return arguments}())=="Arguments";module.exports=function(it){var O,T,B;return it===undefined?"Undefined":it===null?"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:ARG?cof(O):(B=cof(O))=="Object"&&typeof O.callee=="function"?"Arguments":B}},{"./$.cof":232,"./$.wks":300}],232:[function(require,module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},{}],233:[function(require,module,exports){"use strict";var $=require("./$"),hide=require("./$.hide"),ctx=require("./$.ctx"),species=require("./$.species"),strictNew=require("./$.strict-new"),defined=require("./$.defined"),forOf=require("./$.for-of"),step=require("./$.iter-step"),ID=require("./$.uid")("id"),$has=require("./$.has"),isObject=require("./$.is-object"),isExtensible=Object.isExtensible||isObject,SUPPORT_DESC=require("./$.support-desc"),SIZE=SUPPORT_DESC?"_s":"size",id=0;var fastKey=function(it,create){if(!isObject(it))return typeof it=="symbol"?it:(typeof it=="string"?"S":"P")+it;if(!$has(it,ID)){if(!isExtensible(it))return"F";if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]};var getEntry=function(that,key){var index=fastKey(key),entry;if(index!=="F")return that._i[index];for(entry=that._f;entry;entry=entry.n){if(entry.k==key)return entry}};module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){strictNew(that,C,NAME);that._i=$.create(null);that._f=undefined;that._l=undefined;that[SIZE]=0;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});require("./$.mix")(C.prototype,{clear:function clear(){for(var that=this,data=that._i,entry=that._f;entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined; -delete data[entry.i]}that._f=that._l=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that._i[entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that._f==entry)that._f=next;if(that._l==entry)that._l=prev;that[SIZE]--}return!!entry},forEach:function forEach(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this._f){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function has(key){return!!getEntry(this,key)}});if(SUPPORT_DESC)$.setDesc(C.prototype,"size",{get:function(){return defined(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that._l=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that._l,n:undefined,r:false};if(!that._f)that._f=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!=="F")that._i[index]=entry}return that},getEntry:getEntry,setStrong:function(C,NAME,IS_MAP){require("./$.iter-define")(C,NAME,function(iterated,kind){this._t=iterated;this._k=kind;this._l=undefined},function(){var that=this,kind=that._k,entry=that._l;while(entry&&entry.r)entry=entry.p;if(!that._t||!(that._l=entry=entry?entry.n:that._t._f)){that._t=undefined;return step(1)}if(kind=="keys")return step(0,entry.k);if(kind=="values")return step(0,entry.v);return step(0,[entry.k,entry.v])},IS_MAP?"entries":"values",!IS_MAP,true);species(C);species(require("./$.core")[NAME])}}},{"./$":265,"./$.core":237,"./$.ctx":238,"./$.defined":240,"./$.for-of":247,"./$.has":250,"./$.hide":251,"./$.is-object":257,"./$.iter-define":261,"./$.iter-step":263,"./$.mix":270,"./$.species":283,"./$.strict-new":284,"./$.support-desc":290,"./$.uid":298}],234:[function(require,module,exports){var forOf=require("./$.for-of"),classof=require("./$.classof");module.exports=function(NAME){return function toJSON(){if(classof(this)!=NAME)throw TypeError(NAME+"#toJSON isn't generic");var arr=[];forOf(this,false,arr.push,arr);return arr}}},{"./$.classof":231,"./$.for-of":247}],235:[function(require,module,exports){"use strict";var hide=require("./$.hide"),anObject=require("./$.an-object"),strictNew=require("./$.strict-new"),forOf=require("./$.for-of"),method=require("./$.array-methods"),WEAK=require("./$.uid")("weak"),isObject=require("./$.is-object"),$has=require("./$.has"),isExtensible=Object.isExtensible||isObject,find=method(5),findIndex=method(6),id=0;var frozenStore=function(that){return that._l||(that._l=new FrozenStore)};var FrozenStore=function(){this.a=[]};var findFrozen=function(store,key){return find(store.a,function(it){return it[0]===key})};FrozenStore.prototype={get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.a.push([key,value])},"delete":function(key){var index=findIndex(this.a,function(it){return it[0]===key});if(~index)this.a.splice(index,1);return!!~index}};module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){strictNew(that,C,NAME);that._i=id++;that._l=undefined;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});require("./$.mix")(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(!isExtensible(key))return frozenStore(this)["delete"](key);return $has(key,WEAK)&&$has(key[WEAK],this._i)&&delete key[WEAK][this._i]},has:function has(key){if(!isObject(key))return false;if(!isExtensible(key))return frozenStore(this).has(key);return $has(key,WEAK)&&$has(key[WEAK],this._i)}});return C},def:function(that,key,value){if(!isExtensible(anObject(key))){frozenStore(that).set(key,value)}else{$has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that._i]=value}return that},frozenStore:frozenStore,WEAK:WEAK}},{"./$.an-object":227,"./$.array-methods":229,"./$.for-of":247,"./$.has":250,"./$.hide":251,"./$.is-object":257,"./$.mix":270,"./$.strict-new":284,"./$.uid":298}],236:[function(require,module,exports){"use strict";var global=require("./$.global"),$def=require("./$.def"),BUGGY=require("./$.iter-buggy"),forOf=require("./$.for-of"),strictNew=require("./$.strict-new");module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=global[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};var fixMethod=function(KEY){var fn=proto[KEY];require("./$.redef")(proto,KEY,KEY=="delete"?function(a){return fn.call(this,a===0?0:a)}:KEY=="has"?function has(a){return fn.call(this,a===0?0:a)}:KEY=="get"?function get(a){return fn.call(this,a===0?0:a)}:KEY=="add"?function add(a){fn.call(this,a===0?0:a);return this}:function set(a,b){fn.call(this,a===0?0:a,b);return this})};if(typeof C!="function"||!(IS_WEAK||!BUGGY&&proto.forEach&&proto.entries)){C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER);require("./$.mix")(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](IS_WEAK?{}:-0,1),buggyZero;if(!require("./$.iter-detect")(function(iter){new C(iter)})){C=wrapper(function(target,iterable){strictNew(target,C,NAME);var that=new Base;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that);return that});C.prototype=proto;proto.constructor=C}IS_WEAK||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER);if(IS_WEAK&&proto.clear)delete proto.clear}require("./$.tag")(C,NAME);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);if(!IS_WEAK)common.setStrong(C,NAME,IS_MAP);return C}},{"./$.def":239,"./$.for-of":247,"./$.global":249,"./$.iter-buggy":258,"./$.iter-detect":262,"./$.mix":270,"./$.redef":277,"./$.strict-new":284,"./$.tag":291}],237:[function(require,module,exports){var core=module.exports={};if(typeof __e=="number")__e=core},{}],238:[function(require,module,exports){var aFunction=require("./$.a-function");module.exports=function(fn,that,length){aFunction(fn);if(that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.a-function":226}],239:[function(require,module,exports){var global=require("./$.global"),core=require("./$.core"),hide=require("./$.hide"),$redef=require("./$.redef"),PROTOTYPE="prototype";var ctx=function(fn,that){return function(){return fn.apply(that,arguments)}};var $def=function(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,isProto=type&$def.P,target=isGlobal?global:type&$def.S?global[name]||(global[name]={}):(global[name]||{})[PROTOTYPE],exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;out=(own?target:source)[key];if(type&$def.B&&own)exp=ctx(out,global);else exp=isProto&&typeof out=="function"?ctx(Function.call,out):out;if(target&&!own)$redef(target,key,out);if(exports[key]!=out)hide(exports,key,exp);if(isProto)(exports[PROTOTYPE]||(exports[PROTOTYPE]={}))[key]=out}};global.core=core;$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;module.exports=$def},{"./$.core":237,"./$.global":249,"./$.hide":251,"./$.redef":277}],240:[function(require,module,exports){module.exports=function(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}},{}],241:[function(require,module,exports){var isObject=require("./$.is-object"),document=require("./$.global").document,is=isObject(document)&&isObject(document.createElement);module.exports=function(it){return is?document.createElement(it):{}}},{"./$.global":249,"./$.is-object":257}],242:[function(require,module,exports){var $=require("./$");module.exports=function(it){var keys=$.getKeys(it),getSymbols=$.getSymbols;if(getSymbols){var symbols=getSymbols(it),isEnum=$.isEnum,i=0,key;while(symbols.length>i)if(isEnum.call(it,key=symbols[i++]))keys.push(key)}return keys}},{"./$":265}],243:[function(require,module,exports){module.exports=Math.expm1||function expm1(x){return(x=+x)==0?x:x>-1e-6&&x<1e-6?x+x*x/2:Math.exp(x)-1}},{}],244:[function(require,module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return true}}},{}],245:[function(require,module,exports){"use strict";module.exports=function(KEY,length,exec){var defined=require("./$.defined"),SYMBOL=require("./$.wks")(KEY),original=""[KEY];if(require("./$.fails")(function(){var O={};O[SYMBOL]=function(){return 7};return""[KEY](O)!=7})){require("./$.redef")(String.prototype,KEY,exec(defined,SYMBOL,original));require("./$.hide")(RegExp.prototype,SYMBOL,length==2?function(string,arg){return original.call(string,this,arg)}:function(string){return original.call(string,this)})}}},{"./$.defined":240,"./$.fails":244,"./$.hide":251,"./$.redef":277,"./$.wks":300}],246:[function(require,module,exports){"use strict";var anObject=require("./$.an-object");module.exports=function(){var that=anObject(this),result="";if(that.global)result+="g";if(that.ignoreCase)result+="i";if(that.multiline)result+="m";if(that.unicode)result+="u";if(that.sticky)result+="y";return result}},{"./$.an-object":227}],247:[function(require,module,exports){var ctx=require("./$.ctx"),call=require("./$.iter-call"),isArrayIter=require("./$.is-array-iter"),anObject=require("./$.an-object"),toLength=require("./$.to-length"),getIterFn=require("./core.get-iterator-method");module.exports=function(iterable,entries,fn,that){var iterFn=getIterFn(iterable),f=ctx(fn,that,entries?2:1),index=0,length,step,iterator;if(typeof iterFn!="function")throw TypeError(iterable+" is not iterable!");if(isArrayIter(iterFn))for(length=toLength(iterable.length);length>index;index++){entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index])}else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;){call(iterator,f,step.value,entries)}}},{"./$.an-object":227,"./$.ctx":238,"./$.is-array-iter":255,"./$.iter-call":259,"./$.to-length":296,"./core.get-iterator-method":301}],248:[function(require,module,exports){var toString={}.toString,toIObject=require("./$.to-iobject"),getNames=require("./$").getNames;var windowNames=typeof window=="object"&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];var getWindowNames=function(it){try{return getNames(it)}catch(e){return windowNames.slice()}};module.exports.get=function getOwnPropertyNames(it){if(windowNames&&toString.call(it)=="[object Window]")return getWindowNames(it);return getNames(toIObject(it))}},{"./$":265,"./$.to-iobject":295}],249:[function(require,module,exports){var global=typeof self!="undefined"&&self.Math==Math?self:Function("return this")();module.exports=global;if(typeof __g=="number")__g=global},{}],250:[function(require,module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},{}],251:[function(require,module,exports){var $=require("./$"),createDesc=require("./$.property-desc");module.exports=require("./$.support-desc")?function(object,key,value){return $.setDesc(object,key,createDesc(1,value))}:function(object,key,value){object[key]=value;return object}},{"./$":265,"./$.property-desc":276,"./$.support-desc":290}],252:[function(require,module,exports){module.exports=require("./$.global").document&&document.documentElement},{"./$.global":249}],253:[function(require,module,exports){module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3])}return fn.apply(that,args)}},{}],254:[function(require,module,exports){var cof=require("./$.cof");module.exports=0 in Object("z")?Object:function(it){return cof(it)=="String"?it.split(""):Object(it)}},{"./$.cof":232}],255:[function(require,module,exports){var Iterators=require("./$.iterators"),ITERATOR=require("./$.wks")("iterator");module.exports=function(it){return(Iterators.Array||Array.prototype[ITERATOR])===it}},{"./$.iterators":264,"./$.wks":300}],256:[function(require,module,exports){var isObject=require("./$.is-object"),floor=Math.floor;module.exports=function isInteger(it){return!isObject(it)&&isFinite(it)&&floor(it)===it}},{"./$.is-object":257}],257:[function(require,module,exports){module.exports=function(it){return it!==null&&(typeof it=="object"||typeof it=="function")}},{}],258:[function(require,module,exports){module.exports="keys"in[]&&!("next"in[].keys())},{}],259:[function(require,module,exports){var anObject=require("./$.an-object");module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value)}catch(e){var ret=iterator["return"];if(ret!==undefined)anObject(ret.call(iterator));throw e}}},{"./$.an-object":227}],260:[function(require,module,exports){"use strict";var $=require("./$"),IteratorPrototype={};require("./$.hide")(IteratorPrototype,require("./$.wks")("iterator"),function(){return this});module.exports=function(Constructor,NAME,next){Constructor.prototype=$.create(IteratorPrototype,{next:require("./$.property-desc")(1,next)});require("./$.tag")(Constructor,NAME+" Iterator")}},{"./$":265,"./$.hide":251,"./$.property-desc":276,"./$.tag":291,"./$.wks":300}],261:[function(require,module,exports){"use strict";var LIBRARY=require("./$.library"),$def=require("./$.def"),$redef=require("./$.redef"),hide=require("./$.hide"),has=require("./$.has"),SYMBOL_ITERATOR=require("./$.wks")("iterator"),Iterators=require("./$.iterators"),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values";var returnThis=function(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){require("./$.iter-create")(Constructor,NAME,next);var createMethod=function(kind){switch(kind){case KEYS:return function keys(){return new Constructor(this,kind)};case VALUES:return function values(){return new Constructor(this,kind)}}return function entries(){return new Constructor(this,kind)}};var TAG=NAME+" Iterator",proto=Base.prototype,_native=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],_default=_native||createMethod(DEFAULT),methods,key;if(_native){var IteratorPrototype=require("./$").getProto(_default.call(new Base));require("./$.tag")(IteratorPrototype,TAG,true);if(!LIBRARY&&has(proto,FF_ITERATOR))hide(IteratorPrototype,SYMBOL_ITERATOR,returnThis)}if(!LIBRARY||FORCE)hide(proto,SYMBOL_ITERATOR,_default);Iterators[NAME]=_default;Iterators[TAG]=returnThis;if(DEFAULT){methods={keys:IS_SET?_default:createMethod(KEYS),values:DEFAULT==VALUES?_default:createMethod(VALUES),entries:DEFAULT!=VALUES?_default:createMethod("entries")};if(FORCE)for(key in methods){if(!(key in proto))$redef(proto,key,methods[key])}else $def($def.P+$def.F*require("./$.iter-buggy"),NAME,methods)}}},{"./$":265,"./$.def":239,"./$.has":250,"./$.hide":251,"./$.iter-buggy":258,"./$.iter-create":260,"./$.iterators":264,"./$.library":267,"./$.redef":277,"./$.tag":291,"./$.wks":300}],262:[function(require,module,exports){var SYMBOL_ITERATOR=require("./$.wks")("iterator"),SAFE_CLOSING=false;try{var riter=[7][SYMBOL_ITERATOR]();riter["return"]=function(){SAFE_CLOSING=true};Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec){if(!SAFE_CLOSING)return false;var safe=false;try{var arr=[7],iter=arr[SYMBOL_ITERATOR]();iter.next=function(){safe=true};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return safe}},{"./$.wks":300}],263:[function(require,module,exports){module.exports=function(done,value){return{value:value,done:!!done}}},{}],264:[function(require,module,exports){module.exports={}},{}],265:[function(require,module,exports){var $Object=Object;module.exports={create:$Object.create,getProto:$Object.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:$Object.getOwnPropertyDescriptor,setDesc:$Object.defineProperty,setDescs:$Object.defineProperties,getKeys:$Object.keys,getNames:$Object.getOwnPropertyNames,getSymbols:$Object.getOwnPropertySymbols,each:[].forEach}},{}],266:[function(require,module,exports){var $=require("./$"),toIObject=require("./$.to-iobject");module.exports=function(object,el){var O=toIObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":265,"./$.to-iobject":295}],267:[function(require,module,exports){module.exports=false},{}],268:[function(require,module,exports){module.exports=Math.log1p||function log1p(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:Math.log(1+x)}},{}],269:[function(require,module,exports){var global=require("./$.global"),macrotask=require("./$.task").set,Observer=global.MutationObserver||global.WebKitMutationObserver,process=global.process,head,last,notify;function flush(){while(head){head.fn.call();head=head.next}last=undefined}if(require("./$.cof")(process)=="process"){notify=function(){process.nextTick(flush)}}else if(Observer){var toggle=1,node=document.createTextNode("");new Observer(flush).observe(node,{characterData:true});notify=function(){node.data=toggle=-toggle}}else{notify=function(){macrotask.call(global,flush)}}module.exports=function asap(fn){var task={fn:fn,next:undefined};if(last)last.next=task;if(!head){head=task;notify()}last=task}},{"./$.cof":232,"./$.global":249,"./$.task":292}],270:[function(require,module,exports){var $redef=require("./$.redef");module.exports=function(target,src){for(var key in src)$redef(target,key,src[key]);return target}},{"./$.redef":277}],271:[function(require,module,exports){module.exports=function(KEY,exec){var $def=require("./$.def"),fn=(require("./$.core").Object||{})[KEY]||Object[KEY],exp={};exp[KEY]=exec(fn);$def($def.S+$def.F*require("./$.fails")(function(){fn(1)}),"Object",exp)}},{"./$.core":237,"./$.def":239,"./$.fails":244}],272:[function(require,module,exports){var $=require("./$"),toIObject=require("./$.to-iobject");module.exports=function(isEntries){return function(it){var O=toIObject(it),keys=$.getKeys(O),length=keys.length,i=0,result=Array(length),key;if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}},{"./$":265,"./$.to-iobject":295}],273:[function(require,module,exports){var $=require("./$"),anObject=require("./$.an-object");module.exports=function ownKeys(it){var keys=$.getNames(anObject(it)),getSymbols=$.getSymbols;return getSymbols?keys.concat(getSymbols(it)):keys}},{"./$":265,"./$.an-object":227}],274:[function(require,module,exports){"use strict";var path=require("./$.path"),invoke=require("./$.invoke"),aFunction=require("./$.a-function");module.exports=function(){var fn=aFunction(this),length=arguments.length,pargs=Array(length),i=0,_=path._,holder=false;while(length>i)if((pargs[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,j=0,k=0,args;if(!holder&&!_length)return invoke(fn,pargs,that);args=pargs.slice();if(holder)for(;length>j;j++)if(args[j]===_)args[j]=arguments[k++];while(_length>k)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./$.a-function":226,"./$.invoke":253,"./$.path":275}],275:[function(require,module,exports){module.exports=require("./$.global")},{"./$.global":249}],276:[function(require,module,exports){module.exports=function(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}},{}],277:[function(require,module,exports){var global=require("./$.global"),hide=require("./$.hide"),SRC=require("./$.uid")("src"),TO_STRING="toString",$toString=Function[TO_STRING],TPL=(""+$toString).split(TO_STRING);require("./$.core").inspectSource=function(it){return $toString.call(it)};(module.exports=function(O,key,val,safe){if(typeof val=="function"){hide(val,SRC,O[key]?""+O[key]:TPL.join(String(key)));if(!("name"in val))val.name=key}if(O===global){O[key]=val}else{if(!safe)delete O[key];hide(O,key,val)}})(Function.prototype,TO_STRING,function toString(){return typeof this=="function"&&this[SRC]||$toString.call(this)})},{"./$.core":237,"./$.global":249,"./$.hide":251,"./$.uid":298}],278:[function(require,module,exports){module.exports=function(regExp,replace){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(it).replace(regExp,replacer)}}},{}],279:[function(require,module,exports){module.exports=Object.is||function is(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}},{}],280:[function(require,module,exports){var getDesc=require("./$").getDesc,isObject=require("./$.is-object"),anObject=require("./$.an-object");var check=function(O,proto){anObject(O);if(!isObject(proto)&&proto!==null)throw TypeError(proto+": can't set as prototype!")};module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(buggy,set){try{set=require("./$.ctx")(Function.call,getDesc(Object.prototype,"__proto__").set,2);set({},[])}catch(e){buggy=true}return function setPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;else set(O,proto);return O}}():undefined),check:check}},{"./$":265,"./$.an-object":227,"./$.ctx":238,"./$.is-object":257}],281:[function(require,module,exports){var global=require("./$.global"),SHARED="__core-js_shared__",store=global[SHARED]||(global[SHARED]={});module.exports=function(key){return store[key]||(store[key]={})}},{"./$.global":249}],282:[function(require,module,exports){module.exports=Math.sign||function sign(x){return(x=+x)==0||x!=x?x:x<0?-1:1}},{}],283:[function(require,module,exports){"use strict";var $=require("./$"),SPECIES=require("./$.wks")("species");module.exports=function(C){if(require("./$.support-desc")&&!(SPECIES in C))$.setDesc(C,SPECIES,{configurable:true,get:function(){return this}})}},{"./$":265,"./$.support-desc":290,"./$.wks":300}],284:[function(require,module,exports){module.exports=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it}},{}],285:[function(require,module,exports){var toInteger=require("./$.to-integer"),defined=require("./$.defined");module.exports=function(TO_STRING){return function(that,pos){var s=String(defined(that)),i=toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$.defined":240,"./$.to-integer":294}],286:[function(require,module,exports){var defined=require("./$.defined"),cof=require("./$.cof");module.exports=function(that,searchString,NAME){if(cof(searchString)=="RegExp")throw TypeError("String#"+NAME+" doesn't accept regex!");return String(defined(that))}},{"./$.cof":232,"./$.defined":240}],287:[function(require,module,exports){var toLength=require("./$.to-length"),repeat=require("./$.string-repeat"),defined=require("./$.defined");module.exports=function(that,maxLength,fillString,left){var S=String(defined(that)),stringLength=S.length,fillStr=fillString===undefined?" ":String(fillString),intMaxLength=toLength(maxLength);if(intMaxLength<=stringLength)return S;if(fillStr=="")fillStr=" ";var fillLen=intMaxLength-stringLength,stringFiller=repeat.call(fillStr,Math.ceil(fillLen/fillStr.length));if(stringFiller.length>fillLen)stringFiller=left?stringFiller.slice(stringFiller.length-fillLen):stringFiller.slice(0,fillLen);return left?stringFiller+S:S+stringFiller}},{"./$.defined":240,"./$.string-repeat":288,"./$.to-length":296}],288:[function(require,module,exports){"use strict";var toInteger=require("./$.to-integer"),defined=require("./$.defined");module.exports=function repeat(count){var str=String(defined(this)),res="",n=toInteger(count);if(n<0||n==Infinity)throw RangeError("Count can't be negative");for(;n>0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}},{"./$.defined":240,"./$.to-integer":294}],289:[function(require,module,exports){var trim=function(string,TYPE){string=String(defined(string));if(TYPE&1)string=string.replace(ltrim,"");if(TYPE&2)string=string.replace(rtrim,"");return string};var $def=require("./$.def"),defined=require("./$.defined"),spaces=" \n \f\r   ᠎    "+"          \u2028\u2029\ufeff",space="["+spaces+"]",non="​…",ltrim=RegExp("^"+space+space+"*"),rtrim=RegExp(space+space+"*$");module.exports=function(KEY,exec){var exp={};exp[KEY]=exec(trim);$def($def.P+$def.F*require("./$.fails")(function(){return!!spaces[KEY]()||non[KEY]()!=non}),"String",exp)}},{"./$.def":239,"./$.defined":240,"./$.fails":244}],290:[function(require,module,exports){module.exports=!require("./$.fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./$.fails":244}],291:[function(require,module,exports){var has=require("./$.has"),hide=require("./$.hide"),TAG=require("./$.wks")("toStringTag");module.exports=function(it,tag,stat){if(it&&!has(it=stat?it:it.prototype,TAG))hide(it,TAG,tag)}},{"./$.has":250,"./$.hide":251,"./$.wks":300}],292:[function(require,module,exports){"use strict";var ctx=require("./$.ctx"),invoke=require("./$.invoke"),html=require("./$.html"),cel=require("./$.dom-create"),global=require("./$.global"),process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port;var run=function(){var id=+this;if(queue.hasOwnProperty(id)){var fn=queue[id];delete queue[id];fn()}};var listner=function(event){run.call(event.data)};if(!setTask||!clearTask){setTask=function setImmediate(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(typeof fn=="function"?fn:Function(fn),args)};defer(counter);return counter};clearTask=function clearImmediate(id){delete queue[id]};if(require("./$.cof")(process)=="process"){defer=function(id){process.nextTick(ctx(run,id,1))}}else if(MessageChannel){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if(global.addEventListener&&typeof postMessage=="function"&&!global.importScript){defer=function(id){global.postMessage(id+"","*")};global.addEventListener("message",listner,false)}else if(ONREADYSTATECHANGE in cel("script")){defer=function(id){html.appendChild(cel("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run.call(id)}}}else{defer=function(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}},{"./$.cof":232,"./$.ctx":238,"./$.dom-create":241,"./$.global":249,"./$.html":252,"./$.invoke":253}],293:[function(require,module,exports){var toInteger=require("./$.to-integer"),max=Math.max,min=Math.min;module.exports=function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)}},{"./$.to-integer":294}],294:[function(require,module,exports){var ceil=Math.ceil,floor=Math.floor;module.exports=function(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}},{}],295:[function(require,module,exports){var IObject=require("./$.iobject"),defined=require("./$.defined");module.exports=function(it){return IObject(defined(it))}},{"./$.defined":240,"./$.iobject":254}],296:[function(require,module,exports){var toInteger=require("./$.to-integer"),min=Math.min;module.exports=function(it){return it>0?min(toInteger(it),9007199254740991):0}},{"./$.to-integer":294}],297:[function(require,module,exports){var defined=require("./$.defined");module.exports=function(it){return Object(defined(it))}},{"./$.defined":240}],298:[function(require,module,exports){var id=0,px=Math.random();module.exports=function(key){return"Symbol(".concat(key===undefined?"":key,")_",(++id+px).toString(36))}},{}],299:[function(require,module,exports){var UNSCOPABLES=require("./$.wks")("unscopables");if(!(UNSCOPABLES in[]))require("./$.hide")(Array.prototype,UNSCOPABLES,{});module.exports=function(key){[][UNSCOPABLES][key]=true}},{"./$.hide":251,"./$.wks":300}],300:[function(require,module,exports){var store=require("./$.shared")("wks"),Symbol=require("./$.global").Symbol;module.exports=function(name){return store[name]||(store[name]=Symbol&&Symbol[name]||(Symbol||require("./$.uid"))("Symbol."+name))}},{"./$.global":249,"./$.shared":281,"./$.uid":298}],301:[function(require,module,exports){var classof=require("./$.classof"),ITERATOR=require("./$.wks")("iterator"),Iterators=require("./$.iterators");module.exports=require("./$.core").getIteratorMethod=function(it){if(it!=undefined)return it[ITERATOR]||it["@@iterator"]||Iterators[classof(it)]}},{"./$.classof":231,"./$.core":237,"./$.iterators":264,"./$.wks":300}],302:[function(require,module,exports){"use strict";var $=require("./$"),SUPPORT_DESC=require("./$.support-desc"),createDesc=require("./$.property-desc"),html=require("./$.html"),cel=require("./$.dom-create"),has=require("./$.has"),cof=require("./$.cof"),$def=require("./$.def"),invoke=require("./$.invoke"),arrayMethod=require("./$.array-methods"),IE_PROTO=require("./$.uid")("__proto__"),isObject=require("./$.is-object"),anObject=require("./$.an-object"),aFunction=require("./$.a-function"),toObject=require("./$.to-object"),toIObject=require("./$.to-iobject"),toInteger=require("./$.to-integer"),toIndex=require("./$.to-index"),toLength=require("./$.to-length"),IObject=require("./$.iobject"),fails=require("./$.fails"),ObjectProto=Object.prototype,A=[],_slice=A.slice,_join=A.join,defineProperty=$.setDesc,getOwnDescriptor=$.getDesc,defineProperties=$.setDescs,$indexOf=require("./$.array-includes")(false),factories={},IE8_DOM_DEFINE;if(!SUPPORT_DESC){IE8_DOM_DEFINE=!fails(function(){return defineProperty(cel("div"),"a",{get:function(){return 7}}).a!=7});$.setDesc=function(O,P,Attributes){if(IE8_DOM_DEFINE)try{return defineProperty(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)anObject(O)[P]=Attributes.value;return O};$.getDesc=function(O,P){if(IE8_DOM_DEFINE)try{return getOwnDescriptor(O,P)}catch(e){}if(has(O,P))return createDesc(!ObjectProto.propertyIsEnumerable.call(O,P),O[P])};$.setDescs=defineProperties=function(O,Properties){anObject(O);var keys=$.getKeys(Properties),length=keys.length,i=0,P;while(length>i)$.setDesc(O,P=keys[i++],Properties[P]);return O}}$def($def.S+$def.F*!SUPPORT_DESC,"Object",{getOwnPropertyDescriptor:$.getDesc,defineProperty:$.setDesc,defineProperties:defineProperties});var keys1=("constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,"+"toLocaleString,toString,valueOf").split(","),keys2=keys1.concat("length","prototype"),keysLen1=keys1.length;var createDict=function(){var iframe=cel("iframe"),i=keysLen1,gt=">",iframeDocument;iframe.style.display="none";html.appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write(" + + - + diff --git a/public/javascripts/wechat/project_discussion.js b/public/javascripts/wechat/project_discussion.js index 0ba69c153..94cdcea10 100644 --- a/public/javascripts/wechat/project_discussion.js +++ b/public/javascripts/wechat/project_discussion.js @@ -1,3 +1,105 @@ /** * Created by root on 4/1/16. */ +/** + * Created by root on 4/1/16. + */ +$(document).ready(function(){ + + var bt=baidu.template; + bt.LEFT_DELIMITER=''; + + + var apiUrl = '/api/v1/'; + + var setReplyTemplate = function(data){ + console.log(data); + var html=bt('t:homework-detail-reply',{reply: data}); + $('#all_homework_reply').prepend(html); + }; + + + var setTemplate = function(data){ + console.log(data); + var html=bt('t:project-discussion',{discussion: data}); + $('#p-discussion-container').prepend(html); + $('.post-reply-submit').click(function(){ + replyInsert(); + }); + /*$('post-interactive-praise').click(function(){ + praiseClick(); + });*/ + }; + + var loadDataFromServer = function(id){ + //getOpenId(function(openid){ + $.ajax({ + url: apiUrl + 'messages/' + id, + dataType: 'json', + success: function(data){ + setTemplate(data.data); + }, + error: function(xhr,status,err){ + console.log(err); + } + }); + //}) + + + }; + + var homeworkUrl = window.location.search; + var homeworkID = homeworkUrl.split("=")[1]; + + loadDataFromServer(homeworkID); + + //点击回复按钮,插入回复内容 + var replyInsert = function(){ + var replyContent = $("#postInput").val(); + if (!replyContent){ + alert("请输入回复"); + }else{ + + /*//将用户输入内容插入最后一条回复 + $(".post-reply-wrap:last").after('
回复
'); + $(".post-reply-content:last").append(replyContent); + $(".post-reply-date:last").append(Date());*/ + var postInput = $("#postInput").val(); + $("#postInput").val(""); + //回复数目+1 + var replyNum = $(".post-interactive-reply").text().match(/\d+/g); + replyNum++; + $(".reply-num").text("(" + replyNum + ")"); + + //获取并传送回复用户数据 + var userInfo = { + "type" : "Message", + "content" : postInput + }; + + $.ajax({ + type: "POST", //提交方式 + dataType: "json", //类型 + url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名 + data: userInfo, //参数,如果没有,可以为null + success: function (data) { //如果执行成功,那么执行此方法 + setReplyTemplate(data.data); //用data.d来获取后台传过来的json语句,或者是单纯的语句 + }, + error: function (err) { //如果执行不成功,那么执行此方法 + alert("err:" + err); + } + }); + } + + } + + //点赞效果 + /*var praiseClick = function(){ + var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); + praiseNum++; + $(".praise-num").text("(" + praiseNum + ")"); + }*/ + + +}); \ No newline at end of file From 417484f3ad84b0fefbd590f9f211fffe0de532d3 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 5 Apr 2016 15:12:05 +0800 Subject: [PATCH 120/209] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E6=A0=87=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/app.js | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 38a6c142f..cb77c6b0f 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -2,13 +2,19 @@ var app = angular.module('wechat', ['ngRoute']); var apiUrl = 'http://wechat.trustie.net/api/v1/'; //var openid= "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; var openid = ''; +var debug = true; //调试标志,如果在本地请置为true + +if(debug){ + openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; +} app.factory('auth', function($http,$routeParams){ - var _openid = ''; + var _openid = openid; var getOpenId = function(cb) { if (_openid.length > 0) { cb(_openid); + return; } var code = $routeParams.code; $http({ @@ -39,16 +45,7 @@ app.controller('ActivityController',function($scope, $http, auth){ $scope.activities = []; $scope.page = 1; - auth.getOpenId(function(openid){ - if(!openid){ - alert("获取openid出错"); - } else { - openid = openid; - $scope.loadActData($scope.page); - } - }); - - $scope.loadActData = function(page){ + var loadActData = function(page){ $scope.page = page; $http({ method: 'POST', @@ -60,6 +57,17 @@ app.controller('ActivityController',function($scope, $http, auth){ }); } + auth.getOpenId(function(openid){ + if(!openid){ + alert("获取openid出错"); + } else { + openid = openid; + loadActData($scope.page); + } + }); + + $scope.loadActData = loadActData; + }); app.controller('IssueController', function($scope, $http, $routeParams, auth){ From ae080314408e0e672fd79a1b087aba265ebc1f14 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 5 Apr 2016 15:54:30 +0800 Subject: [PATCH 121/209] =?UTF-8?q?=E5=BC=80=E6=94=BE=E8=B7=A8=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 1 + config/application.rb | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Gemfile b/Gemfile index 9fe511a59..a74d883fa 100644 --- a/Gemfile +++ b/Gemfile @@ -17,6 +17,7 @@ gem 'delayed_job_active_record'#, :group => :production gem 'daemons' gem 'grape', '~> 0.9.0' gem 'grape-entity' +gem 'rack-cors', :require => 'rack/cors' gem 'seems_rateable', '~> 1.0.13' gem 'rails', '~> 3.2' gem "jquery-rails", "~> 2.0.2" diff --git a/config/application.rb b/config/application.rb index 0c55fc75f..a1e14e0d9 100644 --- a/config/application.rb +++ b/config/application.rb @@ -71,6 +71,14 @@ module RedmineApp config.action_view.sanitized_allowed_tags = 'div', 'p', 'span', 'img', 'embed' + config.middleware.use Rack::Cors do + allow do + origins '*' + # location of your API + resource '/api/*', :headers => :any, :methods => [:get, :post, :options, :put] + end + end + config.before_initialize do end From bb5a527f9e73f16fa4d9218667ba0b4fb25f9492 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 5 Apr 2016 15:57:19 +0800 Subject: [PATCH 122/209] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=B0=E8=8F=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/menu.yml | 2 +- public/javascripts/wechat/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/menu.yml b/config/menu.yml index afb2ef0f7..99c0cf583 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -2,7 +2,7 @@ button: - type: "view" name: "最新动态" - url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=http://wechat.trustie.net/assets/wechat/activities.html&response_type=code&scope=snsapi_base&state=123#wechat_redirect" + url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=http://wechat.trustie.net/assets/wechat/app.html&response_type=code&scope=snsapi_base&state=123#wechat_redirect" - type: "click" name: "意见返馈" diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index cb77c6b0f..b9e0e1958 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -2,7 +2,7 @@ var app = angular.module('wechat', ['ngRoute']); var apiUrl = 'http://wechat.trustie.net/api/v1/'; //var openid= "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; var openid = ''; -var debug = true; //调试标志,如果在本地请置为true +var debug = false; //调试标志,如果在本地请置为true if(debug){ openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; From 619b07b5c2432c0e4581744e6d0fa1399bf23768 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 5 Apr 2016 16:32:42 +0800 Subject: [PATCH 123/209] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E4=B8=8A?= =?UTF-8?q?=E8=B0=83=E8=AF=95openid=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/menu.yml | 2 +- public/javascripts/wechat/app.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/menu.yml b/config/menu.yml index 99c0cf583..224ad23dd 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -2,7 +2,7 @@ button: - type: "view" name: "最新动态" - url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=http://wechat.trustie.net/assets/wechat/app.html&response_type=code&scope=snsapi_base&state=123#wechat_redirect" + url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=http://wechat.trustie.net/assets/wechat/app.html#/activities?response_type=code&scope=snsapi_base&state=123#wechat_redirect" - type: "click" name: "意见返馈" diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index b9e0e1958..7e5983652 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -4,7 +4,7 @@ var apiUrl = 'http://wechat.trustie.net/api/v1/'; var openid = ''; var debug = false; //调试标志,如果在本地请置为true -if(debug){ +if(debug===true){ openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; } @@ -22,7 +22,8 @@ app.factory('auth', function($http,$routeParams){ data: {code: code}, method: 'POST' }).then(function successCallback(response) { - _openid = data.openid; + _openid = response.data.openid; + openid = _openid; cb(_openid); }, function errorCallback(response) { cb(null); @@ -57,11 +58,10 @@ app.controller('ActivityController',function($scope, $http, auth){ }); } - auth.getOpenId(function(openid){ - if(!openid){ + auth.getOpenId(function(oid){ + if(!oid){ alert("获取openid出错"); } else { - openid = openid; loadActData($scope.page); } }); @@ -136,4 +136,4 @@ app.config(['$routeProvider',function ($routeProvider) { .otherwise({ redirectTo: '/activities' }); -}]); \ No newline at end of file +}]); From 80d5424ff313a187476f9361aa26aee1d2e18684 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 5 Apr 2016 16:36:18 +0800 Subject: [PATCH 124/209] =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E5=87=BA?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/app.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 7e5983652..68eb5ed85 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -113,7 +113,6 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth){ }); } - console.log(auth.getOpenId()); }); From afd779f2924e2674fcbf296596200019e2a367d7 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 5 Apr 2016 17:19:00 +0800 Subject: [PATCH 125/209] =?UTF-8?q?=E4=BD=BF=E7=94=A8cookies=E5=AD=98?= =?UTF-8?q?=E5=82=A8openid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/app.html | 1 + public/javascripts/wechat/app.js | 37 ++++++++++++++++++-------------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html index ef8e06d64..d2eebb0b8 100644 --- a/public/assets/wechat/app.html +++ b/public/assets/wechat/app.html @@ -19,6 +19,7 @@ + diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 68eb5ed85..4d2d71dd7 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,18 +1,16 @@ -var app = angular.module('wechat', ['ngRoute']); +var app = angular.module('wechat', ['ngRoute','ngCookies']); var apiUrl = 'http://wechat.trustie.net/api/v1/'; -//var openid= "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; -var openid = ''; var debug = false; //调试标志,如果在本地请置为true -if(debug===true){ - openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; -} +app.factory('auth', function($http,$routeParams, $cookies){ + var _openid = ''; -app.factory('auth', function($http,$routeParams){ - var _openid = openid; + if(debug===true){ + _openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; + } var getOpenId = function(cb) { - if (_openid.length > 0) { + if (typeof _openid !== 'undefined' || _openid.length > 0) { cb(_openid); return; } @@ -23,19 +21,24 @@ app.factory('auth', function($http,$routeParams){ method: 'POST' }).then(function successCallback(response) { _openid = response.data.openid; - openid = _openid; + if(debug !== true){ //如果是生产环境,就存到cookies中 + $cookies.put("openid", _openid); + } cb(_openid); }, function errorCallback(response) { - cb(null); + if(debug!==true){//考虑从cookies中取出 + _openid = $cookies.get('openid'); + } + cb(_openid); }); }; - var setOpenId = function(id){ - _openid = id; + var openid = function(){ + return _openid; } - return {getOpenId: getOpenId, setOpenId: setOpenId}; + return {getOpenId: getOpenId, openid: openid}; }); app.controller('ActivityController',function($scope, $http, auth){ @@ -43,6 +46,8 @@ app.controller('ActivityController',function($scope, $http, auth){ return "http://www.trustie.net/" + url; } + console.log("ActivityController load"); + $scope.activities = []; $scope.page = 1; @@ -51,7 +56,7 @@ app.controller('ActivityController',function($scope, $http, auth){ $http({ method: 'POST', url: apiUrl+ "activities", - data: {openid: openid, page: page}, + data: {openid: auth.openid(), page: page}, }).then(function successCallback(response) { $scope.activities = $scope.activities.concat(response.data.data); }, function errorCallback(response) { @@ -98,7 +103,7 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth){ var userInfo = { type: "Issue", content: data.comment, - openid: openid, + openid: auth.openid(), }; $http({ From 23ec67b2ebe34f60ea26416b7b8c944a1f30edb5 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 5 Apr 2016 17:23:36 +0800 Subject: [PATCH 126/209] =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E5=87=BA?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 4d2d71dd7..119e962d1 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -10,7 +10,7 @@ app.factory('auth', function($http,$routeParams, $cookies){ } var getOpenId = function(cb) { - if (typeof _openid !== 'undefined' || _openid.length > 0) { + if (typeof _openid !== 'undefined' && _openid.length > 0) { cb(_openid); return; } From 606599047d5a3452290321bc1bb32de3cf65d6dd Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 5 Apr 2016 17:35:27 +0800 Subject: [PATCH 127/209] =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E5=87=BA?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/app.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 119e962d1..5a18a2e35 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -21,20 +21,22 @@ app.factory('auth', function($http,$routeParams, $cookies){ method: 'POST' }).then(function successCallback(response) { _openid = response.data.openid; - if(debug !== true){ //如果是生产环境,就存到cookies中 - $cookies.put("openid", _openid); + if(typeof _openid !== 'undefined' && _openid.length>0){ + if(debug !== true){ //如果是生产环境,就存到cookies中 + $cookies.put("openid", _openid); + } + } else { + if(debug!==true){//考虑从cookies中取出 + _openid = $cookies.get('openid'); + } } + cb(_openid); }, function errorCallback(response) { - if(debug!==true){//考虑从cookies中取出 - _openid = $cookies.get('openid'); - } - cb(_openid); + cb(null); }); }; - - var openid = function(){ return _openid; } From 035b47d2b7381c2761caed2e6c4aa59ced53f3bd Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 6 Apr 2016 09:38:46 +0800 Subject: [PATCH 128/209] =?UTF-8?q?issue=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 4 ++-- public/assets/wechat/issue_detail.html | 18 ++---------------- public/javascripts/wechat/app.js | 8 ++++---- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 05ce3eb16..81cc040ba 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -12,7 +12,7 @@
-

+
{{act.description|safeHtml}}
迟交扣分:{{act.homework_common_detail.late_penalty}}分 匿评开启时间:{{act.homework_common_detail.evaluation_start}}
缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品 匿评关闭时间:{{act.homework_common_detail.evaluation_end}}
@@ -104,7 +104,7 @@
-

+
{{act.description|safeHtml}}
状态:{{act.issue_detail.issue_status}} 优先级:{{act.issue_detail.issue_priority}}
指派给:{{act.issue_detail.issue_assigned_to}} 完成度:{{act.issue_detail.done_ratio}}%
点击展开 diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index b8fdc5928..eb56cf558 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -8,8 +8,8 @@
-
- 状态: 优先级:
指派给: 完成度:
+
{{issue.description}}
+ 状态:{{issue.issue_status}} 优先级:{{issue.issue_priority}}
指派给:{{issue.issue_assigned_to}} 完成度:{{issue.done_ratio}}%
{{issue.created_on}} @@ -44,17 +44,3 @@
- - diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 68eb5ed85..b9f2a50e8 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,11 +1,11 @@ var app = angular.module('wechat', ['ngRoute']); -var apiUrl = 'http://wechat.trustie.net/api/v1/'; +var apiUrl = 'http://localhost:3000/api/v1/'; //var openid= "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; var openid = ''; -var debug = false; //调试标志,如果在本地请置为true +var debug = true; //调试标志,如果在本地请置为true if(debug===true){ - openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; + openid = "1"; } app.factory('auth', function($http,$routeParams){ @@ -39,7 +39,7 @@ app.factory('auth', function($http,$routeParams){ }); app.controller('ActivityController',function($scope, $http, auth){ - $scope.repaceUrl = function(url){ + $scope.replaceUrl = function(url){ return "http://www.trustie.net/" + url; } From 2162d7d4b82e948ac1f7b906e1eafdf63cd200de Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 6 Apr 2016 10:40:38 +0800 Subject: [PATCH 129/209] =?UTF-8?q?=E7=BB=84=E7=BB=87banner=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 6 ++-- app/helpers/application_helper.rb | 2 ++ .../_upload_org_new_files_banner.html.erb | 25 +++++++++++++ app/views/layouts/base_org_newstyle.html.erb | 36 +++++++++++++++++-- .../lib/acts_as_attachable.rb | 1 + public/stylesheets/org_new_style.css | 11 ++++-- 6 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 app/views/files/_upload_org_new_files_banner.html.erb diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 63e823063..19e85bdc4 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -660,8 +660,10 @@ class AttachmentsController < ApplicationController end def has_login - unless @attachment && @attachment.container_type == "PhoneAppVersion" - render_403 if !User.current.logged? && !(@attachment.container_type == 'OrgSubfield' && @attachment.container.organization.allow_guest_download) && !(@attachment.container_type == 'OrgDocumentComment' && @attachment.container.organization.allow_guest_download) + unless @attachment.container_type == "Organization" + unless @attachment && @attachment.container_type == "PhoneAppVersion" + render_403 if !User.current.logged? && !(@attachment.container_type == 'OrgSubfield' && @attachment.container.organization.allow_guest_download) && !(@attachment.container_type == 'OrgDocumentComment' && @attachment.container.organization.allow_guest_download) + end end end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1d443610f..828123675 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2104,6 +2104,8 @@ module ApplicationHelper attachment.container.board.course course = attachment.container.board.course candown= User.current.member_of_course?(course) || (course.is_public==1 && attachment.is_public == 1) + elsif attachment.container.class.to_s=="Organization" + candown = true elsif attachment.container.class.to_s=="HomeworkAttach" candown = true elsif attachment.container.class.to_s=="StudentWorksScore" diff --git a/app/views/files/_upload_org_new_files_banner.html.erb b/app/views/files/_upload_org_new_files_banner.html.erb new file mode 100644 index 000000000..cf044e089 --- /dev/null +++ b/app/views/files/_upload_org_new_files_banner.html.erb @@ -0,0 +1,25 @@ +
+
+

更换背景图片

+
+ <%= error_messages_for 'attachment' %> + + <%= form_tag(organization_files_path(org, :in_org => params[:in_org]), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %> + + <%= render :partial => 'files/org_upload_attachment_list', :locals => {:container => org}%> +
+ <%= l(:button_cancel)%> + <%= l(:button_confirm)%> + <% end %> +
+ +
+ +
+ + \ No newline at end of file diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index f646c437f..a5f41081c 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -71,6 +71,16 @@ $('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9"); $('#ajax-modal').parent().addClass("popbox_polls"); } + + function orge_new_files_banner_upload() + { + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_org_new_files_banner',:locals => {:org => @organization, :org_attachment_type => 1}) %>'); + showModal('ajax-modal', '513px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before(""); + $('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9"); + $('#ajax-modal').parent().addClass("popbox_polls"); + }
@@ -97,7 +107,6 @@ <% end %> - <%# 登录 %> <%= render :partial => 'organizations/org_logined_header' %> @@ -131,7 +140,30 @@
diff --git a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb index 6b22496b6..f5b48544d 100644 --- a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb +++ b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb @@ -140,6 +140,7 @@ module Redmine if file && file.size > 0 a = Attachment.create(:file => file, :author => author) elsif token + # 通过token值找到对应的attachment a = Attachment.find_by_token_only(token) if a a.filename = attachment['filename'] unless attachment['filename'].blank? diff --git a/public/stylesheets/org_new_style.css b/public/stylesheets/org_new_style.css index 8fca32cb1..9155df3f1 100644 --- a/public/stylesheets/org_new_style.css +++ b/public/stylesheets/org_new_style.css @@ -40,8 +40,13 @@ a:hover.search-icon{ background:url(../images/org_new_style/icons.png) -387px -8 .searchbox:hover{ background:#999999; color:#fff;} /* banner */ -.banner{ width:100%; height:234px; background:#070317 url(../images/org_new_style/banner.jpg) 0 0 no-repeat; color:#fff; text-align:center; padding-top:70px; line-height:2.4;} -.banner h2{ font-size:42px; } +.banner{ width:100%; height:304px; background:#070317; color:#fff; text-align:center; line-height:2.4;} +.banner-inner{ width:1500px; margin:0 auto; position:relative; text-align:center;} +.banner-img{ height:304px;} +.banner-txt{position:absolute; top:30%; left:0%; width:1500px; margin:0 auto;} +.banner h1{ font-size:42px;} +.banner a{font-size:28px; color:#fff;} +.banner a:hover{ text-decoration:underline;} .banner p{ font-size:18px;} .banner span{ font-size:16px;} @@ -274,3 +279,5 @@ div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: + + From a6f6f63d6d3bbe7b450853f9778ceabb70dd64da Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 6 Apr 2016 11:05:13 +0800 Subject: [PATCH 130/209] =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 2 +- .../_org_upload_attachment_list.html.erb | 4 +-- ...org_upload_attachment_list_banner.html.erb | 32 +++++++++++++++++++ .../_upload_org_new_files_banner.html.erb | 2 +- 4 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 app/views/files/_org_upload_attachment_list_banner.html.erb diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 19e85bdc4..1dacffb6f 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -660,7 +660,7 @@ class AttachmentsController < ApplicationController end def has_login - unless @attachment.container_type == "Organization" + unless @attachment && @attachment.container_type == "Organization" unless @attachment && @attachment.container_type == "PhoneAppVersion" render_403 if !User.current.logged? && !(@attachment.container_type == 'OrgSubfield' && @attachment.container.organization.allow_guest_download) && !(@attachment.container_type == 'OrgDocumentComment' && @attachment.container.organization.allow_guest_download) end diff --git a/app/views/files/_org_upload_attachment_list.html.erb b/app/views/files/_org_upload_attachment_list.html.erb index 973aeddd6..06fa23387 100644 --- a/app/views/files/_org_upload_attachment_list.html.erb +++ b/app/views/files/_org_upload_attachment_list.html.erb @@ -23,10 +23,8 @@ - <%= l(:label_no_file_uploaded)%> + 建议上传高度不超过52px的图片 -(<%= l(:label_max_size) %>:<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) -

建议上传高度不超过52px的图片

diff --git a/app/views/files/_org_upload_attachment_list_banner.html.erb b/app/views/files/_org_upload_attachment_list_banner.html.erb new file mode 100644 index 000000000..5388afb5b --- /dev/null +++ b/app/views/files/_org_upload_attachment_list_banner.html.erb @@ -0,0 +1,32 @@ + + + <%= file_field_tag 'attachments[dummy][file]', + :id => "_file#{container.id}", + :class => ie8? ? '':'file_selector', + :multiple => true, + :onchange => "addInputFiles_board(this, '#{container.id}','"+"submit_resource"+"');", + :style => ie8? ? '': 'display:none', + :data => { + :max_file_size => Setting.attachment_max_size.to_i.kilobytes, + :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), + :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, + :upload_path => uploads_path(:format => 'js'), + :description_placeholder => l(:label_optional_description), + :field_is_public => l(:field_is_public), + :are_you_sure => l(:text_are_you_sure), + :file_count => l(:label_file_count), + :delete_all_files => l(:text_are_you_sure_all), + :lebel_file_uploding => l(:lebel_file_uploding), + :containerid => "#{container.id}" + } %> + + + + + 建议上传 长度为1452px/高度为304px 的图片 + +
+
+ + +
\ No newline at end of file diff --git a/app/views/files/_upload_org_new_files_banner.html.erb b/app/views/files/_upload_org_new_files_banner.html.erb index cf044e089..0cb767bf2 100644 --- a/app/views/files/_upload_org_new_files_banner.html.erb +++ b/app/views/files/_upload_org_new_files_banner.html.erb @@ -6,7 +6,7 @@ <%= form_tag(organization_files_path(org, :in_org => params[:in_org]), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %> - <%= render :partial => 'files/org_upload_attachment_list', :locals => {:container => org}%> + <%= render :partial => 'files/org_upload_attachment_list_banner', :locals => {:container => org}%>
<%= l(:button_cancel)%> <%= l(:button_confirm)%> From feb0014bf8372e2ec8761a0511de42803eb79a07 Mon Sep 17 00:00:00 2001 From: txz Date: Wed, 6 Apr 2016 11:29:50 +0800 Subject: [PATCH 131/209] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/schema.rb | 4184 ++++++++++----------- public/assets/wechat/activities.html | 17 +- public/assets/wechat/app.html | 1 + public/assets/wechat/homework_detail.html | 78 +- public/assets/wechat/issue_detail.html | 1 - public/javascripts/wechat/app.js | 95 +- 6 files changed, 2211 insertions(+), 2165 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 38c7e5ad2..75f316f06 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,2092 +1,2092 @@ -# encoding: UTF-8 -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended to check this file into your version control system. - -ActiveRecord::Schema.define(:version => 20160317090350) do - - create_table "activities", :force => true do |t| - t.integer "act_id", :null => false - t.string "act_type", :null => false - t.integer "user_id", :null => false - t.integer "activity_container_id" - t.string "activity_container_type", :default => "" - t.datetime "created_at" - end - - add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" - add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" - add_index "activities", ["user_id"], :name => "index_activities_on_user_id" - - create_table "activity_notifies", :force => true do |t| - t.integer "activity_container_id" - t.string "activity_container_type" - t.integer "activity_id" - t.string "activity_type" - t.integer "notify_to" - t.datetime "created_on" - t.integer "is_read" - end - - add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" - add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" - add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" - - create_table "api_keys", :force => true do |t| - t.string "access_token" - t.datetime "expires_at" - t.integer "user_id" - t.boolean "active", :default => true - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" - add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - - create_table "applied_projects", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - end - - create_table "apply_project_masters", :force => true do |t| - t.integer "user_id" - t.string "apply_type" - t.integer "apply_id" - t.integer "status" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "at_messages", :force => true do |t| - t.integer "user_id" - t.integer "at_message_id" - t.string "at_message_type" - t.boolean "viewed", :default => false - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sender_id" - end - - add_index "at_messages", ["user_id"], :name => "index_at_messages_on_user_id" - - create_table "attachment_histories", :force => true do |t| - t.integer "container_id" - t.string "container_type" - t.string "filename", :default => "" - t.string "disk_filename", :default => "" - t.integer "filesize", :default => 0 - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "" - t.integer "downloads", :default => 0 - t.integer "author_id" - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.integer "copy_from" - t.integer "quotes" - t.integer "version" - t.integer "attachment_id" - t.integer "is_publish", :default => 1 - t.date "publish_time" - end - - create_table "attachments", :force => true do |t| - t.integer "container_id" - t.string "container_type", :limit => 30 - t.string "filename", :default => "", :null => false - t.string "disk_filename", :default => "", :null => false - t.integer "filesize", :default => 0, :null => false - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "", :null => false - t.integer "downloads", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype", :default => 1 - t.integer "is_public", :default => 1 - t.integer "copy_from" - t.integer "quotes" - t.integer "is_publish", :default => 1 - t.date "publish_time" - end - - add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" - add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" - add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" - - create_table "attachmentstypes", :force => true do |t| - t.integer "typeId", :null => false - t.string "typeName", :limit => 50 - end - - create_table "auth_sources", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 60, :default => "", :null => false - t.string "host", :limit => 60 - t.integer "port" - t.string "account" - t.string "account_password", :default => "" - t.string "base_dn" - t.string "attr_login", :limit => 30 - t.string "attr_firstname", :limit => 30 - t.string "attr_lastname", :limit => 30 - t.string "attr_mail", :limit => 30 - t.boolean "onthefly_register", :default => false, :null => false - t.boolean "tls", :default => false, :null => false - t.string "filter" - t.integer "timeout" - end - - add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" - - create_table "biding_projects", :force => true do |t| - t.integer "project_id" - t.integer "bid_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "bids", :force => true do |t| - t.string "name" - t.string "budget", :null => false - t.integer "author_id" - t.date "deadline" - t.text "description" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.integer "commit" - t.integer "reward_type" - t.integer "homework_type" - t.integer "parent_id" - t.string "password" - t.integer "is_evaluation" - t.integer "proportion", :default => 60 - t.integer "comment_status", :default => 0 - t.integer "evaluation_num", :default => 3 - t.integer "open_anonymous_evaluation", :default => 1 - end - - create_table "blog_comments", :force => true do |t| - t.integer "blog_id", :null => false - t.integer "parent_id" - t.string "title", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "comments_count", :default => 0, :null => false - t.integer "last_comment_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "reply_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "blogs", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - t.integer "position", :default => 1 - t.integer "article_count", :default => 0, :null => false - t.integer "comments_count", :default => 0, :null => false - t.integer "last_comments_id" - t.integer "parent_id" - t.integer "author_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "homepage_id" - end - - create_table "boards", :force => true do |t| - t.integer "project_id", :null => false - t.string "name", :default => "", :null => false - t.string "description" - t.integer "position", :default => 1 - t.integer "topics_count", :default => 0, :null => false - t.integer "messages_count", :default => 0, :null => false - t.integer "last_message_id" - t.integer "parent_id" - t.integer "course_id" - t.integer "org_subfield_id" - end - - add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" - add_index "boards", ["project_id"], :name => "boards_project_id" - - create_table "bug_to_osps", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "changes", :force => true do |t| - t.integer "changeset_id", :null => false - t.string "action", :limit => 1, :default => "", :null => false - t.text "path", :null => false - t.text "from_path" - t.string "from_revision" - t.string "revision" - t.string "branch" - end - - add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" - - create_table "changeset_parents", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "parent_id", :null => false - end - - add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" - add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" - - create_table "changesets", :force => true do |t| - t.integer "repository_id", :null => false - t.string "revision", :null => false - t.string "committer" - t.datetime "committed_on", :null => false - t.text "comments" - t.date "commit_date" - t.string "scmid" - t.integer "user_id" - end - - add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" - add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true - add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" - add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" - add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" - - create_table "changesets_issues", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "issue_id", :null => false - end - - add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true - - create_table "code_review_assignments", :force => true do |t| - t.integer "issue_id" - t.integer "change_id" - t.integer "attachment_id" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.string "action_type" - t.integer "changeset_id" - end - - create_table "code_review_project_settings", :force => true do |t| - t.integer "project_id" - t.integer "tracker_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "updated_by" - t.boolean "hide_code_review_tab", :default => false - t.integer "auto_relation", :default => 1 - t.integer "assignment_tracker_id" - t.text "auto_assign" - t.integer "lock_version", :default => 0, :null => false - t.boolean "tracker_in_review_dialog", :default => false - end - - create_table "code_review_user_settings", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "mail_notification", :default => 0, :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "code_reviews", :force => true do |t| - t.integer "project_id" - t.integer "change_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "line" - t.integer "updated_by_id" - t.integer "lock_version", :default => 0, :null => false - t.integer "status_changed_from" - t.integer "status_changed_to" - t.integer "issue_id" - t.string "action_type" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.integer "attachment_id" - t.integer "file_count", :default => 0, :null => false - t.boolean "diff_all" - end - - create_table "comments", :force => true do |t| - t.string "commented_type", :limit => 30, :default => "", :null => false - t.integer "commented_id", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.text "comments" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "comments", ["author_id"], :name => "index_comments_on_author_id" - add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" - - create_table "contest_notifications", :force => true do |t| - t.text "title" - t.text "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "contesting_projects", :force => true do |t| - t.integer "project_id" - t.string "contest_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "contesting_softapplications", :force => true do |t| - t.integer "softapplication_id" - t.integer "contest_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "contestnotifications", :force => true do |t| - t.integer "contest_id" - t.string "title" - t.string "summary" - t.text "description" - t.integer "author_id" - t.integer "notificationcomments_count" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "contests", :force => true do |t| - t.string "name" - t.string "budget", :default => "" - t.integer "author_id" - t.date "deadline" - t.string "description" - t.integer "commit" - t.string "password" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - create_table "course_activities", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_act_id" - t.string "course_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_attachments", :force => true do |t| - t.string "filename" - t.string "disk_filename" - t.integer "filesize" - t.string "content_type" - t.string "digest" - t.integer "downloads" - t.string "author_id" - t.string "integer" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "container_id", :default => 0 - end - - create_table "course_contributor_scores", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.integer "message_num" - t.integer "message_reply_num" - t.integer "news_reply_num" - t.integer "resource_num" - t.integer "journal_num" - t.integer "journal_reply_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "total_score" - t.integer "homework_journal_num", :default => 0 - t.integer "news_num", :default => 0 - end - - create_table "course_groups", :force => true do |t| - t.string "name" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_infos", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_messages", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_message_id" - t.string "course_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "content" - t.integer "status" - end - - create_table "course_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "course_id" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "courses", :force => true do |t| - t.integer "tea_id" - t.string "name" - t.integer "state" - t.string "code" - t.integer "time" - t.string "extra" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "location" - t.string "term" - t.string "string" - t.string "password" - t.string "setup_time" - t.string "endup_time" - t.string "class_period" - t.integer "school_id" - t.text "description" - t.integer "status", :default => 1 - t.integer "attachmenttype", :default => 2 - t.integer "lft" - t.integer "rgt" - t.integer "is_public", :limit => 1, :default => 1 - t.integer "inherit_members", :limit => 1, :default => 1 - t.integer "open_student", :default => 0 - t.integer "outline", :default => 0 - t.integer "publish_resource", :default => 0 - t.integer "is_delete", :default => 0 - t.integer "end_time" - t.string "end_term" - t.integer "is_excellent", :default => 0 - t.integer "excellent_option", :default => 0 - t.integer "is_copy", :default => 0 - t.integer "visits", :default => 0 - end - - create_table "custom_fields", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.string "field_format", :limit => 30, :default => "", :null => false - t.text "possible_values" - t.string "regexp", :default => "" - t.integer "min_length", :default => 0, :null => false - t.integer "max_length", :default => 0, :null => false - t.boolean "is_required", :default => false, :null => false - t.boolean "is_for_all", :default => false, :null => false - t.boolean "is_filter", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "searchable", :default => false - t.text "default_value" - t.boolean "editable", :default => true - t.boolean "visible", :default => true, :null => false - t.boolean "multiple", :default => false - end - - add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" - - create_table "custom_fields_projects", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "project_id", :default => 0, :null => false - end - - add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true - - create_table "custom_fields_trackers", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true - - create_table "custom_values", :force => true do |t| - t.string "customized_type", :limit => 30, :default => "", :null => false - t.integer "customized_id", :default => 0, :null => false - t.integer "custom_field_id", :default => 0, :null => false - t.text "value" - end - - add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" - add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" - - create_table "delayed_jobs", :force => true do |t| - t.integer "priority", :default => 0, :null => false - t.integer "attempts", :default => 0, :null => false - t.text "handler", :null => false - t.text "last_error" - t.datetime "run_at" - t.datetime "locked_at" - t.datetime "failed_at" - t.string "locked_by" - t.string "queue" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" - - create_table "discuss_demos", :force => true do |t| - t.string "title" - t.text "body" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "documents", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "category_id", :default => 0, :null => false - t.string "title", :limit => 60, :default => "", :null => false - t.text "description" - t.datetime "created_on" - t.integer "user_id", :default => 0 - t.integer "is_public", :default => 1 - end - - add_index "documents", ["category_id"], :name => "index_documents_on_category_id" - add_index "documents", ["created_on"], :name => "index_documents_on_created_on" - add_index "documents", ["project_id"], :name => "documents_project_id" - - create_table "dts", :primary_key => "Num", :force => true do |t| - t.string "Defect", :limit => 50 - t.string "Category", :limit => 50 - t.string "File" - t.string "Method" - t.string "Module", :limit => 20 - t.string "Variable", :limit => 50 - t.integer "StartLine" - t.integer "IPLine" - t.string "IPLineCode", :limit => 200 - t.string "Judge", :limit => 15 - t.integer "Review", :limit => 1 - t.string "Description" - t.text "PreConditions", :limit => 2147483647 - t.text "TraceInfo", :limit => 2147483647 - t.text "Code", :limit => 2147483647 - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "id", :null => false - end - - create_table "editor_of_documents", :force => true do |t| - t.integer "editor_id" - t.integer "org_document_comment_id" - t.datetime "created_at" - end - - create_table "enabled_modules", :force => true do |t| - t.integer "project_id" - t.string "name", :null => false - t.integer "course_id" - end - - add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" - - create_table "enumerations", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "is_default", :default => false, :null => false - t.string "type" - t.boolean "active", :default => true, :null => false - t.integer "project_id" - t.integer "parent_id" - t.string "position_name", :limit => 30 - end - - add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" - add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" - - create_table "exercise_answers", :force => true do |t| - t.integer "user_id" - t.integer "exercise_question_id" - t.integer "exercise_choice_id" - t.text "answer_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_choices", :force => true do |t| - t.integer "exercise_question_id" - t.text "choice_text" - t.integer "choice_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_questions", :force => true do |t| - t.text "question_title" - t.integer "question_type" - t.integer "question_number" - t.integer "exercise_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_score" - end - - create_table "exercise_standard_answers", :force => true do |t| - t.integer "exercise_question_id" - t.integer "exercise_choice_id" - t.text "answer_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "exercise_users", :force => true do |t| - t.integer "user_id" - t.integer "exercise_id" - t.integer "score" - t.datetime "start_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.datetime "end_at" - t.integer "status" - end - - create_table "exercises", :force => true do |t| - t.text "exercise_name" - t.text "exercise_description" - t.integer "course_id" - t.integer "exercise_status" - t.integer "user_id" - t.integer "time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.datetime "publish_time" - t.datetime "end_time" - t.integer "show_result" - end - - create_table "first_pages", :force => true do |t| - t.string "web_title" - t.string "title" - t.text "description" - t.string "page_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sort_type" - t.integer "image_width", :default => 107 - t.integer "image_height", :default => 63 - t.integer "show_course", :default => 1 - t.integer "show_contest", :default => 1 - end - - create_table "forge_activities", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_act_id" - t.string "forge_act_type" - t.integer "org_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" - - create_table "forge_messages", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_message_id" - t.string "forge_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "secret_key" - t.integer "status" - end - - create_table "forums", :force => true do |t| - t.string "name", :null => false - t.text "description" - t.integer "topic_count", :default => 0 - t.integer "memo_count", :default => 0 - t.integer "last_memo_id", :default => 0 - t.integer "creator_id", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sticky" - t.integer "locked" - end - - create_table "forwards", :force => true do |t| - t.integer "from_id" - t.string "from_type" - t.integer "to_id" - t.string "to_type" - t.datetime "created_at" - end - - create_table "groups_users", :id => false, :force => true do |t| - t.integer "group_id", :null => false - t.integer "user_id", :null => false - end - - add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true - - create_table "homework_attaches", :force => true do |t| - t.integer "bid_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - t.string "name" - t.text "description" - t.integer "state" - t.integer "project_id", :default => 0 - t.float "score", :default => 0.0 - t.integer "is_teacher_score", :default => 0 - end - - add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" - - create_table "homework_commons", :force => true do |t| - t.string "name" - t.integer "user_id" - t.text "description" - t.date "publish_time" - t.date "end_time" - t.integer "homework_type", :default => 1 - t.string "late_penalty" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "teacher_priority", :default => 1 - t.integer "anonymous_comment", :default => 0 - t.integer "quotes", :default => 0 - t.integer "is_open", :default => 0 - end - - add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id" - - create_table "homework_detail_groups", :force => true do |t| - t.integer "homework_common_id" - t.integer "min_num" - t.integer "max_num" - t.integer "base_on_project" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "homework_detail_groups", ["homework_common_id"], :name => "index_homework_detail_groups_on_homework_common_id" - - create_table "homework_detail_manuals", :force => true do |t| - t.float "ta_proportion" - t.integer "comment_status" - t.date "evaluation_start" - t.date "evaluation_end" - t.integer "evaluation_num" - t.integer "absence_penalty", :default => 1 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_detail_programings", :force => true do |t| - t.string "language" - t.text "standard_code", :limit => 2147483647 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "ta_proportion", :default => 0.1 - t.integer "question_id" - end - - create_table "homework_evaluations", :force => true do |t| - t.string "user_id" - t.string "homework_attach_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_for_courses", :force => true do |t| - t.integer "course_id" - t.integer "bid_id" - end - - add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id" - add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id" - - create_table "homework_tests", :force => true do |t| - t.text "input" - t.text "output" - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "result" - t.text "error_msg" - end - - create_table "homework_users", :force => true do |t| - t.string "homework_attach_id" - t.string "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "invite_lists", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "mail" - end - - create_table "issue_categories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.integer "assigned_to_id" - end - - add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" - add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" - - create_table "issue_relations", :force => true do |t| - t.integer "issue_from_id", :null => false - t.integer "issue_to_id", :null => false - t.string "relation_type", :default => "", :null => false - t.integer "delay" - end - - add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true - add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" - add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" - - create_table "issue_statuses", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_closed", :default => false, :null => false - t.boolean "is_default", :default => false, :null => false - t.integer "position", :default => 1 - t.integer "default_done_ratio" - end - - add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" - add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" - add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" - - create_table "issues", :force => true do |t| - t.integer "tracker_id", :null => false - t.integer "project_id", :null => false - t.string "subject", :default => "", :null => false - t.text "description" - t.date "due_date" - t.integer "category_id" - t.integer "status_id", :null => false - t.integer "assigned_to_id" - t.integer "priority_id", :null => false - t.integer "fixed_version_id" - t.integer "author_id", :null => false - t.integer "lock_version", :default => 0, :null => false - t.datetime "created_on" - t.datetime "updated_on" - t.date "start_date" - t.integer "done_ratio", :default => 0, :null => false - t.float "estimated_hours" - t.integer "parent_id" - t.integer "root_id" - t.integer "lft" - t.integer "rgt" - t.boolean "is_private", :default => false, :null => false - t.datetime "closed_on" - t.integer "project_issues_index" - end - - add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" - add_index "issues", ["author_id"], :name => "index_issues_on_author_id" - add_index "issues", ["category_id"], :name => "index_issues_on_category_id" - add_index "issues", ["created_on"], :name => "index_issues_on_created_on" - add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" - add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" - add_index "issues", ["project_id"], :name => "issues_project_id" - add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" - add_index "issues", ["status_id"], :name => "index_issues_on_status_id" - add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" - - create_table "join_in_competitions", :force => true do |t| - t.integer "user_id" - t.integer "competition_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "join_in_contests", :force => true do |t| - t.integer "user_id" - t.integer "bid_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "journal_details", :force => true do |t| - t.integer "journal_id", :default => 0, :null => false - t.string "property", :limit => 30, :default => "", :null => false - t.string "prop_key", :limit => 30, :default => "", :null => false - t.text "old_value" - t.text "value" - end - - add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" - - create_table "journal_replies", :id => false, :force => true do |t| - t.integer "journal_id" - t.integer "user_id" - t.integer "reply_id" - end - - add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" - add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" - add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" - - create_table "journals", :force => true do |t| - t.integer "journalized_id", :default => 0, :null => false - t.string "journalized_type", :limit => 30, :default => "", :null => false - t.integer "user_id", :default => 0, :null => false - t.text "notes" - t.datetime "created_on", :null => false - t.boolean "private_notes", :default => false, :null => false - end - - add_index "journals", ["created_on"], :name => "index_journals_on_created_on" - add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" - add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" - add_index "journals", ["user_id"], :name => "index_journals_on_user_id" - - create_table "journals_for_messages", :force => true do |t| - t.integer "jour_id" - t.string "jour_type" - t.integer "user_id" - t.text "notes" - t.integer "status" - t.integer "reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.string "m_parent_id" - t.boolean "is_readed" - t.integer "m_reply_count" - t.integer "m_reply_id" - t.integer "is_comprehensive_evaluation" - t.integer "private", :default => 0 - end - - create_table "kindeditor_assets", :force => true do |t| - t.string "asset" - t.integer "file_size" - t.string "file_type" - t.integer "owner_id" - t.string "asset_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "owner_type", :default => 0 - end - - create_table "member_roles", :force => true do |t| - t.integer "member_id", :null => false - t.integer "role_id", :null => false - t.integer "inherited_from" - end - - add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" - add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" - - create_table "members", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "project_id", :default => 0 - t.datetime "created_on" - t.boolean "mail_notification", :default => false, :null => false - t.integer "course_id", :default => -1 - t.integer "course_group_id", :default => 0 - end - - add_index "members", ["project_id"], :name => "index_members_on_project_id" - add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true - add_index "members", ["user_id"], :name => "index_members_on_user_id" - - create_table "memo_messages", :force => true do |t| - t.integer "user_id" - t.integer "forum_id" - t.integer "memo_id" - t.string "memo_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "memos", :force => true do |t| - t.integer "forum_id", :null => false - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :null => false - t.integer "author_id", :null => false - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count", :default => 0 - end - - create_table "message_alls", :force => true do |t| - t.integer "user_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "messages", :force => true do |t| - t.integer "board_id", :null => false - t.integer "parent_id" - t.string "subject", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "replies_count", :default => 0, :null => false - t.integer "last_reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "reply_id" - t.integer "quotes" - t.integer "status", :default => 0 - end - - add_index "messages", ["author_id"], :name => "index_messages_on_author_id" - add_index "messages", ["board_id"], :name => "messages_board_id" - add_index "messages", ["created_on"], :name => "index_messages_on_created_on" - add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" - add_index "messages", ["parent_id"], :name => "messages_parent_id" - - create_table "news", :force => true do |t| - t.integer "project_id" - t.string "title", :limit => 60, :default => "", :null => false - t.string "summary", :default => "" - t.text "description" - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.integer "comments_count", :default => 0, :null => false - t.integer "course_id" - t.integer "sticky", :default => 0 - t.integer "org_subfield_id" - end - - add_index "news", ["author_id"], :name => "index_news_on_author_id" - add_index "news", ["created_on"], :name => "index_news_on_created_on" - add_index "news", ["project_id"], :name => "news_project_id" - - create_table "no_uses", :force => true do |t| - t.integer "user_id", :null => false - t.string "no_use_type" - t.integer "no_use_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "notificationcomments", :force => true do |t| - t.string "notificationcommented_type" - t.integer "notificationcommented_id" - t.integer "author_id" - t.text "notificationcomments" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "onclick_times", :force => true do |t| - t.integer "user_id" - t.datetime "onclick_time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "open_id_authentication_associations", :force => true do |t| - t.integer "issued" - t.integer "lifetime" - t.string "handle" - t.string "assoc_type" - t.binary "server_url" - t.binary "secret" - end - - create_table "open_id_authentication_nonces", :force => true do |t| - t.integer "timestamp", :null => false - t.string "server_url" - t.string "salt", :null => false - end - - create_table "open_source_projects", :force => true do |t| - t.string "name" - t.text "description" - t.integer "commit_count", :default => 0 - t.integer "code_line", :default => 0 - t.integer "users_count", :default => 0 - t.date "last_commit_time" - t.string "url" - t.date "date_collected" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "option_numbers", :force => true do |t| - t.integer "user_id" - t.integer "memo" - t.integer "messages_for_issues" - t.integer "issues_status" - t.integer "replay_for_message" - t.integer "replay_for_memo" - t.integer "follow" - t.integer "tread" - t.integer "praise_by_one" - t.integer "praise_by_two" - t.integer "praise_by_three" - t.integer "tread_by_one" - t.integer "tread_by_two" - t.integer "tread_by_three" - t.integer "changeset" - t.integer "document" - t.integer "attachment" - t.integer "issue_done_ratio" - t.integer "post_issue" - t.integer "score_type" - t.integer "total_score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - end - - create_table "org_activities", :force => true do |t| - t.integer "user_id" - t.integer "org_act_id" - t.string "org_act_type" - t.integer "container_id" - t.string "container_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_courses", :force => true do |t| - t.integer "organization_id" - t.integer "course_id" - t.datetime "created_at" - end - - create_table "org_document_comments", :force => true do |t| - t.text "title" - t.text "content" - t.integer "organization_id" - t.integer "creator_id" - t.integer "parent_id" - t.integer "reply_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - t.integer "org_subfield_id" - end - - create_table "org_member_roles", :force => true do |t| - t.integer "org_member_id" - t.integer "role_id" - end - - create_table "org_members", :force => true do |t| - t.integer "user_id" - t.integer "organization_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_messages", :force => true do |t| - t.integer "user_id" - t.integer "sender_id" - t.integer "organization_id" - t.string "message_type" - t.integer "message_id" - t.integer "viewed" - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "status", :default => 0 - end - - create_table "org_projects", :force => true do |t| - t.integer "organization_id" - t.integer "project_id" - t.datetime "created_at" - end - - create_table "org_subfield_messages", :force => true do |t| - t.integer "org_subfield_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "org_subfields", :force => true do |t| - t.integer "organization_id" - t.integer "priority" - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "field_type" - t.integer "hide", :default => 0 - end - - create_table "organizations", :force => true do |t| - t.string "name" - t.text "description" - t.integer "creator_id" - t.integer "home_id" - t.boolean "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "allow_guest_download", :default => true - t.integer "visits", :default => 0 - end - - create_table "phone_app_versions", :force => true do |t| - t.string "version" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_answers", :force => true do |t| - t.integer "poll_question_id" - t.text "answer_text" - t.integer "answer_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_questions", :force => true do |t| - t.string "question_title" - t.integer "question_type" - t.integer "is_necessary" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_number" - end - - create_table "poll_users", :force => true do |t| - t.integer "user_id" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_votes", :force => true do |t| - t.integer "user_id" - t.integer "poll_question_id" - t.integer "poll_answer_id" - t.text "vote_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "polls", :force => true do |t| - t.string "polls_name" - t.string "polls_type" - t.integer "polls_group_id" - t.integer "polls_status" - t.integer "user_id" - t.datetime "published_at" - t.datetime "closed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "polls_description" - t.integer "show_result", :default => 1 - end - - create_table "praise_tread_caches", :force => true do |t| - t.integer "object_id", :null => false - t.string "object_type" - t.integer "praise_num" - t.integer "tread_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "praise_treads", :force => true do |t| - t.integer "user_id", :null => false - t.integer "praise_tread_object_id" - t.string "praise_tread_object_type" - t.integer "praise_or_tread" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "principal_activities", :force => true do |t| - t.integer "user_id" - t.integer "principal_id" - t.integer "principal_act_id" - t.string "principal_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_infos", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_scores", :force => true do |t| - t.string "project_id" - t.integer "score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "issue_num", :default => 0 - t.integer "issue_journal_num", :default => 0 - t.integer "news_num", :default => 0 - t.integer "documents_num", :default => 0 - t.integer "changeset_num", :default => 0 - t.integer "board_message_num", :default => 0 - t.integer "board_num", :default => 0 - t.integer "attach_num", :default => 0 - t.datetime "commit_time" - end - - create_table "project_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "project_id" - t.integer "project_type" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - end - - add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" - - create_table "projecting_softapplictions", :force => true do |t| - t.integer "user_id" - t.integer "softapplication_id" - t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "projects", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - t.string "homepage", :default => "" - t.boolean "is_public", :default => true, :null => false - t.integer "parent_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "identifier" - t.integer "status", :default => 1, :null => false - t.integer "lft" - t.integer "rgt" - t.boolean "inherit_members", :default => false, :null => false - t.integer "project_type" - t.boolean "hidden_repo", :default => false, :null => false - t.integer "attachmenttype", :default => 1 - t.integer "user_id" - t.integer "dts_test", :default => 0 - t.string "enterprise_name" - t.integer "organization_id" - t.integer "project_new_type" - t.integer "gpid" - t.integer "forked_from_project_id" - t.integer "forked_count" - t.integer "commits_count", :default => 0 - t.integer "publish_resource", :default => 0 - t.integer "issues_count", :default => 0 - t.integer "attachments_count", :default => 0 - t.integer "boards_count", :default => 0 - t.integer "news_count", :default => 0 - t.integer "acts_count", :default => 0 - t.integer "journals_count", :default => 0 - t.integer "boards_reply_count", :default => 0 - t.integer "visits", :default => 0 - end - - add_index "projects", ["lft"], :name => "index_projects_on_lft" - add_index "projects", ["rgt"], :name => "index_projects_on_rgt" - - create_table "projects_trackers", :id => false, :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true - add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" - - create_table "queries", :force => true do |t| - t.integer "project_id" - t.string "name", :default => "", :null => false - t.text "filters" - t.integer "user_id", :default => 0, :null => false - t.boolean "is_public", :default => false, :null => false - t.text "column_names" - t.text "sort_criteria" - t.string "group_by" - t.string "type" - end - - add_index "queries", ["project_id"], :name => "index_queries_on_project_id" - add_index "queries", ["user_id"], :name => "index_queries_on_user_id" - - create_table "relative_memo_to_open_source_projects", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "relative_memos", :force => true do |t| - t.integer "osp_id" - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :limit => 16777215, :null => false - t.integer "author_id" - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.boolean "is_quote", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count_crawl", :default => 0 - t.integer "viewed_count_local", :default => 0 - t.string "url" - t.string "username" - t.string "userhomeurl" - t.date "date_collected" - t.string "topic_resource" - end - - create_table "repositories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "url", :default => "", :null => false - t.string "login", :limit => 60, :default => "" - t.string "password", :default => "" - t.string "root_url", :default => "" - t.string "type" - t.string "path_encoding", :limit => 64 - t.string "log_encoding", :limit => 64 - t.text "extra_info" - t.string "identifier" - t.boolean "is_default", :default => false - t.boolean "hidden", :default => false - end - - add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" - - create_table "rich_rich_files", :force => true do |t| - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "rich_file_file_name" - t.string "rich_file_content_type" - t.integer "rich_file_file_size" - t.datetime "rich_file_updated_at" - t.string "owner_type" - t.integer "owner_id" - t.text "uri_cache" - t.string "simplified_type", :default => "file" - end - - create_table "roles", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "assignable", :default => true - t.integer "builtin", :default => 0, :null => false - t.text "permissions" - t.string "issues_visibility", :limit => 30, :default => "default", :null => false - end - - create_table "schools", :force => true do |t| - t.string "name" - t.string "province" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "logo_link" - t.string "pinyin" - end - - create_table "secdomains", :force => true do |t| - t.integer "sub_type" - t.string "subname" - t.integer "pid", :default => 0 - t.string "desc" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "seems_rateable_cached_ratings", :force => true do |t| - t.integer "cacheable_id", :limit => 8 - t.string "cacheable_type" - t.float "avg", :null => false - t.integer "cnt", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "seems_rateable_rates", :force => true do |t| - t.integer "rater_id", :limit => 8 - t.integer "rateable_id" - t.string "rateable_type" - t.float "stars", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "is_teacher_score", :default => 0 - end - - create_table "settings", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "value" - t.datetime "updated_on" - end - - add_index "settings", ["name"], :name => "index_settings_on_name" - - create_table "shares", :force => true do |t| - t.date "created_on" - t.string "url" - t.string "title" - t.integer "share_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - t.integer "user_id" - t.string "description" - end - - create_table "shield_activities", :force => true do |t| - t.string "container_type" - t.integer "container_id" - t.string "shield_type" - t.integer "shield_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "softapplications", :force => true do |t| - t.string "name" - t.text "description" - t.integer "app_type_id" - t.string "app_type_name" - t.string "android_min_version_available" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "contest_id" - t.integer "softapplication_id" - t.integer "is_public" - t.string "application_developers" - t.string "deposit_project_url" - t.string "deposit_project" - t.integer "project_id" - end - - create_table "student_work_projects", :force => true do |t| - t.integer "homework_common_id" - t.integer "student_work_id" - t.integer "project_id" - t.integer "user_id" - t.integer "is_leader" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "student_work_projects", ["homework_common_id"], :name => "index_student_work_projects_on_homework_common_id" - add_index "student_work_projects", ["project_id"], :name => "index_student_work_projects_on_project_id" - add_index "student_work_projects", ["student_work_id"], :name => "index_student_work_projects_on_student_work_id" - add_index "student_work_projects", ["user_id"], :name => "index_student_work_projects_on_user_id" - - create_table "student_work_tests", :force => true do |t| - t.integer "student_work_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "status", :default => 9 - t.text "results" - t.text "src" - end - - create_table "student_works", :force => true do |t| - t.string "name" - t.text "description", :limit => 2147483647 - t.integer "homework_common_id" - t.integer "user_id" - t.float "final_score" - t.float "teacher_score" - t.float "student_score" - t.float "teaching_asistant_score" - t.integer "project_id", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "late_penalty", :default => 0 - t.integer "absence_penalty", :default => 0 - t.float "system_score", :default => 0.0 - t.boolean "is_test", :default => false - end - - add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id" - - create_table "student_works_evaluation_distributions", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "student_works_scores", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.integer "score" - t.text "comment" - t.integer "reviewer_role" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "students_for_courses", :force => true do |t| - t.integer "student_id" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" - add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" - - create_table "subfield_subdomain_dirs", :force => true do |t| - t.integer "org_subfield_id" - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "system_messages", :force => true do |t| - t.integer "user_id" - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "description" - t.string "subject" - end - - create_table "taggings", :force => true do |t| - t.integer "tag_id" - t.integer "taggable_id" - t.string "taggable_type" - t.integer "tagger_id" - t.string "tagger_type" - t.string "context", :limit => 128 - t.datetime "created_at" - end - - add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" - add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" - add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" - - create_table "tags", :force => true do |t| - t.string "name" - end - - create_table "teachers", :force => true do |t| - t.string "tea_name" - t.string "location" - t.integer "couurse_time" - t.integer "course_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "extra" - end - - create_table "time_entries", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - t.integer "issue_id" - t.float "hours", :null => false - t.string "comments" - t.integer "activity_id", :null => false - t.date "spent_on", :null => false - t.integer "tyear", :null => false - t.integer "tmonth", :null => false - t.integer "tweek", :null => false - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" - add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" - add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" - add_index "time_entries", ["project_id"], :name => "time_entries_project_id" - add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" - - create_table "tokens", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.string "action", :limit => 30, :default => "", :null => false - t.string "value", :limit => 40, :default => "", :null => false - t.datetime "created_on", :null => false - end - - add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" - add_index "tokens", ["value"], :name => "tokens_value", :unique => true - - create_table "trackers", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_in_chlog", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "is_in_roadmap", :default => true, :null => false - t.integer "fields_bits", :default => 0 - end - - create_table "user_actions", :force => true do |t| - t.integer "user_id" - t.string "action_type" - t.integer "action_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_activities", :force => true do |t| - t.string "act_type" - t.integer "act_id" - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "user_id" - end - - create_table "user_extensions", :force => true do |t| - t.integer "user_id", :null => false - t.date "birthday" - t.string "brief_introduction" - t.integer "gender" - t.string "location" - t.string "occupation" - t.integer "work_experience" - t.integer "zip_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "technical_title" - t.integer "identity" - t.string "student_id" - t.string "teacher_realname" - t.string "student_realname" - t.string "location_city" - t.integer "school_id" - t.string "description", :default => "" - end - - create_table "user_feedback_messages", :force => true do |t| - t.integer "user_id" - t.integer "journals_for_message_id" - t.string "journals_for_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_grades", :force => true do |t| - t.integer "user_id", :null => false - t.integer "project_id", :null => false - t.float "grade", :default => 0.0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" - add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" - add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" - - create_table "user_levels", :force => true do |t| - t.integer "user_id" - t.integer "level" - end - - create_table "user_preferences", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.text "others" - t.boolean "hide_mail", :default => false - t.string "time_zone" - end - - add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" - - create_table "user_score_details", :force => true do |t| - t.integer "current_user_id" - t.integer "target_user_id" - t.string "score_type" - t.string "score_action" - t.integer "user_id" - t.integer "old_score" - t.integer "new_score" - t.integer "current_user_level" - t.integer "target_user_level" - t.integer "score_changeable_obj_id" - t.string "score_changeable_obj_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_scores", :force => true do |t| - t.integer "user_id", :null => false - t.integer "collaboration" - t.integer "influence" - t.integer "skill" - t.integer "active" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "grade", :default => 0.0 - end - - add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" - add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" - add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" - - create_table "user_wechats", :force => true do |t| - t.integer "subscribe" - t.string "openid" - t.string "nickname" - t.integer "sex" - t.string "language" - t.string "city" - t.string "province" - t.string "country" - t.string "headimgurl" - t.string "subscribe_time" - t.string "unionid" - t.string "remark" - t.integer "groupid" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "users", :force => true do |t| - t.string "login", :default => "", :null => false - t.string "hashed_password", :limit => 40, :default => "", :null => false - t.string "firstname", :limit => 30, :default => "", :null => false - t.string "lastname", :default => "", :null => false - t.string "mail", :limit => 60, :default => "", :null => false - t.boolean "admin", :default => false, :null => false - t.integer "status", :default => 1, :null => false - t.datetime "last_login_on" - t.string "language", :limit => 5, :default => "" - t.integer "auth_source_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "type" - t.string "identity_url" - t.string "mail_notification", :default => "", :null => false - t.string "salt", :limit => 64 - t.integer "gid" - t.integer "visits", :default => 0 - end - - add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" - add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" - add_index "users", ["type"], :name => "index_users_on_type" - - create_table "versions", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :default => "", :null => false - t.string "description", :default => "" - t.date "effective_date" - t.datetime "created_on" - t.datetime "updated_on" - t.string "wiki_page_title" - t.string "status", :default => "open" - t.string "sharing", :default => "none", :null => false - end - - add_index "versions", ["project_id"], :name => "versions_project_id" - add_index "versions", ["sharing"], :name => "index_versions_on_sharing" - - create_table "visitors", :force => true do |t| - t.integer "user_id" - t.integer "master_id" - t.datetime "updated_on" - t.datetime "created_on" - end - - add_index "visitors", ["master_id"], :name => "index_visitors_master_id" - add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" - add_index "visitors", ["user_id"], :name => "index_visitors_user_id" - - create_table "watchers", :force => true do |t| - t.string "watchable_type", :default => "", :null => false - t.integer "watchable_id", :default => 0, :null => false - t.integer "user_id" - end - - add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" - add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" - add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" - - create_table "web_footer_companies", :force => true do |t| - t.string "name" - t.string "logo_size" - t.string "url" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "web_footer_oranizers", :force => true do |t| - t.string "name" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "wechat_logs", :force => true do |t| - t.string "openid", :null => false - t.text "request_raw" - t.text "response_raw" - t.text "session_raw" - t.datetime "created_at", :null => false - end - - create_table "wiki_content_versions", :force => true do |t| - t.integer "wiki_content_id", :null => false - t.integer "page_id", :null => false - t.integer "author_id" - t.binary "data", :limit => 2147483647 - t.string "compression", :limit => 6, :default => "" - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" - add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" - - create_table "wiki_contents", :force => true do |t| - t.integer "page_id", :null => false - t.integer "author_id" - t.text "text", :limit => 2147483647 - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" - add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" - - create_table "wiki_pages", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title", :null => false - t.datetime "created_on", :null => false - t.boolean "protected", :default => false, :null => false - t.integer "parent_id" - end - - add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" - add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" - add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" - - create_table "wiki_redirects", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title" - t.string "redirects_to" - t.datetime "created_on", :null => false - end - - add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" - add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" - - create_table "wikis", :force => true do |t| - t.integer "project_id", :null => false - t.string "start_page", :null => false - t.integer "status", :default => 1, :null => false - end - - add_index "wikis", ["project_id"], :name => "wikis_project_id" - - create_table "workflows", :force => true do |t| - t.integer "tracker_id", :default => 0, :null => false - t.integer "old_status_id", :default => 0, :null => false - t.integer "new_status_id", :default => 0, :null => false - t.integer "role_id", :default => 0, :null => false - t.boolean "assignee", :default => false, :null => false - t.boolean "author", :default => false, :null => false - t.string "type", :limit => 30 - t.string "field_name", :limit => 30 - t.string "rule", :limit => 30 - end - - add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" - add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" - add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" - add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" - - create_table "works_categories", :force => true do |t| - t.string "category" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "zip_packs", :force => true do |t| - t.integer "user_id" - t.integer "homework_id" - t.string "file_digest" - t.string "file_path" - t.integer "pack_times", :default => 1 - t.integer "pack_size", :default => 0 - t.text "file_digests" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - -end +# encoding: UTF-8 +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended to check this file into your version control system. + +ActiveRecord::Schema.define(:version => 20160317090350) do + + create_table "activities", :force => true do |t| + t.integer "act_id", :null => false + t.string "act_type", :null => false + t.integer "user_id", :null => false + t.integer "activity_container_id" + t.string "activity_container_type", :default => "" + t.datetime "created_at" + end + + add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" + add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" + add_index "activities", ["user_id"], :name => "index_activities_on_user_id" + + create_table "activity_notifies", :force => true do |t| + t.integer "activity_container_id" + t.string "activity_container_type" + t.integer "activity_id" + t.string "activity_type" + t.integer "notify_to" + t.datetime "created_on" + t.integer "is_read" + end + + add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" + add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" + add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" + + create_table "api_keys", :force => true do |t| + t.string "access_token" + t.datetime "expires_at" + t.integer "user_id" + t.boolean "active", :default => true + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" + add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" + + create_table "applied_projects", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + end + + create_table "apply_project_masters", :force => true do |t| + t.integer "user_id" + t.string "apply_type" + t.integer "apply_id" + t.integer "status" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "at_messages", :force => true do |t| + t.integer "user_id" + t.integer "at_message_id" + t.string "at_message_type" + t.boolean "viewed", :default => false + t.string "container_type" + t.integer "container_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sender_id" + end + + add_index "at_messages", ["user_id"], :name => "index_at_messages_on_user_id" + + create_table "attachment_histories", :force => true do |t| + t.integer "container_id" + t.string "container_type" + t.string "filename", :default => "" + t.string "disk_filename", :default => "" + t.integer "filesize", :default => 0 + t.string "content_type", :default => "" + t.string "digest", :limit => 40, :default => "" + t.integer "downloads", :default => 0 + t.integer "author_id" + t.datetime "created_on" + t.string "description" + t.string "disk_directory" + t.integer "attachtype" + t.integer "is_public" + t.integer "copy_from" + t.integer "quotes" + t.integer "version" + t.integer "attachment_id" + t.integer "is_publish", :default => 1 + t.date "publish_time" + end + + create_table "attachments", :force => true do |t| + t.integer "container_id" + t.string "container_type", :limit => 30 + t.string "filename", :default => "", :null => false + t.string "disk_filename", :default => "", :null => false + t.integer "filesize", :default => 0, :null => false + t.string "content_type", :default => "" + t.string "digest", :limit => 40, :default => "", :null => false + t.integer "downloads", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false + t.datetime "created_on" + t.string "description" + t.string "disk_directory" + t.integer "attachtype", :default => 1 + t.integer "is_public", :default => 1 + t.integer "copy_from" + t.integer "quotes" + t.integer "is_publish", :default => 1 + t.date "publish_time" + end + + add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" + add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" + add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" + + create_table "attachmentstypes", :force => true do |t| + t.integer "typeId", :null => false + t.string "typeName", :limit => 50 + end + + create_table "auth_sources", :force => true do |t| + t.string "type", :limit => 30, :default => "", :null => false + t.string "name", :limit => 60, :default => "", :null => false + t.string "host", :limit => 60 + t.integer "port" + t.string "account" + t.string "account_password", :default => "" + t.string "base_dn" + t.string "attr_login", :limit => 30 + t.string "attr_firstname", :limit => 30 + t.string "attr_lastname", :limit => 30 + t.string "attr_mail", :limit => 30 + t.boolean "onthefly_register", :default => false, :null => false + t.boolean "tls", :default => false, :null => false + t.string "filter" + t.integer "timeout" + end + + add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" + + create_table "biding_projects", :force => true do |t| + t.integer "project_id" + t.integer "bid_id" + t.integer "user_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + end + + create_table "bids", :force => true do |t| + t.string "name" + t.string "budget", :null => false + t.integer "author_id" + t.date "deadline" + t.text "description" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.integer "commit" + t.integer "reward_type" + t.integer "homework_type" + t.integer "parent_id" + t.string "password" + t.integer "is_evaluation" + t.integer "proportion", :default => 60 + t.integer "comment_status", :default => 0 + t.integer "evaluation_num", :default => 3 + t.integer "open_anonymous_evaluation", :default => 1 + end + + create_table "blog_comments", :force => true do |t| + t.integer "blog_id", :null => false + t.integer "parent_id" + t.string "title", :default => "", :null => false + t.text "content" + t.integer "author_id" + t.integer "comments_count", :default => 0, :null => false + t.integer "last_comment_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.boolean "locked", :default => false + t.integer "sticky", :default => 0 + t.integer "reply_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "blogs", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "description" + t.integer "position", :default => 1 + t.integer "article_count", :default => 0, :null => false + t.integer "comments_count", :default => 0, :null => false + t.integer "last_comments_id" + t.integer "parent_id" + t.integer "author_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "homepage_id" + end + + create_table "boards", :force => true do |t| + t.integer "project_id", :null => false + t.string "name", :default => "", :null => false + t.string "description" + t.integer "position", :default => 1 + t.integer "topics_count", :default => 0, :null => false + t.integer "messages_count", :default => 0, :null => false + t.integer "last_message_id" + t.integer "parent_id" + t.integer "course_id" + t.integer "org_subfield_id" + end + + add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" + add_index "boards", ["project_id"], :name => "boards_project_id" + + create_table "bug_to_osps", :force => true do |t| + t.integer "osp_id" + t.integer "relative_memo_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "changes", :force => true do |t| + t.integer "changeset_id", :null => false + t.string "action", :limit => 1, :default => "", :null => false + t.text "path", :null => false + t.text "from_path" + t.string "from_revision" + t.string "revision" + t.string "branch" + end + + add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" + + create_table "changeset_parents", :id => false, :force => true do |t| + t.integer "changeset_id", :null => false + t.integer "parent_id", :null => false + end + + add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" + add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" + + create_table "changesets", :force => true do |t| + t.integer "repository_id", :null => false + t.string "revision", :null => false + t.string "committer" + t.datetime "committed_on", :null => false + t.text "comments" + t.date "commit_date" + t.string "scmid" + t.integer "user_id" + end + + add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" + add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true + add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" + add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" + add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" + + create_table "changesets_issues", :id => false, :force => true do |t| + t.integer "changeset_id", :null => false + t.integer "issue_id", :null => false + end + + add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true + + create_table "code_review_assignments", :force => true do |t| + t.integer "issue_id" + t.integer "change_id" + t.integer "attachment_id" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.string "action_type" + t.integer "changeset_id" + end + + create_table "code_review_project_settings", :force => true do |t| + t.integer "project_id" + t.integer "tracker_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "updated_by" + t.boolean "hide_code_review_tab", :default => false + t.integer "auto_relation", :default => 1 + t.integer "assignment_tracker_id" + t.text "auto_assign" + t.integer "lock_version", :default => 0, :null => false + t.boolean "tracker_in_review_dialog", :default => false + end + + create_table "code_review_user_settings", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.integer "mail_notification", :default => 0, :null => false + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "code_reviews", :force => true do |t| + t.integer "project_id" + t.integer "change_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "line" + t.integer "updated_by_id" + t.integer "lock_version", :default => 0, :null => false + t.integer "status_changed_from" + t.integer "status_changed_to" + t.integer "issue_id" + t.string "action_type" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.integer "attachment_id" + t.integer "file_count", :default => 0, :null => false + t.boolean "diff_all" + end + + create_table "comments", :force => true do |t| + t.string "commented_type", :limit => 30, :default => "", :null => false + t.integer "commented_id", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false + t.text "comments" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + add_index "comments", ["author_id"], :name => "index_comments_on_author_id" + add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" + + create_table "contest_notifications", :force => true do |t| + t.text "title" + t.text "content" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "contesting_projects", :force => true do |t| + t.integer "project_id" + t.string "contest_id" + t.integer "user_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + end + + create_table "contesting_softapplications", :force => true do |t| + t.integer "softapplication_id" + t.integer "contest_id" + t.integer "user_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + end + + create_table "contestnotifications", :force => true do |t| + t.integer "contest_id" + t.string "title" + t.string "summary" + t.text "description" + t.integer "author_id" + t.integer "notificationcomments_count" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "contests", :force => true do |t| + t.string "name" + t.string "budget", :default => "" + t.integer "author_id" + t.date "deadline" + t.string "description" + t.integer "commit" + t.string "password" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + create_table "course_activities", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "course_act_id" + t.string "course_act_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_attachments", :force => true do |t| + t.string "filename" + t.string "disk_filename" + t.integer "filesize" + t.string "content_type" + t.string "digest" + t.integer "downloads" + t.string "author_id" + t.string "integer" + t.string "description" + t.string "disk_directory" + t.integer "attachtype" + t.integer "is_public" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "container_id", :default => 0 + end + + create_table "course_contributor_scores", :force => true do |t| + t.integer "course_id" + t.integer "user_id" + t.integer "message_num" + t.integer "message_reply_num" + t.integer "news_reply_num" + t.integer "resource_num" + t.integer "journal_num" + t.integer "journal_reply_num" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "total_score" + t.integer "homework_journal_num", :default => 0 + t.integer "news_num", :default => 0 + end + + create_table "course_groups", :force => true do |t| + t.string "name" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_infos", :force => true do |t| + t.integer "course_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_messages", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "course_message_id" + t.string "course_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "content" + t.integer "status" + end + + create_table "course_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "course_id" + t.float "grade", :default => 0.0 + t.integer "course_ac_para", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "courses", :force => true do |t| + t.integer "tea_id" + t.string "name" + t.integer "state" + t.string "code" + t.integer "time" + t.string "extra" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "location" + t.string "term" + t.string "string" + t.string "password" + t.string "setup_time" + t.string "endup_time" + t.string "class_period" + t.integer "school_id" + t.text "description" + t.integer "status", :default => 1 + t.integer "attachmenttype", :default => 2 + t.integer "lft" + t.integer "rgt" + t.integer "is_public", :limit => 1, :default => 1 + t.integer "inherit_members", :limit => 1, :default => 1 + t.integer "open_student", :default => 0 + t.integer "outline", :default => 0 + t.integer "publish_resource", :default => 0 + t.integer "is_delete", :default => 0 + t.integer "end_time" + t.string "end_term" + t.integer "is_excellent", :default => 0 + t.integer "excellent_option", :default => 0 + t.integer "is_copy", :default => 0 + t.integer "visits", :default => 0 + end + + create_table "custom_fields", :force => true do |t| + t.string "type", :limit => 30, :default => "", :null => false + t.string "name", :limit => 30, :default => "", :null => false + t.string "field_format", :limit => 30, :default => "", :null => false + t.text "possible_values" + t.string "regexp", :default => "" + t.integer "min_length", :default => 0, :null => false + t.integer "max_length", :default => 0, :null => false + t.boolean "is_required", :default => false, :null => false + t.boolean "is_for_all", :default => false, :null => false + t.boolean "is_filter", :default => false, :null => false + t.integer "position", :default => 1 + t.boolean "searchable", :default => false + t.text "default_value" + t.boolean "editable", :default => true + t.boolean "visible", :default => true, :null => false + t.boolean "multiple", :default => false + end + + add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" + + create_table "custom_fields_projects", :id => false, :force => true do |t| + t.integer "custom_field_id", :default => 0, :null => false + t.integer "project_id", :default => 0, :null => false + end + + add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true + + create_table "custom_fields_trackers", :id => false, :force => true do |t| + t.integer "custom_field_id", :default => 0, :null => false + t.integer "tracker_id", :default => 0, :null => false + end + + add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true + + create_table "custom_values", :force => true do |t| + t.string "customized_type", :limit => 30, :default => "", :null => false + t.integer "customized_id", :default => 0, :null => false + t.integer "custom_field_id", :default => 0, :null => false + t.text "value" + end + + add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" + add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" + + create_table "delayed_jobs", :force => true do |t| + t.integer "priority", :default => 0, :null => false + t.integer "attempts", :default => 0, :null => false + t.text "handler", :null => false + t.text "last_error" + t.datetime "run_at" + t.datetime "locked_at" + t.datetime "failed_at" + t.string "locked_by" + t.string "queue" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" + + create_table "discuss_demos", :force => true do |t| + t.string "title" + t.text "body" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "documents", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.integer "category_id", :default => 0, :null => false + t.string "title", :limit => 60, :default => "", :null => false + t.text "description" + t.datetime "created_on" + t.integer "user_id", :default => 0 + t.integer "is_public", :default => 1 + end + + add_index "documents", ["category_id"], :name => "index_documents_on_category_id" + add_index "documents", ["created_on"], :name => "index_documents_on_created_on" + add_index "documents", ["project_id"], :name => "documents_project_id" + + create_table "dts", :primary_key => "Num", :force => true do |t| + t.string "Defect", :limit => 50 + t.string "Category", :limit => 50 + t.string "File" + t.string "Method" + t.string "Module", :limit => 20 + t.string "Variable", :limit => 50 + t.integer "StartLine" + t.integer "IPLine" + t.string "IPLineCode", :limit => 200 + t.string "Judge", :limit => 15 + t.integer "Review", :limit => 1 + t.string "Description" + t.text "PreConditions", :limit => 2147483647 + t.text "TraceInfo", :limit => 2147483647 + t.text "Code", :limit => 2147483647 + t.integer "project_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "id", :null => false + end + + create_table "editor_of_documents", :force => true do |t| + t.integer "editor_id" + t.integer "org_document_comment_id" + t.datetime "created_at" + end + + create_table "enabled_modules", :force => true do |t| + t.integer "project_id" + t.string "name", :null => false + t.integer "course_id" + end + + add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" + + create_table "enumerations", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "is_default", :default => false, :null => false + t.string "type" + t.boolean "active", :default => true, :null => false + t.integer "project_id" + t.integer "parent_id" + t.string "position_name", :limit => 30 + end + + add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" + add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" + + create_table "exercise_answers", :force => true do |t| + t.integer "user_id" + t.integer "exercise_question_id" + t.integer "exercise_choice_id" + t.text "answer_text" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "exercise_choices", :force => true do |t| + t.integer "exercise_question_id" + t.text "choice_text" + t.integer "choice_position" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "exercise_questions", :force => true do |t| + t.text "question_title" + t.integer "question_type" + t.integer "question_number" + t.integer "exercise_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "question_score" + end + + create_table "exercise_standard_answers", :force => true do |t| + t.integer "exercise_question_id" + t.integer "exercise_choice_id" + t.text "answer_text" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "exercise_users", :force => true do |t| + t.integer "user_id" + t.integer "exercise_id" + t.integer "score" + t.datetime "start_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.datetime "end_at" + t.integer "status" + end + + create_table "exercises", :force => true do |t| + t.text "exercise_name" + t.text "exercise_description" + t.integer "course_id" + t.integer "exercise_status" + t.integer "user_id" + t.integer "time" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.datetime "publish_time" + t.datetime "end_time" + t.integer "show_result" + end + + create_table "first_pages", :force => true do |t| + t.string "web_title" + t.string "title" + t.text "description" + t.string "page_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sort_type" + t.integer "image_width", :default => 107 + t.integer "image_height", :default => 63 + t.integer "show_course", :default => 1 + t.integer "show_contest", :default => 1 + end + + create_table "forge_activities", :force => true do |t| + t.integer "user_id" + t.integer "project_id" + t.integer "forge_act_id" + t.string "forge_act_type" + t.integer "org_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" + + create_table "forge_messages", :force => true do |t| + t.integer "user_id" + t.integer "project_id" + t.integer "forge_message_id" + t.string "forge_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "secret_key" + t.integer "status" + end + + create_table "forums", :force => true do |t| + t.string "name", :null => false + t.text "description" + t.integer "topic_count", :default => 0 + t.integer "memo_count", :default => 0 + t.integer "last_memo_id", :default => 0 + t.integer "creator_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sticky" + t.integer "locked" + end + + create_table "forwards", :force => true do |t| + t.integer "from_id" + t.string "from_type" + t.integer "to_id" + t.string "to_type" + t.datetime "created_at" + end + + create_table "groups_users", :id => false, :force => true do |t| + t.integer "group_id", :null => false + t.integer "user_id", :null => false + end + + add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true + + create_table "homework_attaches", :force => true do |t| + t.integer "bid_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + t.string "name" + t.text "description" + t.integer "state" + t.integer "project_id", :default => 0 + t.float "score", :default => 0.0 + t.integer "is_teacher_score", :default => 0 + end + + add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" + + create_table "homework_commons", :force => true do |t| + t.string "name" + t.integer "user_id" + t.text "description" + t.date "publish_time" + t.date "end_time" + t.integer "homework_type", :default => 1 + t.string "late_penalty" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "teacher_priority", :default => 1 + t.integer "anonymous_comment", :default => 0 + t.integer "quotes", :default => 0 + t.integer "is_open", :default => 0 + end + + add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id" + + create_table "homework_detail_groups", :force => true do |t| + t.integer "homework_common_id" + t.integer "min_num" + t.integer "max_num" + t.integer "base_on_project" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "homework_detail_groups", ["homework_common_id"], :name => "index_homework_detail_groups_on_homework_common_id" + + create_table "homework_detail_manuals", :force => true do |t| + t.float "ta_proportion" + t.integer "comment_status" + t.date "evaluation_start" + t.date "evaluation_end" + t.integer "evaluation_num" + t.integer "absence_penalty", :default => 1 + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "homework_detail_programings", :force => true do |t| + t.string "language" + t.text "standard_code", :limit => 2147483647 + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "ta_proportion", :default => 0.1 + t.integer "question_id" + end + + create_table "homework_evaluations", :force => true do |t| + t.string "user_id" + t.string "homework_attach_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "homework_for_courses", :force => true do |t| + t.integer "course_id" + t.integer "bid_id" + end + + add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id" + add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id" + + create_table "homework_tests", :force => true do |t| + t.text "input" + t.text "output" + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "result" + t.text "error_msg" + end + + create_table "homework_users", :force => true do |t| + t.string "homework_attach_id" + t.string "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "invite_lists", :force => true do |t| + t.integer "project_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "mail" + end + + create_table "issue_categories", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "name", :limit => 30, :default => "", :null => false + t.integer "assigned_to_id" + end + + add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" + add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" + + create_table "issue_relations", :force => true do |t| + t.integer "issue_from_id", :null => false + t.integer "issue_to_id", :null => false + t.string "relation_type", :default => "", :null => false + t.integer "delay" + end + + add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true + add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" + add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" + + create_table "issue_statuses", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.boolean "is_closed", :default => false, :null => false + t.boolean "is_default", :default => false, :null => false + t.integer "position", :default => 1 + t.integer "default_done_ratio" + end + + add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" + add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" + add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" + + create_table "issues", :force => true do |t| + t.integer "tracker_id", :null => false + t.integer "project_id", :null => false + t.string "subject", :default => "", :null => false + t.text "description" + t.date "due_date" + t.integer "category_id" + t.integer "status_id", :null => false + t.integer "assigned_to_id" + t.integer "priority_id", :null => false + t.integer "fixed_version_id" + t.integer "author_id", :null => false + t.integer "lock_version", :default => 0, :null => false + t.datetime "created_on" + t.datetime "updated_on" + t.date "start_date" + t.integer "done_ratio", :default => 0, :null => false + t.float "estimated_hours" + t.integer "parent_id" + t.integer "root_id" + t.integer "lft" + t.integer "rgt" + t.boolean "is_private", :default => false, :null => false + t.datetime "closed_on" + t.integer "project_issues_index" + end + + add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" + add_index "issues", ["author_id"], :name => "index_issues_on_author_id" + add_index "issues", ["category_id"], :name => "index_issues_on_category_id" + add_index "issues", ["created_on"], :name => "index_issues_on_created_on" + add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" + add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" + add_index "issues", ["project_id"], :name => "issues_project_id" + add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" + add_index "issues", ["status_id"], :name => "index_issues_on_status_id" + add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" + + create_table "join_in_competitions", :force => true do |t| + t.integer "user_id" + t.integer "competition_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "join_in_contests", :force => true do |t| + t.integer "user_id" + t.integer "bid_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "journal_details", :force => true do |t| + t.integer "journal_id", :default => 0, :null => false + t.string "property", :limit => 30, :default => "", :null => false + t.string "prop_key", :limit => 30, :default => "", :null => false + t.text "old_value" + t.text "value" + end + + add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" + + create_table "journal_replies", :id => false, :force => true do |t| + t.integer "journal_id" + t.integer "user_id" + t.integer "reply_id" + end + + add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" + add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" + add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" + + create_table "journals", :force => true do |t| + t.integer "journalized_id", :default => 0, :null => false + t.string "journalized_type", :limit => 30, :default => "", :null => false + t.integer "user_id", :default => 0, :null => false + t.text "notes" + t.datetime "created_on", :null => false + t.boolean "private_notes", :default => false, :null => false + end + + add_index "journals", ["created_on"], :name => "index_journals_on_created_on" + add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" + add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" + add_index "journals", ["user_id"], :name => "index_journals_on_user_id" + + create_table "journals_for_messages", :force => true do |t| + t.integer "jour_id" + t.string "jour_type" + t.integer "user_id" + t.text "notes" + t.integer "status" + t.integer "reply_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.string "m_parent_id" + t.boolean "is_readed" + t.integer "m_reply_count" + t.integer "m_reply_id" + t.integer "is_comprehensive_evaluation" + t.integer "private", :default => 0 + end + + create_table "kindeditor_assets", :force => true do |t| + t.string "asset" + t.integer "file_size" + t.string "file_type" + t.integer "owner_id" + t.string "asset_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "owner_type", :default => 0 + end + + create_table "member_roles", :force => true do |t| + t.integer "member_id", :null => false + t.integer "role_id", :null => false + t.integer "inherited_from" + end + + add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" + add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" + + create_table "members", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.integer "project_id", :default => 0 + t.datetime "created_on" + t.boolean "mail_notification", :default => false, :null => false + t.integer "course_id", :default => -1 + t.integer "course_group_id", :default => 0 + end + + add_index "members", ["project_id"], :name => "index_members_on_project_id" + add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true + add_index "members", ["user_id"], :name => "index_members_on_user_id" + + create_table "memo_messages", :force => true do |t| + t.integer "user_id" + t.integer "forum_id" + t.integer "memo_id" + t.string "memo_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "memos", :force => true do |t| + t.integer "forum_id", :null => false + t.integer "parent_id" + t.string "subject", :null => false + t.text "content", :null => false + t.integer "author_id", :null => false + t.integer "replies_count", :default => 0 + t.integer "last_reply_id" + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count", :default => 0 + end + + create_table "message_alls", :force => true do |t| + t.integer "user_id" + t.integer "message_id" + t.string "message_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "messages", :force => true do |t| + t.integer "board_id", :null => false + t.integer "parent_id" + t.string "subject", :default => "", :null => false + t.text "content" + t.integer "author_id" + t.integer "replies_count", :default => 0, :null => false + t.integer "last_reply_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.boolean "locked", :default => false + t.integer "sticky", :default => 0 + t.integer "reply_id" + t.integer "quotes" + t.integer "status", :default => 0 + end + + add_index "messages", ["author_id"], :name => "index_messages_on_author_id" + add_index "messages", ["board_id"], :name => "messages_board_id" + add_index "messages", ["created_on"], :name => "index_messages_on_created_on" + add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" + add_index "messages", ["parent_id"], :name => "messages_parent_id" + + create_table "news", :force => true do |t| + t.integer "project_id" + t.string "title", :limit => 60, :default => "", :null => false + t.string "summary", :default => "" + t.text "description" + t.integer "author_id", :default => 0, :null => false + t.datetime "created_on" + t.integer "comments_count", :default => 0, :null => false + t.integer "course_id" + t.integer "sticky", :default => 0 + t.integer "org_subfield_id" + end + + add_index "news", ["author_id"], :name => "index_news_on_author_id" + add_index "news", ["created_on"], :name => "index_news_on_created_on" + add_index "news", ["project_id"], :name => "news_project_id" + + create_table "no_uses", :force => true do |t| + t.integer "user_id", :null => false + t.string "no_use_type" + t.integer "no_use_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "notificationcomments", :force => true do |t| + t.string "notificationcommented_type" + t.integer "notificationcommented_id" + t.integer "author_id" + t.text "notificationcomments" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "onclick_times", :force => true do |t| + t.integer "user_id" + t.datetime "onclick_time" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "open_id_authentication_associations", :force => true do |t| + t.integer "issued" + t.integer "lifetime" + t.string "handle" + t.string "assoc_type" + t.binary "server_url" + t.binary "secret" + end + + create_table "open_id_authentication_nonces", :force => true do |t| + t.integer "timestamp", :null => false + t.string "server_url" + t.string "salt", :null => false + end + + create_table "open_source_projects", :force => true do |t| + t.string "name" + t.text "description" + t.integer "commit_count", :default => 0 + t.integer "code_line", :default => 0 + t.integer "users_count", :default => 0 + t.date "last_commit_time" + t.string "url" + t.date "date_collected" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "option_numbers", :force => true do |t| + t.integer "user_id" + t.integer "memo" + t.integer "messages_for_issues" + t.integer "issues_status" + t.integer "replay_for_message" + t.integer "replay_for_memo" + t.integer "follow" + t.integer "tread" + t.integer "praise_by_one" + t.integer "praise_by_two" + t.integer "praise_by_three" + t.integer "tread_by_one" + t.integer "tread_by_two" + t.integer "tread_by_three" + t.integer "changeset" + t.integer "document" + t.integer "attachment" + t.integer "issue_done_ratio" + t.integer "post_issue" + t.integer "score_type" + t.integer "total_score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "project_id" + end + + create_table "org_activities", :force => true do |t| + t.integer "user_id" + t.integer "org_act_id" + t.string "org_act_type" + t.integer "container_id" + t.string "container_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "org_courses", :force => true do |t| + t.integer "organization_id" + t.integer "course_id" + t.datetime "created_at" + end + + create_table "org_document_comments", :force => true do |t| + t.text "title" + t.text "content" + t.integer "organization_id" + t.integer "creator_id" + t.integer "parent_id" + t.integer "reply_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.boolean "locked", :default => false + t.integer "sticky", :default => 0 + t.integer "org_subfield_id" + end + + create_table "org_member_roles", :force => true do |t| + t.integer "org_member_id" + t.integer "role_id" + end + + create_table "org_members", :force => true do |t| + t.integer "user_id" + t.integer "organization_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "org_messages", :force => true do |t| + t.integer "user_id" + t.integer "sender_id" + t.integer "organization_id" + t.string "message_type" + t.integer "message_id" + t.integer "viewed" + t.string "content" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "status", :default => 0 + end + + create_table "org_projects", :force => true do |t| + t.integer "organization_id" + t.integer "project_id" + t.datetime "created_at" + end + + create_table "org_subfield_messages", :force => true do |t| + t.integer "org_subfield_id" + t.integer "message_id" + t.string "message_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "org_subfields", :force => true do |t| + t.integer "organization_id" + t.integer "priority" + t.string "name" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "field_type" + t.integer "hide", :default => 0 + end + + create_table "organizations", :force => true do |t| + t.string "name" + t.text "description" + t.integer "creator_id" + t.integer "home_id" + t.boolean "is_public" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.boolean "allow_guest_download", :default => true + t.integer "visits", :default => 0 + end + + create_table "phone_app_versions", :force => true do |t| + t.string "version" + t.text "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_answers", :force => true do |t| + t.integer "poll_question_id" + t.text "answer_text" + t.integer "answer_position" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_questions", :force => true do |t| + t.string "question_title" + t.integer "question_type" + t.integer "is_necessary" + t.integer "poll_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "question_number" + end + + create_table "poll_users", :force => true do |t| + t.integer "user_id" + t.integer "poll_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_votes", :force => true do |t| + t.integer "user_id" + t.integer "poll_question_id" + t.integer "poll_answer_id" + t.text "vote_text" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "polls", :force => true do |t| + t.string "polls_name" + t.string "polls_type" + t.integer "polls_group_id" + t.integer "polls_status" + t.integer "user_id" + t.datetime "published_at" + t.datetime "closed_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "polls_description" + t.integer "show_result", :default => 1 + end + + create_table "praise_tread_caches", :force => true do |t| + t.integer "object_id", :null => false + t.string "object_type" + t.integer "praise_num" + t.integer "tread_num" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "praise_treads", :force => true do |t| + t.integer "user_id", :null => false + t.integer "praise_tread_object_id" + t.string "praise_tread_object_type" + t.integer "praise_or_tread" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "principal_activities", :force => true do |t| + t.integer "user_id" + t.integer "principal_id" + t.integer "principal_act_id" + t.string "principal_act_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "project_infos", :force => true do |t| + t.integer "project_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "project_scores", :force => true do |t| + t.string "project_id" + t.integer "score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "issue_num", :default => 0 + t.integer "issue_journal_num", :default => 0 + t.integer "news_num", :default => 0 + t.integer "documents_num", :default => 0 + t.integer "changeset_num", :default => 0 + t.integer "board_message_num", :default => 0 + t.integer "board_num", :default => 0 + t.integer "attach_num", :default => 0 + t.datetime "commit_time" + end + + create_table "project_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "project_id" + t.integer "project_type" + t.float "grade", :default => 0.0 + t.integer "course_ac_para", :default => 0 + end + + add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" + + create_table "projecting_softapplictions", :force => true do |t| + t.integer "user_id" + t.integer "softapplication_id" + t.integer "project_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "projects", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "description" + t.string "homepage", :default => "" + t.boolean "is_public", :default => true, :null => false + t.integer "parent_id" + t.datetime "created_on" + t.datetime "updated_on" + t.string "identifier" + t.integer "status", :default => 1, :null => false + t.integer "lft" + t.integer "rgt" + t.boolean "inherit_members", :default => false, :null => false + t.integer "project_type" + t.boolean "hidden_repo", :default => false, :null => false + t.integer "attachmenttype", :default => 1 + t.integer "user_id" + t.integer "dts_test", :default => 0 + t.string "enterprise_name" + t.integer "organization_id" + t.integer "project_new_type" + t.integer "gpid" + t.integer "forked_from_project_id" + t.integer "forked_count" + t.integer "commits_count", :default => 0 + t.integer "publish_resource", :default => 0 + t.integer "issues_count", :default => 0 + t.integer "attachments_count", :default => 0 + t.integer "boards_count", :default => 0 + t.integer "news_count", :default => 0 + t.integer "acts_count", :default => 0 + t.integer "journals_count", :default => 0 + t.integer "boards_reply_count", :default => 0 + t.integer "visits", :default => 0 + end + + add_index "projects", ["lft"], :name => "index_projects_on_lft" + add_index "projects", ["rgt"], :name => "index_projects_on_rgt" + + create_table "projects_trackers", :id => false, :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.integer "tracker_id", :default => 0, :null => false + end + + add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true + add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" + + create_table "queries", :force => true do |t| + t.integer "project_id" + t.string "name", :default => "", :null => false + t.text "filters" + t.integer "user_id", :default => 0, :null => false + t.boolean "is_public", :default => false, :null => false + t.text "column_names" + t.text "sort_criteria" + t.string "group_by" + t.string "type" + end + + add_index "queries", ["project_id"], :name => "index_queries_on_project_id" + add_index "queries", ["user_id"], :name => "index_queries_on_user_id" + + create_table "relative_memo_to_open_source_projects", :force => true do |t| + t.integer "osp_id" + t.integer "relative_memo_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "relative_memos", :force => true do |t| + t.integer "osp_id" + t.integer "parent_id" + t.string "subject", :null => false + t.text "content", :limit => 16777215, :null => false + t.integer "author_id" + t.integer "replies_count", :default => 0 + t.integer "last_reply_id" + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.boolean "is_quote", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count_crawl", :default => 0 + t.integer "viewed_count_local", :default => 0 + t.string "url" + t.string "username" + t.string "userhomeurl" + t.date "date_collected" + t.string "topic_resource" + end + + create_table "repositories", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "url", :default => "", :null => false + t.string "login", :limit => 60, :default => "" + t.string "password", :default => "" + t.string "root_url", :default => "" + t.string "type" + t.string "path_encoding", :limit => 64 + t.string "log_encoding", :limit => 64 + t.text "extra_info" + t.string "identifier" + t.boolean "is_default", :default => false + t.boolean "hidden", :default => false + end + + add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" + + create_table "rich_rich_files", :force => true do |t| + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "rich_file_file_name" + t.string "rich_file_content_type" + t.integer "rich_file_file_size" + t.datetime "rich_file_updated_at" + t.string "owner_type" + t.integer "owner_id" + t.text "uri_cache" + t.string "simplified_type", :default => "file" + end + + create_table "roles", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "assignable", :default => true + t.integer "builtin", :default => 0, :null => false + t.text "permissions" + t.string "issues_visibility", :limit => 30, :default => "default", :null => false + end + + create_table "schools", :force => true do |t| + t.string "name" + t.string "province" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "logo_link" + t.string "pinyin" + end + + create_table "secdomains", :force => true do |t| + t.integer "sub_type" + t.string "subname" + t.integer "pid", :default => 0 + t.string "desc" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "seems_rateable_cached_ratings", :force => true do |t| + t.integer "cacheable_id", :limit => 8 + t.string "cacheable_type" + t.float "avg", :null => false + t.integer "cnt", :null => false + t.string "dimension" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "seems_rateable_rates", :force => true do |t| + t.integer "rater_id", :limit => 8 + t.integer "rateable_id" + t.string "rateable_type" + t.float "stars", :null => false + t.string "dimension" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "is_teacher_score", :default => 0 + end + + create_table "settings", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "value" + t.datetime "updated_on" + end + + add_index "settings", ["name"], :name => "index_settings_on_name" + + create_table "shares", :force => true do |t| + t.date "created_on" + t.string "url" + t.string "title" + t.integer "share_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "project_id" + t.integer "user_id" + t.string "description" + end + + create_table "shield_activities", :force => true do |t| + t.string "container_type" + t.integer "container_id" + t.string "shield_type" + t.integer "shield_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "softapplications", :force => true do |t| + t.string "name" + t.text "description" + t.integer "app_type_id" + t.string "app_type_name" + t.string "android_min_version_available" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "contest_id" + t.integer "softapplication_id" + t.integer "is_public" + t.string "application_developers" + t.string "deposit_project_url" + t.string "deposit_project" + t.integer "project_id" + end + + create_table "student_work_projects", :force => true do |t| + t.integer "homework_common_id" + t.integer "student_work_id" + t.integer "project_id" + t.integer "user_id" + t.integer "is_leader" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "student_work_projects", ["homework_common_id"], :name => "index_student_work_projects_on_homework_common_id" + add_index "student_work_projects", ["project_id"], :name => "index_student_work_projects_on_project_id" + add_index "student_work_projects", ["student_work_id"], :name => "index_student_work_projects_on_student_work_id" + add_index "student_work_projects", ["user_id"], :name => "index_student_work_projects_on_user_id" + + create_table "student_work_tests", :force => true do |t| + t.integer "student_work_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "status", :default => 9 + t.text "results" + t.text "src" + end + + create_table "student_works", :force => true do |t| + t.string "name" + t.text "description", :limit => 2147483647 + t.integer "homework_common_id" + t.integer "user_id" + t.float "final_score" + t.float "teacher_score" + t.float "student_score" + t.float "teaching_asistant_score" + t.integer "project_id", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "late_penalty", :default => 0 + t.integer "absence_penalty", :default => 0 + t.float "system_score", :default => 0.0 + t.boolean "is_test", :default => false + end + + add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id" + + create_table "student_works_evaluation_distributions", :force => true do |t| + t.integer "student_work_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "student_works_scores", :force => true do |t| + t.integer "student_work_id" + t.integer "user_id" + t.integer "score" + t.text "comment" + t.integer "reviewer_role" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "students_for_courses", :force => true do |t| + t.integer "student_id" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" + add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" + + create_table "subfield_subdomain_dirs", :force => true do |t| + t.integer "org_subfield_id" + t.string "name" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "system_messages", :force => true do |t| + t.integer "user_id" + t.string "content" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "description" + t.string "subject" + end + + create_table "taggings", :force => true do |t| + t.integer "tag_id" + t.integer "taggable_id" + t.string "taggable_type" + t.integer "tagger_id" + t.string "tagger_type" + t.string "context", :limit => 128 + t.datetime "created_at" + end + + add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" + add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" + add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" + + create_table "tags", :force => true do |t| + t.string "name" + end + + create_table "teachers", :force => true do |t| + t.string "tea_name" + t.string "location" + t.integer "couurse_time" + t.integer "course_code" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "extra" + end + + create_table "time_entries", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + t.integer "issue_id" + t.float "hours", :null => false + t.string "comments" + t.integer "activity_id", :null => false + t.date "spent_on", :null => false + t.integer "tyear", :null => false + t.integer "tmonth", :null => false + t.integer "tweek", :null => false + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" + add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" + add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" + add_index "time_entries", ["project_id"], :name => "time_entries_project_id" + add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" + + create_table "tokens", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.string "action", :limit => 30, :default => "", :null => false + t.string "value", :limit => 40, :default => "", :null => false + t.datetime "created_on", :null => false + end + + add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" + add_index "tokens", ["value"], :name => "tokens_value", :unique => true + + create_table "trackers", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.boolean "is_in_chlog", :default => false, :null => false + t.integer "position", :default => 1 + t.boolean "is_in_roadmap", :default => true, :null => false + t.integer "fields_bits", :default => 0 + end + + create_table "user_actions", :force => true do |t| + t.integer "user_id" + t.string "action_type" + t.integer "action_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_activities", :force => true do |t| + t.string "act_type" + t.integer "act_id" + t.string "container_type" + t.integer "container_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "user_id" + end + + create_table "user_extensions", :force => true do |t| + t.integer "user_id", :null => false + t.date "birthday" + t.string "brief_introduction" + t.integer "gender" + t.string "location" + t.string "occupation" + t.integer "work_experience" + t.integer "zip_code" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "technical_title" + t.integer "identity" + t.string "student_id" + t.string "teacher_realname" + t.string "student_realname" + t.string "location_city" + t.integer "school_id" + t.string "description", :default => "" + end + + create_table "user_feedback_messages", :force => true do |t| + t.integer "user_id" + t.integer "journals_for_message_id" + t.string "journals_for_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_grades", :force => true do |t| + t.integer "user_id", :null => false + t.integer "project_id", :null => false + t.float "grade", :default => 0.0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" + add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" + add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" + + create_table "user_levels", :force => true do |t| + t.integer "user_id" + t.integer "level" + end + + create_table "user_preferences", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.text "others" + t.boolean "hide_mail", :default => false + t.string "time_zone" + end + + add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" + + create_table "user_score_details", :force => true do |t| + t.integer "current_user_id" + t.integer "target_user_id" + t.string "score_type" + t.string "score_action" + t.integer "user_id" + t.integer "old_score" + t.integer "new_score" + t.integer "current_user_level" + t.integer "target_user_level" + t.integer "score_changeable_obj_id" + t.string "score_changeable_obj_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_scores", :force => true do |t| + t.integer "user_id", :null => false + t.integer "collaboration" + t.integer "influence" + t.integer "skill" + t.integer "active" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "grade", :default => 0.0 + end + + add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" + add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" + add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" + + create_table "user_wechats", :force => true do |t| + t.integer "subscribe" + t.string "openid" + t.string "nickname" + t.integer "sex" + t.string "language" + t.string "city" + t.string "province" + t.string "country" + t.string "headimgurl" + t.string "subscribe_time" + t.string "unionid" + t.string "remark" + t.integer "groupid" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "users", :force => true do |t| + t.string "login", :default => "", :null => false + t.string "hashed_password", :limit => 40, :default => "", :null => false + t.string "firstname", :limit => 30, :default => "", :null => false + t.string "lastname", :default => "", :null => false + t.string "mail", :limit => 60, :default => "", :null => false + t.boolean "admin", :default => false, :null => false + t.integer "status", :default => 1, :null => false + t.datetime "last_login_on" + t.string "language", :limit => 5, :default => "" + t.integer "auth_source_id" + t.datetime "created_on" + t.datetime "updated_on" + t.string "type" + t.string "identity_url" + t.string "mail_notification", :default => "", :null => false + t.string "salt", :limit => 64 + t.integer "gid" + t.integer "visits", :default => 0 + end + + add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" + add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" + add_index "users", ["type"], :name => "index_users_on_type" + + create_table "versions", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "name", :default => "", :null => false + t.string "description", :default => "" + t.date "effective_date" + t.datetime "created_on" + t.datetime "updated_on" + t.string "wiki_page_title" + t.string "status", :default => "open" + t.string "sharing", :default => "none", :null => false + end + + add_index "versions", ["project_id"], :name => "versions_project_id" + add_index "versions", ["sharing"], :name => "index_versions_on_sharing" + + create_table "visitors", :force => true do |t| + t.integer "user_id" + t.integer "master_id" + t.datetime "updated_on" + t.datetime "created_on" + end + + add_index "visitors", ["master_id"], :name => "index_visitors_master_id" + add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" + add_index "visitors", ["user_id"], :name => "index_visitors_user_id" + + create_table "watchers", :force => true do |t| + t.string "watchable_type", :default => "", :null => false + t.integer "watchable_id", :default => 0, :null => false + t.integer "user_id" + end + + add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" + add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" + add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" + + create_table "web_footer_companies", :force => true do |t| + t.string "name" + t.string "logo_size" + t.string "url" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "web_footer_oranizers", :force => true do |t| + t.string "name" + t.text "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "wechat_logs", :force => true do |t| + t.string "openid", :null => false + t.text "request_raw" + t.text "response_raw" + t.text "session_raw" + t.datetime "created_at", :null => false + end + + create_table "wiki_content_versions", :force => true do |t| + t.integer "wiki_content_id", :null => false + t.integer "page_id", :null => false + t.integer "author_id" + t.binary "data", :limit => 2147483647 + t.string "compression", :limit => 6, :default => "" + t.string "comments", :default => "" + t.datetime "updated_on", :null => false + t.integer "version", :null => false + end + + add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" + add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" + + create_table "wiki_contents", :force => true do |t| + t.integer "page_id", :null => false + t.integer "author_id" + t.text "text", :limit => 2147483647 + t.string "comments", :default => "" + t.datetime "updated_on", :null => false + t.integer "version", :null => false + end + + add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" + add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" + + create_table "wiki_pages", :force => true do |t| + t.integer "wiki_id", :null => false + t.string "title", :null => false + t.datetime "created_on", :null => false + t.boolean "protected", :default => false, :null => false + t.integer "parent_id" + end + + add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" + add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" + add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" + + create_table "wiki_redirects", :force => true do |t| + t.integer "wiki_id", :null => false + t.string "title" + t.string "redirects_to" + t.datetime "created_on", :null => false + end + + add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" + add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" + + create_table "wikis", :force => true do |t| + t.integer "project_id", :null => false + t.string "start_page", :null => false + t.integer "status", :default => 1, :null => false + end + + add_index "wikis", ["project_id"], :name => "wikis_project_id" + + create_table "workflows", :force => true do |t| + t.integer "tracker_id", :default => 0, :null => false + t.integer "old_status_id", :default => 0, :null => false + t.integer "new_status_id", :default => 0, :null => false + t.integer "role_id", :default => 0, :null => false + t.boolean "assignee", :default => false, :null => false + t.boolean "author", :default => false, :null => false + t.string "type", :limit => 30 + t.string "field_name", :limit => 30 + t.string "rule", :limit => 30 + end + + add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" + add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" + add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" + add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" + + create_table "works_categories", :force => true do |t| + t.string "category" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "zip_packs", :force => true do |t| + t.integer "user_id" + t.integer "homework_id" + t.string "file_digest" + t.string "file_path" + t.integer "pack_times", :default => 1 + t.integer "pack_size", :default => 0 + t.text "file_digests" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + +end diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 05871eb41..88db4eeb5 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -12,9 +12,9 @@
-
{{act.description|safeHtml}}
- 迟交扣分:{{act.homework_common_detail.late_penalty}}分 匿评开启时间:{{act.homework_common_detail.evaluation_start}}
- 缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品 匿评关闭时间:{{act.homework_common_detail.evaluation_end}}
+
+ 迟交扣分:{{act.homework_common_detail.late_penalty}}分 匿评开启时间:{{act.homework_common_detail.evaluation_start}}
+ 缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品 匿评关闭时间:{{act.homework_common_detail.evaluation_end}}
点击展开
@@ -22,7 +22,7 @@
-
回复 ({{act.reply_count}})
+
回复 ({{act.reply_count}})
赞 ({{act.activity_praise_count}})
@@ -63,9 +63,9 @@
-

+
- 点击展开 + 点击展开 {{act.latest_update}}
@@ -104,8 +104,9 @@
-
{{act.description|safeHtml}}
- 状态:{{act.issue_detail.issue_status}} 优先级:{{act.issue_detail.issue_priority}}
指派给:{{act.issue_detail.issue_assigned_to}} 完成度:{{act.issue_detail.done_ratio}}%
+
+ 状态:{{act.issue_detail.issue_status}} 优先级:{{act.issue_detail.issue_priority}}
+ 指派给:{{act.issue_detail.issue_assigned_to}} 完成度:{{act.issue_detail.done_ratio}}%
点击展开
diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html index d2eebb0b8..eb97a8360 100644 --- a/public/assets/wechat/app.html +++ b/public/assets/wechat/app.html @@ -20,6 +20,7 @@ + diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 6f7449754..dcac4d64d 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -1,90 +1,46 @@ - - - - 作业详情 - - - - - - - - - - -
- - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index eb56cf558..791db4e49 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -20,7 +20,6 @@
({{issue.issue_praise_count}})
-
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 759224d14..1ab4301e3 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,12 +1,12 @@ var app = angular.module('wechat', ['ngRoute','ngCookies']); -var apiUrl = 'http://wechat.trustie.net/api/v1/'; -var debug = false; //调试标志,如果在本地请置为true +var apiUrl = 'http://localhost:3000/api/v1/'; +var debug = true; //调试标志,如果在本地请置为true app.factory('auth', function($http,$routeParams, $cookies){ var _openid = ''; if(debug===true){ - _openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; + _openid = "2"; } var getOpenId = function(cb) { @@ -74,7 +74,50 @@ app.controller('ActivityController',function($scope, $http, auth){ }); $scope.loadActData = loadActData; +}); + +app.controller('IssueController', function($scope, $http, $routeParams, auth){ + $scope.formData = {comment: ''}; + var loadData = function(id){ + $http({ + method: 'GET', + url: apiUrl+ "issues/"+id, + }).then(function successCallback(response) { + console.log(response.data); + $scope.issue = response.data.data; + + }, function errorCallback(response) { + }); + } + + loadData($routeParams.id); + + + $scope.addIssueReply = function(data){ + console.log(data.comment); + + if(!data.comment || data.comment.length<=0){ + return; + } + + var userInfo = { + type: "Issue", + content: data.comment, + openid: auth.openid(), + }; + + $http({ + method: 'POST', + url: apiUrl+ "new_comment/"+$routeParams.id, + data: userInfo, + }).then(function successCallback(response) { + alert("提交成功"); + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }, function errorCallback(response) { + }); + } }); app.controller('IssueController', function($scope, $http, $routeParams, auth){ @@ -119,8 +162,50 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth){ }, function errorCallback(response) { }); } +}); +app.controller('HomeworkController', function($scope, $http, $routeParams, auth){ + $scope.formData = {comment: ''}; + var loadData = function(id){ + $http({ + method: 'GET', + url: apiUrl+ "whomeworks/"+id, + }).then(function successCallback(response) { + console.log(response.data); + $scope.homework = response.data.data; + + }, function errorCallback(response) { + }); + } + + loadData($routeParams.id); + + + $scope.addIssueReply = function(data){ + console.log(data.comment); + + if(!data.comment || data.comment.length<=0){ + return; + } + + var userInfo = { + type: "HomeworkCommon", + content: data.comment, + openid: auth.openid(), + }; + + $http({ + method: 'POST', + url: apiUrl+ "new_comment/"+$routeParams.id, + data: userInfo, + }).then(function successCallback(response) { + alert("提交成功"); + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }, function errorCallback(response) { + }); + } }); app.filter('safeHtml', function ($sce) { @@ -139,6 +224,10 @@ app.config(['$routeProvider',function ($routeProvider) { templateUrl: 'issue_detail.html', controller: 'IssueController' }) + .when('/homework/:id', { + templateUrl: 'homework_detail.html', + controller: 'HomeworkController' + }) .otherwise({ redirectTo: '/activities' }); From 6c527a9a54a70807bbcbd5b7048e906408fb5204 Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 6 Apr 2016 11:40:05 +0800 Subject: [PATCH 132/209] =?UTF-8?q?=E7=82=B9=E8=B5=9E=E7=9A=84api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/new_comment.rb | 26 +------ app/api/mobile/apis/praise.rb | 40 +++++++++++ app/api/mobile/entities/jours.rb | 3 + app/helpers/api_helper.rb | 35 +++++++++ public/assets/wechat/jour_message_detail.html | 42 +++++++++++ public/assets/wechat/message_detail.html | 71 ------------------- 6 files changed, 122 insertions(+), 95 deletions(-) create mode 100644 app/api/mobile/apis/praise.rb create mode 100644 public/assets/wechat/jour_message_detail.html delete mode 100644 public/assets/wechat/message_detail.html diff --git a/app/api/mobile/apis/new_comment.rb b/app/api/mobile/apis/new_comment.rb index 8b27803ad..f7d723090 100644 --- a/app/api/mobile/apis/new_comment.rb +++ b/app/api/mobile/apis/new_comment.rb @@ -24,11 +24,7 @@ module Mobile feedback = HomeworkCommon.add_homework_jour(current_user, params[:content], params[:id]) if (feedback.errors.empty?) homework_common.update_attributes(:updated_at => Time.now) - data = homework_common.journals_for_messages.last - present :data, data, with: Mobile::Entities::Jours result = 2 - else - result = 3 end when "News" news = News.find(params[:id]) @@ -36,11 +32,7 @@ module Mobile comment.comments = params[:content] comment.author = current_user if news.comments << comment - data = comment - present :data, data, with: Mobile::Entities::Comment result = 2 - else - result = 3 end when "Message" message = Message.find(params[:id]) @@ -53,11 +45,7 @@ module Mobile reply.parent_id = params[:id] reply.subject = "RE: #{topic.subject}" if topic.children << reply - data = reply - present :data, data, with: Mobile::Entities::Message result = 2 - else - result = 3 end when "JournalsForMessage" jour = JournalsForMessage.find params[:id] @@ -77,8 +65,6 @@ module Mobile if jfm.errors.empty? (JournalsForMessage.find parent_id).update_attribute(:updated_on,Time.now) result = 2 - else - result = 3 end when 'Issue' issue = Issue.find params[:id] @@ -86,13 +72,8 @@ module Mobile is_jour.user_id = current_user.id is_jour.notes = params[:content] is_jour.journalized = issue - #is_jour.journalized_type = "Issue" if is_jour.save - data = is_jour - present :data, data, with: Mobile::Entities::Journal result = 2 - else - result = 3 end when 'BlogComment' blog = BlogComment.find(params[:id]).root @@ -101,11 +82,8 @@ module Mobile blogComment.blog = blog.blog blogComment.content = params[:content] blogComment.title = "RE: #{blog.title}" - blog.children << blogComment - if blog.save + if blog.children << blogComment result = 2 - else - result = 3 end end if result == 2 @@ -116,7 +94,7 @@ module Mobile update_principal_activity_api(type,params[:id]) end else - result = 4 + result = 3 end present :result, result present :status, 0 diff --git a/app/api/mobile/apis/praise.rb b/app/api/mobile/apis/praise.rb new file mode 100644 index 000000000..3ba6e5eb7 --- /dev/null +++ b/app/api/mobile/apis/praise.rb @@ -0,0 +1,40 @@ +#coding=utf-8 + +module Mobile + module Apis + class Praise< Grape::API + include ApiHelper + resources :praise do + desc "praise an activity" + + params do + requires :type, type: String + requires :openid, type: String + end + post ':id' do + obj_id = params[:id] + obj_type = params[:type] + user = UserWechat.find_by_openid(params[:openid]).user + obj = find_object_by_type_and_id(obj_id,obj_type) + pts = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",obj_id,obj_type.to_s,user.id) + if pts.empty? + praise_or_cancel(obj_type,obj_id,user,1) + num = get_activity_praise_num(obj) + else + pts.delete if !pts.nil? + #再更新praise_tread_cache表 使相应的记录减1 当为0时删除 + ptc = PraiseTreadCache.where("object_id=? and object_type=?",obj_id,obj_type.to_s).first + ptc.praise_minus(1) if !ptc.nil? + if ptc.praise_num == 0 + ptc.delete + end + num = get_activity_praise_num(obj) + end + + present :data, num + present :status, 0 + end + end + end + end +end \ No newline at end of file diff --git a/app/api/mobile/entities/jours.rb b/app/api/mobile/entities/jours.rb index e3ce04cf6..9d4d85f7a 100644 --- a/app/api/mobile/entities/jours.rb +++ b/app/api/mobile/entities/jours.rb @@ -19,6 +19,8 @@ module Mobile time_from_now f.created_on when :reply_count f.children.count + when :message_praise_count + get_activity_praise_num(f) end end end @@ -35,6 +37,7 @@ module Mobile jours_expose :m_reply_id jours_expose :m_parent_id jours_expose :reply_count + jours_expose :message_praise_count expose :course,using:Mobile::Entities::Course do |f,opt| if f.is_a?(::JournalsForMessage) && f[:jour_type] == "Course" f.course diff --git a/app/helpers/api_helper.rb b/app/helpers/api_helper.rb index 1955b78c0..28a8f74e4 100644 --- a/app/helpers/api_helper.rb +++ b/app/helpers/api_helper.rb @@ -450,4 +450,39 @@ module ApiHelper principal_activity.save end end + + #赞/取消赞 + def praise_or_cancel(type,id,user,flag) + unless id.nil? and type.nil? + #首先创建或更新praise_tread 表 + pt = PraiseTread.new + pt.user_id = user.id + pt.praise_tread_object_id = id.to_i + pt.praise_tread_object_type = type + pt.praise_or_tread = flag + pt.save + # end + + #再创建或更新praise_tread_cache表 + #@ptc = PraiseTreadCache.find_by_object_id_and_object_type(id,type) + ptc = PraiseTreadCache.where("object_id = ? and object_type = ?",id.to_i,type).first + ptc = ptc.nil? ? PraiseTreadCache.new : ptc + ptc.object_id = id.to_i + ptc.object_type = type + ptc.save + ptc.praise_plus(flag,1) + end + end + + def praise_plus(flag,num) + case flag + when 1 + self.update_attribute(:praise_num, self.praise_num.to_i + num) + end + end + + def praise_minus(num) + self.update_attribute(:praise_num, self.praise_num.to_i - num) + end + end \ No newline at end of file diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html new file mode 100644 index 000000000..e0ef85ecd --- /dev/null +++ b/public/assets/wechat/jour_message_detail.html @@ -0,0 +1,42 @@ + +
+
+
+
+ + +
+
+
{{message.notes}}
+
+
+
+
+
回复 ({{message.reply_count}})
+
({{message.message_praise_count}})
+
+
+ +
+
+
+
+ +
+
{{journal.lasted_comment}}
+
回复
+
+
+
+
+
+
+
+ + + +
+
+
+
+
\ No newline at end of file diff --git a/public/assets/wechat/message_detail.html b/public/assets/wechat/message_detail.html deleted file mode 100644 index 3709f65cf..000000000 --- a/public/assets/wechat/message_detail.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - 留言 - - - - - - - - - - -
- - - - - - - - - - - - - - \ No newline at end of file From 378dfca006d662b7387346d2259a54a9615d9d31 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 6 Apr 2016 13:53:40 +0800 Subject: [PATCH 133/209] =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=8F=AA=E6=9C=89=E7=AE=A1=E7=90=86=E5=91=98=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org_newstyle.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index a5f41081c..7a231739d 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -97,7 +97,7 @@ <% end %> <% else %> - <% else %> - + <% if @org_banner_attchment.blank? %> From c9687a8764b4490c73b97043e26b87bb1e6a7dbc Mon Sep 17 00:00:00 2001 From: txz Date: Wed, 6 Apr 2016 14:44:35 +0800 Subject: [PATCH 134/209] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 2 +- public/assets/wechat/course_discussion.html | 44 +----------- public/assets/wechat/course_notice.html | 77 ++++----------------- public/javascripts/wechat/app.js | 20 +++--- 4 files changed, 29 insertions(+), 114 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 88db4eeb5..63c9c0833 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -47,7 +47,7 @@
-
回复 ({{act.reply_count}})
+
回复 ({{act.reply_count}})
赞 ({{act.activity_praise_count}})
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index d5572b9f8..33bcf9471 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -1,24 +1,5 @@ - - - - 课程问答区 - - - - - - - - - - -
- - - - - - - - - - - - - - \ No newline at end of file +
\ No newline at end of file diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index 33ea6fe4b..2e8caf15a 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -1,91 +1,44 @@ - - - - 课程通知 - - - - - - - - - - -
- - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 1ab4301e3..b465dfcf6 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -120,16 +120,16 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth){ } }); -app.controller('IssueController', function($scope, $http, $routeParams, auth){ +app.controller('HomeworkController', function($scope, $http, $routeParams, auth){ $scope.formData = {comment: ''}; var loadData = function(id){ $http({ method: 'GET', - url: apiUrl+ "issues/"+id, + url: apiUrl+ "whomeworks/"+id, }).then(function successCallback(response) { console.log(response.data); - $scope.issue = response.data.data; + $scope.homework = response.data.data; }, function errorCallback(response) { }); @@ -146,7 +146,7 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth){ } var userInfo = { - type: "Issue", + type: "HomeworkCommon", content: data.comment, openid: auth.openid(), }; @@ -164,16 +164,16 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth){ } }); -app.controller('HomeworkController', function($scope, $http, $routeParams, auth){ +app.controller('CourseNoticeController', function($scope, $http, $routeParams, auth){ $scope.formData = {comment: ''}; var loadData = function(id){ $http({ method: 'GET', - url: apiUrl+ "whomeworks/"+id, + url: apiUrl+ "newss/"+id, }).then(function successCallback(response) { console.log(response.data); - $scope.homework = response.data.data; + $scope.news = response.data.data; }, function errorCallback(response) { }); @@ -190,7 +190,7 @@ app.controller('HomeworkController', function($scope, $http, $routeParams, auth) } var userInfo = { - type: "HomeworkCommon", + type: "News", content: data.comment, openid: auth.openid(), }; @@ -228,6 +228,10 @@ app.config(['$routeProvider',function ($routeProvider) { templateUrl: 'homework_detail.html', controller: 'HomeworkController' }) + .when('/course_notice/:id', { + templateUrl: 'course_notice.html', + controller: 'CourseNoticeController' + }) .otherwise({ redirectTo: '/activities' }); From 8f7c6f49b7547181d484522429ec566359b3167a Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 6 Apr 2016 14:56:09 +0800 Subject: [PATCH 135/209] =?UTF-8?q?api=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/api_helper.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/helpers/api_helper.rb b/app/helpers/api_helper.rb index 28a8f74e4..bd7ba8751 100644 --- a/app/helpers/api_helper.rb +++ b/app/helpers/api_helper.rb @@ -412,7 +412,7 @@ module ApiHelper #课程动态的更新 def update_course_activity_api type, id - course_activity = CourseActivity.where("course_act_type=? and course_act_id =?", type.to_s, id).first + course_activity = CourseActivity.where("course_act_type=? and course_act_id =?", type.to_s, id.to_i).first if course_activity course_activity.updated_at = Time.now course_activity.save @@ -420,7 +420,7 @@ module ApiHelper end #首页动态更新 def update_user_activity_api type, id - user_activity = UserActivity.where("act_type=? and act_id =?", type.to_s, id).first + user_activity = UserActivity.where("act_type=? and act_id =?", type.to_s, id.to_i).first if user_activity user_activity.updated_at = Time.now user_activity.save @@ -428,7 +428,7 @@ module ApiHelper end #项目动态更新 def update_forge_activity_api type, id - forge_activity = ForgeActivity.where("forge_act_type=? and forge_act_id=?", type.to_s, id).first + forge_activity = ForgeActivity.where("forge_act_type=? and forge_act_id=?", type.to_s, id.to_i).first if forge_activity forge_activity.updated_at = Time.now forge_activity.save @@ -436,7 +436,7 @@ module ApiHelper end #组织动态更新 def update_org_activity_api type , id - org_activity = OrgActivity.where("org_act_type=? and org_act_id =?", type.to_s, id).first + org_activity = OrgActivity.where("org_act_type=? and org_act_id =?", type.to_s, id.to_i).first if org_activity org_activity.updated_at = Time.now org_activity.save @@ -444,7 +444,7 @@ module ApiHelper end #个人动态更新 def update_principal_activity_api type, id - principal_activity = PrincipalActivity.where("principal_act_type=? and principal_act_id =?", type.to_s, id).first + principal_activity = PrincipalActivity.where("principal_act_type=? and principal_act_id =?", type.to_s, id.to_i).first if principal_activity principal_activity.updated_at = Time.now principal_activity.save From 70c2c9cc9f9137b10f9d61646993f74e86384885 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 6 Apr 2016 15:19:18 +0800 Subject: [PATCH 136/209] =?UTF-8?q?=E6=8A=8Aactivities=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=AD=98=E8=B5=B7=E6=9D=A5,=E9=98=B2=E6=AD=A2=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=97=B6=E9=A1=B5=E9=9D=A2=E5=8F=98=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/app.js | 84 +++++++++++++++++++------------- 1 file changed, 49 insertions(+), 35 deletions(-) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 5a18a2e35..09440b4bf 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,41 +1,41 @@ var app = angular.module('wechat', ['ngRoute','ngCookies']); var apiUrl = 'http://wechat.trustie.net/api/v1/'; -var debug = false; //调试标志,如果在本地请置为true +var debug = true; //调试标志,如果在本地请置为true -app.factory('auth', function($http,$routeParams, $cookies){ +app.factory('auth', function($http,$routeParams, $cookies, $q){ var _openid = ''; if(debug===true){ _openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; } - var getOpenId = function(cb) { + var getOpenId = function() { + var deferred = $q.defer(); if (typeof _openid !== 'undefined' && _openid.length > 0) { - cb(_openid); - return; - } - var code = $routeParams.code; - $http({ - url: '/wechat/get_open_id', - data: {code: code}, - method: 'POST' - }).then(function successCallback(response) { - _openid = response.data.openid; - if(typeof _openid !== 'undefined' && _openid.length>0){ - if(debug !== true){ //如果是生产环境,就存到cookies中 - $cookies.put("openid", _openid); - } - } else { - if(debug!==true){//考虑从cookies中取出 - _openid = $cookies.get('openid'); + deferred.resolve(_openid); + } else { + var code = $routeParams.code; + $http({ + url: '/wechat/get_open_id', + data: {code: code}, + method: 'POST' + }).then(function successCallback(response) { + _openid = response.data.openid; + if(typeof _openid !== 'undefined' && _openid.length>0){ + if(debug !== true){ //如果是生产环境,就存到cookies中 + $cookies.put("openid", _openid); + } + } else { + if(debug!==true){//考虑从cookies中取出 + _openid = $cookies.get('openid'); + } } - } - - cb(_openid); - }, function errorCallback(response) { - cb(null); - }); - + deferred.resolve(_openid); + }, function errorCallback(response) { + deferred.reject(response); + }); + } + return deferred.promise; }; var openid = function(){ return _openid; @@ -43,14 +43,27 @@ app.factory('auth', function($http,$routeParams, $cookies){ return {getOpenId: getOpenId, openid: openid}; }); -app.controller('ActivityController',function($scope, $http, auth){ +app.factory('rms', function(){ + var _saveStorage = {}; + var save = function(key, value){ + _saveStorage[key] = value; + }; + + var get = function(key){ + return _saveStorage[key]; + } + + return {save: save, get: get}; +}); + +app.controller('ActivityController',function($scope, $http, auth, rms){ $scope.repaceUrl = function(url){ return "http://www.trustie.net/" + url; } console.log("ActivityController load"); - $scope.activities = []; + $scope.activities = rms.get("activities") || []; $scope.page = 1; var loadActData = function(page){ @@ -61,17 +74,18 @@ app.controller('ActivityController',function($scope, $http, auth){ data: {openid: auth.openid(), page: page}, }).then(function successCallback(response) { $scope.activities = $scope.activities.concat(response.data.data); + rms.save('activities', $scope.activities); }, function errorCallback(response) { }); } - - auth.getOpenId(function(oid){ - if(!oid){ - alert("获取openid出错"); - } else { + auth.getOpenId().then( + function successCallback(response){ loadActData($scope.page); + }, function errorCallback(response) { + alert("获取openid出错:"+response); } - }); + ); + $scope.loadActData = loadActData; From 42bd2dcfc5f1c0aaa2a4d75cb82dc3dc7f91e71a Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 6 Apr 2016 15:23:48 +0800 Subject: [PATCH 137/209] Merge branch 'weixin_guange' of https://git.trustie.net/jacknudt/trustieforge into weixin_guange # Conflicts: # public/javascripts/wechat/app.js --- public/javascripts/wechat/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index f3c86e966..c0104b358 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,6 +1,6 @@ var app = angular.module('wechat', ['ngRoute','ngCookies']); var apiUrl = 'http://wechat.trustie.net/api/v1/'; -var debug = true; //调试标志,如果在本地请置为true +var debug = false; //调试标志,如果在本地请置为true if(debug===true){ apiUrl = 'http://localhost:3000/api/v1/'; From a1a9dbd8a30a951eb39a7a12a11da1566cc490e0 Mon Sep 17 00:00:00 2001 From: txz Date: Wed, 6 Apr 2016 15:34:54 +0800 Subject: [PATCH 138/209] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 4 +- public/assets/wechat/course_discussion.html | 32 ++++--- public/assets/wechat/course_notice.html | 2 +- public/assets/wechat/project_discussion.html | 87 +++++--------------- public/javascripts/wechat/app.js | 56 ++++++++++++- 5 files changed, 93 insertions(+), 88 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 63c9c0833..895b77999 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -70,7 +70,7 @@
-
回复 ({{act.reply_count}})
+
回复 ({{act.reply_count}})
赞 ({{act.activity_praise_count}})
@@ -148,7 +148,7 @@
-
回复 ()
+
回复 ()
赞 ()
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 33bcf9471..9f98299ee 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -3,42 +3,40 @@
-
- - +
+ +
-
+
- + {{discussion.created_on}}
-
回复 ()
-
(())
+
回复 ({{discussion.replies_count}})
+
({{discussion.message_praise_count}})
- = 0; --j){ !> -
+
-
+
- -
-
+ +
+
{{journal.lasted_comment}}
回复
-
- - - + + +
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index 2e8caf15a..b8e468701 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -24,7 +24,7 @@
-
{{comments.comments}}
+
{{comments.created_on}}
回复
diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index 45c84c822..be9ee8328 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -1,89 +1,44 @@ - - - - 项目讨论区 - - - - - - - - - - -
- - - - - - - - - - - - - - - \ No newline at end of file +
\ No newline at end of file diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index b465dfcf6..05fc16c0a 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -6,7 +6,7 @@ app.factory('auth', function($http,$routeParams, $cookies){ var _openid = ''; if(debug===true){ - _openid = "2"; + _openid = "1"; } var getOpenId = function(cb) { @@ -177,7 +177,7 @@ app.controller('CourseNoticeController', function($scope, $http, $routeParams, a }, function errorCallback(response) { }); - } + }; loadData($routeParams.id); @@ -208,6 +208,50 @@ app.controller('CourseNoticeController', function($scope, $http, $routeParams, a } }); +app.controller('CourseDiscussionController', function($scope, $http, $routeParams, auth){ + $scope.formData = {comment: ''}; + + var loadData = function(id){ + $http({ + method: 'GET', + url: apiUrl+ "messages/"+id, + }).then(function successCallback(response) { + console.log(response.data); + $scope.discussion = response.data.data; + + }, function errorCallback(response) { + }); + }; + + loadData($routeParams.id); + + + $scope.addIssueReply = function(data){ + console.log(data.comment); + + if(!data.comment || data.comment.length<=0){ + return; + } + + var userInfo = { + type: "Message", + content: data.comment, + openid: auth.openid(), + }; + + $http({ + method: 'POST', + url: apiUrl+ "new_comment/"+$routeParams.id, + data: userInfo, + }).then(function successCallback(response) { + alert("提交成功"); + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }, function errorCallback(response) { + }); + } +}); + app.filter('safeHtml', function ($sce) { return function (input) { return $sce.trustAsHtml(input); @@ -232,6 +276,14 @@ app.config(['$routeProvider',function ($routeProvider) { templateUrl: 'course_notice.html', controller: 'CourseNoticeController' }) + .when('/course_discussion/:id', { + templateUrl: 'course_discussion.html', + controller: 'CourseDiscussionController' + }) + .when('/project_discussion/:id', { + templateUrl: 'project_discussion.html', + controller: 'CourseDiscussionController' + }) .otherwise({ redirectTo: '/activities' }); From 2ede6e2b9d1663ceafe163e322789b129373fe7e Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 6 Apr 2016 15:43:37 +0800 Subject: [PATCH 139/209] =?UTF-8?q?=E5=8D=9A=E5=AE=A2=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/blog_detail.html | 91 +++++++++------------------ 1 file changed, 31 insertions(+), 60 deletions(-) diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index dd40df5ab..d9c4f5835 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -1,73 +1,44 @@ - - - - 博客 - - - - - - - - - - -
- - - - - - - - - - - - \ No newline at end of file +
\ No newline at end of file From 20bb8c1e09d4b1c50d3713e25c8b919f4e316662 Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 6 Apr 2016 16:23:21 +0800 Subject: [PATCH 140/209] =?UTF-8?q?=E7=95=99=E8=A8=80=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 4 +- public/assets/wechat/jour_message_detail.html | 2 +- public/javascripts/wechat/app.js | 96 ++++++++++++++++++- 3 files changed, 98 insertions(+), 4 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 895b77999..1ffc10941 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -184,7 +184,7 @@
-
回复 ({{act.reply_count}})
+
回复 ({{act.reply_count}})
赞 ({{act.activity_praise_count}})
@@ -208,7 +208,7 @@
-
回复 ({{act.reply_count}})
+
回复 ({{act.reply_count}})
赞 ({{act.activity_praise_count}})
diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index e0ef85ecd..867616441 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -22,7 +22,7 @@
-
+
{{journal.lasted_comment}}
回复
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index c69b119c1..04c0cb7af 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,6 +1,6 @@ var app = angular.module('wechat', ['ngRoute','ngCookies']); var apiUrl = 'http://wechat.trustie.net/api/v1/'; -var debug = false; //调试标志,如果在本地请置为true +var debug = true; //调试标志,如果在本地请置为true if(debug===true){ apiUrl = 'http://localhost:3000/api/v1/'; @@ -271,6 +271,92 @@ app.controller('CourseDiscussionController', function($scope, $http, $routeParam } }); +app.controller('JournalsController', function($scope, $http, $routeParams, auth){ + $scope.formData = {comment: ''}; + + var loadData = function(id){ + $http({ + method: 'GET', + url: apiUrl+ "journal_for_messages/"+id, + }).then(function successCallback(response) { + console.log(response.data); + $scope.message = response.data.data; + }, function errorCallback(response) { + }); + }; + + loadData($routeParams.id); + + + $scope.addJournalReply = function(data){ + console.log(data.comment); + + if(!data.comment || data.comment.length<=0){ + return; + } + + var userInfo = { + type: "JournalsForMessage", + content: data.comment, + openid: auth.openid(), + }; + + $http({ + method: 'POST', + url: apiUrl+ "new_comment/"+$routeParams.id, + data: userInfo, + }).then(function successCallback(response) { + alert("提交成功"); + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }, function errorCallback(response) { + }); + } +}); + +app.controller('BlogController', function($scope, $http, $routeParams, auth){ + $scope.formData = {comment: ''}; + + var loadData = function(id){ + $http({ + method: 'GET', + url: apiUrl+ "blog_comments/"+id, + }).then(function successCallback(response) { + console.log(response.data); + $scope.blog = response.data.data; + }, function errorCallback(response) { + }); + }; + + loadData($routeParams.id); + + + $scope.addBlogReply = function(data){ + console.log(data.comment); + + if(!data.comment || data.comment.length<=0){ + return; + } + + var userInfo = { + type: "BlogComment", + content: data.comment, + openid: auth.openid(), + }; + + $http({ + method: 'POST', + url: apiUrl+ "new_comment/"+$routeParams.id, + data: userInfo, + }).then(function successCallback(response) { + alert("提交成功"); + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }, function errorCallback(response) { + }); + } +}); + app.filter('safeHtml', function ($sce) { return function (input) { return $sce.trustAsHtml(input); @@ -303,6 +389,14 @@ app.config(['$routeProvider',function ($routeProvider) { templateUrl: 'project_discussion.html', controller: 'CourseDiscussionController' }) + .when('/journal_for_message/:id', { + templateUrl: 'jour_message_detail.html', + controller: 'JournalsController' + }) + .when('/blog_comment/:id', { + templateUrl: 'blog_detail.html', + controller: 'BlogController' + }) .otherwise({ redirectTo: '/activities' }); From 422621759e16789a135c72c2157699f9341ecca9 Mon Sep 17 00:00:00 2001 From: txz Date: Wed, 6 Apr 2016 16:24:35 +0800 Subject: [PATCH 141/209] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E8=AF=A6=E6=83=85=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/project_discussion.html | 2 +- public/javascripts/wechat/app.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index be9ee8328..91aa983d2 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -5,7 +5,7 @@
- +
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index c69b119c1..f7c076852 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,6 +1,6 @@ var app = angular.module('wechat', ['ngRoute','ngCookies']); var apiUrl = 'http://wechat.trustie.net/api/v1/'; -var debug = false; //调试标志,如果在本地请置为true +var debug = true; //调试标志,如果在本地请置为true if(debug===true){ apiUrl = 'http://localhost:3000/api/v1/'; @@ -10,7 +10,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){ var _openid = ''; if(debug===true){ - _openid = "1"; + _openid = "2"; } var getOpenId = function() { From 623114dc41d59e56e0495c47a5a040fb6ff208f1 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 6 Apr 2016 19:02:07 +0800 Subject: [PATCH 142/209] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=9A=84=E7=A7=81=E6=9C=89=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=9C=A8=E6=88=91=E7=9A=84=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 32 +++++++++----------- app/views/layouts/base_org_newstyle.html.erb | 2 +- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 2d1402ed5..e59e33516 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -836,8 +836,8 @@ class UsersController < ApplicationController render_403 return end - user_course_ids = User.current.courses.map { |c| c.id} - user_project_ids = User.current.projects.map {|p| p.id} + user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} + user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id} if(params[:type].blank? || params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 @@ -886,11 +886,11 @@ class UsersController < ApplicationController def user_ref_resource_search search = params[:search].to_s.strip.downcase if(params[:type].blank? || params[:type] == "1") #全部 - user_course_ids = User.current.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源 取交集并查询 + user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源 取交集并查询 @attachments = Attachment.where("((author_id = #{params[:id]} and container_type in('Project','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+ " or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}))) and (filename like '%#{search}%') ").order("created_on desc") elsif params[:type] == "2" #课程资源 - user_course_ids = User.current.courses.map { |c| c.id} + user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} @attachments = Attachment.where("(author_id = #{params[:id]} and container_type = 'Course') or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')})) and (filename like '%#{search}%') ").order("created_on desc") elsif params[:type] == "3" #项目资源 @attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Project' and (filename like '%#{search}%')").order("created_on desc") @@ -1579,16 +1579,14 @@ class UsersController < ApplicationController # 上传用户资源 def user_resource_create - user_course_ids = User.current.courses.map { |c| c.id} - user_project_ids = User.current.projects.map {|p| p.id} + user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} + user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id} @user = User.find(params[:id]) # 保存文件 attach = Attachment.attach_filesex_public(@user, params[:attachments], params[:attachment_type], is_public = true) @order, @b_sort = params[:order] || "created_on", params[:sort] || "asc" @score = @b_sort == "desc" ? "asc" : "desc" - user_course_ids = User.current.courses.map { |c| c.id} - user_project_ids = User.current.projects.map {|p| p.id} # user_org_ids = User.current.organizations.map {|o| o.id} if(params[:type].blank? || params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 @@ -2467,7 +2465,7 @@ class UsersController < ApplicationController # 获取我的资源 def get_my_resources author_id, user_course_ids, user_project_ids, order, score - attachments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+ + attachments = Attachment.where("(author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type in('OrgSubfield','Principal','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+ "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)" + "or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}") end @@ -2580,8 +2578,8 @@ class UsersController < ApplicationController end @order, @b_sort = params[:order] || "created_on", params[:sort] || "asc" @score = @b_sort == "desc" ? "asc" : "desc" - user_course_ids = User.current.courses.map { |c| c.id} - user_project_ids = User.current.projects.map {|p| p.id} + user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} + user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id} if(params[:type].blank? || params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 @@ -2638,8 +2636,8 @@ class UsersController < ApplicationController @user = User.find(params[:id]) @order, @b_sort = params[:order] || "created_on", params[:sort] || "asc" @score = @b_sort == "desc" ? "asc" : "desc" - user_course_ids = User.current.courses.map { |c| c.id} - user_project_ids = User.current.projects.map {|p| p.id} # user_org_ids = User.current.organizations.map {|o| o.id} + user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} + user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id} if(params[:type].blank? || params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 @attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score) @@ -2677,8 +2675,8 @@ class UsersController < ApplicationController # 别人的资源库是没有权限去看的 if(params[:type].blank? || params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 - user_course_ids = User.current.courses.map { |c| c.id} - user_project_ids = User.current.projects.map {|p| p.id} + user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} + user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id} @attachments = get_my_resources_search(params[:id], user_course_ids, user_project_ids, @order, @score, search) elsif params[:type] == "6" # 公共资源 @@ -2758,8 +2756,8 @@ class UsersController < ApplicationController @user = User.current @switch_search = params[:search].nil? ? " " : params[:search] search = "%#{@switch_search.strip.downcase}%" - user_course_ids = User.current.courses.map {|c| c.id} - user_project_ids = User.current.projects.map {|p| p.id} + user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} + user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } if(params[:type].nil? || params[:type].blank? || params[:type] == "1" || params[:type] == 'all') # 全部 if params[:status] == "2" @attachments = get_course_resources_search(params[:id], user_course_ids, @order, @score, search) diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index 7a231739d..4963ea14f 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -161,7 +161,7 @@ <% end %>
From ec47fb1949c22ff41f18b36aae81becb7ca325e8 Mon Sep 17 00:00:00 2001 From: txz Date: Wed, 6 Apr 2016 19:29:00 +0800 Subject: [PATCH 143/209] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 14 ++------ public/assets/wechat/course_discussion.html | 2 +- public/assets/wechat/course_notice.html | 2 +- public/assets/wechat/homework_detail.html | 2 +- public/assets/wechat/issue_detail.html | 5 +-- public/assets/wechat/project_discussion.html | 2 +- public/javascripts/wechat/app.js | 34 +++++++++++++++----- 7 files changed, 36 insertions(+), 25 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 1ffc10941..b22131604 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -58,7 +58,7 @@
-
+
@@ -139,17 +139,9 @@
-
回复 ({{act.reply_count}})
+
回复 ({{act.reply_count}})
赞 ({{act.activity_praise_count}})
- 点击展开 -
- -
-
-
-
回复 ()
-
赞 ()
@@ -173,7 +165,7 @@
-
+
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 9f98299ee..980474dd7 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -36,7 +36,7 @@
- +
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index b8e468701..4ad38b3da 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -36,7 +36,7 @@
- +
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index dcac4d64d..7ae41b418 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -38,7 +38,7 @@
- +
diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 791db4e49..5b6590aa9 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -8,8 +8,9 @@
-
{{issue.description}}
- 状态:{{issue.issue_status}} 优先级:{{issue.issue_priority}}
指派给:{{issue.issue_assigned_to}} 完成度:{{issue.done_ratio}}%
+
+ 状态:{{issue.issue_status}} 优先级:{{issue.issue_priority}}
+ 指派给:{{issue.issue_assigned_to}} 完成度:{{issue.done_ratio}}%
{{issue.created_on}} diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index 91aa983d2..e8cfba46a 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -36,7 +36,7 @@
- +
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 7fb1fc6df..23b4c9943 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -62,7 +62,7 @@ app.factory('rms', function(){ }); app.controller('ActivityController',function($scope, $http, auth, rms){ - $scope.repaceUrl = function(url){ + $scope.replaceUrl = function(url){ return "http://www.trustie.net/" + url; } @@ -93,6 +93,24 @@ app.controller('ActivityController',function($scope, $http, auth, rms){ $scope.loadActData = loadActData; + + var descToggle = function(){ + $(".post-all-content").each(function(){ + var postHeight = $(this).height(); + if (postHeight > 90){ + $(this).parent().next().css("display","block"); + $(this).parent().next().toggle(function(){ + $(this).text("点击隐藏"); + $(this).prev().css("height",postHeight); + },function(){ + $(this).text("点击展开"); + $(this).prev().css("height",90); + }); + } + }); + } + + $scope.descToggle = descToggle; }); app.controller('IssueController', function($scope, $http, $routeParams, auth){ @@ -157,7 +175,7 @@ app.controller('HomeworkController', function($scope, $http, $routeParams, auth) loadData($routeParams.id); - $scope.addIssueReply = function(data){ + $scope.addHomeworkReply = function(data){ console.log(data.comment); if(!data.comment || data.comment.length<=0){ @@ -201,7 +219,7 @@ app.controller('CourseNoticeController', function($scope, $http, $routeParams, a loadData($routeParams.id); - $scope.addIssueReply = function(data){ + $scope.addNoticeReply = function(data){ console.log(data.comment); if(!data.comment || data.comment.length<=0){ @@ -245,7 +263,7 @@ app.controller('CourseDiscussionController', function($scope, $http, $routeParam loadData($routeParams.id); - $scope.addIssueReply = function(data){ + $scope.addDiscussionReply = function(data){ console.log(data.comment); if(!data.comment || data.comment.length<=0){ @@ -373,6 +391,10 @@ app.config(['$routeProvider',function ($routeProvider) { templateUrl: 'issue_detail.html', controller: 'IssueController' }) + .when('/project_discussion/:id', { + templateUrl: 'project_discussion.html', + controller: 'CourseDiscussionController' + }) .when('/homework/:id', { templateUrl: 'homework_detail.html', controller: 'HomeworkController' @@ -385,10 +407,6 @@ app.config(['$routeProvider',function ($routeProvider) { templateUrl: 'course_discussion.html', controller: 'CourseDiscussionController' }) - .when('/project_discussion/:id', { - templateUrl: 'project_discussion.html', - controller: 'CourseDiscussionController' - }) .when('/journal_for_message/:id', { templateUrl: 'jour_message_detail.html', controller: 'JournalsController' From 8e1473a484b3ebc4126fcdded70d148298b1d7ae Mon Sep 17 00:00:00 2001 From: txz Date: Thu, 7 Apr 2016 09:26:24 +0800 Subject: [PATCH 144/209] =?UTF-8?q?=E7=82=B9=E8=B5=9E=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/activities.rb | 2 +- app/api/mobile/entities/activity.rb | 4 + public/assets/wechat/activities.html | 27 ++--- public/assets/wechat/blog_detail.html | 2 +- public/assets/wechat/course_discussion.html | 2 +- public/assets/wechat/course_notice.html | 2 +- public/assets/wechat/homework_detail.html | 2 +- public/assets/wechat/issue_detail.html | 2 +- public/assets/wechat/jour_message_detail.html | 2 +- public/assets/wechat/project_discussion.html | 2 +- public/javascripts/wechat/app.js | 102 ++++++++++-------- 11 files changed, 86 insertions(+), 63 deletions(-) diff --git a/app/api/mobile/apis/activities.rb b/app/api/mobile/apis/activities.rb index c7f8509ae..8e4d69738 100644 --- a/app/api/mobile/apis/activities.rb +++ b/app/api/mobile/apis/activities.rb @@ -30,7 +30,7 @@ module Mobile all_count = activities.count activities = activities.limit(10).offset(page * 10) count = activities.count - present :data, activities, with: Mobile::Entities::Activity + present :data, activities, with: Mobile::Entities::Activity,user: user present :all_count, all_count present :count, count present :page, page diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index 8c6b07281..945601bd6 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -130,6 +130,10 @@ module Mobile act_expose :latest_update #最新更新时间 act_expose :course_project_name #课程/项目名字 act_expose :activity_type_name #课程问答区/项目缺陷等 + expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| + current_user = options[:user] + false + end end end end \ No newline at end of file diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index b22131604..ae8fe8136 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -9,13 +9,14 @@
- +
迟交扣分:{{act.homework_common_detail.late_penalty}}分 匿评开启时间:{{act.homework_common_detail.evaluation_start}}
缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品 匿评关闭时间:{{act.homework_common_detail.evaluation_end}}
+ 点击展开 点击展开
{{act.latest_update}} @@ -36,7 +37,7 @@
- +
@@ -48,7 +49,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
+
一赞 ({{act.activity_praise_count}})
+
赞 ({{act.activity_praise_count}})
@@ -60,12 +62,12 @@
- +
- 点击展开 + 点击展开 {{act.latest_update}}
@@ -83,7 +85,7 @@
- +
@@ -101,7 +103,7 @@
- +
@@ -115,7 +117,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
+
一赞 ({{act.activity_praise_count}})
+
赞 ({{act.activity_praise_count}})
@@ -128,7 +131,7 @@
- +
@@ -153,7 +156,7 @@
- +
@@ -166,7 +169,7 @@
- +
@@ -189,7 +192,7 @@
- +
diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index d9c4f5835..5c1d6bf22 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -5,7 +5,7 @@
- +
{{blog.content}}
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 980474dd7..13ae823c3 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -5,7 +5,7 @@
- +
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index 4ad38b3da..3881d96f1 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -5,7 +5,7 @@
- +
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 7ae41b418..072678ba1 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -5,7 +5,7 @@
- +
diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 5b6590aa9..ea3fd06be 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -5,7 +5,7 @@
- +
diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index 867616441..857498f0a 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -3,7 +3,7 @@
- +
diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index e8cfba46a..d868e0d03 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -5,7 +5,7 @@
- +
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 23b4c9943..c8edfaf84 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -10,7 +10,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){ var _openid = ''; if(debug===true){ - _openid = "2"; + _openid = "1"; } var getOpenId = function() { @@ -67,7 +67,6 @@ app.controller('ActivityController',function($scope, $http, auth, rms){ } console.log("ActivityController load"); - $scope.activities = rms.get("activities") || []; $scope.page = 1; @@ -91,47 +90,20 @@ app.controller('ActivityController',function($scope, $http, auth, rms){ } ); + $scope.addPraise = function(act){ + act.activity_praise_count += 1; + act.has_praise = true; - $scope.loadActData = loadActData; - - var descToggle = function(){ - $(".post-all-content").each(function(){ - var postHeight = $(this).height(); - if (postHeight > 90){ - $(this).parent().next().css("display","block"); - $(this).parent().next().toggle(function(){ - $(this).text("点击隐藏"); - $(this).prev().css("height",postHeight); - },function(){ - $(this).text("点击展开"); - $(this).prev().css("height",90); - }); - } - }); - } - - $scope.descToggle = descToggle; -}); - -app.controller('IssueController', function($scope, $http, $routeParams, auth){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - $http({ - method: 'GET', - url: apiUrl+ "issues/"+id, - }).then(function successCallback(response) { - console.log(response.data); - $scope.issue = response.data.data; + //$http - }, function errorCallback(response) { - }); } - loadData($routeParams.id); + $scope.loadActData = loadActData; +}); - $scope.addIssueReply = function(data){ +app.factory('common', function($http, auth){ + var addCommonReply = function(id, type, data, cb){ console.log(data.comment); if(!data.comment || data.comment.length<=0){ @@ -139,22 +111,66 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth){ } var userInfo = { - type: "Issue", + type: type, content: data.comment, - openid: auth.openid(), + openid: auth.openid() }; $http({ method: 'POST', - url: apiUrl+ "new_comment/"+$routeParams.id, - data: userInfo, + url: apiUrl+ "new_comment/"+id, + data: userInfo }).then(function successCallback(response) { alert("提交成功"); - $scope.formData = {comment: ''}; - loadData($routeParams.id); + if(typeof cb === 'function'){ + cb(); + } + }, function errorCallback(response) { + }); + }; + + + + + var loadCommonData = function(id, type){ + return $http({ + method: 'GET', + url: apiUrl+ type + "/"+id + }) + }; + + return {addCommonReply: addCommonReply, loadCommonData: loadCommonData}; + + +}); + + + +app.controller('IssueController', function($scope, $http, $routeParams, auth, common){ + $scope.formData = {comment: ''}; + + var loadData = function(id){ + common.loadCommonData(id, 'issues').then(function successCallback(response) { + console.log(response.data); + $scope.issue = response.data.data; }, function errorCallback(response) { }); } + + loadData($routeParams.id); + + $scope.addIssueReply = function(data){ + console.log("add issue reply"); + common.addCommonReply($routeParams.id, 'Issue', data, function(){ + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }); + + }; + + + + }); app.controller('HomeworkController', function($scope, $http, $routeParams, auth){ From edb18bd1b8941576e4ee1150a524f7d4cb499989 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 7 Apr 2016 11:16:38 +0800 Subject: [PATCH 145/209] =?UTF-8?q?api=E6=8F=90=E4=BE=9Bhas=5Fpraise?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/blog_comments.rb | 3 ++- app/api/mobile/apis/issues.rb | 3 ++- app/api/mobile/apis/journal_for_messages.rb | 3 ++- app/api/mobile/apis/messages.rb | 3 ++- app/api/mobile/apis/newss.rb | 3 ++- app/api/mobile/apis/whomeworks.rb | 3 ++- app/api/mobile/entities/activity.rb | 5 ++++- app/api/mobile/entities/blog_comment.rb | 7 +++++++ app/api/mobile/entities/issue.rb | 7 +++++++ app/api/mobile/entities/jours.rb | 7 +++++++ app/api/mobile/entities/message.rb | 7 +++++++ app/api/mobile/entities/news.rb | 9 +++++++-- app/api/mobile/entities/whomework.rb | 7 +++++++ public/assets/wechat/activities.html | 2 +- public/assets/wechat/blog_detail.html | 3 ++- public/assets/wechat/course_discussion.html | 3 ++- public/assets/wechat/course_notice.html | 3 ++- public/assets/wechat/homework_detail.html | 3 ++- public/assets/wechat/issue_detail.html | 3 ++- public/assets/wechat/jour_message_detail.html | 3 ++- public/assets/wechat/project_discussion.html | 3 ++- 21 files changed, 73 insertions(+), 17 deletions(-) diff --git a/app/api/mobile/apis/blog_comments.rb b/app/api/mobile/apis/blog_comments.rb index 01fd05c0f..5a064245a 100644 --- a/app/api/mobile/apis/blog_comments.rb +++ b/app/api/mobile/apis/blog_comments.rb @@ -7,8 +7,9 @@ module Mobile desc "get special topic" get ':id' do + user = UserWechat.find_by_openid(params[:openid]).user blog = BlogComment.find params[:id] - present :data, blog, with: Mobile::Entities::BlogComment + present :data, blog, with: Mobile::Entities::BlogComment,user: user present :status, 0 end end diff --git a/app/api/mobile/apis/issues.rb b/app/api/mobile/apis/issues.rb index 1815c85f3..b767bd768 100644 --- a/app/api/mobile/apis/issues.rb +++ b/app/api/mobile/apis/issues.rb @@ -8,8 +8,9 @@ module Mobile desc "get special issuse" get ':id' do + user = UserWechat.find_by_openid(params[:openid]).user issue = Issue.find params[:id] - present :data, issue, with: Mobile::Entities::Issue + present :data, issue, with: Mobile::Entities::Issue,user: user present :status, 0 end end diff --git a/app/api/mobile/apis/journal_for_messages.rb b/app/api/mobile/apis/journal_for_messages.rb index 648924912..15a571a82 100644 --- a/app/api/mobile/apis/journal_for_messages.rb +++ b/app/api/mobile/apis/journal_for_messages.rb @@ -7,8 +7,9 @@ module Mobile desc "get special journal" get ':id' do + user = UserWechat.find_by_openid(params[:openid]).user jour = JournalsForMessage.find params[:id] - present :data, jour, with: Mobile::Entities::Jours + present :data, jour, with: Mobile::Entities::Jours,user: user present :status, 0 end end diff --git a/app/api/mobile/apis/messages.rb b/app/api/mobile/apis/messages.rb index 5e2fb05b7..ae2f9a39c 100644 --- a/app/api/mobile/apis/messages.rb +++ b/app/api/mobile/apis/messages.rb @@ -7,8 +7,9 @@ module Mobile desc "get special topic" get ':id' do + user = UserWechat.find_by_openid(params[:openid]).user message = Message.find params[:id] - present :data, message, with: Mobile::Entities::Message + present :data, message, with: Mobile::Entities::Message,user: user present :status, 0 end end diff --git a/app/api/mobile/apis/newss.rb b/app/api/mobile/apis/newss.rb index 6f15ae2ee..8bdd460cc 100644 --- a/app/api/mobile/apis/newss.rb +++ b/app/api/mobile/apis/newss.rb @@ -7,8 +7,9 @@ module Mobile desc "get special news" get ':id' do + user = UserWechat.find_by_openid(params[:openid]).user news = News.find params[:id] - present :data, news, with: Mobile::Entities::News + present :data, news, with: Mobile::Entities::News,user: user present :status, 0 end end diff --git a/app/api/mobile/apis/whomeworks.rb b/app/api/mobile/apis/whomeworks.rb index 39a6faa68..a88d509a3 100644 --- a/app/api/mobile/apis/whomeworks.rb +++ b/app/api/mobile/apis/whomeworks.rb @@ -7,8 +7,9 @@ module Mobile desc "get one homework" get ':id' do + user = UserWechat.find_by_openid(params[:openid]).user homework = HomeworkCommon.find params[:id] - present :data, homework, with: Mobile::Entities::Whomework + present :data, homework, with: Mobile::Entities::Whomework,user: user present :status, 0 end end diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index 945601bd6..59127dedd 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -131,8 +131,11 @@ module Mobile act_expose :course_project_name #课程/项目名字 act_expose :activity_type_name #课程问答区/项目缺陷等 expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| + has_praise = false current_user = options[:user] - false + obj = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",instance.act_id,instance.act_type.to_s,current_user.id) + has_praise = obj.empty? ? false : true + has_praise end end end diff --git a/app/api/mobile/entities/blog_comment.rb b/app/api/mobile/entities/blog_comment.rb index ac3fc3d9e..6961823d0 100644 --- a/app/api/mobile/entities/blog_comment.rb +++ b/app/api/mobile/entities/blog_comment.rb @@ -45,6 +45,13 @@ module Mobile c.children end end + expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| + has_praise = false + current_user = options[:user] + obj = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",instance.id,instance.class.to_s,current_user.id) + has_praise = obj.empty? ? false : true + has_praise + end end end end \ No newline at end of file diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index d0bb0fa0d..e64248353 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -49,6 +49,13 @@ module Mobile f.journals.where("notes is not null and notes != ''") end end + expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| + has_praise = false + current_user = options[:user] + obj = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",instance.id,instance.class.to_s,current_user.id) + has_praise = obj.empty? ? false : true + has_praise + end end end end \ No newline at end of file diff --git a/app/api/mobile/entities/jours.rb b/app/api/mobile/entities/jours.rb index 9d4d85f7a..87bbd0184 100644 --- a/app/api/mobile/entities/jours.rb +++ b/app/api/mobile/entities/jours.rb @@ -51,6 +51,13 @@ module Mobile f.children end end + expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| + has_praise = false + current_user = options[:user] + obj = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",instance.id,instance.class.to_s,current_user.id) + has_praise = obj.empty? ? false : true + has_praise + end end end end diff --git a/app/api/mobile/entities/message.rb b/app/api/mobile/entities/message.rb index d182e5965..7a00b5725 100644 --- a/app/api/mobile/entities/message.rb +++ b/app/api/mobile/entities/message.rb @@ -52,6 +52,13 @@ module Mobile c.children end end + expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| + has_praise = false + current_user = options[:user] + obj = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",instance.id,instance.class.to_s,current_user.id) + has_praise = obj.empty? ? false : true + has_praise + end end end end \ No newline at end of file diff --git a/app/api/mobile/entities/news.rb b/app/api/mobile/entities/news.rb index d1ec9c5c3..85504a280 100644 --- a/app/api/mobile/entities/news.rb +++ b/app/api/mobile/entities/news.rb @@ -73,8 +73,13 @@ module Mobile f.send(:comments) end end - - + expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| + has_praise = false + current_user = options[:user] + obj = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",instance.id,instance.class.to_s,current_user.id) + has_praise = obj.empty? ? false : true + has_praise + end end end end \ No newline at end of file diff --git a/app/api/mobile/entities/whomework.rb b/app/api/mobile/entities/whomework.rb index b24c50aa2..76b88ec6f 100644 --- a/app/api/mobile/entities/whomework.rb +++ b/app/api/mobile/entities/whomework.rb @@ -67,6 +67,13 @@ module Mobile f.journals_for_messages end end + expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| + has_praise = false + current_user = options[:user] + obj = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",instance.id,instance.class.to_s,current_user.id) + has_praise = obj.empty? ? false : true + has_praise + end end end end \ No newline at end of file diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index ae8fe8136..e63bcf642 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -117,7 +117,7 @@
回复 ({{act.reply_count}})
-
一赞 ({{act.activity_praise_count}})
+
已赞 ({{act.activity_praise_count}})
赞 ({{act.activity_praise_count}})
diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index 5c1d6bf22..f678c8159 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -16,7 +16,8 @@
回复 ({{blog.comments_count}})
-
({{blog.blog_praise_count}})
+
已赞 ({{blog.blog_praise_count}})
+
赞 ({{blog.blog_praise_count}})
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 13ae823c3..1e7b53f84 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -16,7 +16,8 @@
回复 ({{discussion.replies_count}})
-
({{discussion.message_praise_count}})
+
已赞 ({{discussion.message_praise_count}})
+
赞 ({{discussion.message_praise_count}})
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index 3881d96f1..9ac5a402d 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -16,7 +16,8 @@
回复 ({{news.comments_count}})
-
({{news.news_praise_count}})
+
已赞 ({{news.news_praise_count}})
+
赞 ({{news.news_praise_count}})
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 072678ba1..25d75d583 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -18,7 +18,8 @@
回复 ({{homework.whomework_journal_count}})
-
({{homework.whomework_praise_count}})
+
已赞 ({{homework.whomework_praise_count}})
+
赞 ({{homework.whomework_praise_count}})
diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index ea3fd06be..79afbb547 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -18,7 +18,8 @@
回复 ({{issue.journals_count}})
-
({{issue.issue_praise_count}})
+
已赞 ({{issue.issue_praise_count}})
+
赞 ({{issue.issue_praise_count}})
diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index 857498f0a..d866e887e 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -13,7 +13,8 @@
回复 ({{message.reply_count}})
-
({{message.message_praise_count}})
+
已赞 ({{message.message_praise_count}})
+
赞 ({{message.message_praise_count}})
diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index d868e0d03..2b31df8bf 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -16,7 +16,8 @@
回复 ({{discussion.replies_count}})
-
({{discussion.message_praise_count}})
+
已赞 ({{discussion.message_praise_count}})
+
赞 ({{discussion.message_praise_count}})
From a0e95976ac5db6b0caad37d70c1718abe72d58b8 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 7 Apr 2016 11:21:59 +0800 Subject: [PATCH 146/209] =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E7=82=B9=E8=B5=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/blog_detail.html | 4 ++-- public/assets/wechat/course_discussion.html | 4 ++-- public/assets/wechat/course_notice.html | 4 ++-- public/assets/wechat/homework_detail.html | 4 ++-- public/assets/wechat/issue_detail.html | 4 ++-- public/assets/wechat/jour_message_detail.html | 4 ++-- public/assets/wechat/project_discussion.html | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index f678c8159..1fc92eabb 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -16,8 +16,8 @@
回复 ({{blog.comments_count}})
-
已赞 ({{blog.blog_praise_count}})
-
赞 ({{blog.blog_praise_count}})
+
已赞 ({{blog.blog_praise_count}})
+
赞 ({{blog.blog_praise_count}})
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 1e7b53f84..2c2c210a9 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -16,8 +16,8 @@
回复 ({{discussion.replies_count}})
-
已赞 ({{discussion.message_praise_count}})
-
赞 ({{discussion.message_praise_count}})
+
已赞 ({{discussion.message_praise_count}})
+
赞 ({{discussion.message_praise_count}})
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index 9ac5a402d..eccd91848 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -16,8 +16,8 @@
回复 ({{news.comments_count}})
-
已赞 ({{news.news_praise_count}})
-
赞 ({{news.news_praise_count}})
+
已赞 ({{news.news_praise_count}})
+
赞 ({{news.news_praise_count}})
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 25d75d583..98992da59 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -18,8 +18,8 @@
回复 ({{homework.whomework_journal_count}})
-
已赞 ({{homework.whomework_praise_count}})
-
赞 ({{homework.whomework_praise_count}})
+
已赞 ({{homework.whomework_praise_count}})
+
赞 ({{homework.whomework_praise_count}})
diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 79afbb547..0fb443e67 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -18,8 +18,8 @@
回复 ({{issue.journals_count}})
-
已赞 ({{issue.issue_praise_count}})
-
赞 ({{issue.issue_praise_count}})
+
已赞 ({{issue.issue_praise_count}})
+
赞 ({{issue.issue_praise_count}})
diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index d866e887e..893d693c8 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -13,8 +13,8 @@
回复 ({{message.reply_count}})
-
已赞 ({{message.message_praise_count}})
-
赞 ({{message.message_praise_count}})
+
已赞 ({{message.message_praise_count}})
+
赞 ({{message.message_praise_count}})
diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index 2b31df8bf..62d6dc728 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -16,8 +16,8 @@
回复 ({{discussion.replies_count}})
-
已赞 ({{discussion.message_praise_count}})
-
赞 ({{discussion.message_praise_count}})
+
已赞 ({{discussion.message_praise_count}})
+
赞 ({{discussion.message_praise_count}})
From 79dcd48d8cbf1fb4020eeda7ec082104e22b09d8 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Thu, 7 Apr 2016 11:22:22 +0800 Subject: [PATCH 147/209] =?UTF-8?q?=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index c0104b358..4368adbdf 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -15,7 +15,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){ var getOpenId = function() { var deferred = $q.defer(); - if (typeof _openid !== 'undefined' && _openid.length > 0) { + if (typeof _openid !== 'undefined' && _openid.length > 0){ deferred.resolve(_openid); } else { var code = $routeParams.code; From 6d8ffabb39f450ac35b1e0e846f07932d64a7b56 Mon Sep 17 00:00:00 2001 From: txz Date: Thu, 7 Apr 2016 11:40:20 +0800 Subject: [PATCH 148/209] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 2 +- public/javascripts/wechat/app.js | 166 +++++---------------------- 2 files changed, 28 insertions(+), 140 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index ae8fe8136..e63bcf642 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -117,7 +117,7 @@
回复 ({{act.reply_count}})
-
一赞 ({{act.activity_praise_count}})
+
已赞 ({{act.activity_praise_count}})
赞 ({{act.activity_praise_count}})
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index c8edfaf84..9204d169b 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -10,7 +10,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){ var _openid = ''; if(debug===true){ - _openid = "1"; + _openid = "2"; } var getOpenId = function() { @@ -135,7 +135,7 @@ app.factory('common', function($http, auth){ var loadCommonData = function(id, type){ return $http({ method: 'GET', - url: apiUrl+ type + "/"+id + url: apiUrl+ type + "/" + id }) }; @@ -155,238 +155,126 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth, co $scope.issue = response.data.data; }, function errorCallback(response) { }); - } + }; loadData($routeParams.id); $scope.addIssueReply = function(data){ - console.log("add issue reply"); + console.log(data.comment); common.addCommonReply($routeParams.id, 'Issue', data, function(){ $scope.formData = {comment: ''}; loadData($routeParams.id); }); }; - - - - }); -app.controller('HomeworkController', function($scope, $http, $routeParams, auth){ +app.controller('HomeworkController', function($scope, $http, $routeParams, auth, common){ $scope.formData = {comment: ''}; var loadData = function(id){ - $http({ - method: 'GET', - url: apiUrl+ "whomeworks/"+id, - }).then(function successCallback(response) { + common.loadCommonData(id, 'whomeworks').then(function successCallback(response) { console.log(response.data); $scope.homework = response.data.data; - }, function errorCallback(response) { }); - } + }; loadData($routeParams.id); - $scope.addHomeworkReply = function(data){ console.log(data.comment); - - if(!data.comment || data.comment.length<=0){ - return; - } - - var userInfo = { - type: "HomeworkCommon", - content: data.comment, - openid: auth.openid(), - }; - - $http({ - method: 'POST', - url: apiUrl+ "new_comment/"+$routeParams.id, - data: userInfo, - }).then(function successCallback(response) { - alert("提交成功"); + common.addCommonReply($routeParams.id, 'HomeworkCommon', data, function(){ $scope.formData = {comment: ''}; loadData($routeParams.id); - }, function errorCallback(response) { }); - } + }; }); -app.controller('CourseNoticeController', function($scope, $http, $routeParams, auth){ +app.controller('CourseNoticeController', function($scope, $http, $routeParams, auth, common){ $scope.formData = {comment: ''}; var loadData = function(id){ - $http({ - method: 'GET', - url: apiUrl+ "newss/"+id, - }).then(function successCallback(response) { + common.loadCommonData(id, 'newss').then(function successCallback(response) { console.log(response.data); $scope.news = response.data.data; - }, function errorCallback(response) { }); - }; + } loadData($routeParams.id); - $scope.addNoticeReply = function(data){ console.log(data.comment); - - if(!data.comment || data.comment.length<=0){ - return; - } - - var userInfo = { - type: "News", - content: data.comment, - openid: auth.openid(), - }; - - $http({ - method: 'POST', - url: apiUrl+ "new_comment/"+$routeParams.id, - data: userInfo, - }).then(function successCallback(response) { - alert("提交成功"); + common.addCommonReply($routeParams.id, 'News', data, function(){ $scope.formData = {comment: ''}; loadData($routeParams.id); - }, function errorCallback(response) { }); } }); -app.controller('CourseDiscussionController', function($scope, $http, $routeParams, auth){ +app.controller('DiscussionController', function($scope, $http, $routeParams, auth, common){ $scope.formData = {comment: ''}; var loadData = function(id){ - $http({ - method: 'GET', - url: apiUrl+ "messages/"+id, - }).then(function successCallback(response) { + common.loadCommonData(id, 'messages').then(function successCallback(response) { console.log(response.data); $scope.discussion = response.data.data; - }, function errorCallback(response) { }); - }; + } loadData($routeParams.id); - $scope.addDiscussionReply = function(data){ console.log(data.comment); - - if(!data.comment || data.comment.length<=0){ - return; - } - - var userInfo = { - type: "Message", - content: data.comment, - openid: auth.openid(), - }; - - $http({ - method: 'POST', - url: apiUrl+ "new_comment/"+$routeParams.id, - data: userInfo, - }).then(function successCallback(response) { - alert("提交成功"); + common.addCommonReply($routeParams.id, 'Message', data, function(){ $scope.formData = {comment: ''}; loadData($routeParams.id); - }, function errorCallback(response) { }); } }); -app.controller('JournalsController', function($scope, $http, $routeParams, auth){ +app.controller('JournalsController', function($scope, $http, $routeParams, auth, common){ $scope.formData = {comment: ''}; var loadData = function(id){ - $http({ - method: 'GET', - url: apiUrl+ "journal_for_messages/"+id, - }).then(function successCallback(response) { + common.loadCommonData(id, 'journal_for_messages').then(function successCallback(response) { console.log(response.data); $scope.message = response.data.data; }, function errorCallback(response) { }); - }; + } loadData($routeParams.id); - $scope.addJournalReply = function(data){ console.log(data.comment); - - if(!data.comment || data.comment.length<=0){ - return; - } - - var userInfo = { - type: "JournalsForMessage", - content: data.comment, - openid: auth.openid(), - }; - - $http({ - method: 'POST', - url: apiUrl+ "new_comment/"+$routeParams.id, - data: userInfo, - }).then(function successCallback(response) { - alert("提交成功"); + common.addCommonReply($routeParams.id, 'JournalsForMessage', data, function(){ $scope.formData = {comment: ''}; loadData($routeParams.id); - }, function errorCallback(response) { }); } }); -app.controller('BlogController', function($scope, $http, $routeParams, auth){ +app.controller('BlogController', function($scope, $http, $routeParams, auth, common){ $scope.formData = {comment: ''}; var loadData = function(id){ - $http({ - method: 'GET', - url: apiUrl+ "blog_comments/"+id, - }).then(function successCallback(response) { + common.loadCommonData(id, 'blog_comments').then(function successCallback(response) { console.log(response.data); $scope.blog = response.data.data; }, function errorCallback(response) { }); - }; + } loadData($routeParams.id); - $scope.addBlogReply = function(data){ console.log(data.comment); - - if(!data.comment || data.comment.length<=0){ - return; - } - - var userInfo = { - type: "BlogComment", - content: data.comment, - openid: auth.openid(), - }; - - $http({ - method: 'POST', - url: apiUrl+ "new_comment/"+$routeParams.id, - data: userInfo, - }).then(function successCallback(response) { - alert("提交成功"); + common.addCommonReply($routeParams.id, 'BlogComment', data, function(){ $scope.formData = {comment: ''}; loadData($routeParams.id); - }, function errorCallback(response) { }); } }); @@ -409,7 +297,7 @@ app.config(['$routeProvider',function ($routeProvider) { }) .when('/project_discussion/:id', { templateUrl: 'project_discussion.html', - controller: 'CourseDiscussionController' + controller: 'DiscussionController' }) .when('/homework/:id', { templateUrl: 'homework_detail.html', @@ -421,7 +309,7 @@ app.config(['$routeProvider',function ($routeProvider) { }) .when('/course_discussion/:id', { templateUrl: 'course_discussion.html', - controller: 'CourseDiscussionController' + controller: 'DiscussionController' }) .when('/journal_for_message/:id', { templateUrl: 'jour_message_detail.html', From 99f39696d0ada73f3c13997dcd471441b67f46b6 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Thu, 7 Apr 2016 13:57:38 +0800 Subject: [PATCH 149/209] =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=B1=95=E5=BC=80?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 5 ++-- public/javascripts/wechat/app.js | 36 ++++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index ae8fe8136..2db18be26 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -16,8 +16,7 @@ 迟交扣分:{{act.homework_common_detail.late_penalty}}分 匿评开启时间:{{act.homework_common_detail.evaluation_start}}
缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品 匿评关闭时间:{{act.homework_common_detail.evaluation_end}}
- 点击展开 - 点击展开 + 点击展开
{{act.latest_update}}
@@ -110,7 +109,7 @@ 状态:{{act.issue_detail.issue_status}} 优先级:{{act.issue_detail.issue_priority}}
指派给:{{act.issue_detail.issue_assigned_to}} 完成度:{{act.issue_detail.done_ratio}}%
- 点击展开 + 点击展开
{{act.latest_update}}
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index f288a4b65..dc926574d 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -3,14 +3,14 @@ var apiUrl = 'http://wechat.trustie.net/api/v1/'; var debug = true; //调试标志,如果在本地请置为true if(debug===true){ - apiUrl = 'http://localhost:3000/api/v1/'; + //apiUrl = 'http://localhost:3000/api/v1/'; } app.factory('auth', function($http,$routeParams, $cookies, $q){ var _openid = ''; if(debug===true){ - _openid = "1"; + _openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; } var getOpenId = function() { @@ -397,6 +397,38 @@ app.filter('safeHtml', function ($sce) { } }); +app.directive('textAutoHeight', function($timeout){ + return { + restrict: 'A', + scope: {}, + link: function(scope, element, attr){ + scope.text = '点击展开'; + $timeout(function(){ + var e = element.parent().children().eq(4); + var height = e[0].scrollHeight; + var offsetHeight = e[0].offsetHeight; + console.log(height); + console.log(offsetHeight); + console.log(attr); + if(height>90){ + element.css('display', 'block'); + element.on('click', function(){ + if(element.text() == "点击展开"){ + e.css("height", height+'px'); + element.text("点击隐藏"); + } else { + e.css("height", '90px'); + element.text("点击展开"); + } + + }); + } + }, false); + + } + } +}); + app.config(['$routeProvider',function ($routeProvider) { $routeProvider .when('/activities', { From 23a4a29c768222320887ab3db8fc89d27c12c94e Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 7 Apr 2016 14:12:24 +0800 Subject: [PATCH 150/209] =?UTF-8?q?=E5=85=B3=E8=81=94=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E3=80=81=E8=AF=BE=E7=A8=8B=E4=B8=AD=E8=BF=87=E6=BB=A4=E6=8E=89?= =?UTF-8?q?=E7=A7=81=E6=9C=89=E8=AF=BE=E7=A8=8B=E3=80=81=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index ab97b5b1b..4fa7659c9 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -352,7 +352,7 @@ class OrganizationsController < ApplicationController if !params[:name].nil? condition = "%#{params[:name].strip}%".gsub(" ","") end - sql = "select courses.* from courses inner join members on courses.id = members.course_id where members.user_id = #{User.current.id} and courses.name like '#{condition}'"+ + sql = "select courses.* from courses inner join members on courses.id = members.course_id where members.user_id = #{User.current.id} and courses.is_public = 1 and courses.name like '#{condition}'"+ "and courses.id not in (select distinct org_courses.course_id from org_courses where org_courses.organization_id = #{@organization.id}) and courses.is_delete=0" #user_courses = Course.find_by_sql(sql) @courses = Course.find_by_sql(sql) @@ -396,7 +396,7 @@ class OrganizationsController < ApplicationController if !params[:name].nil? condition = "%#{params[:name].strip}%".gsub(" ","") end - sql = "select projects.* from projects inner join members on projects.id = members.project_id where members.user_id = #{User.current.id} and projects.status != 9 and projects.name like '#{condition}'" + + sql = "select projects.* from projects inner join members on projects.id = members.project_id where members.user_id = #{User.current.id} and projects.status != 9 and projects.is_public = 1 and projects.name like '#{condition}'" + " and projects.id not in (select org_projects.project_id from org_projects where organization_id = #{@organization.id}) and status=1" #user_projects = Course.find_by_sql(sql) @projects = Course.find_by_sql(sql) From 0b1b08bd3d6279f749ca8e4f82afd9507d9bc5b7 Mon Sep 17 00:00:00 2001 From: txz Date: Thu, 7 Apr 2016 14:15:19 +0800 Subject: [PATCH 151/209] =?UTF-8?q?=E7=82=B9=E8=B5=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 24 +++++++++++-------- public/assets/wechat/blog_detail.html | 2 +- public/assets/wechat/course_discussion.html | 2 +- public/assets/wechat/course_notice.html | 2 +- public/assets/wechat/homework_detail.html | 2 +- public/assets/wechat/issue_detail.html | 2 +- public/assets/wechat/jour_message_detail.html | 2 +- public/assets/wechat/project_discussion.html | 2 +- public/javascripts/wechat/app.js | 4 ++++ 9 files changed, 25 insertions(+), 17 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index e63bcf642..130898051 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -16,7 +16,6 @@ 迟交扣分:{{act.homework_common_detail.late_penalty}}分 匿评开启时间:{{act.homework_common_detail.evaluation_start}}
缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品 匿评关闭时间:{{act.homework_common_detail.evaluation_end}}
- 点击展开 点击展开
{{act.latest_update}} @@ -24,7 +23,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
+
赞 ({{act.activity_praise_count}})
+
已赞 ({{act.activity_praise_count}})
@@ -49,8 +49,8 @@
回复 ({{act.reply_count}})
-
一赞 ({{act.activity_praise_count}})
-
赞 ({{act.activity_praise_count}})
+
赞 ({{act.activity_praise_count}})
+
已赞 ({{act.activity_praise_count}})
@@ -73,7 +73,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
+
赞 ({{act.activity_praise_count}})
+
已赞 ({{act.activity_praise_count}})
@@ -117,8 +118,8 @@
回复 ({{act.reply_count}})
-
已赞 ({{act.activity_praise_count}})
-
赞 ({{act.activity_praise_count}})
+
赞 ({{act.activity_praise_count}})
+
已赞 ({{act.activity_praise_count}})
@@ -143,7 +144,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
+
赞 ({{act.activity_praise_count}})
+
已赞 ({{act.activity_praise_count}})
@@ -180,7 +182,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
+
赞 ({{act.activity_praise_count}})
+
已赞 ({{act.activity_praise_count}})
@@ -204,7 +207,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
+
赞 ({{act.activity_praise_count}})
+
已赞 ({{act.activity_praise_count}})
diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index 1fc92eabb..a2cb70650 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -17,7 +17,7 @@
回复 ({{blog.comments_count}})
已赞 ({{blog.blog_praise_count}})
-
赞 ({{blog.blog_praise_count}})
+
赞 ({{blog.blog_praise_count}})
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 2c2c210a9..416cfaa22 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -17,7 +17,7 @@
回复 ({{discussion.replies_count}})
已赞 ({{discussion.message_praise_count}})
-
赞 ({{discussion.message_praise_count}})
+
赞 ({{discussion.message_praise_count}})
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index eccd91848..737728d95 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -17,7 +17,7 @@
回复 ({{news.comments_count}})
已赞 ({{news.news_praise_count}})
-
赞 ({{news.news_praise_count}})
+
赞 ({{news.news_praise_count}})
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 98992da59..5926727e1 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -19,7 +19,7 @@
回复 ({{homework.whomework_journal_count}})
已赞 ({{homework.whomework_praise_count}})
-
赞 ({{homework.whomework_praise_count}})
+
赞 ({{homework.whomework_praise_count}})
diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 0fb443e67..3be9d0d21 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -19,7 +19,7 @@
回复 ({{issue.journals_count}})
已赞 ({{issue.issue_praise_count}})
-
赞 ({{issue.issue_praise_count}})
+
赞 ({{issue.issue_praise_count}})
diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index 893d693c8..990055b56 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -14,7 +14,7 @@
回复 ({{message.reply_count}})
已赞 ({{message.message_praise_count}})
-
赞 ({{message.message_praise_count}})
+
赞 ({{message.message_praise_count}})
diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index 62d6dc728..6c06b95e9 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -17,7 +17,7 @@
回复 ({{discussion.replies_count}})
已赞 ({{discussion.message_praise_count}})
-
赞 ({{discussion.message_praise_count}})
+
赞 ({{discussion.message_praise_count}})
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 9204d169b..6c8d79c48 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -97,6 +97,10 @@ app.controller('ActivityController',function($scope, $http, auth, rms){ //$http } + $scope.decreasePraise = function(act){ + act.activity_praise_count -= 1; + act.has_praise = false; + } $scope.loadActData = loadActData; From f1783c06a211b5cd0c58ad9a8ca46b52f90a1c61 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 7 Apr 2016 14:24:15 +0800 Subject: [PATCH 152/209] =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BC=A0=E5=8F=82openid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/app.js | 39 +++++++++++++------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 5e6234501..6061b665e 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -3,14 +3,14 @@ var apiUrl = 'http://wechat.trustie.net/api/v1/'; var debug = true; //调试标志,如果在本地请置为true if(debug===true){ - //apiUrl = 'http://localhost:3000/api/v1/'; + apiUrl = 'http://localhost:3000/api/v1/'; } app.factory('auth', function($http,$routeParams, $cookies, $q){ var _openid = ''; if(debug===true){ - _openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; + _openid = "1"; } var getOpenId = function() { @@ -43,7 +43,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){ }; var openid = function(){ return _openid; - } + }; return {getOpenId: getOpenId, openid: openid}; }); @@ -56,7 +56,7 @@ app.factory('rms', function(){ var get = function(key){ return _saveStorage[key]; - } + }; return {save: save, get: get}; }); @@ -64,7 +64,7 @@ app.factory('rms', function(){ app.controller('ActivityController',function($scope, $http, auth, rms){ $scope.replaceUrl = function(url){ return "http://www.trustie.net/" + url; - } + }; console.log("ActivityController load"); $scope.activities = rms.get("activities") || []; @@ -75,13 +75,13 @@ app.controller('ActivityController',function($scope, $http, auth, rms){ $http({ method: 'POST', url: apiUrl+ "activities", - data: {openid: auth.openid(), page: page}, + data: {openid: auth.openid(), page: page} }).then(function successCallback(response) { $scope.activities = $scope.activities.concat(response.data.data); rms.save('activities', $scope.activities); }, function errorCallback(response) { }); - } + }; auth.getOpenId().then( function successCallback(response){ loadActData($scope.page); @@ -96,11 +96,11 @@ app.controller('ActivityController',function($scope, $http, auth, rms){ //$http - } + }; $scope.decreasePraise = function(act){ act.activity_praise_count -= 1; act.has_praise = false; - } + }; $scope.loadActData = loadActData; @@ -133,23 +133,16 @@ app.factory('common', function($http, auth){ }); }; - - - var loadCommonData = function(id, type){ return $http({ method: 'GET', - url: apiUrl+ type + "/" + id + url: apiUrl+ type + "/" + id+"?openid="+auth.openid() }) }; return {addCommonReply: addCommonReply, loadCommonData: loadCommonData}; - - }); - - app.controller('IssueController', function($scope, $http, $routeParams, auth, common){ $scope.formData = {comment: ''}; @@ -204,7 +197,7 @@ app.controller('CourseNoticeController', function($scope, $http, $routeParams, a $scope.news = response.data.data; }, function errorCallback(response) { }); - } + }; loadData($routeParams.id); @@ -226,7 +219,7 @@ app.controller('DiscussionController', function($scope, $http, $routeParams, aut $scope.discussion = response.data.data; }, function errorCallback(response) { }); - } + }; loadData($routeParams.id); @@ -248,7 +241,7 @@ app.controller('JournalsController', function($scope, $http, $routeParams, auth, $scope.message = response.data.data; }, function errorCallback(response) { }); - } + }; loadData($routeParams.id); @@ -258,7 +251,7 @@ app.controller('JournalsController', function($scope, $http, $routeParams, auth, $scope.formData = {comment: ''}; loadData($routeParams.id); }); - } + }; }); app.controller('BlogController', function($scope, $http, $routeParams, auth, common){ @@ -270,7 +263,7 @@ app.controller('BlogController', function($scope, $http, $routeParams, auth, com $scope.blog = response.data.data; }, function errorCallback(response) { }); - } + }; loadData($routeParams.id); @@ -280,7 +273,7 @@ app.controller('BlogController', function($scope, $http, $routeParams, auth, com $scope.formData = {comment: ''}; loadData($routeParams.id); }); - } + }; }); app.filter('safeHtml', function ($sce) { From eb996280a6048388bcda33219506894bd4edc1a8 Mon Sep 17 00:00:00 2001 From: txz Date: Thu, 7 Apr 2016 15:07:37 +0800 Subject: [PATCH 153/209] =?UTF-8?q?=E7=82=B9=E8=B5=9E=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/app.js | 56 ++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 6061b665e..0a7e80d16 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -10,7 +10,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){ var _openid = ''; if(debug===true){ - _openid = "1"; + _openid = "2"; } var getOpenId = function() { @@ -61,7 +61,7 @@ app.factory('rms', function(){ return {save: save, get: get}; }); -app.controller('ActivityController',function($scope, $http, auth, rms){ +app.controller('ActivityController',function($scope, $http, auth, rms, common){ $scope.replaceUrl = function(url){ return "http://www.trustie.net/" + url; }; @@ -90,23 +90,22 @@ app.controller('ActivityController',function($scope, $http, auth, rms){ } ); - $scope.addPraise = function(act){ - act.activity_praise_count += 1; - act.has_praise = true; - //$http + $scope.loadActData = loadActData; - }; - $scope.decreasePraise = function(act){ - act.activity_praise_count -= 1; - act.has_praise = false; - }; + $scope.addPraise = function(act){ + console.log(act); + common.addCommonPraise(act,'activities'); + } - $scope.loadActData = loadActData; + $scope.decreasePraise = function(act){ + console.log(act); + common.decreaseCommonPraise(act,'activities'); + } }); -app.factory('common', function($http, auth){ +app.factory('common', function($http, auth, $routeParams){ var addCommonReply = function(id, type, data, cb){ console.log(data.comment); @@ -140,7 +139,36 @@ app.factory('common', function($http, auth){ }) }; - return {addCommonReply: addCommonReply, loadCommonData: loadCommonData}; + var addCommonPraise = function(act, type){ + act.activity_praise_count += 1; + act.has_praise = true; + + $http({ + method: 'POST', + url: apiUrl, + data:{openid:auth.openid(),type:type,id:$routeParams.id} + }).then(function successCallback(response) { + console.log("点赞成功"); + }, function errorCallback(response) { + }); + + }; + + var decreaseCommonPraise = function(act, type){ + act.activity_praise_count -= 1; + act.has_praise = false; + + $http({ + method: 'POST', + url: apiUrl , + data:{openid:auth.openid(),type:type,id:$routeParams.id} + }).then(function successCallback(response) { + console.log("取消赞成功"); + }, function errorCallback(response) { + }); + }; + + return {addCommonReply: addCommonReply, loadCommonData: loadCommonData, addCommonPraise: addCommonPraise, decreaseCommonPraise: decreaseCommonPraise}; }); app.controller('IssueController', function($scope, $http, $routeParams, auth, common){ From c8e769e05b9f95634a79f2a43f222169412c3f2e Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 7 Apr 2016 15:09:17 +0800 Subject: [PATCH 154/209] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E5=80=92=E5=BA=8F?= =?UTF-8?q?=E6=8E=92=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/blog_comment.rb | 2 +- app/api/mobile/entities/issue.rb | 2 +- app/api/mobile/entities/jours.rb | 2 +- app/api/mobile/entities/message.rb | 2 +- app/api/mobile/entities/news.rb | 2 +- app/api/mobile/entities/whomework.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/api/mobile/entities/blog_comment.rb b/app/api/mobile/entities/blog_comment.rb index 6961823d0..dad3f7a93 100644 --- a/app/api/mobile/entities/blog_comment.rb +++ b/app/api/mobile/entities/blog_comment.rb @@ -42,7 +42,7 @@ module Mobile blog_comment_expose :blog_praise_count expose :blog_comment_children, using:Mobile::Entities::BlogComment do |c,opt| if c.is_a? (::BlogComment) - c.children + c.children.reverse end end expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index e64248353..41b9003d6 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -46,7 +46,7 @@ module Mobile issue_expose :issue_praise_count expose :issue_journals, using: Mobile::Entities::Journal do |f, opt| if f.is_a?(::Issue) - f.journals.where("notes is not null and notes != ''") + f.journals.where("notes is not null and notes != ''").reverse end end expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| diff --git a/app/api/mobile/entities/jours.rb b/app/api/mobile/entities/jours.rb index 87bbd0184..3d3e76e7c 100644 --- a/app/api/mobile/entities/jours.rb +++ b/app/api/mobile/entities/jours.rb @@ -48,7 +48,7 @@ module Mobile end expose :child_reply,using: Mobile::Entities::Jours do |f, opt| if f.is_a?(::JournalsForMessage) - f.children + f.children.reverse end end expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| diff --git a/app/api/mobile/entities/message.rb b/app/api/mobile/entities/message.rb index 7a00b5725..fe55bc090 100644 --- a/app/api/mobile/entities/message.rb +++ b/app/api/mobile/entities/message.rb @@ -49,7 +49,7 @@ module Mobile message_expose :lasted_comment expose :message_children,using:Mobile::Entities::Message do |c,opt| if c.is_a? (::Message) - c.children + c.children.reverse end end expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| diff --git a/app/api/mobile/entities/news.rb b/app/api/mobile/entities/news.rb index 85504a280..aab9a93b0 100644 --- a/app/api/mobile/entities/news.rb +++ b/app/api/mobile/entities/news.rb @@ -70,7 +70,7 @@ module Mobile if f.is_a?(Hash) && f.key?(:comments) f[:comments] elsif f.is_a?(::News) && f.respond_to?(:comments) - f.send(:comments) + f.comments.reverse end end expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| diff --git a/app/api/mobile/entities/whomework.rb b/app/api/mobile/entities/whomework.rb index 76b88ec6f..4c4dd2403 100644 --- a/app/api/mobile/entities/whomework.rb +++ b/app/api/mobile/entities/whomework.rb @@ -64,7 +64,7 @@ module Mobile expose :journals_for_messages, using: Mobile::Entities::Jours do |f, opt| #f[:journals_for_messages] if f.is_a?(Hash) && f.key?(:journals_for_messages) if f.is_a?(::HomeworkCommon) - f.journals_for_messages + f.journals_for_messages.reverse end end expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| From 2fe32fda61556b0434f05fd11a1b96413298e7e0 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 7 Apr 2016 15:17:42 +0800 Subject: [PATCH 155/209] =?UTF-8?q?=E7=82=B9=E8=B5=9E=E7=9A=84js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/praise.rb | 2 +- public/assets/wechat/activities.html | 4 ++-- public/javascripts/wechat/app.js | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/api/mobile/apis/praise.rb b/app/api/mobile/apis/praise.rb index 3ba6e5eb7..e5577eeb3 100644 --- a/app/api/mobile/apis/praise.rb +++ b/app/api/mobile/apis/praise.rb @@ -21,7 +21,7 @@ module Mobile praise_or_cancel(obj_type,obj_id,user,1) num = get_activity_praise_num(obj) else - pts.delete if !pts.nil? + pts.delete if !pts.empty? #再更新praise_tread_cache表 使相应的记录减1 当为0时删除 ptc = PraiseTreadCache.where("object_id=? and object_type=?",obj_id,obj_type.to_s).first ptc.praise_minus(1) if !ptc.nil? diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index c99c9ee09..716385537 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -118,8 +118,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
-
已赞 ({{act.activity_praise_count}})
+
赞 ({{act.activity_praise_count}})
+
已赞 ({{act.activity_praise_count}})
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 0a7e80d16..1e0e0f737 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -93,9 +93,9 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){ $scope.loadActData = loadActData; - $scope.addPraise = function(act){ - console.log(act); - common.addCommonPraise(act,'activities'); + $scope.addPraise = function(id, type){ + console.log(type); + common.addCommonPraise(id, type); } $scope.decreasePraise = function(act){ @@ -139,14 +139,14 @@ app.factory('common', function($http, auth, $routeParams){ }) }; - var addCommonPraise = function(act, type){ + var addCommonPraise = function(id, type){ act.activity_praise_count += 1; act.has_praise = true; $http({ method: 'POST', - url: apiUrl, - data:{openid:auth.openid(),type:type,id:$routeParams.id} + url: apiUrl + "praise/" +id, + data:{openid:auth.openid(),type:type} }).then(function successCallback(response) { console.log("点赞成功"); }, function errorCallback(response) { @@ -154,14 +154,14 @@ app.factory('common', function($http, auth, $routeParams){ }; - var decreaseCommonPraise = function(act, type){ + var decreaseCommonPraise = function(id, type){ act.activity_praise_count -= 1; act.has_praise = false; $http({ method: 'POST', - url: apiUrl , - data:{openid:auth.openid(),type:type,id:$routeParams.id} + url: apiUrl + "praise/" +id, + data:{openid:auth.openid(),type:type} }).then(function successCallback(response) { console.log("取消赞成功"); }, function errorCallback(response) { From 8d40950491c822043ba5186cae3e3459d5733445 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 7 Apr 2016 15:20:25 +0800 Subject: [PATCH 156/209] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E9=94=81=E5=AE=9A=E5=90=8E=E4=B8=8D=E8=83=BD=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_project_message.html.erb | 36 ++++++++++++----------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 2e7fb0f12..c071f4a13 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -145,23 +145,25 @@
<% end %> -
-
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
-
- <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> - - -
- - -
-

- <% end%> + <% if !activity.locked? %> +
+
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
+
+
+ <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> + + +
+ + +
+

+ <% end%> +
+
+
+
-
-
-
-
+ <% end %>
From 938bf48d08be3b425786409617448d9311f58abd Mon Sep 17 00:00:00 2001 From: txz Date: Thu, 7 Apr 2016 15:26:23 +0800 Subject: [PATCH 157/209] =?UTF-8?q?=E7=82=B9=E8=B5=9E=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 4 ++-- public/javascripts/wechat/app.js | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 716385537..c99c9ee09 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -118,8 +118,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
-
已赞 ({{act.activity_praise_count}})
+
赞 ({{act.activity_praise_count}})
+
已赞 ({{act.activity_praise_count}})
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 1e0e0f737..cfbda146e 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -10,7 +10,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){ var _openid = ''; if(debug===true){ - _openid = "2"; + _openid = "1"; } var getOpenId = function() { @@ -93,14 +93,14 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){ $scope.loadActData = loadActData; - $scope.addPraise = function(id, type){ - console.log(type); - common.addCommonPraise(id, type); + $scope.addPraise = function(act){ + console.log(act); + common.addCommonPraise(act); } $scope.decreasePraise = function(act){ console.log(act); - common.decreaseCommonPraise(act,'activities'); + common.decreaseCommonPraise(act); } }); @@ -139,14 +139,14 @@ app.factory('common', function($http, auth, $routeParams){ }) }; - var addCommonPraise = function(id, type){ + var addCommonPraise = function(act){ act.activity_praise_count += 1; act.has_praise = true; $http({ method: 'POST', - url: apiUrl + "praise/" +id, - data:{openid:auth.openid(),type:type} + url: apiUrl + "praise/" + act.act_id, + data:{openid:auth.openid(),type:act.act_type} }).then(function successCallback(response) { console.log("点赞成功"); }, function errorCallback(response) { @@ -154,14 +154,14 @@ app.factory('common', function($http, auth, $routeParams){ }; - var decreaseCommonPraise = function(id, type){ + var decreaseCommonPraise = function(act){ act.activity_praise_count -= 1; act.has_praise = false; $http({ method: 'POST', - url: apiUrl + "praise/" +id, - data:{openid:auth.openid(),type:type} + url: apiUrl + "praise/" + act.act_id, + data:{openid:auth.openid(),type:act.act_type} }).then(function successCallback(response) { console.log("取消赞成功"); }, function errorCallback(response) { From 60c8320f824f51e11f0ece75256d1e27e82fcc14 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 7 Apr 2016 15:42:08 +0800 Subject: [PATCH 158/209] =?UTF-8?q?praise=20api=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/api.rb | 2 ++ app/api/mobile/apis/praise.rb | 2 +- public/javascripts/wechat/app.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/api/mobile/api.rb b/app/api/mobile/api.rb index 7235a447b..23014b0c1 100644 --- a/app/api/mobile/api.rb +++ b/app/api/mobile/api.rb @@ -15,6 +15,7 @@ module Mobile require_relative 'apis/messages' require_relative 'apis/blog_comments' require_relative 'apis/new_comment' + require_relative 'apis/praise' class API < Grape::API version 'v1', using: :path @@ -56,6 +57,7 @@ module Mobile mount Apis::Messages mount Apis::BlogComments mount Apis::NewComment + mount Apis::Praise #add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'}) #add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development? diff --git a/app/api/mobile/apis/praise.rb b/app/api/mobile/apis/praise.rb index e5577eeb3..b3bc8f466 100644 --- a/app/api/mobile/apis/praise.rb +++ b/app/api/mobile/apis/praise.rb @@ -15,7 +15,7 @@ module Mobile obj_id = params[:id] obj_type = params[:type] user = UserWechat.find_by_openid(params[:openid]).user - obj = find_object_by_type_and_id(obj_id,obj_type) + obj = PraiseTreadCache.find_object_by_type_and_id(obj_id,obj_type) pts = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",obj_id,obj_type.to_s,user.id) if pts.empty? praise_or_cancel(obj_type,obj_id,user,1) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index cfbda146e..0d79caaed 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -148,7 +148,7 @@ app.factory('common', function($http, auth, $routeParams){ url: apiUrl + "praise/" + act.act_id, data:{openid:auth.openid(),type:act.act_type} }).then(function successCallback(response) { - console.log("点赞成功"); + console.log(response.data); }, function errorCallback(response) { }); From 139a7931ee5b374f0cd25ec2d34b20d5deb49d56 Mon Sep 17 00:00:00 2001 From: txz Date: Thu, 7 Apr 2016 16:39:04 +0800 Subject: [PATCH 159/209] =?UTF-8?q?=E7=82=B9=E8=B5=9E=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/praise.rb | 15 ++-- public/assets/wechat/activities.html | 28 +++---- public/assets/wechat/blog_detail.html | 4 +- public/assets/wechat/course_discussion.html | 4 +- public/assets/wechat/course_notice.html | 4 +- public/assets/wechat/homework_detail.html | 4 +- public/assets/wechat/issue_detail.html | 4 +- public/assets/wechat/jour_message_detail.html | 4 +- public/assets/wechat/project_discussion.html | 4 +- public/javascripts/wechat/app.js | 74 +++++++++++++++++-- 10 files changed, 103 insertions(+), 42 deletions(-) diff --git a/app/api/mobile/apis/praise.rb b/app/api/mobile/apis/praise.rb index b3bc8f466..57dbd0729 100644 --- a/app/api/mobile/apis/praise.rb +++ b/app/api/mobile/apis/praise.rb @@ -15,20 +15,21 @@ module Mobile obj_id = params[:id] obj_type = params[:type] user = UserWechat.find_by_openid(params[:openid]).user - obj = PraiseTreadCache.find_object_by_type_and_id(obj_id,obj_type) - pts = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",obj_id,obj_type.to_s,user.id) - if pts.empty? + pts = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",obj_id,obj_type.to_s,user.id).first + if pts.blank? praise_or_cancel(obj_type,obj_id,user,1) - num = get_activity_praise_num(obj) + obj = PraiseTreadCache.where("object_id=? and object_type=?",obj_id,obj_type.to_s).first + num = get_activity_praise_num(obj) if !obj.blank? else - pts.delete if !pts.empty? + pts.destroy if !pts.blank? #再更新praise_tread_cache表 使相应的记录减1 当为0时删除 ptc = PraiseTreadCache.where("object_id=? and object_type=?",obj_id,obj_type.to_s).first - ptc.praise_minus(1) if !ptc.nil? + ptc.praise_minus(1) if !ptc.blank? if ptc.praise_num == 0 ptc.delete end - num = get_activity_praise_num(obj) + obj = PraiseTreadCache.where("object_id=? and object_type=?",obj_id,obj_type.to_s).first + num = !obj.blank? ? get_activity_praise_num(obj) : 0 end present :data, num diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index c99c9ee09..b3c8f1b99 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -23,8 +23,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
-
已赞 ({{act.activity_praise_count}})
+
赞 ({{act.praise_count}})
+
已赞 ({{act.praise_count}})
@@ -49,8 +49,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
-
已赞 ({{act.activity_praise_count}})
+
赞 ({{act.praise_count}})
+
已赞 ({{act.praise_count}})
@@ -73,8 +73,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
-
已赞 ({{act.activity_praise_count}})
+
赞 ({{act.praise_count}})
+
已赞 ({{act.praise_count}})
@@ -118,8 +118,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
-
已赞 ({{act.activity_praise_count}})
+
赞 ({{act.praise_count}})
+
已赞 ({{act.praise_count}})
@@ -144,8 +144,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
-
已赞 ({{act.activity_praise_count}})
+
赞 ({{act.praise_count}})
+
已赞 ({{act.praise_count}})
@@ -182,8 +182,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
-
已赞 ({{act.activity_praise_count}})
+
赞 ({{act.praise_count}})
+
已赞 ({{act.praise_count}})
@@ -207,8 +207,8 @@
回复 ({{act.reply_count}})
-
赞 ({{act.activity_praise_count}})
-
已赞 ({{act.activity_praise_count}})
+
赞 ({{act.praise_count}})
+
已赞 ({{act.praise_count}})
diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index a2cb70650..3c5c30945 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -16,8 +16,8 @@
回复 ({{blog.comments_count}})
-
已赞 ({{blog.blog_praise_count}})
-
赞 ({{blog.blog_praise_count}})
+
已赞 ({{blog.praise_count}})
+
赞 ({{blog.praise_count}})
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 416cfaa22..680e92f5d 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -16,8 +16,8 @@
回复 ({{discussion.replies_count}})
-
已赞 ({{discussion.message_praise_count}})
-
赞 ({{discussion.message_praise_count}})
+
已赞 ({{discussion.praise_count}})
+
赞 ({{discussion.praise_count}})
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index 737728d95..6bc5a790c 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -16,8 +16,8 @@
回复 ({{news.comments_count}})
-
已赞 ({{news.news_praise_count}})
-
赞 ({{news.news_praise_count}})
+
已赞 ({{news.praise_count}})
+
赞 ({{news.praise_count}})
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 5926727e1..abc92f133 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -18,8 +18,8 @@
回复 ({{homework.whomework_journal_count}})
-
已赞 ({{homework.whomework_praise_count}})
-
赞 ({{homework.whomework_praise_count}})
+
已赞 ({{homework.praise_count}})
+
赞 ({{homework.praise_count}})
diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 3be9d0d21..fc9591692 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -18,8 +18,8 @@
回复 ({{issue.journals_count}})
-
已赞 ({{issue.issue_praise_count}})
-
赞 ({{issue.issue_praise_count}})
+
已赞 ({{issue.praise_count}})
+
赞 ({{issue.praise_count}})
diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index 990055b56..cdc817941 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -13,8 +13,8 @@
回复 ({{message.reply_count}})
-
已赞 ({{message.message_praise_count}})
-
赞 ({{message.message_praise_count}})
+
已赞 ({{message.praise_count}})
+
赞 ({{message.praise_count}})
diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index 6c06b95e9..3fa7b0949 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -16,8 +16,8 @@
回复 ({{discussion.replies_count}})
-
已赞 ({{discussion.message_praise_count}})
-
赞 ({{discussion.message_praise_count}})
+
已赞 ({{discussion.praise_count}})
+
赞 ({{discussion.praise_count}})
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 0d79caaed..57003f9e1 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -96,12 +96,12 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){ $scope.addPraise = function(act){ console.log(act); common.addCommonPraise(act); - } + }; $scope.decreasePraise = function(act){ console.log(act); common.decreaseCommonPraise(act); - } + }; }); @@ -140,7 +140,7 @@ app.factory('common', function($http, auth, $routeParams){ }; var addCommonPraise = function(act){ - act.activity_praise_count += 1; + act.praise_count += 1; act.has_praise = true; $http({ @@ -155,7 +155,7 @@ app.factory('common', function($http, auth, $routeParams){ }; var decreaseCommonPraise = function(act){ - act.activity_praise_count -= 1; + act.praise_count -= 1; act.has_praise = false; $http({ @@ -163,7 +163,7 @@ app.factory('common', function($http, auth, $routeParams){ url: apiUrl + "praise/" + act.act_id, data:{openid:auth.openid(),type:act.act_type} }).then(function successCallback(response) { - console.log("取消赞成功"); + console.log(response.data); }, function errorCallback(response) { }); }; @@ -192,6 +192,16 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth, co }); }; + + $scope.addPraise = function(act){ + console.log(act); + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + console.log(act); + common.decreaseCommonPraise(act); + }; }); app.controller('HomeworkController', function($scope, $http, $routeParams, auth, common){ @@ -214,6 +224,16 @@ app.controller('HomeworkController', function($scope, $http, $routeParams, auth, loadData($routeParams.id); }); }; + + $scope.addPraise = function(act){ + console.log(act); + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + console.log(act); + common.decreaseCommonPraise(act); + }; }); app.controller('CourseNoticeController', function($scope, $http, $routeParams, auth, common){ @@ -235,7 +255,17 @@ app.controller('CourseNoticeController', function($scope, $http, $routeParams, a $scope.formData = {comment: ''}; loadData($routeParams.id); }); - } + }; + + $scope.addPraise = function(act){ + console.log(act); + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + console.log(act); + common.decreaseCommonPraise(act); + }; }); app.controller('DiscussionController', function($scope, $http, $routeParams, auth, common){ @@ -257,7 +287,17 @@ app.controller('DiscussionController', function($scope, $http, $routeParams, aut $scope.formData = {comment: ''}; loadData($routeParams.id); }); - } + }; + + $scope.addPraise = function(act){ + console.log(act); + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + console.log(act); + common.decreaseCommonPraise(act); + }; }); app.controller('JournalsController', function($scope, $http, $routeParams, auth, common){ @@ -280,6 +320,16 @@ app.controller('JournalsController', function($scope, $http, $routeParams, auth, loadData($routeParams.id); }); }; + + $scope.addPraise = function(act){ + console.log(act); + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + console.log(act); + common.decreaseCommonPraise(act); + }; }); app.controller('BlogController', function($scope, $http, $routeParams, auth, common){ @@ -302,6 +352,16 @@ app.controller('BlogController', function($scope, $http, $routeParams, auth, com loadData($routeParams.id); }); }; + + $scope.addPraise = function(act){ + console.log(act); + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + console.log(act); + common.decreaseCommonPraise(act); + }; }); app.filter('safeHtml', function ($sce) { From dc0bf4df30990eba6440988cc6e4b96f27e1ef84 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 7 Apr 2016 16:40:21 +0800 Subject: [PATCH 160/209] =?UTF-8?q?=E4=BC=A0act=5Fid=E3=80=81act=5Ftype?= =?UTF-8?q?=E5=88=B0=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/activity.rb | 4 ++-- app/api/mobile/entities/blog_comment.rb | 12 +++++++++--- app/api/mobile/entities/issue.rb | 10 ++++++++-- app/api/mobile/entities/jours.rb | 11 +++++++++-- app/api/mobile/entities/message.rb | 10 ++++++++-- app/api/mobile/entities/news.rb | 10 ++++++++-- app/api/mobile/entities/whomework.rb | 10 ++++++++-- 7 files changed, 52 insertions(+), 15 deletions(-) diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index 59127dedd..91e7d220b 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -49,7 +49,7 @@ module Mobile end when :latest_update time_from_now ac.updated_at unless ac.nil? - when :activity_praise_count + when :praise_count if ac.act_type == "HomeworkCommon" || ac.act_type == "News" || ac.act_type == "Message" || ac.act_type == "BlogComment" || ac.act_type == "JournalsForMessage" || ac.act_type == "Issue" ac.nil? || ac.act.nil? ? 0 : get_activity_praise_num(ac.act) end @@ -123,7 +123,7 @@ module Mobile end end act_expose :reply_count #回复数 - act_expose :activity_praise_count #点赞数 + act_expose :praise_count #点赞数 #act_expose :user_act #某个动态 act_expose :subject #标题 act_expose :description #描述 diff --git a/app/api/mobile/entities/blog_comment.rb b/app/api/mobile/entities/blog_comment.rb index dad3f7a93..655050fdd 100644 --- a/app/api/mobile/entities/blog_comment.rb +++ b/app/api/mobile/entities/blog_comment.rb @@ -16,10 +16,14 @@ module Mobile end else case f - when :blog_praise_count + when :praise_count get_activity_praise_num(u) when :lasted_comment time_from_now(u.created_at) + when :act_type + 'BlogComment' + when :act_id + u.id end end end @@ -32,6 +36,8 @@ module Mobile c.author end end + blog_comment_expose :act_type + blog_comment_expose :act_id blog_comment_expose :blog_id blog_comment_expose :title blog_comment_expose :content @@ -39,13 +45,13 @@ module Mobile blog_comment_expose :created_at blog_comment_expose :lasted_comment blog_comment_expose :id - blog_comment_expose :blog_praise_count + blog_comment_expose :praise_count expose :blog_comment_children, using:Mobile::Entities::BlogComment do |c,opt| if c.is_a? (::BlogComment) c.children.reverse end end - expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| + expose :has_praise, if: lambda { |instance, options| options[:user] } do |instance, options| has_praise = false current_user = options[:user] obj = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",instance.id,instance.class.to_s,current_user.id) diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index 41b9003d6..ef3d09450 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -26,8 +26,12 @@ module Mobile issue.journals.where("notes is not null and notes != ''").count when :project_name issue.project.name - when :issue_praise_count + when :praise_count get_activity_praise_num(issue) + when :act_type + 'Issue' + when :act_id + issue.id end end end @@ -37,13 +41,15 @@ module Mobile expose :description expose :author, using: Mobile::Entities::User expose :done_ratio + issue_expose :act_type + issue_expose :act_id issue_expose :created_on issue_expose :issue_priority issue_expose :issue_assigned_to issue_expose :issue_status issue_expose :journals_count issue_expose :project_name - issue_expose :issue_praise_count + issue_expose :praise_count expose :issue_journals, using: Mobile::Entities::Journal do |f, opt| if f.is_a?(::Issue) f.journals.where("notes is not null and notes != ''").reverse diff --git a/app/api/mobile/entities/jours.rb b/app/api/mobile/entities/jours.rb index 3d3e76e7c..15e22174c 100644 --- a/app/api/mobile/entities/jours.rb +++ b/app/api/mobile/entities/jours.rb @@ -19,12 +19,19 @@ module Mobile time_from_now f.created_on when :reply_count f.children.count - when :message_praise_count + when :praise_count get_activity_praise_num(f) + when :act_type + 'JournalsForMessage' + when :act_id + f.id end end end end + + jours_expose :act_type + jours_expose :act_id jours_expose :id jours_expose :jour_type jours_expose :jour_id @@ -37,7 +44,7 @@ module Mobile jours_expose :m_reply_id jours_expose :m_parent_id jours_expose :reply_count - jours_expose :message_praise_count + jours_expose :praise_count expose :course,using:Mobile::Entities::Course do |f,opt| if f.is_a?(::JournalsForMessage) && f[:jour_type] == "Course" f.course diff --git a/app/api/mobile/entities/message.rb b/app/api/mobile/entities/message.rb index fe55bc090..912b07e62 100644 --- a/app/api/mobile/entities/message.rb +++ b/app/api/mobile/entities/message.rb @@ -24,8 +24,12 @@ module Mobile end when :lasted_comment time_from_now u.created_on - when :message_praise_count + when :praise_count get_activity_praise_num(u) + when :act_type + 'Message' + when :act_id + u.id end end end @@ -38,12 +42,14 @@ module Mobile c.author end end + message_expose :act_type + message_expose :act_id message_expose :course_project_name message_expose :board_id message_expose :subject message_expose :content message_expose :replies_count - message_expose :message_praise_count + message_expose :praise_count message_expose :created_on message_expose :id message_expose :lasted_comment diff --git a/app/api/mobile/entities/news.rb b/app/api/mobile/entities/news.rb index aab9a93b0..4f973d82e 100644 --- a/app/api/mobile/entities/news.rb +++ b/app/api/mobile/entities/news.rb @@ -18,8 +18,12 @@ module Mobile case field when :course_name get_course(f.course_id).name unless f.course_id == nil - when :news_praise_count + when :praise_count get_activity_praise_num(f) + when :act_type + 'News' + when :act_id + f.id end end elsif f.is_a?(Hash) && !f.key?(field) @@ -50,6 +54,8 @@ module Mobile end obj end + news_expose :act_type + news_expose :act_id #作者id news_expose :author_id #作者名 @@ -62,7 +68,7 @@ module Mobile news_expose :created_on #评论数量 news_expose :comments_count - news_expose :news_praise_count + news_expose :praise_count #课程名字 news_expose :course_name #评论 diff --git a/app/api/mobile/entities/whomework.rb b/app/api/mobile/entities/whomework.rb index 4c4dd2403..5101d68eb 100644 --- a/app/api/mobile/entities/whomework.rb +++ b/app/api/mobile/entities/whomework.rb @@ -24,12 +24,16 @@ module Mobile wh.nil? || wh.homework_detail_manual.nil? ? nil : convert_to_time(wh.homework_detail_manual.evaluation_start, 0) when :evaluation_end wh.nil? || wh.homework_detail_manual.nil? ? nil : convert_to_time(wh.homework_detail_manual.evaluation_end, 1) - when :whomework_praise_count + when :praise_count get_activity_praise_num(wh) when :whomework_journal_count wh.journals_for_messages.count when :course_name wh.course.name + when :act_type + 'Homework' + when :act_id + wh.id end end end @@ -54,12 +58,14 @@ module Mobile expose :anonymous_comment expose :quotes expose :is_open + whomework_expose :act_type + whomework_expose :act_id whomework_expose :course_name whomework_expose :created_at whomework_expose :absence_penalty whomework_expose :evaluation_start whomework_expose :evaluation_end - whomework_expose :whomework_praise_count + whomework_expose :praise_count whomework_expose :whomework_journal_count expose :journals_for_messages, using: Mobile::Entities::Jours do |f, opt| #f[:journals_for_messages] if f.is_a?(Hash) && f.key?(:journals_for_messages) From 523a623f1ba176a086fccecf3809334bd35e7482 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 7 Apr 2016 16:53:37 +0800 Subject: [PATCH 161/209] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E7=82=B9=E8=B5=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/whomework.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/mobile/entities/whomework.rb b/app/api/mobile/entities/whomework.rb index 5101d68eb..8985f3d60 100644 --- a/app/api/mobile/entities/whomework.rb +++ b/app/api/mobile/entities/whomework.rb @@ -31,7 +31,7 @@ module Mobile when :course_name wh.course.name when :act_type - 'Homework' + 'HomeworkCommon' when :act_id wh.id end From ae981cfb072b47681a628de994deced01c45211a Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 7 Apr 2016 16:57:40 +0800 Subject: [PATCH 162/209] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=97=AE=E7=AD=94?= =?UTF-8?q?=E5=8C=BA=E6=94=B9=E6=88=90=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/activity.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index 91e7d220b..ad4af39fd 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -86,7 +86,7 @@ module Mobile when "Issue" "项目缺陷" when "Message" - "项目问答区" + "项目讨论区" when "ProjectCreateInfo" "项目" end From 411a8be8b864b68639340a048a2c7c3c5d286d2e Mon Sep 17 00:00:00 2001 From: txz Date: Thu, 7 Apr 2016 16:58:06 +0800 Subject: [PATCH 163/209] =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 12 ++++++------ public/javascripts/wechat/app.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index b3c8f1b99..279cf5fbf 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -16,7 +16,7 @@ 迟交扣分:{{act.homework_common_detail.late_penalty}}分 匿评开启时间:{{act.homework_common_detail.evaluation_start}}
缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品 匿评关闭时间:{{act.homework_common_detail.evaluation_end}}
- 点击展开 + 点击展开
{{act.latest_update}}
@@ -42,7 +42,7 @@
- 点击展开 + 点击展开
{{act.latest_update}}
@@ -67,7 +67,7 @@
- 点击展开 + 点击展开 {{act.latest_update}}
@@ -137,7 +137,7 @@
- 点击展开 + 点击展开
{{act.latest_update}}
@@ -177,7 +177,7 @@

- 点击展开 + 点击展开
@@ -200,7 +200,7 @@
- 点击展开 + 点击展开
{{act.latest_update}}
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 57003f9e1..baa5a2731 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -10,7 +10,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){ var _openid = ''; if(debug===true){ - _openid = "1"; + _openid = "2"; } var getOpenId = function() { From bb71d1c3222855cf47bf4a274015d461ec00196e Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 7 Apr 2016 16:59:46 +0800 Subject: [PATCH 164/209] =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index baa5a2731..afb33eca2 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,6 +1,6 @@ var app = angular.module('wechat', ['ngRoute','ngCookies']); var apiUrl = 'http://wechat.trustie.net/api/v1/'; -var debug = true; //调试标志,如果在本地请置为true +var debug = false; //调试标志,如果在本地请置为true if(debug===true){ apiUrl = 'http://localhost:3000/api/v1/'; From 3501d6f1d6e8c5b130323511f4738da005cf589d Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 7 Apr 2016 17:05:22 +0800 Subject: [PATCH 165/209] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=9A=84=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org_newstyle.html.erb | 113 ++++++++--------- public/images/org_new_style/banner.jpg | Bin 48752 -> 175245 bytes public/images/org_new_style/default-img.jpg | Bin 21203 -> 4207 bytes public/images/org_new_style/default-img2.png | Bin 0 -> 19771 bytes public/images/org_new_style/icons.png | Bin 40092 -> 41365 bytes public/images/org_new_style/logo.jpg | Bin 16979 -> 28308 bytes public/stylesheets/org_new_style.css | 121 +++++++++++++------ 7 files changed, 136 insertions(+), 98 deletions(-) create mode 100644 public/images/org_new_style/default-img2.png diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index 4963ea14f..fcbbd8bfe 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -88,86 +88,75 @@
<% if User.current.admin_of_org?(@organization) %> - + <% else %> - + <% end %> - - <%# 登录 %> <%= render :partial => 'organizations/org_logined_header' %>
+ -
- <% @subfield_content.each do |field| %> <% if is_default_field?(field) %> diff --git a/public/images/org_new_style/banner.jpg b/public/images/org_new_style/banner.jpg index 385b24c9e781128f2cc1efb89d1773568e61c031..3cf23c4e5d6108410fac21ff64c655dbad340410 100644 GIT binary patch delta 166418 zcmeFYbyQqUvo|_;aCb?tpo6=+O>p<%?yeh>0158y?gSY$KuBx_>^x$1I^CKQBK2KpRLv&gbC~;^2S9$t%Po zD8$VV0wLtXfe=6-5FG3S%7+Ib{+$M)gybXqlZF#aSXO~YjY(pL`wBfy&HZ#j$}^n$FN7hDb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r;{Nb|4!=fMCcwY;yY01Qyk#R_K?Of5dceXgCl zeK;8?kD~&u!mEc&DOa=p@jiX>vdk%-hp$|VBHVpXT$2T(?SD)tOjG-X`+a+0N}Rvl ze#dXM_OK;nKSnH>PM!VH{_mmtUn7-Cup~O4+F!H&$EW)oAxd+h{{X!0^Zl=}{{THQ z1y{%Z%dh*d?Ee7IJc(oxOZH#pe%JSzNoEn2T^IY#o%&!cDV$vo+w0%>Vi*;9Iu4)g z^1#3`y>IQ0_mlmfT(B|>TTtu!AM?wm5%Fe&9e=J#ir(j@SPAhXimb(2IIFQ$xK*_3K7Fw%Rk-_OuhZ88qO`xZ zzi+SXb^0=*+ZI8p{{Xyy@$>%xJ$htEHp9t>pS9mCEn!i9!*%QQ;Be4O|eF6 zf8D3|-9O#G@vbphB-%b@-FWMi+ zrWH|>t}IH?)L}v@@1p#%N(u2o^u<*^{0iB{R^e4MimW)Rjwo7jRgKdXP&iPq;Z}|+ n)+*7(R$_-@t4=D`D%J&Y!mVIeVyzri*sDhsYZZ1X>{b8SX_3b? diff --git a/public/images/org_new_style/default-img.jpg b/public/images/org_new_style/default-img.jpg index e9aead6edd9283ef66654f148be66757488c0611..e345ca3d747cace8fb2cb5a5391d00c5d823e7ce 100644 GIT binary patch literal 4207 zcmd5;d010d7QZnNL?J>EhO$Tu1=~^x0m2dpiv|=+m=>v077;>#7?YQf0AZ69or)r2 z3uO@j$0}$G(z0qHh(!g;k_rO>!csv%Ko;34LMAXS#7{c&=bZ0*-*?Wr=lp)>o_p?l zPuwAX4AdRD)Ib27oj(R!!5a}j1IoluGA#nYfQ-a#1AzE3923mpF!2}+gKgv&0Qpml z$PgXF^R99ZILKHDDc<&2gi=srQ}0Z1)Hz1>;6x zL!lvLiX>cjEt!em7eevlKq2lBbmCPPKMRI95IY!RqW0}u?;7gEBUDBJ6wdx=J%>cX zJ2TiEKL(lNOeCNsC`MFj0N&UVN8D%OxYr5iV2;H);v8^hj#dt)d(9oqOii#jvsbx9 zh#X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TeX^{qhu^M#aAn#hFG?stE@0*zp7F5vW$I_ zs$F3R{Odx$IoE2HJjZ3u)YaYZhuRfapo@Af$V-&_UY5rodVjkXwp?)ehI7peN{SHB z1;vxAt5556C4LH>qqlzC&Ws{KVFzc9Ou^l53)ZTJlIv$5XI_+xT&c#^qBPDlJ5uEA zCv)-onIcV0M0(9d`?{zj-S;z9t3xjFFF*A=J;7k(Lb=yHWrD)(g*px6&z2eQ517Px z6&adk7W~JY`AHPpv~1~>QK2hNo$Fnx@T5$$JLg?2v2dL80nHcAlpUJ`@~zM}9%T7^ z-&@$rq(p>P9e1TXi4WhbwBg;JqKAp=i2H?LT24qgBXLsF?#&yOOD7ua`&buZA(s_s zkMnyHSWNU;HNB{PNqn7zd~k0m@lZmj9;cl=l`+anXZG8#%q)w1^3C!4o|eaOC!+#849MatkuwEyt@v-{1*^QCcJ z`LV?X*nkH219KH8wtTE3&+@A5KAu!Jw%VyMV#DqTvkKGZ)H=%Jze;n|a!+7qu9x@u zxH_wMLK4N1ztMP#!IN6-?3c&qS#4YPiA45NKQMa2vrG=7^U|p$o>A+FRmEBz%Wv1S z42&-r71BaX53Ap)cvlx;zEk&Jt@R9l<29R48!6n0O00`en>7#js^pARraqn6v;N@2 zs(UfTEuE{(+W!a&*C%5?OPdIa_7+X+V9h1_t=hq8T1|}-f*N5vFdGtPE+oU<=bB}YW}G4_X2;_H)Ft4fXtfz$tkxVHuDyzj>;!rT7^e(&3` diff --git a/public/images/org_new_style/default-img2.png b/public/images/org_new_style/default-img2.png new file mode 100644 index 0000000000000000000000000000000000000000..3a824b1f62a5d18f4b98bbe7e1844a7ad0aa60da GIT binary patch literal 19771 zcmeI4d0Z3M_P_@OR75~TwD`n;NTU+6l7s-EASfs(AShTBhRFmX*+{}pl~@%)!3D8m z6$^?Rf?LIl3%I|^IS{Fo7tNsKRlnMx9-%Vg3Ahz>f+xPjr-*56EIpNMZ=id80 z_nf(R{zzuvtm(szt&JfF8t&)o9Sr0_@Qxf}1U@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ce z#KkO^)yyz2m-K<z7r+WIl)5tpagG+1AJ~x!TMSbu#uX7C0?C`b znhjpEnp_y_6BV!|6M`whzk7L&^< z9wCy+yIi}W-68yichenn){RGu4Z52K(N+@6x2UVIV^jO;ElAUOt=fidk1zjtPfqeID!X_MYD^rd4GRM`_9~ zN$v@NOC=Lme(AlaZMTTgLV^&~I*s`V5I)kC$c-(lzJYdpU>w`n-r(o@(e?!JM_Z^+ zaT*8}z|VKDK|MSofAJBcb@O}P%Hbl?)X>@WQiZyx!R=qY&n&ZL;2gP>h;n49<)xC` zba^beePnD237h*33Se@k){)Q>@kZ2=0|+Igy?k6foPAFW7mt-6S#SL)nyX#b{@PRH zN(ou?W<A!Q3O7}*=3UKqDAwe6+G^nKf$~JD;D+MHu6Xz2*!GV! za^5u$Hz~A5c9DpQ1D5dZNQ>HCZfJ$h9}4_@9^uPC}|^+&SL8{}@_X;#-J z;u+|j>YwgcKd{kT!Xwcu(~_cztMw&9CK171G(MRX=$q8dw&}EsK=Y5E+ax-1+i_=y zyf%k87#2Vc5Jbpa2W(n&GUstaL;8hkvGsk3ax4kdl$htO)xQ%^(c3p&>~~?J@+hI* zTeT!afG#r!J*PS5CqQ!wu^08ab0?WIVi zk7}wXKo~@J^~`a!6RUKu-MlB9lA2@oaP<*?8~6n9z7>zT$i1$7(0NX%kTTe!a@*M> zXQV#ufZ8|G+P16ryq8dbM+(|LWOo~DhiNSP-IIi%ow?HerGoI+judab-$XgY^mS0v z`rh~xF!U|!)JnZwT|$h1GDh$?RhhRPiub=H(xQad1jGonO@rmdd=FVic3Sv?yym5Y z#J*WPu0p$8rvhycOsDQX+Rvj^|1Sv4F6Mng^BgrOpxjpxMT#l`z zc7?%-D6tDoZ4&Fi_@% diff --git a/public/stylesheets/org_new_style.css b/public/stylesheets/org_new_style.css index 9155df3f1..5e73949a6 100644 --- a/public/stylesheets/org_new_style.css +++ b/public/stylesheets/org_new_style.css @@ -18,45 +18,69 @@ a:hover{color:#29156f;} .bg-grey{ background:#f2f2f2;} /** header **/ -.header{ width:100%; height:60px; background:#29146f; padding:5px 0 0px; } -.header-con{ width:1200px; margin:0 auto;} -.logo,.logo img{ display:block; height:52px; } -a.login{ background:url(../images/org_new_style/icons.png) -7px -11px no-repeat; width:146px; height:55px; margin-right:40px; margin-top:11px;} -a:hover.login{ background:url(../images/org_new_style/icons.png) -7px -88px no-repeat; } -a.register{ background:url(../images/org_new_style/icons.png) -190px -11px no-repeat; width:158px; height:55px; ;margin-top:11px;} -a:hover.register{ background:url(../images/org_new_style/icons.png) -190px -88px no-repeat; } +.header{ width:100%; height:60px; padding:5px 0 0px; } +.header-con{ width:1200px; margin:0 auto; } +.logo{ position:relative; } +.logo-img{ height:52px; } .login{ margin-top:15px;} -.login a{ color:#fff; font-size:14px; margin-top:10px; } +.login a{ color:#000; font-size:14px; margin-top:10px; } +.logo-add{ display:block; top:3px; left:0px; position:absolute; width:20px; height:20px;background:url(../images/org_new_style/icons.png) -7px -573px no-repeat;} + + +/*.header{ width:100%; height:60px; background:#29146f; padding:5px 0 0px; }*/ +/*.header-con{ width:1200px; margin:0 auto;}*/ +/*.logo,.logo img{ display:block; height:52px; }*/ +/*a.login{ background:url(../images/org_new_style/icons.png) -7px -11px no-repeat; width:146px; height:55px; margin-right:40px; margin-top:11px;}*/ +/*a:hover.login{ background:url(../images/org_new_style/icons.png) -7px -88px no-repeat; }*/ +/*a.register{ background:url(../images/org_new_style/icons.png) -190px -11px no-repeat; width:158px; height:55px; ;margin-top:11px;}*/ +/*a:hover.register{ background:url(../images/org_new_style/icons.png) -190px -88px no-repeat; }*/ +/*.login{ margin-top:15px;}*/ +/*.login a{ color:#fff; font-size:14px; margin-top:10px; }*/ /** nav **/ -.nav-box{ width:1200px; height:60px; margin:0 auto;} -.nav a{ display:block; padding:15px 10px; font-size:18px; color:#000; margin-right:20px; } -.navact{border-bottom:3px solid #ffbd18;} -.nav a:hover{border-bottom:3px solid #ffbd18;} -.searchbox{ width:338px; height:57px; border:1px solid #ccc; -webkit-border-radius: 3px;border-radius: 3px; margin:10px 0px 0 0;} -.search-input{width:270px; height:40px; color:#bebebe; font-size:18px; border:1px solid #ccc; -webkit-border-radius: 3px;border-radius: 3px;border:0px; background:none; margin:10px 0 0 20px;} -.search-input:hover{ border:none;color:#fff; } -a.search-icon{ background:url(../images/org_new_style/icons.png) -387px -11px no-repeat; width:40px; height:40px; margin-top:8px;} -a:hover.search-icon{ background:url(../images/org_new_style/icons.png) -387px -89px no-repeat;} -.searchbox:hover{ background:#999999; color:#fff;} +.nav-box{ width:100%; padding:0px 0 5px; background:#eeeeee;} +.nav-con{width:1200px; margin:0 auto; background:#eee;} +.nav{ } +.nav a{ display:block; padding:15px 10px; font-size:18px; color:#666666; background:#eee; border-top:3px solid #eee; margin-right:20px; } +a.navact{border-top:3px solid #ffbd18;} +.nav a:hover{border-top:3px solid #ffbd18;} + +/*.nav-box{ width:1200px; height:60px; margin:0 auto;}*/ +/*.nav a{ display:block; padding:15px 10px; font-size:18px; color:#000; margin-right:20px; }*/ +/*.navact{border-bottom:3px solid #ffbd18;}*/ +/*.nav a:hover{border-bottom:3px solid #ffbd18;}*/ +/*.searchbox{ width:338px; height:57px; border:1px solid #ccc; -webkit-border-radius: 3px;border-radius: 3px; margin:10px 0px 0 0;}*/ +/*.search-input{width:270px; height:40px; color:#bebebe; font-size:18px; border:1px solid #ccc; -webkit-border-radius: 3px;border-radius: 3px;border:0px; background:none; margin:10px 0 0 20px;}*/ +/*.search-input:hover{ border:none;color:#fff; }*/ +/*a.search-icon{ background:url(../images/org_new_style/icons.png) -387px -11px no-repeat; width:40px; height:40px; margin-top:8px;}*/ +/*a:hover.search-icon{ background:url(../images/org_new_style/icons.png) -387px -89px no-repeat;}*/ +/*.searchbox:hover{ background:#999999; color:#fff;}*/ /* banner */ -.banner{ width:100%; height:304px; background:#070317; color:#fff; text-align:center; line-height:2.4;} -.banner-inner{ width:1500px; margin:0 auto; position:relative; text-align:center;} -.banner-img{ height:304px;} -.banner-txt{position:absolute; top:30%; left:0%; width:1500px; margin:0 auto;} +.banner{ width:100%; height:304px; color:#fff; text-align:center; line-height:2.4;position:relative;} +.banner-inner{ width:100%; margin:0 auto; text-align:center;} +.banner-img{ height:313px;} +.banner-txt{position:absolute; top:25%; left:35%; width:500px; padding:30px 0; margin:0 auto; background-color:rgba(255,255,255,.3); } +.banner-add{ display:block; position:absolute; top:10%; left:20%;width:27px; height:27px; background:url(../images/org_new_style/icons.png) -39px -570px no-repeat;} .banner h1{ font-size:42px;} -.banner a{font-size:28px; color:#fff;} -.banner a:hover{ text-decoration:underline;} -.banner p{ font-size:18px;} -.banner span{ font-size:16px;} +.banner p{font-size:40px; color:#fff;} + +/*.banner{ width:100%; height:304px; background:#070317; color:#fff; text-align:center; line-height:2.4;}*/ +/*.banner-inner{ width:1500px; margin:0 auto; position:relative; text-align:center;}*/ +/*.banner-img{ height:304px;}*/ +/*.banner-txt{position:absolute; top:30%; left:0%; width:1500px; margin:0 auto;}*/ +/*.banner h1{ font-size:42px;}*/ +/*.banner a{font-size:28px; color:#fff;}*/ +/*.banner a:hover{ text-decoration:underline;}*/ +/*.banner p{ font-size:18px;}*/ +/*.banner span{ font-size:16px;}*/ /** box1 **/ .box1{ width:100%; padding:60px 0;} .content{ width:1200px; margin:0 auto;} .box-top{ margin:0 auto; text-align:center; margin-bottom:45px; } -.box-title{ width:355px; height:67px; margin:0 auto; background:#29156f; color:#fff; text-align:center; font-size:40px; font-weight: lighter; margin-bottom:2px;} +.box-title{ width:355px; height:67px; margin:0 auto; border-top:1px solid #ccc; border-bottom:1px solid #ccc; color:#000; text-align:center; font-size:40px; font-weight: lighter; margin-bottom:2px;} .box-title-p{ font-size:20px; color:#999999;} -.row{ width:1200px; margin: 0 auto; } +.row{ width:1200px; margin: 0 auto; } .row-box1{ width:365px;} .row-img{ margin-bottom:10px; width:365px; height:230px; display:block;} .row-time{ color:#ffbd18; font-size:14px; font-weight:bold; line-height:1.9;} @@ -66,8 +90,6 @@ a:hover.search-icon{ background:url(../images/org_new_style/icons.png) -387px -8 .row-txt{line-height:2.4; padding-bottom:10px; margin-bottom:10px; color:#888;} .row-txt:hover{color:#29156f;} .row-txt-line{border-bottom:1px solid #cccccc; width:365px;} -a.btn-more{ display:block; font-size:14px; width:110px; height:40px; -webkit-border-radius: 3px;border-radius: 3px;background:#ffbd18; color:#fff; text-align:center; line-height:3.0;} -a:hover.btn-more{ background:#29156f;} .row-box2{ width:388px; border:1px solid #ccc; border-bottom:none;} .row-con2 a{ display:block;padding:20px 10px; border-bottom:1px solid #ccc;} .row-con2 a:hover{ background:#29156f; color:#fff;} @@ -75,6 +97,30 @@ a:hover.btn-more{ background:#29156f;} .row-txt2{line-height:2.4; color:#888;} .row-txt2:hover{ color:#fff; } +/*.box1{ width:100%; padding:60px 0;}*/ +/*.content{ width:1200px; margin:0 auto;}*/ +/*.box-top{ margin:0 auto; text-align:center; margin-bottom:45px; }*/ +/*.box-title{ width:355px; height:67px; margin:0 auto; background:#29156f; color:#fff; text-align:center; font-size:40px; font-weight: lighter; margin-bottom:2px;}*/ +/*.box-title-p{ font-size:20px; color:#999999;}*/ +/*.row{ width:1200px; margin: 0 auto; }*/ +/*.row-box1{ width:365px;}*/ +/*.row-img{ margin-bottom:10px; width:365px; height:230px; display:block;}*/ +/*.row-time{ color:#ffbd18; font-size:14px; font-weight:bold; line-height:1.9;}*/ +/*.row-title{ font-size:16px; font-weight:bold; line-height:1.9;display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}*/ +/*.row-con { display:block; }*/ +/*.row-con:hover{ color:#29156f; }*/ +/*.row-txt{line-height:2.4; padding-bottom:10px; margin-bottom:10px; color:#888;}*/ +/*.row-txt:hover{color:#29156f;}*/ +/*.row-txt-line{border-bottom:1px solid #cccccc; width:365px;}*/ +/*a.btn-more{ display:block; font-size:14px; width:110px; height:40px; -webkit-border-radius: 3px;border-radius: 3px;background:#ffbd18; color:#fff; text-align:center; line-height:3.0;}*/ +/*a:hover.btn-more{ background:#29156f;}*/ +/*.row-box2{ width:388px; border:1px solid #ccc; border-bottom:none;}*/ +/*.row-con2 a{ display:block;padding:20px 10px; border-bottom:1px solid #ccc;}*/ +/*.row-con2 a:hover{ background:#29156f; color:#fff;}*/ +/*.row-con2 a:hover{ color:#fff;}*/ +/*.row-txt2{line-height:2.4; color:#888;}*/ +/*.row-txt2:hover{ color:#fff; }*/ + /** 活动专区 **/ .con-left{ width:618px;} .con-left-box{ margin-bottom:20px; height:96px; display:block;} @@ -95,7 +141,7 @@ a.con-arrow-btn{ display: block;width:25px;height:25px;background:url(../images/ a.pre-arrow,a.pre-back{ display:block; width:25px; height:10px; background:#29156f; margin-left:5px;} a.pre-back{ background:#888;} /** footer **/ -.footer{ height:150px; background:#29156f; width:100%;} +.footer{ height:150px; background:#bbb; width:100%;} .footer-con{ width:1200px; padding:30px 0 0 60px; margin:0 auto; text-align:center; font-size:14px; color:#fff;} .footer-con ul{ display:block; width:430px; height:50px; margin:0 auto; } .footer-con ul li a{font-size:18px; color:#fff; margin-right:35px; font-weight:bold;} @@ -180,14 +226,17 @@ a:hover.read-more{ text-decoration:underline;} opacity: 1; } - -a.more-btn{ display:block; background:#ccc; color:#fff; margin-top:10px; width:100px; height:38px;font-size:14px; -webkit-border-radius: 5px;border-radius:5px;text-align:center; line-height:38px;} -a.more-btn{ display:block; border:1px solid #ccc; color:#000; margin-top:10px; width:120px; height:38px;font-size:14px; -webkit-border-radius: 25px;border-radius:25px;text-align:center; line-height:38px; margin:0 auto; margin-top:30px;} a.more-btn-center{ display:block; border:1px solid #ccc; color:#000; margin-top:10px; width:120px; height:38px;font-size:14px; -webkit-border-radius: 25px;border-radius:25px;text-align:center; line-height:38px; margin:0 auto; margin-top:30px;} -a:hover.more-btn{ background:#29146f; color:#fff;} -a:hover.more-btn-center{ background:#29146f; color:#fff;} +a:hover.more-btn-center{ background:#aaa; color:#fff;} .mt30{ margin-top:30px;} +/*a.more-btn{ display:block; background:#ccc; color:#fff; margin-top:10px; width:100px; height:38px;font-size:14px; -webkit-border-radius: 5px;border-radius:5px;text-align:center; line-height:38px;}*/ +/*a.more-btn{ display:block; border:1px solid #ccc; color:#000; margin-top:10px; width:120px; height:38px;font-size:14px; -webkit-border-radius: 25px;border-radius:25px;text-align:center; line-height:38px; margin:0 auto; margin-top:30px;}*/ +/*a.more-btn-center{ display:block; border:1px solid #ccc; color:#000; margin-top:10px; width:120px; height:38px;font-size:14px; -webkit-border-radius: 25px;border-radius:25px;text-align:center; line-height:38px; margin:0 auto; margin-top:30px;}*/ +/*a:hover.more-btn{ background:#29146f; color:#fff;}*/ +/*a:hover.more-btn-center{ background:#29146f; color:#fff;}*/ +/*.mt30{ margin-top:30px;}*/ + .nocontent{ font-size:30px; color:#888; margin:150px auto; text-align:center;} /** 帖子列表模式 **/ From 320ed07b319c9d6963c0f2f877805dc8ef31e0d2 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 8 Apr 2016 09:55:02 +0800 Subject: [PATCH 166/209] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org_newstyle.html.erb | 22 +++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index fcbbd8bfe..64da94ebf 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -62,9 +62,9 @@