mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-11 21:44:57 +00:00
2 lines
32 KiB
JavaScript
2 lines
32 KiB
JavaScript
webpackJsonp([30,26],{159:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return P});var r,o,a,i,l,u=n(2),s=n.n(u),c=n(1),d=n.n(c),f=n(3),p=n.n(f),h=n(4),m=n.n(h),v=n(0),g=n.n(v),y=n(5),b=n.n(y),_=n(8),w=(n.n(_),n(19)),O=n(6),x=n(33),k=n(10),j=n.n(k),C=n(18),N=Object(O.f)({toggle_visible:{id:"media_gallery.toggle_visible",defaultMessage:"Toggle visibility"}}),M=(o=r=function(e){function t(){var n,r,o;d()(this,t);for(var a=arguments.length,i=Array(a),l=0;l<a;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,o=t.onClick;r.context.router&&0===e.button&&(e.preventDefault(),o(n)),e.stopPropagation()},o=n,p()(r,o)}return m()(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,o=e.standalone,a=50,i=100,l="auto",u="auto",c="auto",d="auto";1===r&&(a=100),(4===r||3===r&&n>0)&&(i=50),2===r?0===n?d="2px":u="2px":3===r?(0===n?d="2px":n>0&&(u="2px"),1===n?c="2px":n>1&&(l="2px")):4===r&&(0!==n&&2!==n||(d="2px"),1!==n&&3!==n||(u="2px"),n<2?c="2px":l="2px");var f="";if("image"===t.get("type")){var p=t.get("preview_url"),h=t.getIn(["meta","small","width"]),m=t.get("url"),v=t.getIn(["meta","original","width"]),g="number"==typeof v&&"number"==typeof h,y=g?m+" "+v+"w, "+p+" "+h+"w":null,b=g?"(min-width: 1025px) "+a/100*320+"px, "+a+"vw":null;f=s()("a",{className:"media-gallery__item-thumbnail",href:t.get("remote_url")||m,onClick:this.handleClick,target:"_blank"},void 0,s()("img",{src:p,srcSet:y,sizes:b,alt:t.get("description"),title:t.get("description")}))}else if("gifv"===t.get("type")){var _=!Object(x.a)()&&C.a;f=s()("div",{className:j()("media-gallery__gifv",{autoplay:_})},void 0,s()("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:_,loop:!0,muted:!0}),s()("span",{className:"media-gallery__gifv__label"},void 0,"GIF"))}return s()("div",{className:j()("media-gallery__item",{standalone:o}),style:{left:u,top:l,right:d,bottom:c,width:a+"%",height:i+"%"}},t.get("id"),f)},t}(g.a.PureComponent),r.contextTypes={router:b.a.object},r.defaultProps={standalone:!1,index:0,size:1},o),P=Object(O.g)((l=i=function(e){function t(){var n,r,o;d()(this,t);for(var a=arguments.length,i=Array(a),l=0;l<a;l++)i[l]=arguments[l];return n=r=p()(this,e.call.apply(e,[this].concat(i))),r.state={visible:!r.props.sensitive},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.isStandaloneEligible()&&r.setState({width:e.offsetWidth})},o=n,p()(r,o)}return m()(t,e),t.prototype.componentWillReceiveProps=function(e){Object(_.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,o=t.sensitive,a=t.height,i=this.state,l=i.width,u=i.visible,c=void 0,d={};if(this.isStandaloneEligible()?d.height=!u&&l?l/this.props.media.getIn([0,"meta","small","aspect"]):"":d.height=a,u){var f=n.take(4).size;c=this.isStandaloneEligible()?s()(M,{standalone:!0,onClick:this.handleClick,attachment:n.get(0)}):n.take(4).map(function(t,n){return s()(M,{onClick:e.handleClick,attachment:t,index:n,size:f},t.get("id"))})}else{var p=void 0;p=o?s()(O.b,{id:"status.sensitive_warning",defaultMessage:"Sensitive content"}):s()(O.b,{id:"status.media_hidden",defaultMessage:"Media hidden"}),c=g.a.createElement("button",{className:"media-spoiler",onClick:this.handleOpen,style:d,ref:this.handleRef},s()("span",{className:"media-spoiler__warning"},void 0,p),s()("span",{className:"media-spoiler__trigger"},void 0,s()(O.b,{id:"status.sensitive_toggle",defaultMessage:"Click to view"})))}return s()("div",{className:"media-gallery",style:d},void 0,s()("div",{className:j()("spoiler-button",{"spoiler-button--visible":u})},void 0,s()(w.a,{title:r.formatMessage(N.toggle_visible),icon:u?"eye":"eye-slash",overlay:!0,onClick:this.handleOpen})),c)},t}(g.a.PureComponent),i.defaultProps={standalone:!1},a=l))||a},316:function(e,t,n){"use strict";n.d(t,"a",function(){return w});var r,o,a=n(2),i=n.n(a),l=n(1),u=n.n(l),s=n(3),c=n.n(s),d=n(4),f=n.n(d),p=n(0),h=n.n(p),m=n(317),v=n.n(m),g=n(10),y=n.n(g),b=function(e){return e.split(".").map(function(e){return 0===e.indexOf("xn--")?v.a.decode(e.slice("xn--".length)):e}).join(".")},_=function(e){var t=document.createElement("a");return t.href=e,t.hostname},w=(o=r=function(e){function t(){var n,r,o;u()(this,t);for(var a=arguments.length,i=Array(a),l=0;l<a;l++)i[l]=arguments[l];return n=r=c()(this,e.call.apply(e,[this].concat(i))),r.state={width:0},r.setRef=function(e){e&&r.setState({width:e.offsetWidth})},o=n,c()(r,o)}return f()(t,e),t.prototype.renderLink=function(){var e=this.props,t=e.card,n=e.maxDescription,r="",o=t.get("provider_name");t.get("image")&&(r=i()("div",{className:"status-card__image"},void 0,i()("img",{src:t.get("image"),alt:t.get("title"),className:"status-card__image-image",width:t.get("width"),height:t.get("height")}))),o.length<1&&(o=b(_(t.get("url"))));var a=y()("status-card",{horizontal:t.get("width")>t.get("height")});return i()("a",{href:t.get("url"),className:a,target:"_blank",rel:"noopener"},void 0,r,i()("div",{className:"status-card__content"},void 0,i()("strong",{className:"status-card__title",title:t.get("title")},void 0,t.get("title")),i()("p",{className:"status-card__description"},void 0,(t.get("description")||"").substring(0,n)),i()("span",{className:"status-card__host"},void 0,o)))},t.prototype.renderPhoto=function(){var e=this.props.card;return i()("a",{href:e.get("url"),className:"status-card-photo",target:"_blank",rel:"noopener"},void 0,i()("img",{src:e.get("url"),alt:e.get("title"),width:e.get("width"),height:e.get("height")}))},t.prototype.renderVideo=function(){var e=this.props.card,t={__html:e.get("html")},n=this.state.width,r=e.get("width")/e.get("height"),o=e.get("width")>e.get("height")?n/r:n*r;return h.a.createElement("div",{ref:this.setRef,className:"status-card-video",dangerouslySetInnerHTML:t,style:{height:o}})},t.prototype.render=function(){var e=this.props.card;if(null===e)return null;switch(e.get("type")){case"link":return this.renderLink();case"photo":return this.renderPhoto();case"video":return this.renderVideo();case"rich":default:return null}},t}(h.a.PureComponent),r.defaultProps={maxDescription:50},o)},317:function(e,t,n){(function(e,r){var o;!function(a){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 u(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(S,"."),r+l(e.split("."),t).join(".")}function s(e){for(var t,n,r=[],o=0,a=e.length;o<a;)t=e.charCodeAt(o++),t>=55296&&t<=56319&&o<a?(n=e.charCodeAt(o++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--)):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/j):e>>1,e+=D(e/t);e>F*x>>1;r+=w)e=D(e/F);return D(r+(F+1)*e/(e+k))}function h(e){var t,n,r,o,a,l,u,s,f,h,m=[],v=e.length,g=0,y=N,b=C;for(n=e.lastIndexOf(M),n<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&i("not-basic"),m.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<v;){for(a=g,l=1,u=w;o>=v&&i("invalid-input"),s=d(e.charCodeAt(o++)),(s>=w||s>D((_-g)/l))&&i("overflow"),g+=s*l,f=u<=b?O:u>=b+x?x:u-b,!(s<f);u+=w)h=w-f,l>D(_/h)&&i("overflow"),l*=h;t=m.length+1,b=p(g-a,t,0==a),D(g/t)>_-y&&i("overflow"),y+=D(g/t),g%=t,m.splice(g++,0,y)}return c(m)}function m(e){var t,n,r,o,a,l,u,c,d,h,m,v,g,y,b,k=[];for(e=s(e),v=e.length,t=N,n=0,a=C,l=0;l<v;++l)(m=e[l])<128&&k.push(A(m));for(r=o=k.length,o&&k.push(M);r<v;){for(u=_,l=0;l<v;++l)(m=e[l])>=t&&m<u&&(u=m);for(g=r+1,u-t>D((_-n)/g)&&i("overflow"),n+=(u-t)*g,t=u,l=0;l<v;++l)if(m=e[l],m<t&&++n>_&&i("overflow"),m==t){for(c=n,d=w;h=d<=a?O:d>=a+x?x:d-a,!(c<h);d+=w)b=c-h,y=w-h,k.push(A(f(h+b%y,0))),c=D(b/y);k.push(A(f(c,0))),a=p(n,g,r==o),n=0,++r}++n,++t}return k.join("")}function v(e){return u(e,function(e){return P.test(e)?h(e.slice(4).toLowerCase()):e})}function g(e){return u(e,function(e){return T.test(e)?"xn--"+m(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,k=38,j=700,C=72,N=128,M="-",P=/^xn--/,T=/[^\x20-\x7E]/,S=/[\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:s,encode:c},decode:h,encode:m,toASCII:g,toUnicode:v},void 0!==(o=function(){return b}.call(t,n,t,e))&&(e.exports=o)}()}).call(t,n(71)(e),n(44))},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&&(S.a.__addLocaleData(e),F.a.__addLocaleData(e))})}function o(e){for(var t=(e||"").split("-");t.length>0;){if(a(t.join("-")))return!0;t.pop()}return!1}function a(e){var t=e&&e.toLowerCase();return!(!S.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 u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.intl;U()(t,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}function s(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 o=Object.prototype.hasOwnProperty.bind(t),a=0;a<n.length;a++)if(!o(n[a])||e[n[a]]!==t[n[a]])return!1;return!0}function c(e,t,n){var r=e.props,o=e.state,a=e.context,i=void 0===a?{}:a,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=i.intl,d=void 0===c?{}:c,f=u.intl,p=void 0===f?{}:f;return!s(t,r)||!s(n,o)||!(p===d||s(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,o=t.withRef,a=void 0!==o&&o,i=function(t){function n(e,t){J(this,n);var r=Q(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return u(t),r}return Z(n,t),B(n,[{key:"getWrappedInstance",value:function(){return U()(a,"[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:a?"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 h(e){return S.a.prototype._resolveLocale(e)}function m(e){return S.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]:{},o=e.locale,a=e.formats,i=r.format,u=new Date(n),s=i&&g(a,"date",i),c=l(r,Oe,s);try{return t.getDateTimeFormat(o,c).format(u)}catch(e){}return String(u)}function b(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e.locale,a=e.formats,i=r.format,u=new Date(n),s=i&&g(a,"time",i),c=l(r,Oe,s);c.hour||c.minute||c.second||(c=G({},c,{hour:"numeric",minute:"numeric"}));try{return t.getDateTimeFormat(o,c).format(u)}catch(e){}return String(u)}function _(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e.locale,a=e.formats,i=r.format,u=new Date(n),s=new Date(r.now),c=i&&g(a,"relative",i),d=l(r,ke,c),f=G({},F.a.thresholds);v(Ce);try{return t.getRelativeFormat(o,d).format(u,{now:isFinite(s)?s:t.now()})}catch(e){}finally{v(f)}return String(u)}function w(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e.locale,a=e.formats,i=r.format,u=i&&g(a,"number",i),s=l(r,xe,u);try{return t.getNumberFormat(o,s).format(n)}catch(e){}return String(n)}function O(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e.locale,a=l(r,je);try{return t.getPluralFormat(o,a).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]:{},o=e.locale,a=e.formats,i=e.messages,l=e.defaultLocale,u=e.defaultFormats,s=n.id,c=n.defaultMessage;U()(s,"[React Intl] An `id` must be provided to format a message.");var d=i&&i[s];if(!(Object.keys(r).length>0))return d||c||s;var f=void 0;if(d)try{f=t.getMessageFormat(d,o,a).format(r)}catch(e){}if(!f&&c)try{f=t.getMessageFormat(c,l,u).format(r)}catch(e){}return f||d||c||s}function k(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 j(e){var t=Math.abs(e);return t<Ae?"second":t<Ie?"minute":t<Le?"hour":"day"}function C(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 Se}),n.d(t,"a",function(){return Ee}),n.d(t,"c",function(){return qe}),n.d(t,"b",function(){return ze});var M=n(81),P=n.n(M),T=n(53),S=n.n(T),E=n(64),F=n.n(E),D=n(5),A=n.n(D),I=n(0),L=n.n(I),R=n(13),U=n.n(R),q=n(82),H=n.n(q),z={locale:"en",pluralRuleFunction:function(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1),i=o&&n[0].slice(-2);return t?1==a&&11!=i?"one":2==a&&12!=i?"two":3==a&&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,oe=A.a.shape,ae=A.a.any,ie=A.a.oneOfType,le=re(["best fit","lookup"]),ue=re(["narrow","short","long"]),se=re(["numeric","2-digit"]),ce=te.isRequired,de={locale:ee,formats:ne,messages:ne,textComponent:ae,defaultLocale:ee,defaultFormats:ne},fe={formatDate:ce,formatTime:ce,formatRelative:ce,formatNumber:ce,formatPlural:ce,formatMessage:ce,formatHTMLMessage:ce},pe=oe(G({},de,fe,{formatters:ne,now:ce})),he=(ee.isRequired,ie([ee,ne]),{localeMatcher:le,formatMatcher:re(["basic","best fit"]),timeZone:ee,hour12:Y,weekday:ue,era:ue,year:se,month:re(["numeric","2-digit","narrow","short","long"]),day:se,hour:se,minute:se,second:se,timeZoneName:re(["short","long"])}),me={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={"&":"&",">":">","<":"<",'"':""","'":"'"},_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,o=m(h(t));this.format=function(e){return o(e,r)}},Oe=Object.keys(he),xe=Object.keys(me),ke=Object.keys(ve),je=Object.keys(ge),Ce={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:k}),Me=Object.keys(de),Pe=Object.keys(fe),Te={formats:{},messages:{},textComponent:"span",defaultLocale:"en",defaultFormats:{}},Se=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));U()("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 o=n.intl,a=void 0;a=isFinite(e.initialNow)?Number(e.initialNow):o?o.now():Date.now();var i=o||{},l=i.formatters,u=void 0===l?{getDateTimeFormat:H()(Intl.DateTimeFormat),getNumberFormat:H()(Intl.NumberFormat),getMessageFormat:H()(S.a),getRelativeFormat:H()(F.a),getPluralFormat:H()(we)}:l;return r.state=G({},u,{now:function(){return r._didDisplay?Date.now():a}}),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 Te)void 0===t[n]&&(t[n]=Te[n]);if(!o(t.locale)){var r=t,a=(r.locale,r.defaultLocale),i=r.defaultFormats;t=G({},t,{locale:a,formats:i,messages:Te.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,o=K(n,["now"]);return{intl:G({},e,t,{formatters:o,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);Se.displayName="IntlProvider",Se.contextTypes={intl:pe},Se.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 u(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,o=r.value,a=r.children,i=t(o,this.props);return"function"==typeof a?a(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 u(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,o=r.value,a=r.children,i=t(o,this.props);return"function"==typeof a?a(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,Ue=function(e){function t(e,n){J(this,t);var r=Q(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));u(n);var o=isFinite(e.initialNow)?Number(e.initialNow):n.intl.now();return r.state={now:o},r}return Z(t,e),B(t,[{key:"scheduleNextUpdate",value:function(e,t){var n=this;clearTimeout(this._timer);var r=e.value,o=e.units,a=e.updateInterval,i=new Date(r).getTime();if(a&&isFinite(i)){var l=i-t.now,u=C(o||j(l)),s=Math.abs(l%u),c=l<0?Math.max(a,u-s):Math.max(a,s);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,o=r.value,a=r.children,i=t(o,G({},this.props,this.state));return"function"==typeof a?a(i):L.a.createElement(n,null,i)}}]),t}(I.Component);Ue.displayName="FormattedRelative",Ue.contextTypes={intl:pe},Ue.defaultProps={updateInterval:1e4};var qe=function(e){function t(e,n){J(this,t);var r=Q(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return u(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,o=r.value,a=r.children,i=t(o,this.props);return"function"==typeof a?a(i):L.a.createElement(n,null,i)}}]),t}(I.Component);qe.displayName="FormattedNumber",qe.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 u(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,o=r.value,a=r.other,i=r.children,l=t(o,this.props),u=this.props[l]||a;return"function"==typeof i?i(u):L.a.createElement(n,null,u)}}]),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 u(n),r}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(e){var t=this.props.values;if(!s(e.values,t))return!0;for(var n=G({},e,{values:t}),r=arguments.length,o=Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return c.apply(void 0,[this,n].concat(o))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatMessage,n=e.textComponent,r=this.props,o=r.id,a=r.description,i=r.defaultMessage,l=r.values,u=r.tagName,s=void 0===u?n:u,c=r.children,d=void 0,f=void 0,p=void 0;if(l&&Object.keys(l).length>0){var h=Math.floor(1099511627776*Math.random()).toString(16),m=function(){var e=0;return function(){return"ELEMENT-"+h+"-"+(e+=1)}}();d="@__"+h+"__@",f={},p={},Object.keys(l).forEach(function(e){var t=l[e];if(Object(I.isValidElement)(t)){var n=m();f[e]=d+n+d,p[n]=t}else f[e]=t})}var v={id:o,description:a,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,[s,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 u(n),r}return Z(t,e),B(t,[{key:"shouldComponentUpdate",value:function(e){var t=this.props.values;if(!s(e.values,t))return!0;for(var n=G({},e,{values:t}),r=arguments.length,o=Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return c.apply(void 0,[this,n].concat(o))}},{key:"render",value:function(){var e=this.context.intl,t=e.formatHTMLMessage,n=e.textComponent,r=this.props,o=r.id,a=r.description,i=r.defaultMessage,l=r.values,u=r.tagName,s=void 0===u?n:u,c=r.children,d={id:o,description:a,defaultMessage:i},f=t(d,l);if("function"==typeof c)return c(f);var p={__html:f};return L.a.createElement(s,{dangerouslySetInnerHTML:p})}}]),t}(I.Component);We.displayName="FormattedHTMLMessage",We.contextTypes={intl:pe},We.defaultProps={values:{}},r(z),r(P.a)},652:function(e,t,n){"use strict";function r(){var e=n(100),t=e.length,r=n(64).default,o=n(146),i=o.delegate,u=n(60).default,s=n(7),c=s.getLocale,d=c(),f=d.localeData,p=n(653).default,h=n(654).default,m=n(655).default,v=n(0),g=n(21);f.forEach(r.__addLocaleData),Object(l.default)(function(){var e=document.documentElement.lang,t=new Intl.DateTimeFormat(e,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"}),n=new r(e);[].forEach.call(document.querySelectorAll(".emojify"),function(e){e.innerHTML=u(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 r=new Date(e.getAttribute("datetime"));e.title=t.format(r),e.textContent=n.format(r)}),[].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(p,a()({locale:e},n)),t)}),[].forEach.call(document.querySelectorAll('[data-component="MediaGallery"]'),function(t){var n=JSON.parse(t.getAttribute("data-props"));g.render(v.createElement(h,a()({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(m,a()({locale:e},n)),t)})}),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||[],o=r[0],a=o?URL.createObjectURL(o):n.dataset.originalSrc;n.src=a}),i(document,"#account_header","change",function(e){var t=e.target,n=document.querySelector(".card.compact"),r=t.files||[],o=r[0],a=o?URL.createObjectURL(o):n.dataset.originalSrc;n.style.backgroundImage="url("+a+")"})}Object.defineProperty(t,"__esModule",{value:!0});var o=n(28),a=n.n(o),i=n(75),l=n(90);window.addEventListener("message",function(e){var t=e.data||{};window.parent&&"setHeight"===t.type&&Object(l.default)(function(){window.parent.postMessage({type:"setHeight",id:t.id,height:document.getElementsByTagName("html")[0].scrollHeight},"*")})}),Object(i.a)().then(r).catch(function(e){console.error(e)})},653:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return w});var r=n(2),o=n.n(r),a=n(29),i=n.n(a),l=n(1),u=n.n(l),s=n(3),c=n.n(s),d=n(4),f=n.n(d),p=n(0),h=n.n(p),m=n(6),v=n(7),g=n(108),y=Object(v.getLocale)(),b=y.localeData,_=y.messages;Object(m.e)(b);var w=function(e){function t(){return u()(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 o()(m.d,{locale:t,messages:_},void 0,h.a.createElement(g.default,n))},t}(h.a.PureComponent)},654:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return k});var r=n(28),o=n.n(r),a=n(2),i=n.n(a),l=n(29),u=n.n(l),s=n(1),c=n.n(s),d=n(3),f=n.n(d),p=n(4),h=n.n(p),m=n(0),v=n.n(m),g=n(6),y=n(7),b=n(159),_=n(8),w=(n.n(_),Object(y.getLocale)()),O=w.localeData,x=w.messages;Object(g.e)(O);var k=function(e){function t(){var n,r,o;c()(this,t);for(var a=arguments.length,i=Array(a),l=0;l<a;l++)i[l]=arguments[l];return n=r=f()(this,e.call.apply(e,[this].concat(i))),r.handleOpenMedia=function(){},o=n,f()(r,o)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.locale,n=e.media,r=u()(e,["locale","media"]);return i()(g.d,{locale:t,messages:x},void 0,v.a.createElement(b.default,o()({},r,{media:Object(_.fromJS)(n),onOpenMedia:this.handleOpenMedia})))},t}(v.a.PureComponent)},655:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return g});var r=n(28),o=n.n(r),a=n(29),i=n.n(a),l=n(1),u=n.n(l),s=n(3),c=n.n(s),d=n(4),f=n.n(d),p=n(0),h=n.n(p),m=n(316),v=n(8),g=(n.n(v),function(e){function t(){return u()(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 h.a.createElement(m.a,o()({card:Object(v.fromJS)(t)},n))},t}(h.a.PureComponent))}},[652]);
|
|
//# sourceMappingURL=public-88b87539fc95f07f2721.js.map
|