Repository: laixin86714802/spider-platform Branch: master Commit: bd467c502357 Files: 164 Total size: 2.6 MB Directory structure: gitextract_vpq8od89/ ├── README.md ├── client/ │ ├── build/ │ │ ├── common.js │ │ ├── main.js │ │ └── vendor.js │ ├── common.js │ ├── components/ │ │ ├── ConnectionMonitor.jsx │ │ ├── CrawlForm.jsx │ │ ├── JobList.jsx │ │ ├── JobStats.jsx │ │ ├── JobTransfers.jsx │ │ ├── KeyValueTable.jsx │ │ ├── ProcessStats.jsx │ │ └── RefluxMixins.js │ ├── main.jsx │ ├── package.json │ ├── pages/ │ │ ├── IndexPage.jsx │ │ └── JobPage.jsx │ ├── stores/ │ │ ├── ConnectionStore.js │ │ ├── JobStore.js │ │ └── ProcessStatsStore.js │ ├── utils/ │ │ ├── ArachnadoAPI.js │ │ └── FancyWebSocket.js │ └── webpack.config.js ├── requirements.txt ├── server/ │ ├── __init__.py │ ├── config/ │ │ ├── __init__.py │ │ ├── mysql_conf.py │ │ ├── opts.py │ │ ├── utils.py │ │ └── wsbase.py │ ├── db/ │ │ ├── __init__.py │ │ └── db.py │ ├── spider/ │ │ ├── __init__.py │ │ ├── crawler_process.py │ │ ├── handler_utils.py │ │ ├── handlers.py │ │ ├── manhole.py │ │ ├── middlewares.py │ │ ├── monitor.py │ │ ├── pipelines.py │ │ ├── process_stats.py │ │ ├── scrapy_thread.py │ │ ├── signals.py │ │ ├── spider.py │ │ └── stats.py │ ├── static/ │ │ ├── build/ │ │ │ ├── common.js │ │ │ ├── main.js │ │ │ └── vendor.js │ │ ├── css/ │ │ │ ├── base.css │ │ │ ├── config-style.css │ │ │ ├── content_script.css │ │ │ ├── devtools_scraper_panel.css │ │ │ ├── jquery.mloading.css │ │ │ ├── wiz_style/ │ │ │ │ ├── bootstrap-tmp.css │ │ │ │ ├── github2.css │ │ │ │ ├── temp.css │ │ │ │ ├── wizToc.css │ │ │ │ └── wiz_tmp_editor_style.css │ │ │ ├── work-style.css │ │ │ └── work_iframe-style.css │ │ ├── images/ │ │ │ ├── github2.css │ │ │ └── wizToc.css │ │ ├── js/ │ │ │ ├── config.js │ │ │ ├── data.js │ │ │ ├── read.js │ │ │ ├── test.js │ │ │ ├── work.js │ │ │ └── work_iframe.js │ │ ├── lib/ │ │ │ ├── ICanHaz.js │ │ │ ├── LICENSE-d3-js │ │ │ ├── LICENSE-icanhaz-js │ │ │ ├── LICENSE-jquery-js │ │ │ ├── LICENSE-pouchdb-js │ │ │ ├── LICENSE-sugar-js │ │ │ ├── ajaxhook.js │ │ │ ├── base64.js │ │ │ ├── bootstrap-3.3.7/ │ │ │ │ ├── css/ │ │ │ │ │ ├── bootstrap-theme.css │ │ │ │ │ └── bootstrap.css │ │ │ │ └── js/ │ │ │ │ ├── bootstrap.js │ │ │ │ └── npm.js │ │ │ ├── bootstrap-table-treegrid.js │ │ │ ├── css-selector/ │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── karma.conf.js │ │ │ │ ├── lib/ │ │ │ │ │ └── CssSelector.js │ │ │ │ ├── package.json │ │ │ │ ├── test/ │ │ │ │ │ └── CSSselectorSimple.spec.js │ │ │ │ └── test-main.js │ │ │ ├── d3.v3.js │ │ │ ├── images/ │ │ │ │ └── LICENSE │ │ │ ├── jquery-2.0.3.js │ │ │ ├── jquery.bootstrapvalidator/ │ │ │ │ ├── bootstrapValidator.css │ │ │ │ └── bootstrapValidator.js │ │ │ ├── jquery.mloading.js │ │ │ ├── jquery.whencallsequentially.js │ │ │ ├── sugar-1.4.1.js │ │ │ └── tableExport.js │ │ ├── scripts/ │ │ │ ├── App.js │ │ │ ├── BackgroundScript.js │ │ │ ├── ChromePopupBrowser.js │ │ │ ├── Config.js │ │ │ ├── ContentScript.js │ │ │ ├── ContentSelector.js │ │ │ ├── Controller.js │ │ │ ├── DataExtractor.js │ │ │ ├── ElementQuery.js │ │ │ ├── Job.js │ │ │ ├── Queue.js │ │ │ ├── Scraper.js │ │ │ ├── Selector/ │ │ │ │ ├── SelectorDetail.js │ │ │ │ ├── SelectorElement.js │ │ │ │ ├── SelectorElementAttribute.js │ │ │ │ ├── SelectorElementClick.js │ │ │ │ ├── SelectorElementScroll.js │ │ │ │ ├── SelectorGroup.js │ │ │ │ ├── SelectorHTML.js │ │ │ │ ├── SelectorImage.js │ │ │ │ ├── SelectorLink.js │ │ │ │ ├── SelectorPopupLink.js │ │ │ │ ├── SelectorTable.js │ │ │ │ └── SelectorText.js │ │ │ ├── Selector.js │ │ │ ├── SelectorGraph.js │ │ │ ├── SelectorGraphv2.js │ │ │ ├── SelectorList.js │ │ │ ├── Sitemap.js │ │ │ ├── Stats.js │ │ │ ├── Store.js │ │ │ ├── StoreDevtools.js │ │ │ └── UniqueElementList.js │ │ ├── spider/ │ │ │ ├── end.html │ │ │ ├── main.html │ │ │ ├── start.html │ │ │ ├── test.html │ │ │ └── work.html │ │ └── views/ │ │ ├── DataPreview.html │ │ ├── SelectorEdit.html │ │ ├── SelectorEditTableColumn.html │ │ ├── SelectorList.html │ │ ├── SelectorListItem.html │ │ ├── SitemapBrowseData.html │ │ ├── SitemapCreate.html │ │ ├── SitemapEditMetadata.html │ │ ├── SitemapExport.html │ │ ├── SitemapExportDataCSV.html │ │ ├── SitemapImport.html │ │ ├── SitemapList.html │ │ ├── SitemapListItem.html │ │ ├── SitemapSave.html │ │ ├── SitemapScrapeConfig.html │ │ ├── SitemapSelectorGraph.html │ │ ├── SitemapStartUrlField.html │ │ └── Viewport.html │ └── templates/ │ ├── base.html │ ├── config.html │ ├── data.html │ ├── error_status/ │ │ ├── 404.html │ │ └── 500.html │ ├── help.html │ ├── index.html │ ├── read.html │ └── work.html ├── server.py └── 可视化采集.xmind ================================================ FILE CONTENTS ================================================ ================================================ FILE: README.md ================================================ 懒得看的点这里, 直接到示例
任务管理
界面说明
新增任务
1.请求参数配置
配置名称
请求方式
入口url
请求参数
代理ip
动态解析
2.选择器配置
选择器界面
主界面
增、改

