1 line
19 KiB
JavaScript
1 line
19 KiB
JavaScript
(this.webpackJsonp=this.webpackJsonp||[]).push([[15],{"/ezw":function(t,e,n){"use strict";n.r(e);var o=n("q1tI"),r=n("TSYQ"),i=n.n(r);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=y(t);if(e){var r=y(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return h(this,n)}}function h(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(h,t);var e,n,r,c=f(h);function h(){return l(this,h),c.apply(this,arguments)}return e=h,(n=[{key:"render",value:function(){var t,e,n=this.props,r=n.prefixCls,c=n.className,l=n.style,a=n.size,p=n.shape,f=i()((u(t={},"".concat(r,"-lg"),"large"===a),u(t,"".concat(r,"-sm"),"small"===a),t)),h=i()((u(e={},"".concat(r,"-circle"),"circle"===p),u(e,"".concat(r,"-square"),"square"===p),e)),y="number"==typeof a?{width:a,height:a,lineHeight:"".concat(a,"px")}:{};return o.createElement("span",{className:i()(r,c,f,h),style:s(s({},y),l)})}}])&&a(e.prototype,n),r&&a(e,r),h}(o.Component);d.defaultProps={size:"large"};var b=d;function g(){return(g=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}var v=function(t){var e=t.prefixCls,n=t.className,r=t.width,c=t.style;return o.createElement("h3",{className:i()(e,n),style:g({width:r},c)})};function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function S(t){return function(t){if(Array.isArray(t))return w(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return w(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function P(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=k(t);if(e){var r=k(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return j(this,n)}}function j(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function k(t){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var R=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}(s,t);var e,n,r,c=P(s);function s(){return O(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"getWidth",value:function(t){var e=this.props,n=e.width,o=e.rows,r=void 0===o?2:o;return Array.isArray(n)?n[t]:r-1===t?n:void 0}},{key:"render",value:function(){var t=this,e=this.props,n=e.prefixCls,r=e.className,c=e.style,s=e.rows,u=S(Array(s)).map((function(e,n){return o.createElement("li",{key:n,style:{width:t.getWidth(n)}})}));return o.createElement("ul",{className:i()(n,r),style:c},u)}}])&&A(e.prototype,n),r&&A(e,r),s}(o.Component),_=n("H84U");function E(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function x(){return(x=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function T(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function D(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function I(t,e){return(I=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function N(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=M(t);if(e){var r=M(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return W(this,n)}}function W(t,e){return!e||"object"!==L(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function M(t){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function L(t){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function H(t){return t&&"object"===L(t)?t:{}}function J(t,e){return t&&!e?{shape:"square"}:{shape:"circle"}}function q(t,e){return!t&&e?{width:"38%"}:t&&e?{width:"50%"}:{}}function z(t,e){var n={};return t&&e||(n.width="61%"),n.rows=!t&&e?3:2,n}var U=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&I(t,e)}(s,t);var e,n,r,c=N(s);function s(){var t;return T(this,s),(t=c.apply(this,arguments)).renderSkeleton=function(e){var n=e.getPrefixCls,r=t.props,c=r.prefixCls,s=r.loading,u=r.className,l=r.children,a=r.avatar,p=r.title,f=r.paragraph,h=r.active,y=n("skeleton",c);if(s||!("loading"in t.props)){var d,g,m,S=!!a,w=!!p,O=!!f;if(S){var A=x(x({prefixCls:"".concat(y,"-avatar")},J(w,O)),H(a));g=o.createElement("div",{className:"".concat(y,"-header")},o.createElement(b,A))}if(w||O){var C,P;if(w){var j=x(x({prefixCls:"".concat(y,"-title")},q(S,O)),H(p));C=o.createElement(v,j)}if(O){var k=x(x({prefixCls:"".concat(y,"-paragraph")},z(S,w)),H(f));P=o.createElement(R,k)}m=o.createElement("div",{className:"".concat(y,"-content")},C,P)}var _=i()(y,u,(E(d={},"".concat(y,"-with-avatar"),S),E(d,"".concat(y,"-active"),h),d));return o.createElement("div",{className:_},g,m)}return l},t}return e=s,(n=[{key:"render",value:function(){return o.createElement(_.a,null,this.renderSkeleton)}}])&&D(e.prototype,n),r&&D(e,r),s}(o.Component);U.defaultProps={avatar:!1,title:!0,paragraph:!0};e.default=U},"9e53":function(t,e,n){var o,r;(function(){(function(){(function(){var t=[].slice;this.ActionCable={INTERNAL:{message_types:{welcome:"welcome",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]},WebSocket:window.WebSocket,logger:window.console,createConsumer:function(t){var e;return null==t&&(t=null!=(e=this.getConfig("url"))?e:this.INTERNAL.default_mount_path),new i.Consumer(this.createWebSocketURL(t))},getConfig:function(t){var e;return null!=(e=document.head.querySelector("meta[name='action-cable-"+t+"']"))?e.getAttribute("content"):void 0},createWebSocketURL:function(t){var e;return t&&!/^wss?:/i.test(t)?((e=document.createElement("a")).href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href):t},startDebugging:function(){return this.debugging=!0},stopDebugging:function(){return this.debugging=null},log:function(){var e,n;if(e=1<=arguments.length?t.call(arguments,0):[],this.debugging)return e.push(Date.now()),(n=this.logger).log.apply(n,["[ActionCable]"].concat(t.call(e)))}}}).call(this)}).call(this);var i=this.ActionCable;(function(){(function(){i.ConnectionMonitor=function(){var t,e,n;function o(t){var e,n;this.connection=t,this.visibilityDidChange=(e=this.visibilityDidChange,n=this,function(){return e.apply(n,arguments)}),this.reconnectAttempts=0}return o.pollInterval={min:3,max:30},o.staleThreshold=6,o.prototype.start=function(){if(!this.isRunning())return this.startedAt=e(),delete this.stoppedAt,this.startPolling(),document.addEventListener("visibilitychange",this.visibilityDidChange),i.log("ConnectionMonitor started. pollInterval = "+this.getPollInterval()+" ms")},o.prototype.stop=function(){if(this.isRunning())return this.stoppedAt=e(),this.stopPolling(),document.removeEventListener("visibilitychange",this.visibilityDidChange),i.log("ConnectionMonitor stopped")},o.prototype.isRunning=function(){return null!=this.startedAt&&null==this.stoppedAt},o.prototype.recordPing=function(){return this.pingedAt=e()},o.prototype.recordConnect=function(){return this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,i.log("ConnectionMonitor recorded connect")},o.prototype.recordDisconnect=function(){return this.disconnectedAt=e(),i.log("ConnectionMonitor recorded disconnect")},o.prototype.startPolling=function(){return this.stopPolling(),this.poll()},o.prototype.stopPolling=function(){return clearTimeout(this.pollTimeout)},o.prototype.poll=function(){return this.pollTimeout=setTimeout((t=this,function(){return t.reconnectIfStale(),t.poll()}),this.getPollInterval());var t},o.prototype.getPollInterval=function(){var e,n,o,r;return o=(r=this.constructor.pollInterval).min,n=r.max,e=5*Math.log(this.reconnectAttempts+1),Math.round(1e3*t(e,o,n))},o.prototype.reconnectIfStale=function(){if(this.connectionIsStale())return i.log("ConnectionMonitor detected stale connection. reconnectAttempts = "+this.reconnectAttempts+", pollInterval = "+this.getPollInterval()+" ms, time disconnected = "+n(this.disconnectedAt)+" s, stale threshold = "+this.constructor.staleThreshold+" s"),this.reconnectAttempts++,this.disconnectedRecently()?i.log("ConnectionMonitor skipping reopening recent disconnect"):(i.log("ConnectionMonitor reopening"),this.connection.reopen())},o.prototype.connectionIsStale=function(){var t;return n(null!=(t=this.pingedAt)?t:this.startedAt)>this.constructor.staleThreshold},o.prototype.disconnectedRecently=function(){return this.disconnectedAt&&n(this.disconnectedAt)<this.constructor.staleThreshold},o.prototype.visibilityDidChange=function(){if("visible"===document.visibilityState)return setTimeout((t=this,function(){if(t.connectionIsStale()||!t.connection.isOpen())return i.log("ConnectionMonitor reopening stale connection on visibilitychange. visbilityState = "+document.visibilityState),t.connection.reopen()}),200);var t},e=function(){return(new Date).getTime()},n=function(t){return(e()-t)/1e3},t=function(t,e,n){return Math.max(e,Math.min(n,t))},o}()}).call(this),function(){var t,e,n,o,r,c=[].slice,s=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};o=i.INTERNAL,e=o.message_types,n=o.protocols,r=2<=n.length?c.call(n,0,t=n.length-1):(t=0,[]),n[t++],i.Connection=function(){function t(t){var e,n;this.consumer=t,this.open=(e=this.open,n=this,function(){return e.apply(n,arguments)}),this.subscriptions=this.consumer.subscriptions,this.monitor=new i.ConnectionMonitor(this),this.disconnected=!0}return t.reopenDelay=500,t.prototype.send=function(t){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(t)),!0)},t.prototype.open=function(){return this.isActive()?(i.log("Attempted to open WebSocket, but existing socket is "+this.getState()),!1):(i.log("Opening WebSocket, current state is "+this.getState()+", subprotocols: "+n),null!=this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new i.WebSocket(this.consumer.url,n),this.installEventHandlers(),this.monitor.start(),!0)},t.prototype.close=function(t){var e;if((null!=t?t:{allowReconnect:!0}).allowReconnect||this.monitor.stop(),this.isActive())return null!=(e=this.webSocket)?e.close():void 0},t.prototype.reopen=function(){var t;if(i.log("Reopening WebSocket, current state is "+this.getState()),!this.isActive())return this.open();try{return this.close()}catch(e){return t=e,i.log("Failed to reopen WebSocket",t)}finally{i.log("Reopening WebSocket in "+this.constructor.reopenDelay+"ms"),setTimeout(this.open,this.constructor.reopenDelay)}},t.prototype.getProtocol=function(){var t;return null!=(t=this.webSocket)?t.protocol:void 0},t.prototype.isOpen=function(){return this.isState("open")},t.prototype.isActive=function(){return this.isState("open","connecting")},t.prototype.isProtocolSupported=function(){var t;return t=this.getProtocol(),s.call(r,t)>=0},t.prototype.isState=function(){var t,e;return e=1<=arguments.length?c.call(arguments,0):[],t=this.getState(),s.call(e,t)>=0},t.prototype.getState=function(){var t,e;for(e in WebSocket)if(WebSocket[e]===(null!=(t=this.webSocket)?t.readyState:void 0))return e.toLowerCase();return null},t.prototype.installEventHandlers=function(){var t,e;for(t in this.events)e=this.events[t].bind(this),this.webSocket["on"+t]=e},t.prototype.uninstallEventHandlers=function(){var t;for(t in this.events)this.webSocket["on"+t]=function(){}},t.prototype.events={message:function(t){var n,o,r;if(this.isProtocolSupported())switch(n=(r=JSON.parse(t.data)).identifier,o=r.message,r.type){case e.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case e.ping:return this.monitor.recordPing();case e.confirmation:return this.subscriptions.notify(n,"connected");case e.rejection:return this.subscriptions.reject(n);default:return this.subscriptions.notify(n,"received",o)}},open:function(){if(i.log("WebSocket onopen event, using '"+this.getProtocol()+"' subprotocol"),this.disconnected=!1,!this.isProtocolSupported())return i.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close:function(t){if(i.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error:function(){return i.log("WebSocket onerror event")}},t}()}.call(this),function(){var t=[].slice;i.Subscriptions=function(){function e(t){this.consumer=t,this.subscriptions=[]}return e.prototype.create=function(t,e){var n,o,r;return o="object"==typeof(n=t)?n:{channel:n},r=new i.Subscription(this.consumer,o,e),this.add(r)},e.prototype.add=function(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.sendCommand(t,"subscribe"),t},e.prototype.remove=function(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t},e.prototype.reject=function(t){var e,n,o,r,i;for(r=[],e=0,n=(o=this.findAll(t)).length;e<n;e++)i=o[e],this.forget(i),this.notify(i,"rejected"),r.push(i);return r},e.prototype.forget=function(t){var e;return this.subscriptions=function(){var n,o,r,i;for(i=[],n=0,o=(r=this.subscriptions).length;n<o;n++)(e=r[n])!==t&&i.push(e);return i}.call(this),t},e.prototype.findAll=function(t){var e,n,o,r,i;for(r=[],e=0,n=(o=this.subscriptions).length;e<n;e++)(i=o[e]).identifier===t&&r.push(i);return r},e.prototype.reload=function(){var t,e,n,o,r;for(o=[],t=0,e=(n=this.subscriptions).length;t<e;t++)r=n[t],o.push(this.sendCommand(r,"subscribe"));return o},e.prototype.notifyAll=function(){var e,n,o,r,i,c,s;for(n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],c=[],o=0,r=(i=this.subscriptions).length;o<r;o++)s=i[o],c.push(this.notify.apply(this,[s,n].concat(t.call(e))));return c},e.prototype.notify=function(){var e,n,o,r,i,c,s;for(c=arguments[0],n=arguments[1],e=3<=arguments.length?t.call(arguments,2):[],i=[],o=0,r=(s="string"==typeof c?this.findAll(c):[c]).length;o<r;o++)c=s[o],i.push("function"==typeof c[n]?c[n].apply(c,e):void 0);return i},e.prototype.sendCommand=function(t,e){var n;return n=t.identifier,this.consumer.send({command:e,identifier:n})},e}()}.call(this),function(){i.Subscription=function(){var t;function e(e,n,o){this.consumer=e,null==n&&(n={}),this.identifier=JSON.stringify(n),t(this,o)}return e.prototype.perform=function(t,e){return null==e&&(e={}),e.action=t,this.send(e)},e.prototype.send=function(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})},e.prototype.unsubscribe=function(){return this.consumer.subscriptions.remove(this)},t=function(t,e){var n,o;if(null!=e)for(n in e)o=e[n],t[n]=o;return t},e}()}.call(this),function(){i.Consumer=function(){function t(t){this.url=t,this.subscriptions=new i.Subscriptions(this),this.connection=new i.Connection(this)}return t.prototype.send=function(t){return this.connection.send(t)},t.prototype.connect=function(){return this.connection.open()},t.prototype.disconnect=function(){return this.connection.close({allowReconnect:!1})},t.prototype.ensureActiveConnection=function(){if(!this.connection.isActive())return this.connection.open()},t}()}.call(this)}).call(this),t.exports?t.exports=i:void 0===(r="function"==typeof(o=i)?o.call(e,n,e,t):o)||(t.exports=r)}).call(this)},ZLOB:function(t,e,n){},chzn:function(t,e,n){"use strict";n.r(e);n("SchZ"),n("ZLOB")}}]); |