"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function findParent(e,t){for(;e!==document.body;){if(e.className.indexOf(t)!==-1)return!0;e=e.parentElement}return!1}function api(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"POST",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};$.ajax({url:e,type:t,data:$.extend({ck:get_cookie("ck")},n),dataType:"json",contentType:"application/x-www-form-urlencoded",traditional:!0,xhrFields:{withCredentials:!0},crossDomain:!0,beforeSend:function(e){e.withCredentials=!0},success:r,error:o})}function createNoteHTML(){return{__html:'你还没有日记可供添加到本话题  > 现在就来写一篇'}}function createReviewHTML(){return{__html:'你还没有长评可供添加到本话题  > 现在就来写一篇'}}function createInviteHTML(e,t){return{__html:DOMPurify.sanitize(e+"("+t+")")}}function filterBold(e){return e.replace(//g,"").replace(/<\/b>/g,"")}function peopleURL(e){return"//www.douban.com/people/"+e+"/"}function addQuery(e,t){var n=e.split("?").shift(),r=getParams(e),o=Object.assign({},r,t);return n+"?"+json2string(o)}function getParams(e){var t=e.indexOf("?")>0?e.split("?").pop():"",n=t.split("&").reduce(function(e,t){var n=t.split("="),r=_slicedToArray(n,2),o=r[0],a=r[1];return Object.assign(e,o?_defineProperty({},o,a):{})},{});return n}function json2string(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Object.assign({},e);n&&Object.keys(r).map(function(e){void 0!==r[e]&&null!==r[e]||delete r[e]});var o=Object.keys(r).map(function(e){return t?e+"="+encodeURIComponent(r[e]):e+"="+r[e]}).join("&");return o}function Html5Entities(){}function createIndexes(e,t){for(var n=ENTITIES.length,r=[];n--;){var o,a=ENTITIES[n],i=a[0],s=a[1],l=s[0],c=l<32||l>126||62===l||60===l||38===l||34===l||39===l;if(c&&(o=t[l]=t[l]||{}),s[1]){var u=s[1];e[i]=String.fromCharCode(l)+String.fromCharCode(u),r.push(c&&(o[u]=i))}else e[i]=String.fromCharCode(l),r.push(c&&(o[""]=i))}}function entityTransform(e,t,n){var r=(t.start,t.end,t.title),o=t.type_name,a=/^douban:\/\/douban\.com\/user\/(\d+)$/,i=/^douban:\/\/douban\.com\/(movie|tv|book|music|game)\/(\d+)$/,s=/^douban:\/\/douban\.com\/app\/(\d+)$/,l=/^douban:\/\/douban\.com\/drama\/(\d+)$/,c=/^douban:\/\/douban\.com\/topic\/(\d+)$/,u=/^douban:\/\/douban\.com\/search\/result[\/]?\?q=(.*)/,p="topics"===o?["#","#"]:[],d=_slicedToArray(p,2),h=d[0],f=d[1],m=function(e){return/https?:\/\//.test(e)?e:a.test(e)?e.replace(a,function(e,t){return"https://douban.com/people/"+t}):i.test(e)?e.replace(i,function(e,t,n){return"https://douban.com/subject/"+n}):s.test(e)?e.replace(s,function(e,t){return"https://douban.com/app/"+t}):l.test(e)?e.replace(l,function(e,t){return"https://douban.com/location/drama/"+t}):c.test(e)?"/gallery/topic/"+n:u.test(e)?e.replace(u,function(e,t){return"https://www.douban.com/search?q="+t}):void 0}(t.uri);return(h?h:"")+''+r+""+(f?f:"")}function getAuthorID(e){switch(e.target.type){case"review":return e.target.user.id;case"note":return e.target.author.id;case"status":return e.target.status.author.id;case"topic":return e.target.author.id;case"annotation":return e.target.author.id}}function getAuthorName(e){switch(e.target.type){case"review":return e.target.user.name;case"note":return e.target.author.name;case"status":return e.target.status.author.name;case"topic":return e.target.author.name;case"annotation":return e.target.author.name}}function filterSameAuthor(e){return e.some(function(e){return e.topic&&e.topic.is_personal})?e:e.reduce(function(e,t){if(0!==e.length){var n=e[e.length-1];return Array.isArray(n)?getAuthorID(n[0])===getAuthorID(t)?(n=e.splice(e.length-1,1)[0],e.concat([n.concat(t)])):e.concat(t):getAuthorID(n)===getAuthorID(t)?(n=e.splice(e.length-1,1)[0],e.concat([[n,t]])):e.concat(t)}return e.concat(t)},[])}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_slicedToArray=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function e(e,t){for(var n=0;n0&&t.scrollTop+t.clientHeight>=t.scrollHeight)&&e.cancelable&&e.preventDefault()};var Panel={mountPoint:null,show:function(e){var t=document.createElement("DIV");t.id="panel-root",t.addEventListener("click",function(e){var t=e.target;!findParent(t,"panel-ct")&&Panel.hide()}),document.body.appendChild(t),Panel.mountPoint=t;var n=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),t}(PanelEle);for(var r in e)n.prototype[r]=e[r];ReactDOM.render(React.createElement(n,null),Panel.mountPoint)},hide:function(){ReactDOM.unmountComponentAtNode(Panel.mountPoint),document.body.removeChild(Panel.mountPoint)}};window.Panel=Panel,$(".note-select .select-old").bind("click",function(){"javascript:;;"===this.children[0].href&&Panel.show({title:function(){return"添加我的相关日记到话题"},bottomText:function(){return"为了呈现更好的内容,与话题无关的日记可能会在话题页隐藏"},defaultState:function(){return{loadCfg:{start:0,count:20,total:null},notes:[]}},init:function(){this.load()},load:function(e){var t=this;$.postJSON_withck("/j/people/"+window.uid+"/notes",this.state.loadCfg,function(n){var r=n.notes,o=_objectWithoutProperties(n,["notes"]);t.stopload=o.start+o.count>=o.total,o.start=o.start+o.count,t.setState({notes:t.state.notes.concat(r),empty:0===o.total,loadCfg:o}),e&&e()})},addToTopic:function(e,t){var n=this,r=t.target;r.getAttribute("data-click")||(r.setAttribute("data-click",1),$.postJSON_withck("/j/note/add_to_topic",{topic:window.topicID,noteid:e},function(t){if(0===t.r)n.replaceContent(React.createElement("span",{className:"invite-sucesss"},"已添加 :)"));else{var r=void 0;"already in the topic"===t.msg?r="已经在话题里了":"max topic number reached"===t.msg?r="已关联其他话题":"invalid topic"===t.msg?r="私人话题不能添加到日记":"permission denied"===t.msg&&(r="你没有权限");var o=[].concat(n.state.notes),a=o.findIndex(function(t){var n=t.id;return n===e});o.splice(a,1,$.extend(o[a],{resText:r})),n.setState({notes:o})}}))},loadnote:function(e){var t=e.target;if(!this.stopload){var n=null===t.getAttribute("data-loading");n&&t.scrollTop+t.clientHeight+80>t.scrollHeight&&(t.setAttribute("data-loading",1),this.load(function(){t.removeAttribute("data-loading")}))}},content:function(){var e=this;return React.createElement("ul",{className:"add-to-topic-list scroll-bar",onWheel:this.preventParentScroll,onScroll:this.loadnote.bind(this)},this.state.empty?React.createElement("span",{dangerouslySetInnerHTML:createNoteHTML()}):null,this.state.notes.map(function(t){return React.createElement("li",null,React.createElement("span",null,t.title),t.resText?null:React.createElement("button",{onClick:e.addToTopic.bind(e,t.id)},"添加到话题"),t.resText?React.createElement("i",null,t.resText):null)}))}})}),$(".review-select .select-old").bind("click",function(){"javascript:;;"===this.children[0].href&&Panel.show({title:function(){return"添加我的相关长评到话题"},bottomText:function(){return"为了呈现更好的内容,与话题无关的长评可能会在话题页隐藏"},defaultState:function(){return{loadCfg:{start:0,count:20,total:null},empty:!1,loading:!0,reviews:[]}},init:function(){this.load()},load:function(){api("https://m.douban.com/rexxar/api/v2/user/"+window.uid+"/reviews","GET",this.state.loadCfg,this.load_cb.bind(this))},load_cb:function(e){var t=e.reviews,n=_objectWithoutProperties(e,["reviews"]);this.stopload=n.start+n.count>=n.total,n.start=n.start+n.count,this.setState({loadCfg:n}),t=t.filter(function(e){return e.subject.id===window.subject_id});var r=this.state.reviews.length+t.length===0;return this.stopload?void this.setState({empty:r,loading:!1,reviews:this.state.reviews.concat(t)}):(this.setState({reviews:this.state.reviews.concat(t)}),void api("https://m.douban.com/rexxar/api/v2/user/"+window.uid+"/reviews","GET",this.state.loadCfg,this.load_cb.bind(this)))},addToTopic:function(e,t){var n=this,r=t.target;r.getAttribute("data-click")||(r.setAttribute("data-click",1),api("https://m.douban.com/rexxar/api/v2/gallery/topic/"+window.topicID+"/add_item","POST",{target_kind:"review",target_id:e},function(){n.replaceContent(React.createElement("span",{className:"invite-sucesss"},"已添加 :)"))},function(t){var r=JSON.parse(t.response),o=r.localized_message,a=[].concat(n.state.reviews),i=a.findIndex(function(t){var n=t.id;return n===e});a.splice(i,1,$.extend(a[i],{resText:o})),n.setState({reviews:a})}))},content:function(){var e=this;return React.createElement("ul",{className:"add-to-topic-list scroll-bar",onWheel:this.preventParentScroll},this.state.loading?React.createElement("span",null,"加载中..."):null,this.state.empty?React.createElement("span",{dangerouslySetInnerHTML:createReviewHTML()}):null,this.state.reviews.filter(function(e){return e.subject.id===window.subject_id}).map(function(t){return React.createElement("li",null,React.createElement("span",null,t.title),t.resText?null:React.createElement("button",{onClick:e.addToTopic.bind(e,t.id)},"添加到话题"),t.resText?React.createElement("i",null,t.resText):null)}))}})}),$(".topic-invite-ignore").bind("click",function(){$.get("/j/gallery/topic/"+window.topicID+"/ignore_invite",{},function(){$(".topic-inviters").remove()})}),$(".topic-inviters-ext").bind("click",function(){$(this).css({left:this.getBoundingClientRect().left-$(".topic-inviters")[0].getBoundingClientRect().left-20}).toggleClass("hide")}),$("body").bind("click",function(e){var t=e.target;0!==$(t).closest(".topic-inviters-list").length||$(t).hasClass("topic-inviters-ext")||$(".topic-inviters-list").addClass("hide")}),$("body").delegate(".invite","click",function(){return window._USER_ABNORMAL?void(window.show_abnormal&&window.show_abnormal()):void("javascript:;;"===this.href&&Panel.show({title:function(){return"邀请其他用户参与话题"},defaultState:function(){return{invited:[],inviteList:[],inviteComplete:[],limitMsg:null,noResult:!1}},init:function(){var e=this;$.getJSON("/j/gallery/topic/"+window.topicID+"/invitation_users",function(t){var n=(t._,t.invited_users);e.setState({invited:n.map(function(e){var t=e.uid,n=e.name;return{url:peopleURL(t),name:n,uid:t}})})})},inputChange:function(e){var t=this,n=e.target,r=n.value.trim();return r?void(r!==this.lastKey&&(this.lastKey=r,$.ajax({type:"GET",url:"https://api.douban.com/shuo/in/complete",dataType:"jsonp",xhrFields:{withCredentials:!0},data:{alt:"xd",count:10,word:r},success:function(e){var n=e.users;t.setState({inviteComplete:n,noResult:0===n.length,limitMsg:null})}}))):(this.setState({inviteComplete:[],noResult:!1,limitMsg:null}),void(this.lastKey=r))},addRec:function(e){var t=e.currentTarget,n=this.state,r=n.inviteList,o=n.invited,a=15-o.length-r.length;if(a<=0)return void this.setState({limitMsg:"最多只能邀请15个人"});var i={name:t.getAttribute("data-name"),uid:t.getAttribute("data-uid"),inInviteList:"true"===t.getAttribute("data-will-invite"),invited:"true"===t.getAttribute("data-invited")};if(!i.invited){if(i.inInviteList){var s=r.findIndex(function(e){var t=e.uid;return t===i.uid});r.splice(s,1),this.setState({limitMsg:null})}else 15===r.length?this.setState({limitMsg:"最多只能邀请15个人"}):(this.setState({limitMsg:null}),r.push(i));document.querySelector(".intive-block input").value="",document.querySelector(".intive-block input").focus(),this.lastKey=null,this.setState({inviteList:[].concat(r),inviteComplete:[],noResult:!1})}},lastKey:null,invite:function(){var e=this;return 0===this.state.inviteList.length?void this.setState({limitMsg:"你还没有选择要邀请的用户"}):void $.post("/j/gallery/topic/"+window.topicID+"/invite",{invitees:this.state.inviteList.map(function(e){var t=e.uid;return t}),ck:get_cookie("ck")},function(){e.replaceContent(React.createElement("span",{className:"invite-sucesss"},"邀请已经发送 :)"))})},removeInvite:function(e){var t=this.state.inviteList,n=t.findIndex(function(t){return t.uid===e});t.splice(n,1),this.setState({inviteList:t,limitMsg:null})},content:function(){var e=this,t=this.state,n=t.invited,r=t.inviteComplete,o=t.inviteList,a=t.limitMsg,i=t.noResult,s=r.length||i;return React.createElement("div",{className:"invite-panel"},React.createElement("div",{className:"invite-input"},React.createElement("div",{className:"intive-block"},o.map(function(t){var n=t.uid,r=t.name;return React.createElement("span",null,r,React.createElement("i",{onClick:e.removeInvite.bind(e,n)}))}),React.createElement("input",{type:"text",placeholder:"输入已关注用户的昵称,或是任意用户的ID",onChange:this.inputChange.bind(this)})),React.createElement("button",{className:o.length?"":"disable",onClick:this.invite.bind(this)},"发送邀请")),React.createElement("div",null,a?React.createElement("span",{className:"invite-limit"},a):null,n.length?React.createElement("span",{className:"invite-invited"},"你已经邀请过 ",n.map(function(e){var t=e.url,n=e.name;return React.createElement("a",{href:t,target:"_blank"},n)}),"共"+n.length+"人"):null),s?React.createElement("ul",{className:"invite-complete scroll-bar",onWheel:this.preventParentScroll},i?React.createElement("li",{className:"noresult"},"没有搜索到用户"):null,r.map(function(t){var r=t.username,a=t.uid,i=t.avatar;return r=filterBold(r),a=filterBold(a),React.createElement("li",{onClick:e.addRec.bind(e),"data-name":r,"data-uid":a,"data-invited":n.some(function(e){return e.uid===a}),"data-will-invite":o.some(function(e){return e.uid===a})},React.createElement("img",{src:i,alt:r,className:"ic-avatar"}),React.createElement("div",{className:"ic-meta",dangerouslySetInnerHTML:createInviteHTML(r,a)}))})):null)}}))}),Do(function(){function e(e,t){var n="/j/gallery/topic/"+window.topicID+"/"+e;$.postJSON_withck(n,{},function(e){t(e)})}function t(){var e=$(".dialog-content").html();dui.Dialog({title:"选择一个小组参与吧",cls:"join-carnival-dialog",content:'
'+e+"
",width:500}).open()}var n=$(".gallery-hd"),r=$(".topic-meta"),o=$(".by-shuo-text .by-btn, .by-shuo-image .by-btn"),a=$(".dialogue-close"),i=$(".dialogue"),s=$(".select-new"),l=$(".note-select"),c=$(".feed-btn"),u=$(".unfeed-btn"),p=$("#subscription-count");c.bind("click",function(){var t=$(this);return window.islogin?window._USER_ABNORMAL?void(window.show_abnormal&&window.show_abnormal()):void(t.hasClass("done")||t.data("doing")||(t.data("doing",!0),e("subscribe",function(){t.text("关注成功").addClass("done").data("doing",!1),u.removeClass("done"),p.text(parseInt(p.text())+1)}))):void(location.href="//www.douban.com/accounts/login?"+location.href)}),u.bind("click",function(){var t=$(this);if(!t.hasClass("done")&&!t.data("doing")){if(window._USER_ABNORMAL)return void(window.show_abnormal&&window.show_abnormal());t.data("doing",!0),e("unsubscribe",function(){t.addClass("done").data("doing",!1),c.text("关注话题").removeClass("hide done"),p.text(parseInt(p.text())-1)})}}),o.bind("click",function(){return window._USER_ABNORMAL?void(window.show_abnormal&&window.show_abnormal()):(n.addClass("full"),i.removeClass("hide"),r.addClass("hide"),void("pic"===$(this).data("action")?$(".isay-pic a").click():$(".isay-main a").click()))}),a.bind("click",function(){n.removeClass("full"),i.addClass("hide"),r.removeClass("hide")}),s.bind("click mouseenter",function(e){l.hasClass("note-select-show")||(l.addClass("note-select-show"),e.stopPropagation())}),l.bind("mouseleave",function(){l.removeClass("note-select-show")}),$("body").bind("click",function(e){0===$(e.target).closest(".note-select").length&&l.removeClass("note-select-show")}),$(".join-item a").bind("click",function(e){var t=this.href;window.is_checkin&&"javascript:;"===t?dui.Dialog({title:"仅支持在豆瓣App上参与打卡",content:'
扫描二维码下载豆瓣App
',buttons:[{text:"确定",method:function(){dui.Dialog().close()}}]}).open():"javascript:;"===t&&dui.Dialog({content:"这个话题是由小组发起的,加入该小组才能参与话题",buttons:[{text:"确定",method:function(){dui.Dialog().close()}}]}).open()}),$(".more-group a").click(function(e){t()})});var TopicTab=function(e){function t(e){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={sort:e.sort,guest_only:e.guest_only},n}return _inherits(t,e),_createClass(t,[{key:"render",value:function(){var e=this.state.sort,t=this.props,n=t.total,r=t.guests_with_intro,o=t.sync,a=t.url;return React.createElement("div",{className:"tabs"},React.createElement("a",{className:"hot"===e?"cur hot":"hot",href:o?""+addQuery(a,{sort:"hot"}):"",onClick:this.changeSort.bind(this,"hot")},"热门"),React.createElement("i",null,"/"),React.createElement("a",{className:"new"===e?"cur new":"new",href:o?""+addQuery(a,{sort:"new"}):"",onClick:this.changeSort.bind(this,"new")},"最新"),n?React.createElement("span",{className:"post_count"},"共 ",n," 篇内容"):null,n&&r&&r.length>0?React.createElement("div",{className:"filter"},React.createElement("label",{for:"only_marked",className:"only_marked"},React.createElement("input",{type:"checkbox",id:"only_marked",onClick:this.changeGuestOnly.bind(this)}),window.is_checkin?"只看领读人发言":"只看嘉宾发言")):null)}},{key:"changeSort",value:function(e,t){var n=this,r=this.props,o=r.onChange,a=r.sync;a||(t.preventDefault(),this.setState({sort:e},function(){o&&o({sort:e,guest_only:n.state.guest_only})}))}},{key:"changeGuestOnly",value:function(){var e=this,t=this.props.onChange;this.setState({guest_only:!this.state.guest_only},function(){t&&t({sort:e.state.sort,guest_only:e.state.guest_only})})}}]),t}(React.Component);TopicTab.defaultProps=_defineProperty({sync:React.PropTypes.bool,sort:React.PropTypes.string,url:React.PropTypes.string,total:React.PropTypes.number,guest_only:React.PropTypes.bool,guests_with_intro:React.PropTypes.bool,onChange:React.PropTypes.func},"total",React.PropTypes.number),TopicTab.defaultProps={sync:!1,sort:"hot",guest_only:!1,guests_with_intro:!1,onChange:function(e){e.sort,e.guest_only}};var visible=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;_classCallCheck(this,e),this.container=t,this.containerHeight=t.innerHeight,this.eleList=[],this.lastVisibleEle=null,this.cbs=[],this.__start()}return _createClass(e,[{key:"__start",value:function(){var e=this;this.container.addEventListener("scroll",function(){e.__detect()}),this.container.addEventListener("resize",function(){e.containerHeight=e.container.innerHeight,e.__detect()})}},{key:"__detect",value:function(){var e=this;if(!this.eleList.length&&this.lastVisibleEle){if(null===this.lastVisibleEle)return;return this.cbs.forEach(function(t){return t(e.lastVisibleEle,null)}),void(this.lastVisibleEle=null)}var t=this.eleList.filter(function(t){var n=t.getBoundingClientRect();return n.height>e.containerHeight&&n.top65535||(n=String.fromCharCode(r))}else n=alphaIndex[t];return n||e}):""},Html5Entities.decode=function(e){return(new Html5Entities).decode(e)},Html5Entities.prototype.encode=function(e){if(!e||!e.length)return"";for(var t=e.length,n="",r=0;r126?"&#"+o+";":e.charAt(r),r++}return n},Html5Entities.encodeNonUTF=function(e){return(new Html5Entities).encodeNonUTF(e)},Html5Entities.prototype.encodeNonASCII=function(e){if(!e||!e.length)return"";for(var t=e.length,n="",r=0;r\n GIF\n \n \n \n ',this.container.appendChild(this.panel),this.playButton=this.panel.getElementsByClassName("image-gif-button-play")[0],this.reloadButton=this.panel.getElementsByClassName("image-gif-button-reload")[0],this.loadingIcon=this.panel.getElementsByClassName("image-gif-loading")[0],this.playButtonClick=Object(r.a)(this.playButton,"click",this.playHandle.bind(this)),this.reloadButtonClick=Object(r.a)(this.reloadButton,"click",this.reloadHandle.bind(this)),this.elem.setAttribute("data-inited","true"))},e.prototype.play=function(e){},e.prototype.playHandle=function(e){this.play(this.playURL),this.changeStatus("playing")},e.prototype.changeStatus=function(e){this.status=e,this.elem&&this.elem.setAttribute("data-status",e)},e.prototype.reloadHandle=function(e){this.changeStatus("loading"),this.playButton.style.display="none",this.reloadButton.style.display="none",this.loadingIcon.style.display="block";var t="_r="+Math.random(),n=this.playURL.indexOf("?")>=0?this.playURL+"&"+t:this.playURL+"?"+t;this.playURL=n,this.play(this.playURL)},e.prototype.notFoundHandle=function(e){},e.prototype.pause=function(){},e.prototype.destroy=function(){},e.prototype._destory=function(){this.container&&(this.panel&&(this.container.removeChild(this.panel),this.panel=null),this.downloadButton&&(this.container.removeChild(this.downloadButton),this.downloadButton=null)),this.elem&&this.elem.setAttribute("data-inited",""),this.inited=!1,this.changeStatus("default")},e.prefetch=function(e){if(!e)return!1;var t=document.createElement("link");t.rel="prefecth",t.href=e;var n=document.getElementsByTagName("link")[0];n?n.parentNode.insertBefore(t,n):document.getElementsByTagName("head")[0].appendChild(t)},e}();t.a=a},function(e,t,n){function r(e){var t=navigator.userAgent||"";return e.test(t)}function o(e){return function(){return r(e)}}n.d(t,"a",function(){return a}),n.d(t,"c",function(){return i}),n.d(t,"b",function(){return s}),o(/weibo/i),o(/xiaomi/i),o(/baiduboxapp|baidubrowser/i),o(/iphone|ipad|ipod/i);var a=o(/android/i),i=o(/(iphone|ipod|((?:android)?.*?mobile)|blackberrynokia)/i),s=o(/com\.douban\.frodo/i);o(/miniprogram/i),o(/(com\.douban\.frodo\/[\d.]+(dev|debug|test|beta|alpha))|(com\.douban\.frodo\.test)/i)},function(e,t,n){n.r(t);var r,o=n(0),a=n(1),i=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.init=function(){this.createPanel(),this.playURL=this.getPlayURL(),this.imgLoad=Object(o.a)(this.elem,"load",this.loadedHandle.bind(this)),this.imgLoadErorr=Object(o.a)(this.elem,"error",this.notFoundHandle.bind(this)),this.config&&this.config.prefetch&&a.a.prefetch(this.getPlayURL()),this.elem&&(this.srcTemp=this.elem.getAttribute("src"))},t.prototype.loadedHandle=function(){return!!this.elem&&void(this.elem.src===this.playURL&&(this.playButtonClick.remove(),this.reloadButtonClick.remove(),this.imgLoad.remove(),this.imgLoadErorr.remove(),this.container.removeChild(this.panel),this.createDownloadButton(),this.changeStatus("playing")))},t.prototype.notFoundHandle=function(){return!!this.elem&&(this.elem.src=this.previewURL,this.playButton.style.display="none",this.reloadButton.style.display="block",this.loadingIcon.style.display="none",this.changeStatus("error"),void 0)},t.prototype.play=function(e){return!!this.elem&&(this.elem.src=e||this.playURL,this.playButton.style.display="none",this.reloadButton.style.display="none",this.loadingIcon.style.display="block",void 0)},t.prototype.pause=function(){this.elem&&this.srcTemp&&this.elem.setAttribute("src",this.srcTemp),this.changeStatus("default")},t.prototype.destroy=function(){this.pause(),this._destory()},t}(a.a);t.default=s},function(e,t,n){var r,o=n(0),a=n(1),i=n(2),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=Object(i.a)(),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.init=function(){this.createPanel(),this.container.setAttribute("data-render-type","video"),t.allInstances.push(this)},t.prototype.playingHandle=function(){"playing"!==this.status&&(this.changeStatus("playing"),this.playButton&&(this.playButton.style.display="none"),this.reloadButton&&(this.reloadButton.style.display="none"),this.loadingIcon&&(this.loadingIcon.style.display="none"),this.player&&(this.player.style.display="block"),this.playButtonClick.remove(),this.reloadButtonClick.remove(),this.container.removeChild(this.panel),this.panel=null,this.playerLoadStart.remove(),this.playerPlaying.remove(),this.playerReady.remove(),this.playerLadedData.remove(),this.changeStatus("playing"),this.createDownloadButton())},t.prototype.changeStatus=function(e){this.status=e,this.elem&&this.elem.setAttribute("data-status",e),this.player&&this.player.setAttribute("data-status",e)},t.prototype.getPlayURL=function(e){var t=(e||this.elem).getAttribute("data-original-url");if(!t)return"";var n=t.split(".").pop();return t.replace(new RegExp("."+n+"$","gi"),".mp4")},t.prototype.createPlayer=function(){var e=document.createElement("video");this.container.appendChild(e),e.className="image-gif-player",e.muted=!0,e.controls=!1,e.loop=!l,e.preload=l?"none":"auto",e.autoplay=!0,e.poster=this.previewURL,e.crossOrigin="anonymous",e.playsinline=!0,e.style.display="none",e.setAttribute("playsinline","true"),e.setAttribute("webkit-playsinline","true"),e.setAttribute("type","video/mp4");try{var t=this.playURL;e.src=t}catch(t){console&&console.error("不支持该 player.src",e.src)}this.loadingIcon.style.display="block",this.playButton.style.display="none",this.player=e},t.prototype.bindPlayerEvents=function(){var e=this;this.playerLoadStart=Object(o.a)(this.player,"loadstart",function(t){e.changeStatus("loading")}),this.playerReady=Object(o.a)(this.player,"canplay",function(){e.canPlay=!0,"playing"!==e.status&&e.play()}),this.playerLadedData=Object(o.a)(this.player,"loadeddata",function(){e.canPlay=!0}),l&&(this.playerTrickLoop=Object(o.a)(this.player,"ended",function(){e.player.currentTime=.01,e.player.play()})),this.playerPlaying=Object(o.a)(this.player,"playing",this.playingHandle.bind(this)),this.playerLoadError=Object(o.a)(this.player,"error",this.notFoundHandle.bind(this))},t.prototype.playHandle=function(e){e&&e.preventDefault(),e&&e.stopPropagation(),this.canPlay=!0,this.play(this.playURL),this.changeStatus("loading")},t.prototype.play=function(e){return this.player||(this.createPlayer(),this.bindPlayerEvents()),!!this.canPlay&&(e&&this.player&&(this.player.src=e),void(this.player&&this.player.play()))},t.prototype.reloadHandle=function(e){e&&e.preventDefault(),e&&e.stopPropagation(),this.changeStatus("loading"),this.playButton&&(this.playButton.style.display="none"),this.reloadButton&&(this.reloadButton.style.display="none"),this.loadingIcon&&(this.loadingIcon.style.display="block");var t=this.playURL;this.canPlay=!0,this.play(t)},t.prototype.notFoundHandle=function(e){return"playing"!==this.status&&(this.canPlay=!1,this.playButton&&(this.playButton.style.display="none"),this.reloadButton&&(this.reloadButton.style.display="block"),this.loadingIcon&&(this.loadingIcon.style.display="none"),this.player&&(this.player.style.display="none"),this.changeStatus("error"),void 0)},t.prototype.pause=function(){this.player&&this.player.pause()},t.prototype.destroy=function(){this.container&&this.player&&(this.container.removeChild(this.player),this.player=null),this._destory()},t.allInstances=[],t.ALL_PLAY=function(){t.allInstances&&t.allInstances.forEach(function(e){"playing"!==e.status&&(e.canPlay=!0,e.play())})},t}(a.a);t.a=c},function(e,t,n){function r(e,t){void 0===t&&(t=document.body);var n=[],r=t.querySelectorAll("img[data-render-type=gif]");if(r&&0!==r.length){for(var o,a,p=0,d=(e&&"video"===e.type&&(a=document.createElement("video")).canPlayType&&a.canPlayType("video/mp4")&&(!(Object(i.c)()&&!Object(i.b)())||"playsInline"in a)),h={download:!e||e.download,clickPlay:!!e&&e.clickPlay};o=r[p];){var f=d?new l.a(o,h):new s.default(o,h);n.push(f),p++}if("object"==("undefined"==typeof e?"undefined":_typeof(e))&&"preloadNum"in e)for(var m=Math.min(e.preloadNum,n.length);m--;)n[m]&&n[m].play();return u=c(u,n),n}}function o(){return c(u)}function a(){if(u&&u.length>0)for(var e=u.length;e--;){var t=u[e];t&&t.destroy()}}n.r(t),n.d(t,"renderInit",function(){return r}),n.d(t,"getAllInstance",function(){return o}),n.d(t,"destoryAll",function(){return a});var i=n(2),s=n(3),l=n(4),c=function e(){for(var t=0,n=0,r=arguments.length;n8&&w<=11),k=32,x=String.fromCharCode(k),T={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},R=!1,S=null,N={eventTypes:T,extractEvents:function(e,t,n,r){return[c(e,t,n,r),d(e,t,n,r)]}};t.exports=N},{123:123,19:19,20:20,78:78,82:82}],4:[function(e,t,n){function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},a=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){a.forEach(function(t){o[r(t,e)]=o[e]})});var i={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!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},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},s={isUnitlessNumber:o,shorthandPropertyExpansions:i};t.exports=s},{}],5:[function(e,t,n){var r=e(4),o=e(123),a=(e(58),e(125),e(94)),i=e(136),s=e(140),l=(e(142),s(function(e){return i(e)})),c=!1,u="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(e){c=!0}void 0===document.documentElement.style.cssFloat&&(u="styleFloat")}var d={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=l(r)+":",n+=a(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var i in t)if(t.hasOwnProperty(i)){var s=a(i,t[i],n);if("float"!==i&&"cssFloat"!==i||(i=u),s)o[i]=s;else{var l=c&&r.shorthandPropertyExpansions[i];if(l)for(var p in l)o[p]="";else o[i]=""}}}};t.exports=d},{123:123,125:125,136:136,140:140,142:142,4:4,58:58,94:94}],6:[function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=e(113),a=e(24),i=(e(137),function(){function e(t){r(this,e),this._callbacks=null,this._contexts=null,this._arg=t}return e.prototype.enqueue=function(e,t){this._callbacks=this._callbacks||[],this._callbacks.push(e),this._contexts=this._contexts||[],this._contexts.push(t)},e.prototype.notifyAll=function(){var e=this._callbacks,t=this._contexts,n=this._arg;if(e&&t){e.length!==t.length?o("24"):void 0,this._callbacks=null,this._contexts=null;for(var r=0;r8));var O=!1;b.canUseDOM&&(O=x("input")&&(!document.documentMode||document.documentMode>11));var L={get:function(){return I.get.call(this)},set:function(e){P=""+e,I.set.call(this,e)}},D={eventTypes:R,extractEvents:function(e,t,n,o){var a,i,s=t?w.getNodeFromInstance(t):window;if(r(s)?A?a=l:i=c:T(s)?O?a=h:(a=m,i=f):v(s)&&(a=g),a){var u=a(e,t);if(u){var p=E.getPooled(R.change,u,n,o);return p.type="change",_.accumulateTwoPhaseDispatches(p),p}}i&&i(e,s,t)}};t.exports=D},{102:102,110:110,111:111,123:123,16:16,19:19,33:33,71:71,80:80}],8:[function(e,t,n){function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){u.insertTreeBefore(e,t,n)}function a(e,t,n){Array.isArray(t)?s(e,t[0],t[1],n):m(e,t,n)}function i(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],l(e,t,n),e.removeChild(n)}e.removeChild(t)}function s(e,t,n,r){for(var o=t;;){var a=o.nextSibling;if(m(e,o,r),o===n)break;o=a}}function l(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function c(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&m(r,document.createTextNode(n),o):n?(f(o,n),l(r,o,t)):l(r,e,t)}var u=e(9),p=e(13),d=(e(33),e(58),e(93)),h=e(115),f=e(116),m=d(function(e,t,n){e.insertBefore(t,n)}),v=p.dangerouslyReplaceNodeWithMarkup,g={dangerouslyReplaceNodeWithMarkup:v,replaceDelimitedText:c,processUpdates:function(e,t){for(var n=0;n-1?void 0:i("96",e),!c.plugins[n]){t.extractEvents?void 0:i("97",e),c.plugins[n]=t;var r=t.eventTypes;for(var a in r)o(r[a],t,a)?void 0:i("98",a,e)}}}function o(e,t,n){c.eventNameDispatchConfigs.hasOwnProperty(n)?i("99",n):void 0,c.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];a(s,t,n)}return!0}return!!e.registrationName&&(a(e.registrationName,t,n),!0)}function a(e,t,n){c.registrationNameModules[e]?i("100",e):void 0,c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e(113),s=(e(137),null),l={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s?i("101"):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];l.hasOwnProperty(n)&&l[n]===o||(l[n]?i("102",n):void 0,l[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var o=c.registrationNameModules[n[r]];if(o)return o}}return null},_resetEventPlugins:function(){s=null;for(var e in l)l.hasOwnProperty(e)&&delete l[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=c},{113:113,137:137}],18:[function(e,t,n){function r(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function o(e){return"topMouseMove"===e||"topTouchMove"===e}function a(e){return"topMouseDown"===e||"topTouchStart"===e}function i(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=g.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(o,n,e):m.invokeGuardedCallback(o,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),a.addPoolingTo(r),t.exports=r},{107:107,143:143,24:24}],21:[function(e,t,n){var r=e(11),o=r.injection.MUST_USE_PROPERTY,a=r.injection.HAS_BOOLEAN_VALUE,i=r.injection.HAS_NUMERIC_VALUE,s=r.injection.HAS_POSITIVE_NUMERIC_VALUE,l=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:a,allowTransparency:0,alt:0,as:0,async:a,autoComplete:0,autoPlay:a,capture:a,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|a,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:a,coords:0,crossOrigin:0,data:0,dateTime:0,default:a,defer:a,dir:0,disabled:a,download:l,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:a,formTarget:0,frameBorder:0,headers:0,height:0,hidden:a,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:a,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|a,muted:o|a,name:0,nonce:0,noValidate:a,open:a,optimum:0,pattern:0,placeholder:0,playsInline:a,poster:0,preload:0,profile:0,radioGroup:0,readOnly:a,referrerPolicy:0,rel:0,required:a,reversed:a,role:0,rows:s,rowSpan:i,sandbox:0,scope:0,scoped:a,scrolling:0,seamless:a,selected:o|a,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:i,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:a,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};t.exports=c},{11:11}],22:[function(e,t,n){function r(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function o(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var a={escape:r,unescape:o};t.exports=a},{}],23:[function(e,t,n){function r(e){null!=e.checkedLink&&null!=e.valueLink?s("87"):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?s("88"):void 0}function a(e){r(e),null!=e.checked||null!=e.onChange?s("89"):void 0}function i(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var s=e(113),l=e(121),c=e(64),u=(e(137),e(142),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),p={value:function(e,t,n){return!e[t]||u[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:l.PropTypes.func},d={},h={checkPropTypes:function(e,t,n){for(var r in p){if(p.hasOwnProperty(r))var o=p[r](t,r,e,"prop",null,c);o instanceof Error&&!(o.message in d)&&(d[o.message]=!0,i(n))}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(a(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(a(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};t.exports=h},{113:113,121:121,137:137,142:142,64:64}],24:[function(e,t,n){var r=e(113),o=(e(137),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),a=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},i=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r),a}return new o(e,t,n,r)},l=function(e,t,n,r,o){var a=this;if(a.instancePool.length){var i=a.instancePool.pop();return a.call(i,e,t,n,r,o),i}return new a(e,t,n,r,o)},c=function(e){var t=this;e instanceof t?void 0:r("25"),e.destructor(),t.instancePool.length=0||null!=t.is}function f(e){var t=e.type;d(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var m=e(113),v=e(143),g=e(2),y=e(5),_=e(9),b=e(10),w=e(11),C=e(12),E=e(16),k=e(17),x=e(25),T=e(32),R=e(33),S=e(38),N=e(39),P=e(40),I=e(43),A=(e(58),e(61)),O=e(68),L=(e(129),e(95)),D=(e(137),e(110),e(141),e(119),e(142),T),M=E.deleteListener,U=R.getNodeFromInstance,q=x.listenTo,j=k.registrationNameModules,B={string:!0,number:!0},F="style",H="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},W=11,z={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},K={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},G={listing:!0,pre:!0,textarea:!0},$=v({menuitem:!0},K),Y=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Q={},X={}.hasOwnProperty,J=1; f.displayName="ReactDOMComponent",f.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=J++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var a=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(u,this);break;case"input":S.mountWrapper(this,a,t),a=S.getHostProps(this,a),e.getReactMountReady().enqueue(u,this);break;case"option":N.mountWrapper(this,a,t),a=N.getHostProps(this,a);break;case"select":P.mountWrapper(this,a,t),a=P.getHostProps(this,a),e.getReactMountReady().enqueue(u,this);break;case"textarea":I.mountWrapper(this,a,t),a=I.getHostProps(this,a),e.getReactMountReady().enqueue(u,this)}o(this,a);var i,p;null!=t?(i=t._namespaceURI,p=t._tag):n._tag&&(i=n._namespaceURI,p=n._tag),(null==i||i===b.svg&&"foreignobject"===p)&&(i=b.html),i===b.html&&("svg"===this._tag?i=b.svg:"math"===this._tag&&(i=b.mathml)),this._namespaceURI=i;var d;if(e.useCreateElement){var h,f=n._ownerDocument;if(i===b.html)if("script"===this._tag){var m=f.createElement("div"),v=this._currentElement.type;m.innerHTML="<"+v+">",h=m.removeChild(m.firstChild)}else h=a.is?f.createElement(this._currentElement.type,a.is):f.createElement(this._currentElement.type);else h=f.createElementNS(i,this._currentElement.type);R.precacheNode(this,h),this._flags|=D.hasCachedChildNodes,this._hostParent||C.setAttributeForRoot(h),this._updateDOMProperties(null,a,e);var y=_(h);this._createInitialChildren(e,a,r,y),d=y}else{var w=this._createOpenTagMarkupAndPutListeners(e,a),E=this._createContentMarkup(e,a,r);d=!E&&K[this._tag]?w+"/>":w+">"+E+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),a.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(l,this),a.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"select":a.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"button":a.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(c,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(j.hasOwnProperty(r))o&&a(this,r,o,e);else{r===F&&(o&&(o=this._previousStyleCopy=v({},t.style)),o=y.createMarkupForStyles(o,this));var i=null;null!=this._tag&&h(this._tag,t)?V.hasOwnProperty(r)||(i=C.createMarkupForCustomAttribute(r,o)):i=C.createMarkupForProperty(r,o),i&&(n+=" "+i)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+C.createMarkupForRoot()),n+=" "+C.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var a=B[_typeof(t.children)]?t.children:null,i=null!=a?null:t.children;if(null!=a)r=L(a);else if(null!=i){var s=this.mountChildren(i,e,n);r=s.join("")}}return G[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&_.queueHTML(r,o.__html);else{var a=B[_typeof(t.children)]?t.children:null,i=null!=a?null:t.children;if(null!=a)_.queueText(r,a);else if(null!=i)for(var s=this.mountChildren(i,e,n),l=0;l"},receiveComponent:function(){},getHostNode:function(){return a.getNodeFromInstance(this)},unmountComponent:function(){a.uncacheNode(this)}}),t.exports=i},{143:143,33:33,9:9}],36:[function(e,t,n){var r={useCreateElement:!0,useFiber:!1};t.exports=r},{}],37:[function(e,t,n){var r=e(8),o=e(33),a={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};t.exports=a},{33:33,8:8}],38:[function(e,t,n){function r(){this._rootNodeID&&p.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);u.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var i=c.getNodeFromInstance(this),s=i;s.parentNode;)s=s.parentNode;for(var p=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),d=0;dt.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[u()].length,o=Math.min(t.start,r),a=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>a){var i=a;a=o,o=i}var s=c(e,o),l=c(e,a);if(s&&l){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>a?(n.addRange(p),n.extend(l.node,l.offset)):(p.setEnd(l.node,l.offset),n.addRange(p))}}}var l=e(123),c=e(106),u=e(107),p=l.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:a,setOffsets:p?i:s};t.exports=d},{106:106,107:107,123:123}],42:[function(e,t,n){var r=e(113),o=e(143),a=e(8),i=e(9),s=e(33),l=e(95),c=(e(137),e(119),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(c.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,a=" react-text: "+o+" ",c=" /react-text ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var u=n._ownerDocument,p=u.createComment(a),d=u.createComment(c),h=i(u.createDocumentFragment());return i.queueChild(h,i(p)),this._stringText&&i.queueChild(h,i(u.createTextNode(this._stringText))),i.queueChild(h,i(d)),s.precacheNode(this,p),this._closingComment=d,h}var f=l(this._stringText);return e.renderToStaticMarkup?f:""+f+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();a.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),t.exports=c},{113:113,119:119,137:137,143:143,33:33,8:8,9:9,95:95}],43:[function(e,t,n){function r(){this._rootNodeID&&u.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return c.asap(r,this),n}var a=e(113),i=e(143),s=e(23),l=e(33),c=e(71),u=(e(137),e(142),{getHostProps:function(e,t){null!=t.dangerouslySetInnerHTML?a("91"):void 0;var n=i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=s.getValue(t),r=n;if(null==n){var i=t.defaultValue,l=t.children;null!=l&&(null!=i?a("92"):void 0,Array.isArray(l)&&(l.length<=1?void 0:a("93"),l=l[0]),i=""+l),null==i&&(i=""),r=i}e._wrapperState={initialValue:""+r,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=l.getNodeFromInstance(e),r=s.getValue(t);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==t.defaultValue&&(n.defaultValue=o)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=l.getNodeFromInstance(e);t.value=t.textContent}});t.exports=u},{113:113,137:137,142:142,143:143,23:23,33:33,71:71}],44:[function(e,t,n){function r(e,t){"_hostNode"in e?void 0:l("33"),"_hostNode"in t?void 0:l("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var o=0,a=t;a;a=a._hostParent)o++;for(;n-o>0;)e=e._hostParent,n--;for(;o-n>0;)t=t._hostParent,o--;for(var i=n;i--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function o(e,t){"_hostNode"in e?void 0:l("35"),"_hostNode"in t?void 0:l("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function a(e){return"_hostNode"in e?void 0:l("36"),e._hostParent}function i(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var o;for(o=r.length;o-- >0;)t(r[o],"captured",n);for(o=0;o0;)n(l[c],"captured",a)}var l=e(113);e(137),t.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:a,traverseTwoPhase:i,traverseEnterLeave:s}},{113:113,137:137}],45:[function(e,t,n){var r=e(143),o=e(30),a=r({__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactInstanceMap:e(57)}},o);t.exports=a},{143:143,30:30,57:57}],46:[function(e,t,n){function r(){this.reinitializeTransaction()}var o=e(143),a=e(71),i=e(89),s=e(129),l={initialize:s,close:function(){d.isBatchingUpdates=!1}},c={initialize:s,close:a.flushBatchedUpdates.bind(a)},u=[c,l];o(r.prototype,i,{getTransactionWrappers:function(){return u}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,a){var i=d.isBatchingUpdates;return d.isBatchingUpdates=!0,i?e(t,n,r,o,a):p.perform(e,null,t,n,r,o,a)}};t.exports=d},{129:129,143:143,71:71,89:89}],47:[function(e,t,n){function r(){E||(E=!0,y.EventEmitter.injectReactEventListener(g),y.EventPluginHub.injectEventPluginOrder(s),y.EventPluginUtils.injectComponentTree(d),y.EventPluginUtils.injectTreeTraversal(f),y.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:C,EnterLeaveEventPlugin:l,ChangeEventPlugin:i,SelectEventPlugin:w,BeforeInputEventPlugin:a}),y.HostComponent.injectGenericComponentClass(p),y.HostComponent.injectTextComponentClass(m),y.DOMProperty.injectDOMPropertyConfig(o),y.DOMProperty.injectDOMPropertyConfig(c),y.DOMProperty.injectDOMPropertyConfig(b),y.EmptyComponent.injectEmptyComponentFactory(function(e){return new h(e)}),y.Updates.injectReconcileTransaction(_),y.Updates.injectBatchingStrategy(v),y.Component.injectEnvironment(u))}var o=e(1),a=e(3),i=e(7),s=e(14),l=e(15),c=e(21),u=e(27),p=e(31),d=e(33),h=e(35),f=e(44),m=e(42),v=e(46),g=e(52),y=e(55),_=e(65),b=e(73),w=e(74),C=e(75),E=!1;t.exports={inject:r}},{1:1,14:14,15:15,21:21,27:27,3:3,31:31,33:33,35:35,42:42,44:44,46:46,52:52,55:55,65:65,7:7,73:73,74:74,75:75}],48:[function(e,t,n){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=r},{}],49:[function(e,t,n){var r,o={injectEmptyComponentFactory:function(e){r=e}},a={create:function(e){return r(e)}};a.injection=o,t.exports=a},{}],50:[function(e,t,n){function r(e,t,n){try{t(n)}catch(e){null===o&&(o=e)}}var o=null,a={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var e=o;throw o=null,e}}};t.exports=a},{}],51:[function(e,t,n){function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=e(16),a={handleTopLevel:function(e,t,n,a){var i=o.extractEvents(e,t,n,a);r(i)}};t.exports=a},{16:16}],52:[function(e,t,n){function r(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function a(e){var t=h(e.nativeEvent),n=p.getClosestInstanceFromNode(t),o=n;do e.ancestors.push(o),o=o&&r(o);while(o);for(var a=0;a/,a=/^<\!\-\-/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return a.test(e)?e:e.replace(o," "+i.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(i.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};t.exports=i},{92:92}],60:[function(e,t,n){function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var i,s=v.createElement(q,{child:t});if(e){var l=C.get(e);i=l._processChildContext(l._context)}else i=R;var u=d(n);if(u){var p=u._currentElement,f=p.props.child;if(P(f,t)){var m=u._renderedComponent.getPublicInstance(),g=r&&function(){r.call(m)};return j._updateRootComponent(u,s,i,n,g),m}j.unmountComponentAtNode(n)}var y=o(n),_=y&&!!a(y),b=c(n),w=_&&!u&&!b,E=j._renderNewRootComponent(s,n,w,i)._renderedComponent.getPublicInstance();return r&&r.call(E),E},render:function(e,t,n){return j._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){u(e)?void 0:h("40");var t=d(e);return t?(delete M[t._instance.rootID],T.batchedUpdates(l,t,e,!1),!0):(c(e),1===e.nodeType&&e.hasAttribute(A),!1)},_mountImageIntoNode:function(e,t,n,a,i){if(u(t)?void 0:h("41"),a){var s=o(t);if(E.canReuseMarkup(e,s))return void y.precacheNode(n,s);var l=s.getAttribute(E.CHECKSUM_ATTR_NAME);s.removeAttribute(E.CHECKSUM_ATTR_NAME);var c=s.outerHTML;s.setAttribute(E.CHECKSUM_ATTR_NAME,l);var p=e,d=r(p,c),m=" (client) "+p.substring(d-20,d+20)+"\n (server) "+c.substring(d-20,d+20);t.nodeType===L?h("42",m):void 0}if(t.nodeType===L?h("43"):void 0,i.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);f.insertTreeBefore(t,e,null)}else N(t,e),y.precacheNode(n,t.firstChild)}};t.exports=j},{109:109,11:11,113:113,115:115,117:117,120:120,121:121,130:130,137:137,142:142,25:25,33:33,34:34,36:36,53:53,57:57,58:58,59:59,66:66,70:70,71:71,9:9}],61:[function(e,t,n){function r(e,t,n){return{type:"INSERT_MARKUP",content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:"MOVE_EXISTING",content:null,fromIndex:e._mountIndex,fromNode:d.getHostNode(e),toIndex:n,afterNode:t}}function a(e,t){return{type:"REMOVE_NODE",content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function i(e){return{type:"SET_MARKUP",content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e){return{type:"TEXT_CONTENT",content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function l(e,t){return t&&(e=e||[],e.push(t)),e}function c(e,t){p.processChildrenUpdates(e,t)}var u=e(113),p=e(28),d=(e(57),e(58),e(120),e(66)),h=e(26),f=(e(129),e(97)),m=(e(137),{Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return h.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o,a){var i,s=0;return i=f(t,s),h.updateChildren(e,i,n,r,o,this,this._hostContainerInfo,a,s),i},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],a=0;for(var i in r)if(r.hasOwnProperty(i)){var s=r[i],l=0,c=d.mountComponent(s,t,this,this._hostContainerInfo,n,l);s._mountIndex=a++,o.push(c)}return o},updateTextContent:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&u("118");var r=[s(e)];c(this,r)},updateMarkup:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&u("118");var r=[i(e)];c(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},a=[],i=this._reconcilerUpdateChildren(r,e,a,o,t,n);if(i||r){var s,u=null,p=0,h=0,f=0,m=null;for(s in i)if(i.hasOwnProperty(s)){var v=r&&r[s],g=i[s];v===g?(u=l(u,this.moveChild(v,m,p,h)),h=Math.max(v._mountIndex,h),v._mountIndex=p):(v&&(h=Math.max(v._mountIndex,h)),u=l(u,this._mountChildAtIndex(g,a[f],m,p,t,n)),f++),p++,m=d.getHostNode(g)}for(s in o)o.hasOwnProperty(s)&&(u=l(u,this._unmountChild(r[s],o[s])));u&&c(this,u),this._renderedChildren=i}},unmountChildren:function(e){var t=this._renderedChildren;h.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function a(e,t){var n=s.get(e);return n?n:null}var i=e(113),s=(e(120),e(57)),l=(e(58),e(71)),c=(e(137),e(142),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){c.validateCallback(t,n);var o=a(e);return o?(o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],void r(o)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=a(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=a(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=a(e,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?i("122",t,o(e)):void 0}});t.exports=c},{113:113,120:120,137:137,142:142,57:57,58:58,71:71}],71:[function(e,t,n){function r(){R.ReactReconcileTransaction&&w?void 0:u("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=R.ReactReconcileTransaction.getPooled(!0)}function a(e,t,n,o,a,i){return r(),w.batchedUpdates(e,t,n,o,a,i)}function i(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==g.length?u("124",t,g.length):void 0,g.sort(i),y++;for(var n=0;n]/;t.exports=o},{}],96:[function(e,t,n){function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=i.get(e);return t?(t=s(t),t?a.getNodeFromInstance(t):null):void("function"==typeof e.render?o("44"):o("45",Object.keys(e)))}var o=e(113),a=(e(120),e(33)),i=e(57),s=e(103);e(137),e(142),t.exports=r},{103:103,113:113,120:120,137:137,142:142,33:33,57:57}],97:[function(e,t,n){(function(n){function r(e,t,n,r){if(e&&"object"==("undefined"==typeof e?"undefined":_typeof(e))){var o=e,a=void 0===o[n];a&&null!=t&&(o[n]=t)}}function o(e,t){if(null==e)return e;var n={};return a(e,r,n),n}var a=(e(22),e(118));e(142),"undefined"!=typeof n&&n.env,t.exports=o}).call(this,void 0)},{118:118,142:142,22:22}],98:[function(e,t,n){function r(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}t.exports=r},{}],99:[function(e,t,n){function r(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=r},{}],100:[function(e,t,n){function r(e){if(e.key){var t=a[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}var o=e(99),a={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},{99:99}],101:[function(e,t,n){function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=a[e];return!!r&&!!n[r]}function o(e){return r}var a={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},{}],102:[function(e,t,n){function r(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}t.exports=r},{}],103:[function(e,t,n){function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.HOST?e._renderedComponent:t===o.EMPTY?null:void 0}var o=e(62);t.exports=r},{62:62}],104:[function(e,t,n){function r(e){var t=e&&(o&&e[o]||e[a]);if("function"==typeof t)return t}var o="function"==typeof Symbol&&Symbol.iterator,a="@@iterator";t.exports=r},{}],105:[function(e,t,n){function r(){return o++}var o=1;t.exports=r},{}],106:[function(e,t,n){function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function a(e,t){for(var n=r(e),a=0,i=0;n;){if(3===n.nodeType){if(i=a+n.textContent.length,a<=t&&i>=t)return{node:n,offset:t-a};a=i}n=r(o(n))}}t.exports=a},{}],107:[function(e,t,n){function r(){return!a&&o.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}var o=e(123),a=null;t.exports=r},{123:123}],108:[function(e,t,n){function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(s[e])return s[e];if(!i[e])return e;var t=i[e];for(var n in t)if(t.hasOwnProperty(n)&&n in l)return s[e]=t[n];return""}var a=e(123),i={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},s={},l={};a.canUseDOM&&(l=document.createElement("div").style,"AnimationEvent"in window||(delete i.animationend.animation,delete i.animationiteration.animation,delete i.animationstart.animation),"TransitionEvent"in window||delete i.transitionend.transition),t.exports=o},{123:123}],109:[function(e,t,n){function r(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function o(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function a(e,t){var n;if(null===e||e===!1)n=c.create(a);else if("object"==("undefined"==typeof e?"undefined":_typeof(e))){var s=e;!s||"function"!=typeof s.type&&"string"!=typeof s.type?i("130",null==s.type?s.type:_typeof(s.type),r(s._owner)):void 0,"string"==typeof s.type?n=u.createInternalComponent(s):o(s.type)?(n=new s.type(s),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new p(s)}else"string"==typeof e||"number"==typeof e?n=u.createInstanceForText(e):i("131","undefined"==typeof e?"undefined":_typeof(e));return n._mountIndex=0,n._mountImage=null,n}var i=e(113),s=e(143),l=e(29),c=e(49),u=e(54),p=(e(105),e(137),e(142),function(e){this.construct(e)});s(p.prototype,l,{_instantiateReactComponent:a}),t.exports=a},{105:105,113:113,137:137,142:142,143:143,29:29,49:49,54:54}],110:[function(e,t,n){function r(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")), r}var o,a=e(123);a.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},{123:123}],111:[function(e,t,n){function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!o[e.type]:"textarea"===t}var o={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};t.exports=r},{}],112:[function(e,t,n){function r(e){return'"'+o(e)+'"'}var o=e(95);t.exports=r},{95:95}],113:[function(e,t,n){function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r]/,l=e(93),c=l(function(e,t){if(e.namespaceURI!==a.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML=""+t+"";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(o.canUseDOM){var u=document.createElement("div");u.innerHTML=" ",""===u.innerHTML&&(c=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),i.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),u=null}t.exports=c},{10:10,123:123,93:93}],116:[function(e,t,n){var r=e(123),o=e(95),a=e(115),i=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(i=function(e,t){return 3===e.nodeType?void(e.nodeValue=t):void a(e,o(t))})),t.exports=i},{115:115,123:123,95:95}],117:[function(e,t,n){function r(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o="undefined"==typeof e?"undefined":_typeof(e),a="undefined"==typeof t?"undefined":_typeof(t);return"string"===o||"number"===o?"string"===a||"number"===a:"object"===a&&e.type===t.type&&e.key===t.key}t.exports=r},{}],118:[function(e,t,n){function r(e,t){return e&&"object"==("undefined"==typeof e?"undefined":_typeof(e))&&null!=e.key?c.escape(e.key):t.toString(36)}function o(e,t,n,a){var d="undefined"==typeof e?"undefined":_typeof(e);if("undefined"!==d&&"boolean"!==d||(e=null),null===e||"string"===d||"number"===d||"object"===d&&e.$$typeof===s)return n(a,e,""===t?u+r(e,0):t),1;var h,f,m=0,v=""===t?u:t+p;if(Array.isArray(e))for(var g=0;g":i.innerHTML="<"+e+">",s[e]=!i.firstChild),s[e]?d[e]:null}var o=e(123),a=e(137),i=o.canUseDOM?document.createElement("div"):null,s={},l=[1,'"],c=[1,"","
"],u=[3,"","
"],p=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:l,option:l,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:u,th:u},h=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];h.forEach(function(e){d[e]=p,s[e]=!0}),t.exports=r},{123:123,137:137}],134:[function(e,t,n){function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=r},{}],135:[function(e,t,n){function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},{}],136:[function(e,t,n){function r(e){return o(e).replace(a,"-ms-")}var o=e(135),a=/^ms-/;t.exports=r},{135:135}],137:[function(e,t,n){function r(e,t,n,r,o,a,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,s],u=0;l=new Error(t.replace(/%s/g,function(){return c[u++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}t.exports=r},{}],138:[function(e,t,n){function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==("undefined"==typeof e?"undefined":_typeof(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=r},{}],139:[function(e,t,n){function r(e){return o(e)&&3==e.nodeType}var o=e(138);t.exports=r},{138:138}],140:[function(e,t,n){function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=r},{}],141:[function(e,t,n){function r(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=("undefined"==typeof e?"undefined":_typeof(e))||null===e||"object"!=("undefined"==typeof t?"undefined":_typeof(t))||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var i=0;i=3&&(r+=" sudoku"),4===o&&(r+=" four"),n||(r+=" full"),React.createElement("div",{className:"pic-list-wrapper",ref:function(t){e.rootDOM=t}},React.createElement("ul",{className:r},t.images.map(function(r,o){var a=r.normal,i=r.large,s=r.is_animated,l=e.getImageMode(i,s),c=a.height/a.width>4/3&&i.height>1800,u="mode-"+l;return s?u+=" animate":c&&(u+=" long"),React.createElement("li",{key:"img_"+t.id+"_"+o,className:u,onClick:e.toggleFold.bind(e)},React.createElement("span",{className:"img-wrapper"},React.createElement("img",{src:n||s?a.url:i.url,"data-render-type":s?"gif":"static","data-original-url":i.url})))})))}},{key:"getImageRealNaturnSize",value:function(e){var t=0,n=0,r=new Image;return r.src=e,r.onload=function(){t=this.width,n=this.width},{width:t,height:n}}},{key:"getImageMode",value:function(e,t){var n=172,r=1230,o=4/3,a=e.width/e.height,i=e.height/e.width,s=0;return e.width===e.height&&(e.width>n||e.height>n)?s=1:e.height>n&&e.width>e.height?a>o?(s=2,e.width>r&&(s=3)):s=4:e.width>n&&e.height>e.width?i>o?(s=5,e.height>r&&(s=6)):s=7:e.width<=n&&e.height>e.width?s=8:e.height<=n&&e.width>e.height?s=9:e.height<=n&&e.width===e.height&&(s=10),s}},{key:"toggleFold",value:function(e){var t=this,n=this.state.fold,r=this.props.target,o=ReactDOM.findDOMNode(e.currentTarget.closest(".gallery-topic-item")).getBoundingClientRect();if(!n&&o.top<0&&window.scrollTo(0,o.top+(window.pageYOffset||document.documentElement.scrollTop)),n){var a=window._paq||[];a.push(["trackEvent","content_visit","click_content_pic","status",r.id])}this.setState({fold:!n},function(){if(n&&t.rootDOM){var e=ReactDOM.findDOMNode(t.rootDOM);t.gifInstances=RenderGIF.renderInit({preloadNum:9,type:"video",download:!0},e)}else if(t.gifInstances)for(;t.gifInstances.length;){var r=t.gifInstances.pop();r&&r.destroy()}})}},{key:"handleImageLoaded",value:function(e){this.setState({imageStatus:"loaded"})}}]),t}(React.Component);!function(e){function t(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t.push(n+"="+r)}return t.join("&")}function n(e,n){for(var r=e.split("?")[0],o=e.split("?")[1],a=o?o.split("&"):[],i={},s=0,l=a.length;s');var n=$(t).find(".item-action");n.addClass("fixed-action"),n.css({width:$(t).width()+"px",left:t.getBoundingClientRect().left+"px"})}});var Base=function(e){function t(e,n){_classCallCheck(this,t);var r=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.state=$.extend({},{target:e.target,author:e.target.user||e.target.author,is_up_vote:1===e.vote,up_count:null,voting:!1,irrelevant_text:"与话题无关",irrelevant_clicked:!1,mode:"preview",unfold_clicked:!1,fulltext:null,use_native_expand:!1,topic_name:"",topic_id:"",show_actions:!0,card_type:"",is_related:!1,abstract:"",social_title:"推荐",social_count:e.target.timeline_share_count,topic:e.topic_for_home_stream||null,stream_type:e.stream_type_for_home_stream||null},n),r}return _inherits(t,e),_createClass(t,[{key:"vote",value:function(e,t){var n=this;if(window._USER_ABNORMAL)return void(window.show_abnormal&&window.show_abnormal());if(!window.islogin)return void(location.href="//www.douban.com/accounts/login?source="+(window.isSearchTerm?"search_term":"gallery"));if(!this.state.voting){"upvote"===e&&this.state.is_up_vote&&(e="unvote"),this.setState({voting:!0});var r="https://m.douban.com/rexxar/api/v2/"+(window.isSearchTerm?"search/term":"gallery/topic")+"/"+this.state.topic_id+"/"+e;api(r,"POST",{target_kind:"groupTopic"===this.state.card_type?"topic":this.state.card_type,target_id:this.state.target.id},function(){var t=n.state.up_count;"upvote"===e&&++t,"unvote"===e&&n.state.is_up_vote&&--t,n.setState({is_up_vote:"upvote"===e,up_count:t,voting:!1})})}}},{key:"card_type_to_id",value:function(e){return"note"===e?"1015":"status"===e?"3055":"review"===e?"1012":void 0}},{key:"irrelevant",value:function(){var e=this;if(!this.state.irrelevant_clicked){if(!window.islogin)return void(location.href="//www.douban.com/accounts/login");if(window._USER_ABNORMAL)return void(window.show_abnormal&&window.show_abnormal());this.setState({irrelevant_clicked:!0}),api("https://m.douban.com/rexxar/api/v2/gallery/topic/"+this.state.topic_id+"/mark_as_irrelevant","POST",{target_kind:"groupTopic"===this.state.card_type?"topic":this.state.card_type,target_id:this.state.target.id,ck:get_cookie("ck")},function(){e.setState({irrelevant_text:"已反馈"})})}}},{key:"main",value:function(e){return null}},{key:"subscribe",value:function(){var e=this;this.state.topic.is_subscribed||api("/j/gallery/topic/"+this.state.topic_id+"/subscribe","POST",{},function(){e.setState({topic:$.extend({},e.state.topic,{is_subscribed:!0})})})}},{key:"fold",value:function(){return null}},{key:"render",value:function(){var e=this.state,t=e.target,n=e.author,r=e.is_up_vote,o=e.up_count,a=e.irrelevant_text,i=e.mode,s=e.show_actions,l=e.card_type,c=e.is_related,u=e.social_title,p=e.social_count,d=e.topic,h=e.stream_type,f=e.is_carnival_rule,m=e.is_read_checkin,v=e.censor_kind,g=0,y=void 0,_=void 0;if("annotation"===l){var b=t.subject_label,w=b.title,C=b.uri;y=C.split("/")[4].replace("#annotation",""),_=w.replace("的读书笔记",""),g=t.read_count}return React.createElement("div",{className:"gallery-topic-item item-"+l,ref:"topic_item","data-censor_kind":v,"data-tid":t.id},f&&!m?React.createElement("div",{className:"carnival-rule"},"活动规则"):null,n?React.createElement("div",{className:"item-meta item-meta-"+l},React.createElement("a",{href:n.url,target:"_blank",className:"avatar_a"},React.createElement("img",{className:"avatar",src:n.avatar,alt:n.name})),React.createElement("a",{className:"author",href:n.url,target:"_blank"},n.name),React.createElement("span",{className:"type"},"annotation"===l?"写了":null,"review"===l?"的长评":"note"===l?"的日记":"groupTopic"===l?"在 "+(t.group.name.split("").splice(-2,2).indexOf("组")>-1?t.group.name:t.group.name+"小组")+" 发布的讨论":"annotation"===l&&y&&_?React.createElement("i",null,React.createElement("a",{href:_UTILS.appendQuery("//book.douban.com/subject/"+y,{_dtcc:1}),target:"_blank"},_),"的读书笔记"):"的广播"),React.createElement("time",{className:"time"},React.createElement("a",{href:_UTILS.appendQuery(t.sharing_url,{_dtcc:1}),target:"_blank"},t.create_time)),m&&f?React.createElement("div",{className:"lable-read-checkin"},"领读人答疑"):null,!d&&c?React.createElement("span",{className:"related"},"相关内容"):null,d?React.createElement("div",{className:"post-from"},React.createElement("a",{className:"subscribt-btn "+(d.is_subscribed?"subscribed":""),onClick:this.subscribe.bind(this)},d.is_subscribed?"已关注":"关注话题"),React.createElement("span",{className:"from-label"},"来自话题"),React.createElement("a",{title:d.name,href:"https://www.douban.com/gallery/topic/"+d.id+"/?from=gallery_"+h+"_post",className:"from-topic-name",ref:"from_topic_name",target:"_blank"},d.name),d.label&&""!==d.label?React.createElement("i",{className:"topic_type_label"},d.label):null):null,this.state.is_ad?React.createElement("span",{className:"adl"},"广告"):null):null,this.main(this.state),s?React.createElement("div",{className:"item-action"},React.createElement("div",{className:"reaction"},React.createElement("a",{className:"btn "+l+"-up","data-up":r,title:"有用",onClick:this.vote.bind(this,"upvote")},null!==o?React.createElement("span",null,o):null),React.createElement("div",{className:"item-state "+("preview"===i?"":"expand")},React.createElement("a",{href:_UTILS.appendQuery(t.sharing_url,{_dtcc:1})+"#comments",className:"comments-count"},t.comments_count,"回应"),"groupTopic"!==l&&p?React.createElement("span",null,p,u):null,"annotation"===l&&g?React.createElement("span",null,g+"阅读"):null)),React.createElement("a",{className:"info-btn fold "+("preview"===i?"hide":""),onClick:this.fold.bind(this)},"收起"),window.isSearchTerm?null:React.createElement("a",{className:"info-btn unrelated",onClick:this.irrelevant.bind(this)},a)):null)}}]),t}(React.Component),Foldable=function(e){function t(e,n){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return _inherits(t,e),_createClass(t,[{key:"componentDidMount",value:function(){var e=shear(this.refs.preview_content,4,'... (展开) ');e.isCuted||this.setState({use_native_expand:!0})}},{key:"fold",value:function(){var e=this;this.setState({mode:"preview"}),setTimeout(function(){e.refs.topic_item.scrollIntoViewIfNeeded?e.refs.topic_item.scrollIntoViewIfNeeded():e.refs.topic_item.scrollIntoView()},100),visibleClient.remove(this.refs.topic_item)}},{key:"unfold",value:function(){var e=this,t=this.props.target,n=this.state,r=n.fulltext,o=n.unfold_clicked,a=n.fullApi;return null!==r?(this.setState({mode:"full"}),void visibleClient.add(this.refs.topic_item)):!o&&(this.setState({unfold_clicked:!0}),void $.getJSON(a,function(n){var r=n.content||n.html;e.setState({mode:"full",fulltext:r});var o=window._paq||[];o.push(["trackEvent","content_visit","click_full_text",t.type,t.id]),visibleClient.add(e.refs.topic_item)}))}},{key:"main",value:function(e){var t=e.target,n=e.mode,r=e.card_type,o=e.fulltext,a=e.use_native_expand,i=e.abstract;return React.createElement("div",null,React.createElement("p",{className:r+"-preview "+("preview"===n?"":"hide"),onClick:this.unfold.bind(this)},t.cover_url?React.createElement("i",{className:r+"-cover",style:{backgroundImage:"url("+t.cover_url+")"}}):null,React.createElement("div",{className:"preview-wrapper "+(t.cover_url?"preview-wrapper-right":"")},React.createElement("pre",{className:r+"-preview-content preview-content",ref:"preview_content",dangerouslySetInnerHTML:{__html:DOMPurify.sanitize(i.replace(/:\s/,": "))}}),a?React.createElement("span",{class:"expand"}," (展开) "):null)),React.createElement("h2",{className:"full-title "+("preview"===n?"hide":"")},React.createElement("a",{href:_UTILS.appendQuery(t.sharing_url,{_dtcc:1}),target:"_blank"},t.title)),React.createElement("div",{className:r+"-full "+("preview"===n?"hide":""),dangerouslySetInnerHTML:{__html:DOMPurify.sanitize(o,{ADD_TAGS:["iframe"],ADD_ATTR:["frameBorder","border","scrolling"]})}}))}}]),t}(Base),Review=function(e){function t(e){_classCallCheck(this,t);var n=e.target;return _possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{fullApi:"https://m.douban.com/rexxar/api/v2/review/"+n.id,card_type:"review",is_related:!!e.source,topic_name:e.topic_name,topic_id:e.topic_id,abstract:e.abstract,is_ad:e.is_ad,censor_kind:1012}))}return _inherits(t,e),t}(Foldable),Note=function(e){function t(e){_classCallCheck(this,t);var n=e.target;return _possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{fullApi:"https://www.douban.com/j/note/"+n.id+"/full",up_count:e.target.likers_count,card_type:"note",is_related:!!e.source,topic_name:e.topic_name,topic_id:e.topic_id,abstract:e.abstract,is_ad:e.is_ad,is_carnival_rule:e.is_carnival_rule,is_read_checkin:e.is_read_checkin,censor_kind:1015}))}return _inherits(t,e),_createClass(t,[{key:"main",value:function(e){var t=e.target,n=e.mode,r=e.card_type,o=e.fulltext,a=e.use_native_expand,i=e.abstract,s=t.abstract_entities,l=t.article_subjects,c=t.cover_url,u=i;if(s&&s.length>0){var p=s.reduce(function(e,t){var n=t.start,r=t.end;return e.concat([n,r])},[]),d=[0].concat(_toConsumableArray(p),[u.length]),h=d.map(function(e,t){var n=e,r=d[t+1],o=u.substring(n,r),a=s.find(function(e){return e.start===n&&e.end===r});return a?entityTransform(o,a):o});u=h.join("")}return React.createElement("div",null,React.createElement("p",{className:r+"-preview "+("preview"===n?"":"hide"),onClick:this.unfold.bind(this)},function(){return l&&l.photos&&l.photos.length>0?React.createElement("ul",{className:"article-subjects-cover"},l.photos.slice(0,3).map(function(e){return React.createElement("li",{className:"article-subject-cover",style:{backgroundImage:"url("+e+")"}})})):c?React.createElement("i",{className:r+"-cover",style:{backgroundImage:"url("+c+")"}}):null}(),React.createElement("div",{className:"preview-wrapper "+(t.cover_url?"preview-wrapper-right":"")},React.createElement("pre",{className:r+"-preview-content preview-content",ref:"preview_content",dangerouslySetInnerHTML:{__html:u}}),a?React.createElement("span",{class:"expand"}," (展开) "):null)),React.createElement("h2",{className:"full-title "+("preview"===n?"hide":"")},React.createElement("a",{href:_UTILS.appendQuery(t.sharing_url,{_dtcc:1}),target:"_blank"},t.title)),React.createElement("div",{className:r+"-full "+("preview"===n?"hide":""),dangerouslySetInnerHTML:{__html:DOMPurify.sanitize(o,{ADD_TAGS:["iframe"],ADD_ATTR:["frameBorder","border","scrolling"]})}}))}}]),t}(Foldable),Status=function(e){function t(e){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{up_count:e.target.like_count,card_type:"status",is_related:!!e.source,topic_name:e.topic_name,topic_id:e.topic_id,show_actions:e.is_original,social_title:"转播",social_count:e.target.reshares_count,is_ad:e.is_ad,censor_kind:80007}))}return _inherits(t,e),_createClass(t,[{key:"componentDidMount",value:function(){shear(this.refs.preview_content,4,'... (展开) ')}},{key:"unfold",value:function(){var e=this.props.target;if(0!==$(this.refs.preview_content).find("span.expand").size()){$(this.refs.preview_content).addClass("hide"),$(this.refs.full_content).removeClass("hide");var t=window._paq||[];t.push(["trackEvent","content_visit","click_full_text",e.type,e.id]),this.setState({mode:"expand"})}}},{key:"fold",value:function(){$(this.refs.preview_content).removeClass("hide"),$(this.refs.full_content).addClass("hide"),this.setState({mode:"preview"})}},{key:"main",value:function(e){var n=e.target,r=e.topic_name,o=e.topic_id,a=n.entities,i=n.text,s=n.msg,l=(n.reshared_status,i||s);if(a&&a.length>0){var c=a.reduce(function(e,t){var n=t.start,r=t.end;return e.concat([n,r])},[]),u=[0].concat(_toConsumableArray(c),[i.length]),p=u.map(function(e,t){var n=e,r=u[t+1],s=i.substring(n,r),l=a.find(function(e){return e.start===n&&e.end===r});return l?entityTransform(s,l,o):Html5Entities.encode(s)});l=p.join("")}else l=Html5Entities.encode(l);return React.createElement("div",null,React.createElement("div",{className:"status-title"},n.title),React.createElement("pre",{ref:"preview_content",className:"status-preview",dangerouslySetInnerHTML:{__html:l},onClick:this.unfold.bind(this)}),React.createElement("pre",{ref:"full_content",className:"status-full hide",dangerouslySetInnerHTML:{__html:l}}),n&&n.images&&n.images.length?React.createElement(ImageBox,{target:n}):null,n.video_info&&n.video_info.video_url&&!n.reshared_status?React.createElement(Video,{video_src:n.video_info.video_url,target:n,instance_id:n.id+"-"+n.create_time.replace(/[\s|:]/g,""),autoplay:!1,counter_key:"anduin_video-"+n.id,play_status:n.video_info.play_status,poster:n.video_info.cover_url,mine:n.author&&n.author.id===window.uid,view_from:"gallery_topic"}):null,n.reshared_status?React.createElement("div",{className:"status-reshare"},React.createElement(t,{target:n.reshared_status,source:"",topic_name:r,vote:0,is_original:!1})):null,n.card?React.createElement("a",{className:"status-rec",href:n.card.url,target:"_blank"},n.card.image?React.createElement("i",{style:{backgroundImage:"url("+n.card.image.normal.url+")"}}):null,React.createElement("div",null,React.createElement("h2",{className:"icon-topic"},n.card.title),React.createElement("p",null,n.card.subtitle))):null)}}]),t}(Base),Topic=function(e){function t(e){_classCallCheck(this,t);e.target;return _possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{up_count:e.target.likers_count||0,card_type:"groupTopic",topic_name:e.topic_name,topic_id:e.topic_id,is_carnival_rule:e.is_carnival_rule,is_read_checkin:e.is_read_checkin,censor_kind:1013}))}return _inherits(t,e),_createClass(t,[{key:"componentDidMount",value:function(){var e=this.state.target;if(e){var t=shear(this.refs.preview_content,4,"... (查看) ');t.isCuted||this.setState({use_native_expand:!0})}}},{key:"main",value:function(e){var t=e.target,n=(e.topic_name,e.topic_id,this.state),r=(n.use_native_expand,n.card_type),o=t.abstract;return React.createElement("div",{className:r+"-preview"},React.createElement("h2",null,React.createElement("a",{href:_UTILS.appendQuery(t.sharing_url,{_dtcc:1}),target:"_blank"},t.title)),React.createElement("p",null,t.cover_url?React.createElement("a",{href:_UTILS.appendQuery(t.sharing_url,{_dtcc:1}),target:"_blank",className:r+"-cover",style:{backgroundImage:"url("+t.cover_url+")"}}):null,React.createElement("div",{className:"preview-wrapper "+(t.cover_url?"preview-wrapper-right":"")},React.createElement("pre",{className:r+"-preview-content preview-content",ref:"preview_content",dangerouslySetInnerHTML:{__html:DOMPurify.sanitize(o.replace(/:\s/,": "))}}))))}}]),t}(Base),Annotation=function(e){function t(e){_classCallCheck(this,t);var n=e.target;return _possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{fullApi:"https://m.douban.com/rexxar/api/v2/annotation/"+n.id,card_type:"annotation",is_related:!!e.source,topic_name:e.topic_name,topic_id:e.topic_id,abstract:e.abstract,is_ad:e.is_ad}))}return _inherits(t,e),_createClass(t,[{key:"main",value:function(e){var t=e.target,n=(e.topic_name,e.topic_id,this.state),r=(n.use_native_expand,n.card_type),o=t.abstract;return React.createElement("div",{className:r+"-preview"},React.createElement("h2",null,React.createElement("a",{href:_UTILS.appendQuery(t.sharing_url,{_dtcc:1}),target:"_blank"},t.title)),React.createElement("p",null,t.cover_url?React.createElement("a",{href:_UTILS.appendQuery(t.sharing_url,{_dtcc:1}),target:"_blank",className:r+"-cover",style:{backgroundImage:"url("+t.cover_url+")"}}):null,React.createElement("div",{className:"preview-wrapper "+(t.cover_url?"preview-wrapper-right":"")},React.createElement("pre",{className:r+"-preview-content preview-content",ref:"preview_content",dangerouslySetInnerHTML:{__html:DOMPurify.sanitize(o.replace(/:\s/,": "))}}))))}}]),t}(Base),lazyload=function(){function e(t){var n=this;_classCallCheck(this,e),this.observer=null,this.observerEle=null,this.inViewCallback=t.bind(this,this),this.lastState=!1,window.IntersectionObserver?this.observer=new window.IntersectionObserver(function(e){this.checkPosition(e[0].boundingClientRect)&&this.inViewCallback()}.bind(this)):window.addEventListener("scroll",function(e){if(!n.observerEle)return void console.log("observerEle",observerEle);var t=n.observerEle.getBoundingClientRect(),r=n.checkPosition(t),o=r===!0&&n.lastState===!1;n.lastState=r,o&&n.inViewCallback()})}return _createClass(e,[{key:"checkPosition",value:function(e){var t=e.top;return t>0&&t<=window.innerHeight}},{key:"watch",value:function(e){return this.observer&&this.observer.observe(e),this.observerEle=e,this}},{key:"stop",value:function(){this.observer&&this.observer.disconnect(),this.observerEle=null}}]),e}(),TopicStream=function(e){function t(e){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={items:[],start:e.start,count:20,hasNext:!0,fetching:!1,show_loading:!0},n.lazyins=null,n}return _inherits(t,e),_createClass(t,[{key:"fetch",value:function(){var e=this,t=this.props.onFetchSuccess,n=this.state,r=n.items,o=n.fetching,a=n.hasNext;return!(o||!a)&&(this.setState({fetching:!0,show_loading:!0}),new Promise(function(n){api(e.apiUrl(),"GET",{},function(o){var a={start:o.start+o.count,fetching:!1,show_loading:!1,items:r.concat(filterSameAuthor(o.items)),hasNext:o.start+o.count