预览
字段选择器属性
字段使用条件
元素集选择器的存在意义
选择器树形图
下一步/保存选择器
查看/下载数据
读取配置
采集示例
"多元素"选择器 + 翻页(1)
请求配置
参数配置
元素集选择器+翻页(2)+详情
参数配置
可能存在的问题
动态解析
网页页模板不同
选择器无法选中 # 懒得看的点这里, 直接到示例 采集示例 # 任务管理 ## 界面说明 **主界面:** ![](/server/static/images/90eb120e-33b8-48fb-a665-4048a77839b9.png) 该模块管理爬虫的运行状态, 可以暂停、停止和恢复爬虫的运行. **详情界面:** ![](/server/static/images/7028c459-888e-40ae-b412-e268540d4150.png) 如图, 点击任务, 进入详情页, "爬虫统计"为scrapy爬虫框架的日志信息; "请求队列"为将要爬取的url; 上方有"暂停"、"恢复"和"停止"爬虫任务按钮. 主界面为管理爬虫任务状态的模块, 前后端实时同步, 前端实时接收爬虫任务日志, 后端实时响应爬虫任务状态的改变. # 新增任务 ![](/server/static/images/0815f886-5de3-412b-8d21-b20a642af05a.png) 配置request请求参数和入口url, 同为后续爬虫的请求参数. ## 1.请求参数配置 ### 配置名称 任务ID的标识, 在数据查询时用来查找数据集合, 保存配置时用来选择请求参数和字段选择器, 唯一值, 不可重复, 不能为`config`字符串. ### 请求方式 本平台选常用的两种请求, post和get. ### 入口url 爬取页面的入口页面, 选择采集参数和后续页面会在该页面进行扩展 ### 请求参数 请求参数分为三种: **1.请求头header参数** 爬虫常用的header参数有 | Header | 解释 | 示例 | | ---- | ---- | ---- | | Accept | 指定客户端能够接收的内容类型 | Accept: text/plain, text/html | | Accept-Charset | 浏览器可以接受的字符编码集。 | Accept-Charset: iso-8859-5 | | Accept-Encoding | 指定浏览器可以支持的web服务器返回内容压缩编码类型。 | Accept-Encoding: compress, gzip | | Accept-Language | 浏览器可接受的语言 | Accept-Language: en,zh | | Accept-Ranges | 可以请求网页实体的一个或者多个子范围字段 | Accept-Ranges: bytes | | Content-Length | 请求的内容长度 | Content-Length: 348 | | Content-Type | 请求的与实体对应的MIME信息 | Content-Type: application/x-www-form-urlencoded | | Date | 请求发送的日期和时间 | Date: Tue, 15 Nov 2010 08:12:31 GMT | | Proxy-Authorization | 连接到代理的授权证书 | Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== | | Referer | 先前网页的地址,当前请求网页紧随其后,即来路 | Referer: https://www.baidu.com/ | | User-Agent | User-Agent的内容包含发出请求的用户信息 | User-Agent: Mozilla/5.0 (Linux; X11) | **2.cookie参数** 有些网站需要验证cookie参数 **3.form-data参数** 选择post请求时, 提交的参数信息 ![](/server/static/images/acfce330-9ea4-4ce6-92fc-569707e8076c.png) 如图为header参数 ### 代理ip 针对防爬虫网站设计, 动态代理ip, 有效时间`2018-05-10 14:44:00`前 ### 动态解析 越来越多的网站选用js渲染页面, 针对非模板页面加载网站 示例url: `http://shop.99114.com/47907188/ch6` 静态爬虫获取页面内容: ![](/server/static/images/15155175263081.png) 动态爬虫获取页面内容: ![](/server/static/images/2.png) 动态爬虫实际获取页面内容: ![](/server/static/images/3.png) 在动态爬虫获取页面的前端展现上, 已竭力实现实际获取内容, 但仍不可避免造成爬取内容和展现内容不符. ## 2.选择器配置 ![](/server/static/images/3da3e10c-80de-4597-9823-88a07ddb78b3.png) 选择器配置界面分为两部分, 上方的**采集页面**和下方的**选择器页面**. 上方的采集页面为请求配置完成后点击"下一步"所呈现出的页面内容. 下方的选择器界面为选择将要采集的数据. ### 选择器界面 #### 主界面 ![](/server/static/images/28e81b8d-a8bb-4fc1-85c9-f3839f14da4a.png) 提供字段选择器的层级显示、增、删、改、查、预览功能 #### 增、改 ![](/server/static/images/1d258dd7-3462-465e-a6ee-eff449a794ee.png) 添加/修改字段选择器, 共有7中类型的字段选择器字段选择器属性 #### 查 ![](/server/static/images/28546708-1d60-416a-a874-a9cea4f7dce3.jpg) 显示选择器选择在页面中选择的位置 #### 预览 ![](/server/static/images/709f40e1-b083-4d60-98e9-877fdf53c7b2.png) 显示选择器匹配的数据 选择器用来选定采集数据的位置和内容, 该界面可以用鼠标点击配置将要采集的数据, 查看采集数据的位置, 预览采集数据的内容, 根据采集数据不同, 将字段选择器分为以下7类. ### 字段选择器属性 | 字段选择器 | 名称 | 多元素属性(multiple) | 可选子元素 | 该类型页面唯一 | 可查看选择器 | 可预览数据 | 是否采集 | | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | | SelectorDetail | 详情页选择器 | 否 | 是 | 是 | 是 | 是 | 否 | | SelectorElement | 元素集选择器 | 是 | 是 | 否 | 否 | 否 | 否 | | SelectorElementAttribute | 元素属性选择器 | 是 | 否 | 否 | 是 | 是 | 是 | | SelectorHTML | html选择器 | 是 | 否 | 否 | 是 | 是 | 是 | | SelectorImage | 图片选择器 | 是 | 否 | 否 | 是 | 是 | 是 | | SelectorLink | 翻页选择器 | 否 | 否 | 是 | 是 | 是 | 否 | | SelectorText | 文本选择器 | 是 | 否 | 否 | 是 | 是 | 是 | #### 字段使用条件 > 1.避免同级别multiple、非multiple属性的选择器并存 所有采集的字段(SelectorElementAttribute、SelectorHTML、SelectorImage、SelectorText)有字段选中"多元素属性"时, 不可选择其他采集的字段, 会造成两个字段集合维度混乱("多元素属性"的字段多对一非列表属性字段), 后端维度无法对应的字段值统一处理为空字符串. 如果有"多元素属性", 该父类下所有采集的字段选择器尽量全都是"多元素属性"; 如果没有"多元素属性", 该父类下所有采集的字段选择器尽量都没有"多元素属性". ![](/server/static/images/47b3f912-b840-4062-bd6b-f0bfc14b43ab.png) ![](/server/static/images/1ae43476-59d4-40bd-a1ef-9705df3030a3.png) 如图:标题、内容为可采集字段, 他们的多元素属性必须一致. ![](/server/static/images/600acd3f-432d-4784-9f41-654aabe628df.png) 不一致时示例 > 2.翻页选择器只能在入口页面设置且唯一 SelectorLink(翻页选择器)在入口页面下只能存在一个. SelectorLink是递归采集函数. 存在多个时导致系统效率降低, 稳健性下降. > 3.元素集选择器下可采集的字段多元素属性以元素集选择器为准 SelectorElement(元素集选择器)的子类采集选择器(SelectorElementAttribute、SelectorHTML、SelectorImage、SelectorText)选择multiple(多元素属性)时, 会将子类数据集升维, 数据解析错误. [详细解释见元素集选择器的存在意义] ![](/server/static/images/85d6f868-f03b-4c9e-b8c9-cd7ffc832029.png) 如图:元素集下所有的可采集字段(红圈中)的multiple(多元素属性)以元素集是否选择multiple(多元素属性)为准. 前端表单按照字段选择器名称生成模板, 暂时未判断父类属性; 后端元素SelectorElement(元素集选择器)的子类采集选择器采集时将不会判断multiple(多元素属性).统一按照父类SelectorElement(元素集选择器)是否选择multiple(多元素属性)判断. > 4.详情页选择只能有一条链式选择器 前端采集页面在iframe标签内, 详情页选择后无法返回, 同级别选择器只能存在一个, 不同层次的选择器存在详情页选择器则他们必在同一条链式选择器上. 后端采集框架scrapy为异步回调, 选择器解析为链式回调, 同级别存在多个详情页选择器会导致数据混淆、丢失. ![](/server/static/images/c5173f94-9895-4709-81db-0df46599fdf5.png) 如图:"详情", "联系"为两个详情选择器, 在同一条链式选择器上 ### 元素集选择器的存在意义 采集到所需的数据由两个因素决定:html文本和选择器, 其中html文本为页面中内容所在的html块, 选择器为指定采集的字段内容. 在使用到元素集选择器的大多数情况下html块多为列表形式存在, 选择器有多个. **不使用元素集选择器时** 多个选择器按照"多元素"属性选择采集的数据, 页面本身可能存在内容块数据缺失, 造成多个选择器选择的数据列无法一一对应, 造成数据混淆、错位 示例: ![](/server/static/images/6cfe84f9-a938-49e7-ae1a-e16e67d25bbf.png)![](/server/static/images/545c2037-3d39-4e72-bddf-a84b180cc693.png) ![](/server/static/images/7fbf683b-98d8-4c09-9315-acc601a07387.png)![](/server/static/images/d0ca6d60-b3db-4514-bfb2-0c88fc862ea6.png) "多元素属性"选择器优先遍历css选择器 新建两个"多元素属性"选择器, 第一个采集"name"字段, 第二个采集"href"字段, 当页面本身存在数据缺失时, 会使"name"和"href"数据无法一一对应."name_2" => "href_3" 导致数据错位. **使用元素集选择器时** ![](/server/static/images/a7aff1d4-ad56-430f-a6de-aace92b2f56d.png)![](/server/static/images/73d3b897-1656-4f2c-8e63-f75ec30e1d08.png) 元素集选择器优先遍历内容块, 然后遍历css选择器, 使得数据维度得到统一, 缺失值也不会影响结果值 元素集选择器优先遍历内容块, "多元素属性"的选择器会优先遍历选择器, 两个开始采集维度的不同, 会导致不同的结果.当采集字段中存在多个"多元素属性"的选择器且他们具有同一个父元素, 优先考虑将这些选择器置于元素集选择器中. ### 选择器树形图 ![](/server/static/images/85d6f868-f03b-4c9e-b8c9-cd7ffc832029.png) 显示各个层级的选择器关系 ### 下一步/保存选择器 ![](/server/static/images/48ab3a69-30c6-4707-b302-de21c4584294.png) 开始或者保存任务 # 查看/下载数据 ![](/server/static/images/85ff994f-659a-42e3-a253-40bb730c2a64.png) 查看数据和下载已采集数据的页面 # 读取配置 ![](/server/static/images/4b396b3a-c14e-4412-b0ac-566c08ac6946.png) 开始或删除任务 # 采集示例 ## "多元素"选择器 + 翻页(1) `http://www.51sole.com/s.aspx?q=PVC通风管` ### 请求配置 ![](/server/static/images/c5c446a4-e1a5-403b-a5fc-3395af38237d.png) ### 参数配置 1.填写字段名称`商品名称`(唯一), 如果重复, 选择器保存失败 2.选择 选择器类型 3."点击选择"按钮开启选择器 4-5.分别点击同一列表中同一采集内容(自动匹配通用选择器, 无法匹配时会提示; 如采集单个选择, 只用点击选择器一次即可) 6.点击确定按钮获取"css选择器"内容, 确定左侧"键盘事件"共绑定了一个按键, S键: 当前选择器, P键: 当前选择元素的父元素, C键: 当前选择元素的子元素 7.选择"多元素属性" 8.保存选择器 ![](/server/static/images/00a1e6e7-b30c-4754-8c57-6c89b2963296.png) 同上, 采集`公司url`字段 ![](/server/static/images/2da8e8e6-d454-4713-9631-975644a15c81.png) 点击下一页, 选择`翻页选择器` ![](/server/static/images/3d7d1bfc-b673-40c2-9943-b4e537fc22a1.png) 整体如下: 主页面选择器: ![](/server/static/images/5f5724f9-48dc-478b-93d2-b1fed42889d6.png) 选择器层级: ![](/server/static/images/c1284037-d84f-42c5-861f-d63c017fc7de.png) 点击`下一步` `开始任务` 启动任务, 然后再主界面进行任务管理或者`查看数据`里下载数据 ![](/server/static/images/2137d59b-71b9-4f71-a5f8-8fb114eadfa6.png) ## 元素集选择器+翻页(2)+详情 `https://zhongshan.china.cn/search/fisnfv.shtml` ### 参数配置 1.选择`元素集选择器` ![](/server/static/images/e9ba8329-9af2-46d3-82fe-904585d95132.png) 2.配置`翻页选择器`(翻页选择器分两种, 点击选择和手动配置, 优先使用手动配置, 选择器有全局表单验证, 改起来太麻烦, 使用手动配置时, 随便填个值), 手动配置时, 翻页url中变动的参数 使用`%s`代替. ![](/server/static/images/795c3e35-7b8c-4e2d-9bd9-4fbf87f619e7.png) 3.进入`元素集选择器`内, 新建`产品名称`, `所在地`和`公司名称`选择器(在元素集选择器中, 默认以第一个元素集为模板, 其他范围内`点击选择`按钮无法生效) **注意**:在元素集选择器中不要选择"多元素"属性, 元素集选择器中的子选择器, 维度以`元素集选择器`为准. ![](/server/static/images/e0d90b15-0d89-41a3-92bd-3b6b3d703f2a.jpg) 4.配置`详情选择器`, 选择将要进入的标签, 保存 ![](/server/static/images/993f90b4-ee2c-4e02-9b1f-76549a343599.png) 5.进入`详情选择器`, 在页面中点击详情链接 6.进入详情页之后, 再配置一个`详情选择器`进入联系页 ![](/server/static/images/45afe047-fb6d-47b7-83b8-43216c5f396e.png) 7.在联系页中, 选择`联系人` `电话` `地址`字段采集器 ![](/server/static/images/2e7f279e-0f2f-4b7c-bc2d-172f7ba8f75c.png) 8.打开`选择器树形图`查看选择器层级 ![](/server/static/images/2f1eb188-2045-4864-9d2d-94303f8f8092.png) 8.`下一步`开始任务, 注意请求间隔, 太快容易被封 ![](/server/static/images/e0b5824e-fa27-4b11-ba8c-2c9195e213fa.png) 被封 ![](/server/static/images/4.png) 9.查看/下载数据 ![](/server/static/images/294b2416-6e38-41d4-8989-5cb80904ed49.png) # 可能存在的问题 # 动态解析 动态解析网页太慢, 资源占用过高, 显示内容和爬取内容不同, 造成显示内容和爬取内容不同主要因为网站自带js的运行导致的, 如果取消爬取网站自带js, 可能会造成依赖css无法加载, 前端展示效果极差和网页布局和渲染效果缺失, 留待以后解决. # 网页页模板不同 `http://kungeina0315.51sole.com/companycontact.htm` `http://jing18028106510.51sole.com/companycontact.htm` ![](/server/static/images/72c2b627-6338-41a7-8670-661cc7bf5dda.png)![](/server/static/images/699f21fd-0cae-4078-8c43-1f0823038d87.png) 场景:两个详情页模板, 由于字段个数不同, 使用css选择器时, 对不同的模板选择字段, 会造成字段缺失或者错位的情况。 这两个页面中, 由于第二个页面多了"传真"和"微信"这两个字段, 导致相同的css选择器在匹配第一个页面的同时, 匹配第二个页面时"传真"字段之后的css选择器选择的字段值错位. 处理:使用css选择器选择整个内容块, 然后使用正则表达式提取采集的内容 ![](/server/static/images/396e4817-df36-4f9d-81f0-90d63b2a41a3.png) 如图所示: 采集"手机"字段, 选择整个内容块, 然后使用正则表达式提取. # 选择器无法选中 ![](/server/static/images/1c0aeff2-0045-48f9-80d5-3b070b42e490.png)![](/server/static/images/bb25525b-648f-4a10-a271-e8ca7751e24c.png) `点击选择`按钮很难选中元素时, 可以先选择他的父元素或子元素, 然后使用键盘按钮C或P调整. `点击选择`没有反应, 本平台将采集网页放在本域名内, 跨域导致有些资源加载异常, 使得采集脚本无法加载, 此时只能手动填写css选择器. ================================================ FILE: client/build/common.js ================================================ webpackJsonp([0],[function(e,t,n){"use strict";var s=n(1),i=(s.FancyWebSocket,n(3)),o=n(454);$(window).ready(function(){i.install("monitor"),o.installHeader("process-stats")})},,,function(e,t,n){"use strict";function s(e){i.render(i.createElement(u,null),document.getElementById(e))}Object.defineProperty(t,"__esModule",{value:!0}),t.install=s;var i=n(4),o=n(160),r=n(180),c=r.Label,a=n(260),l=i.createClass({displayName:"ConnectionMonitorWidget",STATE_CLASSES:{offline:"danger",online:"info",crawling:"success"},render:function(){var e=this.STATE_CLASSES[this.props.status]||"default";return i.createElement(c,{bsStyle:e,title:"reconnect",style:{cursor:"pointer"},onClick:this.onClick},this.props.status)},onClick:function(){a.Actions.reconnect()}}),u=i.createClass({displayName:"ConnectionMonitor",mixins:[o.connect(a.store,"status")],render:function(){return i.createElement(l,{status:this.state.status})}})}]); ================================================ FILE: client/build/main.js ================================================ webpackJsonp([1],{0:function(e,t,r){"use strict";var n=r(4),a=r(463),o=a.Route,s=a.RouteHandler,l=(a.Link,a.DefaultRoute),c=a.NotFoundRoute,i=r(505),u=i.IndexPage,d=r(509),m=d.JobPage,p=n.createClass({displayName:"NotFound",render:function(){return n.createElement("div",null,n.createElement("h2",null,"404 找不到网页"),n.createElement("p",null,"您试图访问的页面不存在."))}}),h=n.createClass({displayName:"App",render:function(){return n.createElement(s,null)}}),E=n.createElement(o,{path:"/",handler:h},n.createElement(l,{handler:u,name:"index"}),n.createElement(o,{path:"job/:id",handler:m,name:"job"}),n.createElement(c,{handler:p}));a.run(E,a.HashLocation,function(e){n.render(n.createElement(e,null),document.getElementById("root"))})},505:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),a=r(180),o=a.Panel,s=r(506),l=s.JobList,c=r(508),i=c.AggregateJobStats,u=r(454),d=u.ProcessStatsTable,m=n.createClass({displayName:"IndexPage",render:function(){return n.createElement("div",{className:"row"},n.createElement("div",{className:"col-lg-7 col-md-7"},n.createElement(o,{collapsible:!0,defaultExpanded:!0,header:"任务",bsStyle:"primary"},n.createElement(l,null)),n.createElement(o,{collapsible:!0,defaultExpanded:!0,header:"系统状态",className:"hidden-lg"},n.createElement(d,null))),n.createElement("div",{className:"col-lg-5 col-md-5"},n.createElement(o,{collapsible:!0,defaultExpanded:!0,header:"系统状态",className:"visible-lg-block"},n.createElement(d,null)),n.createElement(o,{collapsible:!0,defaultExpanded:!0,header:"爬虫状态"},n.createElement(i,null))))}});t.IndexPage=m},506:function(e,t,r){"use strict";function n(e){for(var t=0;t-1&&"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&console.debug("Download the React DevTools for a better development experience: https://fb.me/react-devtools");for(var D=[Array.isArray,Array.prototype.every,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.map,Date.now,Function.prototype.bind,Object.keys,String.prototype.split,String.prototype.trim,Object.create,Object.freeze],M=0;M1)for(var n=1;n1){for(var f=Array(c),d=0;d1){for(var d=Array(f),h=0;h1){var t=e.indexOf(d,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=l(e,t);i!==e&&c(e,i,n,r,!1,!0),i!==t&&c(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},_getFirstCommonAncestorID:l,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:d};e.exports=m}).call(t,n(6))},function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};e.exports=r},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);if("function"==typeof t)return t}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=n},function(e,t,n){(function(t){"use strict";function r(e,t){this.props=e,this.context=t}var o=n(26),i=n(10),a=n(18);if(r.prototype.setState=function(e,n){"production"!==t.env.NODE_ENV?i("object"==typeof e||"function"==typeof e||null==e,"setState(...): takes an object of state variables to update or a function which returns an object of state variables."):i("object"==typeof e||"function"==typeof e||null==e),"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?a(null!=e,"setState(...): You passed an undefined or null state object; instead, use forceUpdate()."):null),o.enqueueSetState(this,e),n&&o.enqueueCallback(this,n)},r.prototype.forceUpdate=function(e){o.enqueueForceUpdate(this),e&&o.enqueueCallback(this,e)},"production"!==t.env.NODE_ENV){var s={getDOMNode:["getDOMNode","Use React.findDOMNode(component) instead."],isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceProps:["replaceProps","Instead, call React.render again at the top level."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."],setProps:["setProps","Instead, call React.render again at the top level."]},u=function(e,n){try{Object.defineProperty(r.prototype,e,{get:function(){"production"!==t.env.NODE_ENV?a(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",n[0],n[1]):null}})}catch(e){}};for(var l in s)s.hasOwnProperty(l)&&u(l,s[l])}e.exports=r}).call(t,n(6))},function(e,t,n){(function(t){"use strict";function r(e){e!==i.currentlyMountingInstance&&l.enqueueUpdate(e)}function o(e,n){"production"!==t.env.NODE_ENV?p(null==a.current,"%s(...): Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state.",n):p(null==a.current);var r=u.get(e);return r?r===i.currentlyUnmountingInstance?null:r:("production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?f(!n,"%s(...): Can only update a mounted or mounting component. This usually means you called %s() on an unmounted component. This is a no-op.",n,n):null),null)}var i=n(27),a=n(20),s=n(14),u=n(28),l=n(29),c=n(16),p=n(10),f=n(18),d={enqueueCallback:function(e,n){"production"!==t.env.NODE_ENV?p("function"==typeof n,"enqueueCallback(...): You called `setProps`, `replaceProps`, `setState`, `replaceState`, or `forceUpdate` with a callback that isn't callable."):p("function"==typeof n);var a=o(e);return a&&a!==i.currentlyMountingInstance?(a._pendingCallbacks?a._pendingCallbacks.push(n):a._pendingCallbacks=[n],void r(a)):null},enqueueCallbackInternal:function(e,n){"production"!==t.env.NODE_ENV?p("function"==typeof n,"enqueueCallback(...): You called `setProps`, `replaceProps`, `setState`, `replaceState`, or `forceUpdate` with a callback that isn't callable."):p("function"==typeof n),e._pendingCallbacks?e._pendingCallbacks.push(n):e._pendingCallbacks=[n],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueSetProps:function(e,n){var i=o(e,"setProps");if(i){"production"!==t.env.NODE_ENV?p(i._isTopLevel,"setProps(...): You called `setProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created."):p(i._isTopLevel);var a=i._pendingElement||i._currentElement,u=c({},a.props,n);i._pendingElement=s.cloneAndReplaceProps(a,u),r(i)}},enqueueReplaceProps:function(e,n){var i=o(e,"replaceProps");if(i){"production"!==t.env.NODE_ENV?p(i._isTopLevel,"replaceProps(...): You called `replaceProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created."):p(i._isTopLevel);var a=i._pendingElement||i._currentElement;i._pendingElement=s.cloneAndReplaceProps(a,n),r(i)}},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)}};e.exports=d}).call(t,n(6))},function(e,t){"use strict";var n={currentlyMountingInstance:null,currentlyUnmountingInstance:null};e.exports=n},function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=n},function(e,t,n){(function(t){"use strict";function r(){"production"!==t.env.NODE_ENV?y(T.ReactReconcileTransaction&&O,"ReactUpdates: must inject a reconcile transaction class and batching strategy"):y(T.ReactReconcileTransaction&&O)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=T.ReactReconcileTransaction.getPooled()}function i(e,t,n,o,i){r(),O.batchedUpdates(e,t,n,o,i)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var n=e.dirtyComponentsLength;"production"!==t.env.NODE_ENV?y(n===b.length,"Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).",n,b.length):y(n===b.length),b.sort(a);for(var r=0;r.":"",p="";if(n&&n._owner&&n._owner!==b.current){var f=o(n._owner);p=" It was passed a child from "+f+"."}"production"!==t.env.NODE_ENV?N(!1,e+"%s%s See https://fb.me/react-warning-keys for more information.",c,p):null}}function l(e,t){if(Array.isArray(e))for(var n=0;n");var u="";i&&(u=" The element was created by "+i+"."),"production"!==t.env.NODE_ENV?N(!1,"Don't set .props.%s of the React component%s. Instead, specify the correct value when initially creating the element or use React.cloneElement to make a new element with updated props.%s",e,s,u):null}}function f(e,t){return e!==e?t!==t:0===e&&0===t?1/e===1/t:e===t}function d(e){if(e._store){var t=e._store.originalProps,n=e.props;for(var r in n)n.hasOwnProperty(r)&&(t.hasOwnProperty(r)&&f(t[r],n[r])||(p(r,e),t[r]=n[r]))}}function h(e){if(null!=e.type){var n=E.getComponentClassForElement(e),r=n.displayName||n.name;n.propTypes&&c(r,n.propTypes,e.props,y.prop),"function"==typeof n.getDefaultProps&&("production"!==t.env.NODE_ENV?N(n.getDefaultProps.isReactClassApproved,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."):null)}}var v=n(14),m=n(13),y=n(36),g=n(37),b=n(20),E=n(38),_=n(24),O=n(10),N=n(18),w={},C={},P=/^\d+$/,x={},T={checkAndWarnForMutatedProps:d,createElement:function(e,n,r){"production"!==t.env.NODE_ENV?N(null!=e,"React.createElement: type should not be null or undefined. It should be a string (for DOM elements) or a ReactClass (for composite components)."):null;var o=v.createElement.apply(this,arguments);if(null==o)return o;for(var i=2;i"+o+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;n!==this._stringText&&(this._stringText=n,i.BackendIDOperations.updateTextContentByID(this._rootNodeID,n))}},unmountComponent:function(){o.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=u},function(e,t,n){(function(t){"use strict";function r(e,t){return null==t||o.hasBooleanValue[e]&&!t||o.hasNumericValue[e]&&isNaN(t)||o.hasPositiveNumericValue[e]&&t<1||o.hasOverloadedBooleanValue[e]&&t===!1}var o=n(47),i=n(48),a=n(18);if("production"!==t.env.NODE_ENV)var s={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0},u={},l=function(e){if(!(s.hasOwnProperty(e)&&s[e]||u.hasOwnProperty(e)&&u[e])){u[e]=!0;var n=e.toLowerCase(),r=o.isCustomAttribute(n)?n:o.getPossibleStandardName.hasOwnProperty(n)?o.getPossibleStandardName[n]:null;"production"!==t.env.NODE_ENV?a(null==r,"Unknown DOM property %s. Did you mean %s?",e,r):null}};var c={createMarkupForID:function(e){return o.ID_ATTRIBUTE_NAME+"="+i(e)},createMarkupForProperty:function(e,n){if(o.isStandardName.hasOwnProperty(e)&&o.isStandardName[e]){if(r(e,n))return"";var a=o.getAttributeName[e];return o.hasBooleanValue[e]||o.hasOverloadedBooleanValue[e]&&n===!0?a:a+"="+i(n)}return o.isCustomAttribute(e)?null==n?"":e+"="+i(n):("production"!==t.env.NODE_ENV&&l(e),null)},setValueForProperty:function(e,n,i){if(o.isStandardName.hasOwnProperty(n)&&o.isStandardName[n]){var a=o.getMutationMethod[n];if(a)a(e,i);else if(r(n,i))this.deleteValueForProperty(e,n);else if(o.mustUseAttribute[n])e.setAttribute(o.getAttributeName[n],""+i);else{var s=o.getPropertyName[n];o.hasSideEffects[n]&&""+e[s]==""+i||(e[s]=i)}}else o.isCustomAttribute(n)?null==i?e.removeAttribute(n):e.setAttribute(n,""+i):"production"!==t.env.NODE_ENV&&l(n)},deleteValueForProperty:function(e,n){if(o.isStandardName.hasOwnProperty(n)&&o.isStandardName[n]){var r=o.getMutationMethod[n];if(r)r(e,void 0);else if(o.mustUseAttribute[n])e.removeAttribute(o.getAttributeName[n]);else{var i=o.getPropertyName[n],a=o.getDefaultValueForProperty(e.nodeName,i);o.hasSideEffects[n]&&""+e[i]===a||(e[i]=a)}}else o.isCustomAttribute(n)?e.removeAttribute(n):"production"!==t.env.NODE_ENV&&l(n)}};e.exports=c}).call(t,n(6))},function(e,t,n){(function(t){"use strict";function r(e,t){return(e&t)===t}var o=n(10),i={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var n=e.Properties||{},a=e.DOMAttributeNames||{},u=e.DOMPropertyNames||{},l=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var c in n){"production"!==t.env.NODE_ENV?o(!s.isStandardName.hasOwnProperty(c),"injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.",c):o(!s.isStandardName.hasOwnProperty(c)),s.isStandardName[c]=!0;var p=c.toLowerCase();if(s.getPossibleStandardName[p]=c,a.hasOwnProperty(c)){var f=a[c];s.getPossibleStandardName[f]=c,s.getAttributeName[c]=f}else s.getAttributeName[c]=p;s.getPropertyName[c]=u.hasOwnProperty(c)?u[c]:c,l.hasOwnProperty(c)?s.getMutationMethod[c]=l[c]:s.getMutationMethod[c]=null;var d=n[c];s.mustUseAttribute[c]=r(d,i.MUST_USE_ATTRIBUTE),s.mustUseProperty[c]=r(d,i.MUST_USE_PROPERTY),s.hasSideEffects[c]=r(d,i.HAS_SIDE_EFFECTS),s.hasBooleanValue[c]=r(d,i.HAS_BOOLEAN_VALUE),s.hasNumericValue[c]=r(d,i.HAS_NUMERIC_VALUE),s.hasPositiveNumericValue[c]=r(d,i.HAS_POSITIVE_NUMERIC_VALUE),s.hasOverloadedBooleanValue[c]=r(d,i.HAS_OVERLOADED_BOOLEAN_VALUE),"production"!==t.env.NODE_ENV?o(!s.mustUseAttribute[c]||!s.mustUseProperty[c],"DOMProperty: Cannot require using both attribute and property: %s",c):o(!s.mustUseAttribute[c]||!s.mustUseProperty[c]),"production"!==t.env.NODE_ENV?o(s.mustUseProperty[c]||!s.hasSideEffects[c],"DOMProperty: Properties that have side effects must use property: %s",c):o(s.mustUseProperty[c]||!s.hasSideEffects[c]),"production"!==t.env.NODE_ENV?o(!!s.hasBooleanValue[c]+!!s.hasNumericValue[c]+!!s.hasOverloadedBooleanValue[c]<=1,"DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s",c):o(!!s.hasBooleanValue[c]+!!s.hasNumericValue[c]+!!s.hasOverloadedBooleanValue[c]<=1)}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";var r=n(51),o=n(70),i={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){o.purgeID(e)}};e.exports=i},function(e,t,n){(function(t){"use strict";var r=n(52),o=n(61),i=n(46),a=n(70),s=n(31),u=n(10),l=n(69),c={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},p={updatePropertyByID:function(e,n,r){var o=a.getNode(e);"production"!==t.env.NODE_ENV?u(!c.hasOwnProperty(n),"updatePropertyByID(...): %s",c[n]):u(!c.hasOwnProperty(n)),null!=r?i.setValueForProperty(o,n,r):i.deleteValueForProperty(o,n)},deletePropertyByID:function(e,n,r){var o=a.getNode(e);"production"!==t.env.NODE_ENV?u(!c.hasOwnProperty(n),"updatePropertyByID(...): %s",c[n]):u(!c.hasOwnProperty(n)),i.deleteValueForProperty(o,n,r)},updateStylesByID:function(e,t){var n=a.getNode(e);r.setValueForStyles(n,t)},updateInnerHTMLByID:function(e,t){var n=a.getNode(e);l(n,t)},updateTextContentByID:function(e,t){var n=a.getNode(e);o.updateTextContent(n,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=a.getNode(e);o.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n-1?m(e):f.test(e)?y(e):d.test(t)&&g(e,t)};var E={createMarkupForStyles:function(e){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];"production"!==t.env.NODE_ENV&&b(r,o),null!=o&&(n+=c(r)+":",n+=a(r,o)+";")}return n||null},setValueForStyles:function(e,n){var o=e.style;for(var i in n)if(n.hasOwnProperty(i)){"production"!==t.env.NODE_ENV&&b(i,n[i]);var s=a(i,n[i]);if("float"===i&&(i=p),s)o[i]=s;else{var u=r.shorthandPropertyExpansions[i];if(u)for(var l in u)o[l]="";else o[i]=""}}}};e.exports=E}).call(t,n(6))},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[e]})});var i={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};e.exports=a},function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=r},function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=n(56),i=/^-ms-/;e.exports=r},function(e,t){function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;e.exports=n},function(e,t,n){ "use strict";function r(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||i.hasOwnProperty(e)&&i[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var o=n(53),i=o.isUnitlessNumber;e.exports=r},function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=n(59),i=/^ms-/;e.exports=r},function(e,t){function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t,n){(function(t){"use strict";function r(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}var o=n(62),i=n(67),a=n(68),s=n(10),u={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:a,processUpdates:function(e,n){for(var u,l=null,c=null,p=0;p when using tables, nesting tags like
,

