spc-pleroma/priv/static/packs/public.js

2 lines
33 KiB
JavaScript

webpackJsonp([29,25],{154:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return N});var r,a,o,i,l,s=n(2),u=n.n(s),c=n(1),d=n.n(c),f=n(3),p=n.n(f),m=n(4),h=n.n(m),v=n(0),g=n.n(v),y=n(8),b=(n.n(y),n(23)),_=n(6),w=n(35),O=n(10),x=n.n(O),C=n(11),k=Object(_.f)({toggle_visible:{id:"media_gallery.toggle_visible",defaultMessage:"Toggle visibility"}}),j=(a=r=function(e){function t(){var n,r,a;d()(this,t);for(var o=arguments.length,i=Array(o),l=0;l<o;l++)i[l]=arguments[l];return n=r=p()(this,e.call.apply(e,[this].concat(i))),r.handleMouseEnter=function(e){r.hoverToPlay()&&e.target.play()},r.handleMouseLeave=function(e){r.hoverToPlay()&&(e.target.pause(),e.target.currentTime=0)},r.handleClick=function(e){var t=r.props,n=t.index,a=t.onClick;0===e.button&&(e.preventDefault(),a(n)),e.stopPropagation()},a=n,p()(r,a)}return h()(t,e),t.prototype.hoverToPlay=function(){var e=this.props.attachment;return!C.a&&"gifv"===e.get("type")},t.prototype.render=function(){var e=this.props,t=e.attachment,n=e.index,r=e.size,a=e.standalone,o=50,i=100,l="auto",s="auto",c="auto",d="auto";1===r&&(o=100),(4===r||3===r&&n>0)&&(i=50),2===r?0===n?d="2px":s="2px":3===r?(0===n?d="2px":n>0&&(s="2px"),1===n?c="2px":n>1&&(l="2px")):4===r&&(0!==n&&2!==n||(d="2px"),1!==n&&3!==n||(s="2px"),n<2?c="2px":l="2px");var f="";if("image"===t.get("type")){var p=t.get("preview_url"),m=t.getIn(["meta","small","width"]),h=t.get("url"),v=t.getIn(["meta","original","width"]),g="number"==typeof v&&"number"==typeof m,y=g?h+" "+v+"w, "+p+" "+m+"w":null,b=g?"(min-width: 1025px) "+o/100*320+"px, "+o+"vw":null,_=t.getIn(["meta","focus","x"])||0,O=t.getIn(["meta","focus","y"])||0,k=100*(_/2+.5),j=100*(O/-2+.5);f=u()("a",{className:"media-gallery__item-thumbnail",href:t.get("remote_url")||h,onClick:this.handleClick,target:"_blank"},void 0,u()("img",{src:p,srcSet:y,sizes:b,alt:t.get("description"),title:t.get("description"),style:{objectPosition:k+"% "+j+"%"}}))}else if("gifv"===t.get("type")){var N=!Object(w.a)()&&C.a;f=u()("div",{className:x()("media-gallery__gifv",{autoplay:N})},void 0,u()("video",{className:"media-gallery__item-gifv-thumbnail","aria-label":t.get("description"),role:"application",src:t.get("url"),onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,autoPlay:N,loop:!0,muted:!0}),u()("span",{className:"media-gallery__gifv__label"},void 0,"GIF"))}return u()("div",{className:x()("media-gallery__item",{standalone:a}),style:{left:s,top:l,right:d,bottom:c,width:o+"%",height:i+"%"}},t.get("id"),f)},t}(g.a.PureComponent),r.defaultProps={standalone:!1,index:0,size:1},a),N=Object(_.g)((l=i=function(e){function t(){var n,r,a;d()(this,t);for(var o=arguments.length,i=Array(o),l=0;l<o;l++)i[l]=arguments[l];return n=r=p()(this,e.call.apply(e,[this].concat(i))),r.state={visible:!r.props.sensitive||C.f},r.handleOpen=function(){r.setState({visible:!r.state.visible})},r.handleClick=function(e){r.props.onOpenMedia(r.props.media,e)},r.handleRef=function(e){e&&r.setState({width:e.offsetWidth})},a=n,p()(r,a)}return h()(t,e),t.prototype.componentWillReceiveProps=function(e){Object(y.is)(e.media,this.props.media)||this.setState({visible:!e.sensitive})},t.prototype.isStandaloneEligible=function(){var e=this.props,t=e.media;return e.standalone&&1===t.size&&t.getIn([0,"meta","small","aspect"])},t.prototype.render=function(){var e=this,t=this.props,n=t.media,r=t.intl,a=t.sensitive,o=t.height,i=this.state,l=i.width,s=i.visible,c=void 0,d={};if(this.isStandaloneEligible()?l&&(d.height=l/this.props.media.getIn([0,"meta","small","aspect"])):d.height=l?l/(16/9):o,s){var f=n.take(4).size;c=this.isStandaloneEligible()?u()(j,{standalone:!0,onClick:this.handleClick,attachment:n.get(0)}):n.take(4).map(function(t,n){return u()(j,{onClick:e.handleClick,attachment:t,index:n,size:f},t.get("id"))})}else{var p=void 0;p=a?u()(_.b,{id:"status.sensitive_warning",defaultMessage:"Sensitive content"}):u()(_.b,{id:"status.media_hidden",defaultMessage:"Media hidden"}),c=g.a.createElement("button",{type:"button",className:"media-spoiler",onClick:this.handleOpen,style:d,ref:this.handleRef},u()("span",{className:"media-spoiler__warning"},void 0,p),u()("span",{className:"media-spoiler__trigger"},void 0,u()(_.b,{id:"status.sensitive_toggle",defaultMessage:"Click to view"})))}return g.a.createElement("div",{className:"media-gallery",style:d,ref:this.handleRef},u()("div",{className:x()("spoiler-button",{"spoiler-button--visible":s})},void 0,u()(b.a,{title:r.formatMessage(k.toggle_visible),icon:s?"eye":"eye-slash",overlay:!0,onClick:this.handleOpen})),c)},t}(g.a.PureComponent),i.defaultProps={standalone:!1},o=l))||o},332:function(e,t,n){"use strict";n.d(t,"a",function(){return j});var r,a,o=n(2),i=n.n(o),l=n(1),s=n.n(l),u=n(3),c=n.n(u),d=n(4),f=n.n(d),p=n(0),m=n.n(p),h=n(8),v=n.n(h),g=n(333),y=n.n(g),b=n(10),_=n.n(b),w=function(e){return e.split(".").map(function(e){return 0===e.indexOf("xn--")?y.a.decode(e.slice("xn--".length)):e}).join(".")},O=function(e){var t=document.createElement("a");return t.href=e,t.hostname},x=function(e,t){var n=e.indexOf(" ",t);return-1===n?e:e.substring(0,n)+(e.length>t?"…":"")},C=new DOMParser,k=function(e){var t=C.parseFromString(e,"text/html").documentElement,n=t.querySelector("iframe");return n?(-1!==n.src.indexOf("?")?n.src+="&":n.src+="?",n.src+="autoplay=1&auto_play=1",t.querySelector("body").innerHTML):e},j=(a=r=function(e){function t(){var n,r,a;s()(this,t);for(var o=arguments.length,i=Array(o),l=0;l<o;l++)i[l]=arguments[l];return n=r=c()(this,e.call.apply(e,[this].concat(i))),r.state={width:280,embedded:!1},r.handlePhotoClick=function(){var e=r.props,t=e.card;(0,e.onOpenMedia)(v.a.fromJS([{type:"image",url:t.get("embed_url"),description:t.get("title"),meta:{original:{width:t.get("width"),height:t.get("height")}}}]),0)},r.handleEmbedClick=function(){"photo"===r.props.card.get("type")?r.handlePhotoClick():r.setState({embedded:!0})},r.setRef=function(e){e&&r.setState({width:e.offsetWidth})},a=n,c()(r,a)}return f()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.card!==e.card&&this.setState({embedded:!1})},t.prototype.renderVideo=function(){var e=this.props.card,t={__html:k(e.get("html"))},n=this.state.width,r=e.get("width")/e.get("height"),a=e.get("width")>e.get("height")?n/r:n*r;return m.a.createElement("div",{ref:this.setRef,className:"status-card__image status-card-video",dangerouslySetInnerHTML:t,style:{height:a}})},t.prototype.render=function(){var e=this.props,t=e.card,n=e.maxDescription,r=this.state,a=r.width,o=r.embedded;if(null===t)return null;var l=0===t.get("provider_name").length?w(O(t.get("url"))):t.get("provider_name"),s=t.get("width")>t.get("height")&&t.get("width")+100>=a||"link"!==t.get("type"),u=_()("status-card",{horizontal:s}),c="link"!==t.get("type"),d=c?i()("a",{className:"status-card__title",href:t.get("url"),title:t.get("title"),rel:"noopener",target:"_blank"},void 0,i()("strong",{},void 0,t.get("title"))):i()("strong",{className:"status-card__title",title:t.get("title")},void 0,t.get("title")),f=t.get("width")/t.get("height"),p=t.get("width")>t.get("height")?a/f:a*f,h=i()("div",{className:"status-card__content"},void 0,d,!s&&i()("p",{className:"status-card__description"},void 0,x(t.get("description")||"",n)),i()("span",{className:"status-card__host"},void 0,l)),v="",g=i()("div",{style:{backgroundImage:"url("+t.get("image")+")",width:s?a:null,height:s?p:null},className:"status-card__image-image"});if(c){if(o)v=this.renderVideo();else{var y="play";"photo"===t.get("type")&&(y="search-plus"),v=i()("div",{className:"status-card__image"},void 0,g,i()("div",{className:"status-card__actions"},void 0,i()("div",{},void 0,i()("button",{onClick:this.handleEmbedClick},void 0,i()("i",{className:"fa fa-"+y})),i()("a",{href:t.get("url"),target:"_blank",rel:"noopener"},void 0,i()("i",{className:"fa fa-external-link"})))))}return m.a.createElement("div",{className:u,ref:this.setRef},v,h)}return t.get("image")&&(v=i()("div",{className:"status-card__image"},void 0,g)),m.a.createElement("a",{href:t.get("url"),className:u,target:"_blank",rel:"noopener",ref:this.setRef},v,h)},t}(m.a.PureComponent),r.defaultProps={maxDescription:50},a)},333:function(e,t,n){(function(e,r){var a;!function(o){function i(e){throw new RangeError(E[e])}function l(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function s(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(T,"."),r+l(e.split("."),t).join(".")}function u(e){for(var t,n,r=[],a=0,o=e.length;a<o;)t=e.charCodeAt(a++),t>=55296&&t<=56319&&a<o?(n=e.charCodeAt(a++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),a--)):r.push(t);return r}function c(e){return l(e,function(e){var t="";return e>65535&&(e-=65536,t+=A(e>>>10&1023|55296),e=56320|1023&e),t+=A(e)}).join("")}function d(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:w}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function p(e,t,n){var r=0;for(e=n?D(e/k):e>>1,e+=D(e/t);e>F*x>>1;r+=w)e=D(e/F);return D(r+(F+1)*e/(e+C))}function m(e){var t,n,r,a,o,l,s,u,f,m,h=[],v=e.length,g=0,y=N,b=j;for(n=e.lastIndexOf(M),n<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&i("not-basic"),h.push(e.charCodeAt(r));for(a=n>0?n+1:0;a<v;){for(o=g,l=1,s=w;a>=v&&i("invalid-input"),u=d(e.charCodeAt(a++)),(u>=w||u>D((_-g)/l))&&i("overflow"),g+=u*l,f=s<=b?O:s>=b+x?x:s-b,!(u<f);s+=w)m=w-f,l>D(_/m)&&i("overflow"),l*=m;t=h.length+1,b=p(g-o,t,0==o),D(g/t)>_-y&&i("overflow"),y+=D(g/t),g%=t,h.splice(g++,0,y)}return c(h)}function h(e){var t,n,r,a,o,l,s,c,d,m,h,v,g,y,b,C=[];for(e=u(e),v=e.length,t=N,n=0,o=j,l=0;l<v;++l)(h=e[l])<128&&C.push(A(h));for(r=a=C.length,a&&C.push(M);r<v;){for(s=_,l=0;l<v;++l)(h=e[l])>=t&&h<s&&(s=h);for(g=r+1,s-t>D((_-n)/g)&&i("overflow"),n+=(s-t)*g,t=s,l=0;l<v;++l)if(h=e[l],h<t&&++n>_&&i("overflow"),h==t){for(c=n,d=w;m=d<=o?O:d>=o+x?x:d-o,!(c<m);d+=w)b=c-m,y=w-m,C.push(A(f(m+b%y,0))),c=D(b/y);C.push(A(f(c,0))),o=p(n,g,r==a),n=0,++r}++n,++t}return C.join("")}function v(e){return s(e,function(e){return P.test(e)?m(e.slice(4).toLowerCase()):e})}function g(e){return s(e,function(e){return S.test(e)?"xn--"+h(e):e})}var y=("object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType,"object"==typeof r&&r);var b,_=2147483647,w=36,O=1,x=26,C=38,k=700,j=72,N=128,M="-",P=/^xn--/,S=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},F=w-O,D=Math.floor,A=String.fromCharCode;b={version:"1.4.1",ucs2:{decode:u,encode:c},decode:m,encode:h,toASCII:g,toUnicode:v},void 0!==(a=function(){return b}.call(t,n,t,e))&&(e.exports=a)}()}).call(t,n(74)(e),n(46))},6:function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(Array.isArray(e)?e:[e]).forEach(function(e){e&&e.locale&&(T.a.__addLocaleData(e),F.a.__addLocaleData(e))})}function a(e){for(var t=(e||"").split("-");t.length>0;){if(o(t.join("-")))return!0;t.pop()}return!1}function o(e){var t=e&&e.toLowerCase();return!(!T.a.__localeData__[t]||!F.a.__localeData__[t])}function i(e){return(""+e).replace(_e,function(e){return be[e]})}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.reduce(function(t,r){return e.hasOwnProperty(r)?t[r]=e[r]:n.hasOwnProperty(r)&&(t[r]=n[r]),t},{})}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.intl;q()(t,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}function u(e,t){if(e===t)return!0;if("object"!==(void 0===e?"undefined":W(e))||null===e||"object"!==(void 0===t?"undefined":W(t))||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),o=0;o<n.length;o++)if(!a(n[o])||e[n[o]]!==t[n[o]])return!1;return!0}function c(e,t,n){var r=e.props,a=e.state,o=e.context,i=void 0===o?{}:o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=i.intl,d=void 0===c?{}:c,f=s.intl,p=void 0===f?{}:f;return!u(t,r)||!u(n,a)||!(p===d||u(l(p,ye),l(d,ye)))}function d(e){return e.displayName||e.name||"Component"}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.intlPropName,r=void 0===n?"intl":n,a=t.withRef,o=void 0!==a&&a,i=function(t){function n(e,t){J(this,n);var r=Q(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return s(t),r}return Z(n,t),B(n,[{key:"getWrappedInstance",value:function(){return q()(o,"[React Intl] To access the wrapped instance, the `{withRef: true}` option must be set when calling: `injectIntl()`"),this.refs.wrappedInstance}},{key:"render",value:function(){return L.a.createElement(e,G({},this.props,V({},r,this.context.intl),{ref:o?"wrappedInstance":null}))}}]),n}(I.Component);return i.displayName="InjectIntl("+d(e)+")",i.contextTypes={intl:pe},i.WrappedComponent=e,i}function p(e){return e}function m(e){return T.a.prototype._resolveLocale(e)}function h(e){return T.a.prototype._findPluralRuleFunction(e)}function v(e){var t=F.a.thresholds;t.second=e.second,t.minute=e.minute,t.hour=e.hour,t.day=e.day,t.month=e.month}function g(e,t,n){var r=e&&e[t]&&e[t][n];if(r)return r}function y(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=e.locale,o=e.formats,i=r.format,s=new Date(n),u=i&&g(o,"date",i),c=l(r,Oe,u);try{return t.getDateTimeFormat(a,c).format(s)}catch(e){}return String(s)}function b(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=e.locale,o=e.formats,i=r.format,s=new Date(n),u=i&&g(o,"time",i),c=l(r,Oe,u);c.hour||c.minute||c.second||(c=G({},c,{hour:"numeric",minute:"numeric"}));try{return t.getDateTimeFormat(a,c).format(s)}catch(e){}return String(s)}function _(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=e.locale,o=e.formats,i=r.format,s=new Date(n),u=new Date(r.now),c=i&&g(o,"relative",i),d=l(r,Ce,c),f=G({},F.a.thresholds);v(je);try{return t.getRelativeFormat(a,d).format(s,{now:isFinite(u)?u:t.now()})}catch(e){}finally{v(f)}return String(s)}function w(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=e.locale,o=e.formats,i=r.format,s=i&&g(o,"number",i),u=l(r,xe,s);try{return t.getNumberFormat(a,u).format(n)}catch(e){}return String(n)}function O(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=e.locale,o=l(r,ke);try{return t.getPluralFormat(a,o).format(n)}catch(e){}return"other"}function x(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=e.locale,o=e.formats,i=e.messages,l=e.defaultLocale,s=e.defaultFormats,u=n.id,c=n.defaultMessage;q()(u,"[React Intl] An `id` must be provided to format a message.");var d=i&&i[u];if(!(Object.keys(r).length>0))return d||c||u;var f=void 0;if(d)try{f=t.getMessageFormat(d,a,o).format(r)}catch(e){}if(!f&&c)try{f=t.getMessageFormat(c,l,s).format(r)}catch(e){}return f||d||c||u}function C(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return x(e,t,n,Object.keys(r).reduce(function(e,t){var n=r[t];return e[t]="string"==typeof n?i(n):n,e},{}))}function k(e){var t=Math.abs(e);return t<Ae?"second":t<Ie?"minute":t<Le?"hour":"day"}function j(e){switch(e){case"second":return De;case"minute":return Ae;case"hour":return Ie;case"day":return Le;default:return Re}}function N(e,t){if(e===t)return!0;var n=new Date(e).getTime(),r=new Date(t).getTime();return isFinite(n)&&isFinite(r)&&n===r}n.d(t,"e",function(){return r}),n.d(t,"g",function(){return f}),n.d(t,"f",function(){return p}),n.d(t,"d",function(){return Te}),n.d(t,"a",function(){return Ee}),n.d(t,"c",function(){return Ue}),n.d(t,"b",function(){return ze});var M=n(81),P=n.n(M),S=n(54),T=n.n(S),E=n(62),F=n.n(E),D=n(5),A=n.n(D),I=n(0),L=n.n(I),R=n(16),q=n.n(R),U=n(82),H=n.n(U),z={locale:"en",pluralRuleFunction:function(e,t){var n=String(e).split("."),r=!n[1],a=Number(n[0])==e,o=a&&n[0].slice(-1),i=a&&n[0].slice(-2);return t?1==o&&11!=i?"one":2==o&&12!=i?"two":3==o&&13!=i?"few":"other":1==e&&r?"one":"other"},fields:{year:{displayName:"year",relative:{0:"this year",1:"next year","-1":"last year"},relativeTime:{future:{one:"in {0} year",other:"in {0} years"},past:{one:"{0} year ago",other:"{0} years ago"}}},month:{displayName:"month",relative:{0:"this month",1:"next month","-1":"last month"},relativeTime:{future:{one:"in {0} month",other:"in {0} months"},past:{one:"{0} month ago",other:"{0} months ago"}}},day:{displayName:"day",relative:{0:"today",1:"tomorrow","-1":"yesterday"},relativeTime:{future:{one:"in {0} day",other:"in {0} days"},past:{one:"{0} day ago",other:"{0} days ago"}}},hour:{displayName:"hour",relative:{0:"this hour"},relativeTime:{future:{one:"in {0} hour",other:"in {0} hours"},past:{one:"{0} hour ago",other:"{0} hours ago"}}},minute:{displayName:"minute",relative:{0:"this minute"},relativeTime:{future:{one:"in {0} minute",other:"in {0} minutes"},past:{one:"{0} minute ago",other:"{0} minutes ago"}}},second:{displayName:"second",relative:{0:"now"},relativeTime:{future:{one:"in {0} second",other:"in {0} seconds"},past:{one:"{0} second ago",other:"{0} seconds ago"}}}}},W="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},J=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},B=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),V=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},G=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z=function(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)},K=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Q=function(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},X=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},Y=A.a.bool,$=A.a.number,ee=A.a.string,te=A.a.func,ne=A.a.object,re=A.a.oneOf,ae=A.a.shape,oe=A.a.any,ie=A.a.oneOfType,le=re(["best fit","lookup"]),se=re(["narrow","short","long"]),ue=re(["numeric","2-digit"]),ce=te.isRequired,de={locale:ee,formats:ne,messages:ne,textComponent:oe,defaultLocale:ee,defaultFormats:ne},fe={formatDate:ce,formatTime:ce,formatRelative:ce,formatNumber:ce,formatPlural:ce,formatMessage:ce,formatHTMLMessage:ce},pe=ae(G({},de,fe,{formatters:ne,now:ce})),me=(ee.isRequired,ie([ee,ne]),{localeMatcher:le,formatMatcher:re(["basic","best fit"]),timeZone:ee,hour12:Y,weekday:se,era:se,year:ue,month:re(["numeric","2-digit","narrow","short","long"]),day:ue,hour:ue,minute:ue,second:ue,timeZoneName:re(["short","long"])}),he={localeMatcher:le,style:re(["decimal","currency","percent"]),currency:ee,currencyDisplay:re(["symbol","code","name"]),useGrouping:Y,minimumIntegerDigits:$,minimumFractionDigits:$,maximumFractionDigits:$,minimumSignificantDigits:$,maximumSignificantDigits:$},ve={style:re(["best fit","numeric"]),units:re(["second","minute","hour","day","month","year"])},ge={style:re(["cardinal","ordinal"])},ye=Object.keys(de),be={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},_e=/[&><"']/g,we=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};J(this,e);var r="ordinal"===n.style,a=h(m(t));this.format=function(e){return a(e,r)}},Oe=Object.keys(me),xe=Object.keys(he),Ce=Object.keys(ve),ke=Object.keys(ge),je={second:60,minute:60,hour:24,day:30,month:12},Ne=Object.freeze({formatDate:y,formatTime:b,formatRelative:_,formatNumber:w,formatPlural:O,formatMessage:x,formatHTMLMessage:C}),Me=Object.keys(de),Pe=Object.keys(fe),Se={formats:{},messages:{},textComponent:"span",defaultLocale:"en",defaultFormats:{}},Te=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};J(this,t);var r=Q(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));q()("undefined"!=typeof Intl,"[React Intl] The `Intl` APIs must be available in the runtime, and do not appear to be built-in. An `Intl` polyfill should be loaded.\nSee: http://formatjs.io/guides/runtime-environments/");var a=n.intl,o=void 0;o=isFinite(e.initialNow)?Number(e.initialNow):a?a.now():Date.now();var i=a||{},l=i.formatters,s=void 0===l?{getDateTimeFormat:H()(Intl.DateTimeFormat),getNumberFormat:H()(Intl.NumberFormat),getMessageFormat:H()(T.a),getRelativeFormat:H()(F.a),getPluralFormat:H()(we)}:l;return r.state=G({},s,{now:function(){return r._didDisplay?Date.now():o}}),r}return Z(t,e),B(t,[{key:"getConfig",value:function(){var e=this.context.intl,t=l(this.props,Me,e);for(var n in Se)void 0===t[n]&&(t[n]=Se[n]);if(!a(t.locale)){var r=t,o=(r.locale,r.defaultLocale),i=r.defaultFormats;t=G({},t,{locale:o,formats:i,messages:Se.messages})}return t}},{key:"getBoundFormatFns",value:function(e,t){return Pe.reduce(function(n,r){return n[r]=Ne[r].bind(null,e,t),n},{})}},{key:"getChildContext",value:function(){var e=this.getConfig(),t=this.getBoundFormatFns(e,this.state),n=this.state,r=n.now,a=K(n,["now"]);return{intl:G({},e,t,{formatters:a,now:r})}}},{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.apply(void 0,[this].concat(t))}},{key:"componentDidMount",value:function(){this._didDisplay=!0}},{key:"render",value:function(){return I.Children.only(this.props.children)}}]),t}(I.Component);Te.displayName="IntlProvider",Te.contextTypes={intl:pe},Te.childContextTypes={intl:pe.isRequired};var Ee=function(e){function t(e,n){J(this,t);var r=Q(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return s(n),r}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.apply(void 0,[this].concat(t))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatDate,n=e.textComponent,r=this.props,a=r.value,o=r.children,i=t(a,this.props);return"function"==typeof o?o(i):L.a.createElement(n,null,i)}}]),t}(I.Component);Ee.displayName="FormattedDate",Ee.contextTypes={intl:pe};var Fe=function(e){function t(e,n){J(this,t);var r=Q(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return s(n),r}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.apply(void 0,[this].concat(t))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatTime,n=e.textComponent,r=this.props,a=r.value,o=r.children,i=t(a,this.props);return"function"==typeof o?o(i):L.a.createElement(n,null,i)}}]),t}(I.Component);Fe.displayName="FormattedTime",Fe.contextTypes={intl:pe};var De=1e3,Ae=6e4,Ie=36e5,Le=864e5,Re=2147483647,qe=function(e){function t(e,n){J(this,t);var r=Q(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));s(n);var a=isFinite(e.initialNow)?Number(e.initialNow):n.intl.now();return r.state={now:a},r}return Z(t,e),B(t,[{key:"scheduleNextUpdate",value:function(e,t){var n=this;clearTimeout(this._timer);var r=e.value,a=e.units,o=e.updateInterval,i=new Date(r).getTime();if(o&&isFinite(i)){var l=i-t.now,s=j(a||k(l)),u=Math.abs(l%s),c=l<0?Math.max(o,s-u):Math.max(o,u);this._timer=setTimeout(function(){n.setState({now:n.context.intl.now()})},c)}}},{key:"componentDidMount",value:function(){this.scheduleNextUpdate(this.props,this.state)}},{key:"componentWillReceiveProps",value:function(e){N(e.value,this.props.value)||this.setState({now:this.context.intl.now()})}},{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.apply(void 0,[this].concat(t))}},{key:"componentWillUpdate",value:function(e,t){this.scheduleNextUpdate(e,t)}},{key:"componentWillUnmount",value:function(){clearTimeout(this._timer)}},{key:"render",value:function(){var e=this.context.intl,t=e.formatRelative,n=e.textComponent,r=this.props,a=r.value,o=r.children,i=t(a,G({},this.props,this.state));return"function"==typeof o?o(i):L.a.createElement(n,null,i)}}]),t}(I.Component);qe.displayName="FormattedRelative",qe.contextTypes={intl:pe},qe.defaultProps={updateInterval:1e4};var Ue=function(e){function t(e,n){J(this,t);var r=Q(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return s(n),r}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.apply(void 0,[this].concat(t))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatNumber,n=e.textComponent,r=this.props,a=r.value,o=r.children,i=t(a,this.props);return"function"==typeof o?o(i):L.a.createElement(n,null,i)}}]),t}(I.Component);Ue.displayName="FormattedNumber",Ue.contextTypes={intl:pe};var He=function(e){function t(e,n){J(this,t);var r=Q(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return s(n),r}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.apply(void 0,[this].concat(t))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatPlural,n=e.textComponent,r=this.props,a=r.value,o=r.other,i=r.children,l=t(a,this.props),s=this.props[l]||o;return"function"==typeof i?i(s):L.a.createElement(n,null,s)}}]),t}(I.Component);He.displayName="FormattedPlural",He.contextTypes={intl:pe},He.defaultProps={style:"cardinal"};var ze=function(e){function t(e,n){J(this,t);var r=Q(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return s(n),r}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(e){var t=this.props.values;if(!u(e.values,t))return!0;for(var n=G({},e,{values:t}),r=arguments.length,a=Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];return c.apply(void 0,[this,n].concat(a))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatMessage,n=e.textComponent,r=this.props,a=r.id,o=r.description,i=r.defaultMessage,l=r.values,s=r.tagName,u=void 0===s?n:s,c=r.children,d=void 0,f=void 0,p=void 0;if(l&&Object.keys(l).length>0){var m=Math.floor(1099511627776*Math.random()).toString(16),h=function(){var e=0;return function(){return"ELEMENT-"+m+"-"+(e+=1)}}();d="@__"+m+"__@",f={},p={},Object.keys(l).forEach(function(e){var t=l[e];if(Object(I.isValidElement)(t)){var n=h();f[e]=d+n+d,p[n]=t}else f[e]=t})}var v={id:a,description:o,defaultMessage:i},g=t(v,f||l),y=void 0;return y=p&&Object.keys(p).length>0?g.split(d).filter(function(e){return!!e}).map(function(e){return p[e]||e}):[g],"function"==typeof c?c.apply(void 0,X(y)):I.createElement.apply(void 0,[u,null].concat(X(y)))}}]),t}(I.Component);ze.displayName="FormattedMessage",ze.contextTypes={intl:pe},ze.defaultProps={values:{}};var We=function(e){function t(e,n){J(this,t);var r=Q(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return s(n),r}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(e){var t=this.props.values;if(!u(e.values,t))return!0;for(var n=G({},e,{values:t}),r=arguments.length,a=Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];return c.apply(void 0,[this,n].concat(a))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatHTMLMessage,n=e.textComponent,r=this.props,a=r.id,o=r.description,i=r.defaultMessage,l=r.values,s=r.tagName,u=void 0===s?n:s,c=r.children,d={id:a,description:o,defaultMessage:i},f=t(d,l);if("function"==typeof c)return c(f);var p={__html:f};return L.a.createElement(u,{dangerouslySetInnerHTML:p})}}]),t}(I.Component);We.displayName="FormattedHTMLMessage",We.contextTypes={intl:pe},We.defaultProps={values:{}},r(z),r(P.a)},690:function(e,t,n){"use strict";function r(){var e=n(99),t=e.length,r=n(62).default,a=n(144),i=a.delegate,s=n(72).default,c=n(7),d=c.getLocale,f=d(),p=f.localeData,m=n(691).default,h=n(692).default,v=n(0),g=n(20);p.forEach(r.__addLocaleData),Object(u.default)(function(){var e=document.documentElement.lang,t=new Intl.DateTimeFormat(e,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"}),a=new r(e);[].forEach.call(document.querySelectorAll(".emojify"),function(e){e.innerHTML=s(e.innerHTML)}),[].forEach.call(document.querySelectorAll("time.formatted"),function(e){var n=new Date(e.getAttribute("datetime")),r=t.format(n);e.title=r,e.textContent=r}),[].forEach.call(document.querySelectorAll("time.time-ago"),function(e){var n=new Date(e.getAttribute("datetime"));e.title=t.format(n),e.textContent=a.format(n)}),[].forEach.call(document.querySelectorAll(".logo-button"),function(e){e.addEventListener("click",function(e){e.preventDefault(),window.open(e.target.href,"mastodon-intent","width=400,height=400,resizable=no,menubar=no,status=no,scrollbars=yes")})}),[].forEach.call(document.querySelectorAll('[data-component="Video"]'),function(t){var n=JSON.parse(t.getAttribute("data-props"));g.render(v.createElement(m,l()({locale:e},n)),t)}),[].forEach.call(document.querySelectorAll('[data-component="Card"]'),function(t){var n=JSON.parse(t.getAttribute("data-props"));g.render(v.createElement(h,l()({locale:e},n)),t)});var i=document.querySelectorAll('[data-component="MediaGallery"]');if(i.length>0){var u=n(693).default,c=document.createElement("div");g.render(o()(u,{locale:e,galleries:i}),c),document.body.appendChild(c)}}),i(document,".webapp-btn","click",function(e){var t=e.target;return 0!==e.button||(window.location.href=t.href,!1)}),i(document,".status__content__spoiler-link","click",function(e){var t=e.target,n=t.parentNode.parentNode.querySelector(".e-content");return"block"===n.style.display?(n.style.display="none",t.parentNode.style.marginBottom=0):(n.style.display="block",t.parentNode.style.marginBottom=null),!1}),i(document,".account_display_name","input",function(e){var n=e.target,r=document.querySelector(".name-counter");r&&(r.textContent=30-t(n.value))}),i(document,".account_note","input",function(e){var n=e.target,r=document.querySelector(".note-counter");r&&(r.textContent=160-t(n.value))}),i(document,"#account_avatar","change",function(e){var t=e.target,n=document.querySelector(".card.compact .avatar img"),r=t.files||[],a=r[0],o=a?URL.createObjectURL(a):n.dataset.originalSrc;n.src=o}),i(document,"#account_header","change",function(e){var t=e.target,n=document.querySelector(".card.compact"),r=t.files||[],a=r[0],o=a?URL.createObjectURL(a):n.dataset.originalSrc;n.style.backgroundImage="url("+o+")"})}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),o=n.n(a),i=n(29),l=n.n(i),s=n(76),u=n(90);window.addEventListener("message",function(e){var t=e.data||{};window.parent&&"setHeight"===t.type&&Object(u.default)(function(){window.parent.postMessage({type:"setHeight",id:t.id,height:document.getElementsByTagName("html")[0].scrollHeight},"*")})}),Object(s.a)().then(r).catch(function(e){console.error(e)})},691:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return w});var r=n(2),a=n.n(r),o=n(31),i=n.n(o),l=n(1),s=n.n(l),u=n(3),c=n.n(u),d=n(4),f=n.n(d),p=n(0),m=n.n(p),h=n(6),v=n(7),g=n(75),y=Object(v.getLocale)(),b=y.localeData,_=y.messages;Object(h.e)(b);var w=function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.locale,n=i()(e,["locale"]);return a()(h.d,{locale:t,messages:_},void 0,m.a.createElement(g.default,n))},t}(m.a.PureComponent)},692:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return g});var r=n(29),a=n.n(r),o=n(31),i=n.n(o),l=n(1),s=n.n(l),u=n(3),c=n.n(u),d=n(4),f=n.n(d),p=n(0),m=n.n(p),h=n(332),v=n(8),g=(n.n(v),function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.card,n=i()(e,["card"]);return m.a.createElement(h.a,a()({card:Object(v.fromJS)(t)},n))},t}(m.a.PureComponent))},693:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return M});var r=n(29),a=n.n(r),o=n(31),i=n.n(o),l=n(2),s=n.n(l),u=n(1),c=n.n(u),d=n(3),f=n.n(d),p=n(4),m=n.n(p),h=n(0),v=n.n(h),g=n(20),y=n.n(g),b=n(6),_=n(7),w=n(154),O=n(247),x=n(248),C=n(8),k=(n.n(C),Object(_.getLocale)()),j=k.localeData,N=k.messages;Object(b.e)(j);var M=function(e){function t(){var n,r,a;c()(this,t);for(var o=arguments.length,i=Array(o),l=0;l<o;l++)i[l]=arguments[l];return n=r=f()(this,e.call.apply(e,[this].concat(i))),r.state={media:null,index:null},r.handleOpenMedia=function(e,t){document.body.classList.add("media-gallery-standalone__body"),r.setState({media:e,index:t})},r.handleCloseMedia=function(){document.body.classList.remove("media-gallery-standalone__body"),r.setState({media:null,index:null})},a=n,f()(r,a)}return m()(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.locale,r=t.galleries;return s()(b.d,{locale:n,messages:N},void 0,s()(v.a.Fragment,{},void 0,[].map.call(r,function(t){var n=JSON.parse(t.getAttribute("data-props")),r=n.media,o=i()(n,["media"]);return y.a.createPortal(v.a.createElement(w.default,a()({},o,{media:Object(C.fromJS)(r),onOpenMedia:e.handleOpenMedia})),t)}),s()(O.a,{onClose:this.handleCloseMedia},void 0,null===this.state.media||null===this.state.index?null:s()(x.a,{media:this.state.media,index:this.state.index,onClose:this.handleCloseMedia}))))},t}(v.a.PureComponent)}},[690]);
//# sourceMappingURL=public.js.map