, or , or using non-SVG elements in an parent. Try inspecting the child nodes of the element with React ID `%s`.",f,h):s(d),l=l||{},l[h]=l[h]||[],l[h][f]=d,c=c||[],c.push(d)}var v=o.dangerouslyRenderMarkup(n);if(c)for(var m=0;m]+)/,c="data-danger-index",p={dangerouslyRenderMarkup:function(e){"production"!==t.env.NODE_ENV?u(o.canUseDOM,"dangerouslyRenderMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use React.renderToString for server rendering."):u(o.canUseDOM);for(var n,p={},f=0;f node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See React.renderToString()."):u("html"!==e.tagName.toLowerCase());var r=i(n,a)[0];e.parentNode.replaceChild(r,e)}};e.exports=p}).call(t,n(6))},function(e,t,n){(function(t){function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function o(e,n){var o=l;"production"!==t.env.NODE_ENV?u(!!l,"createNodesFromMarkup dummy not initialized"):u(!!l);var i=r(e),c=i&&s(i);if(c){o.innerHTML=c[1]+e+c[2];for(var p=c[0];p--;)o=o.lastChild}else o.innerHTML=e;var f=o.getElementsByTagName("script");f.length&&("production"!==t.env.NODE_ENV?u(n,"createNodesFromMarkup(...): Unexpected ","
"],c=[3,"","
"],p=[1,"",""],f={"*":[1,"?

"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c,circle:p,clipPath:p,defs:p,ellipse:p,g:p,line:p,linearGradient:p,path:p,polygon:p,polyline:p,radialGradient:p,rect:p,stop:p,text:p};e.exports=r}).call(t,n(6))},function(e,t,n){"use strict";var r=n(9),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});e.exports=o},function(e,t,n){"use strict";var r=n(54),o=n(49),i=n(69),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),e.exports=a},function(e,t,n){"use strict";var r=n(54),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.test(t)){e.innerHTML="\ufeff"+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}e.exports=a},function(e,t,n){(function(t){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r when using tables, nesting tags like ,

, or , or using non-SVG elements in an parent. Try inspecting the child nodes of the element with React ID `%s`.",n,Y.getID(e)):I(!1)},_mountImageIntoNode:function(e,n,o){if("production"!==t.env.NODE_ENV?I(n&&(n.nodeType===U||n.nodeType===B),"mountComponentIntoNode(...): Target container is not valid."):I(n&&(n.nodeType===U||n.nodeType===B)),o){var i=S(n);if(w.canReuseMarkup(e,i))return;var a=i.getAttribute(w.CHECKSUM_ATTR_NAME);i.removeAttribute(w.CHECKSUM_ATTR_NAME);var s=i.outerHTML;i.setAttribute(w.CHECKSUM_ATTR_NAME,a);var u=r(e,s),l=" (client) "+e.substring(u-20,u+20)+"\n (server) "+s.substring(u-20,u+20);"production"!==t.env.NODE_ENV?I(n.nodeType!==B,"You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s",l):I(n.nodeType!==B),"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?j(!1,"React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:\n%s",l):null)}"production"!==t.env.NODE_ENV?I(n.nodeType!==B,"You're trying to render a component to the document but you didn't use server rendering. We can't do this without using server rendering due to cross-browser quirks. See React.renderToString() for server rendering."):I(n.nodeType!==B),R(n,e)},getReactRootID:o,getID:i,setID:s,getNode:u,getNodeFromInstance:l,purgeID:p};C.measureMethods(Y,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),e.exports=Y}).call(t,n(6))},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,v)||(e[v]=d++,p[e[v]]={}),p[e[v]]}var o=n(8),i=n(72),a=n(73),s=n(76),u=n(77),l=n(16),c=n(78),p={},f=!1,d=0,h={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},v="_reactListenersID"+String(Math.random()).slice(2),m=l({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(m.handleTopLevel),m.ReactEventListener=e}},setEnabled:function(e){m.ReactEventListener&&m.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!m.ReactEventListener||!m.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,i=r(n),s=a.registrationNameDependencies[e],u=o.topLevelTypes,l=0,p=s.length;l-1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e):a(r>-1),!l.plugins[r]){"production"!==t.env.NODE_ENV?a(n.extractEvents,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e):a(n.extractEvents),l.plugins[r]=n;var i=n.eventTypes;for(var c in i)"production"!==t.env.NODE_ENV?a(o(i[c],n,c),"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",c,e):a(o(i[c],n,c))}}}function o(e,n,r){"production"!==t.env.NODE_ENV?a(!l.eventNameDispatchConfigs.hasOwnProperty(r),"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",r):a(!l.eventNameDispatchConfigs.hasOwnProperty(r)),l.eventNameDispatchConfigs[r]=e;var o=e.phasedRegistrationNames;if(o){for(var s in o)if(o.hasOwnProperty(s)){var u=o[s];i(u,n,r)}return!0}return!!e.registrationName&&(i(e.registrationName,n,r),!0)}function i(e,n,r){"production"!==t.env.NODE_ENV?a(!l.registrationNameModules[e],"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e):a(!l.registrationNameModules[e]),l.registrationNameModules[e]=n,l.registrationNameDependencies[e]=n.eventTypes[r].dependencies}var a=n(10),s=null,u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){"production"!==t.env.NODE_ENV?a(!s,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."):a(!s),s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var n=!1;for(var o in e)if(e.hasOwnProperty(o)){var i=e[o];u.hasOwnProperty(o)&&u[o]===i||("production"!==t.env.NODE_ENV?a(!u[o],"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",o):a(!u[o]),u[o]=i,n=!0)}n&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=l}).call(t,n(6))},function(e,t,n){(function(t){"use strict";function r(e,n){if("production"!==t.env.NODE_ENV?o(null!=n,"accumulateInto(...): Accumulated items must not be null or undefined."):o(null!=n),null==e)return n;var r=Array.isArray(e),i=Array.isArray(n);return r&&i?(e.push.apply(e,n),e):r?(e.push(n),e):i?[e].concat(n):[e,n]}var o=n(10);e.exports=r}).call(t,n(6))},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue()}var o=n(72),i={handleTopLevel:function(e,t,n,i){var a=o.extractEvents(e,t,n,i);r(a)}};e.exports=i},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */ function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=n(54);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){(function(t){"use strict";function r(e){c[e]=!0}function o(e){delete c[e]}function i(e){return!!c[e]}var a,s=n(14),u=n(28),l=n(10),c={},p={injectEmptyComponent:function(e){a=s.createFactory(e)}},f=function(){};f.prototype.componentDidMount=function(){var e=u.get(this);e&&r(e._rootNodeID)},f.prototype.componentWillUnmount=function(){var e=u.get(this);e&&o(e._rootNodeID)},f.prototype.render=function(){return"production"!==t.env.NODE_ENV?l(a,"Trying to return null from a render, but no null placeholder component was injected."):l(a),a()};var d=s.createElement(f),h={emptyElement:d,injection:p,isNullComponentID:i};e.exports=h}).call(t,n(6))},function(e,t,n){"use strict";var r=n(81),o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(">"," "+o.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var n=t.getAttribute(o.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=o},function(e,t){"use strict";function n(e){for(var t=1,n=0,o=0;o is being rendered by both %s and %s using the same key (%s) in the same place. Currently, this means that they don't preserve state. This behavior should be very rare so we're considering deprecating it. Please contact the React team and explain your use case so that we can take that into consideration.",l||"Unknown Component",s||"[Unknown]",u||"[Unknown]",e.key):null))),a}}return!1}var o=n(18);e.exports=r}).call(t,n(6))},function(e,t,n){(function(t){"use strict";function r(e){e&&(null!=e.dangerouslySetInnerHTML&&("production"!==t.env.NODE_ENV?y(null==e.children,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."):y(null==e.children),"production"!==t.env.NODE_ENV?y("object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML,"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information."):y("object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML)),"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?E(null==e.innerHTML,"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."):null,"production"!==t.env.NODE_ENV?E(!e.contentEditable||null==e.children,"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."):null),"production"!==t.env.NODE_ENV?y(null==e.style||"object"==typeof e.style,"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."):y(null==e.style||"object"==typeof e.style))}function o(e,n,r,o){"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?E("onScroll"!==n||g("scroll",!0),"This browser doesn't support the `onScroll` event"):null);var i=f.findReactContainerForID(e);if(i){var a=i.nodeType===P?i.ownerDocument:i;O(n,a)}o.getPutListenerQueue().enqueuePutListener(e,n,r)}function i(e){S.call(M,e)||("production"!==t.env.NODE_ENV?y(D.test(e),"Invalid tag: %s",e):y(D.test(e)),M[e]=!0)}function a(e){i(e),this._tag=e,this._renderedChildren=null,this._previousStyleCopy=null,this._rootNodeID=null}var s=n(52),u=n(47),l=n(46),c=n(71),p=n(50),f=n(70),d=n(91),h=n(31),v=n(16),m=n(49),y=n(10),g=n(78),b=n(42),E=n(18),_=c.deleteListener,O=c.listenTo,N=c.registrationNameModules,w={string:!0,number:!0},C=b({style:null}),P=1,x=null,T={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},D=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,M={},S={}.hasOwnProperty;a.displayName="ReactDOMComponent",a.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e,r(this._currentElement.props);var o=T[this._tag]?"":"";return this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t,n)+o},_createOpenTagMarkupAndPutListeners:function(e){var t=this._currentElement.props,n="<"+this._tag;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(N.hasOwnProperty(r))o(this._rootNodeID,r,i,e);else{r===C&&(i&&(i=this._previousStyleCopy=v({},t.style)),i=s.createMarkupForStyles(i));var a=l.createMarkupForProperty(r,i);a&&(n+=" "+a)}}if(e.renderToStaticMarkup)return n+">";var u=l.createMarkupForID(this._rootNodeID);return n+" "+u+">"},_createContentMarkup:function(e,t){var n="";"listing"!==this._tag&&"pre"!==this._tag&&"textarea"!==this._tag||(n="\n");var r=this._currentElement.props,o=r.dangerouslySetInnerHTML;if(null!=o){if(null!=o.__html)return n+o.__html}else{var i=w[typeof r.children]?r.children:null,a=null!=i?null:r.children;if(null!=i)return n+m(i);if(null!=a){var s=this.mountChildren(a,e,t);return n+s.join("")}}return n},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,o){r(this._currentElement.props),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e,o)},_updateDOMProperties:function(e,t){var n,r,i,a=this._currentElement.props;for(n in e)if(!a.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===C){var s=this._previousStyleCopy;for(r in s)s.hasOwnProperty(r)&&(i=i||{},i[r]="");this._previousStyleCopy=null}else N.hasOwnProperty(n)?_(this._rootNodeID,n):(u.isStandardName[n]||u.isCustomAttribute(n))&&x.deletePropertyByID(this._rootNodeID,n);for(n in a){var l=a[n],c=n===C?this._previousStyleCopy:e[n];if(a.hasOwnProperty(n)&&l!==c)if(n===C)if(l?l=this._previousStyleCopy=v({},l):this._previousStyleCopy=null,c){for(r in c)!c.hasOwnProperty(r)||l&&l.hasOwnProperty(r)||(i=i||{},i[r]="");for(r in l)l.hasOwnProperty(r)&&c[r]!==l[r]&&(i=i||{},i[r]=l[r])}else i=l;else N.hasOwnProperty(n)?o(this._rootNodeID,n,l,t):(u.isStandardName[n]||u.isCustomAttribute(n))&&x.updatePropertyByID(this._rootNodeID,n,l)}i&&x.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t,n){var r=this._currentElement.props,o=w[typeof e.children]?e.children:null,i=w[typeof r.children]?r.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,s=r.dangerouslySetInnerHTML&&r.dangerouslySetInnerHTML.__html,u=null!=o?null:e.children,l=null!=i?null:r.children,c=null!=o||null!=a,p=null!=i||null!=s;null!=u&&null==l?this.updateChildren(null,t,n):c&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=s?a!==s&&x.updateInnerHTMLByID(this._rootNodeID,s):null!=l&&this.updateChildren(l,t,n)},unmountComponent:function(){this.unmountChildren(),c.deleteAllListeners(this._rootNodeID),p.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null}},h.measureMethods(a,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),v(a.prototype,a.Mixin,d.Mixin),a.injection={injectIDOperations:function(e){a.BackendIDOperations=x=e}},e.exports=a}).call(t,n(6))},function(e,t,n){"use strict";function r(e,t,n){h.push({parentID:e,parentNode:null,type:c.INSERT_MARKUP,markupIndex:v.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function o(e,t,n){h.push({parentID:e,parentNode:null,type:c.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function i(e,t){h.push({parentID:e,parentNode:null,type:c.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function a(e,t){h.push({parentID:e,parentNode:null,type:c.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function s(){h.length&&(l.processChildrenUpdates(h,v),u())}function u(){h.length=0,v.length=0}var l=n(88),c=n(67),p=n(32),f=n(92),d=0,h=[],v=[],m={Mixin:{mountChildren:function(e,t,n){var r=f.instantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=this._rootNodeID+a,l=p.mountComponent(s,u,t,n);s._mountIndex=i,o.push(l),i++}return o},updateTextContent:function(e){d++;var t=!0;try{var n=this._renderedChildren;f.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setTextContent(e),t=!1}finally{d--,d||(t?u():s())}},updateChildren:function(e,t,n){d++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{d--,d||(r?u():s())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,o=f.updateChildren(r,e,t,n);if(this._renderedChildren=o,o||r){var i,a=0,s=0;for(i in o)if(o.hasOwnProperty(i)){var u=r&&r[i],l=o[i];u===l?(this.moveChild(u,s,a),a=Math.max(u._mountIndex,a),u._mountIndex=s):(u&&(a=Math.max(u._mountIndex,a),this._unmountChildByName(u,i)),this._mountChildByNameAtIndex(l,i,s,t,n)),s++}for(i in r)!r.hasOwnProperty(i)||o&&o.hasOwnProperty(i)||this._unmountChildByName(r[i],i)}},unmountChildren:function(){var e=this._renderedChildren;f.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex8&&N<=11),P=32,x=String.fromCharCode(P),T=d.topLevelTypes,D={beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[T.topCompositionEnd,T.topKeyPress,T.topTextInput,T.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[T.topBlur,T.topCompositionEnd,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null})},dependencies:[T.topBlur,T.topCompositionStart,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[T.topBlur,T.topCompositionUpdate,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]}},M=!1,S=null,k={eventTypes:D,extractEvents:function(e,t,n,r){return[l(e,t,n,r),f(e,t,n,r)]}};e.exports=k},function(e,t,n){(function(t){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return m(e,r)}function o(e,n,o){if("production"!==t.env.NODE_ENV&&!e)throw new Error("Dispatching id must not be null");var i=n?v.bubbled:v.captured,a=r(e,o,i);a&&(o._dispatchListeners=d(o._dispatchListeners,a),o._dispatchIDs=d(o._dispatchIDs,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&f.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)}function a(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=m(e,r);o&&(n._dispatchListeners=d(n._dispatchListeners,o),n._dispatchIDs=d(n._dispatchIDs,e))}}function s(e){e&&e.dispatchConfig.registrationName&&a(e.dispatchMarker,null,e)}function u(e){h(e,i)}function l(e,t,n,r){f.injection.getInstanceHandle().traverseEnterLeave(n,r,a,e,t)}function c(e){h(e,s)}var p=n(8),f=n(72),d=n(74),h=n(75),v=p.PropagationPhases,m=f.getListener,y={accumulateTwoPhaseDispatches:u,accumulateDirectDispatches:c,accumulateEnterLeaveDispatches:l};e.exports=y}).call(t,n(6))},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(12),i=n(16),a=n(98);i(r.prototype,{getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;e1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),o.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(54),i=null;e.exports=r},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(100),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var r=this.constructor.Interface;for(var o in r)if(r.hasOwnProperty(o)){var i=r[o];i?this[o]=i(n):this[o]=n[o]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1; s?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var o=n(12),i=n(16),a=n(19),s=n(101),u={type:null,target:s,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=u,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);i(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=i({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.threeArgumentPooler)},o.addPoolingTo(r,o.threeArgumentPooler),e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(100),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function o(e){var t=N.getPooled(T.change,M,e);E.accumulateTwoPhaseDispatches(t),O.batchedUpdates(i,t)}function i(e){b.enqueueEvents(e),b.processEventQueue()}function a(e,t){D=e,M=t,D.attachEvent("onchange",o)}function s(){D&&(D.detachEvent("onchange",o),D=null,M=null)}function u(e,t,n){if(e===x.topChange)return n}function l(e,t,n){e===x.topFocus?(s(),a(t,n)):e===x.topBlur&&s()}function c(e,t){D=e,M=t,S=e.value,k=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(D,"value",A),D.attachEvent("onpropertychange",f)}function p(){D&&(delete D.value,D.detachEvent("onpropertychange",f),D=null,M=null,S=null,k=null)}function f(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==S&&(S=t,o(e))}}function d(e,t,n){if(e===x.topInput)return n}function h(e,t,n){e===x.topFocus?(p(),c(t,n)):e===x.topBlur&&p()}function v(e,t,n){if((e===x.topSelectionChange||e===x.topKeyUp||e===x.topKeyDown)&&D&&D.value!==S)return S=D.value,M}function m(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function y(e,t,n){if(e===x.topClick)return n}var g=n(8),b=n(72),E=n(96),_=n(54),O=n(29),N=n(100),w=n(78),C=n(104),P=n(42),x=g.topLevelTypes,T={change:{phasedRegistrationNames:{bubbled:P({onChange:null}),captured:P({onChangeCapture:null})},dependencies:[x.topBlur,x.topChange,x.topClick,x.topFocus,x.topInput,x.topKeyDown,x.topKeyUp,x.topSelectionChange]}},D=null,M=null,S=null,k=null,I=!1;_.canUseDOM&&(I=w("change")&&(!("documentMode"in document)||document.documentMode>8));var R=!1;_.canUseDOM&&(R=w("input")&&(!("documentMode"in document)||document.documentMode>9));var A={get:function(){return k.get.call(this)},set:function(e){S=""+e,k.set.call(this,e)}},j={eventTypes:T,extractEvents:function(e,t,n,o){var i,a;if(r(t)?I?i=u:a=l:C(t)?R?i=d:(i=v,a=h):m(t)&&(i=y),i){var s=i(e,t,n);if(s){var c=N.getPooled(T.change,s,o);return E.accumulateTwoPhaseDispatches(c),c}}a&&a(e,t,n)}};e.exports=j},function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&r[e.type]||"TEXTAREA"===e.nodeName)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t){"use strict";var n=0,r={createReactRootIndex:function(){return n++}};e.exports=r},function(e,t,n){"use strict";var r=n(42),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null}),r({AnalyticsEventPlugin:null}),r({MobileSafariClickEventPlugin:null})];e.exports=o},function(e,t,n){"use strict";var r=n(8),o=n(96),i=n(108),a=n(70),s=n(42),u=r.topLevelTypes,l=a.getFirstReactDOM,c={mouseEnter:{registrationName:s({onMouseEnter:null}),dependencies:[u.topMouseOut,u.topMouseOver]},mouseLeave:{registrationName:s({onMouseLeave:null}),dependencies:[u.topMouseOut,u.topMouseOver]}},p=[null,null],f={eventTypes:c,extractEvents:function(e,t,n,r){if(e===u.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==u.topMouseOut&&e!==u.topMouseOver)return null;var s;if(t.window===t)s=t;else{var f=t.ownerDocument;s=f?f.defaultView||f.parentWindow:window}var d,h;if(e===u.topMouseOut?(d=t,h=l(r.relatedTarget||r.toElement)||s):(d=s,h=t),d===h)return null;var v=d?a.getID(d):"",m=h?a.getID(h):"",y=i.getPooled(c.mouseLeave,v,r);y.type="mouseleave",y.target=d,y.relatedTarget=h;var g=i.getPooled(c.mouseEnter,m,r);return g.type="mouseenter",g.target=h,g.relatedTarget=d,o.accumulateEnterLeaveDispatches(y,g,v,m),p[0]=y,p[1]=g,p}};e.exports=f},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(109),i=n(77),a=n(110),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};o.augmentClass(r,s),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(100),i=n(101),a={view:function(e){if(e.view)return e.view;var t=i(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,a),e.exports=r},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return!!r&&!!n[r]}function r(e){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t,n){"use strict";var r,o=n(47),i=n(54),a=o.injection.MUST_USE_ATTRIBUTE,s=o.injection.MUST_USE_PROPERTY,u=o.injection.HAS_BOOLEAN_VALUE,l=o.injection.HAS_SIDE_EFFECTS,c=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,f=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(i.canUseDOM){var d=document.implementation;r=d&&d.hasFeature&&d.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|u,allowTransparency:a,alt:null,async:u,autoComplete:null,autoPlay:u,cellPadding:null,cellSpacing:null,charSet:a,checked:s|u,classID:a,className:r?a:s,cols:a|p,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:s|u,coords:null,crossOrigin:null,data:null,dateTime:a,defer:u,dir:null,disabled:a|u,download:f,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:u,formTarget:a,frameBorder:a,headers:null,height:a,hidden:a|u,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:s,label:null,lang:null,list:a,loop:s|u,low:null,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,multiple:s|u,muted:s|u,name:null,noValidate:u,open:u,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:s|u,rel:null,required:u,role:a,rows:a|p,rowSpan:null,sandbox:null,scope:null,scoped:u,scrolling:null,seamless:a|u,selected:s|u,shape:null,size:a|p,sizes:a,span:p,spellCheck:null,src:null,srcDoc:s,srcSet:a,start:c,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:s|l,width:a,wmode:a,autoCapitalize:null,autoCorrect:null,itemProp:a,itemScope:a|u,itemType:a,itemID:a,itemRef:a,property:null,unselectable:a},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};e.exports=h},function(e,t,n){"use strict";var r=n(8),o=n(19),i=r.topLevelTypes,a={eventTypes:null,extractEvents:function(e,t,n,r){if(e===i.topTouchStart){var a=r.target;a&&!a.onclick&&(a.onclick=o)}}};e.exports=a},function(e,t,n){"use strict";var r=n(114),o={getDOMNode:function(){return r(this)}};e.exports=o},function(e,t,n){(function(t){"use strict";function r(e){if("production"!==t.env.NODE_ENV){var n=o.current;null!==n&&("production"!==t.env.NODE_ENV?l(n._warnedAboutRefsInRender,"%s is accessing getDOMNode or findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",n.getName()||"A component"):null,n._warnedAboutRefsInRender=!0)}return null==e?null:u(e)?e:i.has(e)?a.getNodeFromInstance(e):("production"!==t.env.NODE_ENV?s(null==e.render||"function"!=typeof e.render,"Component (with keys: %s) contains `render` method but is not mounted in the DOM",Object.keys(e)):s(null==e.render||"function"!=typeof e.render),void("production"!==t.env.NODE_ENV?s(!1,"Element appears to be neither ReactComponent nor DOMNode (keys: %s)",Object.keys(e)):s(!1)))}var o=n(20),i=n(28),a=n(70),s=n(10),u=n(84),l=n(18);e.exports=r}).call(t,n(6))},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(29),i=n(39),a=n(16),s=n(19),u={initialize:s,close:function(){f.isBatchingUpdates=!1}},l={initialize:s,close:o.flushBatchedUpdates.bind(o)},c=[l,u];a(r.prototype,i.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o){var i=f.isBatchingUpdates;f.isBatchingUpdates=!0,i?e(t,n,r,o):p.perform(e,null,t,n,r,o)}};e.exports=f},function(e,t,n){"use strict";var r=n(117),o=n(113),i=n(40),a=n(14),s=n(9),u=a.createFactory("button"),l=s({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),c=i.createClass({displayName:"ReactDOMButton",tagName:"BUTTON",mixins:[r,o],render:function(){var e={};for(var t in this.props)!this.props.hasOwnProperty(t)||this.props.disabled&&l[t]||(e[t]=this.props[t]);return u(e,this.props.children)}});e.exports=c},function(e,t,n){"use strict";var r=n(118),o={componentDidMount:function(){this.props.autoFocus&&r(this.getDOMNode())}};e.exports=o},function(e,t){"use strict";function n(e){try{e.focus()}catch(e){}}e.exports=n},function(e,t,n){"use strict";var r=n(8),o=n(120),i=n(113),a=n(40),s=n(14),u=s.createFactory("form"),l=a.createClass({displayName:"ReactDOMForm",tagName:"FORM",mixins:[i,o],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(r.topLevelTypes.topSubmit,"submit")}});e.exports=l},function(e,t,n){(function(t){"use strict";function r(e){e.remove()}var o=n(71),i=n(74),a=n(75),s=n(10),u={trapBubbledEvent:function(e,n){"production"!==t.env.NODE_ENV?s(this.isMounted(),"Must be mounted to trap events"):s(this.isMounted());var r=this.getDOMNode();"production"!==t.env.NODE_ENV?s(r,"LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered."):s(r);var a=o.trapBubbledEvent(e,n,r);this._localEventListeners=i(this._localEventListeners,a)},componentWillUnmount:function(){this._localEventListeners&&a(this._localEventListeners,r)}};e.exports=u}).call(t,n(6))},function(e,t,n){"use strict";var r=n(8),o=n(120),i=n(113),a=n(40),s=n(14),u=s.createFactory("img"),l=a.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[i,o],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(r.topLevelTypes.topError,"error")}});e.exports=l},function(e,t,n){"use strict";var r=n(8),o=n(120),i=n(113),a=n(40),s=n(14),u=s.createFactory("iframe"),l=a.createClass({displayName:"ReactDOMIframe",tagName:"IFRAME",mixins:[i,o],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topLoad,"load")}});e.exports=l},function(e,t,n){(function(t){"use strict";function r(){this.isMounted()&&this.forceUpdate()}var o=n(117),i=n(46),a=n(124),s=n(113),u=n(40),l=n(14),c=n(70),p=n(29),f=n(16),d=n(10),h=l.createFactory("input"),v={},m=u.createClass({displayName:"ReactDOMInput",tagName:"INPUT",mixins:[o,a.Mixin,s],getInitialState:function(){var e=this.props.defaultValue;return{initialChecked:this.props.defaultChecked||!1,initialValue:null!=e?e:null}},render:function(){var e=f({},this.props);e.defaultChecked=null,e.defaultValue=null;var t=a.getValue(this);e.value=null!=t?t:this.state.initialValue;var n=a.getChecked(this);return e.checked=null!=n?n:this.state.initialChecked,e.onChange=this._handleChange,h(e,this.props.children)},componentDidMount:function(){var e=c.getID(this.getDOMNode());v[e]=this},componentWillUnmount:function(){var e=this.getDOMNode(),t=c.getID(e);delete v[t]},componentDidUpdate:function(e,t,n){var r=this.getDOMNode();null!=this.props.checked&&i.setValueForProperty(r,"checked",this.props.checked||!1);var o=a.getValue(this);null!=o&&i.setValueForProperty(r,"value",""+o)},_handleChange:function(e){var n,o=a.getOnChange(this);o&&(n=o.call(this,e)),p.asap(r,this);var i=this.props.name;if("radio"===this.props.type&&null!=i){for(var s=this.getDOMNode(),u=s;u.parentNode;)u=u.parentNode;for(var l=u.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),f=0,h=l.length;f>",O=s(),N=f(),w={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:a,element:O,instanceOf:u,node:N,objectOf:c,oneOf:l,oneOfType:p,shape:d};e.exports=w},function(e,t,n){(function(t){"use strict";var r=n(113),o=n(40),i=n(14),a=n(18),s=i.createFactory("option"),u=o.createClass({displayName:"ReactDOMOption",tagName:"OPTION",mixins:[r],componentWillMount:function(){"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?a(null==this.props.selected,"Use the `defaultValue` or `value` props on , and ) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.",this.constructor.displayName):a(!1)},render:function(){return n(this.props)}});return r}var o=n(40),i=n(14),a=n(10);e.exports=r}).call(t,n(6))},function(e,t,n){"use strict";function r(e){return Math.floor(100*e)/100}function o(e,t,n){e[t]=(e[t]||0)+n}var i=n(47),a=n(154),s=n(70),u=n(31),l=n(155),c={_allMeasurements:[],_mountStack:[0],_injected:!1,start:function(){c._injected||u.injection.injectMeasure(c.measure),c._allMeasurements.length=0,u.enableMeasure=!0},stop:function(){u.enableMeasure=!1},getLastMeasurements:function(){return c._allMeasurements},printExclusive:function(e){e=e||c._allMeasurements;var t=a.getExclusiveSummary(e);console.table(t.map(function(e){return{"Component class name":e.componentName,"Total inclusive time (ms)":r(e.inclusive),"Exclusive mount time (ms)":r(e.exclusive),"Exclusive render time (ms)":r(e.render),"Mount time per instance (ms)":r(e.exclusive/e.count),"Render time per instance (ms)":r(e.render/e.count),Instances:e.count}}))},printInclusive:function(e){e=e||c._allMeasurements;var t=a.getInclusiveSummary(e);console.table(t.map(function(e){return{"Owner > component":e.componentName,"Inclusive time (ms)":r(e.time),Instances:e.count}})),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(e){var t=a.getInclusiveSummary(e,!0);return t.map(function(e){return{"Owner > component":e.componentName,"Wasted time (ms)":e.time,Instances:e.count}})},printWasted:function(e){e=e||c._allMeasurements,console.table(c.getMeasurementsSummaryMap(e)),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},printDOM:function(e){e=e||c._allMeasurements;var t=a.getDOMSummary(e);console.table(t.map(function(e){var t={};return t[i.ID_ATTRIBUTE_NAME]=e.id,t.type=e.type,t.args=JSON.stringify(e.args),t})),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},_recordWrite:function(e,t,n,r){var o=c._allMeasurements[c._allMeasurements.length-1].writes;o[e]=o[e]||[],o[e].push({type:t,time:n,args:r})},measure:function(e,t,n){return function(){for(var r=[],i=0,a=arguments.length;i"},p}}};e.exports=c},function(e,t,n){function r(e){for(var t=0,n=0;n=l&&s.push(n[t]);return s.sort(function(e,t){return t.exclusive-e.exclusive}),s}function a(e,t){for(var n,r={},o=0;o "+f.current,r[n]=r[n]||{componentName:n,time:0,count:0},a.inclusive[p]&&(r[n].time+=a.inclusive[p]),a.counts[p]&&(r[n].count+=a.counts[p])}}var d=[];for(n in r)r[n].time>=l&&d.push(r[n]);return d.sort(function(e,t){return t.time-e.time}),d}function s(e){var t={},n=Object.keys(e.writes),r=u({},e.exclusive,e.inclusive);for(var o in r){for(var i=!1,a=0;a0&&(t[o]=!0)}return t}var u=n(16),l=1.2,c={_mountImageIntoNode:"set innerHTML",INSERT_MARKUP:"set innerHTML",MOVE_EXISTING:"move",REMOVE_NODE:"remove",TEXT_CONTENT:"set textContent",updatePropertyByID:"update attribute",deletePropertyByID:"delete attribute",updateStylesByID:"update styles",updateInnerHTMLByID:"set innerHTML",dangerouslyReplaceNodeWithMarkupByID:"replace"},p={getExclusiveSummary:i,getInclusiveSummary:a,getDOMSummary:o,getTotalTime:r};e.exports=p},function(e,t,n){var r=n(156);r&&r.now||(r=Date);var o=r.now.bind(r);e.exports=o},function(e,t,n){"use strict";var r,o=n(54);o.canUseDOM&&(r=window.performance||window.msPerformance||window.webkitPerformance),e.exports=r||{}},function(e,t,n){(function(t){"use strict";function r(e){"production"!==t.env.NODE_ENV?p(i.isValidElement(e),"renderToString(): You must pass a valid ReactElement."):p(i.isValidElement(e));var n;try{var r=a.createReactRootID();return n=u.getPooled(!1),n.perform(function(){var t=c(e,null),o=t.mountComponent(r,n,l);return s.addChecksumToMarkup(o)},null)}finally{u.release(n)}}function o(e){"production"!==t.env.NODE_ENV?p(i.isValidElement(e),"renderToStaticMarkup(): You must pass a valid ReactElement."):p(i.isValidElement(e));var n;try{var r=a.createReactRootID();return n=u.getPooled(!0),n.perform(function(){var t=c(e,null);return t.mountComponent(r,n,l)},null)}finally{u.release(n)}}var i=n(14),a=n(22),s=n(80),u=n(158),l=n(17),c=n(86),p=n(10);e.exports={renderToString:r,renderToStaticMarkup:o}}).call(t,n(6))},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=i.getPooled(null),this.putListenerQueue=a.getPooled()}var o=n(12),i=n(30),a=n(138),s=n(39),u=n(16),l=n(19),c={initialize:function(){this.reactMountReady.reset()},close:l},p={initialize:function(){this.putListenerQueue.reset()},close:l},f=[p,c],d={getTransactionWrappers:function(){return f},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null,a.release(this.putListenerQueue),this.putListenerQueue=null}};u(r.prototype,s.Mixin,d),o.addPoolingTo(r),e.exports=r},function(e,t,n){(function(t){"use strict";function r(e){return"production"!==t.env.NODE_ENV?i(o.isValidElement(e),"onlyChild must be passed a children with exactly one child."):i(o.isValidElement(e)),e}var o=n(14),i=n(10);e.exports=r}).call(t,n(6))},function(e,t,n){var r=n(161);r.connect=n(175),r.connectFilter=n(177),r.ListenerMixin=n(176),r.listenTo=n(178),r.listenToMany=n(179),e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={version:{"reflux-core":"0.2.1"}};r.ActionMethods=n(162),r.ListenerMethods=n(163),r.PublisherMethods=n(173),r.StoreMethods=n(172),r.createAction=n(174),r.createStore=n(168);var o=n(167).staticJoinCreator;r.joinTrailing=r.all=o("last"),r.joinLeading=o("first"),r.joinStrict=o("strict"),r.joinConcat=o("all");var i=r.utils=n(164);r.EventEmitter=i.EventEmitter,r.Promise=i.Promise,r.createActions=function(){var e=function(e,t){Object.keys(e).forEach(function(n){var o=e[n];t[n]=r.createAction(o)})};return function(t){var n={};return t instanceof Array?t.forEach(function(t){i.isObject(t)?e(t,n):n[t]=r.createAction(t)}):e(t,n),n}}(),r.setEventEmitter=function(e){r.EventEmitter=i.EventEmitter=e},r.setPromise=function(e){r.Promise=i.Promise=e},r.setPromiseFactory=function(e){i.createPromise=e},r.nextTick=function(e){i.nextTick=e},r.use=function(e){e(r)},r.__keep=n(169),Function.prototype.bind||console.error("Function.prototype.bind not available. ES5 shim required. https://github.com/spoike/refluxjs#es5"),t.default=r,e.exports=t.default},function(e,t){"use strict";e.exports={}},function(e,t,n){"use strict";var r=n(164),o=n(167).instanceJoinCreator,i=function(e){for(var t,n=0,r={};n<(e.children||[]).length;++n)t=e.children[n],e[t]&&(r[t]=e[t]);return r},a=function e(t){var n={};for(var o in t){var a=t[o],s=i(a),u=e(s);n[o]=a;for(var l in u){var c=u[l];n[o+r.capitalize(l)]=c}}return n};e.exports={hasListener:function(e){for(var t,n,r,o=0;o<(this.subscriptions||[]).length;++o)for(r=[].concat(this.subscriptions[o].listenable),t=0;t=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(166),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1&&(n.init=function(){var e=arguments;t.init.forEach(function(t){t.apply(this,e)},this)}),t.preEmit.length>1&&(n.preEmit=function(){return t.preEmit.reduce(function(e,t){var n=t.apply(this,e);return void 0===n?e:[n]}.bind(this),arguments)}),t.shouldEmit.length>1&&(n.shouldEmit=function(){var e=arguments;return!t.shouldEmit.some(function(t){return!t.apply(this,e)},this)}),Object.keys(t).forEach(function(e){1===t[e].length&&(n[e]=t[e][0])}),n}},function(e,t){"use strict";e.exports=function(e,t){for(var n in t)if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var r=Object.getOwnPropertyDescriptor(t,n);if(!r.value||"function"!=typeof r.value||!t.hasOwnProperty(n))continue;e[n]=t[n].bind(e)}else{var o=t[n];if("function"!=typeof o||!t.hasOwnProperty(n))continue;e[n]=o.bind(e)}return e}},function(e,t){"use strict";e.exports={}},function(e,t,n){"use strict";var r=n(164);e.exports={preEmit:function(){},shouldEmit:function(){return!0},listen:function(e,t){t=t||this;var n=function(n){o||e.apply(t,n)},r=this,o=!1;return this.emitter.addListener(this.eventLabel,n),function(){o=!0,r.emitter.removeListener(r.eventLabel,n)}},promise:function(e){var t=this,n=this.children.indexOf("completed")>=0&&this.children.indexOf("failed")>=0;if(!n)throw new Error('Publisher must have "completed" and "failed" child publishers');e.then(function(e){return t.completed(e)},function(e){return t.failed(e)})},listenAndPromise:function(e,t){var n=this;t=t||this,this.willCallPromise=(this.willCallPromise||0)+1;var r=this.listen(function(){if(!e)throw new Error("Expected a function returning a promise but got "+e);var r=arguments,o=e.apply(t,r);return n.promise.call(n,o)},t);return function(){n.willCallPromise--,r.call(n)}},trigger:function(){var e=arguments,t=this.preEmit.apply(this,e);e=void 0===t?e:r.isArguments(t)?t:[].concat(t),this.shouldEmit.apply(this,e)&&this.emitter.emit(this.eventLabel,e)},triggerAsync:function(){var e=arguments,t=this;r.nextTick(function(){t.trigger.apply(t,e)})},triggerPromise:function(){var e=this,t=arguments,n=this.children.indexOf("completed")>=0&&this.children.indexOf("failed")>=0,o=r.createPromise(function(o,i){if(e.willCallPromise)return void r.nextTick(function(){var n=e.promise;e.promise=function(t){return t.then(o,i),e.promise=n,e.promise.apply(e,arguments)},e.trigger.apply(e,t)});if(n)var a=e.completed.listen(function(e){a(),s(),o(e)}),s=e.failed.listen(function(e){a(),s(),i(e)});e.triggerAsync.apply(e,t),n||o()});return o}}},function(e,t,n){"use strict";var r=n(164),o=n(162),i=n(173),a=n(169),s={preEmit:1,shouldEmit:1},u=function e(t){t=t||{},r.isObject(t)||(t={actionName:t});for(var n in o)if(!s[n]&&i[n])throw new Error("Cannot override API method "+n+" in Reflux.ActionMethods. Use another method name or override it on Reflux.PublisherMethods instead.");for(var u in t)if(!s[u]&&i[u])throw new Error("Cannot override API method "+u+" in action creation. Use another method name or override it on Reflux.PublisherMethods instead.");t.children=t.children||[],t.asyncResult&&(t.children=t.children.concat(["completed","failed"]));for(var l=0,c={};l1){var a=o(e),s=a[0],u=a.slice(1),l=""+u.join(", ")+" and "+s;return new Error("Invalid prop '"+n+"', only one of the following may be provided: "+l)}}return t}function c(e){if(void 0===e)throw new Error("No validations provided");if(!(e instanceof Array))throw new Error("Invalid argument must be an array");if(0===e.length)throw new Error("No validations provided");return function(t,n,r){for(var o=0;o>",v={isRequiredForA11y:function(e){return function(t,n,r){return null===t[n]?new Error("The prop `"+n+"` is required to make "+r+" accessible for users using assistive technologies such as screen readers `"):e(t,n,r)}},mountable:s(),elementType:p(),keyOf:u,singlePropFrom:l,all:c};t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=0;return l.default.Children.map(e,function(e){if(l.default.isValidElement(e)){var o=r;return r++,t.call(n,e,o)}return e})}function i(e,t,n){var r=0;return l.default.Children.forEach(e,function(e){l.default.isValidElement(e)&&(t.call(n,e,r),r++)})}function a(e){var t=0;return l.default.Children.forEach(e,function(e){l.default.isValidElement(e)&&t++}),t}function s(e){var t=!1;return l.default.Children.forEach(e,function(e){!t&&l.default.isValidElement(e)&&(t=!0)}),t}Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),l=r(u);t.default={map:o,forEach:i,numberOf:a,hasValidComponent:s},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=t-a?"bottom":null!=o&&n<=o&&"top"),this.affixed!==u&&(null!=this.unpin&&(e.style.top=""),l="affix"+(u?"-"+u:""),this.affixed=u,this.unpin="bottom"===u?this.getPinnedOffset(e):null,"bottom"===u&&(e.className=e.className.replace(/affix-top|affix-bottom|affix/,"affix-bottom"),c=t-a-e.offsetHeight-s.default.getOffset(e).top),this.setState({affixClass:l,affixPositionTop:c}))))},checkPositionWithEventLoop:function(){setTimeout(this.checkPosition,0)},componentDidMount:function(){this._onWindowScrollListener=l.default.listen(window,"scroll",this.checkPosition),this._onDocumentClickListener=l.default.listen(s.default.ownerDocument(this),"click",this.checkPositionWithEventLoop)},componentWillUnmount:function(){this._onWindowScrollListener&&this._onWindowScrollListener.remove(),this._onDocumentClickListener&&this._onDocumentClickListener.remove()},componentDidUpdate:function(e,t){t.affixClass===this.state.affixClass&&this.checkPositionWithEventLoop()}};t.default=c,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=d.default.findDOMNode(e);return t&&t.ownerDocument||document}function i(e){var t=o(e);return t.defaultView?t.defaultView:t.parentWindow}function a(e){var t=o(e);try{return t.activeElement||t.body}catch(e){return t.body}}function s(e){return o(e).defaultView.getComputedStyle(e,null)}function u(e){if(window.jQuery)return window.jQuery(e).offset();var t=o(e).documentElement,n={top:0,left:0};return"undefined"!=typeof e.getBoundingClientRect&&(n=e.getBoundingClientRect()),{top:n.top+window.pageYOffset-t.clientTop,left:n.left+window.pageXOffset-t.clientLeft}}function l(e,t){var n=void 0,r=void 0;return window.jQuery?t?(n=window.jQuery(e).offset(),r=window.jQuery(t).offset(),{top:n.top-r.top,left:n.left-r.left}):window.jQuery(e).position():(r={top:0,left:0},"fixed"===s(e).position?n=e.getBoundingClientRect():(t||(t=c(e)),n=u(e),"HTML"!==t.nodeName&&(r=u(t)),r.top+=parseInt(s(t).borderTopWidth,10),r.left+=parseInt(s(t).borderLeftWidth,10)),{top:n.top-r.top-parseInt(s(e).marginTop,10),left:n.left-r.left-parseInt(s(e).marginLeft,10)})}function c(e){for(var t=o(e).documentElement,n=e.offsetParent||t;n&&"HTML"!==n.nodeName&&"static"===s(n).position;)n=n.offsetParent;return n||t}function p(e,t){function n(e,t){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}return e&&e.contains?e.contains(t):e&&e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):n(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),d=r(f),h=!("undefined"==typeof window||!window.document||!window.document.createElement);t.default={canUseDom:h,contains:p,ownerWindow:i,ownerDocument:o,getComputedStyles:s,getOffset:u,getPosition:l,activeElement:a,offsetParent:c},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0}};t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t1||"string"==typeof this.props.children||"number"==typeof this.props.children},render:function(){var e={"pull-right":this.props.pullRight,badge:this.hasContent()};return a.default.createElement("span",o({},this.props,{className:(0,c.default)(this.props.className,e)}),this.props.children)}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;tt?"prev":"next"},componentWillReceiveProps:function(e){var t=this.getActiveIndex();null!=e.activeIndex&&e.activeIndex!==t&&(clearTimeout(this.timeout),this.setState({previousActiveIndex:t,direction:null!=e.direction?e.direction:this.getDirection(t,e.activeIndex)}))},componentDidMount:function(){this.waitForNext()},componentWillUnmount:function(){clearTimeout(this.timeout)},next:function(e){e&&e.preventDefault();var t=this.getActiveIndex()+1,n=f.default.numberOf(this.props.children);if(t>n-1){if(!this.props.wrap)return;t=0}this.handleSelect(t,"next")},prev:function(e){e&&e.preventDefault();var t=this.getActiveIndex()-1;if(t<0){if(!this.props.wrap)return;t=f.default.numberOf(this.props.children)-1}this.handleSelect(t,"prev")},pause:function(){this.isPaused=!0,clearTimeout(this.timeout)},play:function(){this.isPaused=!1,this.waitForNext()},waitForNext:function(){!this.isPaused&&this.props.slide&&this.props.interval&&null==this.props.activeIndex&&(this.timeout=setTimeout(this.next,this.props.interval))},handleMouseOver:function(){this.props.pauseOnHover&&this.pause()},handleMouseOut:function(){this.isPaused&&this.play()},render:function(){var e={carousel:!0,slide:this.props.slide};return a.default.createElement("div",o({},this.props,{className:(0,u.default)(this.props.className,e),onMouseOver:this.handleMouseOver,onMouseOut:this.handleMouseOut}),this.props.indicators?this.renderIndicators():null,a.default.createElement("div",{className:"carousel-inner",ref:"inner"},f.default.map(this.props.children,this.renderItem)),this.props.controls?this.renderControls():null)},renderPrev:function(){return a.default.createElement("a",{className:"left carousel-control",href:"#prev",key:0,onClick:this.prev},this.props.prevIcon)},renderNext:function(){return a.default.createElement("a",{className:"right carousel-control",href:"#next",key:1,onClick:this.next},this.props.nextIcon)},renderControls:function(){if(!this.props.wrap){var e=this.getActiveIndex(),t=f.default.numberOf(this.props.children);return[0!==e?this.renderPrev():null,e!==t-1?this.renderNext():null]}return[this.renderPrev(),this.renderNext()]},renderIndicator:function(e,t){var n=t===this.getActiveIndex()?"active":null;return a.default.createElement("li",{key:t,className:n,onClick:this.handleSelect.bind(this,t,null)})},renderIndicators:function(){var e=[];return f.default.forEach(this.props.children,function(t,n){e.push(this.renderIndicator(t,n)," ")},this),a.default.createElement("ol",{className:"carousel-indicators"},e)},getActiveIndex:function(){return null!=this.props.activeIndex?this.props.activeIndex:this.state.activeIndex},handleItemAnimateOutEnd:function(){this.setState({previousActiveIndex:null,direction:null},function(){this.waitForNext(),this.props.onSlideEnd&&this.props.onSlideEnd()})},renderItem:function(e,t){var n=this.getActiveIndex(),r=t===n,o=null!=this.state.previousActiveIndex&&this.state.previousActiveIndex===t&&this.props.slide;return(0,i.cloneElement)(e,{active:r,ref:e.ref,key:e.key?e.key:t,index:t,animateOut:o,animateIn:r&&null!=this.state.previousActiveIndex&&this.props.slide,direction:this.state.direction,onAnimateOutEnd:o?this.handleItemAnimateOutEnd:null})},handleSelect:function(e,t){clearTimeout(this.timeout);var n=this.getActiveIndex();if(t=t||this.getDirection(n,e),this.props.onSelect&&this.props.onSelect(e,t),null==this.props.activeIndex&&e!==n){if(null!=this.state.previousActiveIndex)return;this.setState({activeIndex:e,previousActiveIndex:n,direction:t})}}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=0&&(t["col-"+o+this.props[r]]=!0),r=n+"Push",o=n+"-push-",this.props[r]>=0&&(t["col-"+o+this.props[r]]=!0),r=n+"Pull",o=n+"-pull-",this.props[r]>=0&&(t["col-"+o+this.props[r]]=!0)},this),a.default.createElement(e,o({},this.props,{className:(0,u.default)(this.props.className,t)}),this.props.children)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t-1?((0,y.default)("Input type="+this.props.type,"ButtonInput"),l.default.createElement(d.default,this.props)):"static"===this.props.type?((0,y.default)("Input type=static","StaticText"),l.default.createElement(v.default.Static,this.props)):s(Object.getPrototypeOf(t.prototype),"render",this).call(this)}}]),t}(p.default);t.default=g,e.exports=t.default},function(e,t,n){(function(n){"use strict";function r(e,t,r){if("production"!==n.env.NODE_ENV){if("undefined"==typeof console||"function"!=typeof console.warn)return;var o=""+e+" is deprecated. Use "+t+" instead.";console.warn(o),r&&console.warn("You can read more about it at "+r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default}).call(t,n(6))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){var n=N.default.ownerDocument(t);return e===n.body||e===n.documentElement?n.documentElement.clientHeight:e.clientHeight}function a(e){return e.props.container&&d.default.findDOMNode(e.props.container)||N.default.ownerDocument(e).body}function s(e,t){return function(n,r,o){var i=t;return void 0===n[e]&&(i=i.isRequired),i(n,r,o)}}function u(e){var t=[];return d.default.Children.forEach(e,function(e){return t.push(e)}),t}function l(e,t){var n=N.default.ownerDocument(e),r=!n.addEventListener,o=void 0;return V&&V.remove(),r?(document.attachEvent("onfocusin",t),o=function(){return document.detachEvent("onfocusin",t)}):(document.addEventListener("focus",t,!0),o=function(){return document.removeEventListener("focus",t,!0)}),V={remove:o}}function c(){if(void 0!==F)return F;var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),F=e.offsetWidth-e.clientWidth,document.body.removeChild(e),e=null}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;ti(r,this),this._originalPadding=r.style.paddingRight,this._containerIsOverflowing&&(r.style.paddingRight=parseInt(this._originalPadding||0,10)+c()+"px"),this.props.backdrop&&this.iosClickHack(),this.setState(this._getStyles(),function(){return e.focusModalContent()})},componentDidUpdate:function(e){if(this.props.backdrop&&this.props.backdrop!==e.backdrop&&(this.iosClickHack(),this.setState(this._getStyles())),this.props.container!==e.container){var t=a(this);this._containerIsOverflowing=t.scrollHeight>i(t,this)}},componentWillUnmount:function(){this._onDocumentKeyupListener.remove(),this._onWindowResizeListener.remove(),this._onFocusinListener&&this._onFocusinListener.remove();var e=a(this);e.style.paddingRight=this._originalPadding,e.className=e.className.replace(/ ?modal-open/,""),this.restoreLastFocus()},handleBackdropClick:function(e){e.target===e.currentTarget&&this._getHide()()},handleDocumentKeyUp:function(e){this.props.keyboard&&27===e.keyCode&&this._getHide()()},handleWindowResize:function(){this.setState(this._getStyles())},checkForFocus:function(){if(N.default.canUseDom)try{this.lastFocus=document.activeElement}catch(e){}},focusModalContent:function(){var e=d.default.findDOMNode(this.refs.modal),t=N.default.activeElement(this),n=t&&N.default.contains(e,t);this.props.autoFocus&&!n&&(this.lastFocus=t,e.focus())},restoreLastFocus:function(){this.lastFocus&&(this.lastFocus.focus(),this.lastFocus=null)},enforceFocus:function(){if(this.isMounted()){var e=N.default.activeElement(this),t=d.default.findDOMNode(this.refs.modal);t===e||N.default.contains(t,e)||t.focus()}},_getStyles:function(){if(!N.default.canUseDom)return{};var e=d.default.findDOMNode(this.refs.modal),t=e.scrollHeight,n=a(this),r=this._containerIsOverflowing,o=t>i(n,this);return{dialogStyles:{paddingRight:r&&!o?c():void 0,paddingLeft:!r&&o?c():void 0}}}}),B=d.default.createClass({displayName:"Modal",propTypes:p({},D.default.propTypes,U.propTypes),defaultProps:{show:null},render:function(){var e=this.props,t=e.show,n=o(e,["show"]),r=d.default.createElement(U,n,this.props.children);return this.props.__isUsedInModalTrigger||null==t?r:d.default.createElement(D.default,{container:n.container},t&&r)}});B.Body=S.default,B.Header=I.default,B.Title=A.default,B.Footer=L.default,t.default=B,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),a=n(186),s=r(a),u=n(226),l=i.default.createClass({displayName:"Portal",propTypes:{container:s.default.mountable},mixins:[u.OverlayMixin],renderOverlay:function(){return this.props.children?i.default.Children.only(this.props.children):null},render:function(){return null}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t` Component","http://react-bootstrap.github.io/components.html#utilities-portal")}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!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}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}function s(e,t){return function(n){var r=function(e){function t(){i(this,t),null!=e&&e.apply(this,arguments)}return a(t,e),l(t,[{key:"getChildContext",value:function(){return this.props.context}},{key:"render",value:function(){var e=this.props,t=e.wrapped,n=(e.context,o(e,["wrapped","context"]));return p.default.cloneElement(t,n)}}]),t}(p.default.Component);r.childContextTypes=n;var s=function(){function n(){i(this,n)}return l(n,[{key:"render",value:function(){var n=u({},this.props);return n[t]=this.getWrappedOverlay(),p.default.createElement(e,n,this.props.children)}},{key:"getWrappedOverlay",value:function(){return p.default.createElement(r,{context:this.context,wrapped:this.props[t]})}}]),n}();return s.contextTypes=n,s}}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t=0:e===t}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function"); }function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;ta?a-u:0}function i(e,t,n,r){var o=l.getContainerDimensions(n),i=o.width,a=e-r,s=e+r+t;return a<0?-a:s>i?i-s:0}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1?p:1,r=t+i<=u,r?n=t+i-1:(n=u,t=u-i+1)}else t=1,n=u;for(var d=t;d<=n;d++)e.push(a.default.createElement(f.default,{key:d,eventKey:d,active:d===s,onSelect:l},d));return i&&r&&c&&e.push(a.default.createElement(f.default,{key:"ellipsis",disabled:!0},a.default.createElement("span",{"aria-label":"More"},"..."))),e},renderPrev:function(){return this.props.prev?a.default.createElement(f.default,{key:"prev",eventKey:this.props.activePage-1,disabled:1===this.props.activePage,onSelect:this.props.onSelect},a.default.createElement("span",{"aria-label":"Previous"},"‹")):null},renderNext:function(){return this.props.next?a.default.createElement(f.default,{key:"next",eventKey:this.props.activePage+1,disabled:this.props.activePage===this.props.items,onSelect:this.props.onSelect},a.default.createElement("span",{"aria-label":"Next"},"›")):null},renderFirst:function(){return this.props.first?a.default.createElement(f.default,{key:"first",eventKey:1,disabled:1===this.props.activePage,onSelect:this.props.onSelect},a.default.createElement("span",{"aria-label":"First"},"«")):null},renderLast:function(){return this.props.last?a.default.createElement(f.default,{key:"last",eventKey:this.props.items,disabled:this.props.activePage===this.props.items,onSelect:this.props.onSelect},a.default.createElement("span",{"aria-label":"Last"},"»")):null},render:function(){return a.default.createElement("ul",o({},this.props,{className:(0,u.default)(this.props.className,this.getBsClassSet())}),this.renderFirst(),this.renderPrev(),this.renderPageButtons(),this.renderNext(),this.renderLast())}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),a=n(183),s=r(a),u=n(184),l=r(u),c=n(244),p=r(c),f=i.default.createClass({displayName:"PaginationButton",mixins:[l.default],propTypes:{className:i.default.PropTypes.string,eventKey:i.default.PropTypes.oneOfType([i.default.PropTypes.string,i.default.PropTypes.number]),onSelect:i.default.PropTypes.func,disabled:i.default.PropTypes.bool,active:i.default.PropTypes.bool},getDefaultProps:function(){return{active:!1,disabled:!1}},handleClick:function(e){if(e.preventDefault(),this.props.onSelect){var t=(0,p.default)(this.props.eventKey);this.props.onSelect(e,t)}},render:function(){var e=this.getBsClassSet();return e.active=this.props.active,e.disabled=this.props.disabled,i.default.createElement("li",{className:(0,s.default)(this.props.className,e)},i.default.createElement("a",{href:"#",onClick:this.handleClick},this.props.children))}});t.default=f,e.exports=t.default},function(e,t){"use strict";function n(e){var t=!1;return{eventKey:e,preventSelection:function(){t=!0},isSelectionPrevented:function(){return t}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){var t=void 0;return f.default.forEach(e,function(e){null==t&&(t=e.props.eventKey)}),t}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;ta;)o.setDesc(e,n=r[a++],t[n]);return e}),i(i.S+i.F*!a,"Object",{getOwnPropertyDescriptor:o.getDesc,defineProperty:o.setDesc,defineProperties:k});var R="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),A=R.concat("length","prototype"),j=R.length,L=function(){var e,t=l("iframe"),n=j,r=">";for(t.style.display="none",u.appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("

================================================ FILE: server/static/spider/main.html ================================================ ================================================ FILE: server/static/spider/start.html ================================================ 联系方式,电话 - 上海山优环保科技有限开发公司
您现在的位置: 首页 > 上海山优环保科技有限开发公司 > 联系我们

联系我们

  • 公  司: 上海山优环保科技有限开发公司
  • 地  址: 上海南汇区奉贤区四团镇安泰路605号一栋46室
  • 邮  编: 200000
  • 电  话: -
  • 手  机: 18721793085
  • 邮  箱:
  • 联系人 : 钟文华
  • QQ  : 1512206950
  • 公司网站: http://kungeina0315.51sole.com

发送联系信

  • 联 系 人:钟文华
  • 标  题:
  • 咨询内容:
  • 您的姓名: 您的电话:
  • 验证码:
================================================ FILE: server/static/spider/test.html ================================================ 可视化采集平台
content:

================================================ FILE: server/static/spider/work.html ================================================ 可视化采集平台
================================================ FILE: server/static/views/DataPreview.html ================================================ ================================================ FILE: server/static/views/SelectorEdit.html ================================================
{{#selector.columns}} {{/selector.columns}}
列名 自定义key 包括自定义key
{{header}}
================================================ FILE: server/static/views/SelectorEditTableColumn.html ================================================ {{header}} ================================================ FILE: server/static/views/SelectorList.html ================================================
名称 选择器 类型 是否列表 父选择器 选项
================================================ FILE: server/static/views/SelectorListItem.html ================================================ {{id}} {{selector}} {{type}} {{multiple}} {{parentSelectors}} ================================================ FILE: server/static/views/SitemapBrowseData.html ================================================
{{#columns}} {{/columns}}
{{.}}
================================================ FILE: server/static/views/SitemapCreate.html ================================================
================================================ FILE: server/static/views/SitemapEditMetadata.html ================================================
{{#startUrl.push}} {{#startUrl}}
{{/startUrl}} {{/startUrl.push}} {{^startUrl.push}}
{{/startUrl.push}}
================================================ FILE: server/static/views/SitemapExport.html ================================================
================================================ FILE: server/static/views/SitemapExportDataCSV.html ================================================

Export {{_id}} data as CSV.
Waiting for the download button to appear. > Download now!

================================================ FILE: server/static/views/SitemapImport.html ================================================
================================================ FILE: server/static/views/SitemapList.html ================================================
ID Start URL actions
================================================ FILE: server/static/views/SitemapListItem.html ================================================ {{_id}} {{#startUrl.push}} {{#startUrl}} {{.}}, {{/startUrl}} {{/startUrl.push}} {{^startUrl.push}} {{startUrl}} {{/startUrl.push}} ================================================ FILE: server/static/views/SitemapSave.html ================================================
================================================ FILE: server/static/views/SitemapScrapeConfig.html ================================================
================================================ FILE: server/static/views/SitemapSelectorGraph.html ================================================
================================================ FILE: server/static/views/SitemapStartUrlField.html ================================================
================================================ FILE: server/static/views/Viewport.html ================================================

Move developer tools to the bottom of your browser to start using Web Scraper.

================================================ FILE: server/templates/base.html ================================================ ================================================ FILE: server/templates/config.html ================================================ 可视化采集平台 {% include "base.html" %}
请输入配置名称

请输入URL       

请求参数          
Header Key Header Value

是否启用代理IP


是否启用动态加载JS

================================================ FILE: server/templates/data.html ================================================ 可视化采集平台 {% include "base.html" %}
================================================ FILE: server/templates/error_status/404.html ================================================ 可视化采集平台

404

Page Not Found

Sorry, but the page you are looking for has note been found. Try checking the URL for error, then hit the refresh button on your browser or try found something else in our app.
================================================ FILE: server/templates/error_status/500.html ================================================ 可视化采集平台

500

HTTP-Internal Server Error

We've been notified about this issue and we'll take a look at it shortly.
================================================ FILE: server/templates/help.html ================================================ 可视化采集平台 {% include "base.html" %}

懒得看的点这里, 直接到示例

采集示例

任务管理

界面说明

主界面:

该模块管理爬虫的运行状态, 可以暂停、停止和恢复爬虫的运行.

详情界面:

如图, 点击任务, 进入详情页, "爬虫统计"为scrapy爬虫框架的日志信息; "请求队列"为将要爬取的url; 上方有"暂停"、"恢复"和"停止"爬虫任务按钮.

主界面为管理爬虫任务状态的模块, 前后端实时同步, 前端实时接收爬虫任务日志, 后端实时响应爬虫任务状态的改变.

新增任务

配置request请求参数和入口url, 同为后续爬虫的请求参数.

1.请求参数配置

配置名称

任务ID的标识, 在数据查询时用来查找数据集合, 保存配置时用来选择请求参数和字段选择器, 唯一值, 不可重复, 不能为 config字符串.

请求方式

本平台选常用的两种请求, post和get.

入口url

爬取页面的入口页面, 选择采集参数和后续页面会在该页面进行扩展

请求参数

请求参数分为三种:
1.请求头header参数
爬虫常用的header参数有

Header 解释 示例
Accept 指定客户端能够接收的内容类型 Accept: text/plain, text/html
Accept-Charset 浏览器可以接受的字符编码集。 Accept-Charset: iso-8859-5
Accept-Encoding 指定浏览器可以支持的web服务器返回内容压缩编码类型。 Accept-Encoding: compress, gzip
Accept-Language 浏览器可接受的语言 Accept-Language: en,zh
Accept-Ranges 可以请求网页实体的一个或者多个子范围字段 Accept-Ranges: bytes
Content-Length 请求的内容长度 Content-Length: 348
Content-Type 请求的与实体对应的MIME信息 Content-Type: application/x-www-form-urlencoded
Date 请求发送的日期和时间 Date: Tue, 15 Nov 2010 08:12:31 GMT
Proxy-Authorization 连接到代理的授权证书 Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Referer 先前网页的地址,当前请求网页紧随其后,即来路 Referer: https://www.baidu.com/
User-Agent User-Agent的内容包含发出请求的用户信息 User-Agent: Mozilla/5.0 (Linux; X11)

2.cookie参数
有些网站需要验证cookie参数

3.form-data参数
选择post请求时, 提交的参数信息


如图为header参数

代理ip

针对防爬虫网站设计, 动态代理ip, 有效时间 2018-05-10 14:44:00

动态解析

越来越多的网站选用js渲染页面, 针对非模板页面加载网站

示例url: http://shop.99114.com/47907188/ch6

静态爬虫获取页面内容:

动态爬虫获取页面内容:

动态爬虫实际获取页面内容:

在动态爬虫获取页面的前端展现上, 已竭力实现实际获取内容, 但仍不可避免造成爬取内容和展现内容不符.

2.选择器配置

选择器配置界面分为两部分, 上方的 采集页面和下方的 选择器页面.
上方的采集页面为请求配置完成后点击"下一步"所呈现出的页面内容.
下方的选择器界面为选择将要采集的数据.

选择器界面

主界面


提供字段选择器的层级显示、增、删、改、查、预览功能

增、改


添加/修改字段选择器, 共有7中类型的字段选择器 字段选择器属性


显示选择器选择在页面中选择的位置

预览


显示选择器匹配的数据

选择器用来选定采集数据的位置和内容, 该界面可以用鼠标点击配置将要采集的数据, 查看采集数据的位置, 预览采集数据的内容, 根据采集数据不同, 将字段选择器分为以下7类.

字段选择器属性

字段选择器 名称 多元素属性(multiple) 可选子元素 该类型页面唯一 可查看选择器 可预览数据 是否采集
SelectorDetail 详情页选择器
SelectorElement 元素集选择器
SelectorElementAttribute 元素属性选择器
SelectorHTML html选择器
SelectorImage 图片选择器
SelectorLink 翻页选择器
SelectorText 文本选择器

字段使用条件

1.避免同级别multiple、非multiple属性的选择器并存

所有采集的字段(SelectorElementAttribute、SelectorHTML、SelectorImage、SelectorText)有字段选中"多元素属性"时, 不可选择其他采集的字段, 会造成两个字段集合维度混乱("多元素属性"的字段多对一非列表属性字段), 后端维度无法对应的字段值统一处理为空字符串.

如果有"多元素属性", 该父类下所有采集的字段选择器尽量全都是"多元素属性";
如果没有"多元素属性", 该父类下所有采集的字段选择器尽量都没有"多元素属性".


如图:标题、内容为可采集字段, 他们的多元素属性必须一致.

不一致时示例

2.翻页选择器只能在入口页面设置且唯一

SelectorLink(翻页选择器)在入口页面下只能存在一个.
SelectorLink是递归采集函数.
存在多个时导致系统效率降低, 稳健性下降.

3.元素集选择器下可采集的字段多元素属性以元素集选择器为准

SelectorElement(元素集选择器)的子类采集选择器(SelectorElementAttribute、SelectorHTML、SelectorImage、SelectorText)选择multiple(多元素属性)时, 会将子类数据集升维, 数据解析错误.

[详细解释见 元素集选择器的存在意义]

如图:元素集下所有的可采集字段(红圈中)的multiple(多元素属性)以元素集是否选择multiple(多元素属性)为准.

前端表单按照字段选择器名称生成模板, 暂时未判断父类属性; 后端元素SelectorElement(元素集选择器)的子类采集选择器采集时将不会判断multiple(多元素属性).统一按照父类SelectorElement(元素集选择器)是否选择multiple(多元素属性)判断.

4.详情页选择只能有一条链式选择器

前端采集页面在iframe标签内, 详情页选择后无法返回, 同级别选择器只能存在一个, 不同层次的选择器存在详情页选择器则他们必在同一条链式选择器上.
后端采集框架scrapy为异步回调, 选择器解析为链式回调, 同级别存在多个详情页选择器会导致数据混淆、丢失.

如图:"详情", "联系"为两个详情选择器, 在同一条链式选择器上

元素集选择器的存在意义

采集到所需的数据由两个因素决定:html文本和选择器, 其中html文本为页面中内容所在的html块, 选择器为指定采集的字段内容.

在使用到元素集选择器的大多数情况下html块多为列表形式存在, 选择器有多个.

不使用元素集选择器时
多个选择器按照"多元素"属性选择采集的数据, 页面本身可能存在内容块数据缺失, 造成多个选择器选择的数据列无法一一对应, 造成数据混淆、错位

示例:

"多元素属性"选择器优先遍历css选择器

新建两个"多元素属性"选择器, 第一个采集"name"字段, 第二个采集"href"字段, 当页面本身存在数据缺失时, 会使"name"和"href"数据无法一一对应."name_2" => "href_3" 导致数据错位.

使用元素集选择器时

元素集选择器优先遍历内容块, 然后遍历css选择器, 使得数据维度得到统一, 缺失值也不会影响结果值

元素集选择器优先遍历内容块, "多元素属性"的选择器会优先遍历选择器, 两个开始采集维度的不同, 会导致不同的结果.当采集字段中存在多个"多元素属性"的选择器且他们具有同一个父元素, 优先考虑将这些选择器置于元素集选择器中.

选择器树形图


显示各个层级的选择器关系

下一步/保存选择器


开始或者保存任务

查看/下载数据

查看数据和下载已采集数据的页面

读取配置

开始或删除任务

采集示例

"多元素"选择器 + 翻页(1)

http://www.51sole.com/s.aspx?q=PVC通风管

请求配置

参数配置

1.填写字段名称 商品名称(唯一), 如果重复, 选择器保存失败
2.选择 选择器类型
3."点击选择"按钮开启选择器
4-5.分别点击同一列表中同一采集内容(自动匹配通用选择器, 无法匹配时会提示; 如采集单个选择, 只用点击选择器一次即可)
6.点击确定按钮获取"css选择器"内容, 确定左侧"键盘事件"共绑定了一个按键, S键: 当前选择器, P键: 当前选择元素的父元素, C键: 当前选择元素的子元素
7.选择"多元素属性"
8.保存选择器

同上, 采集 公司url字段

点击下一页, 选择 翻页选择器

整体如下:
主页面选择器:

选择器层级:

点击 下一步 开始任务启动任务, 然后再主界面进行任务管理或者 查看数据里下载数据

元素集选择器+翻页(2)+详情

https://zhongshan.china.cn/search/fisnfv.shtml

参数配置

1.选择 元素集选择器

2.配置 翻页选择器(翻页选择器分两种, 点击选择和手动配置, 优先使用手动配置, 选择器有全局表单验证, 改起来太麻烦, 使用手动配置时, 随便填个值), 手动配置时, 翻页url中变动的参数 使用 %s代替.

3.进入 元素集选择器内, 新建 产品名称, 所在地公司名称选择器(在元素集选择器中, 默认以第一个元素集为模板, 其他范围内 点击选择按钮无法生效)
注意:在元素集选择器中不要选择"多元素"属性, 元素集选择器中的子选择器, 维度以 元素集选择器为准.

4.配置 详情选择器, 选择将要进入的标签, 保存

5.进入 详情选择器, 在页面中点击详情链接

6.进入详情页之后, 再配置一个 详情选择器进入联系页

7.在联系页中, 选择 联系人 电话 地址字段采集器

8.打开 选择器树形图查看选择器层级

8. 下一步开始任务, 注意请求间隔, 太快容易被封

被封

9.查看/下载数据

可能存在的问题

动态解析

动态解析网页太慢, 资源占用过高, 显示内容和爬取内容不同, 造成显示内容和爬取内容不同主要因为网站自带js的运行导致的, 如果取消爬取网站自带js, 可能会造成依赖css无法加载, 前端展示效果极差和网页布局和渲染效果缺失, 留待以后解决.

网页页模板不同

http://kungeina0315.51sole.com/companycontact.htm
http://jing18028106510.51sole.com/companycontact.htm

场景:两个详情页模板, 由于字段个数不同, 使用css选择器时, 对不同的模板选择字段, 会造成字段缺失或者错位的情况。 这两个页面中, 由于第二个页面多了"传真"和"微信"这两个字段, 导致相同的css选择器在匹配第一个页面的同时, 匹配第二个页面时"传真"字段之后的css选择器选择的字段值错位.

处理:使用css选择器选择整个内容块, 然后使用正则表达式提取采集的内容

如图所示: 采集"手机"字段, 选择整个内容块, 然后使用正则表达式提取.

选择器无法选中


点击选择按钮很难选中元素时, 可以先选择他的父元素或子元素, 然后使用键盘按钮C或P调整.
点击选择没有反应, 本平台将采集网页放在本域名内, 跨域导致有些资源加载异常, 使得采集脚本无法加载, 此时只能手动填写css选择器.

================================================ FILE: server/templates/index.html ================================================ 可视化采集平台
================================================ FILE: server/templates/read.html ================================================ 可视化采集平台 {% include "base.html" %}
================================================ FILE: server/templates/work.html ================================================ 可视化采集平台 {% include "base.html" %}
================================================ FILE: server.py ================================================ # !/usr/bin/python # -*- coding: utf-8 -*- import logging import tornado.platform.twisted from server import __version__ from tornado.ioloop import IOLoop from server.config.opts import opts # 日志 logger = logging.getLogger('spider') def setup_event_loop(use_twisted_reactor, debug=True): """启动event_loop""" if use_twisted_reactor: tornado.platform.twisted.TwistedIOLoop().install() if debug: print("Using Twisted reactor as a Tornado event loop") else: tornado.platform.twisted.install() IOLoop.instance().set_blocking_log_threshold(0.5) if debug: print("Using Tornado event loop as a Twisted reactor") def main(port, host, start_manhole, manhole_port, manhole_host, loglevel, opts): """主函数""" from server.spider.handlers import get_application from server.spider.crawler_process import MyselfCrawlerProcess from server.spider import manhole # 日志等级 settings = {'LOG_LEVEL': loglevel} crawler_process = MyselfCrawlerProcess(settings) app = get_application(crawler_process, opts) app.listen(int(port), host) logger.info("scrapy v%s is started on %s:%s" % (__version__, host, port)) if start_manhole: manhole.start(manhole_port, manhole_host, {'cp': crawler_process}) logger.info("Manhole server is started on %s:%s" % (manhole_host, manhole_port)) crawler_process.start(stop_after_crawl=False) if __name__ == '__main__': setup_event_loop( use_twisted_reactor=False, debug=False ) main( port=int(opts['spider']['port']), host=opts['spider']['host'], start_manhole=opts['spider.manhole']['enabled'], manhole_port=int(opts['spider.manhole']['port']), manhole_host=opts['spider.manhole']['host'], loglevel=opts['spider']['loglevel'], opts=opts, )